Commit dcb1b5a7 by sunerhu

1.修复分享重复登录--待测试

2.修复销售课程--分享课程订单详情type != drop
parent db386184
...@@ -165,7 +165,6 @@ ...@@ -165,7 +165,6 @@
shareCode: null, shareCode: null,
sharelogin: false, sharelogin: false,
startTime:'', startTime:'',
}; };
}, },
methods: { methods: {
...@@ -174,7 +173,8 @@ ...@@ -174,7 +173,8 @@
this.startTime = Date.parse(new Date()) / 1000; this.startTime = Date.parse(new Date()) / 1000;
this.sharelogin = false this.sharelogin = false
this.userId = val this.userId = val
uni.setStorageSync('cffp_userId', this.userId); // uni.setStorageSync('cffp_userId', this.userId);
localStorage.setItem('h5_userId', this.userId)
this.coursesharing = null this.coursesharing = null
this.getuserRead() this.getuserRead()
} else { } else {
...@@ -249,7 +249,9 @@ ...@@ -249,7 +249,9 @@
url: '/components/login/login' url: '/components/login/login'
}) })
} else { } else {
if (this.coursesharing == 1 && this.userId == '') { // let h5userId = uni.getStorageSync('h5_userId')
let h5userId = localStorage.getItem('h5_userId')
if (this.coursesharing == '1' && h5userId == '') {
this.sharelogin = true this.sharelogin = true
} else { } else {
this.jumppurchase() this.jumppurchase()
...@@ -257,11 +259,13 @@ ...@@ -257,11 +259,13 @@
} }
}, },
jumppurchase() { jumppurchase() {
console.log(this.shareUserId, 485488) if(localStorage.getItem('h5_userId')){
let h5userId = localStorage.getItem('h5_userId')
}
const param = { const param = {
productType: '1', productType: '1',
productId: this.courseInfo.fileId, productId: this.courseInfo.fileId,
userId: this.userId, userId: this.coursesharing == 1? h5userId : uni.getStorageSync('cffp_userId'),
shareUserId: this.shareUserId, shareUserId: this.shareUserId,
shareReadId: this.shareReadId, shareReadId: this.shareReadId,
shareCode: this.shareCode, shareCode: this.shareCode,
...@@ -315,7 +319,7 @@ ...@@ -315,7 +319,7 @@
console.log(this.fileId, 545545) console.log(this.fileId, 545545)
api.courseDetail({ api.courseDetail({
fileId: this.fileId, fileId: this.fileId,
userId: this.userId, userId: this.coursesharing == 1? uni.getStorageSync('h5_userId') : uni.getStorageSync('cffp_userId'),
packFileId: this.courseInfo.packFileId packFileId: this.courseInfo.packFileId
}).then(res => { }).then(res => {
console.log(res, 22554) console.log(res, 22554)
...@@ -462,7 +466,10 @@ ...@@ -462,7 +466,10 @@
api.userRead(UserReadRequestVO).then(res => { api.userRead(UserReadRequestVO).then(res => {
if (res['success']) { if (res['success']) {
this.shareReadId = res.data.id this.shareReadId = res.data.id
// this.jumppurchase() if(uni.getStorageSync('h5_userId')){
this.jumppurchase()
}
} }
}) })
}, },
...@@ -494,7 +501,6 @@ ...@@ -494,7 +501,6 @@
uni.setStorageSync('h5_coursesharing', this.coursesharing); uni.setStorageSync('h5_coursesharing', this.coursesharing);
// this.getshareData() // this.getshareData()
} }
let dataForm = uni.getStorageSync('userinfodataForm') let dataForm = uni.getStorageSync('userinfodataForm')
this.realName = dataForm.realName this.realName = dataForm.realName
// this.switchTab(1); // this.switchTab(1);
......
...@@ -101,9 +101,9 @@ ...@@ -101,9 +101,9 @@
}, },
// 查看订单详情 // 查看订单详情
viewDetail(item){ viewDetail(item){
console.log(item, 1515) let type = this.tabType == 1 ? 'drop': ''
uni.navigateTo({ uni.navigateTo({
url:`/pages/orderDetail/orderDetail?id=${item.orderId}&type=drop` url:`/pages/orderDetail/orderDetail?id=${item.orderId}&type=${type}`
}) })
}, },
bindDateChange: function(e) { bindDateChange: function(e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment