fix: 🐛 买家端buyer im传值优化
							parent
							
								
									2aa7b67b7a
								
							
						
					
					
						commit
						40ccbf3edb
					
				|  | @ -15,14 +15,15 @@ export default { | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
|     // 跳转im客服 |     // 跳转im客服 | ||||||
|     async IMService() { |     async IMService(id) { | ||||||
|  | 
 | ||||||
|       // 获取访问Token |       // 获取访问Token | ||||||
|       let accessToken = Storage.getItem("accessToken"); |       let accessToken = Storage.getItem("accessToken"); | ||||||
|       await this.getIMDetailMethods(); |       await this.getIMDetailMethods(); | ||||||
|       const userInfo = await getMemberMsg(); |       const userInfo = await getMemberMsg(); | ||||||
|       if (userInfo.success) { |       if (userInfo.success) { | ||||||
|         window.open( |         window.open( | ||||||
|           this.IMLink + "?token=" + accessToken + "&id=" + this.storeMsg.storeId |           this.IMLink + "?token=" + accessToken + "&id=" + id || this.storeMsg.storeId | ||||||
|         ); |         ); | ||||||
|       } else { |       } else { | ||||||
|         this.$Message.error("请登录后再联系客服"); |         this.$Message.error("请登录后再联系客服"); | ||||||
|  |  | ||||||
|  | @ -22,7 +22,7 @@ | ||||||
|             <Icon type="ios-heart" :color="storeCollected ? '#ed3f14' : '#666'" /> |             <Icon type="ios-heart" :color="storeCollected ? '#ed3f14' : '#666'" /> | ||||||
|             {{ storeCollected? "已收藏店铺": "收藏店铺" }} |             {{ storeCollected? "已收藏店铺": "收藏店铺" }} | ||||||
|           </span> |           </span> | ||||||
|           <span class="ml_10" @click="IMService()">联系客服</span> |           <span class="ml_10" @click="IMService(goodsMsg.data.storeId)">联系客服</span> | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
|  | @ -127,11 +127,13 @@ export default { | ||||||
|                 } |                 } | ||||||
|               }); |               }); | ||||||
|             } |             } | ||||||
|  | 
 | ||||||
|             if (!this.storeMsg) { |             if (!this.storeMsg) { | ||||||
|               // 获取店铺信息 |               // 获取店铺信息 | ||||||
|               getDetailById(this.goodsMsg.data.storeId).then((res) => { |               getDetailById(this.goodsMsg.data.storeId).then((res) => { | ||||||
|                 if (res.success) { |                 if (res.success) { | ||||||
|                   this.storeMsg = res.result; |                   this.storeMsg = res.result; | ||||||
|  | 
 | ||||||
|                 } |                 } | ||||||
|               }); |               }); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|  | @ -14,7 +14,7 @@ | ||||||
|                                                            :color="storeCollected ? '#ed3f14' : '#fff'"/>{{ |                                                            :color="storeCollected ? '#ed3f14' : '#fff'"/>{{ | ||||||
|             storeCollected ? '已收藏店铺' : '收藏店铺' |             storeCollected ? '已收藏店铺' : '收藏店铺' | ||||||
|           }}</span> |           }}</span> | ||||||
|         <span style="width:80px" class="hover-pointer ml_10" @click="IMService()"><Icon |         <span style="width:80px" class="hover-pointer ml_10" @click="IMService(storeMsg.storeId)"><Icon | ||||||
|           custom="icomoon icon-customer-service"/>联系客服</span> |           custom="icomoon icon-customer-service"/>联系客服</span> | ||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
|  | @ -220,6 +220,7 @@ export default { | ||||||
|         if (res.success) { |         if (res.success) { | ||||||
| 
 | 
 | ||||||
|           this.storeMsg = res.result; |           this.storeMsg = res.result; | ||||||
|  |           console.log(this.storeMsg) | ||||||
| 
 | 
 | ||||||
|           //判定如果开启楼层展示,则获取页面信息 否则读取商品信息 |           //判定如果开启楼层展示,则获取页面信息 否则读取商品信息 | ||||||
|           if (this.storeMsg.pageShow && this.storeMsg.pageShow === '1') { |           if (this.storeMsg.pageShow && this.storeMsg.pageShow === '1') { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue