|
@@ -162,7 +162,7 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="ljrz" v-if="userInfo.work_type_id <=0" @click="navto('/pages/user/model/modelrz?modelid=' + mtype + '&type=2')">
|
|
|
- 立即认证
|
|
|
+ 生成我的名片
|
|
|
</view>
|
|
|
<view class="create-model flex" v-if="!shareId && !is_yl && userInfo.work_type_id >0 && look && islook == 1">
|
|
|
<view class="price-show">
|
|
@@ -379,54 +379,74 @@
|
|
|
subShowTemplateOrder({
|
|
|
id: that.mtype,
|
|
|
pay_type: that.payType
|
|
|
- }).then(res => {
|
|
|
- let da = res.data.jsApiParameters;
|
|
|
- let data = {
|
|
|
- appId: da.appId,
|
|
|
- // #ifdef H5
|
|
|
- timestamp: da.timeStamp,
|
|
|
- // #endif
|
|
|
- // #ifdef MP
|
|
|
- timeStamp: da.timeStamp + '',
|
|
|
- // #endif
|
|
|
- nonceStr: da.nonceStr,
|
|
|
- package: da.package,
|
|
|
- signType: da.signType,
|
|
|
- paySign: da.paySign,
|
|
|
- success: function(res) {
|
|
|
- // obj.paySuccessTo();
|
|
|
- // alert('支付成功')
|
|
|
- uni.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '支付成功!',
|
|
|
- cancelText: '关闭',
|
|
|
- confirmText: '查看模板',
|
|
|
- success: res => {
|
|
|
- if (res.confirm) {
|
|
|
- uni.reLaunch({
|
|
|
- url: '/pages/user/model/model?mtype=' +
|
|
|
- that.mtype,
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- fail: () => {},
|
|
|
- complete: () => {}
|
|
|
- });
|
|
|
- console.log('支付成功')
|
|
|
- },
|
|
|
- fail: (err) => {
|
|
|
- console.log(err)
|
|
|
- // alert('支付失败')
|
|
|
- // uni.navigateTo({
|
|
|
- // url: '/pages/order/order?state=0'
|
|
|
- // });
|
|
|
- }
|
|
|
- };
|
|
|
- console.log(data, 'timeStamp')
|
|
|
- if (that.payType == 'wxpay') {
|
|
|
- console.log('到这里')
|
|
|
- wx.requestPayment(data)
|
|
|
+ }).then(res => {
|
|
|
+ if(res.data.status == 1) {
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '支付成功!',
|
|
|
+ cancelText: '关闭',
|
|
|
+ confirmText: '查看模板',
|
|
|
+ success: res => {
|
|
|
+ if (res.confirm) {
|
|
|
+ uni.reLaunch({
|
|
|
+ url: '/pages/user/model/model?mtype=' +
|
|
|
+ that.mtype,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: () => {},
|
|
|
+ complete: () => {}
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ let da = res.data.jsApiParameters;
|
|
|
+ let data = {
|
|
|
+ appId: da.appId,
|
|
|
+ // #ifdef H5
|
|
|
+ timestamp: da.timeStamp,
|
|
|
+ // #endif
|
|
|
+ // #ifdef MP
|
|
|
+ timeStamp: da.timeStamp + '',
|
|
|
+ // #endif
|
|
|
+ nonceStr: da.nonceStr,
|
|
|
+ package: da.package,
|
|
|
+ signType: da.signType,
|
|
|
+ paySign: da.paySign,
|
|
|
+ success: function(res) {
|
|
|
+ // obj.paySuccessTo();
|
|
|
+ // alert('支付成功')
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '支付成功!',
|
|
|
+ cancelText: '关闭',
|
|
|
+ confirmText: '查看模板',
|
|
|
+ success: res => {
|
|
|
+ if (res.confirm) {
|
|
|
+ uni.reLaunch({
|
|
|
+ url: '/pages/user/model/model?mtype=' +
|
|
|
+ that.mtype,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: () => {},
|
|
|
+ complete: () => {}
|
|
|
+ });
|
|
|
+ console.log('支付成功')
|
|
|
+ },
|
|
|
+ fail: (err) => {
|
|
|
+ console.log(err)
|
|
|
+ // alert('支付失败')
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: '/pages/order/order?state=0'
|
|
|
+ // });
|
|
|
+ }
|
|
|
+ };
|
|
|
+ console.log(data, 'timeStamp')
|
|
|
+ if (that.payType == 'wxpay') {
|
|
|
+ console.log('到这里')
|
|
|
+ wx.requestPayment(data)
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
// 获取模板详情
|