Przeglądaj źródła

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

lishanshan 7 miesięcy temu
rodzic
commit
09c0695401

+ 1 - 0
components/dengrq-datetime-picker/dateSelector/index.css

@@ -4,6 +4,7 @@
   color: #333;
 }
 .popup-box {
+  min-height: 290px;
   background: #FFFFFF;
   padding: 0 27upx;
   border-radius: 24upx 24upx 0px 0px;

+ 2 - 2
manifest.json

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

+ 12 - 4
pages/adManagement/createFullscreenAd.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="page">
 		<u-sticky :h5-nav-height="0" z-index="9099" :offset-top='0'>
-			<uni-NavBar headerTitle="全屏广告创建" background="#fff" :isSlot="false"></uni-NavBar>
+			<uni-NavBar :headerTitle="`${headerTitle}创建`" background="#fff" :isSlot="false"></uni-NavBar>
 		</u-sticky>
 		<u-form :model="adForm" :rules="adrules" ref="uForm" :label-width="200"
 			style="padding: 20rpx 24rpx 135rpx;box-sizing: border-box;">
@@ -209,7 +209,7 @@
 		</view>
 		<!-- 省市区 -->
 		<u-select v-model="queryTreeShow" mode="mutil-column-auto" label-name="areaCname" value-name="areaCode"
-			child-name="child" :list="queryTreeList" @confirm="queryTreeConfirm"></u-select>
+			child-name="children" :list="queryTreeList" @confirm="queryTreeConfirm"></u-select>
 		<!-- 广告位 -->
 		<u-select v-model="adSlotShow" mode="single-column" label-name="positionName" value-name="id" :list="adSlotList"
 			@confirm="adSlotConfirm"></u-select>
@@ -380,13 +380,21 @@
 				imgFileList: [], //图片数组
 				action: configService.apiUrl + '/sys/common/upload', //图片上传地址
 				token: "",
-				userInfo: {}
+				userInfo: {},
+				headerTitle: "", //页面标题
 			}
 		},
 		onShow() {},
 		async onLoad(options) {
-			if (options.type) {
+			if (options.adType) {
 				this.adForm.type = options.adType;
+				const map = {
+					'0': '全屏广告',
+					'1': '弹窗广告',
+					'2': '轮播广告',
+					'3': '页面嵌入广告',
+				}
+				this.headerTitle = map[this.adForm.type] || ''
 			}
 			if (options.id) {
 				this.$http.get('advert/localAdvertTask/queryById?id=' + options.id).then(res => {

+ 1 - 1
pages/groupMeal/orders/order-blist.vue

@@ -60,7 +60,7 @@
 								<text :class="['status', `status-${item.orderStatus}`]" v-if="currentStatusTab == 2">{{ getrefundText(item.refundType )}}</text>
 							</view>
 							<view class="order-item">
-								<u-image width="120rpx" height="120rpx" border-radius="12rpx" :src="item.productImage && `${$config.apiUrl}/${item.productImage.split(',')[0]}`" mode="aspectFill"></u-image>
+								<u-image width="120rpx" height="120rpx" border-radius="12rpx" :src="item.productImage || `${$config.apiUrl}/${item.productImage.split(',')[0]}`" mode="aspectFill"></u-image>
 								<!-- <image class="goods-image" :src="item.image" mode="aspectFill"></image> -->
 								<view class="item-details">
 									<view class="item-title">{{ item.packageName }}</view>

+ 1 - 1
pages/groupMeal/orders/order-details.vue

@@ -36,7 +36,7 @@
 				<view class="title">商品信息</view>
 				<view class="center">
 					<view class="img">
-						<image :src="product.productImage && `${$config.apiUrl}/${product.productImage.split(',')[0]}`" mode=""></image>
+						<image :src="product.productImage || `${$config.apiUrl}/${product.productImage.split(',')[0]}`" mode=""></image>
 					</view>
 					<view class="box">
 						<view class="name">{{ product.packageName }}</view>

+ 1 - 1
pages/groupMeal/orders/refund.vue

@@ -3,7 +3,7 @@
 		<u-navbar title="协商记录" :autoBack="true" :placeholder="true" :border-bottom="true"></u-navbar>
 		<view class="product">
 			<view class="left">
-				<image :src="data.productImage && `${$config.apiUrl}/${data.productImage.split(',')[0]}`" mode=""></image>
+				<image :src="data.productImage || `${$config.apiUrl}/${data.productImage.split(',')[0]}`" mode=""></image>
 			</view>
 			<view class="right">
 				<view>

+ 4 - 6
pages/product/creatProduct update.vue

@@ -308,12 +308,10 @@
 						可用时间<span>*</span>
 					</view>
 					<view class="picker set">
-						<view class="picker set inp" @click="setUsable" v-if="showSellDate == ''">
-							<u-input placeholder="去设置" />
-							<u-icon name="arrow-right" style="margin-left: 17rpx;"></u-icon>
-						</view>
-						<view class="picker set inp" @click="setUsable" v-else>
-							<span style="color: #333333;">{{ showSellDate }}</span>
+						<view class="picker set inp" @click="setUsable">
+							<text :style="{
+								color: showSellDate ? '#333333' : '#c0c4cc'
+							}">{{ showSellDate || '去设置' }}</text>
 							<u-icon name="arrow-right" style="margin-left: 17rpx;"></u-icon>
 						</view>
 					</view>

+ 58 - 8
pages/product/creatProduct.vue

@@ -206,12 +206,10 @@
 							可用时间<span>*</span>
 						</view>
 						<view class="picker set">
-							<view class="picker set inp" @click="setUsable" v-if="showSellDate == ''">
-								<u-input placeholder="去设置" />
-								<u-icon name="arrow-right" style="margin-left: 17rpx;"></u-icon>
-							</view>
-							<view class="picker set inp" @click="setUsable" v-else>
-								<span style="color: #333333;">{{ showSellDate }}</span>
+							<view class="picker set inp" @click="setUsable">
+								<text :style="{
+									color: showSellDate ? '#333333' : '#c0c4cc'
+								}">{{ showSellDate || '去设置' }}</text>
 								<u-icon name="arrow-right" style="margin-left: 17rpx;"></u-icon>
 							</view>
 						</view>
@@ -376,6 +374,58 @@
 				groupOptions: [],
 			}
 		},
+		mounted() {
+			this.getProductGroup()
+			this.getLeftTree()
+			this.getForm()
+		},
+		onLoad(options) {
+			if (options.productId) {
+				this.productId = options.productId
+			}
+			if (options.tabIndex) {
+				this.tabIndex = options.tabIndex
+			}
+		},
+		onShow() {
+			let that = this
+			uni.getStorage({
+				key: 'login_user_info',
+				success: function(res) {
+					that.form.merchantId = res.data.merchantId
+				}
+			})
+			uni.getStorage({
+				key: 'smdate',
+				success: (res) => {
+					if (res.data.availableEndDate) {
+						this.showSellDate = res.data.availableStartDate + '-' + res.data.availableEndDate
+						this.form.availableStartDate = res.data.availableStartDate
+						this.form.availableEndDate = res.data.availableEndDate
+						this.form.expirationDays = null
+						this.form.useType = 2
+					} else if (res.data.expirationDays) {
+						this.form.expirationDays = res.data.expirationDays
+						this.form.availableEndDate = null
+						this.form.availableStartDate = null
+						this.form.useType = 1
+						this.$nextTick(() => {
+							this.showSellDate = res.data.expirationDays + '天后失效'
+						});
+					}else if(res.data.useType == 3){
+						this.form.useType = 3
+						this.showSellDate = '长期有效'
+					}
+
+				}
+			})
+			uni.getStorage({
+				key: 'group',
+				success: function(res) {
+					that.form.productGroups = res.data
+				}
+			})
+		},
 		methods: {
 			//全选
 			allSelect() {
@@ -529,10 +579,10 @@
 			},
 			//跳转至可用时间
 			setUsable() {
+				let str = this.$u.queryParams({ useType: this.form.useType })
 				uni.navigateTo({
-					url: '/pages/product/usable'
+					url: `/pages/product/usable${str}`
 				})
-
 			},
 			// 更新时间
 			updateRangeTime() {

+ 29 - 15
pages/product/usable.vue

@@ -21,19 +21,23 @@
 					</view>
 				</u-radio>
 				<u-radio @change="radioChange" name="now"
-					style="width: 100%;height:65rpx; flex;align-items: center;margin-top: 16rpx;">
+					style="width: 100%; height:65rpx; display: flex; align-items: center; margin-top: 16rpx;">
 					<view class="title now">
-						购买后立即生效,生效后
-						<input type="number" style="background-color:#F7F8FC;margin-top: 16rpx;" v-model="expirationDays" /> 天失效
+						<text>购买后立即生效,生效后</text>
+						<input class="input" type="number" v-model="expirationDays" /> 
+						<text>天失效</text>
 					</view>
 				</u-radio>
 				<u-radio @change="radioChange" name="date"
-					style="width: 100%;margin-top: 16rpx;;border-bottom: 1px solid #eeeeee;">
+					style="width: 100%;margin-top: 16rpx;border-bottom: 1px solid #eeeeee;">
 					<view class="title now">
 						固定时间段
-						<view class="picker">
-							<u-input placeholder="去设置" v-model="showDate"/>
-							<u-icon name="arrow-right" style="margin-left: 17rpx;" @click="selectDate" ></u-icon>
+						<view class="picker" @click="selectDate">
+							<u-input class="form-input" placeholder="去设置" inputAlign="right" 
+								disabled
+								v-model="showDate"
+							/>
+							<u-icon name="arrow-right" style="margin-left: 17rpx;"></u-icon>
 						</view>
 					</view>
 				</u-radio>
@@ -65,6 +69,12 @@ export default {
 			showDate: ''
 		}
 	},
+	onLoad(query) {
+		if (query.useType) {
+			let a = ['now', 'date', 'long']
+			this.value = a[query.useType - 1]
+		}
+	},
 	methods: {
 		//返回
 		back() {
@@ -86,7 +96,7 @@ export default {
 		onEndTimeChange(val) {
 			this.availableStartDate = val.startDate
 			this.availableEndDate = val.endDate
-			this.showDate = val.startDate + '-' + val.endDate
+			this.showDate = val.startDate + ' ~ ' + val.endDate
 			this.$forceUpdate(); // 强制刷新视图
 		},
 		selectDate() {
@@ -150,7 +160,6 @@ export default {
 		height: var(--status-bar-height);
 		background-color: #fff;
 	}
-
 	/*#endif*/
 
 	.head {
@@ -180,6 +189,12 @@ export default {
 		flex: 1;
 		padding: 24rpx;
 
+		.form-input {
+			pointer-events: none;
+		}
+		::v-deep .uni-input-input:disabled {
+			pointer-events: none;
+		}
 	}
 
 	.title {
@@ -204,14 +219,13 @@ export default {
 			justify-content: flex-end;
 			font-size: 28rpx;
 			color: #999999;
-
-			::v-deep.u-input {
-				text-align: right !important;
-			}
 		}
 
-		input {
-			width: 100rpx;
+		.input {
+			flex: 1;
+			margin: 0 12rpx;
+			text-align: center;
+			background-color: #F7F8FC;
 		}
 	}
 

+ 2 - 2
pages/store/addHours.vue

@@ -19,14 +19,14 @@
             </view>
             <view style="border-bottom: 1upx solid #eee;margin:0" v-for="(tim, timInd) in timeArr" :key="timInd" v-else>
                 <view class="cu-form-group" style="margin:0" v-if="timInd == 0 && timeArr.length < 3">
-                    <input placeholder="添加营业时段(1/3)" v-model="tim.value" name="input" @click="open(timInd)"></input>
+                    <input placeholder="添加营业时段(1/3)" v-model="tim.value" name="input" @click="open(timInd)" disabled="true"></input>
                     <view @click="add()" class="add-style">添加</view>
                 </view>
                 <view v-else>
                     <uni-swipe-action>
                         <uni-swipe-action-item :right-options="options2" :show="timInd.show" :auto-close="false">
                             <view class="cu-form-group" style="margin:0">
-                                <input :placeholder='"添加营业时段(" + (timInd + 1) + "/3)"' v-model="tim.value" name="input"
+                                <input :placeholder='"添加营业时段(" + (timInd + 1) + "/3)"' v-model="tim.value" name="input" disabled="true"
                                     @click="open(timInd)"></input>
                                 <text class='cuIcon-right' style="color: #C7C6CA ;" @click="open(timInd)"></text>
                             </view>