[...]
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Web唐明明
|
||||
* 匆匆数载恍如梦,岁月迢迢华发增。
|
||||
@@ -6,7 +5,9 @@
|
||||
* moduleName: 会员
|
||||
*/
|
||||
|
||||
import { request } from '../index'
|
||||
import {
|
||||
request
|
||||
} from '../index'
|
||||
|
||||
// 会员身份信息
|
||||
const identities = () => {
|
||||
@@ -16,11 +17,11 @@ const identities = () => {
|
||||
}
|
||||
|
||||
// 提交开通订单
|
||||
const vipOrder = (id, data) =>{
|
||||
const vipOrder = (id, data) => {
|
||||
return request({
|
||||
url : 'user/identities/create/' + id,
|
||||
method : 'POST',
|
||||
data : data
|
||||
url: 'user/identities/create/' + id,
|
||||
method: 'POST',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -33,44 +34,44 @@ const vipWechatPay = (order_id, data) => {
|
||||
}
|
||||
|
||||
// 开通身份内容
|
||||
const vipCont = (id, data) =>{
|
||||
const vipCont = (id, data) => {
|
||||
return request({
|
||||
url : 'user/identities/create/' + id,
|
||||
data : data
|
||||
url: 'user/identities/create/' + id,
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 上传打款凭证
|
||||
const vipVoucher = (data) =>{
|
||||
const vipVoucher = (data) => {
|
||||
return request({
|
||||
url : 'user/voucher/store',
|
||||
method : 'POST',
|
||||
data : data
|
||||
url: 'user/voucher/store',
|
||||
method: 'POST',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 编辑凭证
|
||||
const vipVoucherUpdate = (id,data) =>{
|
||||
const vipVoucherUpdate = (id, data) => {
|
||||
return request({
|
||||
url : 'user/voucher/'+id+'/update',
|
||||
method : 'POST',
|
||||
data : data
|
||||
url: 'user/voucher/' + id + '/update',
|
||||
method: 'POST',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 用户协议
|
||||
const userAgree = (apiUrl) => {
|
||||
return request({
|
||||
url: apiUrl
|
||||
})
|
||||
return request({
|
||||
url: apiUrl
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
identities,
|
||||
vipOrder,
|
||||
vipWechatPay,
|
||||
vipCont,
|
||||
vipVoucher,
|
||||
userAgree,
|
||||
vipCont,
|
||||
vipVoucher,
|
||||
userAgree,
|
||||
vipVoucherUpdate
|
||||
}
|
||||
|
||||
@@ -98,7 +98,8 @@
|
||||
<block v-else>
|
||||
<view class="privilege-label" v-if="openCondition.certification"
|
||||
:class="{ active: openCondition.certification.finish }">
|
||||
{{ openCondition.certification.message }}</view>
|
||||
{{ openCondition.certification.message }}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
@@ -128,7 +129,8 @@
|
||||
:src="identitie[tabsIndex].button_cover" mode="widthFix" @click="openOrder" />
|
||||
<view class="current-btn-sh" v-if="identitie[tabsIndex].can.show_button && voucher !== ''"
|
||||
@click="openOrder">
|
||||
{{voucher.status.value === 1?'申请审核中':''}}{{voucher.status.value === 3?'申请被驳回查看原因':''}}</view>
|
||||
{{voucher.status.value === 1?'申请审核中':''}}{{voucher.status.value === 3?'申请被驳回查看原因':''}}
|
||||
</view>
|
||||
<!-- <view class="current-btn-sh" v-if="!identitie[tabsIndex].can.show_button && voucher === ''">已开通</view> -->
|
||||
<view class="ios-bottom"></view>
|
||||
</view>
|
||||
@@ -136,10 +138,23 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { identities, vipOrder, vipWechatPay, vipCont, vipVoucherUpdate, vipVoucher } from '@/apis/interfaces/vip';
|
||||
import { wxConfig } from '@/apis/interfaces/wx';
|
||||
import { getAliPayConfig } from '@/apis/interfaces/alipay'
|
||||
import { uploads } from '@/apis/interfaces/uploading';
|
||||
import {
|
||||
identities,
|
||||
vipOrder,
|
||||
vipWechatPay,
|
||||
vipCont,
|
||||
vipVoucherUpdate,
|
||||
vipVoucher
|
||||
} from '@/apis/interfaces/vip';
|
||||
import {
|
||||
wxConfig
|
||||
} from '@/apis/interfaces/wx';
|
||||
import {
|
||||
getAliPayConfig
|
||||
} from '@/apis/interfaces/alipay'
|
||||
import {
|
||||
uploads
|
||||
} from '@/apis/interfaces/uploading';
|
||||
import cashierPay from '@/public/cashierPay'
|
||||
export default {
|
||||
data() {
|
||||
@@ -237,7 +252,7 @@
|
||||
if (can.on_line) {
|
||||
uni.showActionSheet({
|
||||
itemList: ['微信支付', '支付宝支付'],
|
||||
success : res => {
|
||||
success: res => {
|
||||
this.payAppConfig(res.tapIndex)
|
||||
}
|
||||
})
|
||||
@@ -247,14 +262,14 @@
|
||||
}
|
||||
},
|
||||
// 创建订单
|
||||
payAppConfig(payType){
|
||||
payAppConfig(payType) {
|
||||
let identity = this.identitie[this.tabsIndex].identity_id
|
||||
vipOrder(identity,{
|
||||
year:1,
|
||||
}).then(res=>{
|
||||
if(payType === 0) this.wechatAppPay(res.id)
|
||||
if(payType === 1) this.aliPayConfig(res.id)
|
||||
}).catch(err=>{
|
||||
vipOrder(identity, {
|
||||
year: 1,
|
||||
}).then(res => {
|
||||
if (payType === 0) this.wechatAppPay(res.id)
|
||||
if (payType === 1) this.aliPayConfig(res.id)
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none"
|
||||
@@ -263,30 +278,30 @@
|
||||
},
|
||||
|
||||
// 支付宝支付
|
||||
aliPayConfig(orderId){
|
||||
aliPayConfig(orderId) {
|
||||
getAliPayConfig(orderId, {
|
||||
type: 'app'
|
||||
}).then(res => {
|
||||
cashierPay.pay('alipay', res.wechat).then(payRes=> {
|
||||
cashierPay.pay('alipay', res.wechat).then(payRes => {
|
||||
this.idenInfo()
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title:err.message,
|
||||
icon:"none"
|
||||
title: err.message,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
},
|
||||
// 微信支付 APP
|
||||
wechatAppPay(orderId){
|
||||
vipWechatPay(orderId,{
|
||||
wechatAppPay(orderId) {
|
||||
vipWechatPay(orderId, {
|
||||
type: 'app'
|
||||
}).then(res=>{
|
||||
}).then(res => {
|
||||
let payConfig = JSON.parse(res)
|
||||
cashierPay.pay('wxpay', payConfig).then(payRes=> {
|
||||
cashierPay.pay('wxpay', payConfig).then(payRes => {
|
||||
this.idenInfo()
|
||||
})
|
||||
}).catch(err=>{
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none"
|
||||
|
||||
1992
unpackage/dist/dev/app-plus/app-service.js
vendored
1992
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user