|
@@ -1,33 +1,26 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view>
|
|
<view>
|
|
|
<view class="text-center" style="margin-top: 120upx;">
|
|
<view class="text-center" style="margin-top: 120upx;">
|
|
|
- <view class="text-gray text-df padding">待支付</view>
|
|
|
|
|
|
|
+ <u-icon name="clock-fill" color="#FF9447" size="140"></u-icon>
|
|
|
|
|
+ <view class="text-gray text-df padding-20">待支付</view>
|
|
|
<view class="theme-color ">
|
|
<view class="theme-color ">
|
|
|
- <text style="font-size: 48upx;">¥</text>
|
|
|
|
|
- <text style="font-size: 72upx;">{{detail.cost}}</text>
|
|
|
|
|
|
|
+ <text style="font-size: 60upx;" class="price">{{agent.league}}</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="text-black text-lg margin-top">渠道合伙人-保证金</view>
|
|
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="container">
|
|
|
|
|
- <view style="padding: 40upx 0 30upx 30upx;font-size: 30upx;font-weight: bold;">支付方式</view>
|
|
|
|
|
- <block v-for="(item, index) in ways" :key="index">
|
|
|
|
|
- <view class="flex align-center justify-between padding" @click="change(index)">
|
|
|
|
|
- <view class="flex align-center">
|
|
|
|
|
- <image class="margin-right" :src="item.icon" style="width: 50upx;height: 50upx;"></image>
|
|
|
|
|
- <view>{{item.name}}</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view :class="current == index ? 'theme-color cuIcon-roundcheckfill' : 'cuIcon-round'" style="font-size: 40upx;"></view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </block>
|
|
|
|
|
|
|
+ <view class="container" style="padding: 20rpx 30rpx;">
|
|
|
|
|
+ <u-form :label-style="{'fontWeight':800,'fontSize':'30rpx'}" :border-bottom="false" :model="form" ref="uForm" label-width="150">
|
|
|
|
|
+ <u-form-item label="代理级别"><u-input v-model="agent.level" type="select" @click="levelsShow=true" :select-open="levelsShow"/></u-form-item>
|
|
|
|
|
+ </u-form>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<view class="bottom-bar safe-area-inset-bottom " style="margin-top: 120rpx;">
|
|
<view class="bottom-bar safe-area-inset-bottom " style="margin-top: 120rpx;">
|
|
|
<view @click="pay" class="bg-gradual-base cu-btn round" style="width: 100%;padding: 46rpx;">
|
|
<view @click="pay" class="bg-gradual-base cu-btn round" style="width: 100%;padding: 46rpx;">
|
|
|
确认支付
|
|
确认支付
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
- <u-popup v-model="successShow" mode="center" :mask-close-able="false" width="550" height="500" border-radius="30">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <u-popup v-model="successShow" mode="center" :mask-close-able="false" width="550" height="500"
|
|
|
|
|
+ border-radius="30">
|
|
|
<view class="text-center padding">
|
|
<view class="text-center padding">
|
|
|
<image src="/pagesB/static/pic_agent.png" style="width: 109upx;height: 122upx;"></image>
|
|
<image src="/pagesB/static/pic_agent.png" style="width: 109upx;height: 122upx;"></image>
|
|
|
<view style="font-size: 34upx;color: #FF9447;font-weight: bold;padding: 30upx 0 10upx 0;">恭喜您成为代理</view>
|
|
<view style="font-size: 34upx;color: #FF9447;font-weight: bold;padding: 30upx 0 10upx 0;">恭喜您成为代理</view>
|
|
@@ -37,6 +30,8 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</u-popup>
|
|
</u-popup>
|
|
|
|
|
+
|
|
|
|
|
+ <u-picker mode="selector" @confirm="levelConfirm" v-model="levelsShow" :range="levels" range-key="level" :default-selector="[0]"></u-picker>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -45,62 +40,63 @@
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
successShow: false,
|
|
successShow: false,
|
|
|
- ways: [
|
|
|
|
|
- {name: '微信支付', icon: '/pagesB/static/icon_weixin.png'}
|
|
|
|
|
- ],
|
|
|
|
|
- current: 0,
|
|
|
|
|
|
|
+ levelsShow:false,
|
|
|
|
|
+ levels: [],
|
|
|
|
|
+
|
|
|
|
|
+ agent:{},
|
|
|
|
|
|
|
|
- detail:{}
|
|
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onLoad() {
|
|
onLoad() {
|
|
|
- this.fetchDetail()
|
|
|
|
|
|
|
+ if (this.$isEmpty(this.vuex_userId)) {
|
|
|
|
|
+ this.$dialog.showModal('系统错误', false).then(res => {
|
|
|
|
|
+ uni.reLaunch({
|
|
|
|
|
+ url: "/pages/gain/gain?current=1"
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ this.fetchAgentLevelList()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- fetchDetail(){
|
|
|
|
|
- this.$api.agenterType.detail({settingKey:this.$global.agenterTypeId}).then(res=>{
|
|
|
|
|
- this.detail=JSON.parse(res.data.settingValue)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ levelConfirm(e){
|
|
|
|
|
+ this.agent=this.levels[e[0]]
|
|
|
},
|
|
},
|
|
|
- change(index) {
|
|
|
|
|
- this.current = index;
|
|
|
|
|
|
|
+ fetchAgentLevelList(){
|
|
|
|
|
+ this.$api.agenter.agentLevelList().then(res=>{
|
|
|
|
|
+ this.levels=res.data.records
|
|
|
|
|
+ this.agent=this.levels[0]
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
async pay() {
|
|
async pay() {
|
|
|
- let exTime= this.$dateTime.getExpireTime(5)
|
|
|
|
|
- let billRecord={
|
|
|
|
|
- appid:this.$global.wxParams.APPID,
|
|
|
|
|
- openid:this.$cache.get('userInfo').openId,
|
|
|
|
|
- payId:this.vuex_userId,
|
|
|
|
|
- price:this.detail.cost,
|
|
|
|
|
- channel: this.$global.paymentType.YEE_PAY,
|
|
|
|
|
- payway: this.$global.paymentScene.MINI_PROGRAM,
|
|
|
|
|
- cost:this.detail.cost,
|
|
|
|
|
- discount: 1.00,
|
|
|
|
|
- type:this.$global.orderType.AGENT_CHARGE,
|
|
|
|
|
- // payAmount:this.detail.cost,
|
|
|
|
|
- title:'渠道合伙人充值',
|
|
|
|
|
- exTime
|
|
|
|
|
|
|
+ let agentLeague={
|
|
|
|
|
+ userId:this.vuex_userId,
|
|
|
|
|
+ agentId:this.agent.id,
|
|
|
|
|
+ league:this.agent.league,
|
|
|
|
|
+ payStatus:'待付款',
|
|
|
|
|
+ appid: this.$global.wxParams.APPID,
|
|
|
|
|
+ openid: this.$cache.get('userInfo').openId,
|
|
|
}
|
|
}
|
|
|
- let resp=await this.$api.billRecord.addAgentOrder(billRecord)
|
|
|
|
|
|
|
+ let resp = await this.$api.agenter.addAgentOrder(agentLeague)
|
|
|
if (!resp.success) {
|
|
if (!resp.success) {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- let params={
|
|
|
|
|
- orderType:this.$global.orderType.AGENT_CHARGE,
|
|
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ orderType: this.$global.orderType.AGENT_CHARGE,
|
|
|
orderId: resp.data.id,
|
|
orderId: resp.data.id,
|
|
|
- payStatus:this.$global.payStatus.IS_WAIT
|
|
|
|
|
|
|
+ payStatus: this.$global.payStatus.IS_WAIT
|
|
|
}
|
|
}
|
|
|
- let res=await this.$api.pay.payOrder(params)
|
|
|
|
|
- let prePayTn= JSON.parse(res.data.prePayTn)
|
|
|
|
|
- this.$mpi.requestPayment(prePayTn).then(()=>{
|
|
|
|
|
|
|
+ let res = await this.$api.pay.payOrder(params)
|
|
|
|
|
+ let prePayTn = JSON.parse(res.data.prePayTn)
|
|
|
|
|
+ this.$mpi.requestPayment(prePayTn).then(() => {
|
|
|
this.successShow = true;
|
|
this.successShow = true;
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
confirm() {
|
|
confirm() {
|
|
|
this.successShow = false
|
|
this.successShow = false
|
|
|
- this.$u.vuex('vuex_agenter_type',this.$global.userType.CHANNEL)
|
|
|
|
|
|
|
+ this.$u.vuex('vuex_agenter_type', this.$global.userType.CHANNEL)
|
|
|
uni.reLaunch({
|
|
uni.reLaunch({
|
|
|
- url:"../../../pages/gain/gain?current=1",
|
|
|
|
|
|
|
+ url: "../../../pages/gain/gain?current=1",
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|