|
@@ -2,21 +2,32 @@
|
|
|
<div class="app-content">
|
|
<div class="app-content">
|
|
|
<div class="recharge_box">
|
|
<div class="recharge_box">
|
|
|
<view class="renew">
|
|
<view class="renew">
|
|
|
- 续费3980/年<text class="toBuy">去购买</text>
|
|
|
|
|
|
|
+ 续费{{initData.renew}}/年<text class="toBuy">去购买</text>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="voucher">
|
|
<view class="voucher">
|
|
|
- 充值<text style="color: #FF3C00;"> 5980 元</text>,免费使用一年
|
|
|
|
|
|
|
+ 充值<text style="color: #FF3C00;"> {{initData.recharge}}元 </text>,免费使用一年
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view
|
|
|
|
|
+ class="immediately"
|
|
|
|
|
+ @click="onceRecharge"
|
|
|
|
|
+ >立即充值</view>
|
|
|
|
|
+ <view class="use">本次充值仅限在<text style="color: #666;"> {{initData.shopName}} </text>门店使用</view>
|
|
|
|
|
+ <view class="use use_margin"><text style="color: #666;">{{initData.userNum}}</text> 已充值</view>
|
|
|
|
|
+ <view class="user_avator">
|
|
|
|
|
+ <image src="https://img.huaml.com/recharge/has_recharge.png"></image>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="immediately"></view>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+import { rechargeRenew, rechargeRenewPay } from '@/api/recharge'
|
|
|
|
|
+import wexinPay from "@/utils/pay/wxPay";
|
|
|
export default {
|
|
export default {
|
|
|
name: 'recharge-renew',
|
|
name: 'recharge-renew',
|
|
|
data () {
|
|
data () {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ initData: {}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onLoad () {
|
|
onLoad () {
|
|
@@ -26,8 +37,26 @@ export default {
|
|
|
this._getDet()
|
|
this._getDet()
|
|
|
},
|
|
},
|
|
|
_getDet () {
|
|
_getDet () {
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ rechargeRenew().then(res => {
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+ this.initData = res.data
|
|
|
|
|
+ }).catch(err => { console.log(err) })
|
|
|
|
|
+ },
|
|
|
|
|
+ // 立即充值
|
|
|
|
|
+ onceRecharge () {
|
|
|
|
|
+ rechargeRenewPay().then(res => {
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+ wexinPay(res.data, this.getSuccess, this.getError)
|
|
|
|
|
+ }).catch(err => { console.log(err) })
|
|
|
|
|
+ },
|
|
|
|
|
+ getSuccess () {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: '/admin/recharge/rechargeSuccess'
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ getError () {
|
|
|
|
|
+ this.$msg("支付失败!");
|
|
|
|
|
+ },
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
@@ -37,7 +66,7 @@ export default {
|
|
|
padding-top: 1px;
|
|
padding-top: 1px;
|
|
|
width: 100vw;
|
|
width: 100vw;
|
|
|
height: 100vh;
|
|
height: 100vh;
|
|
|
- background: url(https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=2687368603,3794114719&fm=26&gp=0.jpg);
|
|
|
|
|
|
|
+ background: url(https://img.huaml.com/recharge/free_renew.png);
|
|
|
background-size: 100% 100%;
|
|
background-size: 100% 100%;
|
|
|
position: relative;
|
|
position: relative;
|
|
|
.recharge_box {
|
|
.recharge_box {
|
|
@@ -77,6 +106,36 @@ export default {
|
|
|
font-weight: 700;
|
|
font-weight: 700;
|
|
|
margin-top: 70upx;
|
|
margin-top: 70upx;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
|
|
+ white-space: pre-wrap;
|
|
|
|
|
+ }
|
|
|
|
|
+ & > .immediately {
|
|
|
|
|
+ width: 520px;
|
|
|
|
|
+ height: 88px;
|
|
|
|
|
+ line-height: 88upx;
|
|
|
|
|
+ background: linear-gradient(0deg, #fe921e 0%, #ffd21f 100%);
|
|
|
|
|
+ border-radius: 44px;
|
|
|
|
|
+ margin: 40upx auto 0;
|
|
|
|
|
+ font-size: 32upx;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ }
|
|
|
|
|
+ & > .use {
|
|
|
|
|
+ color: #999999;
|
|
|
|
|
+ font-size: 26upx;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ margin-top: 20upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ & > .use_margin {
|
|
|
|
|
+ margin-top: 80upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ & > .user_avator {
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ margin-top: 20upx;
|
|
|
|
|
+ & > image {
|
|
|
|
|
+ width: 285upx;
|
|
|
|
|
+ height: 49upx;
|
|
|
|
|
+ margin: 0 auto;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|