解决体验版弹出登录框

This commit is contained in:
dengjie
2023-01-28 22:33:37 +08:00
parent 5678815237
commit 1f6d21a1a0
14 changed files with 213 additions and 83 deletions

View File

@@ -87,8 +87,7 @@
this.id = option.id
this.getProductDetail()
this.imgUrl = uni.getStorageSync('img_url')
if (!uni.getStorageSync('token') || uni.getStorageSync('token').length === 0) {
console.log(uni.getStorageSync('token'))
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
this.isLoad = false
// uni.navigateTo({
// url: '../../pages/my/login/login'
@@ -100,9 +99,8 @@
methods: {
//获取详情信息
getProductDetail() {
console.log(this.id);
this.$apiServe.getProductDetail(this.id).then(res => {
console.log('产品详情页', res.data)
// console.log('产品详情页', res.data)
if (res.data.data.thumb) {
this.isThumb = true
}
@@ -121,7 +119,7 @@
//收藏按钮
starTap() {
this.$apiServe.collect(this.id).then(res => {
console.log('收藏成功', res.data)
// console.log('收藏成功', res.data)
if (res.data.code == 1) {
this.detailList.is_fav = 1
this.$toast.warn('收藏成功')
@@ -135,8 +133,7 @@
this.showHeart = !this.showHeart
},
reOnLoad() {
console.log('----------------true')
if (!uni.getStorageSync('token') || uni.getStorageSync('token').length === 0) {
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
this.$toast.warn('登录失败请重试')
this.isLoad = false
// uni.navigateTo({
@@ -145,9 +142,9 @@
return
}
this.isLoad = true
this.getProductDetail()
},
failToLoad() {
console.log('----------------false')
this.$toast.warn('登录失败请重试')
}
}
@@ -170,10 +167,8 @@
right: 77rpx;
z-index: 99;
}
}
.content {
padding: 20rpx;
background-color: #fff;