im重复请求问题

master
2023-02-10 14:13:22 +08:00
parent bc10d774a7
commit 63ebf1a7c5
3 changed files with 40 additions and 36 deletions

View File

@ -10,7 +10,7 @@
<!-- 消息 -->
<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>
@ -36,8 +36,8 @@
}}</text>
</view>
<view class="goodsdesc-rice" style="margin-top:10rpx; color: orange;"><text
style="font-size:20rpx;">¥{{
JSON.parse(item.text)['price']
style="font-size:20rpx;">{{
JSON.parse(item.text)['price'] | unitPrice
}}</text>
</view>
</view>
@ -141,8 +141,8 @@
goodListData.goodsName
}}</text>
</view>
<view class="goodsdesc-rice" style="margin-top:10rpx; color: orange;"><text style="font-size:20rpx;">¥{{
goodListData.price
<view class="goodsdesc-rice" style="margin-top:10rpx; color: orange;"><text style="font-size:20rpx;"> {{
goodListData.price | unitPrice
}}</text>
</view>
</view>
@ -318,7 +318,8 @@ export default {
scrollHeight: 0,
ws: new SocketService(),
resolve: {},
goodListData: {}
goodListData: {},
count: 0
}
},
// watch: {
@ -416,16 +417,15 @@ export default {
if (!this.socketOpen) {
//
uni.onSocketError(function (err) {
let count = 0;
if (count < 3) {
if (this.count < 3) {
if (err && err.code !== 1000) {
_this.socketOpen = true;
uni.connectSocket({
url: url,
});
count = count + 1
}
}
this.count++
});
}
//
@ -795,6 +795,7 @@ export default {
flex: 1;
overflow: hidden;
margin-left: 12rpx;
width: 400rpx;
.goodsdesc-name {
font-size: 12px;
@ -804,6 +805,7 @@ export default {
overflow: hidden;
margin-bottom: 20rpx;
.goodsCard_goodNmae {
color: black;
text-overflow: ellipsis;

View File

@ -7,11 +7,12 @@
<!-- 分享 -->
<shares v-if="enableShare && goodsDetail.id" :skuId="this.routerVal.id" :goodsId="this.routerVal.goodsId" :link="
'/pages/product/goods?id=' +
this.routerVal.id +
'&goodsId=' +
this.routerVal.goodsId
" :thumbnail="goodsDetail.thumbnail" :goodsName="goodsDetail.goodsName" type="goods" @close="enableShare = false" />
'/pages/product/goods?id=' +
this.routerVal.id +
'&goodsId=' +
this.routerVal.goodsId
" :thumbnail="goodsDetail.thumbnail" :goodsName="goodsDetail.goodsName" type="goods"
@close="enableShare = false" />
<popups v-model="popupsSwitch" @tapPopup="handleNavbarList" :popData="navbarListData" :x="navbarListX"
:y="navbarListY" placement="top-start" />
<view class="index">
@ -66,8 +67,8 @@
<u-icon size="30" :color="favorite ? '#f2270c' : '#262626'" :name="favorite ? 'heart-fill' : 'heart'">
</u-icon>
<view :style="{ color: favorite ? '#f2270c' : '#262626' }">{{
favorite ? "已收藏" : "收藏"
}}</view>
favorite? "已收藏": "收藏"
}}</view>
</view>
</view>
<!-- 商品描述 -->
@ -85,20 +86,21 @@
<span>
<span v-if="wholesaleList.length">
<span>¥</span><span class="price">{{
$options.filters.goodsFormatPrice(wholesaleList[wholesaleList.length - 1].price)[0]
}}</span>.{{
$options.filters.goodsFormatPrice(wholesaleList[wholesaleList.length - 1].price)[1]
$options.filters.goodsFormatPrice(wholesaleList[wholesaleList.length - 1].price)[0]
}}</span>.{{
$options.filters.goodsFormatPrice(wholesaleList[wholesaleList.length - 1].price)[1]
}}
~
<span>¥</span><span class="price">{{
$options.filters.goodsFormatPrice(wholesaleList[0].price)[0]
}}</span>.{{
$options.filters.goodsFormatPrice(wholesaleList[0].price)[1]
$options.filters.goodsFormatPrice(wholesaleList[0].price)[0]
}}</span>.{{
$options.filters.goodsFormatPrice(wholesaleList[0].price)[1]
}}
</span>
<span v-else>
<span>¥</span><span class="price">{{ $options.filters.goodsFormatPrice(goodsDetail.price)[0]
}}</span>.{{ $options.filters.goodsFormatPrice(goodsDetail.price)[1] }}
<span>¥</span><span class="price">{{
$options.filters.goodsFormatPrice(goodsDetail.price)[0]
}}</span>.{{ $options.filters.goodsFormatPrice(goodsDetail.price)[1] }}
</span>
</span>
</view>
@ -114,8 +116,8 @@
<u-icon size="30" :color="favorite ? '#f2270c' : '#262626'"
:name="favorite ? 'heart-fill' : 'heart'"></u-icon>
<view :style="{ color: favorite ? '#f2270c' : '#262626' }">{{
favorite ? "已收藏" : "收藏"
}}</view>
favorite? "已收藏": "收藏"
}}</view>
</view>
</view>
<view class="-goods-name desc-bold">
@ -150,8 +152,8 @@
<view class="card-title"> 已选 </view>
<view class="card-content">
<span v-if="selectedGoods.spec">{{ selectedGoods.spec.specName }}-{{
selectedGoods.spec.specValue
}}</span>
selectedGoods.spec.specValue
}}</span>
<span v-else></span>
</view>
<view class="card-bottom">
@ -162,8 +164,8 @@
<view class="card-title"> 送至</view>
<view class="card-content">
<span v-if="delivery">{{
delivery.consigneeAddressPath | clearStrComma
}}</span>
delivery.consigneeAddressPath | clearStrComma
}}</span>
<span v-else></span>
</view>
<view class="card-bottom">
@ -601,10 +603,10 @@ export default {
linkMsgDetail () {
// lili
// this.$options.filters.talkIm(this.storeDetail.storeId)
uni.navigateTo({
url: `/pages/mine/im/index?userId=${this.goodsDetail.storeId}&goodsid=${this.routerVal.goodsId}&skuid=${this.routerVal.id}`
});
this.$options.filters.talkIm(this.goodsDetail.storeId, this.routerVal.goodsId, this.routerVal.id)
// uni.navigateTo({
// url: `/pages/mine/im/index?userId=${this.goodsDetail.storeId}&goodsid=${this.routerVal.goodsId}&skuid=${this.routerVal.id}`
// });
// udesk
// if (this.storeDetail.merchantEuid) {

View File

@ -363,10 +363,10 @@ export function quiteLoginOut () {
/**
* 跳转im
*/
export function talkIm (storeId) {
export function talkIm (storeId, goodsId, id) {
if (isLogin('auth')) {
uni.navigateTo({
url: `/pages/tabbar/home/web-view?IM=${storeId}`,
url: `/pages/mine/im/index?userId=${storeId}&goodsid=${goodsId}&skuid=${id}`
});
}
else {