This commit is contained in:
魏啾
2024-06-28 11:29:09 +08:00
parent 49e5ed4b5c
commit 736ff85457
5 changed files with 113 additions and 42 deletions

View File

@@ -65,7 +65,8 @@
</view>
<view class="shop-item" v-for="(item1,index1) in item.products" :key="item1.id">
<view class="cover langcover" style="width:180rpx; height: 180rpx;" @click.stop="clickspecifications(item1,index,index1)">
<view class="cover langcover" style="width:180rpx; height: 180rpx;"
@click.stop="clickspecifications(item1,index,index1)">
<c-image style="position: absolute;z-index:2;"
:src="`${item1.coverImg}?x-oss-process=image/resize,m_lfit,w_90,h_90`" width="180"
height="180"></c-image>
@@ -229,12 +230,7 @@
</view>
</view>
</u-popup>
<u-popup :show="popupshowInfo" :round="20" mode="center" @close="popupshowInfo = false"
:safeAreaInsetBottom='false'>
<view class="showInfo">
</view>
</u-popup>
<!-- <vastwu-barrage width="750rpx" height="1300rpx" ref="vBarrage"></vastwu-barrage> -->
</view>
</template>
@@ -242,7 +238,9 @@
import _ from 'lodash';
import navbar from '../../uni_modules/uview-ui/libs/config/props/navbar';
import webSocketUtils from '@/common/js/websocket.js'
// import vastwuBarrage from '@/components/vastwu-barrage/vastwu-barrage.vue'
export default {
// components:{vastwuBarrage},
data() {
return {
// #ifndef MP-WEIXIN
@@ -257,7 +255,6 @@
shopList: {}, //数据类型
active: 0,
showShopInfo: false,
popupshowInfo: false,
showShopsku: false,
titleTopNumIndex: 0,
titleTopNums: [],
@@ -299,6 +296,7 @@
this.$nextTick(() => {
this.countTitleTopNum(); //导航栏
});
// this.$refs.vBarrage.init([123])
},
onUnload() {
this.socketTicket.Close()
@@ -349,6 +347,11 @@
// })
// }
// });
if (msg == 1) { // 网络在连接
this.fixedtrue = true
return false
}
this.fixedtrue = false
if (msg.status != 'success') {
uni.showToast({
title: msg.msg,
@@ -429,8 +432,12 @@
},
// 数据处理
socketSendMsg(data) {
console.log(data, 1111)
if (this.socketTicket) {
console.log(222)
this.socketTicket.send(data);
} else {
console.log(333)
}
},
getQueryString(url, name) { //解码
@@ -471,9 +478,6 @@
})
if (res.code == 0) {
this.shopList = res.data
setTimeout(() => {
this.fixedtrue = false
}, 1000)
this.$nextTick(() => {
this.countTitleTopNum();
});
@@ -515,6 +519,8 @@
this.hodgepodge(item, 2)
},
async hodgepodge(item, a, c) { //此接口去获取商品id !!!赋值库存 数量 价格等
console.log(11111)
try {
let res = await this.api.productqueryProductSku({
shopId: uni.cache.get('shopUser'),
@@ -1158,12 +1164,6 @@
}
}
.showInfo {
width: 100%;
border-radius: 20rpx;
background: #fff;
max-height: 70vh;
}
.shop-info-wrap {
.info-wrap {