mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-19 00:45:54 +08:00
im聊天室接口报错问题
This commit is contained in:
@@ -1,20 +1,15 @@
|
||||
<template>
|
||||
<view class="log-list">
|
||||
<!-- 提现记录 -->
|
||||
<view
|
||||
class="log-way"
|
||||
v-if="cashLogData.length != 0"
|
||||
v-for="(item, index) in cashLogData"
|
||||
:key="index"
|
||||
>
|
||||
<view class="log-way" v-if="cashLogData.length != 0" v-for="(item, index) in cashLogData" :key="index">
|
||||
<view class="log-item">
|
||||
<view class="log-item-view">
|
||||
<view class="title">{{
|
||||
item.distributionCashStatus == "APPLY"
|
||||
? "待处理"
|
||||
: item.distributionCashStatus == "PASS"
|
||||
? "通过"
|
||||
: "拒绝"
|
||||
? "通过"
|
||||
: "拒绝"
|
||||
}}</view>
|
||||
<view class="price">+{{ item.price | unitPrice }}</view>
|
||||
</view>
|
||||
@@ -25,12 +20,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 分销业绩 -->
|
||||
<view
|
||||
class="log-way"
|
||||
v-if="achievementData.length != 0"
|
||||
v-for="(item, index) in achievementData"
|
||||
:key="index"
|
||||
>
|
||||
<view class="log-way" v-if="achievementData.length != 0" v-for="(item, index) in achievementData" :key="index">
|
||||
<view class="log-item">
|
||||
<view class="log-item-view">
|
||||
<view class="title">{{ item.goodsName }}</view>
|
||||
@@ -56,7 +46,7 @@
|
||||
<script>
|
||||
import { cashLog, distributionOrderList } from "@/api/goods";
|
||||
export default {
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
cashLogData: [], //提现记录数据集合
|
||||
achievementData: [], //分销业绩数据合集,
|
||||
@@ -76,7 +66,7 @@ export default {
|
||||
},
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
onLoad (option) {
|
||||
let title;
|
||||
option.type == 0 ? (title = "分销业绩") : (title = "提现记录");
|
||||
|
||||
@@ -87,15 +77,15 @@ export default {
|
||||
this.type = option.type;
|
||||
option.type == 0 ? this.achievement() : this.history();
|
||||
},
|
||||
mounted() {},
|
||||
onReachBottom() {
|
||||
mounted () { },
|
||||
onReachBottom () {
|
||||
this.status = "loading";
|
||||
this.type == 0 ? this.achParams.pageNumber++ : this.params.pageNumber++;
|
||||
this.type == 0 ? this.achievement() : this.history();
|
||||
},
|
||||
methods: {
|
||||
// 业绩
|
||||
achievement() {
|
||||
achievement () {
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
});
|
||||
@@ -110,7 +100,7 @@ export default {
|
||||
});
|
||||
},
|
||||
// 初始化提现历史
|
||||
history() {
|
||||
history () {
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
});
|
||||
@@ -131,15 +121,18 @@ export default {
|
||||
.empty {
|
||||
margin: 40rpx 0;
|
||||
}
|
||||
|
||||
.price {
|
||||
color: $main-color;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.log-list {
|
||||
padding: 0 8rpx;
|
||||
overflow: hidden;
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.log-way {
|
||||
margin: 10rpx 0;
|
||||
overflow: hidden;
|
||||
@@ -147,22 +140,26 @@ export default {
|
||||
border-radius: 10rpx;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.log-item-view {
|
||||
padding: 8rpx 32rpx;
|
||||
display: flex;
|
||||
font-size: 13px;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.log-item-footer {
|
||||
padding: 8rpx 32rpx;
|
||||
display: flex;
|
||||
font-size: 13px;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.log-item-footers {
|
||||
padding: 8rpx 32rpx;
|
||||
display: flex;
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
<!-- 消息 -->
|
||||
<view class="flex-column-start" v-if="msgList.length" v-for="(item, index) in msgList" :key="index">
|
||||
<view class="flex-row-start column-time">
|
||||
<view v-show="compareTime(index, item.createTime)" class="flex-row-start date-text">
|
||||
<view v-show="compareTime(index, item.createTime)" class="flex-row-start date-text"
|
||||
v-text="beautifyTime(item.createTime)">
|
||||
</view>
|
||||
</view>
|
||||
<!-- 用户消息 头像可选加入-->
|
||||
@@ -122,9 +123,13 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 防止消息底部被遮 -->
|
||||
<view v-if="showHide && !localImGoodsId && showHideModel" class="flex-row-start margin-left margin-top"
|
||||
style="height: 120rpx;">
|
||||
</view>
|
||||
<!-- 如果没有聊天记录,定位到底部 -->
|
||||
<view
|
||||
:style="{ position: msgList.length == 0 ? 'fixed' : '', bottom: msgList.length == 0 ? '50px' : '', width: msgList.length == 0 ? '100%' : '' }">
|
||||
:style="{ position: msgList.length == 0 ? 'fixed' : '', bottom: msgList.length == 0 ? '66px' : '', width: msgList.length == 0 ? '100%' : '' }">
|
||||
<view class="cartMessage" v-if="showHide && !localImGoodsId && showHideModel">
|
||||
<view class="goodsCard u-flex u-row-between u-p-b-0">
|
||||
<view class="imagebox" @click="jumpGoodDelic(item)">
|
||||
@@ -148,20 +153,21 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- loading是显示 -->
|
||||
<view v-show="msgLoad" class="flex-row-start margin-left margin-top">
|
||||
<!-- <view v-show="msgLoad" class=" margin-left margin-top">
|
||||
<view class="chat-img flex-row-center">
|
||||
<!-- <image style="height: 75rpx;width: 75rpx;" src="../../static/image/robt.png" mode="aspectFit"></image> -->
|
||||
<image style="height: 75rpx;width: 75rpx;" src="../../static/image/robt.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="flex" style="width: 500rpx;">
|
||||
<view class="margin-left padding-chat flex-column-start"
|
||||
style="border-radius: 35rpx;background-color: #f9f9f9;">
|
||||
<!-- <view class="cuIcon-loading turn-load" style="font-size: 35rpx;color: #3e9982;">
|
||||
<view class="cuIcon-loading turn-load" style="font-size: 35rpx;color: #3e9982;">
|
||||
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- 防止消息底部被遮 -->
|
||||
<view style="height: 120rpx;">
|
||||
</view>
|
||||
@@ -223,8 +229,6 @@ export default {
|
||||
}
|
||||
},
|
||||
onLoad (options) {
|
||||
console.log(5555555555555555);
|
||||
console.log(emojistwo);
|
||||
// 没有goodsid则不显示 发送商品弹窗
|
||||
this.showHideModel = options.goodsid
|
||||
// 发送后刷新页面不显示 发送商品弹窗 local里面imGoodId不为空显示
|
||||
@@ -275,7 +279,6 @@ export default {
|
||||
// this.ws.connect();
|
||||
this.sokcet();
|
||||
},
|
||||
|
||||
onPullDownRefresh () {
|
||||
this.params.pageNumber = this.params.pageNumber + 1
|
||||
this.getTalkMessage()
|
||||
@@ -433,12 +436,11 @@ export default {
|
||||
uni.connectSocket({
|
||||
url: url,
|
||||
});
|
||||
}, 5 * 1000)
|
||||
}, 999999)
|
||||
}
|
||||
});
|
||||
// 监听收到信息
|
||||
uni.onSocketMessage(function (res) {
|
||||
console.log(res.data);
|
||||
res.data = JSON.parse(res.data)
|
||||
console.log(res.data.result);
|
||||
if (res.data.messageResultType == 'MESSAGE') {
|
||||
|
||||
Reference in New Issue
Block a user