xiaokuang 4 kuukautta sitten
vanhempi
commit
1d50b35232

+ 2 - 0
api/exhibitor.js

@@ -38,3 +38,5 @@ export const exhibitorsProductViewLogList = get('/api/exhibitors/product/view-lo
 
 export const globalSearch = get('/api/exhibitors/search') // 全局搜索
 export const globalPollShow = get('/api/global/poll-show') // 人气是否显示
+
+export const getClauseInfo = get('/api/global/clause') // 获取条款信息

+ 4 - 1
api/user.js

@@ -11,4 +11,7 @@ export const uploadFile = upload('/api/attachment/upload')
 export const getExhibitorLikeList = get('/api/exhibitors/my-like-list')
 export const getExhibitLikeList = get('/api/exhibitors/product/my-like-list')
 export const getExhibitorCollectList = get('/api/exhibitors/my-collect-list')
-export const getExhibitorPollList = get('/api/exhibitors/my-poll-list')
+export const getExhibitCollectList = get('/api/exhibitors/product/my-collect-list')
+export const getActivityCollectList = get('/api/meeting/my-collect-list')
+export const getExhibitorPollList = get('/api/exhibitors/my-poll-list')
+export const getExhibitPollList = get('/api/exhibitors/product/my-poll-list')

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 49 - 29
pages/disclaimer/index.vue


+ 27 - 12
pages/exhibitor/components/exhibit-item.vue

@@ -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', {

+ 9 - 3
pages/exhibitor/components/exhibitor-item.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="exhibitor-item" hover-class="active" @click="onClickExhibitor(item.exhibitors_id)">
+	<view class="exhibitor-item" hover-class="active" @click="onClickExhibitor(item)">
 		<view class="exhibitor-body">
 			<view class="exhibitor-logo"><image :src="item.logo" mode="aspectFit" /></view>
 			<view class="exhibitor-name">
@@ -118,8 +118,14 @@
 					detail: shareInfo
 				})
 			},
-			onClickExhibitor(id) {
-				this.navigateTo('/pages/exhibitor/detail?id=' + id)
+			onClickExhibitor(item) {
+				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/detail?id=' + item.exhibitors_id)
+				} else {
+					this.navigateTo('/pages/exhibitor/detail?id=' + item.id)
+				}
 			}
 		}
 	}

+ 1 - 0
pages/exhibitor/exhibit.vue

@@ -191,6 +191,7 @@
 			getGlobalPollShow() {
 				globalPollShow().then(res => {
 					this.pollShow = res.data
+					console.log(this.pollShow);
 				})
 			},
 			updateItemValue(e) {

+ 39 - 4
pages/user/favorites.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="user-favorites user-like">
+	<view class="user-favorites user-like" v-loading="loading">
 		<nav-bar title="我的收藏" @init="onInitNavbar"></nav-bar>
 		<u-scroll-view>
 			<view class="user-favorites-tabs-wrapper user-like-tabs-wrapper">
@@ -33,6 +33,11 @@
 	import ExhibitItem from '@/pages/exhibitor/components/exhibit-item.vue'
 	import ExhibitorItem from '@/pages/exhibitor/components/exhibitor-item.vue'
 	import ActivityItem from '@/pages/activity/components/activity-item.vue'
+	import {
+		getExhibitorCollectList,
+		getExhibitCollectList,
+		getActivityCollectList
+	} from '@/api/user'
 	
 	export default {
 		options: {
@@ -51,6 +56,7 @@
 		data() {
 			return {
 				tabActive: 'exhibitor',
+				loading: false,
 				tabs: [{
 					label: '展商',
 					value: 'exhibitor'
@@ -61,18 +67,47 @@
 					label: '同期活动',
 					value: 'activity'
 				}],
-				favoritesList: [{}, {}, {}, {}, {}, {}],
+				favoritesList: [],
 			}
 		},
 		created() {
 			this.checkAuth('/pages/user/favorites')
 			this.loadFontFace('Poppins')
+			this.getExhibitorCollectInfo()
 		},
 		onShow() {
 		}, 
 		methods: {
-			tabChange() {
-				
+			tabChange(e) {
+				this.tabActive = e.detail.value
+				if (this.tabActive === 'exhibitor') {
+					this.getExhibitorCollectInfo()
+				} else if(this.tabActive === 'exhibit'){
+					this.getExhibitCollectInfo()
+				} else {
+					this.getActivityCollectInfo()
+				}
+			},
+			getExhibitorCollectInfo() {
+				this.loading = true
+				getExhibitorCollectList().then(res => {
+					this.favoritesList = res.data.data
+					this.loading = false
+				})
+			},
+			getExhibitCollectInfo() {
+				this.loading = true
+				getExhibitCollectList().then(res => {
+					this.favoritesList = res.data.data
+					this.loading = false
+				})
+			},
+			getActivityCollectInfo() {
+				this.loading = true
+				getActivityCollectList().then(res => {
+					this.favoritesList = res.data.data
+					this.loading = false
+				})
 			}
 		}
 	}

+ 0 - 2
pages/user/like.vue

@@ -79,7 +79,6 @@
 				this.loading = true
 				getExhibitorLikeList().then(res => {
 					this.likeList = res.data.data
-					console.log(this.likeList);
 					this.loading = false
 				})
 			},
@@ -87,7 +86,6 @@
 				this.loading = true
 				getExhibitLikeList().then(res => {
 					this.likeList = res.data.data
-					console.log(this.likeList);
 					this.loading = false
 				})
 			}

+ 29 - 3
pages/user/vote.vue

@@ -29,6 +29,10 @@
 	import UScrollView from '@/components/common/u-scroll-view'
 	import ExhibitItem from '@/pages/exhibitor/components/exhibit-item.vue'
 	import ExhibitorItem from '@/pages/exhibitor/components/exhibitor-item.vue'
+	import {
+		getExhibitorPollList,
+		getExhibitPollList
+	} from '@/api/user'
 	
 	export default {
 		options: {
@@ -52,18 +56,40 @@
 					label: '展品',
 					value: 'exhibit'
 				}],
-				favoritesList: [{}, {}, {}, {}, {}, {}],
+				favoritesList: [],
 			}
 		},
 		created() {
 			this.checkAuth('/pages/user/vote')
 			this.loadFontFace('Poppins')
+			this.getExhibitorPollInfo()
 		},
 		onShow() {
 		}, 
 		methods: {
-			tabChange() {
-				
+			tabChange(e) {
+				this.tabActive = e.detail.value
+				if (this.tabActive === 'exhibitor') {
+					this.getExhibitorPollInfo()
+				} else {
+					this.getExhibitPollInfo()
+				}
+			},
+			getExhibitorPollInfo() {
+				this.loading = true
+				getExhibitorPollList().then(res => {
+					this.favoritesList = res.data.data
+					console.log(this.favoritesList)
+					this.loading = false
+				})
+			},
+			getExhibitPollInfo() {
+				this.loading = true
+				getExhibitPollList().then(res => {
+					this.favoritesList = res.data.data
+					console.log(this.favoritesList)
+					this.loading = false
+				})
 			}
 		}
 	}