解决体验版弹出登录框

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

@@ -155,8 +155,8 @@
},
onTabItemTap() {
console.log('----onTabItemTap')
if (!uni.getStorageSync('token') || uni.getStorageSync('token').length === 0) {
console.log(uni.getStorageSync('token'))
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
console.log(uni.getStorageSync('loginToken'))
this.isLoad = false
// uni.navigateTo({
// url: '../../pages/my/login/login'
@@ -164,7 +164,7 @@
return
}
this.isLoad = true
this.token = uni.getStorageSync('token')
this.token = uni.getStorageSync('loginToken')
this.getFormData()
this.fileList1 = []
this.needsPublishForm = {}
@@ -238,7 +238,7 @@
getProductValue(data) {
this.showProductPicker = false
this.showCategoryPicker = false
this.needsPublishForm.product= data.value[0]
this.needsPublishForm.product = data.value[0]
// console.log(data)
// const obj = this.productPickerList.find(item => {
// return item.name === data.value[0]
@@ -368,9 +368,10 @@
return false
}
this.needsPublishForm.type = Number(this.tabCurrent + 1)
this.needsPublishForm.pub_time = this.needsPublishForm.pub_time ? this.needsPublishForm.pub_time : new Date().getTime()
this.needsPublishForm.pub_time = this.needsPublishForm.pub_time ? this.needsPublishForm.pub_time :
new Date().getTime()
const temp = []
if(this.fileList1.length > 0) {
if (this.fileList1.length > 0) {
this.fileList1.map(item => {
temp.push(item.url)
})
@@ -392,12 +393,14 @@
...this.needsPublishForm
}
apiService.submitIdeasAndNeeds(data).then(res => {
this.$toast.success(res.data.msg)
this.$toast.warn('发布成功')
console.log('esf=', res);
// this.$toast.success(res.data.msg)
})
},
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({
@@ -405,7 +408,7 @@
// })
return
}
this.token = uni.getStorageSync('token')
this.token = uni.getStorageSync('loginToken')
this.isLoad = true
this.getFormData()
},