Bladeren bron

commit -m 修复商品模块问题

zhengjinyi 4 jaren geleden
bovenliggende
commit
546dde2cc9

+ 0 - 2
common/config/caimeiApi.js

@@ -258,7 +258,6 @@ const caimeiApi = {
 			const typeMap = {
 				1:`/pages/goods/goods-instrument?linkId=${linkId}`,
 				2:`/pages/goods/instrument-details?id=${linkId}`,
-				3:`/h5/pages/article/page-image?image=${pros.adsImage}&title=专题直播`,
 				4:`/h5/pages/activity/activity?id=${linkId}`,
 				5:`/pages/goods/product?id=${linkId}`, 
 				// 7:`/supplier/pages/user/my-shop?shopId=${linkId}`,
@@ -275,7 +274,6 @@ const caimeiApi = {
 				19:`/search/pages/search/search-supplier?keyWord=${keyword}`,
 				21:'/h5/pages/activity/meobohui',
 				// '-1':`/h5/pages/article/path?link=${pros.link}`
-				23:`/h5/pages/activity/activity-topic?linkId=${pros.linkParam.id}`,
 				24:'/pages/user/coupon/coupon'
 			}
 			const url = typeMap[linkType]

+ 3 - 3
components/cm-module/listTemplate/immediatelyList.vue

@@ -441,7 +441,7 @@
 				let productsList =[];
 				productsList=item.combinationProductList;
 				productsList.forEach(pros=>{	
-					prosPrice+=pros.retailPrice*pros.initProductNum;
+					prosPrice+=pros.price*pros.initProductNum;
 					item.productTotalAmount = prosPrice;
 				})
 				// console.log(prosPrice)
@@ -472,11 +472,11 @@
 			processActivityPrice(pros){//单独处理活动价格和阶梯价格
 				let ladderPriceList = pros.ladderPrices;
 				if(pros.ladderPriceFlag == '0' || pros.actStatus == 1){
-					pros.totalPrice = pros.initProductNum*pros.retailPrice
+					pros.totalPrice = pros.initProductNum*pros.price
 				}else{
 					ladderPriceList.forEach((item,index)=>{
 						if(pros.initProductNum>=item.buyNum){
-							pros.retailPrice = item.buyPrice
+							pros.price = item.buyPrice
 							pros.totalPrice = pros.initProductNum*item.buyPrice
 						}
 					})

+ 3 - 3
components/cm-module/listTemplate/secondHand.vue

@@ -55,8 +55,8 @@
 		<view class="product-container" v-else >
 			<view :class="tabIndex"  :style="{paddingTop:searchStatus?'160rpx':''}">
 				<scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower" scroll-y v-if="listData.length > 0">
-					<view v-for="(item,index) in listData" :key="index" :id="item.id" :productid="item.productID" class="all-type-list-content commodity-list" @click.stop="navToDetailPage(item.productID)"  >
-					    <image mode='widthFix' :src="item.mainImage"  class="list-img" alt="list-img"></image>
+					<view v-for="(item,index) in listData" :key="index" :id="item.id" :productid="item.productId" class="all-type-list-content commodity-list" @click.stop="navToDetailPage(item.productId)"  >
+					    <image mode='widthFix' :src="item.image"  class="list-img" alt="list-img"></image>
 						<view class="list-details-info">
 							<view class="list-details-title"> 
 								<view class="tabs" v-if="item.newAdded == 1">
@@ -67,7 +67,7 @@
 							<view class="list-details-price">
 								<view class="list-shop">
 									<view class="list-price">
-										<text class="price-larger">¥{{toFixedFn(item.price1)}}</text>
+										<text class="price-larger">¥{{toFixedFn(item.price)}}</text>
 									</view>
 								</view>
 								<button class="add-cart-btn" @click.stop="operationHanld(item)">数量</button>

+ 1 - 0
components/cm-module/pageTemplate/templateA.vue

@@ -153,6 +153,7 @@
 			...mapState(['hasLogin','userInfo','isActivity'])
 		},
 		created(){
+			console.log(this.userIdentity)
 			this.initData(this.pageData)
 		},
 		watch: {

+ 1 - 1
components/cm-module/productDetails/cm-price.vue

@@ -124,7 +124,7 @@
 									<view class="ladder-item-td">价格</view>
 								</view>
 								<view class="ladder-item" v-for="(ladd, index) in product.ladderPriceList" :key="index">
-									<view class="ladder-item-td">{{ ladd.buyNumRangeShow }}</view>
+									<view class="ladder-item-td">{{ ladd.numRange }}</view>
 									<view class="ladder-item-td">{{ ladd.buyPrice | NumFormat }}</view>
 								</view>
 							</view>

+ 8 - 4
components/cm-module/productDetails/secondPrice.vue

@@ -13,16 +13,20 @@
 			</view>
 		</template>
 		<template v-else>
-			<view class="wrap-main-item">
+			<view class="wrap-main-item" v-if="identity == 1">
 				<view class="p-price tui-skeleton-fillet">
 					<text class="txt sm">¥</text>
 					<text class="txt big" v-if="product.detailTalkFlag==2">详聊</text>
 					<text class="txt big" v-else>{{product.price | NumFormat}}</text>
 				</view>
 			</view>
-			
+			<view class="wrap-main-item" v-else>
+				<view class="p-price tui-skeleton-fillet">
+					<text class="txt sm">¥</text>
+					<text class="txt big">{{product.price | NumFormat}}</text>
+				</view>
+			</view>
 		</template>
-		
 	</view>
 </template>
 
@@ -49,7 +53,7 @@
 			console.log(this.product)
 		},
 		computed: {
-			...mapState(['hasLogin','isWxAuthorize'])
+			...mapState(['hasLogin','isWxAuthorize','identity'])
 		},
 		methods:{
 			loginClick(){

+ 3 - 3
pages/tabBar/category/index.vue

@@ -114,13 +114,13 @@
 			navToListPage(item,index){//分类导航跳转
 				switch(index){
 					case 1:
-						this.$api.navigateTo(`/pages/goods/goods-classify?classType=1&id=${item.bigTypeID}&title=${item.name}`)
+						this.$api.navigateTo(`/pages/goods/goods-classify?classType=1&id=${item.bigTypeId}&title=${item.name}`)
 						break;
 					case 2:
-						this.$api.navigateTo(`/pages/goods/goods-classify?classType=2&id=${item.smallTypeID}&title=${item.name}`)
+						this.$api.navigateTo(`/pages/goods/goods-classify?classType=2&id=${item.smallTypeId}&title=${item.name}`)
 						break;
 					case 3:
-						this.$api.navigateTo(`/pages/goods/goods-classify?classType=3&id=${item.tinyTypeID}&title=${item.name}`)
+						this.$api.navigateTo(`/pages/goods/goods-classify?classType=3&id=${item.tinyTypeId}&title=${item.name}`)
 						break;
 				}
 			},

+ 1 - 1
pages/tabBar/home/index.vue

@@ -13,7 +13,7 @@
 		</view>	
 		<!-- 楼层 -->
 		<view class="container-section tui-skeleton">
-			<page-floor :list="pageList" :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>
 		<!-- 侧边 -->

+ 1 - 1
second/pages/form/form.vue

@@ -269,7 +269,7 @@
 				],
 				BrandList:[],
 				isShow:false,
-				GoodsImagesList:[''],
+				GoodsImagesList:[],
 				vShow_GoodsImages:false,
 				secondParams:{
 					secondHandType:'',//一级分类

+ 3 - 3
seller/pages/cart/second.vue

@@ -12,7 +12,7 @@
 			<view class="layer" @tap.stop="discard" :style="{paddingBottom :isIphoneX ? '68rpx' : '36rpx',bottom:isIphoneX ?'-370rpx' : '-360rpx'}">
 				<view class="content">
 					<view class="layer-smimg">
-						<image :src="handleData.mainImage" mode=""></image>
+						<image :src="handleData.image" mode=""></image>
 					</view>
 					<view class="layer-nunbox">
 						<view class="layer-nunbox-t">
@@ -85,7 +85,7 @@
 				console.log(this.handleData)
 				this.handleData = data
 					this.number = 1
-					this.buyRetailPrice = Number(data.price1);
+					this.buyRetailPrice = Number(data.price);
 					this.secondProductType = data.secondProductType
 					this.specClass = 'show';
 			},
@@ -169,7 +169,7 @@
 						clubId:this.clubID,
 						allPrice:this.buyRetailPrice,
 						allCount:this.number,
-						productID:this.handleData.productID,
+						productID:this.handleData.productId,
 						productCount:this.number
 				}
 				this.$api.navigateTo(`/seller/pages/order/create-order?type=prodcut&data=${JSON.stringify({data:cartPramsData})}`)

+ 1 - 1
seller/pages/login/login.vue

@@ -141,7 +141,7 @@
 			authorize.getSetting().then(res =>{
 				console.log('用户是否授权过',res)
 				if(res == 1){
-					this.SellerLogin()
+					this.getWxAuthorize()
 				}else{
 					console.log(new Date +'用户未授权微信信息')
 					this.$api.navigateTo('/pages/authorization/authorization?type=1')

+ 5 - 1
services/second.service.js

@@ -33,7 +33,11 @@ export default class SecondService {
 	}
 	/*二手发布/浏览量 */
 	ProductCount (data = {}) {
-		return this.AjaxService.get({ url:'/product/updateSecondHandProductCount', data, isLoading: true })
+		return this.AjaxService.get({ 
+			url:'/product/updateSecondHandProductCount', 
+			data, 
+			isLoading: true ,
+		})
 	}
 	/**
 	 *@二手商品详情

+ 6 - 1
services/sellse.service.js

@@ -99,7 +99,12 @@ export default class SellerService {
 	 *@param 搜索关键词 searchKeyword	【选传】 
 	 */
 	GetOrderSecondHandProductList (data = {}) {
-		return this.AjaxService.get({ url:'/product/getOrderSecondHandProductList', data, isLoading: true })
+		return this.AjaxService.get({ 
+			url:'/commodity/second/order/products', 
+			data, 
+			isLoading: true ,
+			isHost:true
+		})
 	}
 	/**
 	 *@协销-二手去结算接口

+ 1 - 1
supplier/pages/user/my-product.vue

@@ -139,7 +139,7 @@
 			name:'',//商品名称
 			validFlag:'',//状态
 			featuredFlag:'',//是否主推
-			commodityType:1,//商品属性
+			commodityType:'',//商品属性
 			bigTypeId:0,//一级
 			smallTypeId:0,//二级
 			tinyTypeId:0//三级