Selaa lähdekoodia

commit -m 分类商品列表、搜索商品列表筛选条件调试

zhengjinyi 3 vuotta sitten
vanhempi
commit
a4885cf035

+ 50 - 37
pages/goods/goods-classify.vue

@@ -399,6 +399,7 @@ const defaultListQuery = {
 	pageSize: 10,
 	sortField: '',
 	sortType: 1,
+	brandIds:'',
 	idType: 0 //一级
 }
 export default {
@@ -422,6 +423,7 @@ export default {
 			isSearchPrice: true,
 			isChoiceNewType: false,
 			isChoiceActiType: false,
+			isAllcheckedBrand:false,
 			headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
 			systeminfo: this.setSysteminfo(), //获取设备信息
 			CustomBar: this.CustomBar, // 顶部导航栏高度
@@ -435,45 +437,18 @@ export default {
 			userIdentity: 0,
 			actasFlag:2,
 			listData: [],
-			brandLists: [
-				{ name: '斯蒂芬斯', isChecked: false },
-				{ name: 'Beautsecre', isChecked: false },
-				{ name: '意大利DEP', isChecked: false },
-				{ name: '美生美', isChecked: false },
-				{ name: '三诺激光', isChecked: false },
-				{ name: '三诺激光', isChecked: false },
-				{ name: '三诺激光三诺激光', isChecked: false },
-				{ name: '三诺激光三诺激光三诺激光', isChecked: false },
-				{ name: '斯蒂芬斯', isChecked: false },
-				{ name: 'Beautsecre', isChecked: false },
-				{ name: '意大利DEP', isChecked: false },
-				{ name: '美生美', isChecked: false },
-				{ name: '三诺激光', isChecked: false },
-				{ name: '三诺激光', isChecked: false },
-				{ name: '三诺激光三诺激光', isChecked: false },
-				{ name: '三诺激光三诺激光三诺激光', isChecked: false },
-				{ name: '斯蒂芬斯', isChecked: false },
-				{ name: 'Beautsecre', isChecked: false },
-				{ name: '意大利DEP', isChecked: false },
-				{ name: '美生美', isChecked: false },
-				{ name: '三诺激光', isChecked: false },
-				{ name: '三诺激光', isChecked: false },
-				{ name: '三诺激光三诺激光', isChecked: false },
-				{ name: '三诺激光三诺激光三诺激光', isChecked: false },
-				{ name: '斯蒂芬斯', isChecked: false },
-				{ name: 'Beautsecre', isChecked: false },
-				{ name: '意大利DEP', isChecked: false },
-				{ name: '美生美', isChecked: false },
-				{ name: '三诺激光', isChecked: false },
-				{ name: '三诺激光', isChecked: false },
-				{ name: '三诺激光三诺激光', isChecked: false },
-				{ name: '三诺激光三诺激光三诺激光', isChecked: false }
-			],
+			brandLists: [],
 			checkedBrandList: [],
 			checkedBrandLength: 0,
 			windowHeight: '',
 			scrollHeight: '',
 			listQuery: Object.assign({}, defaultListQuery),
+			brandParam: {
+				keyword: '',
+				id: '',
+				idType: '',
+				identity: 0
+			},
 			priceLoading: true,
 			loadding: false,
 			pullUpOn: true,
@@ -541,6 +516,22 @@ export default {
 					this.$util.msg(error.msg, 2000)
 				})
 		},
+		getCommoditySearchQUeryBrand() {
+			// 查询筛选项品牌
+			this.ProductService.getCommoditySearchQUeryBrand(this.brandParam)
+				.then(response => {
+					const data = response.data
+					this.defaultBrandLists = data.map((el, index) => {
+						el.isChecked = false
+						return el
+					})
+					this.brandLists = this.defaultBrandLists.slice(0,8)
+					console.log('品牌=============>', this.brandLists)
+				})
+				.catch(error => {
+					console.log('查询品牌列表异常')
+				})
+		},
 		GetProductListInfo() {
 			//查询分类商品列表
 			this.listQuery.pageNum = 1
@@ -697,6 +688,7 @@ export default {
 				this.listQuery.sortField = 'p_price'
 			} else if (index == 4) {
 				this.searchClickFn()
+				this.getCommoditySearchQUeryBrand()
 			}
 			this.GetProductListInfo()
 		},
@@ -782,27 +774,48 @@ export default {
 			}
 		},
 		showAllBrands() {
-			// 查看全部品牌
+			// 显示全部品牌
 			this.isShowAllBrands = true
+			this.brandLists = this.defaultBrandLists
 		},
 		choiceBrand(brand, index) {
-			// 选择品牌
+			// 选择品牌 
 			brand.isChecked = !brand.isChecked
 			if (brand.isChecked) {
-				this.checkedBrandList.push(brand)
+				this.checkedBrandList.push(brand.id)
 			} else {
 				this.checkedBrandList.splice(index, 1)
 			}
+			this.isAllcheckedBrand = false
 			this.checkedBrandLength = this.checkedBrandList.length
 			console.log('checkedBrandList', this.checkedBrandList)
+			this.listQuery.brandIds = this.checkedBrandList.join(',')
+			console.log('this.listQuery.brandIds', this.listQuery.brandIds)
+		},
+		choiceBrandAll(){
+			// 点击选择全部品牌
+			this.isAllcheckedBrand = true
+			this.brandLists.forEach(el=>{
+				el.isChecked = false
+			})
 		},
 		choiceNewType() {
 			// 选择筛选项新品
 			this.isChoiceNewType = !this.isChoiceNewType
+			if(this.isChoiceNewType){
+				this.listQuery.newFlag = 1
+			}else{
+				this.listQuery.newFlag = 0
+			}
 		},
 		choiceActiType() {
 			// 选择筛选项促销商品
 			this.isChoiceActiType = !this.isChoiceActiType
+			if(this.isChoiceNewType){
+				this.listQuery.promotionFlag = 1
+			}else{
+				this.listQuery.promotionFlag = 0
+			}
 		},
 		SetScrollHeight() {
 			let obj = {}

+ 1 - 1
pages/login/bindwechat.vue

@@ -265,7 +265,7 @@
 			display: flex;
 			flex-direction: column;
 			align-items: center;
-			height: 68rpx;
+			height: auto;
 			padding: 20rpx 24rpx;
 			margin: 24rpx 0 118rpx 0;
 			box-sizing: border-box;

+ 93 - 38
pages/search/search.vue

@@ -366,7 +366,10 @@
 		<tui-drawer mode="right" :visible="rightDrawer" @close="closeDrawer">
 			<view class="drawer-title">
 				<view class="drawer-title-h1">品牌</view>
-				<view class="drawer-title-p">已选中<text class="text">{{ checkedBrandLength }}</text>个品牌</view>
+				<view class="drawer-title-p"
+					>已选中<text class="text">{{ checkedBrandLength }}</text
+					>个品牌</view
+				>
 			</view>
 			<view
 				class="drawer-container clearfix"
@@ -377,13 +380,13 @@
 				<scroll-view class="tui-drawer-scroll" scroll-y :style="{ height: drawerH + 'px' }">
 					<view class="drawer-main">
 						<view class="drawer-main-brand clearfix">
-							<view class="drawer-brand-list">全部</view>
+							<view class="drawer-brand-list" :class="isAllcheckedBrand ? 'checked' : ''" @click="choiceBrandAll">全部</view>
 							<view
 								class="drawer-brand-list"
-								:class="brand.isChecked ? 'checked':''"
+								:class="brand.isChecked ? 'checked' : ''"
 								v-for="(brand, index) in brandLists"
 								:key="index"
-								@click="choiceBrand(brand,index)"
+								@click="choiceBrand(brand, index)"
 							>
 								{{ brand.name }}
 							</view>
@@ -394,7 +397,10 @@
 						<view class="drawer-main-radio">
 							<view class="drawer-radio-name">新品</view>
 							<view class="drawer-radio-input" @click="choiceNewType">
-								<text class="iconfont" :class="isChoiceNewType ? 'icon-yixuanze' : 'icon-weixuanze'"></text>
+								<text
+									class="iconfont"
+									:class="isChoiceNewType ? 'icon-yixuanze' : 'icon-weixuanze'"
+								></text>
 							</view>
 						</view>
 						<view class="drawer-main-radio">
@@ -409,7 +415,7 @@
 					</view>
 				</scroll-view>
 				<view class="drawer-input btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
-					<view class="drawer-btn clear" @click="closeDrawer">重置</view>
+					<view class="drawer-btn clear" @click="closeDrawer">取消</view>
 					<view class="drawer-btn comfrim" @click="handSearchList">确定</view>
 				</view>
 			</view>
@@ -442,7 +448,7 @@ export default {
 			show: false,
 			vipFlag: 0,
 			userIdentity: 0,
-			actasFlag:2,
+			actasFlag: 2,
 			searchKeyType: 1,
 			tabIndex: 0,
 			rightDrawer: false,
@@ -455,6 +461,7 @@ export default {
 			isSearchPrice: true,
 			isChoiceNewType: false,
 			isChoiceActiType: false,
+			isAllcheckedBrand:false,
 			isShowClose: false, //是否显示清空输入框图标
 			isSearchHistory: false, //是都显示搜索历史
 			serachRecordList: [], //历史搜索记录
@@ -468,18 +475,10 @@ export default {
 			showEmpty: false,
 			scrollHeight: '',
 			listData: [],
-			brandLists: [
-				{ name: '斯蒂芬斯',isChecked:false },
-				{ name: 'Beautsecre',isChecked:false },
-				{ name: '意大利DEP',isChecked:false },
-				{ name: '美生美',isChecked:false },
-				{ name: '三诺激光',isChecked:false },
-				{ name: '三诺激光',isChecked:false },
-				{ name: '三诺激光三诺激光',isChecked:false },
-				{ name: '三诺激光三诺激光三诺激光',isChecked:false }
-			],
-			checkedBrandList:[],
-			checkedBrandLength:0,
+			brandLists: [],
+			defaultBrandLists: [],
+			checkedBrandList: [],
+			checkedBrandLength: 0,
 			productIds: '', //查询价格的商品ID
 			showLoading: false,
 			loadingNow: true,
@@ -493,15 +492,24 @@ export default {
 				sortField: '',
 				sortType: 1,
 				newType: 1,
-				actiType: 1
+				actiType: 1,
+				brandIds:'', // 品牌Id
+				newFlag:0,	// 查询新品标记,默认0,新品1
+				promotionFlag:0, // 查询促销标记,默认0,促销1
+			},
+			brandParam: {
+				keyword: '',
+				id: '',
+				idType: '',
+				identity: 0
 			},
 			total: 0,
-			height:0,
-			drawerH:0 // 抽屉内部scrollview高度
+			height: 0,
+			drawerH: 0 // 抽屉内部scrollview高度
 		}
 	},
 	computed: {
-		...mapState(['hasLogin', 'userInfo', 'isWxAuthorize', 'hasLogin', 'userInfo', 'identity']),
+		...mapState(['hasLogin', 'userInfo', 'isWxAuthorize', 'hasLogin', 'userInfo', 'identity'])
 	},
 	onLoad(option) {
 		console.log(option)
@@ -524,9 +532,9 @@ export default {
 			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
 			this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
 			this.listQuery.identity = this.identity
-			if(this.userIdentity == 1){
+			if (this.userIdentity == 1) {
 				this.actasFlag = this.userIdentity
-			}else{
+			} else {
 				this.actasFlag = 2
 			}
 			if (option.keyWord) {
@@ -560,6 +568,22 @@ export default {
 				}
 			})
 		},
+		getCommoditySearchQUeryBrand() {
+			// 查询筛选项品牌
+			this.ProductService.getCommoditySearchQUeryBrand(this.brandParam)
+				.then(response => {
+					const data = response.data
+					this.defaultBrandLists = data.map((el, index) => {
+						el.isChecked = false
+						return el
+					})
+					this.brandLists = this.defaultBrandLists.slice(0,8)
+					console.log('品牌=============>', this.brandLists)
+				})
+				.catch(error => {
+					console.log('查询品牌列表异常')
+				})
+		},
 		subMitSearch() {
 			//搜索
 			if (this.listQuery.keyword == '') {
@@ -591,6 +615,12 @@ export default {
 				}
 			}
 		},
+		handSearchList() {
+			//确定筛选
+			this.rightDrawer = false
+			this.listQuery.pageNum =1
+			this.getListFromServer(false)
+		},
 		scrolltolower() {
 			if (this.total > this.listData.length && this.pullFlag) {
 				this.getListFromServer(true)
@@ -663,7 +693,7 @@ export default {
 			})
 			this.productIds = productIdArr.join(',')
 			this.ProductService.querySearchProductPrice({
-				flag:this.actasFlag, //查询促销标记 1协销 2机构 3供应商
+				flag: this.actasFlag, //查询促销标记 1协销 2机构 3供应商
 				userId: this.userId,
 				productIds: this.productIds,
 				source: 2 // 来源 1 WWW 2 小程序
@@ -692,7 +722,6 @@ export default {
 		},
 		handleScreen(e) {
 			let index = e.currentTarget.dataset.index
-			console.log(index)
 			if (index == 0) {
 				this.tabIndex = 0
 				this.isSearchSalesFirst = true
@@ -700,6 +729,7 @@ export default {
 				this.isSearchPriceFirst = true
 				this.listQuery.sortType = 1
 				this.listQuery.sortField = ''
+				this.getListFromServer()
 			} else if (index == 1) {
 				this.tabIndex = 1
 				this.isSearchSalesFirst = false
@@ -712,6 +742,7 @@ export default {
 					this.listQuery.sortType = 0
 				}
 				this.listQuery.sortField = 'p_sales'
+				this.getListFromServer()
 			} else if (index == 2) {
 				this.tabIndex = 2
 				this.isSearchSalesFirst = true
@@ -724,6 +755,7 @@ export default {
 					this.listQuery.sortType = 0
 				}
 				this.listQuery.sortField = 'p_favorite'
+				this.getListFromServer()
 			} else if (index == 3) {
 				this.tabIndex = 3
 				this.isSearchSalesFirst = true
@@ -736,10 +768,12 @@ export default {
 					this.listQuery.sortType = 0
 				}
 				this.listQuery.sortField = 'p_price'
+				this.getListFromServer()
 			} else if (index == 4) {
+				this.brandParam.keyword = this.listQuery.keyword
 				this.showRightDrawer()
+				this.getCommoditySearchQUeryBrand()
 			}
-			this.getListFromServer()
 		},
 		showRightDrawer() {
 			//弹出右侧抽屉
@@ -864,27 +898,48 @@ export default {
 			}
 		},
 		showAllBrands() {
-			// 查看全部品牌
+			// 显示全部品牌
 			this.isShowAllBrands = true
+			this.brandLists = this.defaultBrandLists
 		},
-		choiceBrand(brand,index) {
+		choiceBrand(brand, index) {
 			// 选择品牌
 			brand.isChecked = !brand.isChecked
-			if(brand.isChecked){
-				this.checkedBrandList.push(brand)
-			}else{
-				this.checkedBrandList.splice(index,1)
+			if (brand.isChecked) {
+				this.checkedBrandList.push(brand.id)
+			} else {
+				this.checkedBrandList.splice(index, 1)
 			}
+			this.isAllcheckedBrand = false
 			this.checkedBrandLength = this.checkedBrandList.length
-			console.log('checkedBrandList',this.checkedBrandList)
+			console.log('checkedBrandList', this.checkedBrandList)
+			this.listQuery.brandIds = this.checkedBrandList.join(',')
+			console.log('this.listQuery.brandIds', this.listQuery.brandIds)
+		},
+		choiceBrandAll(){
+			// 点击选择全部品牌
+			this.isAllcheckedBrand = true
+			this.brandLists.forEach(el=>{
+				el.isChecked = false
+			}) 
 		},
 		choiceNewType() {
 			// 选择筛选项新品
 			this.isChoiceNewType = !this.isChoiceNewType
+			if(this.isChoiceNewType){
+				this.listQuery.newFlag = 1
+			}else{
+				this.listQuery.newFlag = 0
+			}
 		},
 		choiceActiType() {
 			// 选择筛选项促销商品
 			this.isChoiceActiType = !this.isChoiceActiType
+			if(this.isChoiceNewType){
+				this.listQuery.promotionFlag = 1
+			}else{
+				this.listQuery.promotionFlag = 0
+			}
 		},
 		topBubble() {
 			//显隐搜索项
@@ -1496,9 +1551,9 @@ page {
 				-webkit-line-clamp: 1;
 				line-clamp: 1;
 				-webkit-box-orient: vertical;
-				&.checked{
-					background-color: #FEF6F3;
-					color: #E15616;
+				&.checked {
+					background-color: #fef6f3;
+					color: #e15616;
 				}
 				&:nth-child(3n) {
 					margin-right: 0;

+ 66 - 65
pages/second/form/form-seller.vue

@@ -283,10 +283,10 @@
 <script>
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
 	import paymentRecord from '@/components/cm-module/orderDetails/paymentRecord'
-	import { uploadFileImage , uploadFilePdf } from "@/services/public.js"
+	import { uploadFileImage , uploadFilePdf } from '@/services/public.js'
 	import authorize from '@/common/config/authorize.js'
 	import $reg from '@/common/config/common.js'
-	import { mapState,mapMutations } from 'vuex';
+	import { mapState,mapMutations } from 'vuex'
 	export default{
 		name:'secondHandrelease',
 		components:{
@@ -364,14 +364,14 @@
 		},
 		methods:{
 			onTextareaInputInfo(e){
-			   this.secondParams.productDetails = e.detail.value;
+			   this.secondParams.productDetails = e.detail.value
 			},
 			radioChange(e){//品牌
-				this.secondParams.brandId = e.target.value;
+				this.secondParams.brandId = e.target.value
 				this.BrandList.forEach((item,index)=>{
 					if(item.id==this.secondParams.brandId){
-						this.brandname = item.name;
-						this.popupShow = false;
+						this.brandname = item.name
+						this.popupShow = false
 					}
 				})
 			},
@@ -380,58 +380,59 @@
 				this.$refs.mpvueCityPicker.show()
 			},
 			onConfirm(e) {//获取选择的地址信息
-				this.addressData.address = e.name;
-				this.addressData.townID = e.townCode;
-				this.addressData.cityID = e.cityCode;
-				this.addressData.provinceID = e.provinceCode;
-				this.secondParams.townId = this.addressData.townID;
+				this.addressData.address = e.name
+				this.addressData.townID = e.townCode
+				this.addressData.cityID = e.cityCode
+				this.addressData.provinceID = e.provinceCode
+				this.secondParams.townId = this.addressData.townID
 			},
 			hanldOperationConfim(){
-				this.popupShow = true;
+				this.popupShow = true
 			},
 			hidePopup(){
-				this.popupShow = false;
+				this.popupShow = false
 			},
 			secondHandRidio(e) {
-				this.secondParams.secondHandType = e.target.value;
+				this.secondParams.secondHandType = e.target.value
 				if (e.target.value == 1){
-					this.isShow = true;
+					this.isShow = true
+					this.secondParams.instrumentType = '1'
 				}else {
-					this.isShow = false;
+					this.isShow = false
 				}
 			},
 			secondHandType(e){ //二手仪器
-				this.secondParams.instrumentType = e.target.value.toString();
+				this.secondParams.instrumentType = e.target.value.toString()
 			},
 			Detailed(){
-				this.vShow_detailTalkFlag = !this.vShow_detailTalkFlag;
+				this.vShow_detailTalkFlag = !this.vShow_detailTalkFlag
 				if(this.vShow_detailTalkFlag){
-					this.secondParams.detailTalkFlag = 2 ;//启用价格详聊
+					this.secondParams.detailTalkFlag = 2 //启用价格详聊
 				}else {
-					this.secondParams.detailTalkFlag = 1 ;//不启用价格详聊
+					this.secondParams.detailTalkFlag = 1 //不启用价格详聊
 				}
 			},
 			uploadGoodsImagesFn(event){//上传商品图片
 				uploadFileImage().then(res =>{
-					 this.GoodsImagesList.push(JSON.parse(res.data).data);
-					 this.secondParams.image =this.GoodsImagesList.toString()+',';
+					 this.GoodsImagesList.push(JSON.parse(res.data).data)
+					 this.secondParams.image =this.GoodsImagesList.toString()+','
 				})
 			},
 			uploadUserImageFn(event){//上传身份图片
 				uploadFileImage().then(res =>{
-					 this.secondParams.authenticationImage = JSON.parse(res.data).data;
+					 this.secondParams.authenticationImage = JSON.parse(res.data).data
 				})
 			},
 			uploadCommitmentImageFn(event){//上传承诺函图片
 				uploadFileImage().then(res =>{
-					 this.secondParams.commitmentImage = JSON.parse(res.data).data;
+					 this.secondParams.commitmentImage = JSON.parse(res.data).data
 				})
 			},
 			uploadCommitmentFile(){//上传承诺函文件
 				uploadFilePdf().then(res =>{
 					let data =  JSON.parse(res.data).data
-					this.secondParams.fileName = uni.getStorageSync('fileName');
-					this.secondParams.ossName = data.ossName;
+					this.secondParams.fileName = uni.getStorageSync('fileName')
+					this.secondParams.ossName = data.ossName
 					console.log('fileName',this.secondParams.fileName)
 					console.log('ossName',this.secondParams.ossName)
 				})
@@ -440,8 +441,8 @@
 				this.secondParams.fileName = ''
 			},
 			removeGoodsImagesFn(index){//删除商品图片
-				this.GoodsImagesList.splice(index,1);
-				this.secondParams.image =this.GoodsImagesList.toString()+',';
+				this.GoodsImagesList.splice(index,1)
+				this.secondParams.image =this.GoodsImagesList.toString()+','
 			},
 			removeUserImageFn(index){//删除身份图片
 				this.secondParams.authenticationImage = ''
@@ -450,25 +451,25 @@
 				this.secondParams.commitmentImage = ''
 			},
 			getProductType(e){
-			  this.secondParams.secondProductType = e.target.value ;
+			  this.secondParams.secondProductType = e.target.value 
 			},
 			submitBtn () {
 				if(this.secondParams.secondHandType == ''){
-					this.$util.msg('请选择分类',2000);
-					return;
+					this.$util.msg('请选择分类',2000)
+					return
 				}
 				if(this.secondParams.secondHandType == 1 ){
 					if(this.secondParams.instrumentType ==''){
-						this.$util.msg('请完善仪器分类',2000);
-						return;
+						this.$util.msg('请完善仪器分类',2000)
+						return
 					}
 				}
 				if(this.secondParams.brandId == ''){
-					this.$util.msg('请选择商品品牌',2000);
-					return;
+					this.$util.msg('请选择商品品牌',2000)
+					return
 				}
 				if(this.secondParams.name == ''){
-					this.$util.msg('请输入商品名称',2000);
+					this.$util.msg('请输入商品名称',2000)
 					return
 				}
 				// if(this.secondParams.secondHandType ==2) {
@@ -478,7 +479,7 @@
 				// 	} 
 				// }
 				if(!this.$api.isNumber(this.secondParams.price)){
-					  this.$util.msg('请输入交易价',2000);
+					  this.$util.msg('请输入交易价',2000)
 						return
 				}
 				// if(this.secondParams.secondHandType ==2) {
@@ -496,52 +497,52 @@
 				// 	}
 				// }
 				if(this.secondParams.productQuality == ''){
-					this.$util.msg('请输入商品成色',2000);
+					this.$util.msg('请输入商品成色',2000)
 					return
 				}
 				if(this.secondParams.contactName == ''){
-					this.$util.msg('请输入联系人姓名',2000);
+					this.$util.msg('请输入联系人姓名',2000)
 					return
 				}
 				if(this.secondParams.contactMobile == ''){
 					console.log(this.secondParams.contactMobile)
-					this.$util.msg('请输入联系方式',2000);
+					this.$util.msg('请输入联系方式',2000)
 					return
 				}
 				if(!$reg.isMobile(this.secondParams.contactMobile)){
-					this.$util.msg('请填写正确的手机号',2000);
+					this.$util.msg('请填写正确的手机号',2000)
 					return
 				}
 				if(this.userIdentity === 1){
 					if(this.secondParams.dockingPeopleName == ''){
-						this.$util.msg('请输入采美对接人姓名',2000);
+						this.$util.msg('请输入采美对接人姓名',2000)
 						return
 					}
 					if(this.secondParams.dockingPeopleMobile == ''){
-						this.$util.msg('请输入采美对接人手机号',2000);
+						this.$util.msg('请输入采美对接人手机号',2000)
 						return
 					}
 				}
 				if(this.secondParams.dockingPeopleMobile !=''){
 					if(!$reg.isMobile(this.secondParams.dockingPeopleMobile)){
-						this.$util.msg('请填写正确的采美对接人手机号',2000);
+						this.$util.msg('请填写正确的采美对接人手机号',2000)
 						return
 					}
 				}
 				if(this.secondParams.townId == ''|| this.secondParams.townId == undefined){
-					this.$util.msg('请完善联系地址',2000);
+					this.$util.msg('请完善联系地址',2000)
 					return
 				}
 				if(this.secondParams.address == ''){
-					this.$util.msg('请填写详细地址',2000);
+					this.$util.msg('请填写详细地址',2000)
 					return
 				}
 				if(this.GoodsImagesList ==''){
-					this.$util.msg('请上传图片',2000);
-					return;
+					this.$util.msg('请上传图片',2000)
+					return
 				}
 				if(this.checkbox==false){
-					this.$util.msg('请勾选已阅读',2000);
+					this.$util.msg('请勾选已阅读',2000)
 					return
 				}
 				console.log(this.secondParams)
@@ -551,7 +552,7 @@
 					this.cancelButtonText = '继续发布'
 					this.confirmButtonText = '去上传'
 					this.isButtonsType = 1
-					return;
+					return
 				}
 				if(this.secondParams.commitmentImage == '' || this.secondParams.ossName == ''){
 					this.PopupShow = true
@@ -559,21 +560,21 @@
 					this.cancelButtonText = '继续发布'
 					this.confirmButtonText = '去上传'
 					this.isButtonsType = 1
-					return;
+					return
 				}
 				this.SecondHandProduct(this.secondParams)
 			},
 			SecondHandProduct(params){//提交发布
 				this.SecondService.SecondHandProduct(params).then(res=>{ 
-					this.PopupShow = true;
+					this.PopupShow = true
 					this.tipsContentText = '发布二手商品,采美需要收取您每个商品100元的展示费,展示期为3个月支付完成后,商品会在1-2个工作日内进行审核,审核通过后,商品会立即上线'
 					this.cancelButtonText = '取消发布'
 					this.confirmButtonText = '去支付'
 					this.isButtonsType = 2
-					this.playid= res.data;
+					this.playid= res.data
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
-					this.secondBj = false;
+					this.secondBj = false
 					return
 				})
 			},
@@ -581,21 +582,21 @@
 				switch(this.isButtonsType){
 					case 1:
 						this.SecondHandProduct(this.secondParams)
-						break;
+						break
 					case 2:	
-						this.PopupShow = false;
-						break;
+						this.PopupShow = false
+						break
 				}
 			},
 			confirmButtonFn(){//弹窗操作按钮
 				switch(this.isButtonsType){
 					case 1:
-						this.PopupShow = false;
-						break;
+						this.PopupShow = false
+						break
 					case 2:	
 						this.MiniWxPayFor()
-						this.PopupShow = false;
-						break;
+						this.PopupShow = false
+						break
 				}
 			},
 			MiniWxPayFor(){
@@ -605,7 +606,7 @@
 							productId:this.playid
 						}
 					this.PayService.SecondHandPay(params).then(response =>{
-						let PayInfo = JSON.parse(response.data.data.payInfo);
+						let PayInfo = JSON.parse(response.data.data.payInfo)
 						this.WxRequestPayment(PayInfo)
 					}).catch(error =>{
 						this.$util.msg(error.msg,2000)
@@ -621,7 +622,7 @@
 					'signType': data.signType,
 					'paySign': data.paySign,
 					'success':function(res){
-						wx.reLaunch({url: '/pages/second/product/product-list'});
+						wx.reLaunch({url: '/pages/second/product/product-list'})
 					},
 					'fail':function(res){
 						self.$util.msg('用户取消支付~')
@@ -632,13 +633,13 @@
 				})
 			},
 			changeBox:function () {
-				this.checkbox = !this.checkbox;
+				this.checkbox = !this.checkbox
 			},
 		},
 		onShow() {
 			this.SecondService.brandList().then(res =>{//品牌列表
 				if(res.code == 0){
-				   this.BrandList = res.data;
+				   this.BrandList = res.data
 				}
 			})
 			this.$api.getComStorage('userInfo').then((resolve) =>{

+ 66 - 65
pages/second/form/form.vue

@@ -283,10 +283,10 @@
 <script>
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
 	import paymentRecord from '@/components/cm-module/orderDetails/paymentRecord'
-	import { uploadFileImage , uploadFilePdf } from "@/services/public.js"
+	import { uploadFileImage , uploadFilePdf } from '@/services/public.js'
 	import authorize from '@/common/config/authorize.js'
 	import $reg from '@/common/config/common.js'
-	import { mapState,mapMutations } from 'vuex';
+	import { mapState,mapMutations } from 'vuex'
 	export default{
 		name:'secondHandrelease',
 		components:{
@@ -364,14 +364,14 @@
 		},
 		methods:{
 			onTextareaInputInfo(e){
-			   this.secondParams.productDetails = e.detail.value;
+			   this.secondParams.productDetails = e.detail.value
 			},
 			radioChange(e){//品牌
-				this.secondParams.brandId = e.target.value;
+				this.secondParams.brandId = e.target.value
 				this.BrandList.forEach((item,index)=>{
 					if(item.id==this.secondParams.brandId){
-						this.brandname = item.name;
-						this.popupShow = false;
+						this.brandname = item.name
+						this.popupShow = false
 					}
 				})
 			},
@@ -380,58 +380,59 @@
 				this.$refs.mpvueCityPicker.show()
 			},
 			onConfirm(e) {//获取选择的地址信息
-				this.addressData.address = e.name;
-				this.addressData.townID = e.townCode;
-				this.addressData.cityID = e.cityCode;
-				this.addressData.provinceID = e.provinceCode;
-				this.secondParams.townId = this.addressData.townID;
+				this.addressData.address = e.name
+				this.addressData.townID = e.townCode
+				this.addressData.cityID = e.cityCode
+				this.addressData.provinceID = e.provinceCode
+				this.secondParams.townId = this.addressData.townID
 			},
 			hanldOperationConfim(){
-				this.popupShow = true;
+				this.popupShow = true
 			},
 			hidePopup(){
-				this.popupShow = false;
+				this.popupShow = false
 			},
 			secondHandRidio(e) {
-				this.secondParams.secondHandType = e.target.value;
+				this.secondParams.secondHandType = e.target.value
 				if (e.target.value == 1){
-					this.isShow = true;
+					this.isShow = true
+					this.secondParams.instrumentType = '1'
 				}else {
-					this.isShow = false;
+					this.isShow = false
 				}
 			},
 			secondHandType(e){ //二手仪器
-				this.secondParams.instrumentType = e.target.value.toString();
+				this.secondParams.instrumentType = e.target.value.toString()
 			},
 			Detailed(){
-				this.vShow_detailTalkFlag = !this.vShow_detailTalkFlag;
+				this.vShow_detailTalkFlag = !this.vShow_detailTalkFlag
 				if(this.vShow_detailTalkFlag){
-					this.secondParams.detailTalkFlag = 2 ;//启用价格详聊
+					this.secondParams.detailTalkFlag = 2 //启用价格详聊
 				}else {
-					this.secondParams.detailTalkFlag = 1 ;//不启用价格详聊
+					this.secondParams.detailTalkFlag = 1 //不启用价格详聊
 				}
 			},
 			uploadGoodsImagesFn(event){//上传商品图片
 				uploadFileImage().then(res =>{
-					 this.GoodsImagesList.push(JSON.parse(res.data).data);
-					 this.secondParams.image =this.GoodsImagesList.toString()+',';
+					 this.GoodsImagesList.push(JSON.parse(res.data).data)
+					 this.secondParams.image =this.GoodsImagesList.toString()+','
 				})
 			},
 			uploadUserImageFn(event){//上传身份图片
 				uploadFileImage().then(res =>{
-					 this.secondParams.authenticationImage = JSON.parse(res.data).data;
+					 this.secondParams.authenticationImage = JSON.parse(res.data).data
 				})
 			},
 			uploadCommitmentImageFn(event){//上传承诺函图片
 				uploadFileImage().then(res =>{
-					 this.secondParams.commitmentImage = JSON.parse(res.data).data;
+					 this.secondParams.commitmentImage = JSON.parse(res.data).data
 				})
 			},
 			uploadCommitmentFile(){//上传承诺函文件
 				uploadFilePdf().then(res =>{
 					let data =  JSON.parse(res.data).data
-					this.secondParams.fileName = uni.getStorageSync('fileName');
-					this.secondParams.ossName = data.ossName;
+					this.secondParams.fileName = uni.getStorageSync('fileName')
+					this.secondParams.ossName = data.ossName
 					console.log('fileName',this.secondParams.fileName)
 					console.log('ossName',this.secondParams.ossName)
 				})
@@ -440,8 +441,8 @@
 				this.secondParams.fileName = ''
 			},
 			removeGoodsImagesFn(index){//删除商品图片
-				this.GoodsImagesList.splice(index,1);
-				this.secondParams.image =this.GoodsImagesList.toString()+',';
+				this.GoodsImagesList.splice(index,1)
+				this.secondParams.image =this.GoodsImagesList.toString()+','
 			},
 			removeUserImageFn(index){//删除身份图片
 				this.secondParams.authenticationImage = ''
@@ -450,25 +451,25 @@
 				this.secondParams.commitmentImage = ''
 			},
 			getProductType(e){
-			  this.secondParams.secondProductType = e.target.value ;
+			  this.secondParams.secondProductType = e.target.value 
 			},
 			submitBtn () {
 				if(this.secondParams.secondHandType == ''){
-					this.$util.msg('请选择分类',2000);
-					return;
+					this.$util.msg('请选择分类',2000)
+					return
 				}
 				if(this.secondParams.secondHandType == 1 ){
 					if(this.secondParams.instrumentType ==''){
-						this.$util.msg('请完善仪器分类',2000);
-						return;
+						this.$util.msg('请完善仪器分类',2000)
+						return
 					}
 				}
 				if(this.secondParams.brandId == ''){
-					this.$util.msg('请选择商品品牌',2000);
-					return;
+					this.$util.msg('请选择商品品牌',2000)
+					return
 				}
 				if(this.secondParams.name == ''){
-					this.$util.msg('请输入商品名称',2000);
+					this.$util.msg('请输入商品名称',2000)
 					return
 				}
 				// if(this.secondParams.secondHandType ==2) {
@@ -478,7 +479,7 @@
 				// 	} 
 				// }
 				if(!this.$api.isNumber(this.secondParams.price)){
-					  this.$util.msg('请输入交易价',2000);
+					  this.$util.msg('请输入交易价',2000)
 						return
 				}
 				// if(this.secondParams.secondHandType ==2) {
@@ -496,52 +497,52 @@
 				// 	}
 				// }
 				if(this.secondParams.productQuality == ''){
-					this.$util.msg('请输入商品成色',2000);
+					this.$util.msg('请输入商品成色',2000)
 					return
 				}
 				if(this.secondParams.contactName == ''){
-					this.$util.msg('请输入联系人姓名',2000);
+					this.$util.msg('请输入联系人姓名',2000)
 					return
 				}
 				if(this.secondParams.contactMobile == ''){
 					console.log(this.secondParams.contactMobile)
-					this.$util.msg('请输入联系方式',2000);
+					this.$util.msg('请输入联系方式',2000)
 					return
 				}
 				if(!$reg.isMobile(this.secondParams.contactMobile)){
-					this.$util.msg('请填写正确的手机号',2000);
+					this.$util.msg('请填写正确的手机号',2000)
 					return
 				}
 				if(this.userIdentity === 1){
 					if(this.secondParams.dockingPeopleName == ''){
-						this.$util.msg('请输入采美对接人姓名',2000);
+						this.$util.msg('请输入采美对接人姓名',2000)
 						return
 					}
 					if(this.secondParams.dockingPeopleMobile == ''){
-						this.$util.msg('请输入采美对接人手机号',2000);
+						this.$util.msg('请输入采美对接人手机号',2000)
 						return
 					}
 				}
 				if(this.secondParams.dockingPeopleMobile !=''){
 					if(!$reg.isMobile(this.secondParams.dockingPeopleMobile)){
-						this.$util.msg('请填写正确的采美对接人手机号',2000);
+						this.$util.msg('请填写正确的采美对接人手机号',2000)
 						return
 					}
 				}
 				if(this.secondParams.townId == ''|| this.secondParams.townId == undefined){
-					this.$util.msg('请完善联系地址',2000);
+					this.$util.msg('请完善联系地址',2000)
 					return
 				}
 				if(this.secondParams.address == ''){
-					this.$util.msg('请填写详细地址',2000);
+					this.$util.msg('请填写详细地址',2000)
 					return
 				}
 				if(this.GoodsImagesList ==''){
-					this.$util.msg('请上传图片',2000);
-					return;
+					this.$util.msg('请上传图片',2000)
+					return
 				}
 				if(this.checkbox==false){
-					this.$util.msg('请勾选已阅读',2000);
+					this.$util.msg('请勾选已阅读',2000)
 					return
 				}
 				console.log(this.secondParams)
@@ -551,7 +552,7 @@
 					this.cancelButtonText = '继续发布'
 					this.confirmButtonText = '去上传'
 					this.isButtonsType = 1
-					return;
+					return
 				}
 				if(this.secondParams.commitmentImage == '' || this.secondParams.ossName == ''){
 					this.PopupShow = true
@@ -559,21 +560,21 @@
 					this.cancelButtonText = '继续发布'
 					this.confirmButtonText = '去上传'
 					this.isButtonsType = 1
-					return;
+					return
 				}
 				this.SecondHandProduct(this.secondParams)
 			},
 			SecondHandProduct(params){//提交发布
 				this.SecondService.SecondHandProduct(params).then(res=>{ 
-					this.PopupShow = true;
+					this.PopupShow = true
 					this.tipsContentText = '发布二手商品,采美需要收取您每个商品100元的展示费,展示期为3个月支付完成后,商品会在1-2个工作日内进行审核,审核通过后,商品会立即上线'
 					this.cancelButtonText = '取消发布'
 					this.confirmButtonText = '去支付'
 					this.isButtonsType = 2
-					this.playid= res.data;
+					this.playid= res.data
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
-					this.secondBj = false;
+					this.secondBj = false
 					return
 				})
 			},
@@ -581,21 +582,21 @@
 				switch(this.isButtonsType){
 					case 1:
 						this.SecondHandProduct(this.secondParams)
-						break;
+						break
 					case 2:	
-						this.PopupShow = false;
-						break;
+						this.PopupShow = false
+						break
 				}
 			},
 			confirmButtonFn(){//弹窗操作按钮
 				switch(this.isButtonsType){
 					case 1:
-						this.PopupShow = false;
-						break;
+						this.PopupShow = false
+						break
 					case 2:	
 						this.MiniWxPayFor()
-						this.PopupShow = false;
-						break;
+						this.PopupShow = false
+						break
 				}
 			},
 			MiniWxPayFor(){
@@ -605,7 +606,7 @@
 							productId:this.playid
 						}
 					this.PayService.SecondHandPay(params).then(response =>{
-						let PayInfo = JSON.parse(response.data.data.payInfo);
+						let PayInfo = JSON.parse(response.data.data.payInfo)
 						this.WxRequestPayment(PayInfo)
 					}).catch(error =>{
 						this.$util.msg(error.msg,2000)
@@ -621,7 +622,7 @@
 					'signType': data.signType,
 					'paySign': data.paySign,
 					'success':function(res){
-						wx.reLaunch({url: '/pages/second/product/product-list'});
+						wx.reLaunch({url: '/pages/second/product/product-list'})
 					},
 					'fail':function(res){
 						self.$util.msg('用户取消支付~')
@@ -632,13 +633,13 @@
 				})
 			},
 			changeBox:function () {
-				this.checkbox = !this.checkbox;
+				this.checkbox = !this.checkbox
 			},
 		},
 		onShow() {
 			this.SecondService.brandList().then(res =>{//品牌列表
 				if(res.code == 0){
-				   this.BrandList = res.data;
+				   this.BrandList = res.data
 				}
 			})
 			this.$api.getComStorage('userInfo').then((resolve) =>{

+ 2 - 2
services/config.env.js

@@ -1,10 +1,10 @@
 let URL_CONFIG = ''
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
-    // URL_CONFIG = 'http://192.168.2.67:18002'	 //智捷联调地址
+    URL_CONFIG = 'http://192.168.2.67:18002'	 //智捷联调地址
     // URL_CONFIG = 'http://192.168.2.68:18002'	 //涛涛联调地址
     // URL_CONFIG = 'http://192.168.2.75:18002'	 //超超联调地址
-    URL_CONFIG = 'https://core-b.caimei365.com'
+    // URL_CONFIG = 'https://core-b.caimei365.com'
     // URL_CONFIG = 'https://core.caimei365.com'
 }else{
     // 生产环境

+ 30 - 3
services/product.service.js

@@ -240,15 +240,27 @@ export default class ProductService {
     }
     /* 查询搜索历史记录 */
     GetProductSearchHistory (data = {}) {
-        return this.AjaxService.get({ url:'/commodity/search/query/history', data, isLoading: false })
+        return this.AjaxService.get({ 
+            url:'/commodity/search/query/history', 
+            data, 
+            isLoading: false ,
+        })
     }
     /* 添加搜索历史记录 */
     GetAddProductSearchHistory (data = {}) {
-        return this.AjaxService.get({ url:'/commodity/search/query/history/add', data, isLoading: true })
+        return this.AjaxService.get({ 
+            url:'/commodity/search/query/history/add', 
+            data, 
+            isLoading: true ,
+        })
     }
     /* 清除搜索历史记录 */
     GetDeleteProductSearchHistory (data = {}) {
-        return this.AjaxService.get({ url:'/commodity/search/query/history/delete', data, isLoading: false })
+        return this.AjaxService.get({ 
+            url:'/commodity/search/query/history/delete', 
+            data, 
+            isLoading: false ,
+        })
     }
     /* 搜索商品列表 */
     GetProductSearchList (data = {}) {
@@ -466,5 +478,20 @@ export default class ProductService {
             isHost:true
         })
     }
+    /**
+	 * @搜索筛选项查询商品品牌
+	 * @param:keyword 关键词
+	 * @param:id 分类Id
+	 * @param:idType 1 一级分类 2 二级分类 3 三级分类
+	 * @param:identity 
+	 */
+    getCommoditySearchQUeryBrand (data = {}) {
+        return this.AjaxService.get({
+            url:'/commodity/search/query/brand',
+            data,
+            isLoading: true ,
+            isHost:true
+        })
+    }
 	
 }