Jelajahi Sumber

feat:权益卡续费

zhanghui 5 bulan lalu
induk
melakukan
423eb3f43c

+ 9 - 0
common/js/api.js

@@ -995,4 +995,13 @@ export default {
             data: param
         })
     },
+
+    // 查询过期权益卡
+    getExpireEquityCard() {
+        return request({
+            url: '/member/wechat/getExpireEquityCard',
+            method: 'get'
+        })
+    },
+
 }

+ 0 - 3
common/js/env.js

@@ -9,9 +9,6 @@ let trialBaseUrl = `https://jje.xinyuekj.com.cn/test-api`
 /** 开发环境*/
 // let developBaseUrl = `http://65i1sxopd9qp.ngrok.xiaomiqiu123.top`
 let developBaseUrl = `https://jje.xinyuekj.com.cn/test-api`
-// let developBaseUrl = `https://jje.admin.xinyuekj.com.cn/test-api`
-// let developBaseUrl = `http://u2mu3zixu5wm.ngrok.xiaomiqiu123.top`
-// let developBaseUrl = `http://47.108.114.127:10888`
 
 
 let baseUrl = ''

+ 7 - 1
myPages/myActivityDetail/myActivityDetail.vue

@@ -205,9 +205,15 @@ export default {
       }
     }); //禁止二次转发--end
     console.log(this.activity)
+    let activityId = this.activity.activityId
+    if (this.activity.shareActivityId){
+      activityId = this.activity.shareActivityId
+    }
+    console.log('activityId',this.activity.activityId)
+    console.log('shareActivityId', this.activity.shareActivityId)
     let shareobj = {
       title: this.activity.shareContext, //分享的标题
-      path: '/orderPages/activityDetail/activityDetail?activityId=' + this.activity.activityId + '&inviteUserId=' + this.userInfo.id + '&inviteOrderId=' + this.activity.orderId, //好友点击分享之后跳转的页面
+      path: '/orderPages/activityDetail/activityDetail?activityId=' + activityId + '&inviteUserId=' + this.userInfo.id + '&inviteOrderId=' + this.activity.orderId, //好友点击分享之后跳转的页面
       //imageUrl: "https://****.com/banner.jpg", //分享的图片  支持PNG及JPG。显示图片长宽比是 5:4。
       imageUrl: this.facePhotoUrl, //内容图片
     }

+ 76 - 0
orderPages/bookService/index.rpx.scss

@@ -223,3 +223,79 @@
   font-size: 30rpx;
   line-height: 200rpx;
 }
+
+.expirePopup{
+  background: #FFFFFF;
+  border-radius: 16rpx;
+  padding: 32rpx;
+  width: 600rpx;
+}
+
+.popupTitle{
+  font-size: 30rpx;
+  font-weight: bold;
+  color: #333333;
+}
+
+.listView{
+  border: 2rpx solid #FFE05C;
+  border-radius: 16rpx;
+  overflow: hidden;
+  margin-top: 10rpx;
+}
+
+.h-text{
+  width: 200rpx;
+  background: #FFE05C;
+}
+.money{
+  font-size: 36rpx;
+  font-weight: bold;
+  color: #333333;
+  line-height: 52rpx;
+  text-align: center;
+}
+.h-center-content{
+  width: 298rpx;
+}
+
+.h-value{
+  font-size: 28rpx;
+  font-weight: bold;
+  color: #333333;
+  line-height: 44rpx;
+  margin-top: 24rpx;
+  margin-left: 24rpx;
+
+}
+
+.h-right-content{
+  width: 140rpx;
+}
+
+.title1{
+  font-size: 20rpx;
+  font-weight: 400;
+  color: #999999;
+  margin-left: 24rpx;
+}
+.btn1{
+  width: 120rpx;
+  height: 60rpx;
+  background: #93D21A;
+  border-radius: 32rpx;
+
+  font-size: 24rpx;
+  font-weight: 400;
+  color: #FFFFFF;
+  line-height: 64rpx;
+  text-align: center;
+
+}
+
+.scroll-y{
+  height: 300rpx;
+}
+.scroll-y1{
+  height: 500rpx;
+}

+ 79 - 2
orderPages/bookService/index.vue

@@ -170,7 +170,51 @@
 							  @close="dialogClose"></uni-popup-dialog>
 		</uni-popup>
 
-	</view>
+    <uni-popup ref="showExpireEquityCard">
+
+      <view class="flex-col justify-start expirePopup" >
+        <view class="flex-row justify-center">
+          <text class="popupTitle">到期提醒</text>
+        </view>
+
+        <scroll-view scroll-y class="flex-col justify-start" :class="[ expireEquityCard.length > 1 ? 'scroll-y1':'scroll-y']" >
+          <view class="flex-row listView" v-for="(item,index) in expireEquityCard">
+            <view class="h-text flex-col justify-center ">
+              <view class="money">
+                <text>{{ item.faceValue }}</text>
+              </view>
+            </view>
+
+            <view class="h-center-content flex-col justify-around">
+              <view class="h-value">
+                <text>{{ item.title }}</text>
+              </view>
+              <view class="title1">
+                服务对象:{{ item.serviceObjectName || '' }}
+              </view>
+              <view class="title1">
+                适用门店:{{ item.useStoreDesc || '' }} {{ item.use_store_desc || '' }} {{ item.useStoreDesc || '' }} {{ item.useStoreDesc || '' }}
+              </view>
+              <view class="title1">
+                到期时间:{{ item.effectiveEndTime.slice(0,10) }}
+              </view>
+            </view>
+
+            <view class="h-right-content flex-col justify-center ">
+              <view class="btn1" @click="navigateTo(item)">
+                <text>续费</text>
+              </view>
+            </view>
+          </view>
+
+        </scroll-view>
+
+      </view>
+
+    </uni-popup>
+
+
+  </view>
 </template>
 
 <script>
@@ -230,6 +274,7 @@
         },
         takeNumberRules:[],
         storeInfo: {},
+        expireEquityCard:[], //过期的权益卡
 			}
 		},
 		onLoad() {
@@ -251,6 +296,8 @@
 					}
 				})
 			},1000*60*5)
+
+      this.getExpireEquityCard();
 		},
 		onShow() {
 
@@ -282,8 +329,38 @@
 		},
 		methods: {
 
+      navigateTo(item){
+        if(item.activityId){
+          let list = item.activityId.split(',')
+          if (list.length == 1){
+            uni.navigateTo({
+              url:'/orderPages/activityDetail/activityDetail?id=' + item.activityId
+            })
+          }else {
+            uni.navigateTo({
+              url:'/orderPages/activityList/activityList'
+            })
+          }
+        }else{
+          uni.navigateTo({
+            url:'/orderPages/activityList/activityList'
+          })
+        }
+
+      },
+
+      getExpireEquityCard(){
+        this.$api.getExpireEquityCard().then((res)=>{
+          this.expireEquityCard = res.data.data;
+          if (this.expireEquityCard.length > 0){
+            this.$refs.showExpireEquityCard.open()
+          }
+        })
+      },
+
+
 
-			dialogConfirm(){
+      dialogConfirm(){
 				this.configContent = '';
 			},
 

+ 76 - 0
orderPages/storeService/index.rpx.scss

@@ -164,3 +164,79 @@
   font-size: 30rpx;
   line-height: 200rpx;
 }
+
+.expirePopup{
+  background: #FFFFFF;
+  border-radius: 16rpx;
+  padding: 32rpx;
+  width: 600rpx;
+}
+
+.popupTitle{
+  font-size: 30rpx;
+  font-weight: bold;
+  color: #333333;
+}
+
+.listView{
+  border: 2rpx solid #FFE05C;
+  border-radius: 16rpx;
+  overflow: hidden;
+  margin-top: 10rpx;
+}
+
+.h-text{
+  width: 200rpx;
+  background: #FFE05C;
+}
+.money{
+  font-size: 36rpx;
+  font-weight: bold;
+  color: #333333;
+  line-height: 52rpx;
+  text-align: center;
+}
+.h-center-content{
+  width: 298rpx;
+}
+
+.h-value{
+  font-size: 28rpx;
+  font-weight: bold;
+  color: #333333;
+  line-height: 44rpx;
+  margin-top: 24rpx;
+  margin-left: 24rpx;
+
+}
+
+.h-right-content{
+  width: 140rpx;
+}
+
+.title{
+  font-size: 20rpx;
+  font-weight: 400;
+  color: #999999;
+  margin-left: 24rpx;
+}
+.btn{
+  width: 120rpx;
+  height: 60rpx;
+  background: #93D21A;
+  border-radius: 32rpx;
+
+  font-size: 24rpx;
+  font-weight: 400;
+  color: #FFFFFF;
+  line-height: 64rpx;
+  text-align: center;
+
+}
+
+.scroll-y{
+  height: 300rpx;
+}
+.scroll-y1{
+  height: 500rpx;
+}

+ 80 - 1
orderPages/storeService/index.vue

@@ -105,7 +105,53 @@
 
 		</uni-popup>
 
-	</view>
+
+    <uni-popup ref="showExpireEquityCard">
+
+      <view class="flex-col justify-start expirePopup" >
+        <view class="flex-row justify-center">
+          <text class="popupTitle">到期提醒</text>
+        </view>
+
+        <scroll-view scroll-y class="flex-col justify-start" :class="[ expireEquityCard.length > 1 ? 'scroll-y1':'scroll-y']" >
+          <view class="flex-row listView" v-for="(item,index) in expireEquityCard">
+            <view class="h-text flex-col justify-center ">
+              <view class="money">
+                <text>{{ item.faceValue }}</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.serviceObjectName || '' }}
+              </view>
+              <view class="title">
+                适用门店:{{ item.useStoreDesc || '' }} {{ item.use_store_desc || '' }} {{ item.useStoreDesc || '' }} {{ item.useStoreDesc || '' }}
+              </view>
+              <view class="title">
+                到期时间:{{ item.effectiveEndTime.slice(0,10) }}
+              </view>
+            </view>
+
+            <view class="h-right-content flex-col justify-center ">
+              <view class="btn" @click="navigateTo(item)">
+                <text>续费</text>
+              </view>
+            </view>
+          </view>
+
+        </scroll-view>
+
+      </view>
+
+    </uni-popup>
+
+
+
+  </view>
 </template>
 
 <script>
@@ -149,6 +195,7 @@
         },
         takeNumberRules:[],
         storeInfo: {},
+        expireEquityCard:[], //过期的权益卡
 			}
 		},
 		onLoad() {
@@ -172,6 +219,8 @@
 					}
 				})
 			},1000*60*5)
+
+      this.getExpireEquityCard();
 		},
 		onShow() {
 
@@ -201,6 +250,36 @@
 		},
 		methods: {
 
+      navigateTo(item){
+        if(item.activityId){
+          let list = item.activityId.split(',')
+          if (list.length == 1){
+            uni.navigateTo({
+              url:'/orderPages/activityDetail/activityDetail?id=' + item.activityId
+            })
+          }else {
+            uni.navigateTo({
+              url:'/orderPages/activityList/activityList'
+            })
+          }
+        }else{
+          uni.navigateTo({
+            url:'/orderPages/activityList/activityList'
+          })
+        }
+
+      },
+
+      getExpireEquityCard(){
+        this.$api.getExpireEquityCard().then((res)=>{
+          this.expireEquityCard = res.data.data;
+          if (this.expireEquityCard.length > 0){
+            this.$refs.showExpireEquityCard.open()
+          }
+        })
+      },
+
+
 			dialogConfirm(){
 				this.configContent = '';
 			},

+ 46 - 1
storePages/myRights/index.vue

@@ -20,6 +20,9 @@
             <!--				<view class="desc">-->
             <!--					<text>{{item.title}}</text>-->
             <!--				</view>-->
+            <view class="flex-row justify-center" v-if="item.isShow">
+              <text style="font-size: 28rpx;font-weight: bold;color: red;" @click="navigateTo(item)">点击续费</text>
+            </view>
           </view>
 
           <view class="h-center-content flex-col justify-around ">
@@ -44,7 +47,9 @@
             <image class="h-right-content-img "  :src="item.facePhotoUrl || '/static/logo.png'" mode="aspectFit" @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>
@@ -61,7 +66,9 @@
 	</view>
 </template>
 <script>
-	export default {
+	import {date} from "@/uni_modules/uv-ui-tools/libs/function/test";
+
+  export default {
 		data() {
 			return {
         showRemarkId:'',
@@ -80,6 +87,38 @@
 		},
 
 		methods: {
+
+      isShow(item){
+        if (item.effectiveEndTime){
+          let date = new Date(item.effectiveEndTime);
+          let now = new Date().getTime();
+          const timeDiff = Math.abs(now - date.getTime());
+          const ninetyDaysMs = 90 * 24 * 60 * 60 * 1000;
+          return timeDiff < ninetyDaysMs;
+        }
+        return false
+      },
+
+      navigateTo(item){
+        if(item.activityId){
+          let list = item.activityId.split(',')
+          if (list.length == 1){
+            uni.navigateTo({
+              url:'/orderPages/activityDetail/activityDetail?id=' + item.activityId
+            })
+          }else {
+            uni.navigateTo({
+              url:'/orderPages/activityList/activityList'
+            })
+          }
+        }else{
+          uni.navigateTo({
+            url:'/orderPages/activityList/activityList'
+          })
+        }
+
+      },
+
       showRemark(item) {
         if (this.showRemarkId == item.id) {
           this.showRemarkId = ''
@@ -101,6 +140,12 @@
 				this.$api.myEquityCardList().then(res=>{
 					console.log(res)
 					this.equityList = res.data.data
+          for (let equityListElement of this.equityList) {
+
+            let a = this.isShow(equityListElement)
+            console.log(a)
+            equityListElement.isShow = this.isShow(equityListElement)
+          }
 					if (this.equityList){
 						this.getImgUrlByBannerOssId(this.equityList)
 					}