shish vor 2 Jahren
Ursprung
Commit
0c4c42c0fa
1 geänderte Dateien mit 32 neuen und 3 gelöschten Zeilen
  1. 32 3
      ghsApp/src/pagesClient/member/detail.vue

+ 32 - 3
ghsApp/src/pagesClient/member/detail.vue

@@ -159,11 +159,21 @@
 		<modal-module :show="czShow" @click="confirmRecharge" :maskClosable="true" title="充值" padding="30rpx 30rpx" >
       <template v-slot:content>
         <div class="app-modal-input-wrap">
+
         <div class="inp-list-line">
+          <div class="line-label">充值金额</div>
           <div class="line-input">
-          <input type="digit" style="width:61%;text-align:center;" :focus="czFocus" v-model="rechargeMoney" class="inp-input" />
+          <input type="digit" style="text-align:center;" :focus="czFocus" v-model="rechargeMoney" class="inp-input" />
           </div>
         </div>
+
+        <div class="inp-list-line" style="margin-top:35upx;">
+						<div class="line-label">付款方式</div>
+						<div class="line-input" @click="getPayWay()">
+							<text v-if="payWay == -1">请选择 &gt;</text>
+              <text v-else>{{ payWay == 0 ? '微信' : payWay == 1 ? '支付宝' : payWay == 4 ? '现金' : '银行卡' }}</text>
+						</div>
+					</div>
         </div>
       </template>
 		</modal-module>
@@ -218,6 +228,8 @@ export default {
           img: `${this.$constant.imgUrl}/retail/member/tab-icon-1.png`,
           funtion: () => {
             this.czShow = true
+            this.rechargeMoney = ''
+            this.payWay = -1
             setTimeout(x => {
               this.$nextTick(() => {
                 this.czFocus = true
@@ -239,7 +251,8 @@ export default {
       wlList: [],
       czFocus:false,
       czShow:false,
-      rechargeMoney:''
+      rechargeMoney:'',
+      payWay:-1
     };
   },
   computed: {},
@@ -254,6 +267,17 @@ export default {
     this.getUserDetail()
   },
   methods: {
+    getPayWay(){
+      let that = this
+      uni.showActionSheet({
+					itemList: ['请选择付款方式:', '线下微信', '线下支付宝','现金','银行卡'],
+					success: function (respond) {
+						let currentIndex = respond.tapIndex
+						let inWay = [{name:"未选择",id:-1},{name:"微信",id:0},{name:"支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}]
+            that.payWay = inWay[currentIndex].id
+					}
+				})
+    },
     showNum(info){
       this.$msg("消费"+info.buyNum+"次")
     },
@@ -350,11 +374,16 @@ export default {
         this.$msg('充值金额需要大于0')
         return false
       }
-      rechargeFn({amount:this.rechargeMoney,customId:this.userInfo.id}).then(res=>{
+      if(this.payWay == -1){
+        this.$msg('请选择支付方式')
+        return false
+      }
+      rechargeFn({amount:this.rechargeMoney,customId:this.userInfo.id,payWay:this.payWay}).then(res=>{
         if(res.code == 1){
           that.czShow = false
 				  that.czFocus = false
           that.rechargeMoney = ''
+          that.payWay = -1
           that.getUserDetail()
           that.$msg(res.msg)
         }