wuguojie 2 месяцев назад
Родитель
Сommit
b6c5f66367

+ 34 - 22
pages/store/advertising.vue

@@ -62,7 +62,7 @@
 			</view>
 		</view>
 		<view class="padding flex sub-bottom" style="justify-content: space-around;">
-			<button class="cu-btn round line-gray shadow" @click="$Router.push({ name: 'settings' })"
+			<button class="cu-btn round line-gray shadow" @click="back()"
 				style="width: 205rpx;">取消</button>
 			<button style="width:443rpx;background: linear-gradient( 90deg, #77B6FF 0%, #449AFF 100%);border-radius:53rpx ;"
 				class="cu-btn bg-blue round " @click="sumbit">提交审核</button>
@@ -121,6 +121,9 @@
 			}
 		},
 		methods: {
+			back() {
+				uni.navigateBack()
+			},
 			 addImage() {
 			      // 将图片地址添加到图片数组
 			      this.list.push('http://web.shmily.ren/shmily-drag-image/static/4.jpg')
@@ -173,35 +176,44 @@
 				})
 			},
 			ChooseImage() {
+				const remain = 20 - this.form.photo.length
+				if (remain <= 0) {
+					uni.showToast({ title: '最多20张图', icon: 'none' })
+					return
+				}
 				uni.chooseImage({
-					// count: 4, //默认9
+					count: remain,
 					sizeType: ['compressed'],
 					sourceType: ['album'], //从相册选择
 					success: (res) => {
 						if (res) {
 							console.log('上传图片', res)
 							// this[type + 'Img'] = chooseImageRes.tempFilePaths[0];
-							uni.uploadFile({
-								url: configService.apiUrl + '/sys/common/upload',
-								filePath: res.tempFilePaths[0],
-								name: "file",
-								formData: {
-									'biz': 'temp',
-								},
-								success: (files) => {
-									let data = JSON.parse(files.data);
-									if (data.success) {
-										if (this.form.photo.length != 0) {
-											// this.photoList = this.photoList.concat(res.tempFilePaths)
-											this.form.photo.push(configService.apiUrl + '/' + data.message)
-
-										} else {
-											// this.photoList =res.tempFilePaths
-											this.form.photo = [configService.apiUrl + '/' + data.message]
+							if(res.tempFilePaths && res.tempFilePaths.length > 0) {
+								res.tempFilePaths.forEach(item => {
+									uni.uploadFile({
+										url: configService.apiUrl + '/sys/common/upload',
+										filePath: item,
+										name: "file",
+										formData: {
+											'biz': 'temp',
+										},
+										success: (files) => {
+											let data = JSON.parse(files.data);
+											if (data.success) {
+												if (this.form.photo.length != 0) {
+													// this.photoList = this.photoList.concat(res.tempFilePaths)
+													this.form.photo.push(configService.apiUrl + '/' + data.message)
+									
+												} else {
+													// this.photoList =res.tempFilePaths
+													this.form.photo = [configService.apiUrl + '/' + data.message]
+												}
+											}
 										}
-									}
-								}
-							})
+									})
+								})
+							}
 						}
 
 					}

+ 4 - 1
pages/store/brandMessage.vue

@@ -31,7 +31,7 @@
             </form>
         </view>
         <view class="padding flex sub-bottom">
-            <button class="cu-btn round line-gray  shadow" @click="$Router.push({ name: 'settings' })">取消</button>
+            <button class="cu-btn round line-gray  shadow" @click="back()">取消</button>
             <button style="margin-left: 12upx;width:77%" class="cu-btn bg-blue round " @click="sumbit">提交审核</button>
         </view>
     </view>
@@ -58,6 +58,9 @@ export default {
         }
     },
     methods: {
+		back() {
+			uni.navigateBack()
+		},
         async businessChange() {
             let [chooseImageErr, chooseImageRes] = await uni.chooseImage({
                 count: 1,

+ 2 - 2
pages/store/businessInfor.vue

@@ -77,7 +77,7 @@
 			</view>
 		</view>
 		<view class="padding flex sub-bottom">
-			<button class="cu-btn round line-gray  shadow" @click="$Router.push({ name: 'settings' })">取消</button>
+			<button class="cu-btn round line-gray  shadow" @click="back()">取消</button>
 			<button style="margin-left: 12upx;width:77%" class="cu-btn bg-blue round " @click.native="sumbit">提交</button>
 		</view>
 		<u-picker v-model="show" mode="time" @confirm="selectTime" style="z-index: 999 !important;"></u-picker>
@@ -276,7 +276,7 @@
 					.delete("/merchant/localMerchantTime/delete?id=" + val.id)
 					.then((res) => {
 						if (res.data.success) {
-							uni.showToast({ title: '提交成功', icon: 'none' });
+							uni.showToast({ title: '删除成功', icon: 'none' });
 							this.$http
 								.get("/merchant/localMerchantTime/list?merchantId=" + uni.getStorageSync(USER_INFO).merchantId)
 								.then((res) => {

+ 4 - 1
pages/store/businessQua.vue

@@ -79,7 +79,7 @@
 
 
 		<view class="padding flex " v-if="this.form.specialStatus !== 0">
-			<button class="cu-btn round line-gray  shadow" @click="$Router.push({ name: 'settings' })">取消</button>
+			<button class="cu-btn round line-gray  shadow" @click="back()">取消</button>
 			<button style="margin-left: 12upx;width:77%" class="cu-btn bg-blue round " @click="sumbit">提交审核</button>
 		</view>
 		<ba-tree-picker ref="treePicker" :multiple='true' @select-change="selectChange" title="选择分类" :localdata="treeData"
@@ -140,6 +140,9 @@
 			}
 		},
 		methods: {
+			back() {
+				uni.navigateBack()
+			},
 			parseCategoryNames(categoryNames) {
 				if (!categoryNames) return []
 				return String(categoryNames).split(' / ').map((name) => name.trim()).filter(Boolean)

+ 4 - 1
pages/store/headPhoto.vue

@@ -35,7 +35,7 @@
 			</view>
 		</view>
 		<view class="padding flex sub-bottom" style="justify-content: space-around;">
-			<button class="cu-btn round line-gray shadow" @click="$Router.push({ name: 'settings' })"
+			<button class="cu-btn round line-gray shadow" @click="back()"
 				style="width: 205rpx;">取消</button>
 			<button style="width:443rpx;background: linear-gradient( 90deg, #77B6FF 0%, #449AFF 100%);border-radius:53rpx ;"
 				class="cu-btn bg-blue round " @click="sumbit">提交审核</button>
@@ -95,6 +95,9 @@
 			}
 		},
 		methods: {
+			back() {
+				uni.navigateBack()
+			},
 			hoursChange(index) {
 				const queryString = encodeURIComponent(JSON.stringify({
 					index,