Bladeren bron

平台资质证书、供应商资质证书

zhengjinyi 3 jaren geleden
bovenliggende
commit
1ec3fcc7ed

+ 18 - 121
App.vue

@@ -1,129 +1,26 @@
 <script>
-	/**
-	 * vuex管理登陆状态,具体可以参考官方登陆模板示例
-	 */
-	import Vue from 'vue'
-	import { mapState,mapMutations} from 'vuex'
-	import authorize from '@/common/config/authorize.js'
+	import appMixins from '@/mixins/appMixins.js'
 	export default {
+		mixins: [appMixins],
 		onLaunch: function() {
-			let self = this
 			//小程序热更新代码
-			// if (wx.canIUse('getUpdateManager')) {
-			// 	const updateManager = wx.getUpdateManager()
-			// 	updateManager.onCheckForUpdate(function (res) {
-			//         console.log('onCheckForUpdate====', res)
-			//         // 请求完新版本信息的回调
-			//         if (res.hasUpdate) {
-			// 			console.log('res.hasUpdate====')
-			// 			updateManager.onUpdateReady(function () {// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
-			// 				self.$util.modal('更新提示','新版本已经准备好,是否重启应用?','确定','取消',true,() =>{
-			// 					updateManager.applyUpdate()
-			// 				})
-			// 			})
-			// 			updateManager.onUpdateFailed(function () {  // 新的版本下载失败
-			// 				self.$util.modal('已经有新版本了哟~','新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~','确定','取消',true,() =>{
-			// 					// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
-			// 					updateManager.applyUpdate()
-			// 				})
-			// 			})
-			//         }
-			// 	})
-			// }
-			uni.getSystemInfo({
-				success: function(e) {
-					let modelmes = e.model
-					console.log(e)
-					if (modelmes.search('iPhone 11') !== -1 || modelmes.search('iPhone 11 Pro Max') !== -1 ||modelmes.search('iPhone X') != -1) { //XS,XR,XS MAX均可以适配
-						self.$store.dispatch('setVariableFun',true)
-					}else{
-						self.$store.dispatch('setVariableFun',false)
-					}
-					// #ifndef MP
-					Vue.prototype.StatusBar = e.statusBarHeight
-					if (e.platform == 'android') {
-						Vue.prototype.CustomBar = e.statusBarHeight + 50
-						Vue.prototype.platformClass = true
-					} else {
-						Vue.prototype.CustomBar = e.statusBarHeight + 45
-						Vue.prototype.platformClass = false
-					};
-					// #endif
-			
-					// #ifdef MP-WEIXIN || MP-QQ
-					console.log(e.platform)
-					if (e.platform == 'android') {
-						Vue.prototype.platformClass = 'left'
-						self.$store.dispatch('setVariableFun',false)
-					} else {
-						Vue.prototype.platformClass = 'center'
-						self.$store.dispatch('setIsIphoneFun',true)
-					}
-					Vue.prototype.StatusBar = e.statusBarHeight
-					Vue.prototype.fontSizeSetting = e.fontSizeSetting
-					Vue.prototype.screenWidth = e.screenWidth
-					let capsule = wx.getMenuButtonBoundingClientRect()
-					Vue.prototype.capsule = capsule
-					if (capsule) {
-						Vue.prototype.Custom = capsule
-						// Vue.prototype.capsuleSafe = uni.upx2px(750) - capsule.left + uni.upx2px(750) - capsule.right;
-						Vue.prototype.CustomBar = capsule.bottom + capsule.top - e.statusBarHeight
-					} else {
-						Vue.prototype.CustomBar = e.statusBarHeight + 50
-					}
-					// #endif		
-					// #ifdef MP-ALIPAY
-					Vue.prototype.StatusBar = e.statusBarHeight
-					Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight
-					// #endif
-				}
+			const updateManager = uni.getUpdateManager()
+			updateManager.onCheckForUpdate(function(res) {
+			    console.log(res.hasUpdate)
 			})
-			this.refresh()
-		},
-		computed: {
-			...mapState(['hasLogin'])
-		},
-		methods:{
-			...mapMutations(['login','logout','isWxAuthorize']),
-			async getWxAuthorize(){
-				const wechatCode = await authorize.getCode('weixin')// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
-				const getUserInfo = await authorize.getUserInfo('weixin')
-				this.UserService.UserLoginAuthApplets({ 
-					code:wechatCode,
-					encryptedData:getUserInfo.encryptedData,
-					iv:getUserInfo.iv
-				})
-				.then(response =>{
-					this.$store.commit('updateStatus',response.data)
-					this.login(response.data)
-					uni.setStorageSync('token',response.data.token)
-					uni.setStorageSync('unionId',response.data.unionId)
-				})
-				.catch(error =>{
-					this.logout(error.data)
-					uni.setStorageSync('unionId',error.data.unionId)
-					this.$store.commit('updateStatus',error.data)
-					if(!this.hasLogin){
-						if(uni.getStorageSync('isActivitySwitch')){
-							const  lockTime = uni.getStorageSync('lockTime')
-							const  eTime = this.diffTime(lockTime)
-							this.$store.dispatch('setActivityFn',eTime)
-						}else{
-							this.$store.dispatch('setActivityFn',true)
-						}
-					}
-				})
-			},		
-			refresh(){
-				let TIME = (20*60)*1000
-				setInterval(()=>{
-					this.getWxAuthorize()
-				},TIME)
-			},
-			diffTime(t){
-				let date = Date.now()
-				return (date -t) < 2*60*1000 ? false : true
-			}
+			updateManager.onUpdateReady(function(res) {
+			    uni.showModal({
+			        title: '更新提示',
+			        content: '新版本已经准备好,是否重启小程序?',
+			        success(res) {
+			            if (res.confirm) {
+			                updateManager.applyUpdate()
+			            }
+			        }
+			    })
+			})
+			this.initSetSystemInfo()
+			this.appUpdataRefresh()
 		},
 		onShow: function() {
 			

+ 4 - 0
components/cm-module/cm-seller/home.vue

@@ -20,6 +20,8 @@
 			<page-floor :list="pageList" :userIdentity="userIdentity" :pageType='1' v-if="isRequest"></page-floor>
 			<supplier-list :supplierObj="supplierObj" v-if="isRequest"></supplier-list>
 		</view>
+		<!-- 资质证书 -->
+		<Certificate v-if="isRequest"></Certificate>
 		<!-- 活动弹窗 -->
 		<activityAlert :show="isActivity" @click="handleClick" @cancel="handleCancelClick"></activityAlert>
 		<!-- 侧边 -->
@@ -36,6 +38,7 @@
 	import notice from '@/components/cm-module/homeIndex/notice.vue'
 	import hotFloor from '@/components/cm-module/homeIndex/hotFloor.vue'
 	import pageFloor from '@/components/cm-module/homeIndex/pageFloor.vue'
+	import Certificate from '@/components/cm-module/homeIndex/certificate.vue'
 	import pageSpecial from '@/components/cm-module/homeIndex/pageSpecial.vue'
 	import supplierList from '@/components/cm-module/homeIndex/supplierList.vue'
 	import { mapState,mapMutations} from 'vuex'
@@ -48,6 +51,7 @@
 			notice,
 			hotFloor,
 			pageFloor,
+			Certificate,
 			pageSpecial,
 			supplierList
 		},

+ 106 - 0
components/cm-module/homeIndex/certificate.vue

@@ -0,0 +1,106 @@
+<template>
+	<!-- 资质证书 -->
+	<view class="container-copyright">
+		<view class="copyright-titi">
+			<view class="copyright-line"></view>
+			<view class="copyright-image">
+				<image class="image" :src="staticUrl + '/icon/icon-logo@1x.png'"></image>
+				<view class="text">资质证书</view>
+			</view>
+		</view>
+		<view class="copyright-cell">
+			<view class="copyright-cell-item" v-for="cell in certificates" :key="cell" @click="handleClick(cell.id)">
+				{{ cell.name }}
+				<text class="iconfont icon-xiayibu"></text>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default{
+		name:'certificate',
+		data() {
+			return{
+				staticUrl: this.$Static,
+				certificates:[
+					{name:'中华人民共和国增值电信业务经营许',id:1},
+					{name:'医疗器械网络交易服务第三方平台备案凭证',id:2},
+					{name:'互联网药品信息服务资格证编号(粤)-非经营性-2021-0339',id:3},
+				]
+			}
+		},
+		created(){
+			
+		},
+		computed: {
+	
+		},
+		methods:{
+			handleClick(id){// 跳转资质证书
+				// let link = 'https://www.nmpa.gov.cn/datasearch/search-info.html?nmpa=aWQ9NTk0NjAmaXRlbUlkPTJjOWJhMzg0NzU5Yzk1NzcwMTc1OWNjZmMwMmIwMzQz'
+				this.$api.navigateTo(`/pages/service/certificate?id=${id}`)
+				// this.$api.navigateTo(`/pages/h5/article/path?link=${link}`)
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+.container-copyright {
+	width: 100%;
+	height: auto;
+	float: left;
+	box-sizing: border-box;
+	padding: 24rpx;
+	background-color: #f7f7f7;
+	.copyright-titi{
+		width: 100%;
+		height: 56rpx;
+		box-sizing: border-box;
+		padding: 0 140rpx;
+		position: relative;
+		.copyright-line{
+			width: 100%;
+			height: 1px;
+			background: #CECECE;
+			margin-top: 25rpx;
+		}
+		.copyright-image{
+			position: absolute;
+			width: 215rpx;
+			left: 50%;
+			top:-22rpx;
+			margin-left: -130rpx;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			background-color: #f7f7f7;
+			padding: 0 20rpx;
+			.image {
+				width: 54rpx;
+				height: 46rpx;
+				margin-right: 16rpx;
+			}
+			.text {
+				font-size: 20rpx;
+				color: #cccccc;
+			}
+		}
+		
+	}
+	.copyright-cell{
+		width: 100%;
+		.copyright-cell-item{
+			height: 55rpx;
+			line-height: 55rpx;
+			text-align: center;
+			font-size: 24rpx;
+			color: #999999;
+			.icon-xiayibu{
+				font-size: 22rpx;
+			}
+		}
+	}
+}
+</style>

+ 4 - 0
components/cm-module/supplier/home.vue

@@ -20,6 +20,8 @@
 			<page-floor :list="pageList" :userIdentity="userIdentity" :pageType='1' v-if="isRequest"></page-floor>
 			<supplier-list :supplierObj="supplierObj" v-if="isRequest"></supplier-list>
 		</view>
+		<!-- 资质证书 -->
+		<Certificate v-if="isRequest"></Certificate>
 		<!-- 活动弹窗 -->
 		<activityAlert :show="isActivity" @click="handleClick" @cancel="handleCancelClick"></activityAlert>
 		<!-- 侧边 -->
@@ -36,6 +38,7 @@
 	import notice from '@/components/cm-module/homeIndex/notice.vue'
 	import hotFloor from '@/components/cm-module/homeIndex/hotFloor.vue'
 	import pageFloor from '@/components/cm-module/homeIndex/pageFloor.vue'
+	import Certificate from '@/components/cm-module/homeIndex/certificate.vue'
 	import pageSpecial from '@/components/cm-module/homeIndex/pageSpecial.vue'
 	import supplierList from '@/components/cm-module/homeIndex/supplierList.vue'
 	import { mapState,mapMutations} from 'vuex'
@@ -48,6 +51,7 @@
 			notice,
 			hotFloor,
 			pageFloor,
+			Certificate,
 			pageSpecial,
 			supplierList
 		},

+ 145 - 142
components/cm-module/supplier/supplierDetails.vue

@@ -2,68 +2,93 @@
 	<!-- 供应商信息 -->
 	<view class="supplier clearfix">
 		<view class="product-supplier" @click="goSupplier">
-			<view class="logo"><img :src="shopData.logo ? shopData.logo : 'https://static.caimei365.com/app/img/icon/icon-shoplogo.png'" alt=""></view>
+			<view class="logo"
+				><img
+					:src="shopData.logo ? shopData.logo : 'https://static.caimei365.com/app/img/icon/icon-shoplogo.png'"
+					alt=""
+			/></view>
 			<view class="main">
 				<view class="name">{{ shopData.name }}</view>
 				<view class="massgs">
 					<view class="label">满意度:</view>
 					<view class="p-stars">
-						<uni-stars :stars="6" :iconClass="iconClass" :iconColor="iconColor" :fontSize="36" :widthInfo="176"></uni-stars>
+						<uni-stars
+							:stars="6"
+							:iconClass="iconClass"
+							:iconColor="iconColor"
+							:fontSize="36"
+							:widthInfo="176"
+						></uni-stars>
 					</view>
 				</view>
 			</view>
 		</view>
 		<view class="sup-msg massage-t">
 			<view class="sup-conte">
-				<view class="conte-l">
-					<text class="tit-l">经营范围:</text>
-				</view>
-				<view class="conte-r" v-if="shopData.businessScopeArr.length>0">
-					<text class="age" v-for="(item,idx) in shopData.businessScopeArr" :key="idx">{{item}}</text>
-				</view>
-				<view class="conte-r" v-else>
-					<text class="tit">暂无</text>
+				<view class="conte-l"> <text class="tit-l">经营范围:</text> </view>
+				<view class="conte-r" v-if="shopData.businessScopeArr.length > 0">
+					<text class="age" v-for="(item, idx) in shopData.businessScopeArr" :key="idx">{{ item }}</text>
 				</view>
+				<view class="conte-r" v-else> <text class="tit">暂无</text> </view>
 			</view>
 		</view>
 		<view class="sup-msg massage-t">
-			<view class="sup-h1">
-				<text class="line">公司介绍</text>
-			</view>
+			<view class="sup-h1"> <text class="line">公司介绍</text> </view>
 			<view class="sup-p" :class="[shopData.info == null ? 'center' : '']">
-				{{shopData.info ? shopData.info : '暂无内容' }}
+				{{ shopData.info ? shopData.info : '暂无内容' }}
 			</view>
 		</view>
 		<view class="sup-msg massage-t">
-			<view class="sup-h1">
-				<text class="line">主打系列产品说明</text>
-			</view>
+			<view class="sup-h1"> <text class="line">主打系列产品说明</text> </view>
 			<view class="sup-p" :class="[shopData.productDesc == null ? 'center' : '']">
-				{{shopData.productDesc == null ? '暂无内容' : shopData.productDesc}}
+				{{ shopData.productDesc == null ? '暂无内容' : shopData.productDesc }}
 			</view>
 		</view>
-		<view class="sup-msg massage-t" v-if="shopData.businessLicense!=null">
-			<view class="sup-h1">
-				<text class="line">营业执照</text>
-			</view>
+		<view class="sup-msg massage-t" v-if="shopData.businessLicense != null">
+			<view class="sup-h1"> <text class="line">营业执照</text> </view>
 			<view class="sup-img">
-				<image :src="shopData.businessLicense" mode="aspectFill" @click="previewImg(shopData.businessLicense)"></image>
+				<image
+					:src="shopData.businessLicense"
+					mode="aspectFill"
+					@click="previewImg(shopData.businessLicense)"
+				></image>
 			</view>
 		</view>
-		<view class="sup-msg massage-t" v-if="shopData.medicalPracticeLicenseImg1!=null">
-			<view class="sup-h1">
-				<text class="line">公司资质</text>
-			</view>
+		<view class="sup-msg massage-t" v-if="shopData.medicalPracticeLicenseImg1 != null">
+			<view class="sup-h1"> <text class="line">公司资质</text> </view>
 			<view class="sup-imgList clearfix">
-				<view class="img"><image :src="shopData.medicalPracticeLicenseImg1" mode="" @click="previewImg(shopData.medicalPracticeLicenseImg1)"></image></view>
-				<view class="img"><image :src="shopData.medicalPracticeLicenseImg2" mode="" @click="previewImg(shopData.medicalPracticeLicenseImg2)"></image></view>
-				<view class="img"><image :src="shopData.medicalPracticeLicenseImg3" mode="" @click="previewImg(shopData.medicalPracticeLicenseImg3)"></image></view>
+				<view class="img"
+					><image
+						:src="shopData.medicalPracticeLicense"
+						mode=""
+						@click="previewImg(shopData.medicalPracticeLicense)"
+					></image
+				></view>
+				<view class="img"
+					><image
+						:src="shopData.medicalPracticeLicenseImg1"
+						mode=""
+						@click="previewImg(shopData.medicalPracticeLicenseImg1)"
+					></image
+				></view>
+				<view class="img"
+					><image
+						:src="shopData.medicalPracticeLicenseImg2"
+						mode=""
+						@click="previewImg(shopData.medicalPracticeLicenseImg2)"
+					></image
+				></view>
+				<view class="img"
+					><image
+						:src="shopData.medicalPracticeLicenseImg3"
+						mode=""
+						@click="previewImg(shopData.medicalPracticeLicenseImg3)"
+					></image
+				></view>
 			</view>
 		</view>
-		<view class="sup-msg massage-t" v-if="shopData.certificate!=null">
-			<view class="sup-h1">
-				<text class="line">授权牌照</text>
-			</view>
+		<view class="sup-msg massage-t" v-if="shopData.certificate != null">
+			<view class="sup-h1"> <text class="line">授权牌照</text> </view>
 			<view class="sup-img">
 				<image :src="shopData.certificate" mode="aspectFill" @click="previewImg(shopData.certificate)"></image>
 			</view>
@@ -72,102 +97,101 @@
 </template>
 
 <script>
-	import uniGrader from '@/components/uni-grade/uni-grade.vue'
-	export default{
-		name:'supplier',
-		components:{
-			uniGrader
-		},
-		props:{
-			shopId:{
-				type:Number
-			}
-		},
-		data() {
-			return{
-				shopData:{},
-				iconClass:'icon-aixin',
-				iconColor:'#ff9100',
-			}
-		},
-		created() {
-			this.GetSupplierHomeDeatils(this.shopId)
-		},
-		onLoad(){
-
+import uniGrader from '@/components/uni-grade/uni-grade.vue'
+export default {
+	name: 'supplier',
+	components: {
+		uniGrader
+	},
+	props: {
+		shopId: {
+			type: Number
+		}
+	},
+	data() {
+		return {
+			shopData: {},
+			iconClass: 'icon-aixin',
+			iconColor: '#ff9100'
+		}
+	},
+	created() {
+		this.GetSupplierHomeDeatils(this.shopId)
+	},
+	onLoad() {},
+	methods: {
+		previewImg(url) {
+			let mentuzArray = []
+			mentuzArray.push(url)
+			uni.previewImage({
+				urls: mentuzArray,
+				current: 0
+			})
 		},
-		methods:{
-			previewImg(url){
-				let mentuzArray = []
-				mentuzArray.push(url)
-				uni.previewImage({
-					urls: mentuzArray,
-					current: 0
-				});
-			},
-			GetSupplierHomeDeatils(shopId){//供应商详情
-				this.ShopService.GetSupplierHomeDeatils({shopId:shopId}).then(response =>{
+		GetSupplierHomeDeatils(shopId) {
+			//供应商详情
+			this.ShopService.GetSupplierHomeDeatils({ shopId: shopId })
+				.then(response => {
 					this.shopData = response.data
 					console.log(this.shopData)
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
 				})
-			}
-		},
-		onShow(){
-	
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
 		}
-	}
+	},
+	onShow() {}
+}
 </script>
 
-<style lang="scss">	
-page{
-	background: #FFFFFF;
+<style lang="scss">
+page {
+	background: #ffffff;
 }
-.supplier{
+.supplier {
 	width: 100%;
-	.sup-msg{
+	.sup-msg {
 		width: 100%;
-		padding: 24rpx 0;				
-		.sup-h1{
+		padding: 24rpx 0;
+		.sup-h1 {
 			height: 80rpx;
 			line-height: 80rpx;
 			font-size: $font-size-28;
 			color: $text-color;
 			text-align: left;
 			font-weight: bold;
-			.line{
+			.line {
 				position: relative;
 			}
 		}
 	}
-	.product-supplier{
+	.product-supplier {
 		width: 100%;
 		height: 140rpx;
-		padding:30rpx 24rpx;
+		padding: 30rpx 24rpx;
 		box-sizing: border-box;
-		background-color: #FFFFFF;
+		background-color: #ffffff;
 		position: relative;
 		box-sizing: border-box;
-		.logo{
+		.logo {
 			width: 128rpx;
 			height: 92rpx;
 			float: left;
 			border: 1px solid #efefef;
 			border-radius: 6rpx;
-			image{
+			image {
 				width: 100%;
 				height: 100%;
 				display: block;
 				border-radius: 6rpx;
 			}
 		}
-		.main{
+		.main {
 			width: 470rpx;
 			height: 92rpx;
 			float: left;
 			margin-left: 20rpx;
-			.name{
+			.name {
 				width: 100%;
 				line-height: 46rpx;
 				float: left;
@@ -175,83 +199,83 @@ page{
 				color: $text-color;
 				float: right;
 				overflow: hidden;
-				text-overflow:ellipsis;
+				text-overflow: ellipsis;
 				white-space: nowrap;
 				text-align: left;
 			}
-			.massgs{
+			.massgs {
 				width: 100%;
 				line-height: 46rpx;
 				float: left;
 				font-size: $font-size-24;
 				color: #999999;
-				.label{
+				.label {
 					float: left;
 				}
-				.p-stars{
+				.p-stars {
 					float: left;
 					margin-left: 20rpx;
 				}
 			}
 		}
 	}
-	.massage-t{
+	.massage-t {
 		width: 702rpx;
-		padding:0 24rpx;
+		padding: 0 24rpx;
 		height: auto;
-		background: #FFFFFF;
-		.sup-title{
+		background: #ffffff;
+		.sup-title {
 			width: 100%;
 			height: 40rpx;
 			margin-top: 24rpx;
 			text-align: left;
-			display: inline-block;						
+			display: inline-block;
 			line-height: 40rpx;
 			font-size: $font-size-28;
 			color: $text-color;
-			.tit-l{
+			.tit-l {
 				width: 142rpx;
 				display: inline-block;
 			}
 		}
-		.sup-stars{
+		.sup-stars {
 			width: 100%;
 			height: 40rpx;
 			margin-top: 24rpx;
 			text-align: left;
-			display: inline-block;						
+			display: inline-block;
 			line-height: 40rpx;
 			font-size: $font-size-28;
 			color: $text-color;
-			.tit-l{
+			.tit-l {
 				width: 114rpx;
 				display: inline-block;
 				text-align: right;
 				float: left;
 			}
-			.p-stars{
+			.p-stars {
 				float: left;
 				margin-left: 22rpx;
 			}
 		}
-		.sup-conte{
+		.sup-conte {
 			width: 100%;
 			margin-top: 24rpx;
-			.conte-l{
+			.conte-l {
 				width: 100%;
 				margin-bottom: 15rpx;
-				.tit-l{
+				.tit-l {
 					text-align: left;
-					display: inline-block;						
+					display: inline-block;
 					line-height: 40rpx;
 					font-size: $font-size-28;
 					color: $text-color;
 					font-weight: bold;
 				}
 			}
-			.conte-r{
+			.conte-r {
 				width: 100%;
-				.age{
+				.age {
 					display: inline-block;
 					padding: 0 20rpx;
 					background: #86b2fb;
@@ -259,52 +283,52 @@ page{
 					line-height: 42rpx;
 					text-align: center;
 					font-size: $font-size-24;
-					color: #FFFFFF;
+					color: #ffffff;
 					border-radius: 6rpx;
 					margin-right: 24rpx;
 					margin-bottom: 24rpx;
 				}
-				.tit{
+				.tit {
 					font-size: $font-size-28;
 					color: $text-color;
 					line-height: 40rpx;
 				}
 			}
 		}
-		.sup-p{
+		.sup-p {
 			line-height: 48rpx;
 			text-align: left;
 			font-size: $font-size-28;
 			color: #666666;
 			text-indent: 40rpx;
-			&.center{
+			&.center {
 				text-align: center;
 			}
 		}
-		.sup-img{
+		.sup-img {
 			width: 100%;
 			height: 542rpx;
 			padding: 24rpx 0;
-			image{
+			image {
 				width: 100%;
 				height: 100%;
 				display: block;
 			}
 		}
-		.sup-imgList{
+		.sup-imgList {
 			width: 100%;
 			height: auto;
 			padding: 24rpx 0;
-			.img{
+			.img {
 				width: 340rpx;
 				height: 260rpx;
 				float: left;
-				margin-right:22rpx;
+				margin-right: 22rpx;
 				margin-bottom: 22rpx;
-				&:nth-child(even){
+				&:nth-child(even) {
 					margin-right: 0;
 				}
-				image{
+				image {
 					width: 100%;
 					height: 100%;
 					display: block;
@@ -314,24 +338,3 @@ page{
 	}
 }
 </style>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

+ 0 - 1
components/cm-simple-swiper/cm-simple-swiper.vue

@@ -82,7 +82,6 @@ export default {
         // 真正渲染的列表
         mapList() {
             const result = this.formatSwiperList(this.data)
-            console.log(result)
             return result
         },
         // 宽

+ 102 - 0
mixins/appMixins.js

@@ -0,0 +1,102 @@
+import Vue from 'vue'
+import { mapState,mapMutations} from 'vuex'
+import authorize from '@/common/config/authorize.js'
+const appMixins = {
+    computed: {
+        ...mapState(['hasLogin'])
+    },
+    methods: {
+        ...mapMutations(['login','logout','isWxAuthorize']),
+        async getWxAuthorize(){
+            const wechatCode = await authorize.getCode('weixin')// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
+            const getUserInfo = await authorize.getUserInfo('weixin')
+            this.UserService.UserLoginAuthApplets({ 
+                code:wechatCode,
+                encryptedData:getUserInfo.encryptedData,
+                iv:getUserInfo.iv
+            })
+                .then(response =>{
+                    this.$store.commit('updateStatus',response.data)
+                    this.login(response.data)
+                    uni.setStorageSync('token',response.data.token)
+                    uni.setStorageSync('unionId',response.data.unionId)
+                })
+                .catch(error =>{
+                    this.logout(error.data)
+                    uni.setStorageSync('unionId',error.data.unionId)
+                    this.$store.commit('updateStatus',error.data)
+                    if(!this.hasLogin){
+                        if(uni.getStorageSync('isActivitySwitch')){
+                            const  lockTime = uni.getStorageSync('lockTime')
+                            const  eTime = this.diffTime(lockTime)
+                            this.$store.dispatch('setActivityFn',eTime)
+                        }else{
+                            this.$store.dispatch('setActivityFn',true)
+                        }
+                    }
+                })
+        },		
+        appUpdataRefresh(){
+            let TIME = (20*60)*1000
+            setInterval(()=>{
+                this.getWxAuthorize()
+            },TIME)
+        },
+        diffTime(t){
+            let date = Date.now()
+            return (date -t) < 2*60*1000 ? false : true
+        },
+        initSetSystemInfo() {
+            let self = this
+            uni.getSystemInfo({
+                success: function(e) {
+                    let modelmes = e.model
+                    console.log(e)
+                    if (modelmes.search('iPhone 11') !== -1 || modelmes.search('iPhone 11 Pro Max') !==
+						-1 || modelmes.search('iPhone X') != -1) { //XS,XR,XS MAX均可以适配
+                        self.$store.dispatch('setVariableFun', true)
+                    } else {
+                        self.$store.dispatch('setVariableFun', false)
+                    }
+                    // #ifndef MP
+                    Vue.prototype.StatusBar = e.statusBarHeight
+                    if (e.platform == 'android') {
+                        Vue.prototype.CustomBar = e.statusBarHeight + 50
+                        Vue.prototype.platformClass = true
+                    } else {
+                        Vue.prototype.CustomBar = e.statusBarHeight + 45
+                        Vue.prototype.platformClass = false
+                    };
+                    // #endif
+                    // #ifdef MP-WEIXIN || MP-QQ
+                    console.log(e.platform)
+                    if (e.platform == 'android') {
+                        Vue.prototype.platformClass = 'left'
+                        self.$store.dispatch('setVariableFun', false)
+                    } else {
+                        Vue.prototype.platformClass = 'center'
+                        self.$store.dispatch('setIsIphoneFun', true)
+                    }
+                    Vue.prototype.StatusBar = e.statusBarHeight
+                    Vue.prototype.fontSizeSetting = e.fontSizeSetting
+                    Vue.prototype.screenWidth = e.screenWidth
+                    let capsule = wx.getMenuButtonBoundingClientRect()
+                    Vue.prototype.capsule = capsule
+                    if (capsule) {
+                        Vue.prototype.Custom = capsule
+                        Vue.prototype.CustomBar = capsule.bottom + capsule.top - e.statusBarHeight
+                    } else {
+                        Vue.prototype.CustomBar = e.statusBarHeight + 50
+                    }
+                    // #endif		
+                    // #ifdef MP-ALIPAY
+                    Vue.prototype.StatusBar = e.statusBarHeight
+                    Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight
+                    // #endif
+                }
+            })
+        }
+    }
+}
+
+export default appMixins

+ 6 - 0
pages.json

@@ -74,6 +74,12 @@
                     "style": {
                         "navigationBarTitleText": "公告内容"
                     }
+                },
+                {
+                    "path": "certificate",
+                    "style": {
+                        "navigationBarTitleText": "资质证书"
+                    }
                 }
             ]
         },

+ 56 - 0
pages/service/certificate.vue

@@ -0,0 +1,56 @@
+<template>
+	<view class="container clearfix">
+		<image :src="imagePath" :class="imgClass" @click="previewImg" mode=""></image>
+	</view>
+</template>
+
+<script>
+	export default{
+		data() {
+			return{
+				staticUrl: this.$Static,
+				imagePath:'',
+				imgClass:'',
+				imageList:[],
+			}
+		},
+		onLoad(option){
+			this.imagePath = `${this.staticUrl}certificates/certificates-${option.id}.png`
+			this.imgClass = `image-${option.id}`
+			this.imageList.push(this.imagePath)
+		},
+		methods:{
+			previewImg () {//顶部商品图片预览
+				uni.previewImage({
+					current: 0, 	//图片索引
+					urls: this.imageList, //必须是http图片,本地图片无效
+					longPressActions:''
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		background-color: #FFFFFF;
+	}
+	.container{
+		width: 100%;
+		height: auto;
+		box-sizing: border-box;
+		padding: 0 24rpx;
+		.image-1{
+			width: 100%;
+			height: 480rpx;
+		}
+		.image-2{
+			width: 100%;
+			height: 940rpx;
+		}
+		.image-3{
+			width: 100%;
+			height: 4294rpx;
+		}
+	}
+</style>

+ 242 - 207
pages/tabBar/home/index.vue

@@ -1,276 +1,311 @@
 <template>
-	<view class="container home clearfix" :style="{paddingTop:CustomBar+'px'}">
-		<customer ref="customer" :navbar-data='nvabarData'></customer>
+	<view class="container home clearfix" :style="{ paddingTop: CustomBar + 'px' }">
+		<customer ref="customer" :navbar-data="nvabarData"></customer>
 		<!-- 主页内容 -->
-		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="5"></tui-skeleton>
+		<tui-skeleton
+			v-if="skeletonShow"
+			backgroundColor="#fafafa"
+			borderRadius="10rpx"
+			:isLoading="true"
+			:loadingType="5"
+		></tui-skeleton>
 		<view class="container-home tui-skeleton">
 			<!-- 轮播 -->
 			<banner :list="bannerImageList" v-if="isNavRequest"></banner>
 			<!-- 金刚区菜单 -->
 			<navbars :list="navBarsList" v-if="isNavRequest"></navbars>
 			<!-- 轮播公告 -->
-			<notice :list="newsList" v-if="isNavRequest && newsList.length>0"></notice>
+			<notice :list="newsList" v-if="isNavRequest && newsList.length > 0"></notice>
 			<!-- 优惠券入口 -->
 			<coupon v-if="isNavRequest && couponEntry == 1"></coupon>
 			<!-- 直播 -->
 			<page-special :templateData="templateData" v-if="isLiveRequest"></page-special>
 			<!-- 新品橱窗 -->
-			<hot-floor :list="hotListPageFloor" :usserIdentity="userIdentity" :autoplay="autoplay" v-if="isRequest && hotListPageFloor.length > 0"></hot-floor>
-		</view>	
+			<hot-floor
+				:list="hotListPageFloor"
+				:usserIdentity="userIdentity"
+				:autoplay="autoplay"
+				v-if="isRequest && hotListPageFloor.length > 0"
+			></hot-floor>
+		</view>
 		<!-- 楼层 -->
 		<view class="container-section tui-skeleton">
-			<page-floor :list="pageList" :userIdentity="userIdentity" :pageType='1' v-if="isRequest"></page-floor>
+			<page-floor :list="pageList" :userIdentity="userIdentity" :pageType="1" v-if="isRequest"></page-floor>
 			<supplier-list :supplierObj="supplierObj" v-if="isRequest"></supplier-list>
 		</view>
+		<!-- 资质证书 -->
+		<Certificate v-if="isRequest"></Certificate>
 		<!-- 侧边 -->
 		<scroll-top :isScrollTop="isScrollTop" :bottom="50"></scroll-top>
 		<!-- 活动弹窗 -->
 		<activityAlert :show="isActivity" @click="handleClick" @cancel="handleCancelClick"></activityAlert>
 		<!-- 采美豆提示弹窗 -->
-		<activityBean v-if="isActivityBean" :show="isActivityBean" :beansType="beansType" :beanNumber="beanNumber"  @cancel="handleBeanlClick"></activityBean>
+		<activityBean
+			v-if="isActivityBean"
+			:show="isActivityBean"
+			:beansType="beansType"
+			:beanNumber="beanNumber"
+			@cancel="handleBeanlClick"
+		></activityBean>
 	</view>
 </template>
 
 <script>
-	import tuiSkeleton from '@/components/tui-skeleton/tui-skeleton'
-	import authorize from '@/common/config/authorize.js'
-	import customer from '@/components/cm-module/homeIndex/customer.vue'
-	import banner from '@/components/cm-module/homeIndex/banner.vue'
-	import navbars from '@/components/cm-module/homeIndex/navbars.vue'
-	import notice from '@/components/cm-module/homeIndex/notice.vue'
-	import coupon from '@/components/cm-module/homeIndex/coupon.vue'
-	import pageFloor from '@/components/cm-module/homeIndex/pageFloor.vue'
-	import hotFloor from '@/components/cm-module/homeIndex/hotFloor.vue'
-	import pageSpecial from '@/components/cm-module/homeIndex/pageSpecial.vue'
-	import supplierList from '@/components/cm-module/homeIndex/supplierList.vue'
-	import activityAlert from '@/components/cm-module/activity/activity.vue'
-	import activityBean from '@/components/cm-module/activity/activityBean.vue'
-	import { mapState,mapMutations} from 'vuex'
-	export default {
-		components:{
-			tuiSkeleton,
-			customer,
-			banner,
-			navbars,
-			notice,
-			coupon,
-			pageFloor,
-			hotFloor,
-			pageSpecial,
-			supplierList,
-			activityAlert,
-			activityBean
-		},
-		data() {
-			return {
-				nvabarData: {				// 顶部自定义导航
-					showCapsule: 1, 		// 是否显示左上角图标  1表示显示  0表示不显示,
-					showSearch: 0,
-					title: '采美采购商城', 	// 导航栏 中间的标题
-					haveBack:false,
-					textLeft:this.$store.state.isIphone,
-					textColor:'#FFFFFF'
-				},
-				CustomBar:this.CustomBar,	// 顶部导航栏高度
-				userID:0,
-				clubStatus:'',
-				current:0,
-				mode:'round',
-				modallayer:false,
-				isLogin:false,
-				skeletonShow: true,
-				userIdentity:0,
-				flootData:[],				// 楼层
-				bannerImageList:[],			// 轮播
-				navBarsList:[],				// 导航分类
-				newsList:[],				// 公告
-				templateData:{},
-				hotListPageFloor:[],					// 新品橱窗
-				pageList:[],				// 楼层
-				supplierObj:{},				// 供应商列表
-				isScrollTop:false,
-				isRequest:false,
-				isNavRequest:false,
-				isLiveRequest:false,
-				isActivityBean:false,
-				beansType:1,
-				beanNumber:50,
-				couponEntry:2,
-				autoplay:true
-			}
-		},
-		onLoad() {
-			
-		},
-		computed: {
-			...mapState(['hasLogin','userInfo','identity','isActivity','isWxAuthorize'])
-		},
-		methods: {
-			...mapMutations(['login','logout']),
-			async GetWxAuthorize(){
-				const wechatCode = await authorize.getCode('weixin')// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
-				const getUserInfo = await authorize.getUserInfo('weixin')
-				this.UserService.UserLoginAuthApplets({ 
-					code:wechatCode,
-					encryptedData:getUserInfo.encryptedData,
-					iv:getUserInfo.iv
-				})
-				.then(response =>{
+import tuiSkeleton from '@/components/tui-skeleton/tui-skeleton'
+import authorize from '@/common/config/authorize.js'
+import customer from '@/components/cm-module/homeIndex/customer.vue'
+import banner from '@/components/cm-module/homeIndex/banner.vue'
+import navbars from '@/components/cm-module/homeIndex/navbars.vue'
+import notice from '@/components/cm-module/homeIndex/notice.vue'
+import coupon from '@/components/cm-module/homeIndex/coupon.vue'
+import pageFloor from '@/components/cm-module/homeIndex/pageFloor.vue'
+import hotFloor from '@/components/cm-module/homeIndex/hotFloor.vue'
+import Certificate from '@/components/cm-module/homeIndex/certificate.vue'
+import pageSpecial from '@/components/cm-module/homeIndex/pageSpecial.vue'
+import supplierList from '@/components/cm-module/homeIndex/supplierList.vue'
+import activityAlert from '@/components/cm-module/activity/activity.vue'
+import activityBean from '@/components/cm-module/activity/activityBean.vue'
+import { mapState, mapMutations } from 'vuex'
+export default {
+	components: {
+		tuiSkeleton,
+		customer,
+		banner,
+		navbars,
+		notice,
+		coupon,
+		pageFloor,
+		hotFloor,
+		Certificate,
+		pageSpecial,
+		supplierList,
+		activityAlert,
+		activityBean
+	},
+	data() {
+		return {
+			nvabarData: {
+				// 顶部自定义导航
+				showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
+				showSearch: 0,
+				title: '采美采购商城', // 导航栏 中间的标题
+				haveBack: false,
+				textLeft: this.$store.state.isIphone,
+				textColor: '#FFFFFF'
+			},
+			CustomBar: this.CustomBar, // 顶部导航栏高度
+			userID: 0,
+			clubStatus: '',
+			current: 0,
+			mode: 'round',
+			modallayer: false,
+			isLogin: false,
+			skeletonShow: true,
+			userIdentity: 0,
+			flootData: [], // 楼层
+			bannerImageList: [], // 轮播
+			navBarsList: [], // 导航分类
+			newsList: [], // 公告
+			templateData: {},
+			hotListPageFloor: [], // 新品橱窗
+			pageList: [], // 楼层
+			supplierObj: {}, // 供应商列表
+			isScrollTop: false,
+			isRequest: false,
+			isNavRequest: false,
+			isLiveRequest: false,
+			isActivityBean: false,
+			beansType: 1,
+			beanNumber: 50,
+			couponEntry: 2,
+			autoplay: true
+		}
+	},
+	onLoad() {},
+	computed: {
+		...mapState(['hasLogin', 'userInfo', 'identity', 'isActivity', 'isWxAuthorize'])
+	},
+	methods: {
+		...mapMutations(['login', 'logout']),
+		async GetWxAuthorize() {
+			const wechatCode = await authorize.getCode('weixin') // 根据微信的code获取用户登录状态:1已登录过 -1未登录过
+			const getUserInfo = await authorize.getUserInfo('weixin')
+			this.UserService.UserLoginAuthApplets({
+				code: wechatCode,
+				encryptedData: getUserInfo.encryptedData,
+				iv: getUserInfo.iv
+			})
+				.then(response => {
 					this.isLogin = true
-					this.userID = response.data.userId						
-					this.userIdentity = response.data.userIdentity						
-					this.clubStatus = response.data.clubStatus						
-					this.$store.commit('updateStatus',response.data)
+					this.userID = response.data.userId
+					this.userIdentity = response.data.userIdentity
+					this.clubStatus = response.data.clubStatus
+					this.$store.commit('updateStatus', response.data)
 					this.login(response.data)
-					uni.setStorageSync('token',response.data.token)
-					uni.setStorageSync('unionId',response.data.unionId)
-					if(response.data.userIdentity ==1){
+					uni.setStorageSync('token', response.data.token)
+					uni.setStorageSync('unionId', response.data.unionId)
+					if (response.data.userIdentity == 1) {
 						this.$api.redirectTo('/pages/seller/index/index')
-					}else if(response.data.userIdentity === 3){
+					} else if (response.data.userIdentity === 3) {
 						this.$api.redirectTo('/pages/supplier/index/index')
 					}
 					this.GetInitBeansInfo()
 					this.getHomeInformation()
 				})
-				.catch(error =>{
+				.catch(error => {
 					this.isLogin = false
 					this.logout()
-					uni.setStorageSync('unionId',error.data.unionId)
-					this.$store.commit('updateStatus',error.data)
+					uni.setStorageSync('unionId', error.data.unionId)
+					this.$store.commit('updateStatus', error.data)
 					this.getHomeInformation()
-					
 				})
-			},		
-			GetHomeTopDataInfo(){//直播、活动、文章模块
-				this.CommonService.GetHomeTopDataInfo({source:2}).then(response =>{
+		},
+		GetHomeTopDataInfo() {
+			//直播、活动、文章模块
+			this.CommonService.GetHomeTopDataInfo({ source: 2 })
+				.then(response => {
 					this.templateData = response.data
 					this.isLiveRequest = true
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
 				})
-			},
-			GetHomeFloorInfo(){//初始化首页楼层数据
-				this.CommonService.GetHomeDataInfo({userId:this.userID,source:2}).then(response =>{
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		GetHomeFloorInfo() {
+			//初始化首页楼层数据
+			this.CommonService.GetHomeDataInfo({ userId: this.userID, source: 2 })
+				.then(response => {
 					let data = response.data
 					this.pageList = data.homePageFloor
-					this.hotListPageFloor =  data.pageFloorList
+					this.hotListPageFloor = data.pageFloorList
 					this.supplierObj = data.supplierImage
-					setTimeout(()=>{
+					setTimeout(() => {
 						this.isRequest = true
-					},500)
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
+					}, 500)
 				})
-			},
-			GetInitBeansInfo(){//初始化采美豆信息
-				this.UserService.GetHomeObtainBeans({userId:this.userID}).then(response =>{
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		GetInitBeansInfo() {
+			//初始化采美豆信息
+			this.UserService.GetHomeObtainBeans({ userId: this.userID })
+				.then(response => {
 					this.beansType = response.data.beansType
 					this.beanNumber = response.data.num
 					this.isActivityBean = true
-				}).catch(error =>{
+				})
+				.catch(error => {
 					console.log('用户暂无采美豆推送~')
 				})
-			},
-			getHomeInformation(){//初始化首页数据	
-				this.CommonService.GetHomeModulesDataInfo({ source: 2 }).then(res =>{
+		},
+		getHomeInformation() {
+			//初始化首页数据
+			this.CommonService.GetHomeModulesDataInfo({ source: 2 })
+				.then(res => {
 					let data = res.data
 					this.bannerImageList = data.bannerList
 					this.mallPageModules = data.mallPageModules
 					this.skeletonShow = false
-                    this.navBarsList = data.topMenuList
-                    this.couponEntry = data.couponEntry
-                    this.newsList = data.annlist
-                    if(!this.hasLogin && this.couponEntry == 1){
-                    	if(uni.getStorageSync('isActivitySwitch')){
-                    		this.$store.commit('setActivity',false)
-                    	}else{
-                    		this.$store.commit('setActivity',true)
-                    	}
-                    }
+					this.navBarsList = data.topMenuList
+					this.couponEntry = data.couponEntry
+					this.newsList = data.annlist
+					if (!this.hasLogin && this.couponEntry == 1) {
+						if (uni.getStorageSync('isActivitySwitch')) {
+							this.$store.commit('setActivity', false)
+						} else {
+							this.$store.commit('setActivity', true)
+						}
+					}
 					this.GetHomeTopDataInfo()
 					this.GetHomeFloorInfo()
-					if(this.hasLogin){
+					if (this.hasLogin) {
 						this.initShoppingCartCount()
 					}
-                    this.isNavRequest = true
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
+					this.isNavRequest = true
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
 				})
-			},
-            initShoppingCartCount(){ // 获取购物车数量
-                this.OrderService.ShoppingCartCount({ userId: this.userID}).then(res =>{
-                    this.$store.commit('updateAllNum',res.data)
-                })
-            },
-			handleClick(data){
-				const pageId = 306
-				this.$api.navigateTo('/pages/user/coupon/coupon-collection')
-				this.$store.commit('setActivity',data)
-				uni.setStorageSync('lockTime',Date.now())	
-				uni.setStorageSync('isActivitySwitch',true)
-				// 友盟自定义事件
-				// if(process.env.NODE_ENV != 'development'){
-				// 	this.$uma.trackEvent('meibohui_click', {
-				// 		Um_Key_PageName: '美博会',
-				// 		Um_Key_PageCategory: '活动专题页面',
-				// 		Um_Key_SourcePage: '首页',
-				// 	})
-				// }
-			},
-			handleCancelClick(data){
-				this.$store.commit('setActivity',data)
-				uni.setStorageSync('lockTime',Date.now())
-				uni.setStorageSync('isActivitySwitch',true)	
-			},
-			handleBeanlClick(){
-				this.isActivityBean = false
-			}
-		},
-		onPageScroll(e){//实时获取到滚动的值
-			if(e.scrollTop>50){
-				this.inputActive = 'fixed'
-			}else{
-				this.inputActive = 'float'
-			}	
-			if(e.scrollTop>400){
-				this.isScrollTop = true
-			}else{
-				this.isScrollTop = false
-			}	
-		},
-		onPullDownRefresh() {//下拉刷新
-			this.getHomeInformation()
-			uni.stopPullDownRefresh()
 		},
-		onShareAppMessage(res){//分享转发
-			if (res.from === 'button') {
-		      // 来自页面内转发按钮
-		    }
-			return {
-			  title: '生美医美正品采购服务平台',
-			  path: 'pages/tabBar/home/index',
-			  imageUrl:'https://static.caimei365.com/app/img/bg/min-banner.jpg'
-			}
+		initShoppingCartCount() {
+			// 获取购物车数量
+			this.OrderService.ShoppingCartCount({ userId: this.userID }).then(res => {
+				this.$store.commit('updateAllNum', res.data)
+			})
 		},
-		onShow(){
-			this.modallayer = false
-			this.autoplay = true
-			this.GetWxAuthorize()
+		handleClick(data) {
+			const pageId = 306
+			this.$api.navigateTo('/pages/user/coupon/coupon-collection')
+			this.$store.commit('setActivity', data)
+			uni.setStorageSync('lockTime', Date.now())
+			uni.setStorageSync('isActivitySwitch', true)
+			// 友盟自定义事件
+			// if(process.env.NODE_ENV != 'development'){
+			// 	this.$uma.trackEvent('meibohui_click', {
+			// 		Um_Key_PageName: '美博会',
+			// 		Um_Key_PageCategory: '活动专题页面',
+			// 		Um_Key_SourcePage: '首页',
+			// 	})
+			// }
 		},
-		onHide() {
-		    this.autoplay = false
+		handleCancelClick(data) {
+			this.$store.commit('setActivity', data)
+			uni.setStorageSync('lockTime', Date.now())
+			uni.setStorageSync('isActivitySwitch', true)
 		},
-		
+		handleBeanlClick() {
+			this.isActivityBean = false
+		}
+	},
+	onPageScroll(e) {
+		//实时获取到滚动的值
+		if (e.scrollTop > 50) {
+			this.inputActive = 'fixed'
+		} else {
+			this.inputActive = 'float'
+		}
+		if (e.scrollTop > 400) {
+			this.isScrollTop = true
+		} else {
+			this.isScrollTop = false
+		}
+	},
+	onPullDownRefresh() {
+		//下拉刷新
+		this.getHomeInformation()
+		uni.stopPullDownRefresh()
+	},
+	onShareAppMessage(res) {
+		//分享转发
+		if (res.from === 'button') {
+			// 来自页面内转发按钮
+		}
+		return {
+			title: '生美医美正品采购服务平台',
+			path: 'pages/tabBar/home/index',
+			imageUrl: 'https://static.caimei365.com/app/img/bg/min-banner.jpg'
+		}
+	},
+	onShow() {
+		this.modallayer = false
+		this.autoplay = true
+		this.GetWxAuthorize()
+	},
+	onHide() {
+		this.autoplay = false
 	}
+}
 </script>
 
 <style lang="scss">
-	page{
-		background-color: #FFFFFF;
-	}
-	.container-section{
-		width: 100%;
-		height: auto;
-		background-color: #F7F7F7;
-	}
+page {
+	background-color: #ffffff;
+}
+.container-section {
+	width: 100%;
+	height: auto;
+	background-color: #f7f7f7;
+}
+
 </style>