Bläddra i källkod

Merge branch 'dev2.0-benefitCard' of http://222.85.201.140:10002//xuyunhui/chain_jje_uniapp into dev2.0

 Conflicts:
	common/js/env.js
zhanghui 1 år sedan
förälder
incheckning
7632a931db

+ 2 - 1
manifest.json

@@ -71,6 +71,7 @@
 			"subPackages": true
 		},
 		"requiredPrivateInfos": ["getLocation"],
+		"lazyCodeLoading": "requiredComponents",
 		"permission": {
 			"scope.userLocation": {
 				"desc": "你的位置信息将用于和门店的距离长度"
@@ -90,4 +91,4 @@
 		"enable": false
 	},
 	"vueVersion": "2"
-}
+}

+ 103 - 101
orderPages/receiveCoupons/index.vue

@@ -1,120 +1,122 @@
 <template>
-	<view class="page" :style="{'height':countsList.length>0?'':'100vh'}">
-		<view class="flex-col" v-if="countsList.length === 0">
-			<view class="flex-row justify-center">
-				<image class="empty" src="/static/imageIcon/empty.png" mode="widthFix"></image>
-			</view>
-			<view class="emptyText flex-row justify-center">
-				<text>暂无内容</text>
-			</view>
-		</view>
-		<view v-else>
-		<view  class="flex-col" v-for="(item,index) in countsList" :key="index">
-			<view class="row-list flex-row justify-start">
-				<view class="h-text flex-col justify-center ">
-					<view class="money">
-						<text>{{item.discountsPrice}}</text>
-					</view>
-					<view class="desc">
-						<text>满{{item.reachPrice}}可用</text>
-					</view>
-				</view>
+  <view class="page" :style="{'height':countsList.length>0?'':'100vh'}">
+    <view class="flex-col" v-if="countsList.length === 0">
+      <view class="flex-row justify-center">
+        <image class="empty" src="/static/imageIcon/empty.png" mode="widthFix"></image>
+      </view>
+      <view class="emptyText flex-row justify-center">
+        <text>暂无内容</text>
+      </view>
+    </view>
+    <view v-else>
+      <view class="flex-col" v-for="(item,index) in countsList" :key="index">
+        <view class="row-list flex-row justify-start">
+          <view class="h-text flex-col justify-center ">
+            <view class="money">
+              <text>{{ item.discountsPrice }}</text>
+            </view>
+            <view class="desc">
+              <text>满{{ item.reachPrice }}可用</text>
+            </view>
+          </view>
 
-				<view class="h-center-content flex-col justify-around">
-					<view class="h-value">
-						<text>{{item.name}}</text>
-					</view>
-					<!--				<view class="title">-->
-					<!--					使用平台:<text v-if="item.strategyType == '0'">全平台</text>-->
-					<!--					<text v-else-if="item.strategyType == '1'">个人优惠卷</text>-->
-					<!--				</view>-->
-					<view class="title">
-						使用次数:{{item.degree}}
-					</view>
-					<view class="title">
-						领取后{{item.effectiveDays}}天内有效
-					</view>
-					<view class="title flex-row">
-						<text @click.stop="showRemark(item)">使用规则</text>
-						<u-icon v-if="item.id == showRemarkId" name="arrow-down-fill" color="" size="12"></u-icon>
-						<u-icon v-else name="play-right-fill" color="" size="12"></u-icon>
-					</view>
-				</view>
+          <view class="h-center-content flex-col justify-around">
+            <view class="h-value">
+              <text>{{ item.name }}</text>
+            </view>
+            <!--				<view class="title">-->
+            <!--					使用平台:<text v-if="item.strategyType == '0'">全平台</text>-->
+            <!--					<text v-else-if="item.strategyType == '1'">个人优惠卷</text>-->
+            <!--				</view>-->
+            <view class="title">
+              使用次数:{{ item.degree }}
+            </view>
+            <view class="title">
+              领取后{{ item.effectiveDays }}天内有效
+            </view>
+            <view class="title flex-row">
+              <text @click.stop="showRemark(item)">使用规则</text>
+              <u-icon v-if="item.id == showRemarkId" name="arrow-down-fill" color="" size="12"></u-icon>
+              <u-icon v-else name="play-right-fill" color="" size="12"></u-icon>
+            </view>
+          </view>
 
-				<view class="h-right-content flex-col justify-center ">
-					<view class="btn" @click="gotoReceiveCoupon(item)">
-						<text>立即领取</text>
-					</view>
-				</view>
-			</view>
-			<view v-if="showRemarkId == item.id" class="remark" style="text-indent:unset">
-        <view>
-          可用门店:<text>{{item.useStoreDesc}}</text>
+          <view class="h-right-content flex-col justify-center ">
+            <view class="btn" @click="gotoReceiveCoupon(item)">
+              <text>立即领取</text>
+            </view>
+          </view>
         </view>
-        <view v-if="item.remark !=null">
-          使用说明:<text>{{item.remark}}</text>
+        <view v-if="showRemarkId == item.id" class="remark" style="text-indent:unset">
+          <view>
+            可用门店:
+            <text>{{ item.useStoreDesc }}</text>
+          </view>
+          <view v-if="item.remark !=null">
+            使用说明:
+            <text>{{ item.remark }}</text>
+          </view>
+          <text v-else class="remarkText">该优惠券暂无使用说明</text>
         </view>
-        <text v-else class="remarkText">该优惠券暂无使用说明</text>
-			</view>
-		</view>
-		</view>
+      </view>
+    </view>
 
-	</view>
+  </view>
 </template>
 <script>
-	export default {
-		data() {
-			return {
-				countsList:[],
-				showRemarkId:'',
-			};
-		},
-		onLoad(option) {
-			this.getUserDiscountsList()
-		},
+export default {
+  data() {
+    return {
+      countsList: [],
+      showRemarkId: '',
+    };
+  },
+  onLoad(option) {
+    this.getUserDiscountsList()
+  },
 
-		methods: {
+  methods: {
 
 
-			showRemark(item){
-				if (this.showRemarkId == item.id ){
-					this.showRemarkId = ''
+    showRemark(item) {
+      if (this.showRemarkId == item.id) {
+        this.showRemarkId = ''
 
-				}else {
-					this.showRemarkId = item.id
+      } else {
+        this.showRemarkId = item.id
 
-				}
-			},
+      }
+    },
 
 
-			// 领取优惠劵
-			gotoReceiveCoupon(item) {
-				this.$api.claimCoupon({id:item.id}).then((res) => {
-					uni.showToast({
-						title: "领取成功"
-					})
-					// 查询可领取的优惠劵
-					this.getUserDiscountsList();
-				})
-			},
+    // 领取优惠劵
+    gotoReceiveCoupon(item) {
+      this.$api.claimCoupon({id: item.id}).then((res) => {
+        uni.showToast({
+          title: "领取成功"
+        })
+        // 查询可领取的优惠劵
+        this.getUserDiscountsList();
+      })
+    },
 
-			// 查询可领取的优惠劵
-			getUserDiscountsList() {
-				let that = this;
-				// 用户绑定门店
-				this.$api.getUserDiscountsList().then((res) => {
-					console.log(res.data.data)
-					this.countsList = res.data.data;
-				}).catch(() => {
-					uni.showToast({
-						title: "操作失败"
-					})
-				})
-			},
-		},
-	};
+    // 查询可领取的优惠劵
+    getUserDiscountsList() {
+      let that = this;
+      // 用户绑定门店
+      this.$api.getUserDiscountsList().then((res) => {
+        console.log(res.data.data)
+        this.countsList = res.data.data;
+      }).catch(() => {
+        uni.showToast({
+          title: "操作失败"
+        })
+      })
+    },
+  },
+};
 </script>
 <style lang="scss" scoped>
-	@import '/common/css/common.css';
-	@import './index.rpx.scss';
+@import '/common/css/common.css';
+@import './index.rpx.scss';
 </style>

+ 10 - 0
storePages/myRights/index.rpx.scss

@@ -201,3 +201,13 @@
   color: #8f939c;
   margin-top: 20rpx;
 }
+.remark{
+  width: 646rpx;
+  font-size: 25rpx;
+  line-height: 40rpx;
+  background: #FFFFFF;
+  border-radius: 20rpx;
+  padding: 20rpx;
+  text-indent: 2em;
+  color: #999999;
+}

+ 49 - 29
storePages/myRights/index.vue

@@ -11,35 +11,46 @@
 		</view>
 
 		<scroll-view v-else scroll-y :style="{'height':windowHeight}">
-			<view  class="row-list flex-row justify-start" v-for="(item,index) in equityList" :key="index">
-				<view class="h-text flex-col justify-center ">
-					<view class="money">
-						<text>{{item.faceValue}}</text>
-					</view>
-					<!--				<view class="desc">-->
-					<!--					<text>{{item.title}}</text>-->
-					<!--				</view>-->
-				</view>
-
-				<view class="h-center-content flex-col justify-around ">
-					<view class="h-value">
-						<text>{{item.title}}</text>
-					</view>
-					<view class="title">
-						适用项目:{{item.serviceProjectName || ''}}
-					</view>
-					<view class="title">
-						绑定对象:{{item.serviceObjectName}}
-					</view>
-					<view class="title">
-						结束期限:{{item.effectiveEndTime.substring(0,10)}}
-					</view>
-
-				</view>
-
-				<view class=" flex-col justify-center ">
-					<image class="h-right-content-img "  :src="item.facePhotoUrl || '/static/logo.png'" mode="aspectFill" @click="magnify(item.facePhotoUrl)"></image>
-				</view>
+			<view  class="row-list" v-for="(item,index) in equityList" :key="index">
+        <view class="flex-row justify-start" @click.stop="showRemark(item)">
+          <view class="h-text flex-col justify-center ">
+            <view class="money">
+              <text>{{item.faceValue}}</text>
+            </view>
+            <!--				<view class="desc">-->
+            <!--					<text>{{item.title}}</text>-->
+            <!--				</view>-->
+          </view>
+
+          <view class="h-center-content flex-col justify-around ">
+            <view class="h-value">
+              <text>{{item.title}}</text>
+            </view>
+            <view class="title">
+              适用项目:{{item.serviceProjectName || ''}}
+            </view>
+            <view class="title">
+              适用门店:{{ item.useStoreDesc || '' }}
+            </view>
+            <view class="title">
+              绑定对象:{{item.serviceObjectName}}
+            </view>
+            <view class="title">
+              结束期限:{{item.effectiveEndTime.substring(0,10)}}
+            </view>
+          </view>
+
+          <view class=" flex-col justify-center ">
+            <image class="h-right-content-img "  :src="item.facePhotoUrl || '/static/logo.png'" mode="aspectFill" @click="magnify(item.facePhotoUrl)"></image>
+          </view>
+        </view>
+        <view v-if="showRemarkId == item.id" class="remark" style="text-indent:unset">
+          <view v-if="item.description !=null">
+            使用说明:
+            <text>{{ item.description }}</text>
+          </view>
+          <text v-else class="remarkText">该优惠券暂无使用说明</text>
+        </view>
 
 			</view>
 		</scroll-view>
@@ -56,6 +67,7 @@
 	export default {
 		data() {
 			return {
+        showRemarkId:'',
 				magnifyUrl:'',
 				windowHeight:'',
 				userInfo:{},
@@ -71,7 +83,15 @@
 		},
 
 		methods: {
+      showRemark(item) {
+        if (this.showRemarkId == item.id) {
+          this.showRemarkId = ''
 
+        } else {
+          this.showRemarkId = item.id
+
+        }
+      },
 			magnify(url){
 				if (!url){
 					return

+ 10 - 0
storePages/rights/index.rpx.scss

@@ -204,3 +204,13 @@
   background: #FFFFFF;
   padding-left: 32rpx;
 }
+.remark{
+  width: 646rpx;
+  font-size: 25rpx;
+  line-height: 40rpx;
+  background: #FFFFFF;
+  border-radius: 20rpx;
+  padding: 20rpx;
+  text-indent: 2em;
+  color: #999999;
+}

+ 54 - 29
storePages/rights/index.vue

@@ -11,34 +11,50 @@
 			</view>
 
 			<scroll-view v-else scroll-y :style="{ 'height': windowHeight }">
-				<view class="row-list flex-row justify-start" v-for="(item, index) in equityList" :key="index">
-					<view class="h-text flex-col justify-center ">
-						<view class="money">
-							<text>{{ item.salePrice }}</text>
-						</view>
-						<!--				<view class="desc">-->
-						<!--					<text>{{item.title}}</text>-->
-						<!--				</view>-->
-					</view>
-
-					<view class="h-center-content flex-col justify-around">
-						<view class="h-value">
-							<text>{{ item.title }}</text>
-						</view>
-						<view class="title">
-							使用项目:{{ item.serviceProjectName || '' }}
-						</view>
-						<view class="title">
-							有效天数:{{ item.effectiveDays }}
-						</view>
-					</view>
-
-					<view class="h-right-content flex-col justify-center ">
-						<view class="btn" @click="payRights(item)">
-							<text>购买</text>
-						</view>
-					</view>
-
+				<view class="flex-col row-list" v-for="(item, index) in equityList" :key="index">
+          <view class="flex-row justify-start">
+            <view class="h-text flex-col justify-center ">
+              <view class="money">
+                <text>{{ item.salePrice }}</text>
+              </view>
+              <!--				<view class="desc">-->
+              <!--					<text>{{item.title}}</text>-->
+              <!--				</view>-->
+            </view>
+
+            <view class="h-center-content flex-col justify-around">
+              <view class="h-value">
+                <text>{{ item.title }}</text>
+              </view>
+              <view class="title">
+                适用项目:{{ item.serviceProjectName || '' }}
+              </view>
+              <view class="title">
+                适用门店:{{ item.useStoreDesc || '' }}
+              </view>
+              <view class="title">
+                有效天数:{{ item.effectiveDays }}
+              </view>
+              <view class="title flex-row"  @click.stop="showRemark(item)">
+                <text>使用规则</text>
+                <u-icon v-if="item.id == showRemarkId" name="arrow-down-fill" color="" size="12"></u-icon>
+                <u-icon v-else name="play-right-fill" color="" size="12"></u-icon>
+              </view>
+            </view>
+
+            <view class="h-right-content flex-col justify-center ">
+              <view class="btn" @click="payRights(item)">
+                <text>购买</text>
+              </view>
+            </view>
+          </view>
+          <view v-if="showRemarkId == item.id" class="remark" style="text-indent:unset">
+            <view v-if="item.description !=null">
+              使用说明:
+              <text>{{ item.description }}</text>
+            </view>
+            <text v-else class="remarkText">该优惠券暂无使用说明</text>
+          </view>
 				</view>
 			</scroll-view>
 
@@ -102,7 +118,8 @@ export default {
 			serviceObjectIndex: 0,
 			equityList: [],
 			serviceObject: {},
-			orderNo: ''
+			orderNo: '',
+      showRemarkId: '',
 		};
 	},
 	onLoad(option) {
@@ -117,7 +134,15 @@ export default {
 	},
 
 	methods: {
+    showRemark(item) {
+      if (this.showRemarkId == item.id) {
+        this.showRemarkId = ''
+
+      } else {
+        this.showRemarkId = item.id
 
+      }
+    },
 		goTermsOfService() {
 			uni.navigateTo({
 				url: '/myPages/TermsOfService/index?name=' + '娇骄儿权益服务协议' + '&type=' + 4