代码合并

This commit is contained in:
YeMingfei666 2024-12-05 14:18:50 +08:00
commit 9156891770
7 changed files with 289 additions and 261 deletions

View File

@ -2,20 +2,24 @@
"version" : "1.0", "version" : "1.0",
"configurations" : [ "configurations" : [
{ {
"app-plus" : { "app-plus" :
"launchtype" : "local" {
}, "launchtype" : "local"
"default" : { },
"launchtype" : "local" "default" :
}, {
"h5" : { "launchtype" : "local"
"launchtype" : "local" },
}, "h5" :
"mp-weixin" : { {
"launchtype" : "local" "launchtype" : "local"
}, },
"provider" : "aliyun", "mp-weixin" :
"type" : "uniCloud" {
"launchtype" : "local"
},
"provider" : "aliyun",
"type" : "uniCloud"
}, },
{ {
"playground" : "custom", "playground" : "custom",

View File

@ -3,7 +3,7 @@
<u-popup v-model="shows" @close="close" :mask-close-able="false" :safe-area-inset-bottom="true" mode="bottom" <u-popup v-model="shows" @close="close" :mask-close-able="false" :safe-area-inset-bottom="true" mode="bottom"
border-radius="32" closeable> border-radius="32" closeable>
<view class="title">购买后继续观看</view> <view class="title">购买后继续观看</view>
<view class="money"> <!-- <view class="money">
<view class="money-l flex align-center"> <view class="money-l flex align-center">
账号余额: 账号余额:
<text>{{moneyNum}}金豆</text> <text>{{moneyNum}}金豆</text>
@ -15,22 +15,22 @@
解锁价格: 解锁价格:
<text>{{payPrice}}金豆</text> <text>{{payPrice}}金豆</text>
</view> </view>
</view> </view> -->
<scroll-view scroll-y="true" class="payLists"> <!-- <scroll-view scroll-y="true" class="payLists">
<view class="payList"> <view class="payList">
<view class="payList-item" @click="current = index" :class="current == index?'activePrice':''" <view class="payList-item" @click="current = index" :class="current == index?'activePrice':''"
v-for="(item,index) in wallet" :key="index"> v-for="(item,index) in wallet" :key="index"> -->
<!-- #ifdef MP-TOUTIAO --> <!-- #ifdef MP-TOUTIAO -->
<view class="payList-item-price"> <!-- <view class="payList-item-price">
{{item.payDiamond}}钻石 {{item.payDiamond}}钻石
</view> </view> -->
<!-- #endif --> <!-- #endif -->
<!-- #ifndef MP-TOUTIAO --> <!-- #ifndef MP-TOUTIAO -->
<view class="payList-item-price"> <!-- <view class="payList-item-price">
¥{{item.price}} ¥{{item.price}}
</view> </view> -->
<!-- #endif --> <!-- #endif -->
<view class="payList-item-dou"> <!-- <view class="payList-item-dou">
{{item.money}}金豆 {{item.money}}金豆
</view> </view>
<view class="payList-item-duo" v-if="item.giveMoney>0"> <view class="payList-item-duo" v-if="item.giveMoney>0">
@ -41,7 +41,7 @@
</view> </view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view> -->
<!-- 支付类型 --> <!-- 支付类型 -->
<view class="payType"> <view class="payType">
<view class="payType-item" @tap='selectWay(item)' v-for="(item,index) in openLists" :key="index"> <view class="payType-item" @tap='selectWay(item)' v-for="(item,index) in openLists" :key="index">
@ -132,6 +132,10 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
orderId: {
type: Number,
default: null
},
// //
payPrice: { payPrice: {
type: Number, type: Number,
@ -176,55 +180,61 @@
// #endif // #endif
// #ifdef APP-PLUS // #ifdef APP-PLUS
if (plus.os.name.toLowerCase() === 'android') { if (plus.os.name.toLowerCase() === 'android') {
this.openLists = [{ this.openLists = [
image: '/static/images/pay/weixin.png', // {
text: '微信', // image: '/static/images/pay/weixin.png',
id: 2 // text: '',
}, { // id: 2
image: '/static/images/pay/zhifubao.png', // },
text: '支付宝', {
id: 1
}];
this.openWay = 2;
let syPaySel = this.$queue.getData('syPaySel')
if (syPaySel === '是') {
let openListsItem = {
image: '/static/images/pay/shouyi.png',
text: '收益余额',
id: 4
};
this.openLists.push(openListsItem)
}
} else {
let checkIosPay = this.$queue.getData('checkIosPay');
if (checkIosPay === '是') {
this.openLists = [{
image: '/static/images/pay/weixin.png',
text: '苹果',
id: 3
}];
this.openWay = 3;
} else {
this.openLists = [{
image: '/static/images/pay/weixin.png',
text: '微信',
id: 2
}, {
image: '/static/images/pay/zhifubao.png', image: '/static/images/pay/zhifubao.png',
text: '支付宝', text: '支付宝',
id: 1 id: 1
}];
this.openWay = 2;
let syPaySel = this.$queue.getData('syPaySel')
if (syPaySel === '是') {
let openListsItem = {
image: '/static/images/pay/shouyi.png',
text: '收益余额',
id: 4
};
this.openLists.push(openListsItem)
} }
} ];
this.openWay = 1;
let syPaySel = this.$queue.getData('syPaySel')
// if (syPaySel === '') {
// let openListsItem = {
// image: '/static/images/pay/shouyi.png',
// text: '',
// id: 4
// };
// this.openLists.push(openListsItem)
// }
} else {
let checkIosPay = this.$queue.getData('checkIosPay');
// if (checkIosPay === '') {
// this.openLists = [{
// image: '/static/images/pay/weixin.png',
// text: '',
// id: 3
// }];
// this.openWay = 3;
// } else {
this.openLists = [
// {
// image: '/static/images/pay/weixin.png',
// text: '',
// id: 2
// },
{
image: '/static/images/pay/zhifubao.png',
text: '支付宝',
id: 1
}
];
this.openWay = 1;
let syPaySel = this.$queue.getData('syPaySel')
// if (syPaySel === '') {
// let openListsItem = {
// image: '/static/images/pay/shouyi.png',
// text: '',
// id: 4
// };
// this.openLists.push(openListsItem)
// }
// }
} }
// #endif // #endif
@ -240,31 +250,31 @@
// #ifdef H5 // #ifdef H5
let ua = navigator.userAgent.toLowerCase(); let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') !== -1) { // if (ua.indexOf('micromessenger') !== -1) {
this.openLists = [{ // this.openLists = [{
image: '/static/images/pay/weixin.png', // image: '/static/images/pay/weixin.png',
text: '微信', // text: '',
id: 2 // id: 2
}]; // }];
this.openWay = 2; // this.openWay = 2;
} else { // } else {
this.openLists = [{ this.openLists = [{
image: '/static/images/pay/zhifubao.png', image: '/static/images/pay/zhifubao.png',
text: '支付宝', text: '支付宝',
id: 1 id: 1
}]; }];
this.openWay = 1; this.openWay = 1;
} // }
let syPaySel = this.$queue.getData('syPaySel') let syPaySel = this.$queue.getData('syPaySel')
if (syPaySel === '是') { // if (syPaySel === '') {
let openListsItem = { // let openListsItem = {
image: '/static/images/pay/shouyi.png', // image: '/static/images/pay/shouyi.png',
text: '收益余额', // text: '',
id: 4 // id: 4
}; // };
this.openLists.push(openListsItem) // this.openLists.push(openListsItem)
} // }
// #endif // #endif
}, },
methods: { methods: {
@ -562,28 +572,28 @@
// #endif // #endif
} else if (this.openWay == 1) { } else if (this.openWay == 1) {
console.log(this.orderId)
// APP // APP
// #ifdef APP // #ifdef APP
this.$Request.postT("/app/aliPay/payMoney", { this.$Request.getT("/app/wuyou/payOrder/"+this.orderId, {}).then(ret => {
classify: 1,
payClassifyId: this.wallet[this.current].payClassifyId,
}).then(ret => {
console.log(ret) console.log(ret)
this.isCheckPay(ret.code, 'alipay', ret.data); // this.isCheckPay(ret.code, 'alipay', ret.data);
that.$emit('paySuccess', ret.data)
}); });
// #endif // #endif
// #ifdef H5 // #ifdef H5
let data = { let data = {
classify: 2, orderId: this.orderId,
payClassifyId: this.wallet[this.current].payClassifyId,
} }
this.$Request.postT('/app/aliPay/payMoney', data).then( this.$Request.getT("/app/wuyou/payOrder/"+this.orderId, {}).then(
res => { res => {
if (res.code === 0) { if (res.code === 0) {
const div = document.createElement('div') console.log(res)
div.innerHTML = res.data //form that.$emit('paySuccess', res.data)
document.body.appendChild(div) // const div = document.createElement('div')
document.forms[0].submit() // div.innerHTML = res.data //form
// document.body.appendChild(div)
// document.forms[0].submit()
} else { } else {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
@ -601,7 +611,7 @@
this.$Request.postT("/app/ios/insertPayMoneyOrders", data).then(res => { this.$Request.postT("/app/ios/insertPayMoneyOrders", data).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.iosPayId = res.data.orderId; this.iosPayId = res.data.orderId;
this.iphonepay(); // this.iphonepay();
} else { } else {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',

View File

@ -144,15 +144,15 @@
</view> </view>
</view> </view>
<view class="pay-content"> <view class="pay-content">
<view class="pay-content-item" @click="payVideo(1)" v-if="zhengbu === '是'"> <!-- <view class="pay-content-item" @click="payVideo(1)" v-if="zhengbu === '是'">
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image> <image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
<text class="pay-content-items"> <text class="pay-content-items">
{{zongPrice}}金币解锁整部视频 {{zongPrice}}金币解锁整部视频
</text> </text>
</view> </view> -->
<view class="pay-content-item" @click="payVideo(2)" v-if="danbu === '是'"> <view class="pay-content-item" @click="payVideo(2)" v-if="danbu === '是'">
<text class="pay-content-items"> <text class="pay-content-items">
{{countPrice}}金币解锁单集视频 {{countPrice}}解锁单集视频
</text> </text>
</view> </view>
<!-- <view class="pay-content-item" @click="goNav('/pages/me/vip/index')" v-if="isVips == '是'"> <!-- <view class="pay-content-item" @click="goNav('/pages/me/vip/index')" v-if="isVips == '是'">
@ -190,7 +190,7 @@
src="../../static/images/me/closeIconss.png" mode=""></image> src="../../static/images/me/closeIconss.png" mode=""></image>
</view> </view>
<!-- 余额 --> <!-- 余额 -->
<view class="popuppay-money"> <!-- <view class="popuppay-money">
<view class="popuppay-money-l"> <view class="popuppay-money-l">
<text class="popuppay-money-l-ye"> <text class="popuppay-money-l-ye">
账号余额: 账号余额:
@ -210,9 +210,9 @@
{{payPrice}}金币 {{payPrice}}金币
</text> </text>
</view> </view>
</view> </view> -->
<!-- 充值类型列表 --> <!-- 充值类型列表 -->
<scroll-view scroll-y="true" class="payLists"> <!-- <scroll-view scroll-y="true" class="payLists">
<view class="popuppay-payList"> <view class="popuppay-payList">
<view class="payList-item" @click="wallCurr = index" :class="wallCurr == index?'activePrice':''" <view class="payList-item" @click="wallCurr = index" :class="wallCurr == index?'activePrice':''"
v-for="(item,index) in wallet" :key="index"> v-for="(item,index) in wallet" :key="index">
@ -239,7 +239,7 @@
</view> </view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view> -->
<!-- 支付类型 --> <!-- 支付类型 -->
<view class="payType"> <view class="payType">
<view class="payType-item" @tap='selectWay(item)' v-for="(item,index) in openLists" :key="index"> <view class="payType-item" @tap='selectWay(item)' v-for="(item,index) in openLists" :key="index">
@ -449,25 +449,28 @@
this.moneyTips = uni.getStorageSync('moneyTips') this.moneyTips = uni.getStorageSync('moneyTips')
// #ifdef APP-PLUS // #ifdef APP-PLUS
if (plus.os.name.toLowerCase() === 'android') { if (plus.os.name.toLowerCase() === 'android') {
this.openLists = [{ this.openLists = [
image: '/static/images/pay/weixin.png', // {
text: '微信', // image: '/static/images/pay/weixin.png',
id: 2 // text: '微信',
}, { // id: 2
image: '/static/images/pay/zhifubao.png', // },
text: '支付宝', {
id: 1 image: '/static/images/pay/zhifubao.png',
}]; text: '支付宝',
this.openWay = 2; id: 1
},
];
this.openWay = 1;
let syPaySel = uni.getStorageSync('syPaySel') let syPaySel = uni.getStorageSync('syPaySel')
if (syPaySel === '是') { // if (syPaySel === '是') {
let openListsItem = { // let openListsItem = {
image: '/static/images/pay/shouyi.png', // image: '/static/images/pay/shouyi.png',
text: '收益余额', // text: '收益余额',
id: 4 // id: 4
}; // };
this.openLists.push(openListsItem) // this.openLists.push(openListsItem)
} // }
} else { } else {
let checkIosPay = uni.getStorageSync('checkIosPay'); let checkIosPay = uni.getStorageSync('checkIosPay');
if (checkIosPay === '是') { if (checkIosPay === '是') {
@ -478,29 +481,38 @@
}]; }];
this.openWay = 3; this.openWay = 3;
} else { } else {
this.openLists = [{ this.openLists = [
image: '/static/images/pay/weixin.png', // {
text: '微信', // image: '/static/images/pay/weixin.png',
id: 2 // text: '微信',
}, { // id: 2
image: '/static/images/pay/zhifubao.png', // },
text: '支付宝', {
id: 1 image: '/static/images/pay/zhifubao.png',
}]; text: '支付宝',
this.openWay = 2; id: 1
},
];
this.openWay = 1;
let syPaySel = uni.getStorageSync('syPaySel') let syPaySel = uni.getStorageSync('syPaySel')
if (syPaySel === '是') { // if (syPaySel === '是') {
let openListsItem = { // let openListsItem = {
image: '/static/images/pay/shouyi.png', // image: '/static/images/pay/shouyi.png',
text: '收益余额', // text: '收益余额',
id: 4 // id: 4
}; // };
this.openLists.push(openListsItem) // this.openLists.push(openListsItem)
} // }
} }
} }
// #endif // #endif
this.$nextTick(()=>{
this.closePopusPay()
})
if(this.courseId){
this.getDataList(this.courseId, this.courseDetailsId);
}
}, },
onLoad(e) { onLoad(e) {
//是开启整部购买 //是开启整部购买
@ -528,7 +540,6 @@
if (e.courseDetailsId && e.courseDetailsId != 'null') { if (e.courseDetailsId && e.courseDetailsId != 'null') {
this.courseDetailsId = e.courseDetailsId this.courseDetailsId = e.courseDetailsId
} }
this.getDataList(this.courseId, this.courseDetailsId);
this.getMyLoveStatus() this.getMyLoveStatus()
this.getMoneyList() this.getMoneyList()
this.getMyMoney() this.getMyMoney()
@ -698,15 +709,12 @@
payClassifyId: this.wallet[this.wallCurr].payClassifyId, payClassifyId: this.wallet[this.wallCurr].payClassifyId,
}).then(ret => { }).then(ret => {
this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data)); this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
}); })
} else if (this.openWay == 1) { } else if (this.openWay == 1) {
// APP支付宝支付 // APP支付宝支付
httpsRequest.postT("/app/aliPay/payMoney", { httpsRequest.getT("/app/wuyou/payOrder/"+this.ordersId, {}).then(ret => {
classify: 1, plus.runtime.openURL(ret.data.h5Url)
payClassifyId: this.wallet[this.wallCurr].payClassifyId, // this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
}).then(ret => {
console.log(ret)
this.isCheckPay(ret.code, 'alipay', ret.data);
}); });
} else if (this.openWay == 3) { } else if (this.openWay == 3) {
let userId = uni.getStorageSync('userId'); let userId = uni.getStorageSync('userId');
@ -931,7 +939,11 @@
if (res.code == 0) { if (res.code == 0) {
this.ordersId = res.data.orders.ordersId //记录订单id this.ordersId = res.data.orders.ordersId //记录订单id
this.payMoney = res.data.orders.payMoney //记录订单价格 this.payMoney = res.data.orders.payMoney //记录订单价格
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
this.closePay() //关闭购买选择弹窗
this.payPrice = res.data.orders.payMoney //需要支付的价格
this.openPopusPay() //显示充值弹窗
// this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,

View File

@ -194,36 +194,32 @@
<!-- <u-icon name="lock" class="list-title-icon" color="#efbb6b" size="40"></u-icon> --> <!-- <u-icon name="lock" class="list-title-icon" color="#efbb6b" size="40"></u-icon> -->
当前视频 没有播放权限 当前视频 没有播放权限
</view> </view>
<view class="list-item" v-if="zhengbu === '是' && isWxIosPay == true"> <!-- <view class="list-item" v-if="zhengbu === '是' && isWxIosPay == true">
<view class="list-item-box flex align-center justify-center" @click="payVideo(1)"> <view class="list-item-box flex align-center justify-center" @click="payVideo(1)">
<image src="../../static/images/me/rmIcon.png" mode=""></image> <image src="../../static/images/me/rmIcon.png" mode=""></image>
{{zongPrice}}金豆解锁整部视频 {{zongPrice}}金豆解锁整部视频
<!-- #ifdef MP-TOUTIAO || MP-WEIXIN--> #ifdef MP-TOUTIAO || MP-WEIXIN-->
(解锁后永久有效) <!-- (解锁后永久有效) -->
<!-- #endif --> <!-- #endif
</view> </view>
</view> </view> -->
<view class="list-item" v-if="danbu === '是' && isWxIosPay == true"> <view class="list-item" v-if="danbu === '是' && isWxIosPay == true">
<view class="list-item-box" @click="payVideo(2)"> <view class="list-item-box" @click="payVideo(2)">
{{countPrice}}金豆解锁单集视频 {{countPrice}}解锁单集视频
<!-- #ifdef MP-TOUTIAO || MP-WEIXIN--> <!-- #ifdef MP-TOUTIAO || MP-WEIXIN-->
(解锁后永久有效) (解锁后永久有效)
<!-- #endif --> <!-- #endif -->
</view> </view>
</view> </view>
<template v-if="false"> <!-- <view class="list-item" v-if="isVips == '是' && isWxIosPay == true">
<view class="list-item" v-if="isVips == '是' && isWxIosPay == true"> <view class="list-item-box flex align-center justify-center" @click="goNav('/pages/me/vip/index')">
<view class="list-item-box flex align-center justify-center" @click="goNav('/pages/me/vip/index')"> <image src="../../static/images/me/rmIcon.png" mode=""></image>
<image src="../../static/images/me/rmIcon.png" mode=""></image> 开通会员
开通会员 #ifdef MP-TOUTIAO || MP-WEIXIN-->
<!-- #ifdef MP-TOUTIAO || MP-WEIXIN--> <!-- (会员期内免费观看) -->
(会员期内免费观看) <!-- #endif
<!-- #endif -->
</view>
</view> </view>
</template> </view> -->
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<view class="list-item" v-if="isGuanggao == '是'&& adUnitId && advertising"> <view class="list-item" v-if="isGuanggao == '是'&& adUnitId && advertising">
<view class="list-item-box" @click="openVideoAd()"> <view class="list-item-box" @click="openVideoAd()">
@ -263,7 +259,7 @@
</u-popup> --> </u-popup> -->
<!-- 充值购买弹窗 --> <!-- 充值购买弹窗 -->
<payPopus v-if="showMoney" :payPrice="payPrice" :show="showMoney" @closeMoney="closeMoney" <payPopus v-if="showMoney" :payPrice="payPrice" :orderId="ordersId" :show="showMoney" @closeMoney="closeMoney"
@paySuccess="paySuccess" /> @paySuccess="paySuccess" />
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
@ -365,7 +361,6 @@
checked: false, checked: false,
payPrice: 0, // payPrice: 0, //
showMoney: false, // showMoney: false, //
showPay: false,
dyCourseId: '', dyCourseId: '',
nowBs: 1, // nowBs: 1, //
subList: [{ subList: [{
@ -576,7 +571,6 @@
this.courseDetailsId = e.courseDetailsId this.courseDetailsId = e.courseDetailsId
} }
console.log(this.courseDetailsId, '跳转进来的id') console.log(this.courseDetailsId, '跳转进来的id')
this.getDataList(this.courseId, this.courseDetailsId);
this.getMyLoveStatus() this.getMyLoveStatus()
} }
if (e.tt_album_id) { if (e.tt_album_id) {
@ -585,7 +579,7 @@
if (e.tt_episode_id) { if (e.tt_episode_id) {
this.tt_episode_id = e.tt_episode_id this.tt_episode_id = e.tt_episode_id
} }
console.log(1)
// this.$u.get('/app/common/type/817').then(res => { // 817 // this.$u.get('/app/common/type/817').then(res => { // 817
// if (res.code == 0 && res.data) { // if (res.code == 0 && res.data) {
// this.zhengbu = res.data.value; // this.zhengbu = res.data.value;
@ -679,6 +673,10 @@
} }
// #endif // #endif
this.isVips = uni.getStorageSync('isVips') ? uni.getStorageSync('isVips') : '否' this.isVips = uni.getStorageSync('isVips') ? uni.getStorageSync('isVips') : '否'
console.log(2)
if(this.courseId){
this.getDataList(this.courseId, this.courseDetailsId);
}
// uni.$on('back', (data) => { // uni.$on('back', (data) => {
// if (data.flag == true) { // if (data.flag == true) {
@ -1168,8 +1166,14 @@
}, },
// //
paySuccess() { paySuccess(data) {
this.payOrder(this.ordersId, this.payMoney) console.log(data)
// data.h5Url
this.showMoney = false //
// this.payOrder(this.ordersId, this.payMoney)
// #ifdef H5
window.open(data.h5Url)
// #endif
}, },
// //
closeMoney(data) { closeMoney(data) {
@ -1188,7 +1192,10 @@
this.ordersId = res.data.orders.ordersId //id this.ordersId = res.data.orders.ordersId //id
this.payMoney = res.data.orders.payMoney // this.payMoney = res.data.orders.payMoney //
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney) this.showPay = false //
this.payPrice = res.data.orders.payMoney //
this.showMoney = true //
// this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,

View File

@ -142,23 +142,23 @@
</view> </view>
</view> </view>
<view class="pay-content"> <view class="pay-content">
<view class="pay-content-item" @click="payVideo(1)" v-if="zhengbu === '是'"> <!-- <view class="pay-content-item" @click="payVideo(1)" v-if="zhengbu === '是'">
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image> <image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
<text class="pay-content-items"> <text class="pay-content-items">
{{zongPrice}}金豆解锁整部视频 {{zongPrice}}金豆解锁整部视频
</text> </text>
</view> </view> -->
<view class="pay-content-item" @click="payVideo(2)" v-if="danbu === '是'"> <view class="pay-content-item" @click="payVideo(2)" v-if="danbu === '是'">
<text class="pay-content-items"> <text class="pay-content-items">
{{countPrice}}金豆解锁单集视频 {{countPrice}}解锁单集视频
</text> </text>
</view> </view>
<view class="pay-content-item" @click="goNav('/pages/me/vip/index')" v-if="isVips == '是'"> <!-- <view class="pay-content-item" @click="goNav('/pages/me/vip/index')" v-if="isVips == '是'">
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image> <image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
<text class="pay-content-items"> <text class="pay-content-items">
开通会员 开通会员
</text> </text>
</view> </view> -->
</view> </view>
</view> </view>
@ -186,7 +186,7 @@
src="../../static/images/me/closeIconss.png" mode=""></image> src="../../static/images/me/closeIconss.png" mode=""></image>
</view> </view>
<!-- 余额 --> <!-- 余额 -->
<view class="popuppay-money"> <!-- <view class="popuppay-money">
<view class="popuppay-money-l"> <view class="popuppay-money-l">
<text class="popuppay-money-l-ye"> <text class="popuppay-money-l-ye">
账号余额: 账号余额:
@ -206,9 +206,9 @@
{{payPrice}}金豆 {{payPrice}}金豆
</text> </text>
</view> </view>
</view> </view> -->
<!-- 充值类型列表 --> <!-- 充值类型列表 -->
<scroll-view scroll-y="true" class="payLists"> <!-- <scroll-view scroll-y="true" class="payLists">
<view class="popuppay-payList"> <view class="popuppay-payList">
<view class="payList-item" @click="wallCurr = index" :class="wallCurr == index?'activePrice':''" <view class="payList-item" @click="wallCurr = index" :class="wallCurr == index?'activePrice':''"
v-for="(item,index) in wallet" :key="index"> v-for="(item,index) in wallet" :key="index">
@ -235,7 +235,7 @@
</view> </view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view> -->
<!-- 支付类型 --> <!-- 支付类型 -->
<view class="payType"> <view class="payType">
<view class="payType-item" @tap='selectWay(item)' v-for="(item,index) in openLists" :key="index"> <view class="payType-item" @tap='selectWay(item)' v-for="(item,index) in openLists" :key="index">
@ -396,58 +396,71 @@
this.moneyTips = uni.getStorageSync('moneyTips') this.moneyTips = uni.getStorageSync('moneyTips')
// #ifdef APP-PLUS // #ifdef APP-PLUS
if (plus.os.name.toLowerCase() === 'android') { if (plus.os.name.toLowerCase() === 'android') {
this.openLists = [{ this.openLists = [
image: '/static/images/pay/weixin.png', // {
text: '微信', // image: '/static/images/pay/weixin.png',
id: 2 // text: '微信',
}, { // id: 2
image: '/static/images/pay/zhifubao.png', // },
text: '支付宝', {
id: 1
}];
this.openWay = 2;
let syPaySel = uni.getStorageSync('syPaySel')
if (syPaySel === '是') {
let openListsItem = {
image: '/static/images/pay/shouyi.png',
text: '收益余额',
id: 4
};
this.openLists.push(openListsItem)
}
} else {
let checkIosPay = uni.getStorageSync('checkIosPay');
if (checkIosPay === '是') {
this.openLists = [{
image: '/static/images/pay/weixin.png',
text: '苹果',
id: 3
}];
this.openWay = 3;
} else {
this.openLists = [{
image: '/static/images/pay/weixin.png',
text: '微信',
id: 2
}, {
image: '/static/images/pay/zhifubao.png', image: '/static/images/pay/zhifubao.png',
text: '支付宝', text: '支付宝',
id: 1 id: 1
}]; },
this.openWay = 2; ];
this.openWay = 1;
let syPaySel = uni.getStorageSync('syPaySel')
// if (syPaySel === '是') {
// let openListsItem = {
// image: '/static/images/pay/shouyi.png',
// text: '收益余额',
// id: 4
// };
// this.openLists.push(openListsItem)
// }
} else {
let checkIosPay = uni.getStorageSync('checkIosPay');
// if (checkIosPay === '是') {
// this.openLists = [{
// image: '/static/images/pay/weixin.png',
// text: '苹果',
// id: 3
// }];
// this.openWay = 3;
// } else {
this.openLists = [
// {
// image: '/static/images/pay/weixin.png',
// text: '微信',
// id: 2
// },
{
image: '/static/images/pay/zhifubao.png',
text: '支付宝',
id: 1
},
];
this.openWay = 1;
let syPaySel = uni.getStorageSync('syPaySel') let syPaySel = uni.getStorageSync('syPaySel')
if (syPaySel === '是') { // if (syPaySel === '是') {
let openListsItem = { // let openListsItem = {
image: '/static/images/pay/shouyi.png', // image: '/static/images/pay/shouyi.png',
text: '收益余额', // text: '收益余额',
id: 4 // id: 4
}; // };
this.openLists.push(openListsItem) // this.openLists.push(openListsItem)
} // }
} // }
} }
// #endif // #endif
this.$nextTick(()=>{
this.closePopusPay()
})
if(this.courseId){
this.getDataList(this.courseId, this.courseDetailsId);
}
}, },
onLoad(e) { onLoad(e) {
let that = this let that = this
@ -472,7 +485,6 @@
if (e.courseDetailsId) { if (e.courseDetailsId) {
this.courseDetailsId = e.courseDetailsId; this.courseDetailsId = e.courseDetailsId;
} }
this.getDataList(this.courseId, this.courseDetailsId);
this.getMyLoveStatus() this.getMyLoveStatus()
this.getMoneyList() this.getMoneyList()
this.getMyMoney() this.getMyMoney()
@ -621,12 +633,9 @@
}); });
} else if (this.openWay == 1) { } else if (this.openWay == 1) {
// APP支付宝支付 // APP支付宝支付
httpsRequest.postT("/app/aliPay/payMoney", { httpsRequest.getT("/app/wuyou/payOrder/"+this.ordersId, {}).then(ret => {
classify: 1, plus.runtime.openURL(ret.data.h5Url)
payClassifyId: this.wallet[this.wallCurr].payClassifyId, // this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
}).then(ret => {
console.log(ret)
this.isCheckPay(ret.code, 'alipay', ret.data);
}); });
} else if (this.openWay == 3) { } else if (this.openWay == 3) {
let userId = uni.getStorageSync('userId'); let userId = uni.getStorageSync('userId');
@ -868,7 +877,12 @@
if (res.code == 0) { if (res.code == 0) {
this.ordersId = res.data.orders.ordersId //记录订单id this.ordersId = res.data.orders.ordersId //记录订单id
this.payMoney = res.data.orders.payMoney //记录订单价格 this.payMoney = res.data.orders.payMoney //记录订单价格
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
this.closePay() //关闭购买选择弹窗
this.payPrice = res.data.orders.payMoney //需要支付的价格
this.openPopusPay() //显示充值弹窗
// this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,

View File

@ -55,7 +55,7 @@
</view> </view>
</view> </view>
</view> </view>
<view v-if="isVips == '是' && isWxIosPay == true" class="vip flex align-center justify-center"> <!-- <view v-if="isVips == '是' && isWxIosPay == true" class="vip flex align-center justify-center">
<view class="vip-box flex align-center justify-between"> <view class="vip-box flex align-center justify-between">
<view class="vip-box-l"> <view class="vip-box-l">
<view class="vip-box-l-l flex align-center"> <view class="vip-box-l-l flex align-center">
@ -75,7 +75,7 @@
立即开通 立即开通
</view> </view>
</view> </view>
</view> </view> -->
<!-- 钱包 --> <!-- 钱包 -->
<view class="money flex align-center justify-center" v-if="isWxIosPay == true"> <view class="money flex align-center justify-center" v-if="isWxIosPay == true">
<view class="money-box flex align-center justify-between"> <view class="money-box flex align-center justify-between">
@ -97,9 +97,9 @@
</block> </block>
</view> </view>
</view> </view>
<view class="money-box-btn" @click="goNav('/me/wallet/wallet')"> <!-- <view class="money-box-btn" @click="goNav('/me/wallet/wallet')">
立即充值 立即充值
</view> </view> -->
</view> </view>
</view> </view>
<!-- 常用工具 --> <!-- 常用工具 -->

View File

@ -1,19 +0,0 @@
'use strict';
const db = uniCloud.database()
exports.main = async (event, context) => {
const res = await uniCloud.getPhoneNumber({
appid: '__UNI__E0B05B1', // 替换成自己开通一键登录的应用的DCloud appid使用callFunction方式调用时可以不传会自动取当前客户端的appid如果使用云函数URL化的方式访问必须传此参数
provider: 'univerify',
apiKey: '999f511095b875f4e1ac9eb495e4d208', // 在开发者中心开通服务并获取apiKey
apiSecret: 'd81d7c58aa11848c687c0970f615c5dc', // 在开发者中心开通服务并获取apiSecret
access_token: event.access_token,
openid: event.openid
});
console.log(res); // res里的数据格式 { code: 0, success: true, phoneNumber: '186*****078' }
// 执行入库等操作,正常情况下不要把完整手机号返回给前端
return res;
};