Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/pages/goods/detail.vue
chenqilong 1 year ago
parent
commit
751b2948d7

+ 84 - 91
package-lock.json

@@ -3054,6 +3054,44 @@
           "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
           "dev": true
         },
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "chalk": {
+          "version": "4.1.2",
+          "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
+          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "color-name": {
+          "version": "1.1.4",
+          "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
+          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+          "dev": true,
+          "optional": true
+        },
         "css-loader": {
           "version": "3.6.0",
           "resolved": "https://registry.npmmirror.com/css-loader/-/css-loader-3.6.0.tgz",
@@ -3111,6 +3149,13 @@
             "pump": "^3.0.0"
           }
         },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true,
+          "optional": true
+        },
         "hash-sum": {
           "version": "2.0.0",
           "resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-2.0.0.tgz",
@@ -3213,6 +3258,42 @@
           "requires": {
             "minipass": "^3.1.1"
           }
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        },
+        "vue-loader-v16": {
+          "version": "npm:vue-loader@16.8.3",
+          "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
+          "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "chalk": "^4.1.0",
+            "hash-sum": "^2.0.0",
+            "loader-utils": "^2.0.0"
+          },
+          "dependencies": {
+            "loader-utils": {
+              "version": "2.0.4",
+              "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.4.tgz",
+              "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "big.js": "^5.2.2",
+                "emojis-list": "^3.0.0",
+                "json5": "^2.1.2"
+              }
+            }
+          }
         }
       }
     },
@@ -3973,7 +4054,7 @@
     },
     "axios": {
       "version": "1.6.0",
-      "resolved": "http://121.41.110.30:4873/axios/-/axios-1.6.0.tgz",
+      "resolved": "https://registry.npmmirror.com/axios/-/axios-1.6.0.tgz",
       "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==",
       "requires": {
         "follow-redirects": "^1.15.0",
@@ -3983,7 +4064,7 @@
       "dependencies": {
         "form-data": {
           "version": "4.0.0",
-          "resolved": "http://121.41.110.30:4873/form-data/-/form-data-4.0.0.tgz",
+          "resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.0.tgz",
           "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
           "requires": {
             "asynckit": "^0.4.0",
@@ -13215,7 +13296,7 @@
     },
     "proxy-from-env": {
       "version": "1.1.0",
-      "resolved": "http://121.41.110.30:4873/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
+      "resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
       "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
     },
     "prr": {
@@ -16185,94 +16266,6 @@
         "vue-style-loader": "^4.1.0"
       }
     },
-    "vue-loader-v16": {
-      "version": "npm:vue-loader@16.8.3",
-      "resolved": "http://121.41.110.30:4873/vue-loader/-/vue-loader-16.8.3.tgz",
-      "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
-      "dev": true,
-      "optional": true,
-      "requires": {
-        "chalk": "^4.1.0",
-        "hash-sum": "^2.0.0",
-        "loader-utils": "^2.0.0"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "resolved": "http://121.41.110.30:4873/ansi-styles/-/ansi-styles-4.3.0.tgz",
-          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "resolved": "http://121.41.110.30:4873/chalk/-/chalk-4.1.2.tgz",
-          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "resolved": "http://121.41.110.30:4873/color-convert/-/color-convert-2.0.1.tgz",
-          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "resolved": "http://121.41.110.30:4873/color-name/-/color-name-1.1.4.tgz",
-          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
-          "dev": true,
-          "optional": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "resolved": "http://121.41.110.30:4873/has-flag/-/has-flag-4.0.0.tgz",
-          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
-          "dev": true,
-          "optional": true
-        },
-        "hash-sum": {
-          "version": "2.0.0",
-          "resolved": "http://121.41.110.30:4873/hash-sum/-/hash-sum-2.0.0.tgz",
-          "integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==",
-          "dev": true,
-          "optional": true
-        },
-        "loader-utils": {
-          "version": "2.0.4",
-          "resolved": "http://121.41.110.30:4873/loader-utils/-/loader-utils-2.0.4.tgz",
-          "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "big.js": "^5.2.2",
-            "emojis-list": "^3.0.0",
-            "json5": "^2.1.2"
-          }
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "resolved": "http://121.41.110.30:4873/supports-color/-/supports-color-7.2.0.tgz",
-          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
     "vue-pdf": {
       "version": "4.3.0",
       "resolved": "https://registry.npmmirror.com/vue-pdf/-/vue-pdf-4.3.0.tgz",

+ 1 - 1
src/App.vue

@@ -87,4 +87,4 @@
   @import "uview-ui/index.scss";
 
   @import "styles/iconfont.css";
-</style>
+</style>

+ 1 - 1
src/common/http/index.js

@@ -38,7 +38,7 @@ export const $http = (url, method, data, json, loadingBool = false) => {
     if (loadingBool) {
       uni.hideLoading()
     }
-    const res = response.data;
+    const res = response.data || {};
     if (whiteCodes.indexOf(res.code) < 0) {
       if (res.code === 1001) {
         goLoginPage()

+ 1 - 1
src/common/utils/util.js

@@ -14,7 +14,7 @@ export const getUserInfo = () => {
         // tab数字角标
         uni.setTabBarBadge({
           index: 2,
-          text: data.unread ? data.unread + "" : ""
+          text: data.unread ? data.unread + "" : 0
         })
         uni.setStorageSync('recycle_mobile_user', data);
         resolve(data);

+ 109 - 5
src/pages/goods/detail.vue

@@ -135,7 +135,23 @@
         	height="100">
         </u--textarea>
         <view class="title">上传凭证</view>
+<<<<<<< HEAD
         <zj-upload key="cp" @getFiles="getFiles" :fileList="aaa" :count="9" />
+=======
+        <!-- <zj-upload key="cp" @getFiles="getFiles" :fileList="reportForm.fileList" :count="9" /> -->
+        <view class="images">
+        	<block v-for="(item, index) in reportForm.fileList" :key='index'>
+        		<view class="img">
+        			<image :src="imageUrl + item.url" mode="aspectFill" @tap="prevImg(item.url)"></image>
+        			<text class="iconfont icon-guanbi1" @tap="delImage(index)"></text>
+        		</view>
+        	</block>
+        	<view class="add" @tap="addImage" v-if="reportForm.fileList.length < 3">
+        		<text class="iconfont icon-xiangji"></text>
+        		<text class="text">点击上传</text>
+        	</view>
+        </view>
+>>>>>>> origin/master
       </view>
     </zj-dialog-box>
   </view>
@@ -146,6 +162,7 @@
 	import zjDialogBox from "@/components/zj-dialog/zj-dialog-box.vue";
 	import zjDialogRemark from '@/components/zj-dialog/zj-dialog-remark.vue';
   import zjUpload from '@/components/zj-upload/index.vue'
+import { uploadImg } from '@/common/utils/util.js'
 
   export default {
     components: {
@@ -224,16 +241,16 @@
       		this.loadStatus = 0;
 
           let actionList = [
-            {name: '已转让', value: 1},
+            // {name: '已转让', value: 1},
             {name: '上架', value: 2},
             {name: '下架', value: 3},
             {name: '重新上架', value: 4},
             {name: '编辑', value: 5},
           ]
           if(this.detail.status === 1) {
-            actionList.splice(1, 1);
+            actionList.splice(0, 1);
           }else if(this.detail.status === 0) {
-            actionList.splice(2, 1);
+            actionList.splice(1, 1);
           }
           this.actionList = actionList;
       	}).catch(res => {
@@ -344,7 +361,8 @@
         this.$api.postJson('/reportGoods/report', {
           goodsId: this.id,
           reportNote: this.reportForm.reason,
-          url: this.reportForm.fileList,
+          url: this.reportForm.fileList.map(item => item.url),
+          
         }).then(res => {
           this.$successToast();
           this.cancelReportDialog();
@@ -406,7 +424,39 @@
             url: `/pages/issue/index`
           }, 'switchTab')
         }
-      }
+      },
+
+      // 添加图片
+      async addImage() {
+      	uni.chooseImage({
+      		count: 3 - this.reportForm.fileList,
+      		sizeType: ['original'],
+      		success: res => {
+      			uni.showLoading();
+      			res.tempFiles.forEach(async item => {
+      				let data = await uploadImg(item);
+      				this.reportForm.fileList.push(data);
+      			});
+      			uni.hideLoading();
+      		},
+      		fail: err => {}
+      	})
+      },
+
+      // 删除图片
+      delImage(index) {
+      	this.reportForm.fileList.splice(index, 1);
+      },
+
+      //预览图片
+      prevImg(current) {
+      	uni.previewImage({
+      		current: this.imageUrl + current,
+      		urls: this.reportForm.fileList.map(item => {
+      			return this.imageUrl + item.url
+      		})
+      	})
+      },
     }
 
   }
@@ -673,6 +723,60 @@
       color: $assist-color;
     }
   }
+  .images {
+  	display: flex;
+  	flex-wrap: wrap;
+  	.add {
+  		display: flex;
+  		flex-direction: column;
+  		align-items: center;
+  		justify-content: center;
+  		width: 180rpx;
+  		height: 180rpx;
+  		border: 2rpx dashed #dadada;
+  		border-radius: 10rpx;
+  		margin-top: 30rpx;
+  		box-sizing: border-box;
+  		.iconfont {
+  			font-size: 48rpx;
+  			color: #999999;
+  		}
+  		.text {
+  			font-size: 22rpx;
+  			color: #999999;
+  			margin-top: 8rpx;
+  		}
+  	}
+  	.img {
+  		position: relative;
+  		margin-right: 30rpx;
+  		margin-top: 30rpx;
+  		&:nth-child(4n) {
+  			margin-right: 0;
+  		}
+  		image {
+  			width: 180rpx;
+  			height: 180rpx;
+  			border-radius: 10rpx;
+  			overflow: hidden;
+  			display: block;
+  		}
+  		text {
+  			position: absolute;
+  			right: -10rpx;
+  			top: -10rpx;
+  			width: 40rpx;
+  			height: 40rpx;
+  			border-radius: 50%;
+  			background: #FF3F42;
+  			font-size: 24rpx;
+  			color: #FFFFFF;
+  			display: flex;
+  			align-items: center;
+  			justify-content: center;
+  		}
+  	}
+  }
 }
 
 .bottom-container {

+ 10 - 8
src/pages/message/index.vue

@@ -49,16 +49,9 @@
 <script>
   import api from '@/common/http/'
   export default {
-    // #ifdef H5
-    data() {
-      return {
-        imageUrl: this.$imageUrl,
-        scrollTop: 0,
-        list: []
-      }
-    },
     onShow() {
       uni.$emit("updateUserInfo")
+      // #ifdef H5
       var getList = () => {
         if (this.timeId) {
           clearTimeout(this.timeId)
@@ -73,6 +66,15 @@
         })
       }
       getList()
+      // #endif
+    },
+    // #ifdef H5
+    data() {
+      return {
+        imageUrl: this.$imageUrl,
+        scrollTop: 0,
+        list: []
+      }
     },
     onHide() {
       if (this.timeId) {

+ 1 - 1
src/pages/mine/address/form.vue

@@ -410,7 +410,7 @@
 				this.$modal({
 					content: '确定要删除该地址吗?',
 				}).then(() => {
-					this.$api.post('/user/address/del', {
+					this.$api.postJson('/user/address/del', {
 						userAddressId: this.editId
 					}).then(res => {
 						this.$successToast('删除成功');

+ 3 - 0
src/pages/mine/address/list.vue

@@ -101,6 +101,9 @@
               houseNo: '',
             }
             that.$navPage('/pages/mine/address/form?addressData=' + JSON.stringify(params));
+          },
+          fail(res) {
+            console.log(res);
           }
         })
       },

+ 8 - 8
src/pages/mine/myIssue/list.vue

@@ -132,13 +132,13 @@
 
     async onLoad({
       tab
-    }) {
-      this.tabCurrent = tab ? Number(tab) : 0;
-      await this.getList();
-      
+    }) {
       this.crossPage.$on('reloadMyIssueListPage', () => {
         this.refreshList();
-      })
+      })
+
+      this.tabCurrent = tab ? Number(tab) : 0;
+      await this.getList();
     },
 
     onUnload() {
@@ -183,10 +183,10 @@
       // 触发下拉刷新
       refresherrefresh(e) {
         this.refresherTriggered = true;
-        this.refreshLish();
+        this.refreshList();
       },
 
-      refreshLish() {
+      refreshList() {
         this.dataList = [];
         this.pageNum = 1;
         this.getList();
@@ -194,7 +194,7 @@
 
       clickTab(item) {
         this.tabCurrent = item.value;
-        this.refreshLish();
+        this.refreshList();
       },
 
       toDetail(id) {

+ 7 - 3
src/styles/iconfont.css

@@ -1,9 +1,9 @@
 /* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
 @font-face {
   font-family: 'iconfont';  /* Project id 4308323 */
-  src: url('https://at.alicdn.com/t/c/font_4308323_2ahynczrz8w.woff2?t=1699010638735') format('woff2'),
-       url('https://at.alicdn.com/t/c/font_4308323_2ahynczrz8w.woff?t=1699010638735') format('woff'),
-       url('https://at.alicdn.com/t/c/font_4308323_2ahynczrz8w.ttf?t=1699010638735') format('truetype');
+  src: url('https://at.alicdn.com/t/c/font_4308323_dmtu4i5zp24.woff2?t=1699092342414') format('woff2'),
+       url('https://at.alicdn.com/t/c/font_4308323_dmtu4i5zp24.woff?t=1699092342414') format('woff'),
+       url('https://at.alicdn.com/t/c/font_4308323_dmtu4i5zp24.ttf?t=1699092342414') format('truetype');
 }
 
 .iconfont {
@@ -14,6 +14,10 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-guanbi1:before {
+  content: "\e903";
+}
+
 .icon-daifukuan:before {
   content: "\e604";
 }