Commit dcb1b5a7 by sunerhu

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

2.修复销售课程--分享课程订单详情type != drop
parent db386184
......@@ -165,7 +165,6 @@
shareCode: null,
sharelogin: false,
startTime:'',
};
},
methods: {
......@@ -174,7 +173,8 @@
this.startTime = Date.parse(new Date()) / 1000;
this.sharelogin = false
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.getuserRead()
} else {
......@@ -249,7 +249,9 @@
url: '/components/login/login'
})
} 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
} else {
this.jumppurchase()
......@@ -257,11 +259,13 @@
}
},
jumppurchase() {
console.log(this.shareUserId, 485488)
if(localStorage.getItem('h5_userId')){
let h5userId = localStorage.getItem('h5_userId')
}
const param = {
productType: '1',
productId: this.courseInfo.fileId,
userId: this.userId,
userId: this.coursesharing == 1? h5userId : uni.getStorageSync('cffp_userId'),
shareUserId: this.shareUserId,
shareReadId: this.shareReadId,
shareCode: this.shareCode,
......@@ -315,7 +319,7 @@
console.log(this.fileId, 545545)
api.courseDetail({
fileId: this.fileId,
userId: this.userId,
userId: this.coursesharing == 1? uni.getStorageSync('h5_userId') : uni.getStorageSync('cffp_userId'),
packFileId: this.courseInfo.packFileId
}).then(res => {
console.log(res, 22554)
......@@ -462,7 +466,10 @@
api.userRead(UserReadRequestVO).then(res => {
if (res['success']) {
this.shareReadId = res.data.id
// this.jumppurchase()
if(uni.getStorageSync('h5_userId')){
this.jumppurchase()
}
}
})
},
......@@ -494,7 +501,6 @@
uni.setStorageSync('h5_coursesharing', this.coursesharing);
// this.getshareData()
}
let dataForm = uni.getStorageSync('userinfodataForm')
this.realName = dataForm.realName
// this.switchTab(1);
......
......@@ -101,9 +101,9 @@
},
// 查看订单详情
viewDetail(item){
console.log(item, 1515)
let type = this.tabType == 1 ? 'drop': ''
uni.navigateTo({
url:`/pages/orderDetail/orderDetail?id=${item.orderId}&type=drop`
url:`/pages/orderDetail/orderDetail?id=${item.orderId}&type=${type}`
})
},
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