|
@@ -1,5 +1,4 @@
|
|
|
<template>
|
|
|
- <!-- #ifdef H5 -->
|
|
|
<view>
|
|
|
<Loading
|
|
|
:type="3"
|
|
@@ -21,7 +20,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="btns">
|
|
|
- <u-button type="warning" text="分享好友" class="share"></u-button>
|
|
|
+ <u-button type="warning" text="分享好友" class="share" open-type="share"></u-button>
|
|
|
<u-button type="error" text="立即联系" class="contact" @click="toContact" v-if="!isMine"></u-button>
|
|
|
<u-button type="primary" text="立即购买" class="buy" @click="toBuy" v-if="!isMine && detail.amount" :disabled="detail.status === 4"></u-button>
|
|
|
</view>
|
|
@@ -84,8 +83,12 @@
|
|
|
<view class="left">{{item.message}}</view>
|
|
|
<view class="right" @tap="handelReply(item)"><text class="iconfont icon-bianji"></text><text>回复</text></view>
|
|
|
</view>
|
|
|
- <view class="reply">
|
|
|
- <view class="it" v-for="(it, idx) in item.goodsMessageList" :key="idx" @tap="handelReply(it)">{{it.userName}}回复{{it.replyNickName}}:{{it.message}}</view>
|
|
|
+ <view class="reply" v-if="item.goodsMessageList && item.goodsMessageList.length > 0">
|
|
|
+ <view class="it" v-for="(it, idx) in item.goodsMessageList" :key="idx" @tap="handelReply(it)">
|
|
|
+ <text class="name">{{it.userName}}</text>
|
|
|
+ <text class="text">回复</text>
|
|
|
+ <text class="name">{{it.replyNickName}}</text>:{{it.message}}
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -132,14 +135,10 @@
|
|
|
</view>
|
|
|
</zj-dialog-box>
|
|
|
</view>
|
|
|
- <!-- #endif -->
|
|
|
- <!-- #ifndef H5 -->
|
|
|
- <web-view :src="webViewHref('/pages/goods/detail', pam)"></web-view>
|
|
|
- <!-- #endif -->
|
|
|
+
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- // #ifdef H5
|
|
|
import zjDialogBox from "@/components/zj-dialog/zj-dialog-box.vue";
|
|
|
import zjDialogRemark from '@/components/zj-dialog/zj-dialog-remark.vue';
|
|
|
import zjUpload from '@/components/zj-upload/index.vue'
|
|
@@ -180,10 +179,36 @@
|
|
|
|
|
|
computed: {
|
|
|
isMine() {
|
|
|
- return this.$store.state.user.userId === this.detail.userId;
|
|
|
+ if(this.detail) {
|
|
|
+ return this.$store.state.user.userId === this.detail.userId;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ onShareAppMessage(options) {
|
|
|
+ if (options && options.from == 'button') {
|
|
|
+ // 来自页面内的转发按钮
|
|
|
+ } else {
|
|
|
+ // 点击微信右上角的分享按钮
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ title: '分享商品「' + this.detail.title + '」',
|
|
|
+ imageUrl: this.imageUrl + this.detail.goodsFiles[0].imgUrl,
|
|
|
+ path: '/pages/goods/detail?id=' + this.id,
|
|
|
+ query: {
|
|
|
+ // id: this.goodsId,
|
|
|
+ },
|
|
|
+ success: function(res) {
|
|
|
+ if(res.errMsg == 'shareAppMessage:ok'){
|
|
|
+ this.$successToast('分享完成');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
onLoad({id}) {
|
|
|
this.id = id;
|
|
|
this.getDetail();
|
|
@@ -322,42 +347,18 @@
|
|
|
else if(e.value === 3) {
|
|
|
this.$navToPage({
|
|
|
url: `/pages/issue/index?goodsId=${this.id}&type=1`
|
|
|
- })
|
|
|
+ }, 'switchTab')
|
|
|
}
|
|
|
// 编辑
|
|
|
else if(e.value === 4) {
|
|
|
this.$navToPage({
|
|
|
url: `/pages/issue/index?goodsId=${this.id}&type=2`
|
|
|
- })
|
|
|
+ }, 'switchTab')
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- // #endif
|
|
|
- // #ifndef H5
|
|
|
- import zjDialogBox from "@/components/zj-dialog/zj-dialog-box.vue";
|
|
|
- import zjDialogRemark from '@/components/zj-dialog/zj-dialog-remark.vue';
|
|
|
- import zjUpload from '@/components/zj-upload/index.vue'
|
|
|
-
|
|
|
- export default {
|
|
|
- components: {
|
|
|
- zjDialogBox,
|
|
|
- zjDialogRemark,
|
|
|
- zjUpload
|
|
|
- },
|
|
|
-
|
|
|
- data() {
|
|
|
- return {
|
|
|
- pam: {},
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- onLoad(pam) {
|
|
|
- this.pam = pam;
|
|
|
- },
|
|
|
- }
|
|
|
- // #endif
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -567,6 +568,8 @@
|
|
|
align-items: center;
|
|
|
.left {
|
|
|
font-size: 28rpx;
|
|
|
+ word-break: break-all;
|
|
|
+ line-height: 36rpx;
|
|
|
}
|
|
|
.right {
|
|
|
flex-shrink: 0;
|
|
@@ -584,12 +587,24 @@
|
|
|
}
|
|
|
}
|
|
|
.reply {
|
|
|
+ background: #f5f5f5;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ padding: 16rpx 20rpx;
|
|
|
+ margin-top: 20rpx;
|
|
|
.it {
|
|
|
- margin-top: 20rpx;
|
|
|
+ margin-top: 16rpx;
|
|
|
font-size: 24rpx;
|
|
|
- color: $sec-font;
|
|
|
- border-left: 4rpx solid $theme-color;
|
|
|
- padding-left: 8rpx;
|
|
|
+ line-height: 30rpx;
|
|
|
+ word-break: break-all;
|
|
|
+ &:first-child {
|
|
|
+ margin-top: 0;
|
|
|
+ }
|
|
|
+ .name {
|
|
|
+ color: $theme-color;
|
|
|
+ }
|
|
|
+ .text {
|
|
|
+ color: $sec-font;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -611,11 +626,12 @@
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: flex-end;
|
|
|
- .u-button {
|
|
|
+ ::v-deep .u-button {
|
|
|
width: auto;
|
|
|
height: 60rpx;
|
|
|
margin: 0;
|
|
|
margin-left: 20rpx;
|
|
|
+ padding: 0 30rpx;
|
|
|
}
|
|
|
}
|
|
|
</style>
|