|
@@ -248,11 +248,43 @@
|
|
</view>
|
|
</view>
|
|
</u-popup>
|
|
</u-popup>
|
|
</view>
|
|
</view>
|
|
|
|
+<<<<<<< HEAD
|
|
</swiper-item>
|
|
</swiper-item>
|
|
</swiper>
|
|
</swiper>
|
|
<!-- 预加载指示器 -->
|
|
<!-- 预加载指示器 -->
|
|
<view v-if="preloading" class="preload-indicator">
|
|
<view v-if="preloading" class="preload-indicator">
|
|
<u-loading mode="circle" color="#ffffff" size="28"></u-loading>
|
|
<u-loading mode="circle" color="#ffffff" size="28"></u-loading>
|
|
|
|
+=======
|
|
|
|
+
|
|
|
|
+ <view class="justify-between p24">
|
|
|
|
+ <view class="u-flex-y-center"
|
|
|
|
+ style="background:rgba(157, 157, 157, 0.8);padding:18rpx 14rpx 18rpx 32rpx;width: 526rpx;box-sizing:border-box;border-radius:36rpx;">
|
|
|
|
+ <u-input :placeholder="placeholderText" border="none" customStyle='font-size:24rpx;'
|
|
|
|
+ v-model="value" shape='circle' color='#fff' placeholderStyle='color:#e7e7e7' class="ml20"
|
|
|
|
+ @keydown.enter="sendMsg">
|
|
|
|
+ </u-input>
|
|
|
|
+ <!-- <image @click="sendMsg" class="w44 h44" src="@/static/images/live/like.png"></image> -->
|
|
|
|
+ </view>
|
|
|
|
+ <!-- :disabled='talkdisabled' ></u-input> -->
|
|
|
|
+ <!-- <view @click="sendMsg" class="colorf center ml10 fs24">发送</view> -->
|
|
|
|
+ <view class="justify-between mr30 align-center">
|
|
|
|
+ <!-- <view class="icon-bg ml20" @click="answerbtn=!answerbtn">
|
|
|
|
+ <image src="/static/images/redbag.png" class="w40 h40"></image>
|
|
|
|
+ </view> -->
|
|
|
|
+ <view class="icon-bg ml20" @click="shopping=!shopping">
|
|
|
|
+ <image src="/static/images/shopping.png" class="w48 h48"></image>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="icon-bg ml20" @click="showziliao=!showziliao">
|
|
|
|
+ <image src="/static/images/more-icon.png" class="w48 h48"></image>
|
|
|
|
+ </view>
|
|
|
|
+ <!-- <view class="icon-bg ml20" :class="{ 'zoom-button-active': isZoom }"
|
|
|
|
+ @touchstart="handleTouchStart" @touchend="handleTouchEnd">
|
|
|
|
+ <image src="/static/images/dianzan.png" class="w40 h40"></image>
|
|
|
|
+ </view> -->
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+>>>>>>> 57028795d3bcee2e15cce5538d4362a47313f66a
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
@@ -295,9 +327,15 @@
|
|
} from '@/api/home'
|
|
} from '@/api/home'
|
|
// var wsUrl = "ws://192.168.10.166:7114/app/webSocket";
|
|
// var wsUrl = "ws://192.168.10.166:7114/app/webSocket";
|
|
|
|
|
|
|
|
+<<<<<<< HEAD
|
|
// var wsUrl = "ws://192.168.10.166:7114/app/webSocket"; //余红奇
|
|
// var wsUrl = "ws://192.168.10.166:7114/app/webSocket"; //余红奇
|
|
// var wsUrl = "ws://192.168.10.125:7114/app/webSocket"; //涂小龙
|
|
// var wsUrl = "ws://192.168.10.125:7114/app/webSocket"; //涂小龙
|
|
var wsUrl = "wss://live.test.ylrztop.com/ws/live-api/app/webSocket"; //余红奇
|
|
var wsUrl = "wss://live.test.ylrztop.com/ws/live-api/app/webSocket"; //余红奇
|
|
|
|
+=======
|
|
|
|
+ var wsUrl = "ws://192.168.10.166:7114/app/webSocket"; //余红奇
|
|
|
|
+ // var wsUrl = "ws://192.168.10.125:7114/app/webSocket"; //涂小龙
|
|
|
|
+ // var wsUrl = "ws://live.test.ylrztop.com/prod-api/app/webSocket"; //余红奇
|
|
|
|
+>>>>>>> 57028795d3bcee2e15cce5538d4362a47313f66a
|
|
// var wsUrl = "ws://nd383294.natappfree.cc/app/webSocket"; //余红奇
|
|
// var wsUrl = "ws://nd383294.natappfree.cc/app/webSocket"; //余红奇
|
|
// var wsUrl = "ws://v56c9b8e.natappfree.cc/app/webSocket"; //余红奇
|
|
// var wsUrl = "ws://v56c9b8e.natappfree.cc/app/webSocket"; //余红奇
|
|
// var wsUrl = "ws://192.168.10.170:7114/app/webSocket"; //陈果
|
|
// var wsUrl = "ws://192.168.10.170:7114/app/webSocket"; //陈果
|
|
@@ -337,8 +375,6 @@
|
|
inputInfo: '',
|
|
inputInfo: '',
|
|
searchTimer: null,
|
|
searchTimer: null,
|
|
storeId: null,
|
|
storeId: null,
|
|
- reconnectCount: 0,
|
|
|
|
- maxReconnectAttempts: 3,
|
|
|
|
reconnectTimer: null,
|
|
reconnectTimer: null,
|
|
isCollect: false,
|
|
isCollect: false,
|
|
showPurchasePrompt: false,
|
|
showPurchasePrompt: false,
|
|
@@ -393,8 +429,33 @@
|
|
|
|
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
this.userinfo = JSON.parse(uni.getStorageSync("userInfo"))
|
|
this.userinfo = JSON.parse(uni.getStorageSync("userInfo"))
|
|
|
|
+<<<<<<< HEAD
|
|
// 初始化直播间列表
|
|
// 初始化直播间列表
|
|
this.initLiveList(options);
|
|
this.initLiveList(options);
|
|
|
|
+=======
|
|
|
|
+ if (options.liveId) {
|
|
|
|
+ this.liveId = options.liveId; // 仅当 liveId 变化时更新
|
|
|
|
+ }
|
|
|
|
+ const platform = uni.getSystemInfoSync().platform;
|
|
|
|
+ if (['mp-weixin', 'mp-alipay', 'mp-baidu', 'mp-toutiao'].includes(platform)) {
|
|
|
|
+ // 确保 API 存在再调用
|
|
|
|
+ if (uni.showShareMenu) {
|
|
|
|
+ uni.showShareMenu({
|
|
|
|
+ withShareTicket: true, // 可选参数,根据需求配置
|
|
|
|
+ success: () => {
|
|
|
|
+ console.log('分享菜单显示成功');
|
|
|
|
+ },
|
|
|
|
+ fail: (err) => {
|
|
|
|
+ console.error('分享菜单显示失败:', err);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ console.warn('当前平台不支持 uni.showShareMenu');
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ console.log('当前平台无需显示分享菜单');
|
|
|
|
+ }
|
|
|
|
+>>>>>>> 57028795d3bcee2e15cce5538d4362a47313f66a
|
|
},
|
|
},
|
|
onShareAppMessage() {
|
|
onShareAppMessage() {
|
|
return {
|
|
return {
|
|
@@ -1190,6 +1251,7 @@ clearAllTimers() {
|
|
},
|
|
},
|
|
|
|
|
|
// 查询店铺
|
|
// 查询店铺
|
|
|
|
+<<<<<<< HEAD
|
|
async queryCollect() {
|
|
async queryCollect() {
|
|
const currentLive = this.list[this.currentSwiperIndex];
|
|
const currentLive = this.list[this.currentSwiperIndex];
|
|
if (!currentLive || !currentLive.liveId) return;
|
|
if (!currentLive || !currentLive.liveId) return;
|
|
@@ -1211,6 +1273,25 @@ clearAllTimers() {
|
|
} catch (error) {
|
|
} catch (error) {
|
|
console.error('获取小黄车商品失败:', error);
|
|
console.error('获取小黄车商品失败:', error);
|
|
}
|
|
}
|
|
|
|
+=======
|
|
|
|
+ queryCollect() {
|
|
|
|
+ if (!this.storeId) return;
|
|
|
|
+ if (!this.liveId) return;
|
|
|
|
+ store(this.storeId, this.inputInfo,this.liveId).then(res => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ console.log("查询店铺>>", res)
|
|
|
|
+ this.products = res.data.goodsList
|
|
|
|
+ this.store = res.data
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: res.msg,
|
|
|
|
+ icon: 'none'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ rej => {}
|
|
|
|
+ );
|
|
|
|
+>>>>>>> 57028795d3bcee2e15cce5538d4362a47313f66a
|
|
},
|
|
},
|
|
// 店铺收藏
|
|
// 店铺收藏
|
|
onStoreCollect() {
|
|
onStoreCollect() {
|
|
@@ -1530,6 +1611,7 @@ clearAllTimers() {
|
|
socketInstance.onMessage((res) => {
|
|
socketInstance.onMessage((res) => {
|
|
try {
|
|
try {
|
|
const redata = JSON.parse(res.data);
|
|
const redata = JSON.parse(res.data);
|
|
|
|
+<<<<<<< HEAD
|
|
// 找到对应的直播间并更新数据
|
|
// 找到对应的直播间并更新数据
|
|
const targetLive = this.list.find(item => item.liveId === liveId);
|
|
const targetLive = this.list.find(item => item.liveId === liveId);
|
|
if (targetLive) {
|
|
if (targetLive) {
|
|
@@ -1537,6 +1619,18 @@ clearAllTimers() {
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
targetLive.scrollIntoView = `list_${targetLive.talklist.length - 1}`;
|
|
targetLive.scrollIntoView = `list_${targetLive.talklist.length - 1}`;
|
|
});
|
|
});
|
|
|
|
+=======
|
|
|
|
+
|
|
|
|
+ if(redata.data.cmd == 'sendMsg'){
|
|
|
|
+ this.talklist.push(redata.data);
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.scrollIntoView = `list_${this.talklist.length - 1}`; // 最后一项的id
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ else if (redata.data.cmd == 'deleteId') {
|
|
|
|
+ uni.$emit('deleteId');
|
|
|
|
+ }
|
|
|
|
+>>>>>>> 57028795d3bcee2e15cce5538d4362a47313f66a
|
|
|
|
|
|
// 处理各种消息类型
|
|
// 处理各种消息类型
|
|
this.handleSocketMessage(redata.data, targetLive);
|
|
this.handleSocketMessage(redata.data, targetLive);
|
|
@@ -1620,8 +1714,13 @@ clearAllTimers() {
|
|
nickName: this.userinfo.nickName,
|
|
nickName: this.userinfo.nickName,
|
|
avatar: this.userinfo.avatar
|
|
avatar: this.userinfo.avatar
|
|
};
|
|
};
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
|
|
if (!liveItem.value.trim()) {
|
|
if (!liveItem.value.trim()) {
|
|
|
|
+=======
|
|
|
|
+ console.log(!this.value.trim())
|
|
|
|
+ if (!this.value.trim()) { // 优化空消息判断
|
|
|
|
+>>>>>>> 57028795d3bcee2e15cce5538d4362a47313f66a
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title: "不能发送空消息",
|
|
title: "不能发送空消息",
|
|
icon: 'none'
|
|
icon: 'none'
|