|
|
@@ -8,11 +8,34 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="padding:10upx 0 25upx 10upx;font-size:30upx;" v-if="!$util.isEmpty(customInfo)">
|
|
|
- 您好,{{ customInfo.name?customInfo.name:'' }},<text>请输入金额</text>
|
|
|
+ 您好,{{ customInfo.name?customInfo.name:'' }},<text>请输入要充值金额</text>
|
|
|
</div>
|
|
|
<div class="module-com pay-input-wrap">
|
|
|
<pay-input-module :focus="inpFocus" :num="amount" @focusFn="focusFn" @blurFn="blurFn" @clickKey="clickKeyFn" />
|
|
|
</div>
|
|
|
+
|
|
|
+ <view style="text-align: center;">
|
|
|
+
|
|
|
+ <view v-if="rechargeWeal == 1" style="font-size:34upx;">
|
|
|
+ <view v-for="(item,index) in weal" :key="index" style="margin-top:56upx;">
|
|
|
+ <view @click="getRecharge(item.recharge)">
|
|
|
+ 充值{{ item.recharge }}元 升{{ item.name }} ({{item.discount*100}}折)
|
|
|
+ <text style="margin-left:20upx;color:#3385FF;font-weight:bold;">选这个</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view v-if="rechargeWeal == 2" style="font-size:34upx;">
|
|
|
+ <view v-for="(item,index) in weal" :key="index" style="margin-top:56upx;">
|
|
|
+ <view @click="getRecharge(item.recharge)">
|
|
|
+ 充值{{ item.recharge }}元 送{{ item.give }}元
|
|
|
+ <text style="margin-left:20upx;color:#3385FF;font-weight:bold;">选这个</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
<div class="btn-wrap">
|
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
|
<button class="button-com green" @click="wexinPayFn">微信支付</button>
|
|
|
@@ -34,6 +57,7 @@ import { share } from '@/mixins'
|
|
|
import { rechargeBalance } from '@/api/recharge'
|
|
|
import { postWxCode } from '@/api/mini'
|
|
|
import { getHdInfo } from '@/api/hd'
|
|
|
+import { getMemberWeal } from '@/api/member'
|
|
|
import wangCg from "@/components/wangCg";
|
|
|
export default {
|
|
|
name: 'pay',
|
|
|
@@ -54,7 +78,10 @@ export default {
|
|
|
id:0,
|
|
|
salt:'',
|
|
|
hdInfo:[],
|
|
|
- customInfo:[]
|
|
|
+ customInfo:[],
|
|
|
+ loginComeBack:0,
|
|
|
+ rechargeWeal:0,
|
|
|
+ weal:[]
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -73,34 +100,43 @@ export default {
|
|
|
computed: {
|
|
|
...mapGetters({ loginInfo:"getLoginInfo" })
|
|
|
},
|
|
|
- onLoad(option) {
|
|
|
- // #ifdef H5
|
|
|
- this.beginInit()
|
|
|
- // #endif
|
|
|
+ onLoad(){
|
|
|
+
|
|
|
},
|
|
|
onShow(){
|
|
|
- this.beginInit()
|
|
|
+ if(this.loginComeBack == 1){
|
|
|
+ this.beginInit()
|
|
|
+ this.loginComeBack = 0
|
|
|
+ }
|
|
|
},
|
|
|
mounted(){
|
|
|
},
|
|
|
methods: {
|
|
|
+ getRecharge(amount){
|
|
|
+ this.amount = amount
|
|
|
+ },
|
|
|
loginTo() {
|
|
|
this.$util.pageTo({url:"/pages/login/index?needBack=1"})
|
|
|
},
|
|
|
- teachPayFn() {
|
|
|
- this.pageTo({ url: "/admin/ghs/teachPay"})
|
|
|
- },
|
|
|
init(){
|
|
|
this.beginInit();
|
|
|
},
|
|
|
beginInit() {
|
|
|
getHdInfo().then(res=>{
|
|
|
+ let that = this
|
|
|
if(res.code == 1){
|
|
|
- this.hdInfo = res.data.hd ? res.data.hd : []
|
|
|
- this.customInfo = res.data.custom ? res.data.custom : []
|
|
|
+ that.hdInfo = res.data.hd ? res.data.hd : []
|
|
|
+ that.customInfo = res.data.custom ? res.data.custom : []
|
|
|
+ if (!that.$util.isEmpty(that.customInfo)){
|
|
|
+ getMemberWeal().then(ret=>{
|
|
|
+ if(ret.code == 1){
|
|
|
+ that.rechargeWeal = ret.data.rechargeWeal ? ret.data.rechargeWeal : 0
|
|
|
+ that.weal = ret.data.weal ? ret.data.weal : 0
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
- this.inpFocus = true
|
|
|
},
|
|
|
toPay() {
|
|
|
if (!this.amount) {
|