|
@@ -2,7 +2,9 @@
|
|
|
<view class="exhibit-item exhibitor-item" hover-class="active" @click="onClickExhibit(item)">
|
|
|
<view class="exhibit-body">
|
|
|
<view class="exhibitor-body">
|
|
|
- <view class="exhibitor-logo"><image :src="item.pic + '?x-oss-process=image/resize,w_400'" mode="aspectFit" /></view>
|
|
|
+ <view class="exhibitor-logo">
|
|
|
+ <image :src="item.pic + '?x-oss-process=image/resize,w_400'" mode="aspectFit" />
|
|
|
+ </view>
|
|
|
<view class="exhibitor-name">{{ item.name }}</view>
|
|
|
<view class="exhibitor-number">
|
|
|
<view class="exhibitor-number-label">展位号:</view>
|
|
@@ -46,13 +48,16 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { exhibitorsProductCollect, exhibitorsProductLike, exhibitorsProductPoll } from '@/api/exhibitor'
|
|
|
+ import {
|
|
|
+ exhibitorsProductCollect,
|
|
|
+ exhibitorsProductLike,
|
|
|
+ exhibitorsProductPoll
|
|
|
+ } from '@/api/exhibitor'
|
|
|
export default {
|
|
|
options: {
|
|
|
styleIsolation: 'shared'
|
|
|
},
|
|
|
- components: {
|
|
|
- },
|
|
|
+ components: {},
|
|
|
props: {
|
|
|
// 数据
|
|
|
item: Object,
|
|
@@ -60,11 +65,9 @@
|
|
|
pollShow: Number
|
|
|
},
|
|
|
data() {
|
|
|
- return {
|
|
|
- }
|
|
|
- },
|
|
|
- created() {
|
|
|
+ return {}
|
|
|
},
|
|
|
+ created() {},
|
|
|
methods: {
|
|
|
onShare(item) {
|
|
|
const shareInfo = {
|
|
@@ -77,13 +80,21 @@
|
|
|
})
|
|
|
},
|
|
|
onClickExhibit(item) {
|
|
|
- this.navigateTo('/pages/exhibitor/exhibit-detail?id=' + item.exhibitors_product_id)
|
|
|
+ let path = getCurrentPages()
|
|
|
+ let current_path = path[path.length - 1].route
|
|
|
+ if (current_path === 'pages/user/like' || current_path === 'pages/user/favorites' || current_path === 'pages/user/vote') {
|
|
|
+ this.navigateTo('/pages/exhibitor/exhibit-detail?id=' + item.exhibitors_product_id)
|
|
|
+ } else {
|
|
|
+ this.navigateTo('/pages/exhibitor/exhibit-detail?id=' + item.id)
|
|
|
+ }
|
|
|
},
|
|
|
onCollect() { // 收藏
|
|
|
if (!this.checkAuth('/pages/exhibitor/exhibit')) {
|
|
|
return
|
|
|
}
|
|
|
- exhibitorsProductCollect({ id: this.item.id }).then(res => {
|
|
|
+ exhibitorsProductCollect({
|
|
|
+ id: this.item.id
|
|
|
+ }).then(res => {
|
|
|
if (res.code === 0) {
|
|
|
let is_collect = this.item.is_collect === 0 ? 1 : 0
|
|
|
this.$emit('updateItemValue', {
|
|
@@ -98,7 +109,9 @@
|
|
|
if (!this.checkAuth('/pages/exhibitor/exhibit')) {
|
|
|
return
|
|
|
}
|
|
|
- exhibitorsProductLike({ id: this.item.id }).then(res => {
|
|
|
+ exhibitorsProductLike({
|
|
|
+ id: this.item.id
|
|
|
+ }).then(res => {
|
|
|
if (res.code === 0) {
|
|
|
let is_like = this.item.is_like === 0 ? 1 : 0
|
|
|
this.$emit('updateItemValue', {
|
|
@@ -113,7 +126,9 @@
|
|
|
if (!this.checkAuth('/pages/exhibitor/exhibit')) {
|
|
|
return
|
|
|
}
|
|
|
- exhibitorsProductPoll({ id: this.item.id }).then(res => {
|
|
|
+ exhibitorsProductPoll({
|
|
|
+ id: this.item.id
|
|
|
+ }).then(res => {
|
|
|
if (res.code === 0) {
|
|
|
let is_poll = this.item.is_poll === 0 ? 1 : 0
|
|
|
this.$emit('updateItemValue', {
|