|
@ -21,15 +21,15 @@ |
|
|
<view class="card"> |
|
|
<view class="card"> |
|
|
<view class="pay"> |
|
|
<view class="pay"> |
|
|
<!-- <view class="h2">选择支付方式</view> --> |
|
|
<!-- <view class="h2">选择支付方式</view> --> |
|
|
<view class="row border"> |
|
|
|
|
|
|
|
|
<!-- <view class="row border"> |
|
|
<view class="wxIcon"> |
|
|
<view class="wxIcon"> |
|
|
<image src="@/static/images/carIcon/xfbIcon.png" mode=""></image> |
|
|
<image src="@/static/images/carIcon/xfbIcon.png" mode=""></image> |
|
|
</view> |
|
|
</view> |
|
|
<view class="text">支付宝</view> |
|
|
<view class="text">支付宝</view> |
|
|
<view class="icon"> |
|
|
<view class="icon"> |
|
|
<!-- <image src="@/static/images/index/noSelect.png.png" mode=""></image> --> |
|
|
|
|
|
<image src="@/static/images/carIcon/isSelect.png" mode=""></image> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- <image src="@/static/images/index/noSelect.png" mode=""></image> --> |
|
|
|
|
|
<!-- <image src="@/static/images/carIcon/isSelect.png" mode=""></image> |
|
|
|
|
|
</view> --> |
|
|
</view> |
|
|
</view> |
|
|
<view class="row"> |
|
|
<view class="row"> |
|
|
<view class="wxIcon"> |
|
|
<view class="wxIcon"> |
|
@ -37,7 +37,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class="text">微信</view> |
|
|
<view class="text">微信</view> |
|
|
<view class="icon"> |
|
|
<view class="icon"> |
|
|
<!-- <image src="@/static/images/index/noSelect.png.png" mode=""></image> --> |
|
|
|
|
|
|
|
|
<!-- <image src="@/static/images/index/noSelect.png" mode=""></image> --> |
|
|
<image src="@/static/images/carIcon/isSelect.png" mode=""></image> |
|
|
<image src="@/static/images/carIcon/isSelect.png" mode=""></image> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -63,8 +63,34 @@ |
|
|
this.trainingApplyId = options.trainingApplyId |
|
|
this.trainingApplyId = options.trainingApplyId |
|
|
} |
|
|
} |
|
|
this.getStudentByPayment() |
|
|
this.getStudentByPayment() |
|
|
|
|
|
this.initWx() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
initWx() { |
|
|
|
|
|
// #ifdef APP-PLUS |
|
|
|
|
|
plus.share.getServices((s) => { |
|
|
|
|
|
var shares = {}; |
|
|
|
|
|
for (var i = 0; i < s.length; i++) { |
|
|
|
|
|
var t = s[i]; |
|
|
|
|
|
console.log("...........", t); |
|
|
|
|
|
shares[t.id] = t; |
|
|
|
|
|
} |
|
|
|
|
|
var sweixin = shares['weixin']; |
|
|
|
|
|
this.sweixin = sweixin |
|
|
|
|
|
}, function(e) { |
|
|
|
|
|
console.log("获取分享服务列表失败:" + e.message); |
|
|
|
|
|
}); |
|
|
|
|
|
// #endif |
|
|
|
|
|
}, |
|
|
|
|
|
wxPay() { |
|
|
|
|
|
// #ifdef APP-PLUS |
|
|
|
|
|
this.sweixin ? this.sweixin.launchMiniProgram({ |
|
|
|
|
|
path: '/pages/payment/payment?tokenCode=' + this.payInfo.tokenCode, //跳转小程序页面路径 pages/index/index |
|
|
|
|
|
type: 0, //可取值: 0-正式版; 1-测试版; 2-体验版。 默认值为0。 |
|
|
|
|
|
id: 'gh_012fd4bda1c2' //小程序的原始id |
|
|
|
|
|
}) : plus.nativeUI.alert('当前环境不支持微信操作!'); |
|
|
|
|
|
// #endif |
|
|
|
|
|
}, |
|
|
async getStudentByPayment() { |
|
|
async getStudentByPayment() { |
|
|
const {data: res} = await getStudentByPayment({trainingApplyId: this.trainingApplyId}) |
|
|
const {data: res} = await getStudentByPayment({trainingApplyId: this.trainingApplyId}) |
|
|
this.$store.dispatch('getUserInfo') |
|
|
this.$store.dispatch('getUserInfo') |
|
|