فهرست منبع

feat:亲情卡添加每月消费上限

zhanghui 2 سال پیش
والد
کامیت
56f0ea7446

+ 16 - 3
myPages/familyCard/giveFamilyCard/giveFamilyCard.vue

@@ -7,7 +7,11 @@
         </u-input>
       </u-form-item>
       <u-form-item labelWidth="auto"  label="被赠送会员手机号" prop="memberPhone">
-        <u-input v-model="form.memberPhone" placeholder="请输入被赠送会员手机号" border="bottom"
+        <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>
@@ -28,7 +32,8 @@ export default {
     return {
       form: {
         memberNo:'',
-        memberPhone:''
+        memberPhone:'',
+        amountCap:''
       },
       count:null,
       rules: {
@@ -49,6 +54,13 @@ export default {
           message: '请输入正确的电话号码',
           trigger: ['blur', 'change']
         },
+        'amountCap': {
+          type: 'number',
+          required: true,
+          pattern:this.$phonePattern,
+          message: '请输入每月消费上限',
+          trigger: ['blur', 'change']
+        },
       }
     }
   },
@@ -64,7 +76,8 @@ export default {
       this.$refs.uForm.validate().then(res=>{
         let data={
           memberNo:"Vip." + this.form.memberNo,
-          memberPhone:this.form.memberPhone
+          memberPhone:this.form.memberPhone,
+          amountCap:this.form.amountCap
         }
         this.$api.giveFamilyCard(data).then((res) => {
                   console.log(res)

+ 1 - 1
myPages/familyCard/index.scss

@@ -78,7 +78,7 @@
 .price{
   font-family: DINAlternate, DINAlternate;
   font-weight: bold;
-  font-size: 48rpx;
+  font-size: 35rpx;
   color: #333333;
   line-height: 44rpx;
   margin-top: 8rpx;

+ 20 - 6
myPages/familyCard/index.vue

@@ -30,17 +30,24 @@
                         </view>
                         <view class="flex-row justify-between">
                             <view class="flex-col priceView">
-                                <text class="priceTitle">可用额度</text>
+                                <text class="priceTitle">每月上限</text>
                                 <view>
                                     <!--<text class="priceSymbol">¥</text>-->
-                                    <text class="price">{{item.totalBalance || 0}}</text>
+                                    <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>
                                     <!--<text class="priceSymbol">¥</text>-->
-                                    <text class="price">{{item.amount || 0}}</text>
+                                    <text class="price">{{item.amount || '0'}}</text>
                                 </view>
                             </view>
                         </view>
@@ -75,13 +82,20 @@
                             </view>
                         </view>
                         <view class="flex-row justify-between">
-                            <view class="flex-col priceView">
-                                <text class="priceTitle">可用额度</text>
+                            <view class="flex-col priceView ">
+                                <text class="priceTitle">每月上限</text>
                                 <view>
                                     <!--<text class="priceSymbol">¥</text>-->
-                                    <text class="price">{{item.totalBalance || 0}}</text>
+                                    <text class="price">{{item.amountCap}}</text>
                                 </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.totalBalance || 0}}</text>-->
+<!--                                </view>-->
+<!--                            </view>-->
                             <view class="flex-col priceView borderRight2">
                                 <text class="priceTitle">已用额度</text>
                                 <view>

+ 1 - 0
myPages/familyCard/unbindFamilyCard/familyCard.scss

@@ -36,6 +36,7 @@
         position: relative;
 
         .recharge-balance {
+          width: 150rpx;
           margin: 0 auto;
           .h-nav-img {
             image {

+ 1 - 1
pages/my/index.vue

@@ -113,7 +113,7 @@ export default {
         {thumb: '/static/me/u826.png', title: '储值服务', rightText: '', to: '/myPages/recharge/index'},
         {thumb: '/static/me/u701.png', title: '交易记录', rightText: '', to: '/myPages/transactionRecord/index'},
         {thumb: '/static/me/u11.png', title: '会员须知', rightText: '', to: '/myPages/aboutOur/index'},
-        // {thumb: '/static/me/familyCard_icon.png', title: '亲情卡', rightText: '', to: '/myPages/familyCard/index'}
+        {thumb: '/static/me/familyCard_icon.png', title: '亲情卡', rightText: '', to: '/myPages/familyCard/index'}
       ],
       group2: [