|
|
@@ -16,6 +16,11 @@
|
|
|
<div class="btn-wrap">
|
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
|
<button class="button-com green" @click="wexinPayFn">微信支付</button>
|
|
|
+ <div style="text-align:center;margin-top:10upx;">
|
|
|
+ <image :src="imgUrl" mode="widthFix" style="width:230upx;height:230upx;margin:0 auto;"></image>
|
|
|
+ <button @click="downloadImg()" class="button-com red" style="margin:0 auto;width:560upx;">保存二维码,用支付宝付款</button>
|
|
|
+ <div style="margin-top:30upx;font-size:26upx;" @click="teachPayFn()">不会用支付宝付款?点这里教您</div>
|
|
|
+ </div>
|
|
|
<!-- #endif -->
|
|
|
<!-- #ifdef H5 -->
|
|
|
<button class="button-com red" @click="aliPayFn">支付宝支付</button>
|
|
|
@@ -53,7 +58,8 @@
|
|
|
id:0,
|
|
|
salt:'',
|
|
|
ghsInfo:[],
|
|
|
- customInfo:[]
|
|
|
+ customInfo:[],
|
|
|
+ imgUrl:''
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -67,6 +73,25 @@
|
|
|
},
|
|
|
mounted() {},
|
|
|
methods: {
|
|
|
+ teachPayFn() {
|
|
|
+ this.pageTo({ url: "/admin/ghs/teachPay"})
|
|
|
+ },
|
|
|
+ downloadImg(){
|
|
|
+ let that = this
|
|
|
+ uni.downloadFile({
|
|
|
+ url:that.imgUrl,
|
|
|
+ success: (res) => {
|
|
|
+ if (res.statusCode === 200) {
|
|
|
+ uni.saveImageToPhotosAlbum({
|
|
|
+ filePath: res.tempFilePath,
|
|
|
+ success: function (data) {
|
|
|
+ uni.showToast({title:'下载成功'})
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
init(){
|
|
|
this.specialInit();
|
|
|
},
|
|
|
@@ -105,6 +130,7 @@
|
|
|
if (res.data && res.data.ghs && !this.$util.isEmpty(res.data.ghs)){
|
|
|
that.ghsInfo = res.data.ghs
|
|
|
that.customInfo = res.data.custom?res.data.custom:[]
|
|
|
+ that.imgUrl = res.data.imgUrl ? res.data.imgUrl : ''
|
|
|
}
|
|
|
}
|
|
|
})
|