瀏覽代碼

Signed-off-by: liuboyan <632697560@qq.com>
bug

liuboyan 4 年之前
父節點
當前提交
89e6337444

+ 4 - 0
App.vue

@@ -31,4 +31,8 @@
 		-webkit-appearance: none;
 		background: transparent;
 	}
+	page {
+		width: 100%;
+		height: 100%;
+	}
 </style>

+ 4 - 2
config/api.js

@@ -1,5 +1,7 @@
-// const WX_API_BASE = 'https://www.qianjiadi.com/'
-const WX_API_BASE = 'https://hubw.jihengcc.cn/'
+const WX_API_BASE = 'https://www.qianjiadi.com/'
+// const WX_API_BASE = 'https://hubw.jihengcc.cn/'
+// const WX_API_BASE = 'http://hubw.jihengcc.cn:17080/'
+// const WX_API_BASE = 'http://172.18.1.227:8765/'
 
 module.exports = {
 	//  微信登录

+ 1 - 1
main.js

@@ -12,6 +12,6 @@ App.mpType = 'app'
 
 const app = new Vue({
 	store,
-    ...App
+	...App
 })
 app.$mount()

+ 1 - 1
pages/index/home.vue

@@ -70,7 +70,7 @@
 			}
 		},
 		onLoad() {
-			_self = this;
+			// _self = this;
 			if (!uni.getStorageSync('token')) {
 				uni.navigateTo({
 					url: '/pages/index/index'

+ 1 - 1
pages/index/index.vue

@@ -36,7 +36,7 @@
 			this.appLoginWx()
 			setTimeout(() => {
 				this.timer = true
-			}, 3000)
+			}, 10)
 		},
 		methods: {
 			getPhoneNumber(e) {

+ 4 - 0
pages/media/index.vue

@@ -131,6 +131,10 @@
 			},
 			//  查看短视频详情
 			goToVideo(item) {
+				uni.setStorage({
+					key: 'videoUrl',
+					data: item.mediaUrl
+				})
 				uni.navigateTo({
 					url: '/pagesMedia/videoDetail?videoId=' + item.videoId
 				});

+ 4 - 4
pagesGood/goodForm.vue

@@ -11,16 +11,16 @@
 				</view>
 			</u-cell-item>
 			<u-cell-item title="原价" :arrow="false">
-				<u-number-box :min="1" v-model="goodInfo.originalPrice" bg-color="#51A539" color="#ffffff" :disabled="ifEdit()"></u-number-box>
+				<u-number-box :positive-integer="false" :min="0" v-model="goodInfo.originalPrice" bg-color="#51A539" color="#ffffff" :disabled="ifEdit()"></u-number-box>
 			</u-cell-item>
 			<u-cell-item :title="formType == 1 ? '售价' : '采摘价格'" :arrow="false" v-if="formType != 2">
-				<u-number-box :min="1" v-model="goodInfo.bizPrice" bg-color="#51A539" color="#ffffff" :disabled="ifEdit()"></u-number-box>
+				<u-number-box :positive-integer="false" :min="0" v-model="goodInfo.bizPrice" bg-color="#51A539" color="#ffffff" :disabled="ifEdit()"></u-number-box>
 			</u-cell-item>
 			<u-cell-item title="起拍价" :arrow="false" v-if="formType == 2">
-				<u-number-box :min="1" v-model="goodInfo.auctionStartPrice" bg-color="#51A539" color="#ffffff" :disabled="ifEdit()"></u-number-box>
+				<u-number-box :positive-integer="false" :min="0" v-model="goodInfo.auctionStartPrice" bg-color="#51A539" color="#ffffff" :disabled="ifEdit()"></u-number-box>
 			</u-cell-item>
 			<u-cell-item title="每次最低加价金额" :arrow="false" v-if="formType == 2">
-				<u-number-box :min="1" v-model="goodInfo.auctionMinAddPrice" bg-color="#51A539" color="#ffffff" :disabled="ifEdit()"></u-number-box>
+				<u-number-box :positive-integer="false" :min="0" v-model="goodInfo.auctionMinAddPrice" bg-color="#51A539" color="#ffffff" :disabled="ifEdit()"></u-number-box>
 			</u-cell-item>
 			<u-field label="计量单位" placeholder="请输入计量单位" label-width="180" v-model="goodInfo.unit" :disabled="ifEdit()"></u-field>
 			<u-cell-item title="库存" :arrow="false">

+ 15 - 10
pagesGood/goodList.vue

@@ -17,14 +17,12 @@
 		<scroll-view class="data-list" scroll-y="true" @scrolltolower="handleLoadMore(3)" v-else-if="tabIndex==2">
 			<goodItem v-for="(item, index) in list3" :key="index" :goodData="item" :check.sync="item.check" :manageType="manageType"></goodItem>
 		</scroll-view>
-		<uni-goods-nav :fill="true" :options="[]" @buttonClick="goodHandle1" :buttonGroup="buttonGroup1" class="good-handle"
-		 v-if="!manageType" />
-		<uni-goods-nav :fill="true" :options="[]" @buttonClick="goodHandle2" :buttonGroup="buttonGroup2" class="good-handle"
-		 v-else-if="tabIndex == 0" />
-		<uni-goods-nav :fill="true" :options="[]" @buttonClick="goodHandle2" :buttonGroup="buttonGroup3" class="good-handle"
-		 v-else-if="tabIndex == 1" />
-		<uni-goods-nav :fill="true" :options="[]" @buttonClick="goodHandle2" :buttonGroup="buttonGroup4" class="good-handle"
-		 v-else-if="tabIndex == 2" />
+		<view class="good-handle">
+			<uni-goods-nav :fill="true" :options="[]" @buttonClick="goodHandle1" :buttonGroup="buttonGroup1" v-if="!manageType" />
+			<uni-goods-nav :fill="true" :options="[]" @buttonClick="goodHandle2" :buttonGroup="buttonGroup2" v-else-if="tabIndex == 0" />
+			<uni-goods-nav :fill="true" :options="[]" @buttonClick="goodHandle2" :buttonGroup="buttonGroup3" v-else-if="tabIndex == 1" />
+			<uni-goods-nav :fill="true" :options="[]" @buttonClick="goodHandle2" :buttonGroup="buttonGroup4" v-else-if="tabIndex == 2" />
+		</view>
 		<u-popup v-model="popupShow" mode="bottom">
 			<view class="good-handle-box">
 				<u-button class="handle-button" :hair-line="false" @click="addGood(1)">普通售卖</u-button>
@@ -216,6 +214,7 @@
 		width: 100%;
 		height: 100%;
 		float: left;
+		position: relative;
 		background-color: #f7f7f7;
 
 		.search-box {
@@ -240,15 +239,17 @@
 
 		.good-handle {
 			width: 100%;
-			position: fixed;
+			position: absolute;
 			bottom: 0px;
+			height: 50px;
+			background: #ffffff;
 		}
 
 		.good-handle-box {
 			width: 100%;
 			float: left;
 			box-sizing: border-box;
-			padding: 0 20px 20px 20px;
+			padding: 20px;
 
 			.handle-button {
 				width: 100%;
@@ -281,6 +282,10 @@
 				left: 50%;
 				transform: translateX(-50%);
 			}
+
+			/deep/.u-btn--default {
+				border: none;
+			}
 		}
 	}
 </style>

+ 1 - 0
pagesMain/authorizeForm.vue

@@ -127,6 +127,7 @@
 		width: 100%;
 		height: 100%;
 		float: left;
+		position: absolute;
 
 		.authorize-head {
 			width: 100%;

+ 3 - 2
pagesMain/bindOrder.vue

@@ -3,7 +3,7 @@
 		<u-cell-group :border="false">
 			<u-field label="快递单号" placeholder="请输入快递单号" v-model="logisticsNum"></u-field>
 		</u-cell-group>
-		<view class="form-handle" v-if="haveAuthorizeCode">
+		<view class="form-handle">
 			<u-button type="success" shape="circle" :ripple="true" @click="submitData" class="handle-custom" :disabled="!logisticsNum">绑定</u-button>
 		</view>
 		<u-top-tips ref="uTips"></u-top-tips>
@@ -36,7 +36,7 @@
 					})
 					setTimeout(() => {
 						uni.reLaunch({
-							url: '/pagesMain/orderList?type=4'
+							url: '/pagesMain/orderList?type=3'
 						});
 					}, 1000)
 				}).catch(error => {
@@ -60,6 +60,7 @@
 		width: 100%;
 		height: 100%;
 		float: left;
+		position: absolute;
 		box-sizing: border-box;
 		padding-bottom: 70px;
 		overflow-y: auto;

+ 1 - 0
pagesMain/couponForm.vue

@@ -73,6 +73,7 @@
 		box-sizing: border-box;
 		padding-bottom: 70px;
 		overflow-y: auto;
+		position: absolute;
 
 		.form-info {
 			width: 100%;

+ 1 - 1
pagesMain/couponList.vue

@@ -11,7 +11,7 @@
 			<view class="coupon-info">
 				<view class="coupon-text1">{{item.couponName}}</view>
 				<view class="coupon-text1" style="margin-bottom: 4px;">满{{item.fullAmount}}减{{item.discountAmount}}</view>
-				<view class="coupon-text2">{{'仅限用于' + item.supplierName + '的店铺'}}</view>
+				<view class="coupon-text2">{{'仅限用于' + item.name + '的店铺'}}</view>
 				<view class="coupon-text2" style="color: #999999;">有效期:{{item.publishStartTime}}~{{item.useEndTime}}</view>
 			</view>
 		</view>

+ 6 - 3
pagesMain/evaluateForm.vue

@@ -6,7 +6,7 @@
 				<view class="assess-name">{{evaluateData.nickname}}</view>
 				<view class="assess-date">{{evaluateData.evaluateTime}}</view>
 				<view class="assess-sore-box">
-					<u-rate v-model="evaluateData.score" active-color="#FFAE21"></u-rate>
+					<u-rate v-model="evaluateData.score" active-color="#FFAE21" disabled></u-rate>
 				</view>
 				<view class="assess-text">{{evaluateData.evaluateContent}}</view>
 				<view class="assess-img-box">
@@ -39,10 +39,12 @@
 				},
 				replyContent: '',
 				orderId: '',
+				mid: '',
 			}
 		},
 		onLoad(options) {
 			this.orderId = options.orderId
+			this.mid = options.mid
 			NET.request(API.getOrderDetail, {
 				flag: 2,
 				orderId: options.orderId,
@@ -63,10 +65,10 @@
 			//  提交数据
 			submitData() {
 				NET.request(API.evaluateOrder, {
-					mid: uni.getStorageSync("userData").userId,
+					mid: this.mid,
 					orderId: this.orderId,
 					replyContent: this.replyContent,
-				}, 'POST').then(res => {
+				}, 'GET').then(res => {
 					this.$refs.uTips.show({
 						title: '回复评价成功',
 						type: 'success',
@@ -97,6 +99,7 @@
 		width: 100%;
 		height: 100%;
 		float: left;
+		position: absolute;
 		box-sizing: border-box;
 		background-color: #FFFFFF;
 		padding-bottom: 70px;

+ 1 - 1
pagesMain/logisticsDeatil.vue

@@ -24,7 +24,7 @@
 			}
 		},
 		onLoad(options) {
-			NET.request(API.getLogisticsDeatil + 'shunfeng/' + options.logisticCode, {}, 'POST').then(res => {
+			NET.request(API.getLogisticsDeatil + 'shunfeng/' + options.logisticCode, {}, 'GET').then(res => {
 				this.expressData = {
 					company: '顺丰',
 					logisticCode: res.data.logisticCode,

+ 5 - 5
pagesMain/orderDetail.vue

@@ -221,7 +221,7 @@
 				} else {
 					//  回复
 					uni.navigateTo({
-						url: '/pagesMain/evaluateForm?orderId=' + this.orderData.orderId
+						url: '/pagesMain/evaluateForm?orderId=' + this.orderData.orderId +'&mid='+this.orderData.mid
 					});
 				}
 			},
@@ -246,8 +246,8 @@
 		float: left;
 		background-color: #f7f7f7;
 		box-sizing: border-box;
-		padding-bottom: 50px;
 		overflow-y: auto;
+		position: absolute;
 
 		.order-type-info {
 			width: 100%;
@@ -629,7 +629,6 @@
 
 				.order-info-row {
 					width: 100%;
-					height: 26px;
 					float: left;
 					box-sizing: border-box;
 					padding: 0 15px;
@@ -637,14 +636,15 @@
 					font-family: PingFang SC;
 					color: #333333;
 					line-height: 26px;
+					word-break:break-all; 
 				}
 			}
 		}
 
 		.order-handle {
 			width: 100%;
-			position: fixed;
-			bottom: 0px;
+			height: 50px;
+			float: left;
 			border-top: 1px solid #cccccc;
 		}
 	}

+ 4 - 4
pagesMain/orderItem.vue

@@ -22,13 +22,13 @@
 			</view>
 		</view>
 		<view class="pay-info">总价¥{{getAllPrice()}},实付¥{{orderData.paySum}}</view>
-		<view class="handle-box" v-if="tabIndex > 1">
+		<view class="handle-box" v-if="(tabIndex > 1 && tabIndex < 5) || (tabIndex == 5 && orderData.evaluateStatus == 2 && orderData.evaluateReplyStatus == 1)">
 			<u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
 			 v-if="tabIndex == 2" @click.stop="handleOrder(1)">发货</u-button>
 			<u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
 			 v-if="tabIndex == 3 || tabIndex == 4" @click.stop="handleOrder(2)">追踪物流</u-button>
 			<u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
-			 v-if="tabIndex == 5 && orderData.evaluateReplyStatus == 2" @click.stop="handleOrder(3)">回复</u-button>
+			 v-if="tabIndex == 5 && orderData.evaluateStatus == 2 && orderData.evaluateReplyStatus == 1" @click.stop="handleOrder(3)">回复</u-button>
 		</view>
 		<u-top-tips ref="uTips"></u-top-tips>
 	</view>
@@ -116,7 +116,7 @@
 				} else if (type == 3) {
 					//  回复
 					uni.navigateTo({
-						url: '/pagesMain/evaluateForm?orderId=' + this.orderData.orderId
+						url: '/pagesMain/evaluateForm?orderId=' + this.orderData.orderId + '&mid='+this.orderData.mid
 					});
 				}
 			},
@@ -277,7 +277,7 @@
 				color: #333333 !important;
 				border-color: #BFBFBF !important;
 				background-color: #FFFFFF !important;
-				padding: 0 16px;
+				padding: 0;
 				margin-left: 8px;
 				height: 30px;
 				line-height: 30px;

+ 1 - 1
pagesMedia/liveOption.vue

@@ -5,7 +5,7 @@
 			<u-cell-item title="请上传直播海报" :arrow="false">
 				<view slot="label">
 					<u-upload :action="uploadUrl" :file-list="defaultList" :form-data="uploadData" @on-success="uploadSuccess"
-					 @on-error="uploadError" @on-remove="uploadRemove" max-count="5"></u-upload>
+					 @on-error="uploadError" @on-remove="uploadRemove" max-count="1"></u-upload>
 				</view>
 			</u-cell-item>
 			<u-cell-item title="直播起始时间" :value="videoInfo.liveStartTime" @click="dateShow1 = true"></u-cell-item>

+ 24 - 1
pagesMedia/videoDetail.vue

@@ -1,5 +1,8 @@
 <template>
 	<view class="container">
+		<view class="video-box" @click="popupShow = true">
+			<video id="myVideo" class="my-video" :src="videoUrl" @error="videoErrorCallback" controls></video>
+		</view>
 		<view class="popup-open" @click="popupShow = true">
 			<view class="iconfont iconzhibo-shangpin"></view>
 		</view>
@@ -33,13 +36,17 @@
 		data() {
 			return {
 				videoId: '',
+				videoUrl: '',
 				popupShow: false,
 				goodList: [],
 			}
 		},
 		onLoad(options) {
 			this.videoId = options.videoId
-			NET.request(API.getVideoBindGoods, {}, 'GET').then(res => {
+			this.videoUrl = uni.getStorageSync("videoUrl")
+			NET.request(API.getVideoBindGoods, {
+				videoId: this.videoId
+			}, 'GET').then(res => {
 				this.goodList = res.data
 			}).catch(res => {
 				this.$refs.uTips.show({
@@ -55,6 +62,8 @@
 					url: '/pagesMedia/videoForm?type=edit&videoId=' + this.videoId
 				});
 			},
+			//  短视频报错
+			videoErrorCallback(e) {},
 		},
 	}
 </script>
@@ -71,6 +80,19 @@
 		float: left;
 		position: relative;
 
+		.video-box {
+			width: 100%;
+			height: 100%;
+			float: left;
+			position: absolute;
+
+			.my-video {
+				width: 100%;
+				height: 100%;
+				position: absolute;
+			}
+		}
+
 		.popup-open {
 			width: 50px;
 			height: 50px;
@@ -110,6 +132,7 @@
 				line-height: 16px;
 				margin-bottom: 10px;
 			}
+
 			.popup-edit {
 				width: 50%;
 				height: 26px;

+ 26 - 9
pagesMedia/videoForm.vue

@@ -3,16 +3,18 @@
 		<u-cell-group class="form-info" :border="false">
 			<u-field label="视频名称" placeholder="请输入视频名称" label-width="180" v-model="videoInfo.videoName"></u-field>
 			<u-cell-item title="请上传视频" :arrow="false" v-if="type == 'add'">
-				<cover-image slot="label" class="" :src="videoImg" v-if="videoImg"></cover-image>
-				<view slot="label" class="upload-video" @tap="chooseVideoImage" v-else>
-					<u-icon name="plus" size="40"></u-icon>
-					<view class="u-add-tips" style="margin-top: 6px;">选择视频</view>
+				<view slot="label">
+					<cover-image class="video-img" :src="videoImg" v-show="videoImg"></cover-image>
+					<view class="upload-video" @tap="chooseVideoImage" v-if="!videoImg">
+						<u-icon name="plus" size="40"></u-icon>
+						<view class="u-add-tips" style="margin-top: 6px;">选择视频</view>
+					</view>
 				</view>
 			</u-cell-item>
 			<u-cell-item title="请上传视频海报" :arrow="false" v-if="type == 'add'">
 				<view slot="label">
 					<u-upload :action="uploadUrl" :file-list="defaultList" :form-data="uploadData" @on-success="uploadSuccess"
-					 @on-error="uploadError" @on-remove="uploadRemove" max-count="5"></u-upload>
+					 @on-error="uploadError" @on-remove="uploadRemove" max-count="1"></u-upload>
 				</view>
 			</u-cell-item>
 			<u-cell-item title="绑定商品(可多选)" @click="popupShow = true" class="good-arrow">
@@ -36,9 +38,9 @@
 		</view>
 		<u-popup v-model="popupShow" mode="bottom" closeable border-radius="30">
 			<scroll-view scroll-y="true" class="good-select-box">
-				<view class="select-good-row" v-for="(item, index) in goodList" :key="index">
+				<view class="select-good-row" v-for="(item, index) in goodList" :key="index" @click.native.stop="setCheck(item)">
 					<view class="good-check">
-						<view class="iconfont" :class="item.check ? 'iconqueding' : 'iconfeigouxuan'" @click="item.check = !item.check"></view>
+						<view class="iconfont" :class="item.check ? 'iconqueding' : 'iconfeigouxuan'"></view>
 					</view>
 					<view class="good-card" style="width: calc(100% - 60px);">
 						<cover-image class="goods-img" :src="item.imgPath"></cover-image>
@@ -85,13 +87,13 @@
 		onLoad(options) {
 			this.uploadUrl = API.uploadFile
 			this.type = options.type
-			this.videoInfo.videoId = options.videoId
 			if (this.type == 'edit') {
+				this.videoInfo.videoId = options.videoId
 				this.getDetail()
 			}
 			NET.request(API.getVideoGoods, {}, 'GET').then(res => {
 				res.data.forEach(site => {
-					site.check = this.productIds && this.productIds.indexOf(site.productId) != -1
+					site.check = this.productIds && this.productIds.indexOf(site.productId) != -1 ? true : false
 				})
 				this.goodList = res.data
 			}).catch(res => {
@@ -103,6 +105,10 @@
 		},
 		onReady() {},
 		methods: {
+			//  切换选择状态
+			setCheck(item) {
+				item.check = !item.check
+			},
 			//  上传视频
 			chooseVideoImage() {
 				uni.chooseVideo({
@@ -257,6 +263,13 @@
 				color: #333333;
 			}
 
+			.video-img {
+				width: 100px;
+				height: 100px;
+				border-radius: 5px;
+				object-fit: cover;
+			}
+
 			.upload-video {
 				width: 100px;
 				height: 100px;
@@ -275,6 +288,10 @@
 					top: 18px;
 					right: 10px;
 				}
+
+				/deep/.u-cell_title {
+					width: calc(100% - 10px) !important;
+				}
 			}
 		}