LFPay app项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

78 lines
2.1 KiB

<template>
<view>
<!-- 跳转小程序确认框-->
<view class="text-center">
<u-modal :show="confirmShow" :title="model.title" :content="model.content" @confirm="confirmModal"
:showCancelButton="true" @cancel="confirmShow = false"></u-modal>
</view>
</view>
</template>
<script>
import storage from '@/utils/storage'
import {
ACCESS_TOKEN
} from '@/store/mutation-types'
export default {
props: {
model: {
type: Object
}
},
data() {
return {
//跳转微信参数
sweixin: {},
//模态框状态
confirmShow: false,
}
},
methods: {
openModel() {
this.confirmShow = true
},
navaModal() {
if (this.model.type == 0) {
//打开微信小程序
//#ifdef APP-PLUS
plus.share.getServices(res => {
this.sweixin = res.find(i => i.id === 'weixin')
if (this.sweixin) {
// 分享跳转到微信小程序
this.sweixin.launchMiniProgram({
id: 'gh_22e1192e702d', // 关联微信小程序的原始ID("g_"开头的字符串)
path: 'pages/tabbar/home?type=naWechat&token=' + storage.get(ACCESS_TOKEN), // 打开小程序的页面路径,不传默认跳转首页
type: 0 // 微信小程序版本类型,可取值: 0-正式版; 1-测试版; 2-体验版。 默认值为0。
}, res => {
}, err => {
})
} else {
// 没有获取到微信分享服务
}
}, err => {
// 获取分享服务列表失败
})
//#endif
} else if(this.model.type == 1) {
//余额支付
this.$emit('editOrder', 'T')
} else if(this.model.type == 2) {
//银行卡转账
this.$emit('editOrder', 'B')
} else if(this.model.type == 3){
//余额支付
this.$emit('saveSchedule', 'T')
this.confirmShow = false;
}
},
confirmModal() {
this.navaModal()
}
}
}
</script>
<style>
</style>