zhaoxw пре 4 година
родитељ
комит
444efbeaa8

+ 1 - 1
pages.json

@@ -19,7 +19,7 @@
 		{
 			"path": "pages/media/index",
 			"style": {
-				"navigationBarTitleText": "多媒体",
+				"navigationBarTitleText": "直播和短视频",
 				"enablePullDownRefresh": true
 			}
 		},

+ 16 - 9
pages/index/home.vue

@@ -21,8 +21,8 @@
 				 @click="setType(item, 1)">{{item.label}}</view>
 			</view>
 			<view class="chart-box">
-				<canvas canvas-id="chartBox1" id="chartBox1" class="chart-canvas" @touchstart="touchLine1"
-				 @touchmove="moveLine1" @touchend="touchEndLine1" force-use-old-canvas="true"></canvas>
+				<canvas canvas-id="chartBox1" id="chartBox1" class="chart-canvas" @touchstart="touchLine1" @touchmove="moveLine1"
+				 @touchend="touchEndLine1" force-use-old-canvas="true"></canvas>
 			</view>
 		</view>
 		<view class="index-data-box">
@@ -32,8 +32,8 @@
 				 @click="setType(item, 2)">{{item.label}}</view>
 			</view>
 			<view class="chart-box">
-				<canvas canvas-id="chartBox2" id="chartBox2" class="chart-canvas" @touchstart="touchLine2"
-				 @touchmove="moveLine2" @touchend="touchEndLine2" force-use-old-canvas="true"></canvas>
+				<canvas canvas-id="chartBox2" id="chartBox2" class="chart-canvas" @touchstart="touchLine2" @touchmove="moveLine2"
+				 @touchend="touchEndLine2" force-use-old-canvas="true"></canvas>
 			</view>
 		</view>
 		<u-top-tips ref="uTips"></u-top-tips>
@@ -71,7 +71,8 @@
 			}
 		},
 		onLoad() {
-			if (!uni.getStorageSync('token') || uni.getStorageSync('userData').registerFlag != 1 || uni.getStorageSync('userData').auditState != 2) {
+			if (!uni.getStorageSync('token') || uni.getStorageSync('userData').registerFlag != 1 || uni.getStorageSync(
+					'userData').auditState != 2) {
 				uni.reLaunch({
 					url: '/pages/index/index'
 				});
@@ -83,7 +84,7 @@
 			this.setData(2, 'creat')
 		},
 		onShow() {
-			this.userData = uni.getStorageSync("userData")||{}
+			this.userData = uni.getStorageSync("userData") || {}
 			this.getShopInfo()
 		},
 		onPullDownRefresh() {
@@ -108,7 +109,7 @@
 			},
 			//  跳转商品管理
 			goToGoodList() {
-				if(!this.userData.roleInfos.some(v=>v.menuInfos.some(vv=>vv.label == '商品管理'))){
+				if (!this.userData.roleInfos.some(v => v.menuInfos.some(vv => vv.label == '商品管理'))) {
 					this.$refs.uTips.show({
 						title: '没有授权使用,请联系商户负责人',
 						type: 'warning',
@@ -122,7 +123,7 @@
 			},
 			//  跳转商品管理
 			goToOrderList() {
-				if(!this.userData.roleInfos.some(v=>v.menuInfos.some(vv=>vv.label == '订单管理'))){
+				if (!this.userData.roleInfos.some(v => v.menuInfos.some(vv => vv.label == '订单管理'))) {
 					this.$refs.uTips.show({
 						title: '没有授权使用,请联系商户负责人',
 						type: 'warning',
@@ -153,6 +154,7 @@
 						let option = {
 							categories: column,
 							scrollPosition: 'left',
+							yAxis: {},
 							series: [{
 								name: "",
 								color: "#52A63A",
@@ -174,6 +176,7 @@
 			},
 			//  创建图表
 			creatChart(type, column, data) {
+				console.log(data)
 				let option = {
 					$this: _self,
 					canvasId: "chartBox" + type,
@@ -196,7 +199,11 @@
 						scrollBackgroundColor: '#DEE7F7',
 						scrollColor: '#52A63A',
 					},
-					yAxis: {},
+					yAxis: {
+						format: (val) => {
+							return '¥' + parseFloat(val.toFixed(2))
+						}
+					},
 					categories: column,
 					legend: {
 						show: false

+ 1 - 0
pages/index/index copy.vue

@@ -81,6 +81,7 @@
 							headImage: res.extra.auth2.merchantImg,
 							userName: res.data.name,
 							userId: res.data.userId,
+							tenantName: res.data.tenantName,
 							isMaster: res.extra.auth.isMaster,
 							registerFlag: res.extra.auth.registerFlag,
 							auditState: res.extra.auth.auditState,

+ 1 - 0
pages/index/index.vue

@@ -400,6 +400,7 @@
 							headImage: res.extra.auth2.merchantImg,
 							userName: res.data.name,
 							userId: res.data.userId,
+							tenantName: res.data.tenantName,
 							isMaster: res.extra.auth.isMaster,
 							registerFlag: res.extra.auth.registerFlag,
 							auditState: res.extra.auth.auditState,

+ 1 - 2
pages/index/register.vue

@@ -228,10 +228,9 @@
 			},
 			//  提交
 			submitData() {
-				debugger
 				let required = true
 				for (let key in this.shopInfo) {
-					if (!this.shopInfo[key]) {
+					if (!this.shopInfo[key] && key !='businessLicenseCopyFilePath') {
 						required = false
 					}
 				}

+ 5 - 3
pages/user/index.vue

@@ -3,7 +3,7 @@
 		<view class="user-info-box">
 			<image class="user-image" :src="userData.headImage"></image>
 			<view class="user-info">
-				<view class="user-logoin-title">{{userData.userName}}</view>
+				<view class="user-logoin-title">{{userData.tenantName}}</view>
 				<view class="user-type">
 					<view class="iconfont iconshangjia-shanghu"></view>
 					<view>商家用户</view>
@@ -39,7 +39,8 @@
 		<view class="cell-group">
 			<view class="item-btn" @click="pickClick()">
 				<view class="iconfont iconcaizhai item-btn-icon"></view>
-				<view class="item-btn-text">自助采摘</view>
+				<view class="item-btn-text" v-if="num.selfOrder">自助采摘 ({{num.selfOrder}})</view>
+				<view class="item-btn-text" v-if="!num.selfOrder">自助采摘</view>
 				<view class="iconfont iconfangxiang"></view>
 			</view>
 			<view class="item-btn" @click="authorizeClick()" v-if="userData.isMaster">
@@ -95,7 +96,8 @@
 					unPay: 0,  // 待付款
 					unReceive: 0, // 待收货
 					unSend: 0, // 待发货
-					finished: 0 // 已评价
+					finished: 0, // 已评价
+					selfOrder: 0,// 自助采摘订单
 				}
 			}
 		},

+ 17 - 1
pagesMain/bindOrder.vue

@@ -1,7 +1,9 @@
 <template>
 	<view class="container">
 		<u-cell-group :border="false">
-			<u-field label="快递单号" placeholder="请输入快递单号" v-model="logisticsNum"></u-field>
+			<u-field label="快递单号" placeholder="请输入快递单号(仅限顺丰)" v-model="logisticsNum">
+				<u-icon name="scan" slot="right" color="#52A63A" size="35" @click="scan"></u-icon>
+			</u-field>
 		</u-cell-group>
 		<view class="form-handle">
 			<u-button type="success" shape="circle" :ripple="true" @click="submitData" class="handle-custom" :disabled="!logisticsNum">绑定</u-button>
@@ -24,6 +26,20 @@
 			this.orderId = options.orderId
 		},
 		methods: {
+			// 调起扫码
+			scan() {
+				let that = this;
+				// 调起条码扫描
+				uni.scanCode({
+				    scanType: 'barCode',
+				    success: function (res) {
+						console.log(res)
+					    that.logisticsNum = res.result;
+					    console.log('条码类型:' + res.scanType);
+					    console.log('条码内容:' + res.result);
+				    }
+				});
+			},
 			//  提交数据
 			submitData() {
 				NET.request(API.bindOrder, {

+ 12 - 2
pagesMain/orderDetail.vue

@@ -99,7 +99,7 @@
 						</view>
 						<view class="assess-text">{{orderData.evaluateResVO.evaluateContent ? orderData.evaluateResVO.evaluateContent : '暂无评价'}}</view>
 						<view class="assess-img-box">
-							<image class="img-col" mode="aspectFill" :src="item.imgUrl" v-for="(item,i) in orderData.evaluateResVO.evaluateImgs" :key="i"></image>
+							<image class="img-col" mode="aspectFill" :src="item.imgUrl" v-for="(item,i) in orderData.evaluateResVO.evaluateImgs" :key="i" @tap="_previewImage(item.imgUrl,i)"></image>
 						</view>
 					</view>
 					<view class="shop-reply-box" v-if="orderData.evaluateResVO.replyContent">
@@ -339,7 +339,17 @@
 				uni.navigateTo({
 					url: '/pagesMain/messageList?orderId=' + this.orderData.orderId + '&tenantCode=' + this.orderData.tenantCode
 				});
-			}
+			},
+			// 图片预览
+			_previewImage(image,index) {
+				var imgArr = [];
+				imgArr.push(image);
+				//预览图片
+				uni.previewImage({
+					urls: imgArr,
+					current: imgArr[index]
+				});
+			} 
 		}
 	}
 </script>

+ 2 - 2
pagesMedia/liveDetail.vue

@@ -186,12 +186,12 @@
 				}, 'POST').then(res => {
 					this.popupShow = false
 					this.$refs.uTips.show({
-						title: '绑定商品成功',
+						title: '设置成功',
 						type: 'success',
 					})
 				}).catch(res => {
 					this.$refs.uTips.show({
-						title: '绑定商品失败',
+						title: '设置失败',
 						type: 'warning',
 					})
 				})

+ 20 - 18
pagesMedia/liveOption.vue

@@ -11,10 +11,10 @@
 			<u-cell-item title="直播起始时间" :value="videoInfo.liveStartTime" @click="dateShow1 = true"></u-cell-item>
 			<u-cell-item title="直播结束时间" :value="videoInfo.liveEndTime" @click="dateShow2 = true"></u-cell-item>
 			<u-cell-item title="日期选择(可多选)" :arrow="false">
-				<view slot="label">
-					<u-checkbox-group>
-						<u-checkbox v-model="item.checked" v-for="(item, index) in checkList" :key="index" :name="item.value" shape="circle"
-						 active-color="#51A539">{{item.name}}</u-checkbox>
+				<view slot="label" @click.stop="">
+					<u-checkbox-group @click.stop="">
+						<u-checkbox size="40" v-model="item.checked" v-for="(item, index) in checkList" :key="index" :name="item.value" shape="circle"
+						 active-color="#51A539" @click.stop="">{{item.name}}</u-checkbox>
 					</u-checkbox-group>
 				</view>
 			</u-cell-item>
@@ -43,52 +43,52 @@
 				checkList: [{
 						name: '星期一',
 						value: '1',
-						checked: false,
+						checked: true,
 						disabled: false
 					},
 					{
 						name: '星期二',
 						value: '2',
-						checked: false,
+						checked: true,
 						disabled: false
 					},
 					{
 						name: '星期三',
 						value: '3',
-						checked: false,
+						checked: true,
 						disabled: false
 					},
 					{
 						name: '星期四',
 						value: '4',
-						checked: false,
+						checked: true,
 						disabled: false
 					},
 					{
 						name: '星期五',
 						value: '5',
-						checked: false,
+						checked: true,
 						disabled: false
 					},
 					{
 						name: '星期六',
 						value: '6',
-						checked: false,
+						checked: true,
 						disabled: false
 					},
 					{
 						name: '星期天',
 						value: '7',
-						checked: false,
+						checked: true,
 						disabled: false
 					}
 				],
 				dateShow1: false,
 				dateShow2: false,
 				params: {
-					year: true,
-					month: true,
-					day: true,
+					// year: true,
+					// month: true,
+					// day: true,
 					hour: true,
 					minute: true,
 					second: true
@@ -164,13 +164,15 @@
 			},
 			//  设置时间
 			setDate1(data) {
-				this.videoInfo.liveStartTime = data.year + '-' + data.month + '-' + data.day + ' ' + data.hour + ':' + data.minute +
-					':' + data.second
+				// this.videoInfo.liveStartTime = data.year + '-' + data.month + '-' + data.day + ' ' + data.hour + ':' + data.minute +
+				// 	':' + data.second
+				this.videoInfo.liveStartTime = data.hour + ':' + data.minute + ':' + data.second
 			},
 			//  设置时间
 			setDate2(data) {
-				this.videoInfo.liveEndTime = data.year + '-' + data.month + '-' + data.day + ' ' + data.hour + ':' + data.minute +
-					':' + data.second
+				// this.videoInfo.liveEndTime = data.year + '-' + data.month + '-' + data.day + ' ' + data.hour + ':' + data.minute +
+				// 	':' + data.second
+				this.videoInfo.liveEndTime = data.hour + ':' + data.minute + ':' + data.second
 			},
 			//  检查必填项
 			getPermit() {