diff --git a/src/pages.json b/src/pages.json
index a09940a..c41ecff 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -4,6 +4,9 @@
{
"path": "pages/index/index",
"style": {
+ "componentPlaceholder": {
+ "complaint-btn": "view"
+ }
}
},
{
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 0e584c4..852434d 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -81,7 +81,7 @@
核销
-
+
@@ -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;
}
diff --git a/src/subpackage/complaint/components/fixed_btn.vue b/src/subpackage/complaint/components/fixed_btn.vue
new file mode 100644
index 0000000..c9f670f
--- /dev/null
+++ b/src/subpackage/complaint/components/fixed_btn.vue
@@ -0,0 +1,41 @@
+
+
+
+ 投诉
+
+ 建议
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/subpackage/complaint/pages/operate.vue b/src/subpackage/complaint/pages/operate.vue
index 3ba36a7..f2e3505 100644
--- a/src/subpackage/complaint/pages/operate.vue
+++ b/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();
diff --git a/src/subpackage/complaint/static/images/green_bg_circle.png b/src/subpackage/complaint/static/images/green_bg_circle.png
new file mode 100644
index 0000000..0117de2
Binary files /dev/null and b/src/subpackage/complaint/static/images/green_bg_circle.png differ