zhengjinyi пре 5 година
родитељ
комит
b9d94779db

+ 2 - 2
common/config/config.js

@@ -4,8 +4,8 @@ if(process.env.NODE_ENV === 'development'){
 	// URL_CONFIG = 'http://192.168.1.24:8008'	 //俊俊联调地址
 	// URL_CONFIG = 'http://192.168.1.22:8008'	 //裴裴联调地址
 	// URL_CONFIG = 'http://192.168.1.26:8008'	 //超超联调地址
-    URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
-	// URL_CONFIG = 'https://spi.caimei365.com'
+    // URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
+	URL_CONFIG = 'https://spi.caimei365.com'
 }else{
     // 生产环境
     URL_CONFIG = 'https://spi.caimei365.com'

+ 5 - 1
common/css/iconfont.scss

@@ -4,7 +4,7 @@
 	font-family: iconfont;
 	font-weight: normal;
 	font-style: normal;
-	src: url('https://at.alicdn.com/t/font_1519039_9hkybv95c8k.ttf') format('truetype');
+	src: url('https://at.alicdn.com/t/font_1519039_mkxy06756m.ttf') format('truetype');
 }
 .iconfont {
 	font-family: "iconfont" !important;
@@ -13,6 +13,10 @@
 	-webkit-font-smoothing: antialiased;
 	-moz-osx-font-smoothing: grayscale;
 }
+.icon-xingxing:before {
+  content: "\e870";
+}
+
 .icon-icon-cross-squre:before {
   content: "\e668";
 }

+ 98 - 0
components/cm-module/productDetails/cm-parameter.vue

@@ -0,0 +1,98 @@
+<template name="cm-parameter">
+	<!-- 相关参数 -->
+	<view class="cm-parameter">
+		<view class="cm-parameter-main clearfix">
+			<view class="item-tabody clearfix" v-for="(item, index) in data" :key="index" >
+				<view class="item-td">{{item.name}}</view>
+				<view class="item-tr">{{item.color}}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default{
+		name:'cm-parameter',
+		props:{
+			product:{
+				type:Object,
+			}
+		},
+		data() {
+			return{
+				data:[
+					{name:'颜色',color:'白色'},
+					{name:'重量',color:'1000KG'},
+					{name:'规格',color:'12瓶/m'},
+					{name:'EEDF能量桂华技术',color:'50万次有效出光保证,量均匀,安全保证,效果'},
+					{name:'功能',color:'美白嫩肤,美白嫩肤美白嫩肤'},
+				]
+			}
+		},
+		created() {
+			
+		},
+		methods:{
+		},
+		
+	}
+</script>
+
+<style lang="scss">	
+	.cm-parameter{
+		width: 100%;
+		height: auto;
+		background: #FFF;
+		.cm-parameter-main{
+			width: 702rpx;
+			height: auto;
+			margin: 0 auto;
+			border: 1px solid #EFEFEF;
+			margin-top: 24rpx;
+			.item-tabody{
+				width: 100%;
+				height: auto;
+				padding:20rpx 0;
+				border-bottom: 1px solid #EFEFEF;
+				font-size: $font-size-24;
+				.item-td{
+					width: 238rpx;
+					float: left;
+					border-right: 1px solid #EFEFEF;
+					color: #999999;
+					text-indent: 20rpx;
+				}
+				.item-tr{
+					width: 462rpx;
+					float: left;
+					color: $text-color;
+					text-indent: 20rpx;
+				}
+				&:last-child{
+					border-bottom: none;
+				}
+			}
+		}
+	}
+</style>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 55 - 0
components/cm-module/productDetails/cm-service.vue

@@ -0,0 +1,55 @@
+<template name="cm-service">
+	<!-- 服务项目 -->
+	<view class="cm-service">
+		服务项目
+	</view>
+</template>
+
+<script>
+	export default{
+		name:'cm-service',
+		props:{
+			product:{
+				type:Object,
+			}
+		},
+		data() {
+			return{
+				
+			}
+		},
+		created() {
+			
+		},
+		methods:{
+		},
+		
+	}
+</script>
+
+<style lang="scss">	
+	.cm-service{
+		
+	}
+</style>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 74 - 36
components/cm-module/productDetails/supplierDetails.vue

@@ -11,12 +11,18 @@
 		</view>
 		<view class="sup-msg massage-t">
 			<view class="sup-h1">
-				<text class="line">基本信息</text>
+				<text class="line">公司基本信息</text>
 			</view>
 			<view class="sup-title">
 				<text class="tit-l">公司名称:</text>
 				<text >{{shop.name}}</text>
 			</view>
+			<view class="sup-stars">
+				<text class="tit-l">满意度:</text>
+				<view class="p-stars">
+					<uni-stars :stars="6" :iconClass="iconClass" :iconColor="iconColor" :fontSize="44" :widthInfo="180"></uni-stars>
+				</view>
+			</view>
 			<view class="sup-conte">
 				<view class="conte-l">
 					<text class="tit-l">经营品项:</text>
@@ -39,7 +45,7 @@
 		</view>
 		<view class="sup-msg massage-t">
 			<view class="sup-h1">
-				<text class="line">主打系列产品介绍</text>
+				<text class="line">主打系列产品说明</text>
 			</view>
 			<view class="sup-p" :class="[shop.productDesc == null ? 'center' : '']">
 				{{shop.productDesc == null ? '暂无内容' : shop.productDesc}}
@@ -50,7 +56,7 @@
 				<text class="line">营业执照</text>
 			</view>
 			<view class="sup-img">
-				<image :src="shop.businessLicenseImage" mode=""></image>
+				<image :src="shop.businessLicenseImage" mode="widthFix" @click="previewImg(shop.businessLicenseImage)"></image>
 			</view>
 		</view>
 		<view class="sup-msg massage-t" v-if="shop.medicalPracticeLicenseImg1!=null">
@@ -58,21 +64,34 @@
 				<text class="line">公司资质</text>
 			</view>
 			<view class="sup-imgList clearfix">
-				<view class="img"><image :src="shop.medicalPracticeLicenseImg1" mode=""></image></view>
-				<view class="img"><image :src="shop.medicalPracticeLicenseImg2" mode=""></image></view>
-				<view class="img"><image :src="shop.medicalPracticeLicenseImg3" mode=""></image></view>
+				<view class="img"><image :src="shop.medicalPracticeLicenseImg1" mode="" @click="previewImg(shop.medicalPracticeLicenseImg1)"></image></view>
+				<view class="img"><image :src="shop.medicalPracticeLicenseImg2" mode="" @click="previewImg(shop.medicalPracticeLicenseImg2)"></image></view>
+				<view class="img"><image :src="shop.medicalPracticeLicenseImg3" mode="" @click="previewImg(shop.medicalPracticeLicenseImg3)"></image></view>
+			</view>
+		</view>
+		<view class="sup-msg massage-t">
+			<view class="sup-h1">
+				<text class="line">授权牌照</text>
+			</view>
+			<view class="sup-img">
+				<image :src="shop.businessLicenseImage" mode="widthFix" @click="previewImg(shop.businessLicenseImage)"></image>
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
+	import uniStars from '@/components/uni-stars/uni-stars.vue'
 	export default{
 		name:'supplier',
+		components:{
+			uniStars
+		},
 		props:['shop'],
 		data() {
 			return{
-				
+				iconClass:'icon-xingxing',
+				iconColor:'#FF9100'
 			}
 		},
 		created() {
@@ -82,7 +101,14 @@
 
 		},
 		methods:{
-			
+			previewImg(url){
+				let mentuzArray = []
+				mentuzArray.push(url)
+				uni.previewImage({
+					urls: mentuzArray,
+					current: 0
+				});
+			}
 		},
 		onShow(){
 	
@@ -92,38 +118,30 @@
 
 <style lang="scss">	
 .supplier{
-	background: #F7F7F7;
+	background: #FFFFFF;
 	width: 100%;
 	.sup-msg{
 		width: 100%;
 		padding: 24rpx 0;				
 		.sup-h1{
-			height: 42rpx;
-			line-height: 42rpx;
+			height: 80rpx;
+			line-height: 80rpx;
 			font-size: $font-size-30;
 			color: $text-color;
-			text-align: center;
-			font-weight: bold;
+			text-align: left;
+			border-bottom: 1px solid #EFEFEF;
 			.line{
 				position: relative;
+				padding-left: 15rpx;
 				&:after{
 					content: '';
-					width: 96rpx;
-					height: 2rpx;
-					background: #EAEAEA;
+					width: 6rpx;
+					height: 28rpx;
+					background: #FFA347;
 					position: absolute;
-					left: -130rpx;
-					top: 50%;
+					left: 0;
+					top: 6rpx;
 				}						
-				&:before{
-					content: '';
-					width: 96rpx;
-					height: 2rpx;
-					background: #EAEAEA;
-					position: absolute;
-					right: -130rpx;
-					top: 50%;
-				}
 			}
 		}
 	}
@@ -166,9 +184,8 @@
 	}
 	.massage-t{
 		width: 702rpx;
-		padding:24rpx;
+		padding:0 24rpx;
 		height: auto;
-		margin-bottom: 24rpx;
 		background: #FFFFFF;
 		.sup-title{
 			width: 100%;
@@ -185,6 +202,27 @@
 				display: inline-block;
 			}
 		}
+		.sup-stars{
+			width: 100%;
+			height: 40rpx;
+			margin-top: 24rpx;
+			text-align: left;
+			display: inline-block;						
+			line-height: 40rpx;
+			font-size: $font-size-28;
+			color: $text-color;
+			.tit-l{
+				width: 114rpx;
+				margin-right:20rpx;
+				display: inline-block;
+				text-align: right;
+				float: left;
+			}
+			.p-stars{
+				float: left;
+				margin-left: 22rpx;
+			}
+		}
 		.sup-conte{
 			width: 100%;
 			margin-top: 24rpx;
@@ -205,13 +243,13 @@
 				.age{
 					display: inline-block;
 					padding: 0 20rpx;
-					background: #F8C499;
-					height: 40rpx;
-					line-height: 40rpx;
+					background: #FFF6E6;
+					height: 42rpx;
+					line-height: 42rpx;
 					text-align: center;
 					font-size: $font-size-24;
-					color: $text-color;
-					border-radius: 20rpx;
+					color: #666666;
+					border-radius: 6rpx;
 					margin-right: 24rpx;
 					margin-bottom: 24rpx;
 				}
@@ -226,8 +264,8 @@
 			padding: 24rpx 0;
 			line-height: 40rpx;
 			text-align: left;
-			font-size: $font-size-24;
-			color: $text-color;
+			font-size: $font-size-28;
+			color: #666666;
 			text-indent: 20rpx;
 			&.center{
 				text-align: center;

+ 5 - 0
pages.json

@@ -71,6 +71,11 @@
 				"navigationBarTitleText": "商品详情",
 				"navigationStyle":"custom"
 			}
+		},{
+			"path": "pages/goods/supplier",
+			"style": {
+				"navigationBarTitleText": "供应商信息"
+			}
 		},{
 			"path": "pages/goods/cart",
 			"style": {

+ 80 - 30
pages/goods/product.vue

@@ -59,34 +59,39 @@
 					</view>
 				</view>			
 			</view>
+			<view class="product-supplier" @click="goSupplier">
+				<text class="title">供应商信息</text>
+				<text class="name">{{shop.name}}</text>
+				<text class="iconfont icon-xiayibu"></text>
+			</view>
 			<view class="product-details">
 				<!-- 头部 -->
 				<view  v-if="goodsData.isNoneDisabled" class="navbar" :class="navbarFiexd"
 					 :style="{top:headerBtnPosi.bottom + (headerBtnPosi.bottom - headerBtnPosi.height - systeminfo.statusBarHeight) +'px'}">
-					<view class="nav-item tui-skeleton-fillet" v-for="(item,index) in  disabledTabNavList" :key="index" :class="{ current: tabCurrentIndex === index+2 }" @click="tabClick(index+2)">
+					<view class="nav-item tui-skeleton-fillet" v-for="(item,index) in  disabledTabNavList" :key="index" :class="{ current: tabCurrentIndex === item.type }" @click="tabClick(index+2)">
 						<text class="line"></text>
 						<text>{{item.name}}</text>
 					</view>					
 				</view>
 				<view v-else class="navbar" :class="navbarFiexd" 
 					 :style="{top:headerBtnPosi.bottom + (headerBtnPosi.bottom - headerBtnPosi.height - systeminfo.statusBarHeight) +'px'}">
-					<view class="nav-item tui-skeleton-fillet" v-for="(item,index) in  tabNavList" :key="index" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">
+					<view class="nav-item tui-skeleton-fillet" v-for="(item,index) in  tabNavList" :key="index" :class="{ current: tabCurrentIndex === item.type }" @click="tabClick(item.type,index)">
 						<text class="line"></text>
 						<text>{{item.name}}</text>
 					</view>					
 				</view>
 				<!-- 商品详情,供应商详情展示,相关推荐,评价-->
-				<view class="content tui-banner tui-skeleton-rect" v-if="tabCurrentIndex === 0">
+				<view class="content tui-banner tui-skeleton-rect" v-if="tabCurrentIndex === 'details'">
 					<parser :html="html" :img-mode="widthFix"></parser>
 				</view>
-				<view class="content sup" v-if="tabCurrentIndex === 1">
-					<supplier-details :shop="shop"></supplier-details>
-				</view>
-				<view class="content hot" v-if="tabCurrentIndex === 2">
+				<view class="content hot" v-if="tabCurrentIndex === 'hot'">
 					<recommend :query-productid="product.productID" v-if="isRecommend"></recommend>
 				</view>
-				<view class="content hot" v-if="tabCurrentIndex === 3">
-					<evaluate :query-productid ="product.productID" v-if="isEvaluate"></evaluate>
+				<view class="content param" v-if="tabCurrentIndex === 'param'">
+					<cm-parameter :query-productid="product.productID" v-if="isRarameter"></cm-parameter>
+				</view>
+				<view class="content service" v-if="tabCurrentIndex === 'service'">
+					<cm-service :query-productid="product.productID" v-if="isService"></cm-service>
 				</view>
 			</view>
 			<!-- 底部按钮 -->
@@ -172,9 +177,9 @@
 	import uniStars from '@/components/uni-stars/uni-stars.vue'
 	import parser from "@/components/jyf-Parser/index" //富文本处理
 	import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
-	import supplierDetails from "@/components/cm-module/productDetails/supplierDetails" //供应商详情
-	import recommend from "@/components/cm-module/productDetails/recommend" //供应商详情
-	import evaluate from "@/components/cm-module/productDetails/evaluate" //供应商详情
+	import recommend from "@/components/cm-module/productDetails/recommend" //相关推荐
+	import cmParameter from "@/components/cm-module/productDetails/cm-parameter" //相关参数
+	import cmService from "@/components/cm-module/productDetails/cm-service" //服务项目
 	import wxLogin from "@/common/config/wxLogin.js"
 	import { queryProductDetils } from "@/api/product.js" 
 	import { shoppingAddCart } from "@/api/cart.js" 
@@ -184,17 +189,22 @@
 			customP,
 			parser,
 			tuiSkeleton,
-			supplierDetails,
 			recommend,
-			evaluate,
 			cmPrice,
-			cmAttributes
+			cmAttributes,
+			cmParameter,
+			cmService
 		},
 		data(){
 			return{			
 				html:'<div style="text-align: center;color:#333333;">暂无内容</div>',
-				tabNavList:[{name:'商品详情'},{name:'供应商信息'},{name:'相关推荐'},{name:'评价'}],
-				disabledTabNavList:[{name:'相关推荐'},{name:'评价'}],
+				tabNavList:[
+					{name:'商品详情',type:'details'},
+					{name:'相关参数',type:'param'},
+					{name:'服务项目',type:'service'},
+					{name:'相关推荐',type:'hot'},
+				],
+				disabledTabNavList:[{name:'相关推荐'}],
 				mode:'round',
 				specClass: '',//规格弹窗css类,控制开关动画
 				isBtnType:'',
@@ -206,6 +216,8 @@
 				ladderPriceFlag:'',
 				ladderPriceList:'',
 				isRecommend:false,
+				isRarameter:true,
+				isService:false,
 				isEvaluate:false,
 				isAnimation:false,
 				skeletonShow:true,
@@ -213,7 +225,7 @@
 				isStock:false,
 				disabled:false,
 				isNoneDisabled:false,
-				tabCurrentIndex:0,
+				tabCurrentIndex:'param',
 				userID:'',
 				productID:0,
 				userIdentity:'',//用户类型
@@ -293,13 +305,13 @@
 					if(this.product.validFlag =='3' || this.stock == 0 ){
 						this.disabled = true
 						this.isNoneDisabled = true
-						this.tabCurrentIndex = 2;// 页面显示是默认选中第一
+						this.tabCurrentIndex = 'hot';// 页面显示是默认选中第一
 						this.isRecommend = true
 						this.goodsData.disabledText = '下架'
 					}else{
 						this.disabled = false
 						this.isNoneDisabled = false
-						this.tabCurrentIndex = 0;// 页面显示是默认选中第三
+						this.tabCurrentIndex = 'details';// 页面显示是默认选中第三
 						this.goodsData.disabledText = ''
 					}
 					if(this.product.price1TextFlag == "1"){
@@ -338,18 +350,20 @@
 					longPressActions:''
 				})
 			},
-			tabClick(index) {//商品详情&&供应商信息tab切换
-				this.tabCurrentIndex = index;
-				if(this.tabCurrentIndex == 2){
-					this.isRecommend = true
-				}
-				if(this.tabCurrentIndex == 3){
-					this.isEvaluate = true
+			tabClick(type,index) {//商品详情&&供应商信息tab切换
+				this.tabCurrentIndex = type;
+				switch(this.tabCurrentIndex){
+					case 'hot':
+						this.isRecommend = true
+						break;
+					case 'param':
+						this.isRarameter = true
+						break;
+					case 'service':
+						this.isService = true
+						break;
 				}
 			},
-			changeTab(e) {
-				this.tabCurrentIndex = e.target.current;
-			},
 			handleContact(e){//跳转小程序客服
 
 			},
@@ -486,6 +500,10 @@
 			getOptionFn(e){
 				this.isShareType = e.type
 			},
+			goSupplier(){
+				this.$api.setStorage('supplierInfo',this.shop)
+				this.$api.navigateTo('/pages/goods/supplier')
+			},
 			discard(){
 				//丢弃
 			}
@@ -868,6 +886,38 @@
 			}
 		}
 	}
+	.product-supplier{
+		width: 702rpx;
+		height: 88rpx;
+		padding: 0 24rpx;
+		background-color: #FFFFFF;
+		margin-bottom: 24rpx;
+		position: relative;
+		.title{
+			line-height: 88rpx;
+			display: inline-block;
+			float: left;
+			font-size: $font-size-28;
+			color: $text-color;
+		}
+		.name{
+			line-height: 88rpx;
+			display: inline-block;
+			float: left;
+			font-size: $font-size-24;
+			color: #D0D0D0;
+			float: right;
+			padding-right: 48rpx;
+		}
+		.icon-xiayibu{
+			line-height: 88rpx;
+			display: inline-block;
+			position: absolute;
+			width: 48rpx;
+			top: 0;
+			right: 0;
+		}
+	}
 	.product-details {
 		height: 100%;
 		background: #FFFFFF;

+ 44 - 0
pages/goods/supplier.vue

@@ -0,0 +1,44 @@
+<template>
+	<view class="container all-type-list-wrapper">
+		<supplier-details :shop="shopInfo" v-if="isLoading"></supplier-details>
+	</view>
+</template>
+
+<script>
+	import supplierDetails from "@/components/cm-module/productDetails/supplierDetails" //供应商详情
+	export default{
+		components:{
+			supplierDetails
+		},
+		data(){
+			return{
+				shopInfo:{},
+				isLoading:false
+			}
+		},		
+		onLoad(option) {
+			
+		},
+		methods:{
+			
+		},
+		onShow() {
+			this.$api.getComStorage('supplierInfo').then((resolve) =>{
+				this.shopInfo = resolve
+				this.isLoading = true
+			}).catch(reject =>{
+				console.log('异常处理=========>',reject)
+			})
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background: $sub-bg-color;
+		.all-type-list-wrapper {
+			display: flex;
+			flex-direction: column;
+		}
+	}
+</style>

+ 0 - 1
supplier/pages/deliver/add-logistics.vue

@@ -141,7 +141,6 @@
 				if(this.min == 200){
 					this.$util.msg('您输入的次数已达上限',2000);
 				}
-             
 			}
 		},
 		onShow() {