处理商品发送显示空的问题

feature/1.0.1-im-ch
ch 3 years ago
parent ae7a2e8400
commit f5a52891a9

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-05-18 14:54:47
* @LastEditors: ch
* @LastEditTime: 2022-05-21 15:27:05
* @LastEditTime: 2022-05-21 16:11:44
* @Description: file content
*/
import { CreateUUID, FormatDate, ToAsyncAwait } from "@/common/utils";

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-05-20 11:00:07
* @LastEditors: ch
* @LastEditTime: 2022-05-21 15:44:06
* @LastEditTime: 2022-05-21 15:59:39
* @Description: file content
*/

@ -3,7 +3,7 @@
components: { UiCell },: ch
* @Date: 2019-08-22 19:41:20
* @LastEditors: ch
* @LastEditTime: 2022-05-17 18:00:28
* @LastEditTime: 2022-05-21 16:00:44
* @Description: file content
-->
<template>
@ -95,7 +95,8 @@ export default {
this.statistic = result;
},
service(){
uni.$u.toast('客服休息中');
// uni.$u.toast('');
this.$Router.push('/messageChat');
}
}

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-05-11 11:45:08
* @LastEditors: ch
* @LastEditTime: 2022-05-21 11:38:36
* @LastEditTime: 2022-05-21 16:11:51
* @Description: file content
-->
<template>
@ -45,7 +45,7 @@
</view>
</template>
<script>
import {Im} from '@/common/utils';
import {Im, ToAsyncAwait} from '@/common/utils';
import {MSG_TYPE} from '@/common/dicts/im';
import {Request} from '@/common/utils';
import {ApiPutUser} from '@/common/api/account';
@ -64,6 +64,10 @@ export default {
goodsInfo : {
type : Object,
default : () => ({})
},
sessionId : {
type : Number | String,
default : ''
}
},
data(){
@ -130,15 +134,19 @@ export default {
break;
}
let res = await Im.sendMsg({
const {error, result} = await ToAsyncAwait(Im.sendMsg({
fromId : this.$store.state.userInfo.id,
content: {
toSessionId : this.$Route.query.sessionId,
toSessionId : this.sessionId,
payload : payload,
toId : 1,
type : type
}
})
}));
if(error){
uni.$u.toast(error.message);
return false
}
this.msgCtx = '';
this.focus = false;
this.$nextTick(() => {

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-26 14:32:03
* @LastEditors: ch
* @LastEditTime: 2022-05-21 15:43:32
* @LastEditTime: 2022-05-21 16:08:32
* @Description: file content
-->
<template>
@ -42,7 +42,7 @@
</view>
</view>
</template>
<Footer :goodsInfo="goodsInfo" :orderInfo="orderInfo"></Footer>
<Footer :goodsInfo="goodsInfo" :orderInfo="orderInfo" :sessionId="sessionId"></Footer>
</view>
</template>
<script>
@ -68,10 +68,7 @@ export default {
},
computed:{
curSessionData(){
const data = this.$store.state.imData.find(i =>{
return i.id == this.sessionId
}) || {};
const data = this.$store.state.imData.find(i => i.id == this.sessionId) || {};
if(data.id){
Im.setCurSessionId(data.id);
}
@ -138,8 +135,9 @@ export default {
storeId : 1
}
}));
if(error){
uni.$u.toast(error);
uni.$u.toast(error.message);
return false;
}
this.sessionId = result.content.id

Loading…
Cancel
Save