diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json
index 2edbecd..9cade79 100644
--- a/.hbuilderx/launch.json
+++ b/.hbuilderx/launch.json
@@ -2,20 +2,24 @@
"version" : "1.0",
"configurations" : [
{
- "app-plus" : {
- "launchtype" : "local"
- },
- "default" : {
- "launchtype" : "local"
- },
- "h5" : {
- "launchtype" : "local"
- },
- "mp-weixin" : {
- "launchtype" : "local"
- },
- "provider" : "aliyun",
- "type" : "uniCloud"
+ "app-plus" :
+ {
+ "launchtype" : "local"
+ },
+ "default" :
+ {
+ "launchtype" : "local"
+ },
+ "h5" :
+ {
+ "launchtype" : "local"
+ },
+ "mp-weixin" :
+ {
+ "launchtype" : "local"
+ },
+ "provider" : "aliyun",
+ "type" : "uniCloud"
},
{
"playground" : "custom",
diff --git a/components/payPopus/payPopus.vue b/components/payPopus/payPopus.vue
index ea06143..9c3cbab 100644
--- a/components/payPopus/payPopus.vue
+++ b/components/payPopus/payPopus.vue
@@ -3,7 +3,7 @@
购买后继续观看
-
+
+
-
+
-
+
-
+
@@ -132,6 +132,10 @@
type: Boolean,
default: true
},
+ orderId: {
+ type: Number,
+ default: null
+ },
//需要支付的金豆
payPrice: {
type: Number,
@@ -176,55 +180,61 @@
// #endif
// #ifdef APP-PLUS
if (plus.os.name.toLowerCase() === 'android') {
- this.openLists = [{
- image: '/static/images/pay/weixin.png',
- 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
- }, {
+ this.openLists = [
+ // {
+ // image: '/static/images/pay/weixin.png',
+ // 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)
}
- }
+ ];
+ 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
@@ -240,31 +250,31 @@
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
- if (ua.indexOf('micromessenger') !== -1) {
- this.openLists = [{
- image: '/static/images/pay/weixin.png',
- text: '微信',
- id: 2
- }];
- this.openWay = 2;
- } else {
+ // if (ua.indexOf('micromessenger') !== -1) {
+ // this.openLists = [{
+ // image: '/static/images/pay/weixin.png',
+ // text: '微信',
+ // id: 2
+ // }];
+ // this.openWay = 2;
+ // } else {
this.openLists = [{
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)
- }
+ // if (syPaySel === '是') {
+ // let openListsItem = {
+ // image: '/static/images/pay/shouyi.png',
+ // text: '收益余额',
+ // id: 4
+ // };
+ // this.openLists.push(openListsItem)
+ // }
// #endif
},
methods: {
@@ -562,28 +572,28 @@
// #endif
} else if (this.openWay == 1) {
+ console.log(this.orderId)
// APP支付宝支付
// #ifdef APP
- this.$Request.postT("/app/aliPay/payMoney", {
- classify: 1,
- payClassifyId: this.wallet[this.current].payClassifyId,
- }).then(ret => {
+ this.$Request.getT("/app/wuyou/payOrder/"+this.orderId, {}).then(ret => {
console.log(ret)
- this.isCheckPay(ret.code, 'alipay', ret.data);
+ // this.isCheckPay(ret.code, 'alipay', ret.data);
+ that.$emit('paySuccess', ret.data)
});
// #endif
// #ifdef H5
let data = {
- classify: 2,
- payClassifyId: this.wallet[this.current].payClassifyId,
+ orderId: this.orderId,
}
- this.$Request.postT('/app/aliPay/payMoney', data).then(
+ this.$Request.getT("/app/wuyou/payOrder/"+this.orderId, {}).then(
res => {
if (res.code === 0) {
- const div = document.createElement('div')
- div.innerHTML = res.data //此处form就是后台返回接收到的数据
- document.body.appendChild(div)
- document.forms[0].submit()
+ console.log(res)
+ that.$emit('paySuccess', res.data)
+ // const div = document.createElement('div')
+ // div.innerHTML = res.data //此处form就是后台返回接收到的数据
+ // document.body.appendChild(div)
+ // document.forms[0].submit()
} else {
uni.showToast({
icon: 'none',
@@ -601,7 +611,7 @@
this.$Request.postT("/app/ios/insertPayMoneyOrders", data).then(res => {
if (res.code === 0) {
this.iosPayId = res.data.orderId;
- this.iphonepay();
+ // this.iphonepay();
} else {
uni.showToast({
icon: 'none',
diff --git a/me/detail/detail.nvue b/me/detail/detail.nvue
index 8ea75ad..8981d84 100644
--- a/me/detail/detail.nvue
+++ b/me/detail/detail.nvue
@@ -144,15 +144,15 @@
-
+
- {{countPrice}}金币解锁单集视频
+ {{countPrice}}元解锁单集视频
- -->
-
@@ -365,7 +361,6 @@
checked: false,
payPrice: 0, //需要支付的价格
showMoney: false, //是否显示充值弹窗
- showPay: false,
dyCourseId: '',
nowBs: 1, //当前倍速
subList: [{
@@ -576,7 +571,6 @@
this.courseDetailsId = e.courseDetailsId
}
console.log(this.courseDetailsId, '跳转进来的id')
- this.getDataList(this.courseId, this.courseDetailsId);
this.getMyLoveStatus()
}
if (e.tt_album_id) {
@@ -585,7 +579,7 @@
if (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
// if (res.code == 0 && res.data) {
// this.zhengbu = res.data.value;
@@ -679,6 +673,10 @@
}
// #endif
this.isVips = uni.getStorageSync('isVips') ? uni.getStorageSync('isVips') : '否'
+ console.log(2)
+ if(this.courseId){
+ this.getDataList(this.courseId, this.courseDetailsId);
+ }
// uni.$on('back', (data) => {
// if (data.flag == true) {
@@ -1168,8 +1166,14 @@
},
//子组件支付成功的回调
- paySuccess() {
- this.payOrder(this.ordersId, this.payMoney)
+ paySuccess(data) {
+ console.log(data)
+ // data.h5Url 跳转地址
+ this.showMoney = false //显示充值弹窗
+ // this.payOrder(this.ordersId, this.payMoney)
+ // #ifdef H5
+ window.open(data.h5Url)
+ // #endif
},
//自组件关闭的回调
closeMoney(data) {
@@ -1188,7 +1192,10 @@
this.ordersId = res.data.orders.ordersId //记录订单id
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 {
uni.showToast({
title: res.msg,
diff --git a/me/detail/detailIOS.nvue b/me/detail/detailIOS.nvue
index cdda899..18b804c 100644
--- a/me/detail/detailIOS.nvue
+++ b/me/detail/detailIOS.nvue
@@ -142,23 +142,23 @@
-
+
- {{countPrice}}金豆解锁单集视频
+ {{countPrice}}元解锁单集视频
-
+
@@ -186,7 +186,7 @@
src="../../static/images/me/closeIconss.png" mode="">
-
-
+
@@ -97,9 +97,9 @@
-
+
diff --git a/uniCloud-aliyun/cloudfunctions/login/index.js b/uniCloud-aliyun/cloudfunctions/login/index.js
deleted file mode 100644
index db45eed..0000000
--- a/uniCloud-aliyun/cloudfunctions/login/index.js
+++ /dev/null
@@ -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;
-};
\ No newline at end of file