zhanghui 2 роки тому
батько
коміт
591665809c

+ 43 - 17
common/js/api.js

@@ -8,7 +8,7 @@ export default {
         return request({
             url: '/member/wechat/userBindMember',
             method: 'POST',
-            data:data,
+            data: data,
         })
     },
 
@@ -17,7 +17,7 @@ export default {
         return request({
             url: '/order/subscribe/updateSubscribe',
             method: 'POST',
-            data:data,
+            data: data,
         })
     },
     //查询订阅消息列表
@@ -808,10 +808,10 @@ export default {
         })
     },
     //获取取号规则
-    getSelectionRules(data){
+    getSelectionRules(data) {
         return request({
-            url:'/system/dict/data/list',
-            method:'GET',
+            url: '/system/dict/data/list',
+            method: 'GET',
             data: data
         })
     },
@@ -824,15 +824,18 @@ export default {
         })
     },
     //赠送亲情卡
-    giveFamilyCard(data){
+    giveFamilyCard(data) {
         return request({
             url: '/member/loveCard/createLoveCard',
-            method: 'GET',
-            data: data
+            method: 'POST',
+            data: data,
+            header: {
+                'content-type': 'application/x-www-form-urlencoded'
+            },
         })
     },
     //获取我赠送的亲情卡列表
-    getMyPresentList(data){
+    getMyPresentList(data) {
         return request({
             url: '/member/loveCard/myPresentList',
             method: 'GET',
@@ -840,7 +843,7 @@ export default {
         })
     },
     //查询我收到的情亲卡列表
-    getMyReceiveList(data){
+    getMyReceiveList(data) {
         return request({
             url: '/member/loveCard/myReceiveList',
             method: 'GET',
@@ -848,7 +851,7 @@ export default {
         })
     },
     //.查询情亲卡的消费记录
-    getMycardRecordList(data){
+    getMycardRecordList(data) {
         return request({
             url: '/member/loveCard/cardRecordList',
             method: 'GET',
@@ -856,7 +859,7 @@ export default {
         })
     },
     //.解绑亲情卡
-    untieCard(data){
+    untieCard(data) {
         return request({
             url: '/member/loveCard/untieCard',
             method: 'GET',
@@ -865,7 +868,7 @@ export default {
     },
 
     //查询剩余可赠送次数
-    presentCount(){
+    presentCount() {
         return request({
             url: '/member/loveCard/presentCount',
             method: 'GET'
@@ -874,23 +877,46 @@ export default {
 
 
     //亲情卡支付预约费用
-    familyCardPay(data){
+    familyCardPay(data) {
         return request({
-            url: '/order/familyCardPay/pay?orderNo='+data.orderNo +'&loveCardId=' +data.loveCardId,
+            url: '/order/familyCardPay/pay?orderNo=' + data.orderNo + '&loveCardId=' + data.loveCardId,
             method: 'POST',
             data: data
         })
     },
 
     //亲情卡支付订单费用
-    familyCardTradePay(data){
+    familyCardTradePay(data) {
         return request({
-            url: '/order/familyCardPay/pay/trade?tradeNo='+data.tradeNo +'&loveCardId=' +data.loveCardId,
+            url: '/order/familyCardPay/pay/trade?tradeNo=' + data.tradeNo + '&loveCardId=' + data.loveCardId,
             method: 'POST',
             data: data
         })
     },
 
 
+    //查询亲友关系
+    loveCardRelation() {
+        return request({
+            url: '/system/dict/data/list?dictType=love_card_relation',
+            method: 'GET'
+        })
+    },
+    //根据手机号查询用户
+    getByPhone(data) {
+        return request({
+            url: '/member/wechat/getByPhone',
+            method: 'GET',
+            data: data
+        })
+    },
 
+    //根据手机号查询用户
+    checkStore(data) {
+        return request({
+            url: '/member/loveCard/checkStore',
+            method: 'GET',
+            data: data
+        })
+    },
 }

+ 9 - 8
components/pay/pay.vue

@@ -20,8 +20,9 @@
 								<scroll-view scroll-y class="loveCard">
 									<view class="flex-row justify-between loveCardItem " v-for="(item,index) in loveCardList" :key="index" @click="payLoveItem(0,index,item)">
 										<view class="select flex-col" >
-											<text>{{item.presentUserName}}</text>
-											<text class="balance">本月剩余额度:{{item.totalBalance}}</text>
+											<text>{{item.presentUserName}}({{item.relation}})</text>
+											<text>{{item.presentUserNo}}</text>
+<!--											<text class="balance">本月剩余额度:{{item.totalBalance}}</text>-->
 										</view>
 										<view class="flex-col justify-center">
 											<u-icon v-if="curServiceTab === 0 && item.select" name="checkmark-circle-fill" color="#38db38" size="25"></u-icon>
@@ -189,12 +190,12 @@
 			},
 
 			payLoveItem(num,index,loveCard){
-				console.log(loveCard.totalBalance*1, this.totalAmount*1)
-				if (loveCard.totalBalance*1 < this.totalAmount*1 && num == 0){
-					console.log(this.totalAmount)
-					uni.$u.toast('余额不足')
-					return
-				}
+				// console.log(loveCard.totalBalance*1, this.totalAmount*1)
+				// if (loveCard.totalBalance*1 < this.totalAmount*1 && num == 0){
+				// 	console.log(this.totalAmount)
+				// 	uni.$u.toast('余额不足')
+				// 	return
+				// }
 				this.curServiceTab = num
 				this.loveCardList.forEach(item=>{
 					item.select = false

+ 220 - 110
myPages/familyCard/giveFamilyCard/giveFamilyCard.vue

@@ -1,125 +1,235 @@
 <template>
-  <view class="box">
-    <u--form labelPosition="top" :model="form" :rules="rules" ref="uForm">
-      <u-form-item labelWidth="auto"  label="被赠送会员编号" prop="memberNo">
-        <u-input  v-model="form.memberNo" placeholder="请输入被赠送会员编号" border="bottom">
-          <u-text text="Vip." color="#000000" slot="prefix" margin="0 3px 0 0" type="tips"></u-text>
-        </u-input>
-      </u-form-item>
-      <u-form-item labelWidth="auto"  label="被赠送会员手机号" prop="memberPhone">
-        <u-input v-model="form.memberPhone" type="number" placeholder="请输入被赠送会员手机号" border="bottom"
-        ></u-input>
-      </u-form-item>
-      <u-form-item labelWidth="auto"  label="每月消费上限" prop="amountCap">
-        <u-input v-model="form.amountCap" type="digit" placeholder="请输入每月消费上限" border="bottom"
-        ></u-input>
-      </u-form-item>
-    </u--form>
-    <view class="op-btn-wrap">
-      <view class="h-btn" @click="handleGive">
-        <text>确定
-          <text class="presentCount" v-if="count !== null">(剩余可赠送{{count}}次)</text>
-        </text>
-      </view>
+    <view class="box">
+        <u-form labelPosition="top" :model="form" :rules="rules" ref="uForm">
+            <!--      <u-form-item labelWidth="auto"  label="被赠送会员编号" prop="memberNo">-->
+            <!--        <u-input  v-model="form.memberNo" placeholder="请输入被赠送会员编号" border="bottom">-->
+            <!--          <u-text text="Vip." color="#000000" slot="prefix" margin="0 3px 0 0" type="tips"></u-text>-->
+            <!--        </u-input>-->
+            <!--      </u-form-item>-->
+            <u-form-item labelWidth="auto" label="亲友手机号" prop="memberPhone" borderBottom>
+                <view class="flex-row">
+                    <u-input v-model="form.memberPhone" type="number" placeholder="请输入亲友手机号" border="none"></u-input>
+                    <view class="customStyle" @click="getMemberList">
+                        <tex>查询</tex>
+                    </view>
+                </view>
+            </u-form-item>
+
+            <u-form-item v-if="isSelectRelation" labelWidth="auto" label="亲友关系" prop="relation" borderBottom @click="showRelation = true" ref="item1">
+                <u--input v-model="form.relation" disabled disabledColor="#ffffff" placeholder="请选择亲友关系" border="none"></u--input>
+                <u-icon slot="right" name="arrow-right"></u-icon>
+            </u-form-item>
+
+            <u-form-item v-else labelWidth="auto" label="亲友关系" prop="relation" borderBottom  ref="item2">
+                <u--input v-model="form.relation"  disabledColor="#ffffff" placeholder="请输入亲友关系" border="none"></u--input>
+            </u-form-item>
+
+            <!--      <u-form-item labelWidth="auto"  label="每月消费上限" prop="amountCap">-->
+            <!--        <u-input v-model="form.amountCap" type="digit" placeholder="请输入每月消费上限" border="bottom"-->
+            <!--        ></u-input>-->
+            <!--      </u-form-item>-->
+        </u-form>
+        <view class="op-btn-wrap">
+            <view class="h-btn" @click="handleGive">
+                <text>确定
+                    <text class="presentCount" v-if="count !== null">(剩余可赠送{{count}}次)</text>
+                </text>
+            </view>
+        </view>
+
+        <uni-popup ref="popup" type="bottom" @change="popupChange">
+            <view class="popup">
+                <view class="flex-row justify-center popupTitle">
+                    <text>选择亲友</text>
+                </view>
+                <view class="popupContent">
+                    <view class="flex-row popupItem" v-for="(item,index) in memberList" :key="index" @click="selectMember(item)">
+                        <view class="flex-col justify-center">
+                            <image :src="item.url ||'/static/me/ud4.png'" class="loveImage "></image>
+                        </view>
+                        <view class="flex-col justify-around ">
+                            <text class="popupName">{{item.ncikName}}({{item.no}})</text>
+                            <text class="popupPhone">{{item.cellPhone}}</text>
+                        </view>
+                    </view>
+                </view>
+
+                <view class="popupClose" @click="popupClose">
+                    <u-icon name="close" color="#c8c8c8" size="22"></u-icon>
+                </view>
+            </view>
+        </uni-popup>
+
+
+        <u-action-sheet :show="showRelation" :actions="actions" title="请选择亲友关系" @close="showRelation = false" @select="relationSelect">
+        </u-action-sheet>
     </view>
-  </view>
 </template>
 
 <script>
-export default {
-  name: "giveFamilyCard",
-  data() {
-    return {
-      form: {
-        memberNo:'',
-        memberPhone:'',
-        amountCap:''
-      },
-      count:null,
-      rules: {
-        'memberNo': {
-          type: 'string',
-          required: true,
-          min: 8,
-          max: 10,
-          message: '请输入6-18位密码',
-          trigger: ['blur', 'change']
+    export default {
+        name: "giveFamilyCard",
+        data() {
+            return {
+                isSelectRelation:true,
+                showMember:false,
+                showRelation: false,
+                memberList:[],
+                actions: [],
+                store:{},
+                form: {
+                    memberNo: '',
+                    memberPhone: '',
+                    amountCap: '',
+                    relation: ''
+                },
+                count: null,
+                rules: {
+                    // 'memberNo': {
+                    //     type: 'string',
+                    //     required: true,
+                    //     min: 8,
+                    //     max: 10,
+                    //     message: '请输入会员编号',
+                    //     trigger: ['blur', 'change']
+                    // },
+                    'memberPhone': {
+                        type: 'string',
+                        required: true,
+                        min: 11,
+                        max: 11,
+                        // pattern: this.$phonePattern,
+                        message: '请输入正确的手机号',
+                        trigger: []
+                    },
+                    // 'amountCap': {
+                    //     type: 'number',
+                    //     required: true,
+                    //     pattern: this.$phonePattern,
+                    //     message: '请输入每月消费上限',
+                    //     trigger: ['blur', 'change']
+                    // },
+                    'relation': {
+                        type: 'string',
+                        required: true,
+                        message: '请选择亲友关系',
+                        trigger: ['blur', 'change']
+                    },
+                }
+            }
         },
-        'memberPhone': {
-          type: 'string',
-          required: true,
-          min: 11,
-          max: 11,
-          pattern:this.$phonePattern,
-          message: '请输入正确的电话号码',
-          trigger: ['blur', 'change']
+        onReady() {
+            //如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
+            this.$refs.uForm.setRules(this.rules)
         },
-        'amountCap': {
-          type: 'number',
-          required: true,
-          pattern:this.$phonePattern,
-          message: '请输入每月消费上限',
-          trigger: ['blur', 'change']
+        onShow() {
+            this.presentCount()
+            this.loveCardRelation()
+            this.store = uni.getStorageSync('storeInfo');
+            this.form.storeName = this.store.storeName
+            this.form.storeId = this.store.storeId
         },
-      }
-    }
-  },
-  onShow(){
-    this.presentCount()
-  },
-  methods: {
-    handleGive() {
-      if (this.count == 0){
-        uni.$u.toast('可赠送次数不足!')
-        return
-      }
-      this.$refs.uForm.validate().then(res=>{
-        let data={
-          memberNo:"Vip." + this.form.memberNo,
-          memberPhone:this.form.memberPhone,
-          amountCap:this.form.amountCap
-        }
-        this.$api.giveFamilyCard(data).then((res) => {
-                  console.log(res)
-                  uni.showToast({
-                    duration: 2000,
-                    title: '赠送成功'
-                  });
-                  uni.navigateBack({delta : 1})
+        methods: {
+            selectMember(item){
+                this.form.memberNo = item.no
+                this.form.memberPhone = item.cellPhone
+                this.$refs.popup.close()
+            },
+            popupClose(){
+                this.$refs.popup.close()
+            },
+
+            popupChange(e){
+                console.log(e)
+                if (!e.show){
+                    this.memberList = []
+                }
+            },
+            getMemberList(){
+                this.rules.memberPhone.min = 7
+                this.rules.memberPhone.message = '至少输入手机号中的7位'
+                 this.$refs.uForm.validateField('memberPhone',(e)=>{
+                    console.log('校验结果',e)
+                     if (e.length == 0 ){
+                         this.$api.getByPhone({
+                             phone:this.form.memberPhone
+                         }).then(res=>{
+                             this.memberList = res.data.data
+                             this.getImgUrlByOssId(this.memberList)
+                             this.$refs.popup.open()
+
+                             console.log('获取到的用户列表', this.memberList)
+                         })
+                     }
+
+                })
+            },
+            getImgUrlByOssId(list) {
+                if (list) {
+                    for (let i=0;i<list.length;i++){
+                        let data = null
+                        data = list[i].selfPhoto
+                        if (data) {
+                            this.$api.getImage(data).then(res => {
+                                list[i].url = res.data.data[0].url.replace(/^http:/, "https:")
+                                this.$set(list,i,list[i])
+                            });
+                        }
+                    }
+                }
+            },
+            loveCardRelation() {
+                this.$api.loveCardRelation().then(res => {
+                    this.actions = []
+                    if (res.data.rows) {
+
+                        for (let i of res.data.rows) {
+                            let relation = {
+                                name: i.dictValue
+                            }
+                            this.actions.push(relation)
+                        }
+                    }
+                })
+            },
+            relationSelect(e) {
+                if (e.name === '自定义'){
+                    this.rules.relation.message = '请输入亲友关系'
+                    this.isSelectRelation = false
+                }else {
+                    this.form.relation = e.name
+                }
+            },
+            handleGive() {
+                if (this.count == 0) {
+                    uni.$u.toast('可赠送次数不足!')
+                    return
                 }
-        )
+                this.rules.memberPhone.min = 11
+                this.rules.memberPhone.message = '请输入正确的手机号'
+                this.$refs.uForm.validate().then(res => {
+
+                    this.$api.giveFamilyCard(this.form).then((res) => {
+                            console.log(res)
+                            uni.showToast({
+                                duration: 2000,
+                                title: '赠送成功'
+                            });
+                            uni.navigateBack({delta: 1})
+                        }
+                    )
 
-      })
-    },
-    presentCount(){
-      this.$api.presentCount().then(res=>{
-        this.count = res.data.data
-      })
+                })
+            },
+            presentCount() {
+                this.$api.presentCount().then(res => {
+                    this.count = res.data.data
+                })
+            }
+        }
     }
-  }
-}
 </script>
 
 <style scoped>
-.box {
-  padding: 24rpx 32rpx;
-}
-.h-btn {
-  margin: 48rpx auto;
-  text-align: center;
-  width: 686rpx;
-  height: 84rpx;
-  background: #FFE05C;
-  border-radius: 50rpx;
-  line-height: 84rpx;
-}
-
-.presentCount{
-  font-size: 24rpx;
-  line-height: 84rpx;
-  color: #666666;
-}
-/deep/ .u-text__value--tips{
-  color: #333333 !important;
-}
+    @import "./index.scss";
 </style>

+ 71 - 0
myPages/familyCard/giveFamilyCard/index.scss

@@ -0,0 +1,71 @@
+.box {
+  padding: 24rpx 32rpx;
+}
+
+.h-btn {
+  margin: 48rpx auto;
+  text-align: center;
+  width: 686rpx;
+  height: 84rpx;
+  background: #FFE05C;
+  border-radius: 50rpx;
+  line-height: 84rpx;
+}
+
+.presentCount {
+  font-size: 24rpx;
+  line-height: 84rpx;
+  color: #666666;
+}
+.customStyle{
+  width: 100rpx;
+  height: 50rpx;
+  font-size: 24rpx;
+  line-height: 50rpx;
+  background: #FFE05C;
+  text-align: center;
+  border-radius: 10rpx;
+}
+
+/deep/ .u-text__value--tips {
+  color: #333333 !important;
+}
+.popup{
+  background: #ffffff;
+  width: 750rpx;
+  height: 750rpx;
+  position: relative;
+}
+.popupClose{
+  position: absolute;
+  right: 30rpx;
+  top: 24rpx;
+}
+.popupTitle{
+  font-size: 30rpx;
+  line-height: 90rpx;
+}
+.popupContent{
+  width: 750rpx;
+  height: 650rpx;
+  overflow: auto;
+}
+
+.loveImage{
+  width: 80rpx;
+  height: 80rpx;
+  border-radius: 40rpx;
+}
+.popupItem{
+  padding: 24rpx 24rpx;
+  border-bottom: 2rpx solid #F7F7F7;
+}
+.popupName{
+  margin-left: 24rpx;
+  font-size: 26rpx;
+}
+.popupPhone{
+  margin-left: 24rpx;
+  font-size: 24rpx;
+  color: #999999;
+}

+ 9 - 0
myPages/familyCard/index.scss

@@ -11,6 +11,15 @@
   height: 20vh;
 }
 .loveCard{
+  width: 686rpx;
+  height: 145rpx;
+  background: #F7F7F7;
+  border-radius: 25rpx;
+  margin-top: 24rpx;
+  overflow: hidden;
+  position: relative;
+}
+.loveCardNull{
   width: 686rpx;
   height: 284rpx;
   background: #F7F7F7;

+ 36 - 36
myPages/familyCard/index.vue

@@ -6,7 +6,7 @@
                 <text>我收到的亲情卡</text>
             </view>
 
-            <view class="loveCard" v-if="gotList.length === 0">
+            <view class="loveCardNull" v-if="gotList.length === 0">
                 <view class="flex-row justify-center">
                     <image src="/static/me/zhanwu.png" class="nullIcon"></image>
                 </view>
@@ -24,25 +24,25 @@
                                 <image :src="item.url || '/static/me/ud4.png'" class="avatar"></image>
                             </view>
                             <view class="flex-col">
-                                <text class="name">{{item.presentUserName}}</text>
+                                <text class="name">{{item.presentUserName}}({{item.relation}})</text>
                                 <text class="vipNo">{{item.presentUserNo}}</text>
                             </view>
                         </view>
                         <view class="flex-row justify-between">
-                            <view class="flex-col priceView">
-                                <text class="priceTitle">每月上限</text>
-                                <view>
-                                    <!--<text class="priceSymbol">¥</text>-->
-                                    <text class="price">{{item.amountCap}}</text>
-                                </view>
-                            </view>
-                            <view class="flex-col priceView borderRight1">
-                                <text class="priceTitle">剩余额度</text>
-                                <view>
-                                    <!--<text class="priceSymbol">¥</text>-->
-                                    <text class="price">{{item.totalBalance || 0}}</text>
-                                </view>
-                            </view>
+<!--                            <view class="flex-col priceView">-->
+<!--                                <text class="priceTitle">每月上限</text>-->
+<!--                                <view>-->
+<!--                                    &lt;!&ndash;<text class="priceSymbol">¥</text>&ndash;&gt;-->
+<!--                                    <text class="price">{{item.amountCap}}</text>-->
+<!--                                </view>-->
+<!--                            </view>-->
+<!--                            <view class="flex-col priceView borderRight1">-->
+<!--                                <text class="priceTitle">剩余额度</text>-->
+<!--                                <view>-->
+<!--                                    &lt;!&ndash;<text class="priceSymbol">¥</text>&ndash;&gt;-->
+<!--                                    <text class="price">{{item.totalBalance || 0}}</text>-->
+<!--                                </view>-->
+<!--                            </view>-->
 <!--                            <view class="flex-col priceView borderRight1">-->
 <!--                                <text class="priceTitle">已用额度</text>-->
 <!--                                <view>-->
@@ -56,15 +56,15 @@
             </view>
 
             <view class="title">
-                <text>我赠送的亲情卡</text>
+                <text>亲友列表</text>
             </view>
 
-            <view class="loveCard" v-if="giveList.length === 0">
+            <view class="loveCardNull" v-if="giveList.length === 0">
                 <view class="flex-row justify-center">
                     <image src="/static/me/zhanwu.png" class="nullIcon"></image>
                 </view>
                 <view class="flex-row justify-center nullMsg">
-                    <text>暂无赠送的亲情卡</text>
+                    <text>暂无亲友列表</text>
                 </view>
             </view>
 
@@ -77,18 +77,18 @@
                                 <image :src="item.url || '/static/me/ud4.png'" class="avatar"></image>
                             </view>
                             <view class="flex-col">
-                                <text class="name">{{item.userName}}</text>
+                                <text class="name">{{item.userName}}({{item.relation}})</text>
                                 <text class="vipNo">{{item.userNo}}</text>
                             </view>
                         </view>
-                        <view class="flex-row justify-between">
-                            <view class="flex-col priceView ">
-                                <text class="priceTitle">每月上限</text>
-                                <view>
-                                    <!--<text class="priceSymbol">¥</text>-->
-                                    <text class="price">{{item.amountCap}}</text>
-                                </view>
-                            </view>
+<!--                        <view class="flex-row justify-between">-->
+<!--                            <view class="flex-col priceView ">-->
+<!--                                <text class="priceTitle">每月上限</text>-->
+<!--                                <view>-->
+<!--                                    &lt;!&ndash;<text class="priceSymbol">¥</text>&ndash;&gt;-->
+<!--                                    <text class="price">{{item.amountCap}}</text>-->
+<!--                                </view>-->
+<!--                            </view>-->
 <!--                            <view class="flex-col priceView borderRight2">-->
 <!--                                <text class="priceTitle">可用额度</text>-->
 <!--                                <view>-->
@@ -96,14 +96,14 @@
 <!--                                    <text class="price">{{item.totalBalance || 0}}</text>-->
 <!--                                </view>-->
 <!--                            </view>-->
-                            <view class="flex-col priceView borderRight2">
-                                <text class="priceTitle">已用额度</text>
-                                <view>
-                                    <!--<text class="priceSymbol">¥</text>-->
-                                    <text class="price">{{item.amount || 0}}</text>
-                                </view>
-                            </view>
-                        </view>
+<!--                            <view class="flex-col priceView borderRight2">-->
+<!--                                <text class="priceTitle">已用额度</text>-->
+<!--                                <view>-->
+<!--                                    &lt;!&ndash;<text class="priceSymbol">¥</text>&ndash;&gt;-->
+<!--                                    <text class="price">{{item.amount || 0}}</text>-->
+<!--                                </view>-->
+<!--                            </view>-->
+<!--                        </view>-->
                     </view>
                 </view>
 

+ 14 - 9
myPages/familyCard/unbindFamilyCard/unbindFamilyCard.vue

@@ -6,14 +6,19 @@
 
         <view class="h-balance-wrap">
           <view class="h-balance">
-            <view v-if="type == 1" class="recharge-balance">
-              <view class="name">已用额度</view>
-              <view class="Number" style="font-size: 48rpx">{{ data.amount || 0 }}</view>
-            </view>
+<!--            <view v-if="type == 1" class="recharge-balance">-->
+<!--              <view class="name">已用额度</view>-->
+<!--              <view class="Number" style="font-size: 48rpx">{{ data.amount || 0 }}</view>-->
+<!--            </view>-->
+
+<!--            <view v-if="type == 2" class="recharge-balance">-->
+<!--              <view class="name">剩余额度</view>-->
+<!--              <view class="Number" style="font-size: 48rpx">{{ data.totalBalance || 0 }}</view>-->
+<!--            </view>-->
 
-            <view v-if="type == 2" class="recharge-balance">
-              <view class="name">剩余额度</view>
-              <view class="Number" style="font-size: 48rpx">{{ data.totalBalance || 0 }}</view>
+            <view class="recharge-balance">
+              <view class="name">累计消费</view>
+              <view class="Number" style="font-size: 48rpx">{{ data.totalAmount || 0 }}</view>
             </view>
 
             <text class="openUnbind" @click="openUnbindpopup">解绑</text>
@@ -28,8 +33,8 @@
             <text>{{ data.createTime }}</text>
           </view>
         </view>
-        <text class="record">使用记录</text>
-        <view v-if="data.id">
+        <view v-if="data.id && type == 1">
+          <text class="record">使用记录</text>
           <mescroll-item ref="MescrollItem" :i="0" :index="0" :cardId="data.id" :height="scrollViewHeight">
           </mescroll-item>
         </view>

+ 6 - 6
orderPages/orderDetail/index.vue

@@ -198,8 +198,8 @@
 						<scroll-view scroll-y class="loveCard" :show-scrollbar="true">
 							<view class="flex-row justify-between loveCardItem " v-for="(item,index) in loveCardList" :key="index" @click="payLoveItem(0,index,item)">
 								<view class="select flex-col" >
-									<text>{{item.presentUserName}}</text>
-									<text class="balance">本月剩余额度:{{item.totalBalance}}</text>
+									<text>{{item.presentUserName}}({{item.relation}})</text>
+<!--									<text class="balance">本月剩余额度:{{item.totalBalance}}</text>-->
 								</view>
 								<view class="flex-col justify-center">
 									<u-icon v-if="curServiceTab === 0 && item.select" name="checkmark-circle-fill" color="#38db38" size="25"></u-icon>
@@ -552,10 +552,10 @@
 			},
 
 			payLoveItem(num,index,loveCard){
-				if (loveCard.totalBalance*1 < this.order.payAmount*1 && num == 0){
-					uni.$u.toast('余额不足')
-					return
-				}
+				// if (loveCard.totalBalance*1 < this.order.payAmount*1 && num == 0){
+				// 	uni.$u.toast('余额不足')
+				// 	return
+				// }
 				this.curServiceTab = num
 				this.loveCardList.forEach(item=>{
 					item.select = false

+ 12 - 1
pages/my/index.vue

@@ -156,10 +156,21 @@ export default {
 
   methods: {
     clickListItem(e){
-      console.log(e)
+
+      if (e.title === '亲情卡'){
+        let store = uni.getStorageSync('storeInfo')
+        this.$api.checkStore({
+          storeName:store.storeName
+        }).then(res=>{
+          uni.navigateTo({
+            url:e.to
+          })
+        })
+      }else {
         uni.navigateTo({
           url:e.to
         })
+      }
     },
     getUserInfo() {
       this.$api.getUserInfo().then(res => {

+ 9 - 8
pages/order/index.vue

@@ -81,8 +81,9 @@
 							<scroll-view scroll-y class="loveCard">
 								<view class="flex-row justify-between loveCardItem " v-for="(item,index) in loveCardList" :key="index" @click="payLoveItem(0,index,item)">
 									<view class="select flex-col" >
-										<text>{{item.presentUserName}}</text>
-										<text class="balance">本月剩余额度:{{item.totalBalance}}</text>
+										<text>{{item.presentUserName}}({{item.relation}})</text>
+										<text>{{item.presentUserNo}}</text>
+<!--										<text class="balance">本月剩余额度:{{item.totalBalance}}</text>-->
 									</view>
 									<view class="flex-col justify-center">
 										<u-icon v-if="curServiceTab === 0 && item.select" name="checkmark-circle-fill" color="#38db38" size="25"></u-icon>
@@ -418,12 +419,12 @@
 			},
 
 			payLoveItem(num,index,loveCard){
-				console.log(loveCard.totalBalance*1, this.totalAmount*1)
-				if (loveCard.totalBalance*1 < this.totalAmount*1 && num == 0){
-					console.log(this.totalAmount)
-					uni.$u.toast('余额不足')
-					return
-				}
+				// console.log(loveCard.totalBalance*1, this.totalAmount*1)
+				// if (loveCard.totalBalance*1 < this.totalAmount*1 && num == 0){
+				// 	console.log(this.totalAmount)
+				// 	uni.$u.toast('余额不足')
+				// 	return
+				// }
 				this.curServiceTab = num
 				this.loveCardList.forEach(item=>{
 					item.select = false

+ 2 - 0
uni_modules/uni-data-select/changelog.md

@@ -1,3 +1,5 @@
+## 1.0.8(2024-03-28)
+- 修复 在vue2下:style动态绑定导致编译失败的bug
 ## 1.0.7(2024-01-20)
 - 修复 长文本回显超过容器的bug,超过容器部分显示省略号
 ## 1.0.6(2023-04-12)

+ 66 - 31
uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue

@@ -6,16 +6,16 @@
 				<view class="uni-select__input-box" @click="toggleSelector">
 					<view v-if="current" class="uni-select__input-text">{{textShow}}</view>
 					<view v-else class="uni-select__input-text uni-select__input-placeholder">{{typePlaceholder}}</view>
-					<view v-if="current && clear && !disabled" @click.stop="clearVal" >
-						<uni-icons type="clear" color="#c0c4cc" size="24"/>
+					<view v-if="current && clear && !disabled" @click.stop="clearVal">
+						<uni-icons type="clear" color="#c0c4cc" size="24" />
 					</view>
 					<view v-else>
 						<uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" />
 					</view>
 				</view>
 				<view class="uni-select--mask" v-if="showSelector" @click="toggleSelector" />
-				<view class="uni-select__selector" v-if="showSelector">
-					<view class="uni-popper__arrow"></view>
+				<view class="uni-select__selector" :style="getOffsetByPlacement" v-if="showSelector">
+					<view :class="placement=='bottom'?'uni-popper__arrow_bottom':'uni-popper__arrow_top'"></view>
 					<scroll-view scroll-y="true" class="uni-select__selector-scroll">
 						<view class="uni-select__selector-empty" v-if="mixinDatacomResData.length === 0">
 							<text>{{emptyTips}}</text>
@@ -43,6 +43,9 @@
 	 * @property {String} label 左侧标题
 	 * @property {String} placeholder 输入框的提示文字
 	 * @property {Boolean} disabled 是否禁用
+	 * @property {String} placement 弹出位置
+	 * 	@value top   		顶部弹出
+	 * 	@value bottom		底部弹出(default)
 	 * @event {Function} change  选中发生变化触发
 	 */
 
@@ -93,6 +96,10 @@
 				type: String,
 				default: ''
 			},
+			placement: {
+				type: String,
+				default: 'bottom'
+			}
 		},
 		data() {
 			return {
@@ -125,7 +132,7 @@
 					common + placeholder :
 					common
 			},
-			valueCom(){
+			valueCom() {
 				// #ifdef VUE3
 				return this.modelValue;
 				// #endif
@@ -133,13 +140,21 @@
 				return this.value;
 				// #endif
 			},
-			textShow(){
+			textShow() {
 				// 长文本显示
 				let text = this.current;
 				if (text.length > 10) {
 					return text.slice(0, 25) + '...';
 				}
 				return text;
+			},
+			getOffsetByPlacement() {
+				switch (this.placement) {
+					case 'top':
+						return "bottom:calc(100% + 12px);";
+					case 'bottom':
+						return "top:calc(100% + 12px);";
+				}
 			}
 		},
 
@@ -166,7 +181,7 @@
 
 		},
 		methods: {
-			debounce(fn, time = 100){
+			debounce(fn, time = 100) {
 				let timer = null
 				return function(...args) {
 					if (timer) clearTimeout(timer)
@@ -176,11 +191,11 @@
 				}
 			},
 			// 执行数据库查询
-			query(){
+			query() {
 				this.mixinDatacomEasyGet();
 			},
 			// 监听查询条件变更事件
-			onMixinDatacomPropsChange(){
+			onMixinDatacomPropsChange() {
 				if (this.collection) {
 					this.debounceGet();
 				}
@@ -203,9 +218,9 @@
 						}
 						defValue = defItem
 					}
-          if (defValue || defValue === 0) {
-					  this.emit(defValue)
-          }
+					if (defValue || defValue === 0) {
+						this.emit(defValue)
+					}
 				}
 				const def = this.mixinDatacomResData.find(item => item.value === defValue)
 				this.current = def ? this.formatItemName(def) : ''
@@ -268,7 +283,7 @@
 					let str = "";
 					str = this.format;
 					for (let key in item) {
-						str = str.replace(new RegExp(`{${key}}`,"g"),item[key]);
+						str = str.replace(new RegExp(`{${key}}`, "g"), item[key]);
 					}
 					return str;
 				} else {
@@ -282,26 +297,26 @@
 				}
 			},
 			// 获取当前加载的数据
-			getLoadData(){
+			getLoadData() {
 				return this.mixinDatacomResData;
 			},
 			// 获取当前缓存key
-			getCurrentCacheKey(){
+			getCurrentCacheKey() {
 				return this.collection;
 			},
 			// 获取缓存
-			getCache(name=this.getCurrentCacheKey()){
+			getCache(name = this.getCurrentCacheKey()) {
 				let cacheData = uni.getStorageSync(this.cacheKey) || {};
 				return cacheData[name];
 			},
 			// 设置缓存
-			setCache(value, name=this.getCurrentCacheKey()){
+			setCache(value, name = this.getCurrentCacheKey()) {
 				let cacheData = uni.getStorageSync(this.cacheKey) || {};
 				cacheData[name] = value;
 				uni.setStorageSync(this.cacheKey, cacheData);
 			},
 			// 删除缓存
-			removeCache(name=this.getCurrentCacheKey()){
+			removeCache(name = this.getCurrentCacheKey()) {
 				let cacheData = uni.getStorageSync(this.cacheKey) || {};
 				delete cacheData[name];
 				uni.setStorageSync(this.cacheKey, cacheData);
@@ -316,7 +331,6 @@
 	$uni-secondary-color: #909399 !default;
 	$uni-border-3: #e5e5e5;
 
-
 	/* #ifndef APP-NVUE */
 	@media screen and (max-width: 500px) {
 		.hide-on-phone {
@@ -417,7 +431,6 @@
 		box-sizing: border-box;
 		/* #endif */
 		position: absolute;
-		top: calc(100% + 12px);
 		left: 0;
 		width: 100%;
 		background-color: #FFFFFF;
@@ -441,6 +454,7 @@
 			max-height: 600px;
 		}
 	}
+
 	/* #endif */
 
 	.uni-select__selector-empty,
@@ -473,18 +487,21 @@
 	}
 
 	/* picker 弹出层通用的指示小三角 */
-	.uni-popper__arrow,
-	.uni-popper__arrow::after {
-		position: absolute;
-		display: block;
-		width: 0;
-		height: 0;
-		border-color: transparent;
-		border-style: solid;
-		border-width: 6px;
+	.uni-popper__arrow_bottom,
+	.uni-popper__arrow_bottom::after,
+	.uni-popper__arrow_top,
+	.uni-popper__arrow_top::after,
+	{
+	position: absolute;
+	display: block;
+	width: 0;
+	height: 0;
+	border-color: transparent;
+	border-style: solid;
+	border-width: 6px;
 	}
 
-	.uni-popper__arrow {
+	.uni-popper__arrow_bottom {
 		filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
 		top: -6px;
 		left: 10%;
@@ -493,7 +510,7 @@
 		border-bottom-color: #EBEEF5;
 	}
 
-	.uni-popper__arrow::after {
+	.uni-popper__arrow_bottom::after {
 		content: " ";
 		top: 1px;
 		margin-left: -6px;
@@ -501,6 +518,24 @@
 		border-bottom-color: #fff;
 	}
 
+	.uni-popper__arrow_top {
+		filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
+		bottom: -6px;
+		left: 10%;
+		margin-right: 3px;
+		border-bottom-width: 0;
+		border-top-color: #EBEEF5;
+	}
+
+	.uni-popper__arrow_top::after {
+		content: " ";
+		bottom: 1px;
+		margin-left: -6px;
+		border-bottom-width: 0;
+		border-top-color: #fff;
+	}
+
+
 	.uni-select__input-text {
 		// width: 280px;
 		width: 100%;

+ 3 - 2
uni_modules/uni-data-select/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-data-select",
   "displayName": "uni-data-select 下拉框选择器",
-  "version": "1.0.7",
+  "version": "1.0.8",
   "description": "通过数据驱动的下拉框选择器",
   "keywords": [
     "uni-ui",
@@ -43,7 +43,8 @@
     "platforms": {
       "cloud": {
         "tcb": "y",
-        "aliyun": "y"
+        "aliyun": "y",
+        "alipay": "n"
       },
       "client": {
         "App": {

+ 1 - 1
uni_modules/uni-load-more/package.json

@@ -83,4 +83,4 @@
       }
     }
   }
-}
+}