Bläddra i källkod

Merge branch 'master-pro' of http://39.101.143.165:8090/hxl13994548489/LocalLivingServicesUniapp into master-pro

maoruxin 2 månader sedan
förälder
incheckning
164e409c90
6 ändrade filer med 114 tillägg och 41 borttagningar
  1. 2 2
      manifest.json
  2. 1 1
      pages/coupon/coupon.vue
  3. 37 24
      pages/order/index.vue
  4. 2 2
      pages/product/details.vue
  5. 72 12
      pages/store/advertising.vue
  6. BIN
      static/ad/close.png

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "掌柜生活商户版",
     "appid" : "__UNI__E0EA6E1",
     "description" : "",
-    "versionName" : "1.1.7.2",
-    "versionCode" : 1172,
+    "versionName" : "1.1.9.2",
+    "versionCode" : 1192,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */

+ 1 - 1
pages/coupon/coupon.vue

@@ -68,7 +68,7 @@
 							<text class="dot">•</text>
 							<text class="label">适用范围:</text>
 							<text class="value">{{
-                                item.couponRange == '1' ? '店可用' : item.couponRange == '2' ? '部分分类商品可用' : '部分分类商品不可用'
+                                item.couponRange == '1' ? '店可用' : item.couponRange == '2' ? '部分分类商品可用' : '部分分类商品不可用'
                                 }}</text>
 						</view>
 						<view class="info-item">

+ 37 - 24
pages/order/index.vue

@@ -162,7 +162,7 @@
 					</view>
 				</view>
 				<view class="time">
-					<view class="time_left">
+					<view class="time_left" v-if='item.orderStateTimeName && item.orderStateTime'>
 						{{item.orderStateTimeName}}:{{item.orderStateTime}}
 					</view>
 					<view class="time_right" @click.stop="goRecord(item)" v-if="item.auditType =='0'">
@@ -501,6 +501,7 @@
 			},
 			mescrollInit(mescroll) {
 				this.mescroll = mescroll;
+				mescroll.optDown.use = false;
 			},
 			InputBlur(e) {
 				this.search = e.detail.value
@@ -551,7 +552,7 @@
 			goRecord(item) {
 				console.log(item)
 				uni.navigateTo({
-					url: '/pages/order/record?orderId=' + item.orderId
+					url: '/pages/order/record?orderId=' + item.id
 				})
 			},
 			//跳转至服务订单详情页
@@ -577,11 +578,14 @@
 					this.orderList.forEach(item => {
 						item.isShow = false
 					})
-					console.log(this.orderList)
-					this.mescroll.endSuccess(res.data.result.records.length, res.data.result.total);
+					if (this.mescroll) {
+						this.mescroll.endSuccess(res.data.result.records.length, res.data.result.total);
+					}
 					uni.showTabBar()
 				}).catch(() => {
-					this.mescroll.endErr()
+					if (this.mescroll) {
+						this.mescroll.endErr()
+					}
 				})
 			},
 			geDetail(item) {
@@ -602,10 +606,14 @@
 				}
 				this.$http.post("/ts/merchant/serviceOrder", data).then(res => {
 						this.serviceList = this.serviceList.concat(res.data.result.records)
-						this.mescroll.endSuccess(res.data.result.records.length, res.data.result.total);
+						if (this.mescroll) {
+							this.mescroll.endSuccess(res.data.result.records.length, res.data.result.total);
+						}
 					})
 					.catch(() => {
-						this.mescroll.endErr()
+						if (this.mescroll) {
+							this.mescroll.endErr()
+						}
 					})
 
 			},
@@ -985,31 +993,36 @@
 				})
 			}
 		},
-		mounted() {
-			this.mescroll.optDown.use = false
-			// this.getList()
-		},
 		onShow() {
-			let that = this
+			const app = getApp()
+			if (app.globalData) {
+				const { currentIndex, tabIndex } = app.globalData
+				if (currentIndex !== '' && currentIndex != null) {
+					this.currentIndex = currentIndex
+				}
+				if (tabIndex !== '' && tabIndex != null) {
+					this.tabIndex = tabIndex
+				}
+				app.globalData.currentIndex = ''
+				app.globalData.tabIndex = ''
+			}
+			const that = this
 			uni.getStorage({
 				key: 'login_user_info',
-				success: function(res) {
+				success(res) {
 					that.merchantId = res.data.merchantId
 					that.serviceList = []
 					that.orderList = []
-					let page = {
-						num: 1,
-						size: 10
-					}
-					that.getList(page)
-					that.getserviceList(page)
+					const page = { num: 1, size: 10 }
+					that.$nextTick(() => {
+						if (that.tabIndex == 0) {
+							that.getList(page)
+						} else if (that.tabIndex == 1) {
+							that.getserviceList(page)
+						}
+					})
 				}
 			})
-			const app = getApp();
-      this.currentIndex=app.globalData.currentIndex
-			this.tabIndex=app.globalData.tabIndex
-			app.globalData.currentIndex=''
-			app.globalData.tabIndex=''
 		},
 	}
 </script>

+ 2 - 2
pages/product/details.vue

@@ -90,9 +90,9 @@
 				<view class="data">
 					<span class="span">售卖时间</span>{{form.saleStartDate ? form.saleStartDate.slice(0,10) : ''}}-{{form.saleEndDate ? form.saleEndDate.slice(0,10) : ''}}
 				</view>
-				<view class="data">
+				<!-- <view class="data">
 					<span class="span">库存</span>{{form.stockQuantity}}
-				</view>
+				</view> -->
 				<view class="data">
 					<span class="span">可用时间</span>
 					<view v-if="form.useType == 3">长期有效</view>

+ 72 - 12
pages/store/advertising.vue

@@ -19,9 +19,11 @@
 						<view class="business-img ">
 							<view class="uni-uploader__file" v-if="video">
 								<view class="uploader_video">
-									<uni-icons class="icon iconfont icon-cuo" type="trash-filled" size="20"
-										@tap="delectVideo"></uni-icons>
 									<video :src="video" class="video-container"></video>
+									<cover-view class="delete-video-icon" @tap="delectVideo">
+												<!-- <uni-icons class="icon iconfont icon-cuo" type="trash-filled" size="20"  color="#ffffff"></uni-icons> -->
+										<cover-image class="delete-icon-img" src="/static/ad/close.png"></cover-image>
+									</cover-view>
 								</view>
 							</view>
 							<image v-else src="/static/store/upload2.png" mode="" @tap="chooseVideo()"></image>
@@ -225,16 +227,50 @@
 					current: e.currentTarget.dataset.url
 				});
 			},
-			chooseVideo() {
-				// 上传视频
-				console.log('上传视频')
-				uni.chooseVideo({
-					sourceType: ['camera', 'album'],
-					success: (res) => {
-						this.video = res.tempFilePath;
-					}
-				})
-			},
+      chooseVideo() {
+      	// 上传视频
+      	console.log('上传视频')
+      	uni.chooseVideo({
+      		sourceType: ['camera', 'album'],
+      		success: (res) => {
+      			uni.showLoading({
+      				title: '上传中...'
+      			})
+      			uni.uploadFile({
+      				url: configService.apiUrl + '/sys/common/upload',
+      				filePath: res.tempFilePath,
+      				name: "file",
+      				formData: {
+      					'biz': 'temp',
+      				},
+      				success: (files) => {
+      					uni.hideLoading()
+      					let data = JSON.parse(files.data);
+      					if (data.success) {
+      						this.video = configService.apiUrl + '/' + data.message
+      						uni.showToast({
+      							title: '上传成功',
+      							icon: 'success'
+      						})
+      					} else {
+      						uni.showToast({
+      							title: data.message || '上传失败',
+      							icon: 'none'
+      						})
+      					}
+      				},
+      				fail: (err) => {
+      					uni.hideLoading()
+      					uni.showToast({
+      						title: '上传失败',
+      						icon: 'none'
+      					})
+      					console.error('视频上传失败', err)
+      				}
+      			})
+      		}
+      	})
+      },
 			sumbit() {
 				let data = {
 					merchantId: uni.getStorageSync(USER_INFO).merchantId,
@@ -395,6 +431,7 @@
 		padding-bottom: 7px;
 
 		.uploader_video {
+			position: relative;
 			width: 310upx;
 			height: 210upx;
 		}
@@ -454,6 +491,29 @@
 		border-bottom-left-radius: 20upx;
 	}
 
+	.icon-delete-red {
+		color: red;
+	}
+
+	.delete-video-icon {
+		position: absolute;
+		right: 0upx;
+		top: 0upx;
+		width: 40upx;
+		height: 40upx;
+		background-color: rgba(0, 0, 0, 0.4);
+		border-radius: 0 0 0 10rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		z-index:9999;
+	}
+
+	.delete-icon-img {
+		width: 24upx;
+		height: 24upx;
+	}
+
 	.business-hours {
 		padding: 27upx 22upx;
 		background: #F7F8FC;

BIN
static/ad/close.png