Jelajahi Sumber

供应商主页

zhengjinyi 4 tahun lalu
induk
melakukan
8148c165f0

+ 101 - 0
components/cm-module/supplier/banner.vue

@@ -0,0 +1,101 @@
+<template>
+	<view>
+		<view class="swiper-banner-box" >
+			<swiper class="tui-banner-swiper tui-banner tui-skeleton-fillet" :autoplay="true" :interval="5000" :duration="500"  @change="swiperChange" :circular="true">
+				<swiper-item v-for="(item,index) in list" :key="index">
+					<image :src="item.image" class="tui-slide-image" mode="scaleToFill"/>
+				</swiper-item>
+			</swiper>
+			<view class="swiper__dots-box" v-if="list.length > 1">
+				<view v-for="(item,idx) in list" 
+					  :key="idx" 
+					  :class="[idx===current?'swiper__dots-long':'none']" 
+					  :data-index="current" class="swiper__dots-item">
+				</view>	  
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default{
+		name:"address",
+		props:{
+			list:{
+				type:Array
+			}
+		},
+		data() {
+			return{
+				current:0
+			}
+		},
+		created(){
+			
+		},
+		computed: {
+	
+		},
+		methods:{
+			swiperChange(e) {//轮播图切换
+				const index = e.detail.current;
+				this.current = index;
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.swiper-banner-box{
+		width: 100%;
+		height: 240rpx;
+		background:#FFFFFF;
+		position: relative;
+		background-size: cover;
+	}	
+	.tui-banner-swiper {
+		width: 700rpx;
+		margin: 0 auto;
+		height: 240rpx;
+		border-radius: 16rpx;
+		overflow: hidden;
+		transform: translateY(0);
+		box-shadow:0px 3px 6px rgba(225,86,22,0.08);
+		margin-top: 16rpx;
+		.banner-item{
+			border-radius: 16rpx;
+		}
+		.tui-slide-image {
+			width: 100%;
+			height: 240rpx;
+			display: block;
+		}
+	}
+	.swiper__dots-box{
+		position: absolute;
+		bottom: 30rpx;
+		left: 0;
+		right: 0;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex: 1;
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		.swiper__dots-item{
+			width: 8rpx;
+			height: 8rpx;
+			border-radius: 100%;
+			margin-left: 6px;
+			background-color:rgba(255,255,255,.7);
+		}
+		.swiper__dots-long{
+			width: 35rpx;
+			height: 8rpx;
+			border-radius: 4rpx;
+			background-color: #ffff;
+			transition: all 0.4s;
+		}
+	}
+</style>

+ 252 - 0
components/cm-module/supplier/category.vue

@@ -0,0 +1,252 @@
+<template>
+	<view class="category-container clearfix" :style="{paddingTop:CustomBar+'px'}">
+		<cm-custom :navbar-data='nvabarData'></cm-custom>
+		<!-- 头部轮播 -->
+		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="5"></tui-skeleton>
+		<view class="category-list tui-skeleton">
+			<!--顶部搜索导航栏-->
+<!-- 		<view class="'search-input-fixed">
+				<bt-search :clickPath="clickPath" :toestText='hotSearchText'></bt-search>
+			</view> -->
+			<!-- 左侧分类导航 -->
+			<scroll-view class="left-aside" scroll-y="true" scroll-with-animation :scroll-top="verticalNavTop" style="height:calc(100vh - 202rpx)" :style="{top:CustomBar+'px'}">
+				<view class="row" v-if="m.smalltypeList.length > 0" v-for="(m, index) in categoryList" :key="index" :class="[index==showCategoryIndex?'on':'']" @tap="showCategory($event,index)" :data-id="index">
+					<view class="text tui-skeleton-fillet">
+						{{m.name}}
+					</view>
+					<view class="block"></view>
+				</view>
+			</scroll-view>
+			<!--右侧子导航-->
+			<scroll-view  scroll-y="true" class="right-aside" style="height:calc(100vh - 202rpx)" :style="{top:CustomBar+'px'}">
+				<view class="category" v-if="n.smalltypeList.length > 0" v-for="(n,index) in categoryList" :key="index" v-show="index==showCategoryIndex" >
+					<view class="category-box" v-for="(o,oIndex) in n.smalltypeList" :key="oIndex">
+						<view class="title tui-skeleton-fillet">{{o.name}}</view>
+						<view class="list" v-if="o.tinytypeList.length > 0">
+							<view class="box" v-for="(pro,proIndex) in o.tinytypeList" :key="proIndex" @click.stop="navToListPage(pro,proIndex)">
+								<image :src="pro.icon" class="tui-skeleton-fillet"></image>
+								<view class="text tui-skeleton-fillet">{{pro.name}}</view>
+							</view>
+						</view>
+						<view v-else class="no-data">
+							该栏目暂无分类~
+						</view>
+					</view>
+				</view>
+			</scroll-view>
+		</view>
+	</view>
+</template>
+<script>
+	import btSearch from '@/components/uni-search/bt-search.vue'
+	import { queryGoodscategory } from "@/api/product.js"
+
+	export default {
+		components: {
+			btSearch,
+		},
+		data() {
+			return {
+				nvabarData: {		//顶部自定义导航
+					title: '商品分类',  // 导航栏 中间的标题
+					haveBack:false,
+					textLeft:this.$store.state.isIphone,
+					textColor:'#333333',
+					bgColor:'#FFFFFF'
+				},
+				isIphoneX:this.$store.state.isIphoneX,
+				CustomBar:this.CustomBar,// 顶部导航栏高度
+				skeletonShow: true,
+				headerShow:true,
+				hotSearchText: '你想要的这里都有',
+				clickPath:'/pages/search/search',
+				showCategoryIndex: 0,
+				categoryList: [],//分类列表
+				search: '',
+				cateTop: {},
+				verticalNavTop: 0,
+				CustomBar:this.CustomBar,// 顶部导航栏高度
+			}
+		},
+		created() {
+			this.getProductCate();
+		},
+		methods: {
+			// 跳转至商品列表
+			navToList(id){
+				this.$api.navigateTo(`/pages/product/list?cate_id=${id}`)
+			},
+			// 获取商品分类列表
+			getProductCate () {
+				queryGoodscategory().then(res =>{
+					this.categoryList = res.data
+					// 查询第一个拥有二级菜单的子菜单
+					for (let i = 0; i < this.categoryList.length; i++) {
+						if (this.categoryList[i].smalltypeList.length > 0) {
+							this.showCategoryIndex = i;
+							break;
+						}
+					}
+					this.skeletonShow = false;
+				}).catch(res =>{
+					this.$util.msg(res.msg,2000);
+				})
+			},
+			showCategory(e,index){//分类切换显示
+				this.showCategoryIndex = index;
+				this.verticalNavTop = (e.currentTarget.dataset.id - 1) * 50
+			},
+			toSearch () {// 跳转至搜索详情页
+				uni.navigateTo({
+					url: `/pages/search/search?search=${JSON.stringify(this.search)}`
+				})
+			},
+			navToListPage(pro,index){//分类导航跳转
+				let self = this;
+				uni.setStorage({
+					key: 'commodity_id',
+					data: pro.tinyTypeID,
+					success: function () {
+						self.$api.navToListPage({type:'4',value:pro.name,id:pro.tinyTypeID});
+					}
+				})
+			}
+		}
+	}
+</script>
+<style scoped lang="scss">
+	page {
+		background-color: #fff;
+	}
+	.search-input-fixed{
+		width: 100%;
+		height:auto;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 1000;
+		background: #FFFFFF;
+		border-bottom: 1px solid #F7F7F7;
+	}	
+	.category-container{
+		height: 100%;
+	}
+	/*模块分类*/
+	.category-list{
+		width: 100%;
+		background-color: #fff;
+		display: flex;
+		
+		.left-aside,.right-aside{
+			position: absolute;
+			/*  #ifdef  APP-PLUS  */
+			top: calc(100rpx + var(--status-bar-height));
+			/*  #endif  */
+			bottom: 0rpx;
+		}
+		.left-aside{
+			width: 200rpx;
+			left: 0rpx;
+			background-color: #f2f2f2;
+			.row{
+				width: 100%;
+				height: 100rpx;
+				display: flex;
+				align-items: center;
+				position: relative;
+				.text{
+					width: 100%;
+					position: relative;
+					font-size: $font-size-28;
+					display: flex;
+					justify-content: center;
+					color: $text-color;
+					/* transition: transform 0.3s ease;*/
+					transition-property: transform;
+					transition-duration: 0.2s;
+					transition-timing-function: ease;
+				}
+				.block{
+					position: absolute;
+					width: 0rpx;
+					left: 0;
+					/* transition: transform 0.3s ease;*/
+					transition-property: transform;
+					transition-duration: 0.2s;
+					transition-timing-function: ease;
+				}
+				&.on{
+					height: 100rpx;
+					background-color: #fff;
+					.text{
+						font-size: $font-size-28;
+						color: $color-system;
+					}
+					.block{
+						width: 10rpx;
+						height: 60rpx;
+						top: 20rpx;
+						background-color: $color-system;
+						border-radius: 0 15rpx 15rpx 0;
+					}
+				}
+			}
+		}
+		.right-aside{
+			width: 550rpx;
+			left: 200rpx;
+			background: #FFFFFF;
+			.category{
+				width: calc(100%);
+				padding: 0 15rpx 20rpx 0;
+				background: #F7F7F7;
+				.category-box{
+					background: #FFFFFF;
+					margin-bottom: 20rpx;
+					.title{
+						padding: 0 24rpx;
+						line-height: 80rpx;
+						height: 80rpx;
+						text-align: left;
+						color: $text-color;
+						font-size: $font-size-26;
+						border-bottom: 1px solid #F7F7F7;
+						font-weight: 600;
+					}
+					.list{
+						margin-top: 24rpx;
+						width: 100%;
+						display: flex;
+						flex-wrap: wrap;
+						.box{
+							width: calc(71.44vw / 3);
+							margin-bottom: 40rpx;
+							display: flex;
+							justify-content: center;
+							align-items: center;
+							flex-wrap: wrap;
+							image{
+								width: 140rpx;
+								height: 140rpx;
+							}
+							.text{
+								margin-top: 8rpx;
+								width: 100%;
+								display: flex;
+								justify-content: center;
+								font-size: $font-size-24;
+							}
+						}
+					}
+					.no-data {
+						text-align: center;
+						margin: 30rpx 0;
+						color: #999999;
+						font-size: 24rpx;
+						line-height: 80rpx;
+					}
+				}
+			}
+		}
+	}
+</style>

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

@@ -0,0 +1,771 @@
+<template>
+	<view class="container home clearfix" :style="{paddingTop:CustomBar+'px'}">	
+		<cm-custom :navbar-data='nvabarData'></cm-custom>
+		<!-- 头部轮播 -->
+		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="5"></tui-skeleton>
+		<view class="container-home tui-skeleton">
+			<view class="swiper-banner-box" >
+				<swiper class="tui-banner-swiper tui-banner tui-skeleton-fillet" :autoplay="true" :interval="5000" :duration="500"  @change="swiperChange" :circular="true">
+					<swiper-item v-for="(item,index) in bannerImageList" :key="index">
+						<image :src="item" class="tui-slide-image" mode="scaleToFill"/>
+					</swiper-item>
+				</swiper>
+				<view class="swiper__dots-box" v-if="bannerImageList.length > 1">
+					<view v-for="(item,idx) in bannerImageList" 
+						  :key="idx" 
+						  :class="[idx===current?'swiper__dots-long':'none']" 
+						  :data-index="current" class="swiper__dots-item">
+					</view>	  
+				</view>
+			</view>
+			<view class="cate-section clearfix">
+				<!-- 自定义分类导航栏 -->
+				<view class="tabbar clearfix">
+					<view class="cate-item" v-for="(nav,idx) in productsClassifyList" :key="idx" @click.stop="navigateToGoods(nav)">
+						<image class="tui-skeleton-circular" :src="nav.classifyImage"></image>
+						<text class="tui-skeleton-fillet">{{nav.classifyName}}</text>
+					</view>
+				</view>
+				<!-- 优选分类 -->
+				<view class="tabbar bot clearfix">
+					<view class="cate-item-info" @click.stop="this.$api.navToListPage({type:'1',value:firstModulesName})">
+						<image class="tui-skeleton-circular" :src="firstModulesImage"></image>
+						<text class="tui-skeleton-fillet">{{firstModulesName}}</text>
+					</view>
+					<view class="cate-item-info" @click.stop="this.$api.navToListPage({type:'2',value:secondModulesName})">
+						<image class="tui-skeleton-circular" :src="secondModulesImage"></image>
+						<text class="tui-skeleton-fillet">{{secondModulesName}}</text>
+					</view>
+					<view class="cate-item-info" @click="showTost">
+						<image class="tui-skeleton-circular" :src="navInforList[0].icon"></image>
+						<text class="tui-skeleton-fillet">{{navInforList[0].text}}</text>
+					</view>
+					<view class="cate-item-info">
+						<!-- #ifdef MP-WEIXIN -->
+						<button class="contact-btn" open-type="contact" @bindcontact="handleContact">
+							<image class="tui-skeleton-circular" :src="navInforList[1].icon"></image>
+						</button>	
+						<!-- #endif -->
+						<text class="tui-skeleton-fillet">{{navInforList[1].text}}</text>
+					</view>
+				</view>
+			</view>
+			<!-- 热销商品 -->
+			<view class="hotgoods-section">
+				<view class="s-header" @click="this.$api.navToListPage({type:'3',value:thirdModulesName})">
+					<text class="tip tui-skeleton-fillet">{{thirdModulesName}}</text>
+					<text class="tit tui-skeleton-fillet">更多</text>
+					<text class="iconfont icon-xiayibu"></text>
+				</view>
+				<view class="hotgoods-swiper">
+					<view class="scoll-wrapper clearfix">
+						<view class="floor-item" v-for="(item, index) in organizeProducts" :key="index" @click.stop="navToDetailPage(item.productID)">
+							<image class="tui-skeleton-fillet" :src="item.mainImage" mode="aspectFill"></image>
+							<view class="floor-item-content">
+								<view class="title tui-skeleton-rect">
+									<text class="mclap">{{item.name}}</text>
+								</view>
+								<view class="floor-item-act">
+									<template v-if="item.actStatus==1">
+										<view class="floor-tags" v-if="item.promotions.type == 1 && item.promotions.mode==1">{{item.promotions.name}}<text v-if="hasLogin">:¥{{item.price | NumFormat}}</text></view>
+										<view class="floor-tags" v-else>{{item.promotions.name}}</view>	
+									</template>
+									<template v-if="item.actStatus ==0  &&  item.ladderPriceFlag==1">
+										<view class="floor-tags">阶梯价格</view>	
+									</template>	
+								</view>
+								<view class="" v-if="hasLogin">
+									<view v-if="userIdentity == 4">
+										<view class="title-none" v-show="item.price1TextFlag == '1'">
+											<text class="p big">¥未公开价格</text>
+										</view>
+										<view class="title-none" v-show="item.price1TextFlag == '2'">
+											<text class="p big">¥价格仅会员可见</text>
+											<text class="p btn" @click.stop="this.$api.navigateTo(`/pages/login/apply?clubStatus=${clubStatus}`)">去升级</text>
+										</view>
+										<view class="price tui-skeleton-rect" v-show="item.price1TextFlag == '0'">
+											<text class="p sm">¥</text>
+											<text class="p big">{{ item.price | NumFormat}}</text>
+										</view>
+									</view>
+									<view v-else>
+										<view class="title-none" v-if="item.price1TextFlag == '1'">
+											<text class="p big">未公开价格</text>
+										</view>
+										<view class="price tui-skeleton-rect" v-else :class="item.promotions.type == 1 && item.promotions.mode==1 ? 'none' : ''">
+											<text class="p sm">¥</text>
+											<text class="p big">{{item.price | NumFormat}}</text>
+										</view>
+									</view>
+								</view>
+								<view v-else class="no-price">
+									<view class="p-stars">
+										<text class="p-no">¥</text>
+										<uni-stars :stars="parseInt(item.price1Grade)" :fontSize="36" :widthInfo="180"></uni-stars>
+									</view>
+								</view>	
+							</view>
+						</view>
+					</view>
+				</view>	
+			</view>
+			<!-- 底部 -->
+			<view class="footer-section ">
+				<view class="s-header member  tui-skeleton-fillet">
+					<text class="tip">医美机构正品联盟</text>
+				</view>
+				<view class="f-content tui-skeleton-fillet" @click="navto('/pages/service/member')">
+					<image class="tui-banner" src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AEwQlAAjGFdpI2LM357.png" mode="scaleToFill"></image>
+				</view>
+				<view class="f-tab-section">
+					<!-- 优选分类 -->
+					<view class="tabbar clearfix">
+						<view class="cate-item" @click="showTost">
+							<image class="tui-skeleton-circular" :src="navServerList[0].icon"></image>
+							<text class="tui-skeleton-fillet">{{navServerList[0].text}}</text>
+						</view>
+						<view class="cate-item" @click="navto(navServerList[1].path)">
+							<image class="tui-skeleton-circular" :src="navServerList[1].icon"></image>
+							<text class="tui-skeleton-fillet">{{navServerList[1].text}}</text>
+						</view>
+						<view class="cate-item" @click="navto(navServerList[2].path)">
+							<image class="tui-skeleton-circular" :src="navServerList[2].icon"></image>
+							<text class="tui-skeleton-fillet">{{navServerList[2].text}}</text>
+						</view>
+						<view class="cate-item" @click="telPhoneTo">
+							<image class="tui-skeleton-circular" :src="navServerList[3].icon"></image>
+							<text class="tui-skeleton-fillet">{{navServerList[3].text}}</text>
+						</view>
+					</view>
+				</view>
+				<view class="f-text tui-skeleton-fillet">
+					<view class="">
+						<image class="logo" src="../../../static/logo-c@2x.png" mode=""></image>
+						<text class="">采美365网</text>
+					</view>
+				</view>
+			</view>	
+		</view>
+		<!-- 活动弹窗 -->
+		<!-- <activityAlert :show="isActivity" @click="handleClick" @cancel="handleCancelClick"></activityAlert> -->
+		<!-- 透明模态层 -->
+		<modal-layer v-if='modallayer'></modal-layer>
+	</view>
+</template>
+
+<script>
+	import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
+	import authorize from '@/common/config/authorize.js'
+	import modalLayer from "@/components/modal-layer"
+	import cmCustom from '@/components/cm-module/homeIndex/customer.vue'
+	import activityAlert from '@/components/cm-module/activity/activity_on_1.vue'
+	import uniStars from '@/components/uni-stars/uni-stars.vue'
+	import { userInfoLogin, queryHomeInfo } from "@/api/use.js"
+	import { mapState,mapMutations} from 'vuex';
+	export default {
+		components:{
+			tuiSkeleton,
+			modalLayer,
+			cmCustom,
+			uniStars,
+			activityAlert
+		},
+		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,
+				bannerImageList:[],
+				skeletonShow: true,
+				userIdentity:'',
+				organizeProducts:[],//常用商品
+				productsClassifyList:[
+					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'},
+					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'},
+					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'},
+					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'},
+					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'}
+				],//分类导航
+				firstModulesName:'https://img.caimei365.com/group1/M00/03/8C/Cmis215XHXSAAZU0AACaPrfbB8I435.png', //优惠模块1
+				secondModulesName:'', //优惠模块2
+				firstModulesImage:'https://img.caimei365.com/group1/M00/03/8C/Cmis215XHXSAAZU0AACaPrfbB8I435.png',//优惠模块icon1
+				secondModulesImage:'',//优惠模块icon2
+				thirdModulesName:'', //优惠模块3
+				navInforList:[
+					{text:'会员中心',icon:'https://img.caimei365.com/group1/M00/03/B0/Cmis217Z9LCABdf_AAAfdMmM_xY655.png'},
+					{text:'在线客服',icon:'https://img.caimei365.com/group1/M00/03/B0/Cmis217Z9BSAXPobAAApo6I0Tlo684.png'}
+				],
+				navServerList:[
+					{text:'会员优惠',icon:'../../../static/temp/server1@2x.png',path:'/pages/service/member'},
+					{text:'售后无忧',icon:'../../../static/temp/server2@2x.png',path:'/pages/service/aftersale'},
+					{text:'购物须知',icon:'../../../static/temp/server3@2x.png',path:'/pages/service/shoppingnotice'},
+					{text:'联系我们',icon:'../../../static/temp/server4@2x.png',path:''},
+				]
+			}
+		},
+		created() {
+			this.$api.getStorage().then((resolve) =>{
+				this.userID = resolve.userID
+				this.getSellerHomeInfo()
+			})
+		},
+		filters: {
+			NumFormat:function(text) {//处理金额
+				return Number(text).toFixed(2);
+			},
+		},
+		computed: {
+			...mapState(['hasLogin','userInfo','isActivity'])
+		},
+		methods: {
+			getSellerHomeInfo(){
+				this.getHomeInformation()
+				this.getOrganizeProducts()
+			},		
+			getHomeInformation(){		
+				this.CommonService.GetHomeModulesDataInfo({}).then(res =>{
+					let data = res.data;
+					this.bannerImageList = data.bannerImageList
+					this.mallPageModules = data.mallPageModules
+					this.firstModulesName= data.firstModulesName
+					this.secondModulesName= data.secondModulesName
+					this.firstModulesImage= data.firstModulesImage
+					this.secondModulesImage= data.secondModulesImage
+					this.thirdModulesName= data.thirdModulesName
+					this.productsClassifyList = data.productsClassifyList
+					this.skeletonShow = false;
+					this.$store.commit('updateAllNum',data.shoppingCartCount)
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			getOrganizeProducts(){//获取模块三商品
+				this.ProductService.queryProductPreferred({userId:this.userID,preferredFlag:100,pageNum:1,pageSize:6}).then(res =>{
+					this.organizeProducts = res.data.results
+					this.getProductPrice()
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			getProductPrice(){//获取商品或者活动价格
+				let productIdArr = [];
+				let productIds ='';
+				this.organizeProducts.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
+					productIdArr.push(item.productID)
+				})
+				productIds = productIdArr.join(",");
+				this.ProductService.querySearchProductPrice({userId: this.userID,productIds:productIds}).then(response =>{
+					this.organizeProducts = this.ReturnNewProducts(this.organizeProducts,response.data);
+					this.skeletonShow = false;
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			ReturnNewProducts(Array,list){
+				let NewArray = []
+				Array.map(item=>{
+					for (let i = 0; i < list.length; i++) {
+						if( item.productID == list[i].productId ){
+							NewArray.push(Object.assign(item,list[i])) 
+						}
+					}
+				});
+				return NewArray
+			},
+			//轮播图切换修改背景色
+			swiperChange(e) {
+				const index = e.detail.current;
+				this.current = index;
+			},
+			formatMoney(num){
+				return num.toString().replace(/\d+/, function (n) { // 先提取整数部分
+					return n.replace(/(\d)(?=(\d{3})+$)/g, function ($1) { // 对整数部分添加分隔符
+						return $1 + ",";
+					});
+				});
+			},
+			handleBannerActivity(item,index){
+				switch(index){
+					case 0:
+						this.$api.navigateTo(`/h5/pages/activity/activity_mid`)
+						break;
+				}
+			},
+			handleClick(data){
+				this.$api.navigateTo(`/h5/pages/activity/activity_mid`)
+				this.$store.commit('setActivity',data)
+			},
+			handleCancelClick(data){
+				this.$store.commit('setActivity',data)
+			},
+			//分类导航跳转
+			navToListPage(nav){
+				let self = this;
+				uni.setStorage({
+					key: 'commodity_id',
+					data: nav.id,
+					success: function () {
+						self.$api.navToListPage({type:'0',value:nav.classifyName,id:nav.id});
+					}
+				})
+			},
+			navigateToGoods(nav){
+				let self = this;
+				uni.setStorage({
+					key: 'commodity_id',
+					data: nav.id,
+					success: function () {
+						self.$api.navigateToGoods({type:'0',value:nav.classifyName,id:nav.id});
+					}
+				})
+			},
+			navToDetailPage(id) {//跳转商品详情页
+				this.modallayer = true;
+				this.$api.navigateTo(`/pages/goods/product?id=${id}`)
+				this.modallayer = false;
+			},
+			handleContact(e){
+				console.log(e.detail.path)
+				console.log(e.detail.query)
+			},
+			showTost(){
+				this.$util.msg("正在开发中,敬请期待~",2000)
+				// uni.navigateToMiniProgram({
+				// 	appId: 'wx5a5cda32926f55ac',
+				// 	path: '/pages/tabBar/home/home',
+				// 	extraData: {
+				// 		'data1': 'test'
+				// 	},
+				// 	envVersion: 'develop',
+				// 	success(res) {
+				// 		console.log(res)
+				// 		// 打开成功
+				// 	}
+				// })
+			},
+			navto(url){
+				this.$api.navigateTo(url)
+			},
+			swiperNavtopage(link){
+				this.$api.navigateTo(`/h5/pages/activity/activity?productID=4204&path=${link}`)
+			},
+			telPhoneTo(){
+				let self = this;
+				this.$api.get('/home/afterSale',{organizeID:this.userOrganizeID}, 
+					response => {
+						console.log(response.data.contactNumber)
+						uni.makePhoneCall({
+							phoneNumber:response.data.contactNumber //仅为示例
+						});
+					}
+				)	
+			}
+		},
+		onPageScroll(e){//实时获取到滚动的值
+			if(e.scrollTop>50){
+				this.inputActive = 'fixed'
+			}else{
+				this.inputActive = 'float'
+			}	
+		},
+		onPullDownRefresh() {//下拉刷新
+			this.getHomeInformation()
+			this.getOrganizeProducts()
+			uni.stopPullDownRefresh()
+		},
+		onShareAppMessage(res){//分享转发
+			if (res.from === 'button') {
+		      // 来自页面内转发按钮
+		    }
+			return {
+			  title: '采美采购商城-生美/医美采购服务平台',
+			  path: 'pages/tabBar/home/home',
+			  imageUrl:'https://img.caimei365.com/group1/M00/03/8C/Cmis215XHXSAWWkhAAXDP4-6m_c397.png'
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page,.home{
+		width: 100%;
+		height: auto;
+	}	
+	.container-home{
+		background: #FFFFFF;
+	}
+	.swiper-banner-box{
+		width: 100%;
+		height: 360rpx;
+		padding-top:100rpx;
+		background:#FFFFFF url(https://img.caimei365.com/group1/M00/03/B0/Cmis217Z9LCALu9wAAAv45Bdpsk814.png)no-repeat;
+		position: relative;
+		background-size: cover;
+	}	
+	.tui-banner-swiper {
+		width: 700rpx;
+		margin: 0 auto;
+		height: 340rpx;
+		border-radius: 24rpx;
+		overflow: hidden;
+		transform: translateY(0);
+		box-shadow:0px 3px 6px rgba(225,86,22,0.08);
+		margin-top: 16rpx;
+		.banner-item{
+			border-radius: 24rpx;
+		}
+		.tui-slide-image {
+			width: 100%;
+			height: 340rpx;
+			display: block;
+		}
+	}
+	.swiper__dots-box{
+		position: absolute;
+		bottom: 30rpx;
+		left: 0;
+		right: 0;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex: 1;
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		.swiper__dots-item{
+			width: 8rpx;
+			height: 8rpx;
+			border-radius: 100%;
+			margin-left: 6px;
+			background-color:rgba(255,255,255,.7);
+		}
+		.swiper__dots-long{
+			width: 35rpx;
+			height: 8rpx;
+			border-radius: 4rpx;
+			background-color: #ffff;
+			transition: all 0.4s;
+		}
+	}
+	/* 分类 */
+	.cate-section {
+		width: 702rpx;
+		height: auto;
+		padding:34rpx 24rpx 14rpx 24rpx; 
+		background: #fff;
+		.tabbar{
+			margin-bottom: 26rpx;
+			&.bot{
+				padding: 16rpx 24rpx;
+				border-radius: 20rpx;
+				box-shadow:0px 3px 6px rgba(225,86,22,0.07);
+				border: 1px solid #F9F9F9;
+			}
+		}
+		.cate-item {
+			width: 118rpx;
+			margin-right:28rpx;
+			display: flex;
+			float: left;
+			flex-direction: column;
+			align-items: center;
+			font-size: $font-size-26;
+			color: $text-color;
+			line-height: 36rpx;
+			&:last-child{
+				margin-right: 0;
+			}
+			&:nth-child(5n){
+				margin-right: 0;
+			}
+			image {
+				width: 90rpx;
+				height: 90rpx;
+				margin-bottom: 8rpx;
+				border-radius: 32rpx;
+			}	
+		}
+		.cate-item-info {
+			width: 118rpx;
+			margin-right:59.5rpx;
+			display: flex;
+			float: left;
+			flex-direction: column;
+			align-items: center;
+			font-size: $font-size-26;
+			color: $text-color;
+			line-height: 36rpx;
+			&:last-child{
+				margin-right: 0;
+			}
+			image {
+				width: 90rpx;
+				height: 90rpx;
+				margin-bottom: 16rpx;
+				border-radius: 32rpx;
+			}	
+			button.contact-btn{
+				width: 118rpx;
+				height: 90rpx;
+				margin: 0;
+				padding: 0;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				box-sizing: border-box;
+				text-align: center;
+				text-decoration: none;
+				border-radius: 0;
+				-webkit-tap-highlight-color: transparent;
+				overflow: hidden;
+				background-color:#FFFFFF;
+				margin-bottom: 16rpx;
+				image{
+					width: 90rpx;
+					height: 90rpx;
+					margin-bottom: 0;
+					border-radius: 32rpx;
+				}
+			}
+		}
+	}
+	.hotgoods-section{
+		background: #FFFFFF;
+		.s-header{
+			display:flex;
+			align-items:center;
+			height: 50rpx;
+			line-height: 50rpx;
+			border-radius: 20rpx 20rpx 0 0;
+			.tip{
+				flex: 4;
+				font-size: 30rpx;
+				color: $text-color;
+				font-weight: bolder;
+				padding-left: 24rpx;
+			}
+			.tit{
+				flex: 4.4;
+				font-size: $font-size-28;
+				color: $text-color;
+				text-align: right;
+			}
+			.icon-xiayibu{
+				flex: 0.6;
+				color: $text-color;
+				text-align: left;
+				font-size: $font-size-24;
+			}
+		}
+	}	
+	.hotgoods-swiper{
+		width: 100%;
+		height: auto;				
+		overflow: hidden;
+		padding-top: 24rpx;
+		background: #FFFFFF;
+		border-radius: 20rpx;
+		margin-bottom: 20rpx;
+		// box-shadow:0px 3px 6px rgba(225,86,22,0.07);
+		.scoll-wrapper{
+			width: 702rpx;
+			height: auto;
+			padding:24rpx 24rpx 0 24rpx;
+			background: #F7F7F7;
+			border-radius: 20rpx;
+			.floor-item{
+				width: 341rpx;
+				height: 568rpx;
+				margin-right: 20rpx;
+				font-size: $font-size-24;
+				color: $text-color;
+				background: #FFFFFF;
+				line-height: 36rpx;
+				border-radius: 20rpx;
+				margin-bottom: 20rpx;
+				float: left;
+				box-sizing: border-box;
+				padding-bottom: 16rpx;
+				&:nth-child(2n){
+					margin-right: 0;
+				}
+				image{
+					width: 341rpx;
+					height: 341rpx;
+					border-radius: 20rpx 20rpx 0 0;
+					display: block;
+					margin-bottom: 20rpx;
+				}
+				.floor-item-content{
+					width: 311rpx;
+					padding: 0 15rpx;
+				}
+				.floor-item-act{
+					display: block;
+					width: 100%;
+					height: 68rpx;
+					text-align: center;
+					box-sizing: border-box;
+					padding: 16rpx 0;
+					margin-top: 8rpx;
+					.floor-tags{
+						float: left;
+						height: 36rpx;
+						border-radius: 4rpx;
+						background-color: rgba(225, 86, 22, 0.1);
+						line-height: 36rpx;
+						color: $color-system;
+						text-align: center;
+						display: inline-block;
+						padding:0 16rpx;
+						font-size: $font-size-20;
+					}
+				}
+				.title-none{
+					font-size: $font-size-26;
+					color: #FF2A2A;
+					line-height: 44rpx;
+					.btn{
+						display: inline-block;
+						float: right;
+						width: 112rpx;
+						height: 44rpx;
+						background: $btn-confirm;
+						line-height: 44rpx;
+						font-size: $font-size-24;
+						color: #FFFFFF;
+						text-align: center;
+						border-radius: 22rpx;
+						margin-top: 17rpx;
+					}
+				}
+				.title{
+					width: 100%;
+					height: 72rpx;
+					display: flex;
+					flex-direction: column;
+					.mclap{
+						width: 100%;
+						line-height: 36rpx;
+						text-overflow:ellipsis;
+						display: -webkit-box;
+						word-break: break-all;
+						-webkit-box-orient: vertical;
+						-webkit-line-clamp: 2;
+						overflow: hidden;
+						font-size: 26rpx;
+					}
+				}
+				.no-price{
+					height: 54rpx;
+					line-height: 54rpx;
+					display: flex;
+					box-sizing: border-box;
+					.p-no{
+						font-size: $font-size-30;
+						color: $text-color;
+						display: block;
+						float: left;
+					}
+					.p-stars{
+						width: 230rpx;
+						float: left;
+					}
+				}
+				.price{
+					color: #FF2A2A;
+					line-height: 44rpx;
+					&.none{
+						text-decoration: line-through;
+						color: #999999;
+					}
+					.sm{
+						font-size: $font-size-24;
+					}
+					.big{
+						font-size: $font-size-28;
+					}
+				}
+			}
+		}
+	}
+	.footer-section{
+		width: 702rpx;
+		padding: 0  24rpx 0 24rpx;
+		background: #FFFFFF;
+		border-radius: 20rpx;
+		.s-header{
+			display:flex;
+			align-items:center;
+			height: 80rpx;
+			line-height: 80rpx;
+			.tip{
+				flex: 1;
+				font-size: 30rpx;
+				color: $text-color;
+				font-weight: bolder;
+			}
+		}
+		.f-content{
+			width: 100%;
+			image{
+				width: 100%;
+				height: 350rpx;
+			}
+		}
+		/*底部服务导航*/
+		.f-tab-section {
+			width: 100%;
+			height: auto;
+			padding: 38rpx 0; 
+			background: #fff;
+			/*底部服务导航*/
+			.cate-item {
+				width: 99rpx;
+				margin-right: 102rpx;
+				float: left;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				font-size: $font-size-24;
+				color: $text-color;
+				&:last-child{
+					margin-right: 0;
+				}
+				image {
+					width: 75rpx;
+					height: 75rpx;
+					margin-bottom: 8rpx;
+					border-radius: 50%;
+				}
+			}
+		}	
+		.f-text{
+			.logo{
+				width: 80rpx;
+				height: 80rpx;
+				float: left;
+				margin: 0 6rpx;
+			}
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			font-size: $font-size-24;
+			color: $text-color;
+			line-height: 80rpx;
+			padding-top: 20rpx;
+		}
+	}
+</style>

+ 516 - 0
components/cm-module/supplier/user.vue

@@ -0,0 +1,516 @@
+<template>
+	<view class="container user clearfix">
+		<cm-custom :navbar-data='nvabarData'></cm-custom>
+		<view class="user-section">
+			<view class="header" :style="{height:(CustomBar+90)-StatusBar+'px',paddingTop:CustomBar+'px',background:'url('+ bgImgUrl +')',backgroundSize:'cover'}">
+				<view class="header-main" v-if="!hasLogin">
+					<view class="header-icon"><image :src="headpic == null? '../../../static/temp/icon-seller@3x.png' : headpic" mode=""></image></view>
+					<view class="header-text">
+						<view class="user-item">
+							<text class="u-h1">{{name}}</text>
+							<text class="u-tips">供应商</text>
+						</view>
+						<view class="user-item"><text class="u-shop">我的店铺</text><text class="iconfont icon-jinrudianpu"></text></view>
+					</view>
+				</view>
+				<!-- 订单 -->
+				<view class="user-order">
+					<view class="tab-title" @click="navigator('/seller/pages/order/order-list?listType=0')">
+						<text class="cell-tit">我的商品</text>
+					</view>
+					<view class="order-section">
+						<view class="order-item" @click="navigator('/seller/pages/order/order-list?listType=1')" hover-class="common-hover"  :hover-stay-time="50">
+							<view class="order-icon">
+								<text class="iconfont icon-quanbushangpin"></text>
+								<text 	v-if="beforeConfirmCount>0" 
+										class="uni-badge uni-badge-error uni-small uni-badge--small icon-num" 
+										:class="[beforeConfirmCount < 10 ? 'goleft':'']">
+										{{beforeConfirmCount >= 99? '99+' : beforeConfirmCount}}
+								</text>
+							</view>
+							<text class="order-t">全部商品</text>
+						</view>
+						<view class="order-item" @click="navigator('/seller/pages/order/order-list?listType=2')"  hover-class="common-hover" :hover-stay-time="50">
+							<view class="order-icon">
+								<text class="iconfont icon-yishangjia"></text>
+								<text  v-if="beforePayCount >0" 
+									   class="uni-badge uni-badge-error uni-small uni-badge--small icon-num " 
+									   :class="[beforePayCount < 10 ? 'goleft':'']">
+									   {{beforePayCount >= 99? '99+' : beforePayCount}}
+								</text>
+							</view>
+							<text class="order-t">已上架</text>
+						</view>
+						<view class="order-item" @click="navigator('/seller/pages/order/order-list?listType=3')" hover-class="common-hover"  :hover-stay-time="50">
+							<view class="order-icon">
+								<text class="iconfont icon-yixiajia"></text>
+								<text   v-if="beforeShipCount >0" 
+										class="uni-badge uni-badge-error uni-small uni-badge--small icon-num" 
+										:class="[beforeShipCount < 10 ? 'goleft':'']">
+										{{beforeShipCount >= 99? '99+' : beforeShipCount}}
+								</text>
+							</view>
+							<text class="order-t">已下架</text>
+						</view>
+					</view>
+				</view>
+			</view>
+			<!-- 底部跳转 -->
+			<view class="foot-list">
+				<view class="list-cell-item">
+					<view class="list-cell" hover-class="cell-hover" :hover-stay-time="50" @click="navigator('')">
+						<text class="cell-icon"><text class="iconfont icon-wodedingdan"></text></text>
+						<text class="cell-tit">我的订单</text>
+						<text class="cell-more iconfont icon-xiayibu"></text>
+						<text class="cell-more"></text>
+					</view>
+				</view>	
+				<view class="list-cell-item">
+					<view class="list-cell"  v-for="(item, index) in firstList" :key="index" @click="navigator(item.path)" hover-class="cell-hover" :hover-stay-time="50">
+						<text class="cell-icon"><text class="iconfont" :class="item.icon"></text></text>
+						<text class="cell-tit">{{item.name}}</text>
+						<text 	v-if="index == 0 && orderNum >0"
+								class="uni-badge uni-badge-error uni-small uni-badge--small icon-num">
+								{{orderNum == 99 ? '99+' : orderNum}}
+						</text>
+						<text class="cell-more iconfont icon-xiayibu"></text>
+					</view>
+				</view>
+				<view class="list-cell-item">
+					<view class="list-cell" hover-class="cell-hover" :hover-stay-time="50">
+						<text class="cell-icon"><text class="iconfont icon-lianxiwomen" :class="item.icon"></text></text>
+						<text class="cell-tit">联系我们</text>
+						<text class="cell-more" @click="toPhone">{{contactNumber}}</text>
+					</view>
+					<view class="list-cell last" @click="this.$api.navigateTo('/pages/user/about/about')" hover-class="cell-hover" :hover-stay-time="50">
+						<text class="cell-icon"><text class="iconfont icon-guanyuwomen" :class="item.icon"></text></text>
+						<text class="cell-tit">关于我们</text>
+						<text class="cell-more iconfont icon-xiayibu"></text>
+					</view>
+				</view>	
+			</view>
+		</view>	
+	</view>
+</template>
+<script>
+	import authorize from '@/common/config/authorize.js'
+	import uniBadge from '@/components/uni-badge/uni-badge.vue'
+	import { mapState,mapMutations } from 'vuex'
+	import { userInfoLogin } from "@/api/use.js"
+	import { getSellerHome } from "@/api/seller.js"
+	
+	export default{
+		components: {
+			uniBadge,
+		},
+		data() {
+			return{	
+				nvabarData: {//顶部自定义导航
+					showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
+					showSearch: 0,
+					title: '账户中心', // 导航栏 中间的标题
+					haveBack:false,
+					textLeft:this.$store.state.isIphone,
+					textColor:'#FFFFFF',
+					bgColor:''
+				},
+				CustomBar:this.CustomBar,// 顶部导航栏高度
+				StatusBar: this.StatusBar,
+				bgImgUrl:'https://img.caimei365.com/group1/M00/03/B0/Cmis217Z_i6ASHobAAhl69yz3SM078.png',
+				name:'这里是供应商的名字',
+				headpic:'',
+				userId:'',
+				skeletonShow:true,
+				orderNum:0,//机构自主下单订单数
+				beforeConfirmCount:10,//全部商品
+				beforePayCount:5, 	//已上架
+				beforeShipCount:120, //已下架
+				firstList:[
+					{name:'运营人员管理',path:'/pages/user/operator/list',icon:'icon-yunyingrenyuanguanli'},
+					{name:'我的资料',path:'/pages/login/information',icon:'icon-wodeziliao'},
+					{name:'账户设置',path:'/pages/user/setting/setting',icon:'icon-zhanghushezhi'},
+				]
+			}
+		},
+		created() {
+			this.initData()
+		},
+		computed: {
+			...mapState(['hasLogin','userInfo'])
+		},
+		methods:{
+			...mapMutations(['login','logout']),
+			initData(){
+				authorize.getCode('weixin').then(wechatcode =>{// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
+					authorize.getUserInfo('weixin').then(wxResponse =>{
+						userInfoLogin({code:wechatcode,encryptedData:wxResponse.encryptedData,iv:wxResponse.iv}).then(response =>{
+							this.$store.commit('updateStatus',response.data)
+							this.login(response.data);
+							uni.setStorageSync('token',response.data.token)
+							uni.removeStorageSync('sessionid')
+							uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
+							this.getUserSellerHome()
+						}).catch(response =>{
+							this.logout()
+							uni.removeStorageSync('sessionid')
+							uni.setStorageSync('sessionid','JSESSIONID='+response.data)
+							this.$store.commit('updateStatus',response.data)
+							// this.$api.navigateTo('/seller/pages/login/login')
+						})
+					})
+				})
+			},
+			getUserSellerHome(){
+				this.$api.getStorage().then((resolve) =>{
+					this.userId = resolve.userID
+					getSellerHome({userId:this.userId}).then(response =>{
+						let sellerData = response.data
+						this.name = sellerData.seller.linkMan1?sellerData.seller.linkMan1:'' 	//协销名称
+						this.headpic = sellerData.seller.logo //会所头像
+						this.beforeConfirmCount = this.showBadge(sellerData.beforeConfirmCount)//待付款
+						this.beforePayCount = this.showBadge(sellerData.beforePayCount)//待付款
+						this.beforeShipCount = this.showBadge(sellerData.beforeShipCount)//待发货		
+						this.shippedCount = this.showBadge(sellerData.shippedCount)//已发货	
+						this.refundsCount = this.showBadge(sellerData.refundsCount)//退货/款	
+						this.orderNum = this.showBadge(sellerData.orderNum)//机构自主下单订单数
+						this.skeletonShow = false;
+					}).catch(error =>{
+						this.$util.msg(error.msg,2000)
+					})
+				})	
+			},
+			navigator(url){
+				this.$api.navigateTo(url)
+			},			
+			showBadge(n){
+				let num ='';
+				if(n>100){num = 99}else{num = n;}
+				return num;
+			},
+			onPullDownRefresh() {//下拉刷新
+				this.initData()
+				uni.stopPullDownRefresh()
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	@import "@/uni.scss";
+	page{
+		background-color: #F7F7F7;
+	}
+	.user{
+		width: 100%;
+		height: 100%;
+		position:relative;
+		background: rgba(247, 247, 247, 1);
+	}	
+	.header{
+		width: 100%;
+		position: relative;
+		background-size: cover;
+		border-radius: 0 0 100rpx 100rpx;
+	}	
+	.header-main{
+		width: 702rpx;
+		height: 130rpx;
+		padding: 12rpx 24rpx;
+		display: flex;
+		.header-text{
+			flex: 8;
+			display: flex;
+			flex-direction: column;
+			padding: 15rpx 0;
+			.user-item{
+				flex: 1;
+				height: 50rpx;
+				line-height: 50rpx;
+				.u-tips{
+					display: inline-block;
+					float: left;
+					width: 98rpx;
+					height: 30rpx;
+					background: #FFFFFF;
+					border-radius: 16rpx;
+					line-height: 30rpx;
+					font-size: $font-size-20;
+					text-align: center;
+					color: $color-system;
+					margin-left: 10rpx;
+					margin-top: 12rpx;
+				}
+				.icon-jinrudianpu{
+					font-size: $font-size-26;
+					line-height: 50rpx;
+					color: #FFFFFF;
+					text-align: left;
+					margin-left: 12rpx;
+				}
+				.u-shop{
+					font-size: $font-size-28;
+					line-height: 50rpx;
+					color: #FFFFFF;
+					text-align: left;
+				}
+				.u-viptips{
+					display: inline-block;
+					float: left;
+					width: 98rpx;
+					height: 30rpx;
+					border: 1px solid #FFE600;
+					background: linear-gradient(128deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
+					border-radius: 16rpx;
+					line-height: 30rpx;
+					font-size: $font-size-20;
+					text-align: center;
+					color: #FFE600;
+					margin-left: 10rpx;
+					margin-top: 17rpx;
+				}
+				.u-h1{
+					float: left;
+					font-size: $font-size-30;
+					color: #FFFFFF;
+					text-align: left;
+					-o-text-overflow: ellipsis;
+					text-overflow: ellipsis;
+					display: -webkit-box;
+					word-break: break-all;
+					-webkit-box-orient: vertical;
+					-webkit-line-clamp: 1;
+					overflow: hidden;
+				}
+				.u-p{
+					font-size: $font-size-24;
+					line-height: 50rpx;
+					color: #FFFFFF;
+					text-align: left;
+				}
+			}
+		}
+		.header-icon{
+			flex: 2;
+			margin-right: 20rpx;
+			image{
+				float: right;
+				width: 128rpx;
+				height: 128rpx;
+				border-radius: 100%;
+				border: 2rpx solid #FFFFFF;
+			}
+		}
+	}
+	.header-main-none{
+		width: 702rpx;
+		height: 152rpx;
+		padding: 0 24rpx;
+		display: flex;
+		.header-text{
+			flex: 8;
+			display: flex;
+			flex-direction: column;
+			.user-item{
+				flex: 1;
+				height: 50rpx;
+				line-height: 50rpx;
+				.line{
+					margin: 0 10rpx;
+				}
+				.u-h1{
+					float: left;
+					font-size: $font-size-36;
+					color: #FFFFFF;
+					text-align: left;
+					-o-text-overflow: ellipsis;
+					text-overflow: ellipsis;
+					display: -webkit-box;
+					word-break: break-all;
+					-webkit-box-orient: vertical;
+					-webkit-line-clamp: 1;
+					overflow: hidden;
+				}
+				.u-p{
+					font-size: $font-size-24;
+					line-height: 50rpx;
+					color: #EFEFEF;
+					text-align: left;
+				}
+				.u-btn{
+					width: 160rpx;
+					height: 40rpx;
+					background: rgba(255,255,255,.5);
+					border-radius: 5rpx;
+					line-height: 40rpx;
+					text-align: center;
+					font-size: $font-size-24;
+					color: #FFFFFF;
+					display: block;
+					margin-top: 5rpx;
+					padding-left: 6rpx;
+					.icon-xiangyouhuabeifen{
+						font-size: $font-size-24;
+					}
+				}
+			}
+		}
+		.header-icon{
+			flex: 2;
+			display: flex;
+			margin-right: 20rpx;
+			align-items: center;
+			justify-content: center;
+			image{
+				float: right;
+				width: 128rpx;
+				height: 128rpx;
+				border-radius: 100%;
+				border: 2rpx solid #FFFFFF;
+			}
+		}
+	}
+	.user-order{
+		width: 654rpx;
+		height: auto;
+		padding: 0 24rpx;
+		background-color: $bg-color;
+		margin-bottom: 24rpx;
+		position: absolute;
+		bottom: -170rpx;
+		left: 24rpx;
+		border-radius: 16rpx;
+		box-shadow:0px 3px 6px rgba(225,86,22,0.07);
+	}	
+	.tab-title{
+		font-size: $font-size-30;
+		line-height: 80rpx;
+		color: #333333;
+		text-align:left;
+		position: relative;
+		.cell-tit{
+			font-size: $font-size-30;
+			color: $text-color;
+		}
+	}
+	.order-section{
+		display: flex;
+		justify-content: space-around;
+		align-items: center;
+		flex-wrap:wrap;
+		height: 99rpx;
+		padding: 24rpx 0;
+	}
+	.order-item{
+		flex:1;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		position: relative;
+		.order-icon{
+			width: 52rpx;
+			height: 52rpx;
+			position: relative;
+			.iconfont{
+				line-height: 52rpx;
+				font-size: $font-size-48;
+				color: #ff7a51;
+			}
+			.icon-num{
+				position: absolute;
+				right:-24rpx;
+				top: -9rpx;
+			}
+			.icon-num.goleft{
+				right: -12rpx;
+			}
+		}
+		.order-t{
+			line-height: 50rpx;
+			font-size: $font-size-24;
+			color: $text-color;
+		}
+	}
+	.foot-list{
+		width: 702rpx;
+		padding: 0 24rpx;
+		padding-top: 168rpx;
+	}	
+	.list-cell-item{
+		width: 654rpx;
+		height: auto;
+		margin-bottom: 24rpx;
+		padding:0 24rpx;
+		background: $bg-color;
+		border-radius: 20rpx;
+		box-shadow:0px 3px 6px rgba(225,86,22,0.07);
+	}
+	.list-cell{
+		display:flex;
+		width: 100%;
+		align-items:baseline;
+		line-height:100rpx;
+		position:relative;
+		background: $bg-color;
+		justify-content: center;
+		border-bottom: 1px solid #EBEBEB;
+		&.cell-hover{
+			background:#fafafa;
+		}
+		.cell-icon{
+			width: 60rpx;
+			height: 100rpx;
+			line-height: 100rpx;
+			text-align: center;
+			.iconfont{
+				font-size: $font-size-34;
+				color: #666666;
+			}
+		}
+		.cell-more{
+			align-self: baseline;
+			font-size:$font-size-28;
+			color:#666666;
+			.txt{
+				color: #FB4343;
+				padding-right: 10rpx;
+			}
+		}
+		.cell-tit{
+			flex: 1;
+			font-size: $font-size-28;
+			color: #666666;
+			margin-right:10rpx;
+		}
+		.cell-tip{
+			font-size: $font-size-28;
+			color: $text-color;
+		}
+	}	
+	.list-cell.last{
+		border-bottom: none;
+	}
+	.uni-badge--small {
+		-webkit-transform: scale(.8);
+		-ms-transform: scale(.8);
+		transform: scale(.8);
+		-webkit-transform-origin: center center;
+		-ms-transform-origin: center center;
+		transform-origin: center center;
+	}
+	.uni-badge {
+		font-family: 'Helvetica Neue', Helvetica, sans-serif;
+		-webkit-box-sizing: border-box;
+		box-sizing: border-box;
+		font-size: 12px;
+		line-height: 1;
+		display: inline-block;
+		padding: 3px 6px;
+		color: #333;
+		border-radius: 100px;
+		background-color: #f1f1f1;
+	}
+	.uni-badge-error {
+		color: #fff;
+		background-color: #dd524d;
+	}
+</style>

TEMPAT SAMPAH
static/iconfont/iconfont.ttf


+ 133 - 0
supplier/pages/index/index.vue

@@ -0,0 +1,133 @@
+<template>
+	<view class="content"  :style="{paddingBottom:isIphoneX?'140rpx':'98rpx'}">
+		<!-- 采美采购商城 -->
+		<view :style="{'display':show_index == 0 ?'block':'none'}">
+			<supplier-home  ref="home" v-if="isHomeData"></supplier-home>
+		</view>
+		<!-- 商品分类 -->
+		<view :style="{'display':show_index == 1? 'block':'none'}">
+			<supplier-category  ref="category" v-if="isCategory"></supplier-category>
+		</view>
+		<!-- 账户中心 -->
+		<view :style="{'display':show_index == 2 ?'flex':'none'}">
+			<supplier-user  ref="user" v-if="isUserData"></supplier-user>
+		</view>
+		<!-- isIphoneX判断是否为刘海屏在main.js里,好像uniapp有一个css变量获取刘海屏的安全区域 -->
+		<view class="tabBar" :style="{height:isIphoneX?'140rpx':'98rpx'}">
+			<!-- 导航的中间圆圈 -->
+			<view class="tabBar_list" :style="{paddingBottom:isIphoneX?'40rpx':''}">
+				<view v-for="(item) in tab_nav_list" :key="item.id" class="tabBar_item" @tap="cut_index(item.id)">
+					<image v-if="show_index == item.id" :src="item.iconAc"></image>
+					<image v-else :src="item.icon"></image>
+					<view :class="{'tabBar_name':true,'nav_active':show_index == item.id}">{{item.name}}</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import supplierHome from '@/components/cm-module/supplier/home.vue'
+	import supplierUser from '@/components/cm-module/supplier/user.vue'
+	import supplierCategory from '@/components/cm-module/supplier/category.vue'
+	export default {
+		components: {
+			supplierHome,//采美采购商城 0
+			supplierUser,//账户中心     1
+			supplierCategory,//商品分类 2
+		},
+		data() {
+			return {
+				show_index:2,//控制显示那个组件
+				isUserData: false,
+				isCategory: false,
+				isHomeData: false,
+				isIphoneX:this.$store.state.isIphone,
+				tab_nav_list :[//菜单列表
+					{'id':0,'name':'首页',icon:'../../../static/icon-home@3x.png',iconAc:'../../../static/icon-home-active@3x.png'},
+					{'id':1,'name':'分类',icon:'../../../static/icon-sort@3x.png',iconAc:'../../../static/icon-sort-active@3x.png'},
+					{'id':2,'name':'我的',icon:'../../../static/icon-user@3x.png',iconAc:'../../../static/icon-user-active@3x.png'}
+				],
+				nvabarData: {		//顶部自定义导航
+					showCapsule: 0, // 是否显示左上角图标  1表示显示  0表示不显示,
+					showSearch: 0,
+					title: '账户中心',  // 导航栏 中间的标题
+					textLeft:false
+				},
+				isIphoneX:this.$store.state.isIphoneX,
+				CustomBar:this.CustomBar,// 顶部导航栏高度
+			}
+		},
+		onLoad() {
+			this.$nextTick(()=>{// 一定要等视图更新完再调用方法
+				setTimeout(()=>{ this.isUserData = true },100)
+			})
+		},
+		methods: {
+			// 切换组件
+			cut_index(type){
+				this.show_index = type
+				if(this.show_index == 0){
+					this.isHomeData = true
+					this.isUserData = false
+					this.isCategory = false
+				}else if(this.show_index == 1){
+					this.isHomeData = false
+					this.isUserData = false
+					this.isCategory = true
+				}else if(this.show_index == 2){
+					this.isHomeData = false
+					this.isUserData = true
+					this.isCategory = false
+				}
+			},
+			onPullDownRefresh(){
+				if(this.show_index == 0){
+					this.$refs.home.getSellerHomeInfo()
+				}else if(this.show_index == 2){
+					this.$refs.user.initData()
+				}
+				uni.stopPullDownRefresh()
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.tabBar{
+		width:100%;
+		height: 98rpx;
+		background: #fff;
+		border-top:1px solid #E5E5E5;
+		position: fixed;
+		bottom:0px;
+		left:0px;
+		right:0px;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		z-index: 999;
+		.tabBar_list{
+			width:86%;
+			display: flex;
+			justify-content: space-between;
+			image{
+				width:48rpx;
+				height: 48rpx;
+				margin-bottom:2rpx
+			}
+			.tabBar_item{
+				width:150rpx;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				flex-direction: column;
+				font-size: 20rpx;
+				color: #999999;
+			}
+		 }
+	}
+	.nav_active{
+		color: $color-system;
+	}
+</style>

File diff ditekan karena terlalu besar
+ 671 - 0
supplier/pages/order/order-list.vue


File diff ditekan karena terlalu besar
+ 570 - 0
supplier/pages/user/my-product.vue


+ 418 - 0
supplier/pages/user/my-shop.vue

@@ -0,0 +1,418 @@
+<template>
+	<view class="container shop clearfix" :style="{paddingTop:CustomBar+'px'}">
+		<!-- 主页内容 -->
+		<view class="container-shop tui-skeleton">
+			<!-- 轮播 -->
+			<view class="shop-search">
+				<text class="iconfont icon-sousuo"></text>
+				<input class="input" type="text" value="" placeholder="搜索本店铺商品"/>
+			</view>
+			<view class="product-supplier" @click="goSupplier">
+				<view class="logo"><img src="https://img.caimei365.com/group1/M00/03/4B/Cmis210DQ_qAIoyoAAKD15t_iQc959.png" alt=""></view>
+				<view class="main">
+					<view class="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>
+						</view>
+						<view class="acount">
+							<text>50</text>件商品
+						</view>
+					</view>
+				</view>
+				<view class="right"><text class="iconfont icon-xiayibu"></text></view>
+			</view>
+			<banner :list="bannerImageList"></banner>
+		</view>	
+		<view class="container-section tui-skeleton">
+			<view class="title">主推商品</view>
+			<view class="section-product clearfix">
+				<view class="floor-item" v-for="(item, index) in organizeProducts" :key="index" @click.stop="navToDetailPage(item.productID)">
+					<image class="tui-skeleton-fillet" :src="item.mainImage" mode="aspectFill"></image>
+					<view class="floor-item-content">
+						<view class="title tui-skeleton-rect">
+							<text class="mclap">{{item.name}}</text>
+						</view>
+						<view class="floor-item-act">
+							<template v-if="item.actStatus==1">
+								<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
+									{{item.promotions.name}}<text v-if="hasLogin && item.price1TextFlag != '1'">:¥{{item.price | NumFormat}}</text>
+								</view>
+								<view class="floor-tags" v-else>{{item.promotions.name}}</view>	
+							</template>
+							<template v-if="item.actStatus ==0  &&  item.ladderPriceFlag==1">
+								<view class="floor-tags">阶梯价格</view>	
+							</template>	
+						</view>
+						<view class="" v-if="hasLogin">
+							<view v-if="userIdentity == 4">
+								<view class="title-none" v-show="item.price1TextFlag == '1'">
+									<text class="p big">¥未公开价格</text>
+								</view>
+								<view class="title-none" v-show="item.price1TextFlag == '2'">
+									<text class="p big">¥价格仅会员可见</text>
+								</view>
+								<view class="price tui-skeleton-rect" v-show="item.price1TextFlag == '0'" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
+									<text class="p sm">¥</text>
+									<text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
+								</view>
+							</view>
+							<view v-else>
+								<view class="title-none" v-if="item.price1TextFlag == '1'">
+									<text class="p big">未公开价格</text>
+								</view>
+								<view class="price tui-skeleton-rect" v-else :class="PromotionsFormat(item.promotions) ? 'none' : ''">
+									<text class="p sm">¥</text>
+									<text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
+								</view>
+							</view>
+						</view>
+						<view v-else class="no-price">
+							<view class="p-stars">
+								<text class="p-no">¥</text>
+								<uni-stars :stars="parseInt(item.price1Grade)" :fontSize="36" :widthInfo="180"></uni-stars>
+							</view>
+						</view>	
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 侧边 -->
+		<scroll-top v-if="isScrollTop"></scroll-top>
+	</view>
+</template>
+
+<script>
+	import { mapState,mapMutations} from 'vuex';
+	import banner from '@/components/cm-module/supplier/banner.vue'
+	import uniStars from '@/components/uni-stars/uni-stars.vue'
+	import authorize from '@/common/config/authorize.js'
+	
+	export default {
+		components:{
+			banner,
+			uniStars
+		},
+		data() {
+			return {
+				userID:0,
+				iconClass:'icon-aixin',
+				iconColor:'#ff9100',
+				isScrollTop:false,
+				bannerImageList:[
+					{image:'https://m.360buyimg.com/mobilecms/s700x280_jfs/t1/114550/12/7437/102254/5ec3971fE78db18f4/438d4775f9d653ee.jpg!q70.jpg.dpg'},
+					{image:'https://m.360buyimg.com/mobilecms/s700x280_jfs/t1/126187/19/17323/149042/5fa13ef1E6bc65f5b/8fbecafdbf0e4736.jpg!q70.jpg.dpg'},
+					{image:'https://m.360buyimg.com/mobilecms/s700x280_jfs/t1/126522/38/16493/151268/5f9940bfE9bf4ce43/b9a09e36102a9667.jpg!q70.jpg.dpg'}
+				],
+				organizeProducts:[]
+			}
+		},
+		onLoad() {
+			
+		},
+		filters: {
+			NumFormat:function(text) {//处理金额
+				return Number(text).toFixed(2);
+			},
+		},
+		computed: {
+			...mapState(['hasLogin','userInfo','isActivity'])
+		},
+		methods: {
+			...mapMutations(['login','logout']),
+			getOrganizeProducts(){//获取模块三商品
+				this.ProductService.queryProductPreferred({userId:this.userID,preferredFlag:100,pageNum:1,pageSize:4}).then(res =>{
+					this.organizeProducts = res.data.results
+					this.getProductPrice()
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			getProductPrice(){//获取商品或者活动价格
+				let productIdArr = [];
+				let productIds ='';
+				this.organizeProducts.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
+					productIdArr.push(item.productID)
+				})
+				productIds = productIdArr.join(",");
+				this.ProductService.querySearchProductPrice({userId: this.userID,productIds:productIds}).then(response =>{
+					this.organizeProducts = this.ReturnNewProducts(this.organizeProducts,response.data);
+					this.skeletonShow = false;
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			ReturnNewProducts(Array,list){
+				let NewArray = []
+				Array.map(item=>{
+					for (let i = 0; i < list.length; i++) {
+						if( item.productID == list[i].productId ){
+							NewArray.push(Object.assign(item,list[i])) 
+						}
+					}
+				});
+				return NewArray
+			},
+		},
+		onPageScroll(e){//实时获取到滚动的值
+			if(e.scrollTop>400){
+				this.isScrollTop = true
+			}else{
+				this.isScrollTop = false
+			}	
+		},
+		onPullDownRefresh() {//下拉刷新
+			this.getHomeInformation()
+			uni.stopPullDownRefresh()
+		},
+		onShow(){
+			this.getOrganizeProducts()
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		background-color: #F7F7F7;
+	}
+	.shop{
+		width: 100%;
+		height: auto;
+	}
+	.container-shop{
+		width: 100%;
+		height: auto;
+		padding:24rpx;
+		box-sizing: border-box;
+		background-color: #FFFFFF;
+	}
+	.shop-search{
+		width: 100%;
+		height: 66rpx;
+		border-radius: 33rpx;
+		background-color: #F7F7F7;
+		box-sizing: border-box;
+		padding: 0 20rpx;
+		.icon-sousuo{
+			width: 60rpx;
+			height: 66rpx;
+			display: block;
+			float: left;
+			color: #707070;
+			line-height: 66rpx;
+			text-align: center;
+			font-size: 36rpx;
+		}
+		.input{
+			width: 600rpx;
+			height: 66rpx;
+			box-sizing: border-box;
+			padding: 0 20rpx;
+			color: #666666;
+			overflow: hidden;
+			font-size: $font-size-24;
+		}
+	}
+	.product-supplier{
+		width: 100%;
+		height: 140rpx;
+		padding: 30rpx 0 10rpx 0;
+		box-sizing: border-box;
+		background-color: #FFFFFF;
+		position: relative;
+		box-sizing: border-box;
+		.logo{
+			width: 128rpx;
+			height: 92rpx;
+			float: left;
+			border: 1px solid #efefef;
+			border-radius: 6rpx;
+			image{
+				width: 100%;
+				height: 100%;
+				display: block;
+				border-radius: 6rpx;
+			}
+		}
+		.main{
+			width: 470rpx;
+			height: 92rpx;
+			float: left;
+			margin-left: 20rpx;
+			.name{
+				width: 100%;
+				line-height: 46rpx;
+				float: left;
+				font-size: $font-size-28;
+				color: $text-color;
+				float: right;
+				overflow: hidden;
+				text-overflow:ellipsis;
+				white-space: nowrap;
+				text-align: left;
+			}
+			.massgs{
+				width: 100%;
+				line-height: 46rpx;
+				float: left;
+				font-size: $font-size-24;
+				color: #999999;
+				.label{
+					float: left;
+				}
+				.p-stars{
+					float: left;
+					margin-left: 20rpx;
+				}
+				.acount{
+					float: right;
+					text{
+						color: $color-system;
+					}
+				}
+			}
+		}
+		.icon-xiayibu{
+			line-height: 154rpx;
+			display: inline-block;
+			position: absolute;
+			width: 48rpx;
+			top: 0;
+			right: 0;
+			color: #b2b2b2;
+		}
+	}
+	.container-section{
+		width: 100%;
+		height: auto;
+		background-color: #F7F7F7;
+		box-sizing: border-box;
+		padding: 0 24rpx;
+		.title{
+			width: 100%;
+			height: 88rpx;
+			line-height: 88rpx;
+			font-size: $font-size-30;
+			font-weight: bold;
+		}
+		.section-product{
+			width: 100%;
+			height: auto;
+			.floor-item{
+				width: 341rpx;
+				height: auto;
+				margin-right: 20rpx;
+				font-size: $font-size-24;
+				color: $text-color;
+				background: #FFFFFF;
+				line-height: 36rpx;
+				border-radius: 2rpx;
+				margin-bottom: 20rpx;
+				float: left;
+				box-sizing: border-box;
+				padding-bottom: 16rpx;
+				&:nth-child(2n){
+					margin-right: 0;
+				}
+				image{
+					width: 341rpx;
+					height: 341rpx;
+					border-radius: 20rpx 20rpx 0 0;
+					display: block;
+					margin-bottom: 20rpx;
+				}
+				.floor-item-content{
+					width: 311rpx;
+					padding: 0 15rpx;
+				}
+				.floor-item-act{
+					display: block;
+					width: 100%;
+					height: 68rpx;
+					text-align: center;
+					box-sizing: border-box;
+					padding: 16rpx 0;
+					margin-top: 8rpx;
+					.floor-tags{
+						float: left;
+						height: 36rpx;
+						border-radius: 4rpx;
+						background-color: rgba(225, 86, 22, 0.1);
+						line-height: 36rpx;
+						color: $color-system;
+						text-align: center;
+						display: inline-block;
+						padding:0 16rpx;
+						font-size: $font-size-20;
+					}
+				}
+				.title-none{
+					font-size: $font-size-26;
+					color: #FF2A2A;
+					line-height: 44rpx;
+					.btn{
+						display: inline-block;
+						float: right;
+						width: 112rpx;
+						height: 44rpx;
+						background: $btn-confirm;
+						line-height: 44rpx;
+						font-size: $font-size-24;
+						color: #FFFFFF;
+						text-align: center;
+						border-radius: 22rpx;
+						margin-top: 17rpx;
+					}
+				}
+				.title{
+					width: 100%;
+					height: 72rpx;
+					display: flex;
+					flex-direction: column;
+					.mclap{
+						width: 100%;
+						line-height: 36rpx;
+						text-overflow:ellipsis;
+						display: -webkit-box;
+						word-break: break-all;
+						-webkit-box-orient: vertical;
+						-webkit-line-clamp: 2;
+						overflow: hidden;
+						font-size: 26rpx;
+					}
+				}
+				.no-price{
+					height: 54rpx;
+					line-height: 54rpx;
+					display: flex;
+					box-sizing: border-box;
+					.p-no{
+						font-size: $font-size-30;
+						color: $text-color;
+						display: block;
+						float: left;
+					}
+					.p-stars{
+						width: 230rpx;
+						float: left;
+					}
+				}
+				.price{
+					color: #FF2A2A;
+					line-height: 44rpx;
+					&.none{
+						text-decoration: line-through;
+						color: #999999;
+					}
+					.sm{
+						font-size: $font-size-24;
+					}
+					.big{
+						font-size: $font-size-28;
+					}
+				}
+			}
+		}
+	}
+</style>

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini