Просмотр исходного кода

Merge remote-tracking branch 'remotes/origin/developerA' into developerB

zhengjinyi 4 лет назад
Родитель
Сommit
ae9cab9502
3 измененных файлов с 200 добавлено и 0 удалено
  1. 2 0
      components/cm-module/homeIndex/navbars.vue
  2. 9 0
      pages.json
  3. 189 0
      pages/goods/good-floor-temp.vue

+ 2 - 0
components/cm-module/homeIndex/navbars.vue

@@ -42,6 +42,7 @@
 				 * 8、专题活动页,9、二手市场介绍,10、二手商品列表,11、二手商品发布,12、商品搜索,13、信息详情
 				 * 14、品牌招商介绍页,15、维修保养介绍页,16、首页,17、注册页,18、信息中心,19、供应商列表
 				 **/
+				console.log(pros);
 				if(pros.linkType){
 					 const typeMap = {
 						1:`/pages/goods/goods-instrument?linkId=${pros.linkParam.id}&title=${pros.name}`,
@@ -52,6 +53,7 @@
 						18:`/h5/pages/article/path?link=${pros.link}`,
 						20:`/pages/goods/good-floor?linkId=${pros.linkParam.id}&title=${pros.name}`,
 						21:`/h5/pages/activity/meobohui`,
+						22:`/pages/goods/good-floor-temp?linkId=${pros.linkParam.id}&title=${pros.name}`
 					 }
 					const url = typeMap[pros.linkType];
 					this.$api.navigateTo(url)

+ 9 - 0
pages.json

@@ -85,6 +85,15 @@
 		{
 			"root": "pages/goods/",//商品模块
 			"pages": [
+				/*美体节临时页面*/
+				{
+					"path": "good-floor-temp",
+					"style": {
+						"navigationBarTitleText": "美体节",
+						"enablePullDownRefresh":true,
+						"navigationStyle":"custom"
+					}
+				},
 				{
 					"path": "goods",
 					"style": {

+ 189 - 0
pages/goods/good-floor-temp.vue

@@ -0,0 +1,189 @@
+<template>
+	<view class="container floor clearfix" :style="{ paddingTop: CustomBar + 'px' }">
+		<custom-floor
+			:systeminfo="systeminfo"
+			:navbar-data="nvabarData"
+			:headerBtnPosi="headerBtnPosi"
+		>
+		</custom-floor>
+		<tui-skeleton
+			v-if="skeletonShow"
+			backgroundColor="#fafafa"
+			borderRadius="10rpx"
+			:isLoading="true"
+			:loadingType="5"
+		></tui-skeleton>
+		<view class="container-home tui-skeleton">
+			<!-- 金刚区菜单 -->
+			<!-- <templateNav :list="navBarsList" v-if="isRequest"></templateNav> -->
+			<image v-if="isRequest"
+				src="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-d3717fcc-9817-4afd-b47a-7b028f85f0f1/5ff8784d-9665-498e-9f7a-39a6e2194021.jpg"
+				mode="widthFix"
+			></image>
+		</view>
+		<!-- 楼层 -->
+		<view class="container-section tui-skeleton">
+			<page-floor
+				:list="pageList"
+				:userIdentity="userIdentity"
+				:pageType="2"
+				v-if="isRequest"
+			></page-floor>
+		</view>
+		<!-- 侧边 -->
+		<scroll-top :isScrollTop="isScrollTop" :bottom="50"></scroll-top>
+	</view>
+</template>
+
+<script>
+import { mapState, mapMutations } from 'vuex'
+import customFloor from '@/components/cm-custom/custom-floor' //自定义导航
+import templateNav from '@/components/cm-module/pageTemplate/templateNav.vue'
+import pageFloor from '@/components/cm-module/homeIndex/pageFloor.vue'
+import authorize from '@/common/config/authorize.js'
+import wxLogin from '@/common/config/wxLogin.js'
+
+export default {
+	components: {
+		customFloor,
+		templateNav,
+		pageFloor
+	},
+	data() {
+		return {
+			userID: 0,
+			shopId: 0,
+			userIdentity: 0,
+			skeletonShow: true,
+			headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
+			systeminfo: this.setSysteminfo(), //获取设备信息
+			CustomBar: this.CustomBar, // 顶部导航栏高度
+			navBarsList: [],
+			pageList: [], //楼层
+			isRequest: false,
+			isScrollTop: false,
+			pageId: '',
+			typeSort: ''
+		}
+	},
+	onLoad(option) {
+		if (option.type == 'share') {
+			authorize.getSetting().then(wxResponse => {
+				// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
+				console.log(wxResponse)
+				if (wxResponse == 1) {
+					wxLogin.wxLoginAuthorize()
+				} else {
+					console.log(new Date() + '用户未授权微信信息')
+				}
+			})
+		}
+		this.pageId = option.linkId
+		// this.pageId = '286'
+		this.$api
+			.getComStorage('userInfo')
+			.then(resolve => {
+				this.userID = resolve.userId ? resolve.userId : 0
+				this.shopId = resolve.shopId ? resolve.shopId : 0
+				this.userIdentity = resolve.userIdentity
+				this.GetInstrumentPageData()
+			})
+			.catch(error => {
+				this.GetInstrumentPageData()
+			})
+		setTimeout(() => {
+			this.skeletonShow = false
+		}, 2000)
+	},
+	computed: {
+		...mapState(['hasLogin', 'userInfo', 'identity'])
+	},
+	methods: {
+		GetInstrumentPageData() {
+			//获取楼层数据
+			this.CommonService.GetInstrumentPageData({
+				pageId: this.pageId,
+				userId: this.userID,
+				source: 2
+			})
+				.then(response => {
+					let data = response.data
+					this.typeSort = data.page.typeSort
+					this.pageList = data.floorList
+					this.GetHomeInit()
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		GetHomeInit() {
+			//金刚区分类
+			this.CommonService.GetFirstClassly({ typeSort: this.typeSort, source: 'crm' })
+				.then(response => {
+					this.navBarsList = response.data
+					this.isRequest = true
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		setHeaderBtnPosi() {
+			// 获得胶囊按钮位置信息
+			let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
+			return headerBtnPosi
+		},
+		setSysteminfo() {
+			let systeminfo
+			uni.getSystemInfo({
+				// 获取设备信息
+				success: res => {
+					systeminfo = res
+				}
+			})
+			return systeminfo
+		}
+	},
+	onPageScroll(e) {
+		//实时获取到滚动的值
+		if (e.scrollTop > 400) {
+			this.isScrollTop = true
+		} else {
+			this.isScrollTop = false
+		}
+	},
+	onPullDownRefresh() {
+		setTimeout(() => {
+			uni.stopPullDownRefresh()
+		}, 200)
+	},
+	onShareAppMessage(res) {
+		//分享转发
+		if (res.from === 'button') {
+			// 来自页面内转发按钮
+		}
+		return {
+			title: '采美-一站式生/医美采购服务平台',
+			path: `pages/goods/good-floor?type=share&linkId=${this.pageId}`
+		}
+	},
+	onShow() {}
+}
+</script>
+
+<style lang="scss">
+page {
+	background-color: #ffffff;
+}
+.container-home {
+	width: 100%;
+	height: auto;
+	image{
+		width: 100%;
+	}
+}
+.container-section {
+	width: 100%;
+	height: auto;
+	background-color: #f7f7f7;
+}
+</style>