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",
"style": {
"componentPlaceholder": {
"complaint-btn": "view"
}
}
},
{

11
src/pages/index/index.vue

@ -81,7 +81,7 @@
<text>核销</text>
</view>
<view class="complaint-btn" @click="toComplaint">
<complaint-btn></complaint-btn>
</view>
</view>
</template>
@ -90,6 +90,7 @@
import util from '../../utils/util';
import { servers } from '../../js/server';
import { API } from '../../js/api';
import complaint_btn from '@/subpackage/complaint/components/fixed_btn.vue';
const tabList = [
{
id: 0,
@ -195,6 +196,9 @@
// return app.isLogin();
// }
},
components: {
'complaint-btn': complaint_btn
},
data() {
return {
tabList,
@ -778,9 +782,6 @@
bottom: 190rpx;
bottom: calc( 190rpx + constant(safe-area-inset-bottom));
bottom: calc( 190rpx + env(safe-area-inset-bottom));
right: 00rpx;
width: 148upx;
height: 148upx;
background: skyblue;
right: 0rpx;
}
</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 ?? '';
},
methods: {
//
chooseImg(){
uni.chooseImage({
success: imgRes =>{
console.log(imgRes);
this.imgTempLs = imgRes?.tempFilePaths || []
},
failMsg: imgErr => {
@ -54,6 +54,7 @@ export default {
}
})
},
//
delImg(idx){
this.imgTempLs.splice(idx, 1);
},
@ -61,16 +62,19 @@ export default {
let { iptTxt, imgTempLs, brand_id } = this;
if(!iptTxt)return showModal({ title: '提示', content: '请输入反馈内容' });
try{
//
showLoad();
let _imgLs = await Promise.all(imgTempLs.map((e, i) => {
return this.uploadImg(e)
}));
hideLoad();
//
let _effectivityImgs = _imgLs.filter(e => e?.type !== 'error');
//
this.submitComplaintInfo({
brand_id: brand_id,
mc_text: iptTxt ?? '',
mc_imgs: _imgLs?.map(e => e?.url ?? '') || []
mc_imgs: _effectivityImgs?.map(e => e?.url ?? '') || []
})
}catch(err){
hideLoad();

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

After

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

Loading…
Cancel
Save