diff --git a/src/components/storemanager/dialog/editorVendorStore.vue b/src/components/storemanager/dialog/editorVendorStore.vue index 73bfd89..f51e10e 100644 --- a/src/components/storemanager/dialog/editorVendorStore.vue +++ b/src/components/storemanager/dialog/editorVendorStore.vue @@ -317,9 +317,10 @@ prop="pricePercentage" v-if="!(addStore.vendorID === 16 && !vendorQuery.isBind)" > + 品牌发单 门店发单 @@ -1359,8 +1360,11 @@ export default { // (this.vendorQuery.isBind && this.addStore.isSync === 1) // ? true // : false - // : false; + // : false; // }, + deliveryTypeDisable(){ + return localStorage.getItem('mobile') === '18981810340' ? false : this.isDisableByBrand + }, supplierID() { return this.createEbaiForm.supplierID diff --git a/src/pages/indexpage/cmp/chatDeatil/chatDetail.vue b/src/pages/indexpage/cmp/chatDeatil/chatDetail.vue index d816085..c096ddb 100644 --- a/src/pages/indexpage/cmp/chatDeatil/chatDetail.vue +++ b/src/pages/indexpage/cmp/chatDeatil/chatDetail.vue @@ -38,7 +38,8 @@
缩略图...
- 略缩图 + 略缩图
@@ -313,6 +314,10 @@ export default { isGetDetail:{ type:Boolean, default:false + }, + value:{ + type:Number, + default:0 } }, data() { @@ -353,11 +358,14 @@ export default { let mt = this.allUserList.mt let elm = this.allUserList.elm let jd = this.allUserList.jd - return mt.concat(elm).concat(jd) || [] + let arr = mt.concat(elm).concat(jd) || [] + if(arr.length>0) this.$emit("input", arr.length) + // console.log(this.allUserList,'1111111111,allUser',arr) + return arr } }, created(){ - return + // return this.getChatUsersList() // this.platInfo() }, @@ -391,20 +399,20 @@ export default { let arr = [] res.forEach(item => { let brr = item.vendorStoreList || [] - // this.personalStore.push({...item}) - this.personalStore.push({ - address: "四川省成都市新都区三河场江陵路市场内16-19号摊位(老向蔬菜店)", - cityName: "成都市", - id: 100296, - name: "谢卫路店", - payeeName: "向文祥", - status: 1, - tel1: "13658078848", - tel2: "13658078848", - elmStoreID:"", - jdStoreID:"", - mtStoreID:"7026352" - }) + this.personalStore.push({...item}) + // this.personalStore.push({ + // address: "四川省成都市新都区三河场江陵路市场内16-19号摊位(老向蔬菜店)", + // cityName: "成都市", + // id: 100296, + // name: "谢卫路店", + // payeeName: "向文祥", + // status: 1, + // tel1: "13658078848", + // tel2: "13658078848", + // elmStoreID:"", + // jdStoreID:"", + // mtStoreID:"7026352" + // }) // console.log('item',item,'brr',brr) if(brr.length>0){ brr.map(i => { @@ -431,23 +439,24 @@ export default { } }) // console.log(arr,'this.personalStore',this.personalStore) - // return arr + return arr // return [{"vendorStoreID":"7290541","vendorID":"1","appID":"589"},{"vendorStoreID":"2233065983","vendorID":"3","appID":"34665"},{"vendorStoreID":"11998833","vendorID":"0","appID":"320406"}] - return [{"vendorStoreID":"7026352","vendorID":"1","appID":"589"}] + // return [{"vendorStoreID":"7026352","vendorID":"1","appID":"589"}] }, async getUser(flag){ let res = await getChatUserList(this.paramsData,true) + // console.log('1111111111,获取用户列表',res) if(JSON.stringify(res) === '{}') return let keys = Object.keys(res) this.platArr = keys + this.allUserList['mt'] = [] + this.allUserList['elm'] = [] + this.allUserList['jd'] = [] // this.platInfo(this.platArr) keys.forEach(i => { let userArr = i.split(':') // this.allUserList[userArr[0]] = {} - this.allUserList['mt'] = [] - this.allUserList['elm'] = [] - this.allUserList['jd'] = [] if(userArr[2] === '1'){ // 美团 // this.allUserList['mt'] = [] @@ -479,12 +488,21 @@ export default { }) }else if(userArr[2] === '3'){ // 淘宝闪购 - this.allUserList['elm'] = [] - res[i].reverse().forEach.forEach(element => { + // this.allUserList['elm'] = [] + // console.log('i,iiiiiiiiiiiiiii',i,'res,,,翻转,arr') + // debugger + res[i].reverse().forEach(element => { let resData = JSON.parse(element) - let findIndex = this.allUserList['elm'].findIndex(item => item.payLoad.groupId === resData.payLoad.groupId) + // debugger + let findIndex = this.allUserList['elm'].findIndex(item => item.userID === resData.userID) if(findIndex === -1){ - let latestMsgHandler = resData.latestMsg + // let latestMsgHandler = resData.latestMsg + let latestMsgHandler = JSON.parse(resData.latestMsg).text ? JSON.parse(resData.latestMsg).text : JSON.parse(resData.latestMsg).duration ? '【语音】' : '【图片】' + if (JSON.parse(resData.latestMsg).elements && JSON.parse(resData.latestMsg).elements.length > 0) { + let findItem = JSON.parse(resData.latestMsg).elements.filter(item => item.elementType === 1) + latestMsgHandler = findItem && findItem.length > 0 ? JSON.parse(findItem[0].elementContent).text.replace('@商家', '') : latestMsgHandler + } + let find = this.personalStore.find(i => i.mtStoreID === userArr[1]) this.allUserList['elm'].push({ ...resData, @@ -496,8 +514,22 @@ export default { vendorStoreID:userArr[1], storeInfo:find || "" }) + console.log('111111111,,饿了么',this.allUserList['elm']) + }else{ + // this.allUserList['elm'][findIndex] = { + // ...resData, + // latestMsg: latestMsgHandler, + // latestTime: timeFormatDHM(+new Date(resData.latestTime )), + // orderInfo: {}, + // orderDesc: '', + // platformID:userArr[0], + // vendorStoreID:userArr[1], + // storeInfo:find || "" + // } } }) + console.log('1111111111,获取用户列表,,, this.allUserList,饿了么', this.allUserList) + // debugger }else if(userArr[2] === '0'){ // 京东 this.allUserList['JD'][userArr[1]] = [] @@ -523,7 +555,7 @@ export default { }) if(this.isGetDetail) this.queryDetailFirst(flag) - // console.log('allUserList,,,allUserList',this.allUserList) + console.log('allUserList,,,allUserList',this.allUserList) }, queryDetailFirst(flag){ if(!this.currentUser){ @@ -572,9 +604,9 @@ export default { queryDetailBut:debounce( function name(query,falg,type) { if(type && type === 'click'){ - console.log('11111111111,,聊天记里',query) + console.log(this.currentUser,'11111111111,,聊天记里',query) if(query.userID === this.currentUser.userID) return // 不用重复点击 - return + // return } if(query.userID !== this.currentUser.userID) this.chatDetail = [] // 清空聊天记录 if(this.detailTimer) clearInterval(this.detailTimer) diff --git a/src/pages/indexpage/indexPage3.vue b/src/pages/indexpage/indexPage3.vue index ca8b9fe..b4e125a 100644 --- a/src/pages/indexpage/indexPage3.vue +++ b/src/pages/indexpage/indexPage3.vue @@ -507,11 +507,12 @@ - - 门店聊天 + + +
门店聊天
- +
@@ -621,6 +622,7 @@ export default { }, data() { return { + allUser:0, // 聊天详情,所有用户信息条数 isGetDetail:false, newFeatures: [], html: '',