Commit 0dbb646c by wuwx

修复收藏bug

1 parent 9982de4a
...@@ -434,6 +434,13 @@ Page({ ...@@ -434,6 +434,13 @@ Page({
}) })
wx.$storage.set('firstLogin', 'firstLogin') wx.$storage.set('firstLogin', 'firstLogin')
} }
if(this.data.guideShow){
wx.$storage.set('disLikeRecordFlag', true)
let disLikeRecordFlag = wx.$storage.get('disLikeRecordFlag')
this.setData({
disLikeRecordFlag
})
}
}, },
//接口数据,本地数据对接 //接口数据,本地数据对接
compositionData(localData, apiData) { compositionData(localData, apiData) {
...@@ -473,8 +480,11 @@ Page({ ...@@ -473,8 +480,11 @@ Page({
this.prompt = this.selectComponent('#toast') this.prompt = this.selectComponent('#toast')
}, },
showToast: function (e) { showToast: function (e) {
wx.$storage.set('disLikeRecordFlag', false)
let disLikeRecordFlag = wx.$storage.get('disLikeRecordFlag')
this.setData({ this.setData({
disLikeFlag: false disLikeFlag: false,
disLikeRecordFlag
}) })
let { type, item } = e.currentTarget.dataset let { type, item } = e.currentTarget.dataset
console.log('type,item: ', type, item) console.log('type,item: ', type, item)
...@@ -635,6 +645,10 @@ Page({ ...@@ -635,6 +645,10 @@ Page({
this.setData({ this.setData({
clueList: arr clueList: arr
}) })
let arrinx = arr.findIndex(e => e.clueType == 1 && e.starTag == 0)
this.setData({
disLikeFlagIdx: arrinx
})
} }
}, },
//喜欢收藏功能 //喜欢收藏功能
......
...@@ -165,10 +165,10 @@ ...@@ -165,10 +165,10 @@
data-outidx="{{index}}" data-outidx="{{index}}"
data-item="{{item}}" data-item="{{item}}"
bindtap="showToast" /> bindtap="showToast" />
<view class="disLike-tit" wx:if="{{item.clueType == 1 && item.starTag == 0 && disLikeFlag}}"> <view class="disLike-tit" wx:if="{{item.clueType == 1 && item.starTag == 0 && disLikeFlag && disLikeRecordFlag}}" hidden="{{index != disLikeFlagIdx}}">
标记为意向客户 标记为意向客户
</view> </view>
<view class="disLike-titsan" wx:if="{{item.clueType == 1 && item.starTag == 0 && disLikeFlag}}"></view> <view class="disLike-titsan" wx:if="{{item.clueType == 1 && item.starTag == 0 && disLikeFlag && disLikeRecordFlag}}" hidden="{{index != disLikeFlagIdx}}"></view>
<view class="name" hover-class="none" hover-stop-propagation="false"> <view class="name" hover-class="none" hover-stop-propagation="false">
{{item.nickName}} {{item.nickName}}
<image class="avatar" src="{{IMG_URL}}index/avatar.png" wx:if="{{item.clueType != 3}}" /> <image class="avatar" src="{{IMG_URL}}index/avatar.png" wx:if="{{item.clueType != 3}}" />
......
...@@ -15,7 +15,8 @@ export const STORAGE_OBJECTkEY = { ...@@ -15,7 +15,8 @@ export const STORAGE_OBJECTkEY = {
userPhone: 'userPhone', userPhone: 'userPhone',
firstLogin: 'firstLogin', firstLogin: 'firstLogin',
authphone: 'authphone', authphone: 'authphone',
posterTimer: 'posterTimer' posterTimer: 'posterTimer',
disLikeRecordFlag: 'disLikeRecordFlag'
} }
export const IMG_VERSION = () => { export const IMG_VERSION = () => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!