dengjie :解决点赞、收藏、客服电话等问题

This commit is contained in:
邓洁
2023-02-04 19:03:41 +08:00
parent 4db15d21cf
commit 08ebc6574d
10 changed files with 128 additions and 102 deletions

View File

@@ -40,9 +40,8 @@
//获取头像昵称
getUser() {
this.$apiServe.getUser().then(res => {
console.log('头像昵称', res.data);
var data = res.data.data
this.avatar = data.avatar
this.avatar = uni.getStorageSync('img_url') + data.avatar
this.model.userInfo.name = data.nickname
}).finally(_ => {})
},
@@ -58,10 +57,7 @@
'Authorization': token
},
success: (res) => {
console.log('上传头像', JSON.parse(res.data));
// setTimeout(() => {
resolve(JSON.parse(res.data).data.url)
// }, 1000)
}
});
})

View File

@@ -79,7 +79,7 @@
},
onLoad(options) {
console.log(options)
if(options && options.index) {
if (options && options.index) {
console.log(options)
options.index = options.index - 1
this.tabChange(options)
@@ -91,7 +91,6 @@
//获取创意发布
getIdeasAndNeeds() {
this.$apiServe.getIdeasAndNeeds(this.type).then(res => {
console.log('获取创意发布&需求发布', res.data.data);
let data = res.data.data
for (const item of data) {
item.pub_time = dateFormatXwDetail(item.pub_time)
@@ -123,15 +122,16 @@
},
//修改我的需求
editIdeasAndNeeds(item) {
const tabCurrent = this .tabCurrent
uni.removeStorage({ //删除Storage
key:'update_item',
success: () => {
uni.setStorageSync('update_item', item);
uni.reLaunch({
url: '/pages/ideasAndNeeds/ideasAndNeeds?item=update_item' + '&index=' + tabCurrent
})
}
const tabCurrent = this.tabCurrent
uni.removeStorage({ //删除Storage
key: 'update_item',
success: () => {
uni.setStorageSync('update_item', item);
uni.reLaunch({
url: '/pages/ideasAndNeeds/ideasAndNeeds?item=update_item' + '&index=' +
tabCurrent
})
}
})
},
//二次确认删除我的需求或创意