im商品跳转问题
parent
2c494ac0d1
commit
b72d831df9
|
@ -19,16 +19,13 @@
|
||||||
<view>
|
<view>
|
||||||
<view class="user-name">{{ user.nickName }}</view>
|
<view class="user-name">{{ user.nickName }}</view>
|
||||||
<view class="margin-left padding-chat bg-user-orang" style="border-radius: 35rpx; ">
|
<view class="margin-left padding-chat bg-user-orang" style="border-radius: 35rpx; ">
|
||||||
<text style="word-break: break-all;"
|
<text style="word-break: break-all;" v-if="item.messageType === 'MESSAGE'">{{ item.text }}</text>
|
||||||
v-if="item.messageType === 'MESSAGE'">{{ item.text }}</text>
|
|
||||||
<view v-if="item.messageType == 'GOODS'">
|
<view v-if="item.messageType == 'GOODS'">
|
||||||
<view class="goodsCard u-flex u-row-between u-p-b-0"
|
<view class="goodsCard u-flex u-row-between u-p-b-0" style="width:100%;margin: 0 0; ">
|
||||||
style="width:100%;margin: 0 0; ">
|
<view class="imagebox" @click="jumpGoodDelic(item)">
|
||||||
<view class="imagebox" @click="jumpGoodDelic">
|
<image class="image" :src="JSON.parse(item.text)['thumbnail']" mode="widthFix"></image>
|
||||||
<image class="image" :src="JSON.parse(item.text)['thumbnail']"
|
|
||||||
mode="widthFix"></image>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="goodsdesc" @click="jumpGoodDelic">
|
<view class="goodsdesc" @click="jumpGoodDelic(item)">
|
||||||
<view class="goodsdesc-name">
|
<view class="goodsdesc-name">
|
||||||
<text class="goodsCard_goodNmae">{{
|
<text class="goodsCard_goodNmae">{{
|
||||||
JSON.parse(item.text)['goodsName']
|
JSON.parse(item.text)['goodsName']
|
||||||
|
@ -49,7 +46,8 @@
|
||||||
<img style="height: 120rpx; width: 120rpx; margin-top: 15rpx;"
|
<img style="height: 120rpx; width: 120rpx; margin-top: 15rpx;"
|
||||||
:src="JSON.parse(item.text)['groupImages']" mode="widthFix" />
|
:src="JSON.parse(item.text)['groupImages']" mode="widthFix" />
|
||||||
<view class="groupNameOrTime">
|
<view class="groupNameOrTime">
|
||||||
<text @click="linkTosOrders(item.text)">{{ JSON.parse(item.text)['groupName']
|
<text @click="linkTosOrders(item.text)">{{
|
||||||
|
JSON.parse(item.text)['groupName']
|
||||||
}}</text>
|
}}</text>
|
||||||
<view class="orderTime">
|
<view class="orderTime">
|
||||||
<text>{{ JSON.parse(item.text)['paymentTime'] }}</text>
|
<text>{{ JSON.parse(item.text)['paymentTime'] }}</text>
|
||||||
|
@ -74,18 +72,14 @@
|
||||||
<view class="flex" style="width: 500rpx;">
|
<view class="flex" style="width: 500rpx;">
|
||||||
<view>
|
<view>
|
||||||
<view class="other-name">{{ toUser.name }}</view>
|
<view class="other-name">{{ toUser.name }}</view>
|
||||||
<view class="margin-left padding-chat flex-column-start bg-to-color"
|
<view class="margin-left padding-chat flex-column-start bg-to-color" style="border-radius: 35rpx;">
|
||||||
style="border-radius: 35rpx;">
|
<text style="word-break: break-all;" v-if="item.messageType === 'MESSAGE'">{{ item.text }}</text>
|
||||||
<text style="word-break: break-all;"
|
|
||||||
v-if="item.messageType === 'MESSAGE'">{{ item.text }}</text>
|
|
||||||
<view v-if="item.messageType === 'GOODS'">
|
<view v-if="item.messageType === 'GOODS'">
|
||||||
<view class="goodsCard u-flex u-row-between u-p-b-0"
|
<view class="goodsCard u-flex u-row-between u-p-b-0" style="width:100%;margin: 0 0; ">
|
||||||
style="width:100%;margin: 0 0; ">
|
<view class="imagebox" @click="jumpGoodDelic(item)">
|
||||||
<view class="imagebox" @click="jumpGoodDelic">
|
<image class="image" :src="JSON.parse(item.text)['thumbnail']" mode="widthFix"></image>
|
||||||
<image class="image" :src="JSON.parse(item.text)['thumbnail']"
|
|
||||||
mode="widthFix"></image>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="goodsdesc" @click="jumpGoodDelic">
|
<view class="goodsdesc" @click="jumpGoodDelic(item)">
|
||||||
<view class="goodsdesc-name">
|
<view class="goodsdesc-name">
|
||||||
<text class="goodsCard_goodNmae">{{
|
<text class="goodsCard_goodNmae">{{
|
||||||
JSON.parse(item.text)['goodsName']
|
JSON.parse(item.text)['goodsName']
|
||||||
|
@ -106,7 +100,8 @@
|
||||||
<img style="height: 120rpx; width: 120rpx; margin-top: 15rpx;"
|
<img style="height: 120rpx; width: 120rpx; margin-top: 15rpx;"
|
||||||
:src="JSON.parse(item.text)['groupImages']" mode="widthFix" />
|
:src="JSON.parse(item.text)['groupImages']" mode="widthFix" />
|
||||||
<view class="groupNameOrTime">
|
<view class="groupNameOrTime">
|
||||||
<text @click="linkTosOrders(item.text)">{{ JSON.parse(item.text)['groupName']
|
<text @click="linkTosOrders(item.text)">{{
|
||||||
|
JSON.parse(item.text)['groupName']
|
||||||
}}</text>
|
}}</text>
|
||||||
<view class="orderTime">
|
<view class="orderTime">
|
||||||
<text>{{ JSON.parse(item.text)['paymentTime'] }}</text>
|
<text>{{ JSON.parse(item.text)['paymentTime'] }}</text>
|
||||||
|
@ -126,17 +121,16 @@
|
||||||
: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 ? '50px' : '', width: msgList.length == 0 ? '100%' : '' }">
|
||||||
<view class="cartMessage" v-if="showHide && !localImGoodsId && showHideModel">
|
<view class="cartMessage" v-if="showHide && !localImGoodsId && showHideModel">
|
||||||
<view class="goodsCard u-flex u-row-between u-p-b-0">
|
<view class="goodsCard u-flex u-row-between u-p-b-0">
|
||||||
<view class="imagebox" @click="jumpGoodDelic">
|
<view class="imagebox" @click="jumpGoodDelic(item)">
|
||||||
<image class="image" :src="goodListData.thumbnail" mode="widthFix"></image>
|
<image class="image" :src="goodListData.thumbnail" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="goodsdesc" @click="jumpGoodDelic">
|
<view class="goodsdesc" @click="jumpGoodDelic(item)">
|
||||||
<view class="goodsdesc-name">
|
<view class="goodsdesc-name">
|
||||||
<text class="goodsCard_goodNmae">{{
|
<text class="goodsCard_goodNmae">{{
|
||||||
goodListData.goodsName
|
goodListData.goodsName
|
||||||
}}</text>
|
}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="goodsdesc-rice" style="margin-top:10rpx; color: orange;"><text
|
<view class="goodsdesc-rice" style="margin-top:10rpx; color: orange;"><text style="font-size:20rpx;">¥{{
|
||||||
style="font-size:20rpx;">¥{{
|
|
||||||
goodListData.price
|
goodListData.price
|
||||||
}}</text>
|
}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
@ -170,9 +164,8 @@
|
||||||
<view class="flex-column-center" style="position: fixed;bottom: -180px;" :animation="animationData">
|
<view class="flex-column-center" style="position: fixed;bottom: -180px;" :animation="animationData">
|
||||||
<view class="bottom-dh-char flex-row-around" style="font-size: 55rpx;">
|
<view class="bottom-dh-char flex-row-around" style="font-size: 55rpx;">
|
||||||
<!-- vue无法使用软键盘"发送" -->
|
<!-- vue无法使用软键盘"发送" -->
|
||||||
<input v-model="msg" class="dh-input" type="text" style="background-color: #f0f0f0;"
|
<input v-model="msg" class="dh-input" type="text" style="background-color: #f0f0f0;" @confirm="sendMessage"
|
||||||
@confirm="sendMessage" confirm-type="search" placeholder-class="my-neirong-sm"
|
confirm-type="search" placeholder-class="my-neirong-sm" placeholder="用一句简短的话描述您的问题" />
|
||||||
placeholder="用一句简短的话描述您的问题" />
|
|
||||||
<view @click="sendMessage" class="cu-tag bg-cyan round">
|
<view @click="sendMessage" class="cu-tag bg-cyan round">
|
||||||
发送
|
发送
|
||||||
</view>
|
</view>
|
||||||
|
@ -272,8 +265,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// this.ws.connect();
|
// this.ws.connect();
|
||||||
this.sokcet()
|
this.sokcet();
|
||||||
},
|
},
|
||||||
|
|
||||||
onPullDownRefresh () {
|
onPullDownRefresh () {
|
||||||
this.params.pageNumber = this.params.pageNumber + 1
|
this.params.pageNumber = this.params.pageNumber + 1
|
||||||
this.getTalkMessage()
|
this.getTalkMessage()
|
||||||
|
@ -430,6 +424,7 @@
|
||||||
});
|
});
|
||||||
// 监听收到信息
|
// 监听收到信息
|
||||||
uni.onSocketMessage(function (res) {
|
uni.onSocketMessage(function (res) {
|
||||||
|
console.log(res.data, 'resresresresresres');
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -447,9 +442,10 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
// 跳转商品详情页
|
// 跳转商品详情页
|
||||||
jumpGoodDelic() {
|
jumpGoodDelic (item) {
|
||||||
|
let info = JSON.parse(item.text)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/product/goods?id=${this.resolve.skuid}&goodsId=${this.resolve.goodsid}`,
|
url: `/pages/product/goods?id=${info.id}&goodsId=${info.goodsId}`,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -617,6 +613,7 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
console.log(this.msgList);
|
||||||
this.msgGo(type)
|
this.msgGo(type)
|
||||||
},
|
},
|
||||||
touchMoreMessage (e) {
|
touchMoreMessage (e) {
|
||||||
|
|
|
@ -54,7 +54,6 @@ export default class SocketService {
|
||||||
};
|
};
|
||||||
// 得到服务端发送过来的数据
|
// 得到服务端发送过来的数据
|
||||||
this.ws.onmessage = (msg) => {
|
this.ws.onmessage = (msg) => {
|
||||||
// console.log(msg.data)
|
|
||||||
this.registerCallBack(msg.data);
|
this.registerCallBack(msg.data);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue