|
@@ -1,6 +1,14 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
<ujp-navbar title="充值"></ujp-navbar>
|
|
|
+
|
|
|
+ <view class="userBanner" v-if="selectImg">
|
|
|
+ <u-image
|
|
|
+ :mode="'scaleToFill'" height="160"
|
|
|
+ :src="selectImg.imgUrl"></u-image>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
<view class="recharge">
|
|
|
<view class="title oldTextjp" oldstyle="font-size:20px">选择充值金额</view>
|
|
|
<p class="oldTextjp2" oldstyle="font-size:16px">当前余额{{detail.balance>0?detail.balance:0}}元</p>
|
|
@@ -61,8 +69,8 @@
|
|
|
</u-modal>
|
|
|
<img id="qrcode" style="display: none;" >
|
|
|
|
|
|
- <view class="recharge-btn">
|
|
|
- <view>
|
|
|
+ <view class="recharge-btn" v-if="show2">
|
|
|
+ <view v-if="show2">
|
|
|
<u-checkbox-group>
|
|
|
<u-checkbox active-color="green" v-model="checked" shape="circle" @change="checkboxChange()"></u-checkbox>
|
|
|
</u-checkbox-group>
|
|
@@ -76,11 +84,35 @@
|
|
|
<span>立即充值</span>
|
|
|
</u-button>
|
|
|
</view>
|
|
|
+ <u-modal v-model="show1" @confirm="gotoGz"
|
|
|
+ cancel-text="暂不关注"
|
|
|
+ confirm-text="前往关注"
|
|
|
+
|
|
|
+ confirm-color="#53b56b"
|
|
|
+ :show-cancel-button="true"
|
|
|
+ ref="uModal2" :asyncClose="true"
|
|
|
+ >
|
|
|
+ <view style="padding: 15px;"
|
|
|
+
|
|
|
+ >请关注<span style=" color: #53b56b;">{{projectName}}</span>公众号,才能进行余额充值</view>
|
|
|
+ </u-modal>
|
|
|
+
|
|
|
+ <view class="recharge-btn transactionClass" v-if="!show2">
|
|
|
+
|
|
|
+
|
|
|
+ <u-button
|
|
|
+ class="success-btn"
|
|
|
+ shape="circle" type="success" @click="gotoGz">
|
|
|
+ <span>关注公众号</span>
|
|
|
+ </u-button>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import * as API_weixin from '@/apis/weixin.js'
|
|
|
+
|
|
|
import * as Pay from '@/apis/weixin.js'
|
|
|
import QRCode from 'qrcodejs2'
|
|
|
import {
|
|
@@ -93,6 +125,8 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ show1:false,
|
|
|
+ show2:false,
|
|
|
submitNum:0,
|
|
|
submitNumCk:1,
|
|
|
showModel:false,
|
|
@@ -103,6 +137,8 @@
|
|
|
moneyActiveClass: 1,
|
|
|
submitForm:{},
|
|
|
qrCodeImg:"",
|
|
|
+ bannerList:[],
|
|
|
+ selectImg:null,
|
|
|
moneyList: [
|
|
|
|
|
|
],
|
|
@@ -124,8 +160,13 @@
|
|
|
otherNum:"",
|
|
|
value1: '',
|
|
|
checked: true,
|
|
|
+ projectName:"",
|
|
|
}
|
|
|
},
|
|
|
+ onLoad() {
|
|
|
+ this.projectName=process.car.ProjectName;
|
|
|
+
|
|
|
+ },
|
|
|
onReady() {
|
|
|
if (this.carhelp.getPersonInfo()) {
|
|
|
this.userId = this.carhelp.getPersonInfo().id;
|
|
@@ -134,6 +175,34 @@
|
|
|
this.init();
|
|
|
},
|
|
|
methods: {
|
|
|
+ gotoGz(){
|
|
|
+ this.carhelp.setGzDate()
|
|
|
+ var url="https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=Mzg4Njc5ODEyMw==#wechat_redirect";
|
|
|
+ window.location.href=url
|
|
|
+
|
|
|
+ },
|
|
|
+ checkSubscribe(){
|
|
|
+ API_weixin.checkSubscribe({
|
|
|
+ openId: this.carhelp.getOpenId()
|
|
|
+ }).then((res) => {
|
|
|
+
|
|
|
+ if(res.data=="0"){
|
|
|
+ this.show1=true
|
|
|
+
|
|
|
+ }else{
|
|
|
+ //this.init();
|
|
|
+ this.show2=true;
|
|
|
+ //this.carhelp.setGzDate()
|
|
|
+ }
|
|
|
+
|
|
|
+ //setGzDate
|
|
|
+ }).catch(error => {
|
|
|
+ uni.showToast({
|
|
|
+ title: error
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
confirm(){
|
|
|
uni.redirectTo({
|
|
|
url:"/pages/user/finance/rechargeRes?id="+this.outOrderNo
|
|
@@ -200,7 +269,13 @@
|
|
|
this.selectItem = this.moneyList[0];
|
|
|
this.moneyActiveClass = this.moneyList[0].id
|
|
|
//(this.moneyActiveClass)
|
|
|
-
|
|
|
+ }
|
|
|
+ for(var i in this.moneyList){
|
|
|
+ var item =this.moneyList[i]
|
|
|
+ if(item.imgUrl){
|
|
|
+ this.selectImg=item
|
|
|
+ break
|
|
|
+ }
|
|
|
}
|
|
|
uni.hideLoading()
|
|
|
this.init1()
|
|
@@ -215,6 +290,9 @@
|
|
|
this.moneyActiveClass = index;
|
|
|
if(item){
|
|
|
this.selectItem=item;
|
|
|
+ if(item.imgUrl){
|
|
|
+ this.selectImg=item
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
// 选中某个单选框时,由radio时触发
|
|
@@ -305,6 +383,7 @@
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
+ this.checkSubscribe()
|
|
|
if (this.isReady) {
|
|
|
this.init1()
|
|
|
}
|
|
@@ -318,6 +397,9 @@
|
|
|
</style>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+ .userBanner{
|
|
|
+ margin: 16px;
|
|
|
+ }
|
|
|
/deep/.u-radio-group {
|
|
|
width: 100%;
|
|
|
}
|