Browse Source

finish tid1731

tid1731
刘嘉炜 4 weeks ago
parent
commit
2563b7b0e4
  1. 3
      src/pages.json
  2. 11
      src/pages/index/index.vue
  3. 41
      src/subpackage/complaint/components/fixed_btn.vue
  4. 10
      src/subpackage/complaint/pages/operate.vue
  5. BIN
      src/subpackage/complaint/static/images/green_bg_circle.png

3
src/pages.json

@ -4,6 +4,9 @@
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"componentPlaceholder": {
"complaint-btn": "view"
}
} }
}, },
{ {

11
src/pages/index/index.vue

@ -81,7 +81,7 @@
<text>核销</text> <text>核销</text>
</view> </view>
<view class="complaint-btn" @click="toComplaint"> <view class="complaint-btn" @click="toComplaint">
<complaint-btn></complaint-btn>
</view> </view>
</view> </view>
</template> </template>
@ -90,6 +90,7 @@
import util from '../../utils/util'; import util from '../../utils/util';
import { servers } from '../../js/server'; import { servers } from '../../js/server';
import { API } from '../../js/api'; import { API } from '../../js/api';
import complaint_btn from '@/subpackage/complaint/components/fixed_btn.vue';
const tabList = [ const tabList = [
{ {
id: 0, id: 0,
@ -195,6 +196,9 @@
// return app.isLogin(); // return app.isLogin();
// } // }
}, },
components: {
'complaint-btn': complaint_btn
},
data() { data() {
return { return {
tabList, tabList,
@ -778,9 +782,6 @@
bottom: 190rpx; bottom: 190rpx;
bottom: calc( 190rpx + constant(safe-area-inset-bottom)); bottom: calc( 190rpx + constant(safe-area-inset-bottom));
bottom: calc( 190rpx + env(safe-area-inset-bottom)); bottom: calc( 190rpx + env(safe-area-inset-bottom));
right: 00rpx;
width: 148upx;
height: 148upx;
background: skyblue;
right: 0rpx;
} }
</style> </style>

41
src/subpackage/complaint/components/fixed_btn.vue

@ -0,0 +1,41 @@
<template>
<view class="fixed-btn">
<image class="fb-bg" mode="aspectFit" src="/subpackage/complaint/static/images/green_bg_circle.png"></image>
<view class="fb-txt">投诉</view>
<view class="fb-line"></view>
<view class="fb-txt">建议</view>
</view>
</template>
<script>
export default {
}
</script>
<style lang="scss">
.fixed-btn{
position: relative;
width: 148upx;
height: 148upx;
@include ctf(center);
flex-direction: column;
.fb-bg{
position: absolute;
width: 100%;
height: 100%;
}
}
.fb-txt{
position: relative;
text-align: center;
@include flcw(20rpx, 28rpx, #fff, 500);
}
.fb-line{
position: relative;
margin: 0 auto;
width: 40upx;
height: 6upx;
background: #fff;
}
</style>

10
src/subpackage/complaint/pages/operate.vue

@ -43,10 +43,10 @@ export default {
this.brand_id = options?.brand_id ?? ''; this.brand_id = options?.brand_id ?? '';
}, },
methods: { methods: {
//
chooseImg(){ chooseImg(){
uni.chooseImage({ uni.chooseImage({
success: imgRes =>{ success: imgRes =>{
console.log(imgRes);
this.imgTempLs = imgRes?.tempFilePaths || [] this.imgTempLs = imgRes?.tempFilePaths || []
}, },
failMsg: imgErr => { failMsg: imgErr => {
@ -54,6 +54,7 @@ export default {
} }
}) })
}, },
//
delImg(idx){ delImg(idx){
this.imgTempLs.splice(idx, 1); this.imgTempLs.splice(idx, 1);
}, },
@ -61,16 +62,19 @@ export default {
let { iptTxt, imgTempLs, brand_id } = this; let { iptTxt, imgTempLs, brand_id } = this;
if(!iptTxt)return showModal({ title: '提示', content: '请输入反馈内容' }); if(!iptTxt)return showModal({ title: '提示', content: '请输入反馈内容' });
try{ try{
//
showLoad(); showLoad();
let _imgLs = await Promise.all(imgTempLs.map((e, i) => { let _imgLs = await Promise.all(imgTempLs.map((e, i) => {
return this.uploadImg(e) return this.uploadImg(e)
})); }));
hideLoad(); hideLoad();
//
let _effectivityImgs = _imgLs.filter(e => e?.type !== 'error');
//
this.submitComplaintInfo({ this.submitComplaintInfo({
brand_id: brand_id, brand_id: brand_id,
mc_text: iptTxt ?? '', mc_text: iptTxt ?? '',
mc_imgs: _imgLs?.map(e => e?.url ?? '') || []
mc_imgs: _effectivityImgs?.map(e => e?.url ?? '') || []
}) })
}catch(err){ }catch(err){
hideLoad(); hideLoad();

BIN
src/subpackage/complaint/static/images/green_bg_circle.png

After

Width: 296  |  Height: 296  |  Size: 51 KiB

Loading…
Cancel
Save