瀏覽代碼

commit - m 测试优化

zhengjinyi 4 年之前
父節點
當前提交
23a9382cea

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

@@ -132,7 +132,6 @@
 		},
 		filters: {
			NumFormat:function(text) {//处理金额
				return Number(text).toFixed(2);
			},
		},
 		created(){
-			console.log(this.userIdentity)
 			this.initData(this.list)
 		},
 		computed: {
@@ -142,7 +141,6 @@
 			initData(res){
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopID
-					console.log(this.shopId)
 				})
 				if(res.length>0){
 					for (var i = 0, j = res.length; i < j; i += this.pageSize) {

+ 7 - 4
components/cm-module/productDetails/recommend.vue

@@ -20,9 +20,12 @@
 		name:'recommend',
 		props:{
 			queryProductid: {
-				// Unistars类型
 				type: Number,
 				default: 0
+			},
+			queryType:{
+				type: String,
+				default: '0'
 			}
 		},
 		components:{
@@ -40,11 +43,11 @@
 		},
 		created() {
 			this.productID = this.queryProductid
-			this.infoRecommend(this.queryProductid)
+			this.infoRecommend(this.queryProductid,this.queryType)
 		},
 		methods:{
-			infoRecommend(id){
-				this.ProductService.queryProductDetilsRelevant({productId:id,recommendType:0}).then(response =>{
+			infoRecommend(id,type){
+				this.ProductService.queryProductDetilsRelevant({productId:id,recommendType:type}).then(response =>{
 					if( response.data && response.data.length > 0){
 						this.isEmpty = false
 						this.recommendList = response.data

+ 4 - 4
components/cm-module/supplier/supplierDetails.vue

@@ -42,12 +42,12 @@
 				{{shopData.productDesc == null ? '暂无内容' : shopData.productDesc}}
 			</view>
 		</view>
-		<view class="sup-msg massage-t" v-if="shopData.businessLicenseImage!=null">
+		<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.businessLicenseImage" mode="aspectFill" @click="previewImg(shopData.businessLicenseImage)"></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">
@@ -60,12 +60,12 @@
 				<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.authorizationCertificateImage!=null">
+		<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.authorizationCertificateImage" mode="aspectFill" @click="previewImg(shopData.authorizationCertificateImage)"></image>
+				<image :src="shopData.certificate" mode="aspectFill" @click="previewImg(shopData.certificate)"></image>
 			</view>
 		</view>
 	</view>

+ 74 - 0
pages/goods/instrument-details.vue

@@ -79,6 +79,30 @@
 					</view>
 				</view>
 			</view>	
+			<view class="product-details contact clearfix">
+				<!-- 联系 -->
+				<view class="instrument-contact-title">
+					<image src="http://static-b.caimei365.com/app/img/icon/icon-title-bg.png" mode=""></image>
+				</view>
+				<view class="instrument-contact-cell">
+					<view class="cell-icon">
+						<image src="http://static-b.caimei365.com/app/img/icon/icon-kefus.png" mode=""></image>
+					</view>
+					<view class="cell-text">
+						<view class="cell-text-p">0755-22907771转806</view>
+						<view class="cell-text-p">15338851365</view>
+					</view>
+				</view>
+				<view class="instrument-contact-cell">
+					<view class="cell-icon">
+						<image src="http://static-b.caimei365.com/app/img/icon/icon-phone.png" mode=""></image>
+					</view>
+					<view class="cell-text">
+						<view class="cell-text-p">产品设备:18948339365</view>
+						<view class="cell-text-p">商务合作:17318032647</view>
+					</view>
+				</view>
+			</view>	
 			<!-- 仪器信息 -->
 			<tui-bottom-popup :radius="true" :show="popupShow" @close="hidePopup()">
 				<view class="tui-popup-box clearfix">
@@ -450,6 +474,56 @@
 				}
 			}
 		}
+		&.contact{
+			width: 100%;
+			box-sizing: border-box;
+			background-color: #FFFFFF;
+			padding:24rpx;
+			.instrument-contact-title{
+				width: 100%;
+				height: 40rpx;
+				margin-bottom: 30rpx;
+				image{
+					width: 100%;
+					height: 100%;
+					display: block;
+				}
+			}
+			.instrument-contact-cell{
+				width: 100%;
+				height: 72rpx;
+				float: left;
+				box-sizing: border-box;
+				padding: 0 150rpx;
+				margin-bottom: 24rpx;
+				.cell-icon{
+					width: 72rpx;
+					height: 72rpx;
+					float: left;
+					image{
+						width: 100%;
+						height: 100%;
+						display: block;
+					}
+				}
+				.cell-text{
+					width: 330rpx;
+					height: 72rpx;
+					float: left;
+					box-sizing: border-box;
+					padding-left: 15rpx;
+					.cell-text-p{
+						width: 100%;
+						height: 36rpx;
+						line-height: 36rpx;
+						font-size: $font-size-24;
+						color: $text-color;
+						text-align: left;
+						float: left;
+					}
+				}
+			}
+		}
 		.title{
 			width: 100%;
 			box-sizing: border-box;

+ 1 - 1
pages/goods/product.vue

@@ -132,7 +132,7 @@
 						<view class="title-tab">相关推荐</view>
 					</view>
 					<view class="content hot">
-						<recommend :query-productid="product.productID" v-if="isRequest"></recommend>
+						<recommend :query-productid="product.productID" :query-type="product.recommendType" v-if="isRequest"></recommend>
 					</view>
 				</view>	
 				<!-- 商品参数 -->

+ 0 - 4
pages/goods/secondProduct.vue

@@ -417,10 +417,6 @@
 			getOptionFn(e){
 				this.isShareType = e.type
 			},
-			goSupplier(){
-				this.$api.setStorage('supplierInfo',this.shop)
-				this.$api.navigateTo('/pages/goods/supplier')
-			},
 			discard(){
 				//丢弃
 			}

+ 6 - 11
supplier/pages/user/my-shop.vue

@@ -41,7 +41,7 @@
 						<image class="item-img tui-skeleton-fillet" :src="item.image" mode="aspectFill"></image>
 						<view class="floor-item-content">
 							<view class="title tui-skeleton-rect">
-								<text class="mclap">{{item.name}}</text>
+								<text class="mclap">{{isInterceptHtmlFn(item.name)}}</text>
 							</view>
 							<view class="" v-if="hasLogin">
 								<template v-if="userIdentity == 4">
@@ -142,7 +142,7 @@
 						<image class="item-img tui-skeleton-fillet" :src="item.p_image" mode="aspectFill"></image>
 						<view class="floor-item-content">
 							<view class="title tui-skeleton-rect">
-								<text class="mclap">{{item.p_name}}</text>
+								<text class="mclap">{{isInterceptHtmlFn(item.p_name)}}</text>
 							</view>
 							<view class="" v-if="hasLogin">
 								<template v-if="userIdentity == 4">
@@ -277,7 +277,6 @@
 				this.shopId = resolve.shopID ? resolve.shopID : 0
 				this.userID = resolve.userID ? resolve.userID : 0
 				this.userIdentity = resolve.userIdentity
-				console.log(this.userIdentity)
 				this.InitShopDataInfo()
 			}).catch( error =>{
 				this.InitShopDataInfo()
@@ -334,7 +333,6 @@
 				this.ShopService.GetSupplierHomeProductList(this.listQuery).then(response =>{
 					let data = JSON.parse(response.data)
 					let dataList = data.items
-					console.log(data)
 					this.total = data.total
 					if(this.total>0){
 						this.isEmpty = false
@@ -351,7 +349,6 @@
 				this.listQuery.pageNum +=1
 				this.ShopService.GetSupplierHomeProductList(this.listQuery).then(response =>{
 					let data = JSON.parse(response.data)
-					console.log(data)
 					this.total = data.total
 					this.productList = this.productList.concat(data.items) 
 					this.QueryProductPrice1(this.productList)
@@ -368,7 +365,6 @@
 				productIds = productIdArr.join(",");
 				this.ProductService.querySearchProductPrice({userId: this.userID,productIds:productIds}).then(response =>{
 					this.recommendList = this.ReturnNewProducts(data,response.data);
-					console.log(this.recommendList)
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
@@ -382,7 +378,6 @@
 				productIds = productIdArr.join(",");
 				this.ProductService.querySearchProductPrice({userId: this.userID,productIds:productIds}).then(response =>{
 					this.productList = this.ReturnNewProducts1(data,response.data);
-					console.log(this.productList)
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
@@ -410,10 +405,6 @@
 				return NewArray
 			},
 			SubMitSearch() {//搜索
-				if (this.listQuery.keyword == '') {
-					this.$util.msg('请输入商品关键词',2000);
-					return
-				}
 				this.listQuery.pageNum = 1
 				this.GetSupplierHomeProductList()
 			},
@@ -449,6 +440,10 @@
 					this.isFocus = true
 				}
 			},
+			isInterceptHtmlFn(text){
+				let name = this.$reg.interceptHtmlFn(text)
+				return name
+			},
 			goSupplier(){//跳供应商资料页
 				this.$api.navigateTo('/supplier/pages/user/supplier?shopId='+this.supplierId)
 			},

+ 4 - 4
supplier/pages/user/supplier.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="container all-type-list-wrapper">
-		<supplier-details :shopId="shopId" v-if="isLoading"></supplier-details>
+		<supplier-details :shopUserId="shopUserId" v-if="isLoading"></supplier-details>
 	</view>
 </template>
 
@@ -12,14 +12,14 @@
 		},
 		data(){
 			return{
-				shopId:0,
+				shopUserId:0,
 				shopInfo:{},
 				isLoading:false
 			}
 		},		
 		onLoad(option) {
-			console.log(option.shopId)
-			this.shopId = option.shopId
+			console.log(option.shopUserId)
+			this.shopUserId = option.shopUserId
 			this.isLoading = true
 		},
 		methods:{