Przeglądaj źródła

用户体系优化V6.2.0

zhengjinyi 5 lat temu
rodzic
commit
f55a35fd69

+ 1 - 5
api/product.js

@@ -63,11 +63,7 @@ export function querySearchProduct(params) {
 export function querySearchHistory(params) {
 	return new Promise(function(resolve,reject) {
 		request.get("/product/searchHistory",params, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
+			resolve(res);
 		})
 	});
 }

+ 4 - 3
components/module/creatOrder/freight.vue

@@ -33,12 +33,13 @@
 		},
 		methods:{
 			initData(res) {
+				console.log(res)
 				switch(res.freePostFlag){
-					case '0':
+					case 0:
 						this.freightText = '包邮';break
-					case '1':
+					case 1:
 						this.freightText = res.freePostFlag;break
-					case '-1':
+					case -1:
 						this.freightText = '到付';break
 				}
 			},

+ 6 - 6
pages/goods/product.vue

@@ -242,7 +242,6 @@
 				tabCurrentIndex:0,
 				userID:'',
 				productID:0,
-				classifyID:'',//分类ID
 				goodsData:{},//自定义数据
 				shop:{},//供应商信息
 				product:{},//采美
@@ -288,7 +287,6 @@
 					this.stock = this.product.stock
 					this.number = this.product.minBuyNumber
 					this.minBuyNumber = this.product.minBuyNumber
-					this.classifyID = this.product.classifyID
 					//处理商品图片列表
 					this.product.imageList.forEach(item =>{
 						this.productImage.push(item.image);
@@ -299,10 +297,12 @@
 						this.ladderPriceList = this.product.ladderPriceList;
 					}
 					//拆分金额并转千分位格式显示
-					this.retailPrice = this.product.retailPrice.toFixed(2);
-					//处理除阶梯价格以外的购买价格
-					// if(this.ladderPriceFlag == '0' || this.product.actFlag == 1){
-					this.buyRetailPrice = this.product.retailPrice;
+					if(this.product.retailPrice!=null){
+						this.retailPrice = this.product.retailPrice.toFixed(2);
+						//处理除阶梯价格以外的购买价格
+						// if(this.ladderPriceFlag == '0' || this.product.actFlag == 1){
+						this.buyRetailPrice = this.product.retailPrice;
+					}
 					// }
 					//处理下架商品和售罄商品
 					if(this.product.validFlag =='3' || this.stock == 0 ){

+ 4 - 4
pages/search/search.vue

@@ -22,7 +22,7 @@
 		<!-- <go-search :theme="themeClass" @subMitSearch="subMitSearch"></go-search> -->
 		<view v-else class="commodity-list-wrapper"  :style="{'overflow':'auto','height':(commodityList.length>4? windowHeight + 'px' : 'auto')}">
 			<scroll-view :style="{'height':(commodityList.length>4? scrollHeight+'px' : 'auto')}" @scrolltolower="scrolltolower" scroll-y v-if="!showEmpty">
-				<view v-for="(item,index) in commodityList" :key="index" :id="item.id" class="all-type-list-content commodity-list" @click.stop="navToDetailPage(item.id)">
+				<view v-for="(item,index) in commodityList" :key="index" :id="item.id" 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 class="list-details-info">
 						<text class="list-details-title">{{item.name}}</text>
@@ -108,9 +108,9 @@
 				this.$api.getStorage().then((resolve) =>{
 					this.userID = resolve.userID ? resolve.userID : '';
 				    querySearchHistory({userId:this.userID}).then(response =>{
-				    	this.serachRecordList = response.data
-				    }).catch(response =>{
-				    	this.$util.msg(response.msg,3000);
+						if(response.code == 0){
+							this.serachRecordList = response.data
+						}
 				    })
 				})	
 			},

+ 3 - 3
pages/tabBar/home/home.vue

@@ -530,10 +530,10 @@
 				border-radius: 10rpx;
 			}
 			.title-none{
-				font-size: $font-size-24;
+				font-size: $font-size-28;
 				color: #FF2A2A;
-				line-height: 24rpx;
-				margin-top: 10rpx;
+				line-height: 20rpx;
+				margin-top: 18rpx;
 			}
 			.title{
 				width: 210rpx;

+ 2 - 2
pages/tabBar/user/user.vue

@@ -174,8 +174,8 @@
 					this.waitShipmentsCount = this.showBadge(user_data.waitShipmentsCount)//待收货		
 					this.shipmentsCount = this.showBadge(user_data.shipmentsCount)//已发货	
 					this.salesReturnCount = this.showBadge(user_data.salesReturnCount)//退货/款	
-					let clubInfo ={name:this.name,image:this.headpic}
-					uni.setStorage({//缓存用户登陆状态
+					let clubInfo ={name:this.name,image:this.headpic,clubID:_clubData.clubID}
+					uni.setStorage({//缓存机构
 						key: 'clubInfo',  
 						data: clubInfo  
 					}) 

+ 11 - 12
pages/user-module/information.vue

@@ -98,7 +98,7 @@
 				<view class="register-picture">
 					<view class="label">营业执照:</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadBusinessImage == null"  @click="chooseBusinessImage"><text class="iconfont icon-jiahao"></text></view>
+						<view class="upload-none" v-if="uploadBusinessImage == ''"  @click="chooseBusinessImage"><text class="iconfont icon-jiahao"></text></view>
 						<view class="upload-image" v-else>
 							<image :src="uploadBusinessImage" mode="" @click="viewBusinessImage"></image>
 							<view class="upload-del" @click="delBusinessImage">
@@ -112,7 +112,7 @@
 				<view class="register-picture">
 					<view class="label">门头照:</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadMentuzImage == null" @click="chooseMentuzImage"><text class="iconfont icon-jiahao"></text></view>
+						<view class="upload-none" v-if="uploadMentuzImage == ''" @click="chooseMentuzImage"><text class="iconfont icon-jiahao"></text></view>
 						<view class="upload-image" v-else>
 							<image :src="uploadMentuzImage" mode=""  @click="viewMentuzImage"></image>
 							<view class="upload-del" @click="delMentuzImage">
@@ -153,7 +153,7 @@
 				<view class="register-picture">
 					<view class="label zz">医疗执业许可证:</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadMedicalImage == null " @click="chooseMedicalImage"><text class="iconfont icon-jiahao"></text></view>
+						<view class="upload-none" v-if="uploadMedicalImage == ''" @click="chooseMedicalImage"><text class="iconfont icon-jiahao"></text></view>
 						<view class="upload-image" v-else>
 							<image :src="uploadMedicalImage" mode=""  @click="viewMedicalImage"></image>
 							<view class="upload-del" @click="delMedicalImage">
@@ -257,7 +257,7 @@
 					</view>
 				</view>
 				<view class="register-row">
-					<view class="register-btn sub" @click.stop="organizationUpdateInfo">提交审核</view>
+					<view class="register-btn sub" @click.stop="organizationUpdateInfo">确定</view>
 				</view>
 			</view>
 			<mpvue-city-picker :themeColor="themeColor"
@@ -370,18 +370,18 @@
 						}else{
 							this.addressData.townID = organizationClub.townID
 						}
-						this.addressData.address = organizationClub.provincialAddress
-						this.addressData.addressDetail = organizationClub.address
+						this.addressData.addressDetail = organizationClub.address ? organizationClub.address : ''
 						this.socialCreditCode = organizationClub.socialCreditCode
 						this.firstClubType = organizationClub.firstClubType
 						this.secondClubType = organizationClub.secondClubType
+						this.addressData.address = organizationClub.provincialAddress ? organizationClub.provincialAddress : ''
 						this.uploadBusinessImage = organizationClub.businessLicenseImage
-						this.uploadMentuzImage = organizationClub.headpic
 						this.uploadMedicalImage = organizationClub.medicalPracticeLicenseImg
+						this.uploadMentuzImage = organizationClub.headpic
 						this.department = organizationClub.department						
-						this.clubTelePhone = organizationClub. contractPhone
-						this.clubFax = organizationClub.fax
-						this.companyPprofile = organizationClub.info
+						this.clubTelePhone = organizationClub.contractPhone ? organizationClub.contractPhone : ''
+						this.clubFax = organizationClub.fax ? organizationClub.fax : ''
+						this.companyPprofile = organizationClub.info ? organizationClub.info : ''
 						//机构类型&&主营项目
 						switch(this.firstClubType){
 							case '1':
@@ -397,7 +397,7 @@
 								this.isOrganizationType = 0
 								break;
 						}	
-						if(organizationClub.mainpro!=null){
+						if(organizationClub.mainpro!=""){
 							if(this.firstClubType == '1'){
 								this.mentuzCampList = this.setNewMainpro(organizationClub.mainpro)
 							}else{
@@ -430,7 +430,6 @@
 					this.mainpro = mainproList.join('/')
 				}
 				console.log(this.mainpro)
-				debugger
 				let params ={
 						userID:this.userID,
 						clubID:this.clubID,					//会所ID

+ 1 - 1
pages/user/operator/addoperator.vue

@@ -79,7 +79,7 @@
 			this.$api.getStorage().then((resolve) =>{
 				console.log(resolve)
 				this.userID = resolve.userID
-				this.clubID = resolve.userID
+				this.clubID = resolve.clubID
 			})
 		}
 	}

+ 15 - 17
pages/user/operator/list.vue

@@ -22,8 +22,7 @@
 		<view class="operator-main">
 			<view v-if="isEmpty" class="empty-container">
 				<view class="txt">暂无运营人员</view>
-				<view class="add-btn" @click="this.$api.navigateTo('/pages/user/operator/addoperator')">添加运营人员</view>
-			</view>
+s			</view>
 			<view v-else class="operator-list">
 				<scroll-view scroll-y="true" >
 					<view class="list" v-for="(item, index) in operatorList" :key="index" @click.stop="showOperatorModel(item)">
@@ -93,6 +92,7 @@
 		},
 		data() {
 			return {
+				clubID:'',
 				clubName:'',
 				clubImage:'',
 				linkman:'',
@@ -102,7 +102,6 @@
 				userID:'',
 				pageNum:1,
 				pageSize:10,
-				addressList: [],
 				hasNextPage:false,
 				loadding: false,
 				pullUpOn: true,
@@ -119,11 +118,7 @@
 				modelData:''
 			}
 		},
-		onLoad(){	
-			this.$api.getCommonStorage('clubInfo').then(response =>{
-				this.clubName = response.name
-				this.clubImage = response.image
-			})
+		onLoad(){				
 			this.setScrollHeight();
 		},
 		methods: {
@@ -146,7 +141,7 @@
 				this.initOperatorList()
 			},
 			initOperatorList(){	
-				let params = {pageNum:1,pageSize:this.pageSize,linkName:this.linkman,mobile:this.clubMobile}
+				let params = {clubID:this.clubID,pageNum:1,pageSize:this.pageSize,linkName:this.linkman,mobile:this.clubMobile}
 				queryOperatorList(params).then(response =>{
 					let responseData = response.data
 					if(responseData.results&&responseData.results.length > 0){
@@ -288,12 +283,14 @@
 			}	
 		},
 		onShow() {
-			this.pageNum = 1;
-			this.addressList = [];
-			this.initOperatorList();
-			var pages = getCurrentPages();
-			var prevPage = pages[pages.length - 2];  //上一个页面	
-				// prevPage.setData({select:''})
+			this.$api.getCommonStorage('clubInfo').then(response =>{
+				console.log(response)
+				this.clubID = response.clubID
+				this.clubName = response.name
+				this.clubImage = response.image
+				this.pageNum = 1;
+				this.initOperatorList();
+			})
 		}
 	}
 </script>
@@ -324,7 +321,7 @@
 			height: 92rpx;
 			padding: 34rpx 0;
 			.title{
-				width: 100rpx;
+				width: 420rpx;
 				float: left;
 				font-size: $font-size-36;
 				color: $text-color;
@@ -400,8 +397,9 @@
 						border: 1px solid $color-system;
 						border-radius: 14rpx;
 						font-size: $font-size-28;
-						color: $color-system;
+						color: #FFFFFF;
 						line-height: 78rpx;
+						background: $btn-confirm;
 					}
 				}
 				.label{