Explorar o código

用户体系优化V1.0.0

zhengjinyi %!s(int64=5) %!d(string=hai) anos
pai
achega
d4c12896e9

+ 4 - 7
App.vue

@@ -26,18 +26,16 @@
 					// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
 					userInfoLogin({code:wechatcode}).then(response =>{
 						this.isLogin = true;
-						this.userID = response.data.userID;						
-						let user_key = {code:response.code,openid:response.data.openid,userID:response.data.userID}
+						this.login(response.data);
+						uni.setStorageSync('token',response.data.token)
 						uni.removeStorageSync('sessionid')
 						uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
-						this.$store.commit('updateStatus',user_key)
+						this.$store.commit('updateStatus',response.data)
 					}).catch(response =>{
 						this.isLogin = false;
-						this.userID ='';
-						let user_key = {code:response.code,userID:this.userID,openid:''}
 						uni.removeStorageSync('sessionid')
 						uni.setStorageSync('sessionid','JSESSIONID='+response.data)
-						this.$store.commit('updateStatus',user_key)
+						this.$store.commit('updateStatus',response.data)
 					})
 				})
 			},
@@ -51,7 +49,6 @@
 		},
 		onShow: function() {
 			console.log('App Show')
-			uni.setStorageSync('token','token')
 		},
 		onHide: function() {
 			console.log('App Hide')

+ 3 - 17
api/cart.js

@@ -54,7 +54,7 @@ export function cartDelete(params) {
  */
 export function queryAddressList(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/findAddress/personalCenter',params, res => {
+		request.get('/personalCenter/findAddress',params, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{
@@ -64,11 +64,11 @@ export function queryAddressList(params) {
 	})
 }
 /**
- *添加新地址
+ *修改保存
  */
 export function addNewAddress(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/findAddress/saveAddress',params, res => {
+		request.post('/personalCenter/saveAddress',params,true, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{
@@ -91,18 +91,4 @@ export function deleteNewAddress(params) {
 		})
 	})
 }
-/**
- *修改保存
- */
-export function updateAddress(params) {
-	return new Promise(function(resolve,reject) {
-		request.get('/findAddress/saveAddress',params, res => {
-			if(res.code == '0'){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
 

+ 2 - 2
api/operator.js

@@ -43,7 +43,7 @@ export function addOperator(params) {
  */
 export function deleteOperator(params) {
 	return new Promise(function(resolve,reject) {
-		request.post('/operation/delete',params, res => {
+		request.post('/operation/delete',params,true,res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{
@@ -57,7 +57,7 @@ export function deleteOperator(params) {
  */
 export function updateCode(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/operation/updateInvitationCode',params, res => {
+		request.post('/operation/updateInvitationCode',params,true, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{

+ 30 - 1
api/other.js

@@ -51,4 +51,33 @@ export function protocolAgree(params) {
 		})
 	})
 }
-
+/**
+ *@发票信息回显
+ *@param
+ */
+export function queryInvoice(params) {
+	return new Promise(function(resolve,reject) {
+		request.get('/personalCenter/findInvoice',params, res => {
+			if(res.code == '0'){
+				resolve(res)
+			}else{
+				reject(res)
+			}
+		})
+	})
+}
+/**
+ *@发票信息保存
+ *@param
+ */
+export function querySaveInvoice(params) {
+	return new Promise(function(resolve,reject) {
+		request.post('/personalCenter/invoice',params, true,res => {
+			if(res.code == '0'){
+				resolve(res)
+			}else{
+				reject(res)
+			}
+		})
+	})
+}

+ 19 - 53
api/use.js

@@ -44,7 +44,7 @@ export function organizationVerifyRegisterFirst(params) {
 			uni.showToast({title: '两次输入的密码不一致',duration: 2000,mask:true,icon:'none'})
 			return
 		}
-		request.post('/club/verifyRegister',params, res => {
+		request.post('/club/verifyRegister',params,true,res => {
 			if(res.code == '0'){
 				resolve(res);
 			}else{
@@ -82,7 +82,7 @@ export function organizationVerifyRegisterTwo(params) {
 			uni.showToast({title: '验证码格式不正确',duration: 2000,mask:true,icon:'none'})
 			return
 		}
-		request.post('/club/verifyRegister',params, res => {
+		request.post('/club/verifyRegister',params,true,res => {
 			if(res.code == '0'){
 				resolve(res);
 			}else{
@@ -100,7 +100,7 @@ export function organizationRegister(params) {
 		return
 	}
 	return new Promise(function(resolve,reject) {
-		request.post('/user/club/clubRegister',params, res => {
+		request.post('/user/club/clubRegister',params,true, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{
@@ -112,9 +112,9 @@ export function organizationRegister(params) {
 /**
  *机构修改申请信息
  */
-export function organizationModify(params) {
+export function organizationUpdateModifyInfo(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
+		request.get('/user/club/applicationData',params, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{
@@ -126,9 +126,9 @@ export function organizationModify(params) {
 /**
  *机构提交修改申请信息
  */
-export function organizationUpdateModify(params) {
+export function organizationModifyUpdate(params) {
 	return new Promise(function(resolve,reject) {
-		request.post('/club/authorization',params, res => {
+		request.post('/user/club/updateCompanyInfo',params,true,res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{
@@ -138,25 +138,11 @@ export function organizationUpdateModify(params) {
 	})
 }
 /**
- *获取机构资料
- */
-export function organizationInfo(params) {
-	return new Promise(function(resolve,reject) {
-		request.post('/club/authorization',params, res => {
-			if(res.code == '0'){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-/**
- *机构资料修改保存
+ *保存机构修改信息
  */
 export function organizationUpdate(params) {
 	return new Promise(function(resolve,reject) {
-		request.post('/club/authorization',params, res => {
+		request.post('/operation/modifiedData',params,true,res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{
@@ -164,7 +150,7 @@ export function organizationUpdate(params) {
 			}
 		})
 	})
-}	
+}
 /**
  *机构登录
  * @param mobileOrEmail 邮箱或手机
@@ -181,7 +167,7 @@ export function organizationLogin(params) {
 			uni.showToast({title: '请输入密码',duration: 2000,mask:true,icon:'none'})
 			return
 		}
-		request.post('/user/login',params, res => {
+		request.post('/user/login',params,true, res => {
 			resolve(res)
 		})
 	})
@@ -207,7 +193,7 @@ export function bindingEmail(params) {
 			uni.showToast({title: '验证码格式不正确',duration: 2000,mask:true,icon:'none'})
 			return
 		}
-		request.post('/user/binding',params, res => {
+		request.post('/user/binding',params,true, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{
@@ -221,27 +207,7 @@ export function bindingEmail(params) {
  */
 export function bindingWechat(params) {
 	return new Promise(function(resolve,reject) {
-		if( params.linkName == ''){
-			uni.showToast({title: '请输入姓名',duration: 2000,mask:true, icon:'none'})
-			return
-		}
-		if( params.mobile == ''){
-			uni.showToast({title: '请输入手机号',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if(!$reg.isMobile(params.mobile)){
-			uni.showToast({title: '验证码格式不正确',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if( params.verificationCode == ''){
-			uni.showToast({title: '请输入手机验证码',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if(!$reg.isMobileCode(params.verificationCode)){
-			uni.showToast({title: '验证码格式不正确',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		request.post('/club/bindingWx',params, res => {
+		request.post('/club/bindingWx',params,true,res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{
@@ -259,7 +225,7 @@ export function invitationCodeLogin(params) {
 			uni.showToast({title: '请输入邀请码',duration: 2000,mask:true, icon:'none'})
 			return
 		}
-		request.post('/club/invitationCode',params, res => {
+		request.post('/club/invitationCode',params,true, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{
@@ -273,7 +239,7 @@ export function invitationCodeLogin(params) {
  */
 export function personalInfo(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/personalCenter/myCentre',params, res => {
+		request.lodingGet('/personalCenter/myCentre',params, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{
@@ -287,7 +253,7 @@ export function personalInfo(params) {
  */
 export function accountInfo(params) {
 	return new Promise(function(resolve,reject) {
-		request.post('/club/authorization',params, res => {
+		request.lodingGet('/personalCenter/touchBalance',params, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{
@@ -317,7 +283,7 @@ export function queryHomeInfo(params) {
  */
 export function userInfoLogin(params) {
 	return new Promise(function(resolve,reject) {
-		request.post('/club/authorization',params, res => {
+		request.post('/club/authorization',params,false, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{
@@ -363,7 +329,7 @@ export function mobilePassword(params) {
 			uni.showToast({title: '两次输入的密码不一致',duration: 2000,mask:true,icon:'none'})
 			return
 		}
-		request.post('/user/findCompanyPwd',params, res => {
+		request.post('/user/findCompanyPwd',params, true,res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{
@@ -409,7 +375,7 @@ export function emailPassword(params) {
 			uni.showToast({title: '两次输入的密码不一致',duration: 2000,mask:true,icon:'none'})
 			return
 		}
-		request.post('/user/findCompanyPwd',params, res => {
+		request.post('/user/findCompanyPwd',params,true, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{

+ 38 - 0
api/utils.js

@@ -97,6 +97,44 @@ export function getMobileCode(params) {
 		})
 	});
 }
+/**
+ *会所资料修改手机号
+ *旧手机号获取验证码
+ */
+export function getClubMobileCode(params) {
+	return new Promise(function(resolve,reject) {
+		request.get("/club/modifyPhoneNumber",params, res => {
+			if(res.code == '0'){
+				resolve(res);
+			}else{
+				reject(res)
+			}
+		})
+	});
+}
+/**
+ *会所资料修改手机号
+ *新手机号获取验证码
+ */
+export function getClubNewMobileCode(params) {
+	return new Promise(function(resolve,reject) {
+		if( params.newMobile == ''){
+			uni.showToast({title: '请输入新手机号',duration: 2000,mask:true, icon:'none'})
+			return
+		}
+		if(!$reg.isMobile(params.newMobile)){
+			uni.showToast({title: '请输入正确的手机号',duration: 2000,mask:true,icon:'none'})
+			return
+		}
+		request.get("/club/modifyPhoneNumber",params, res => {
+			if(res.code == '0'){
+				resolve(res);
+			}else{
+				reject(res)
+			}
+		})
+	});
+}
 /**
  *小程序机构账号绑定微信,PC微信绑定机构账号
  */

+ 12 - 12
common/config/caimeiApi.js

@@ -17,20 +17,20 @@ const caimeiApi = {
 			header: {
 				'Accept': 'application/json',
 				'Content-Type': 'application/x-www-form-urlencoded', 
-				'X-Token': uni.getStorageSync('token'),
+				'X-Token': uni.getStorageSync('token') ? uni.getStorageSync('token') : 'token',
 				'cookie': uni.getStorageSync('sessionid')
 			},
 			method: 'GET',
 			success: (response) => {
 				if(response.statusCode !== 200){
-					uni.showToast({icon: 'none',title:'网络链接超时',duration: 3000})
+					uni.showToast({icon: 'none',title:'网络链接超时',duration: 2000})
 				}else{
 					callback(response.data);
 				}
 			},
 			fail: (error) => {
 				if (error) {
-					uni.showToast({icon: 'none',title: '网络错误,请稍后重试',duration: 3000})
+					uni.showToast({icon: 'none',title: '网络错误,请稍后重试',duration: 2000})
 				}
 			}
 		 });
@@ -48,20 +48,20 @@ const caimeiApi = {
 			header: {
 				'Accept': 'application/json',
 				'Content-Type': 'application/x-www-form-urlencoded', 
-				'X-Token':uni.getStorageSync('token'),
+				'X-Token': uni.getStorageSync('token') ? uni.getStorageSync('token') : 'token',
 				'cookie': uni.getStorageSync('sessionid')
 			},
 			method: 'GET',
 			success: (response) => {
 				if(response.statusCode !== 200){
-					uni.showToast({icon: 'none',title: '网络链接超时',duration: 3000})
+					uni.showToast({icon: 'none',title: '网络链接超时',duration: 2000})
 				}else{
 					callback(response.data);
 				}
 			},
 			fail: (error) => {
 				if (error) {
-					uni.showToast({icon: 'none',title: '网络错误,请稍后重试',duration: 3000})
+					uni.showToast({icon: 'none',title: '网络错误,请稍后重试',duration: 2000})
 				}
 			},
 			complete: () => {
@@ -75,28 +75,28 @@ const caimeiApi = {
 	 * @封装公共post数据请求方法
 	 * @方法参数:请求地址,请求后台需要的参数字段,回调函数
 	 */
-	post:function(url,data,callback){
+	post:function(url,data,loadingStatus,callback){
 		console.log(data)
-		uni.showLoading({mask: true,title:'加载中~'})
+		if(loadingStatus){uni.showLoading({mask: true,title:'加载中~'})}
 		uni.request({
 			url: requestUrl+url,
 			data:data,
 			header: {
 				'Accept': 'application/json',
 				'Content-Type': 'application/x-www-form-urlencoded',
-				'X-Token':uni.getStorageSync('token'),
+				'X-Token': uni.getStorageSync('token') ? uni.getStorageSync('token') : 'token',
 				'cookie': uni.getStorageSync('sessionid')
 			},
 			method: 'POST',
 			success: (response) => {
-				uni.hideLoading()
+				if(loadingStatus){uni.hideLoading()}
 				const result = response.data
 				callback(result)
 			},
 			fail: (error) => {
 				uni.hideLoading()
 				if (error) {
-					uni.showToast({icon: 'none',title: '网络错误,请稍后重试',duration: 3000})
+					uni.showToast({icon: 'none',title: '网络错误,请稍后重试',duration: 2000})
 				}
 			}
 		})
@@ -105,7 +105,7 @@ const caimeiApi = {
 	// 获取本地Storage
 		return new Promise(function(resolve,reject) {
 			uni.getStorage({
-				key: 'user_key',
+				key: 'userInfo',
 				success: function (res){
 					resolve(res.data);
 				}

+ 2 - 2
common/config/config.js

@@ -1,9 +1,9 @@
 let URL_CONFIG = ""
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
-	// URL_CONFIG = 'http://192.168.1.22:8008'//本地联调地址
+	URL_CONFIG = 'http://192.168.1.22:8008'//本地联调地址
 	// URL_CONFIG = 'http://192.168.1.24:8107'//俊俊联调地址
-    URL_CONFIG = 'https://spi-b.caimei365.com'//测试地址
+    // URL_CONFIG = 'https://spi-b.caimei365.com'//测试地址
 }else{
     // 生产环境
     URL_CONFIG = 'https://spi.caimei365.com'

+ 3 - 3
common/css/common.scss

@@ -99,7 +99,7 @@ button::after{
 		margin: 0 auto;
 		text-align: center;
 		background: $btn-confirm;
-		border-radius: 0;
+		border-radius: 14rpx;
 		margin-top: 40rpx;
 	}
 }
@@ -178,7 +178,7 @@ button::after{
 				font-size: $font-size-28;
 				text-align: center;
 				color: #FFFFFF;
-				border-radius: 0;
+				border-radius: 14rpx;
 				padding: 0;
 				&.btn-cancel{
 					background: $btn-cancel;
@@ -266,7 +266,7 @@ button::after{
 	color: #FFFFFF;
 	text-align: center;
 	background: $btn-confirm;
-	border-radius: 0;
+	border-radius: 14rpx;
 }
 // 小红点
 .uni-badge--small {

+ 1 - 5
components/module/listTemplate/commodityList.vue

@@ -9,7 +9,7 @@
 					<text class="list-details-specs">规格:{{item.unit}}</text>
 					<text class="list-details-miniQuantity" v-if="fromRegularPurchasePage">起订量:{{item.minBuyNumber}}</text>
 					<view class="list-details-price">
-						<view v-if="!loginStatus" class="list-login-now">
+						<view v-if="!hasLogin" class="list-login-now">
 							<text @click.stop="toLoginPage" class="login-now">登录查看价格<text class="iconfont icon-xiayibu" style="font-size: 22rpx;margin: 0 6rpx;"></text></text>
 						</view>
 						<view class="list-price" v-else>
@@ -68,7 +68,6 @@
 				showSkeleton: true,
 				showEmpty: false,
 				userID: '',
-				loginStatus: true,
 				scrollHeight: '',
 				commodityList: [],
 				showLoading: false,
@@ -90,9 +89,6 @@
 				self.userID = resolve.userID
 			})
 			self.setScrollHeight();		
-			if(!this.hasLogin){
-				self.loginStatus = false;
-			}	
 		},
 		computed: {
 			...mapState(['hasLogin','userInfo'])

+ 51 - 64
pages/goods/product.vue

@@ -25,7 +25,7 @@
 						<view class="p-title tui-skeleton-rect">
 							{{product.name == undefined ? '' : product.name}}
 						</view>
-						<view v-if="!isLogin" class="p-login tui-skeleton-rect">
+						<view v-if="!hasLogin" class="p-login tui-skeleton-rect">
 							<text @click.stop="navToLogin">登录查看价格<text class="iconfont icon-xiayibu" style="font-size: 22rpx;margin: 0 6rpx;"></text></text>
 						</view>
 						<view class="wrap-main" v-else>
@@ -186,15 +186,15 @@
 	import parser from "@/components/jyf-Parser/index" //富文本处理
 	import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
 	import supplierDetails from "@/components/module/productDetails/supplierDetails" //供应商详情
-	import noLogin from '@/components/module/noLogin/nologin'//未登录弹窗
-	
+	import { queryProductDetils } from "@/api/product.js" 
+	import { mapState,mapMutations } from 'vuex'
+
 	var isPreviewImg;
 	export default{
 		components:{
 			headerBack,
 			parser,
 			tuiSkeleton,
-			noLogin,
 			supplierDetails
 		},
 		data(){
@@ -216,7 +216,6 @@
 				disabled:false,
 				tabCurrentIndex: 1,
 				userID:'',
-				isLogin:true,
 				productID:0,
 				classifyID:'',//分类ID
 				goodsData:{},//自定义数据
@@ -252,52 +251,44 @@
 			}
 			this.tabCurrentIndex = 1;// 页面显示是默认选中第一个	
 		},
+		computed: {
+			...mapState(['hasLogin','userInfo'])
+		},
 		methods:{
 			initData(){// 初始化商品详情查询
-				this.$api.getStorage().then((resolve) => {
-					this.userID = resolve.userID;	
-					this.$api.get('/details/product',{id:this.productID,userID:this.userID},
-						response => {
-							// console.log(response)
-							if (response.code == "1") {	
-								this.productData = response.data;
-								this.productImage=[];
-								this.shop = response.data.shop;	
-								this.product = response.data.product;
-								this.ladderPriceFlag = response.data.ladderPriceFlag;
-								if(response.data.productLadderPrices!=null){
-									this.productLadderPrices = response.data.productLadderPrices;
-								}
-								this.html = response.data.productDetailInfo == null ? this.html : this.$api.adaptRichTextImg(response.data.productDetailInfo.detailInfo)
-								response.data.productImage.forEach(item =>{
-									this.productImage.push(item.image);
-								})
-								//拆分金额并转千分位格式显示
-								this.retailPrice = this.productData.retailPrice.toFixed(2);
-								this.buyRetailPrice = this.productData.retailPrice;
-								if(this.productData.validFlag =='2'){
-									this.disabled = true
-								}else{
-									this.disabled = false
-								}
-								this.stock = this.productData.product.stock
-								this.number = this.productData.minBuyNumber
-								this.minBuyNumber = this.productData.minBuyNumber
-								this.classifyID = this.productData.classifyID
-								this.goodsData.disabled = this.disabled 
-								this.goodsData.cartCount = this.productData.cartCount
-							} else {
-								this.$util.msg(response.msg,2000);
-							}
-							this.skeletonShow = false
-						}
-					)	
-				});
-			},
-			initLogin(){//未登录时的处理
-				this.$api.getStorage().then((resolve) => {
-					this.isLogin = false;
-					this.telPhone = resolve.tel
+				queryProductDetils({productID:this.productID}).then(response =>{	
+					console.log(this.skeletonShow)
+					this.productData = response.data;
+					this.productImage=[];
+					this.shop = response.data.shop;	
+					this.product = response.data.product;
+					this.ladderPriceFlag = response.data.ladderPriceFlag;
+					if(response.data.productLadderPrices!=null){
+						this.productLadderPrices = response.data.productLadderPrices;
+					}
+					this.html = response.data.productDetailInfo == null ? this.html : this.$api.adaptRichTextImg(response.data.productDetailInfo.detailInfo)
+					response.data.productImage.forEach(item =>{
+						this.productImage.push(item.image);
+					})
+					console.log(this.skeletonShow)
+					//拆分金额并转千分位格式显示
+					this.retailPrice = this.productData.retailPrice.toFixed(2);
+					this.buyRetailPrice = this.productData.retailPrice;
+					if(this.productData.validFlag =='2'){
+						this.disabled = true
+					}else{
+						this.disabled = false
+					}
+					this.stock = this.productData.product.stock
+					this.number = this.productData.minBuyNumber
+					this.minBuyNumber = this.productData.minBuyNumber
+					this.classifyID = this.productData.classifyID
+					this.goodsData.disabled = this.disabled 
+					this.goodsData.cartCount = this.productData.cartCount
+					this.skeletonShow = false
+					console.log(this.skeletonShow)
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000);
 				})
 			},
 			swiperChange(e) {//顶部商品图片切换
@@ -324,7 +315,7 @@
 				console.log(e.detail.query)
 			},
 			buyProductCart(){//底部购物车按钮点击
-				if(!this.isLogin){
+				if(!this.hasLogin){
 					this.alertType = '3'
 					this.isShowNoLogin =true
 				}else{
@@ -333,7 +324,7 @@
 				}
 			},
 			btnGetConfirm(type){//加入购物车&&立即购买点击
-				if(!this.isLogin){
+				if(!this.hasLogin){
 					if(type =='add'){
 						this.alertType = '1'
 					}else{
@@ -487,19 +478,15 @@
 			}
 		},
 		onShow() {
-			this.$api.loginStatus().then((resolveData) => {
-				if(resolveData){
-					this.isLogin = true;
-				}else{
-					this.initLogin()
-				}
-				if (isPreviewImg) {
-					isPreviewImg = false;
-					return;
-				} else {
-					this.initData();
-				}
-			});	
+			this.$api.getStorage().then((resolve) => {
+				this.userID = resolve.userID;	
+			})	
+			if (isPreviewImg) {
+				isPreviewImg = false;
+				return;
+			} else {
+				this.initData();
+			}
 		}
 	}
 </script>

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

@@ -232,7 +232,9 @@
 						.no-data {
 							text-align: center;
 							margin: 30rpx 0;
-							color: $color-system;
+							color: #999999;
+							font-size: 24rpx;
+							line-height: 80rpx;
 						}
 					}
 				}

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

@@ -147,9 +147,9 @@
 				hotGoodsList:[],
 				skeletonShow: true,
 				organizeProducts:[],//常用商品
-				firstModulesName:'', //优惠模块1
+				firstModulesName:'https://img.caimei365.com/group1/M00/03/8C/Cmis215XHXSAAZU0AACaPrfbB8I435.png', //优惠模块1
 				secondModulesName:'', //优惠模块2
-				firstModulesImage:'',//优惠模块icon1
+				firstModulesImage:'https://img.caimei365.com/group1/M00/03/8C/Cmis215XHXSAAZU0AACaPrfbB8I435.png',//优惠模块icon1
 				secondModulesImage:'',//优惠模块icon2
 				thirdModulesName:'', //优惠模块3
 				navInforList:[
@@ -181,8 +181,9 @@
 					userInfoLogin({code:wechatcode}).then(response =>{
 						this.isLogin = true;
 						this.userID = response.data.userID;						
-						let user_key = {code:response.code,openid:response.data.openid,userID:response.data.userID}
-						this.$store.commit('updateStatus',user_key)
+						this.$store.commit('updateStatus',response.data)
+						this.login(response.data);
+						uni.setStorageSync('token',response.data.token)
 						uni.removeStorageSync('sessionid')
 						uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
 						this.getHomeInformation()
@@ -192,8 +193,7 @@
 						this.logout()
 						uni.removeStorageSync('sessionid')
 						uni.setStorageSync('sessionid','JSESSIONID='+response.data)
-						let user_key = {code:response.code,userID:this.userID,openid:''}
-						this.$store.commit('updateStatus',user_key)
+						this.$store.commit('updateStatus',response.data)
 						this.getHomeInformation()
 						this.getOrganizeProducts()
 					})

+ 32 - 25
pages/tabBar/user/user.vue

@@ -125,7 +125,7 @@
 		data() {
 			return{	
 				name:'采美采购商城',
-				headpic:'../../../static/temp/logo@3x.png',
+				headpic:'../../../static/temp/icon-club@3x.png',
 				userMoney:0.00,
 				contactNumber:'',
 				openid:'',
@@ -155,31 +155,35 @@
 		},
 		methods:{
 			initData(){
-				personalInfo({userID:10766}).then(response =>{
-					this.$store.commit('updateAllNum',response.data.cartCount)
-					let user_data =response.data;
-					if(user_data.userMoney == 0){
+				personalInfo({userID:this.userID}).then(response =>{
+					this.$store.commit('updateAllNum',response.data.count)
+					let user_data =response.data
+					let _userData = user_data.user
+					let _clubData = user_data.club
+					if(_userData.ableUserMoney == 0){
 						this.userMoney = '0.00';
 					}else{
-						let i =  user_data.userMoney.toString().lastIndexOf('.');
+						let i =  _userData.ableUserMoney.toString().lastIndexOf('.');
 						let money;
 						if(i==-1){
-							money = this.$api.FormatMoney(user_data.userMoney); //会所剩余余额
+							money = this.$api.FormatMoney(_userData.ableUserMoney); //会所剩余余额
 							this.userMoney = money +'.00'
 						}else{
-							money = this.$api.FormatMoney(user_data.userMoney); //会所剩余余额
+							money = this.$api.FormatMoney(_userData.ableUserMoney); //会所剩余余额
 							this.userMoney = money
 						}
 					}
-					this.name = user_data.name //会所名称
-					if(user_data.headpic!=''){
-						this.headpic = user_data.headpic //会所头像
+					this.name = _clubData.name //会所名称
+					if(user_data.headpic!=null){
+						this.headpic = _userData.image //会所头像
+					}else{
+						this.headpic='../../../static/temp/icon-club@3x.png'
 					}
-					this.contactNumber = user_data.contactNumber //联系电话		
-					this.paymentCount = this.showBadge(user_data.paymentCount);
-					this.waitShipmentsCount = this.showBadge(user_data.waitShipmentsCount);			
-					this.shipmentsCount = this.showBadge(user_data.shipmentsCount);			
-					this.salesReturnCount = this.showBadge(user_data.salesReturnCount);					
+					this.contactNumber = user_data.organize.contactNumber //联系电话		
+					this.paymentCount = this.showBadge(user_data.paymentCount)//待付款
+					this.waitShipmentsCount = this.showBadge(user_data.waitShipmentsCount)//待收货		
+					this.shipmentsCount = this.showBadge(user_data.shipmentsCount)//已发货	
+					this.salesReturnCount = this.showBadge(user_data.salesReturnCount)//退货/款			
 				}).catch(response =>{
 					this.$util.msg(response.msg,2000)
 				})
@@ -202,15 +206,18 @@
 				uni.stopPullDownRefresh()
 			},
 			onShow(){
-				this.initData()
-				// console.log(this.hasLogin)
-				// if(!this.hasLogin){
-				// 	this.isShowNoLogin = true;
-				// 	this.$api.redirectTo('/pages/user-module/login-accont?type=4')
-				// 	this.$store.commit('updateAllNum',0)
-				// }else{
-				// 	this.isShowNoLogin = false;
-				// }
+				if(!this.hasLogin){
+					this.isShowNoLogin = true;
+					this.$api.redirectTo('/pages/user-module/login-accont?type=4')
+					this.$store.commit('updateAllNum',0)
+				}else{
+					this.$api.getStorage().then((resolve) =>{
+						console.log(resolve)
+						this.userID = resolve.userID
+						this.initData()
+						this.isShowNoLogin = false;
+					})
+				}
 			}
 		}
 	}

+ 9 - 1
pages/user-module/apply.vue

@@ -254,7 +254,7 @@
 <script>
 	import { mapMutations } from 'vuex';
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
-	import { organizationRegister , organizationVerifyRegisterFirst ,organizationVerifyRegisterTwo } from "@/api/use.js"
+	import { organizationRegister , organizationModifyUpdate ,organizationUpdateModifyInfo } from "@/api/use.js"
 	import { getImageCode, getMobileCode, uploadFileImage } from "@/api/utils.js" 
 	var self;
 	export default{
@@ -327,8 +327,16 @@
 		},
 		onLoad(option) {
 			console.log(option)
+			this.organizationModifyInfo()
 		},
 		methods:{
+			organizationModifyInfo(){
+				organizationUpdateModifyInfo({userID:this.userID}).then(response =>{
+					console.log(response)
+				}).catch(response =>{
+					this.$util.msg(res.msg,2000);
+				})
+			},
 			registerStepsTwo(){
 				let params ={
 						name:this.clubName,

+ 89 - 9
pages/user-module/bindwechat.vue

@@ -61,6 +61,18 @@
 		<view class="login-form clearfix">
 			<view class="login-btn"  @click="bindWechatInfo">绑定</view>
 		</view>
+		<!-- 授权按钮 -->
+		<view class="model-warp" :class="[isUserInfo===false ? 'none':'show']">
+			<view class="model-alert">
+				<view class="alert-content">
+					<view class="t-p">采美采购商城需要获取您的微信授权才能正常提供服务</view>
+				</view>
+				<view class="alert-btn">
+					<view class="btn btn-cancel" @click="hideModel">取消</view>
+					<button type="primary" size="small" open-type="getUserInfo" lang="zh_CN" @getuserinfo="getuserinfo" class="btn btn-confirm">授权</button>
+				</view>
+			</view>
+		</view>
 	</view>
 </template>
 
@@ -82,6 +94,7 @@
 				imageCodeUrl:'',		//图形验证码地址
 				imageCodetoken:'',		//图形校验token
 				isMobileDisabled:false, //获取手机短信按钮
+				isUserInfo:false,	//控制显示授权弹窗
 				count: '',				//倒计时
 				mobileCodeText: '获取验证码',
 				codeTime: null,
@@ -109,16 +122,35 @@
 		methods:{
 			...mapMutations(['login']),
 			bindWechatInfo(){
-				let params ={
-						userID:this.userID,
-						mobile:this.bindLinkPhone,
-						linkName:this.bindLinkName,
-						verificationCode:this.mobildeCode,
+				if( this.bindLinkName == ''){
+					uni.showToast({title: '请输入姓名',duration: 2000,mask:true, icon:'none'})
+					return
 				}
-				bindingWechat(params).then(res =>{
-					this.goUserLogininit()
-				}).catch(res =>{
-					this.$util.msg(res.msg,2000)
+				if( this.bindLinkPhone == ''){
+					uni.showToast({title: '请输入手机号',duration: 2000,mask:true,icon:'none'})
+					return
+				}
+				if(this.$reg.isMobile(this.bindLinkPhone)){
+					uni.showToast({title: '请输入正确的手机号',duration: 2000,mask:true,icon:'none'})
+					return
+				}
+				if( this.mobildeCode == ''){
+					uni.showToast({title: '请输入手机验证码',duration: 2000,mask:true,icon:'none'})
+					return
+				}
+				if(this.$reg.isMobileCode(this.mobildeCode)){
+					uni.showToast({title: '验证码格式不正确',duration: 2000,mask:true,icon:'none'})
+					return
+				}
+				//查看此微信用户是否已经授权过
+				authorize.getSetting().then(res =>{
+					// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
+					if(res == 2){
+						this.isUserInfo = true
+					}else{
+						this.isUserInfo = false
+						this.wxGetUserInfo()
+					}
 				})
 			},
 			getVerificationCode(){//图形验证
@@ -177,6 +209,54 @@
 				} else if(this.listType) {
 					this.$api.navToListPage({type:this.listType,value:this.listVal,lType:'4'});
 				}
+			},
+			//授权登录
+			getuserinfo: function (e) {
+			    if (e.detail.userInfo) {
+					self.wxGetUserInfo()
+			    }else{
+					//用户按了拒绝按钮
+					uni.showModal({
+						content: '获取用户信息失败,请允许授权后才能继续使用小程序哦~',
+						showCancel: false,
+						confirmText: '授权',
+						success: function (res) {
+							 if (res.confirm) {
+								uni.openSetting({
+									 success: res => {
+										// console.log(res.authSetting)
+									 },
+									 fail: res => {
+										// console.log(res)
+									 }
+								})
+							 }
+						}
+					})
+			    }
+			 },
+			wxGetUserInfo(){
+				authorize.getCode('weixin').then(wechatcode =>{
+					wx.getUserInfo({
+						success: res => {
+							// console.log('useInfo:',res.userInfo)
+							self.userInfo = res.userInfo;
+							let params ={
+									userID:this.userID,
+									mobile:this.bindLinkPhone,
+									linkName:this.bindLinkName,
+									verificationCode:this.mobildeCode,
+									nickName:res.userInfo.nickName,
+									headimgurl:res.userInfo.headimgurl,
+							}
+							bindingWechat(params).then(res =>{
+								this.goUserLogininit()
+							}).catch(res =>{
+								this.$util.msg(res.msg,2000)
+							})							
+						}
+					});	
+				})
 			}
 		},
 		onShow() {

+ 160 - 87
pages/user-module/information.vue

@@ -7,7 +7,7 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">邮箱:</view>
-					<view class="row-input">369321048@qq.com</view>
+					<view class="row-input">{{ email }}</view>
 				</view>
 			</view>
 			<view class="register-row">
@@ -28,7 +28,7 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">手机号:</view>
-					<input class="row-input" type="number" v-model="mobile" placeholder="请输入手机号" maxlength="11"/>
+					<input class="row-input" type="number" disabled="true" v-model="mobile" placeholder="请输入手机号" maxlength="11"/>
 					<view class="row-btn" @click="showCheckPhone">{{ isShowCheckPhone ? '取消修改' : '修改手机号' }}</view>
 				</view>
 			</view>
@@ -49,7 +49,7 @@
 				<view class="register-from code">
 					<input class="row-input" type="text" v-model="newMobileCode" placeholder="请输入新手机号的验证码" maxlength="6"/>
 				</view>
-				<view class="register-from btn" :class="[isMobileDisabled  ? 'disabled' : '']" @click.stop="getNewMobileCodeFn">
+				<view class="register-from btn" :class="[isNewMobileDisabled  ? 'disabled' : '']" @click.stop="getNewMobileCodeFn">
 					<button class="row-input"  type="button" :disabled="isNewMobileDisabled">{{ newMobileCodeText }}</button>
 				</view>
 			</view>
@@ -63,7 +63,7 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">机构简称:</view>
-					<input class="row-input" type="text" v-model="clubContact" placeholder="请输入您的机构简称" maxlength="16"/>
+					<input class="row-input" type="text" v-model="abbreviation" placeholder="请输入您的机构简称" maxlength="16"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
@@ -91,14 +91,14 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">营业执照编号:</view>
-					<input class="row-input" type="text" v-model="clubContact" placeholder="请填写社会统一信用代码" maxlength="16"/>
+					<input class="row-input" type="text" v-model="socialCreditCode" placeholder="请填写社会统一信用代码" maxlength="16"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-picture">
 					<view class="label">营业执照:</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadBusinessImage === ''"  @click="chooseBusinessImage"><text class="iconfont icon-jiahao"></text></view>
+						<view class="upload-none" v-if="uploadBusinessImage == null"  @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 === ''" @click="chooseMentuzImage"><text class="iconfont icon-jiahao"></text></view>
+						<view class="upload-none" v-if="uploadMentuzImage == null" @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">
@@ -146,14 +146,14 @@
 			<view class="register-row clearfix" v-show="isDepartment">
 				<view class="register-from">
 					<view class="label">科室:</view>
-					<input class="row-input keshi" type="text" v-model="clubContact" placeholder="请填写经营的科室,至少三个,用逗号隔开" maxlength="16"/>
+					<input class="row-input keshi" type="text" v-model="department" placeholder="请填写经营的科室,至少三个,用逗号隔开" maxlength="16"/>
 				</view>
 			</view>
 			<view class="register-row clearfix" v-if="isOrganizationType == 0">
 				<view class="register-picture">
 					<view class="label zz">医疗执业许可证:</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadMedicalImage === ''" @click="chooseMedicalImage"><text class="iconfont icon-jiahao"></text></view>
+						<view class="upload-none" v-if="uploadMedicalImage == null " @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">
@@ -256,8 +256,8 @@
 						<text @click.stop="this.$api.navigateTo('/pages/service/privacyagree')">《隐私权政策》</text>
 					</view>
 				</view>
-				<view class="register-row ">
-					<view class="register-btn sub">提交审核</view>
+				<view class="register-row">
+					<view class="register-btn sub" @click.stop="organizationUpdateInfo">提交审核</view>
 				</view>
 			</view>
 			<mpvue-city-picker :themeColor="themeColor"
@@ -273,8 +273,8 @@
 <script>
 	import { mapMutations } from 'vuex';
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
-	import { organizationRegister , organizationVerifyRegisterFirst ,organizationVerifyRegisterTwo } from "@/api/use.js"
-	import { getImageCode, getMobileCode, uploadFileImage } from "@/api/utils.js" 
+	import { organizationUpdateModifyInfo , organizationUpdate  } from "@/api/use.js"
+	import { getClubMobileCode,getClubNewMobileCode,uploadFileImage } from "@/api/utils.js" 
 	var self;
 	export default{
 		components:{
@@ -287,8 +287,13 @@
 				isPreviewImage:false,   	//预览图片开关
 				isMobileDisabled: false,	//手机验证码按钮控制
 				isNewMobileDisabled: false,	//手机验证码按钮控制
+				userID:'',					//用户ID
+				clubID:'',					//会所ID
+				email:'',					//邮箱
 			    count: '',					//倒计时
+			    newCount: '',					//倒计时
 			    codeTime: null,
+			    codeTimeNew: null,
 				clubName:'',	 			//机构名称
 				abbreviation:'',	 		//机构简称
 				clubContact:'',	 			//联系人
@@ -313,59 +318,128 @@
 				clubTelePhone:'',		//固定电话
 				clubFax:'',				//传真
 				companyPprofile:'',		//公司简介
-				isOrganizationType:3,
+				firstClubType:'',		//机构类型
+				isOrganizationType:2,
 				organizationTypeText:'请选择机构类型',
 				beautyList:[{value:'1',name:'诊所'},{value:'2',name:'门诊'},{value:'3',name:'医院'}],
-				mentuzCampList:[{value:'1',name:'整形'},{value:'2',name:'轻医美'},{value:'3',name:'皮肤科'}],
-				medicaCampList:[
-					{value:'1',name:'美容'},
-					{value:'2',name:'美体'},
-					{value:'3',name:'美发'},
-					{value:'4',name:'皮肤管理'},
-					{value:'5',name:'光电'},
-					{value:'6',name:'综合类'},
-					{value:'7',name:'中医养生'},
-					{value:'8',name:'spa'}
-				],
+				mentuzCampList:[],
+				medicaCampList:[],
 				typtIndex:0,
 				organizationType:0,
 				current:0,
 				isShowAustomItem:false, //是否显示其他添加
 				customItemValue:'', 	//自定义项目
+				isMainproCheck:false,
 				addressData:{
 					address:'请选择机构所在地区',
 					townID:'',			//区ID
-					cityID:'',			//ID
-					provinceID:'',		//ID
-					addressDetail: '',	//地址
+					cityID:'',			//ID
+					provinceID:'',		//ID
+					addressDetail: '',	//地址详情
 				},
 			}	
 		},
 		onLoad(option) {
 			console.log(option)
+			this.organizationInfo()
 		},
 		methods:{
-			registerStepsTwo(){
-				let params ={
-						name:this.clubName,
-						linkMan:this.clubContact,
-						bindMobile:this.registerMobile,
-						activationCode:this.mobileCode,
-						whichStep:2,
-				}
-				organizationVerifyRegisterTwo(params).then(res =>{
-					console.log(res)
-					this.tabCurrentIndex = 3
-				}).catch(res =>{
-					this.$util.msg(res.msg,2000);
+			organizationInfo(){
+				this.$api.getStorage().then((resolve) =>{
+					this.userID = resolve.userID
+					organizationUpdateModifyInfo({userID:this.userID}).then(response =>{
+						let organizationClub = response.data.club
+						let organizationUser = response.data.user
+						this.email = organizationUser.email	
+						this.clubID = organizationUser.clubID
+						this.clubName = organizationClub.name
+						this.clubContact = organizationClub.linkMan
+						this.mobile = organizationUser.bindMobile
+						this.abbreviation = organizationClub.sname
+						if( organizationClub.provinceID == null ){
+							this.addressData.provinceID = ''
+						}else{
+							this.addressData.provinceID = organizationClub.provinceID
+						}
+						if( organizationClub.cityID == null ){
+							this.addressData.cityID = ''
+						}else{
+							this.addressData.cityID = organizationClub.cityID
+						}
+						if( organizationClub.townID == null ){
+							this.addressData.townID = ''
+						}else{
+							this.addressData.townID = organizationClub.townID
+						}
+						this.addressData.address = organizationClub.provincialAddress
+						this.addressData.addressDetail = organizationClub.address
+						this.socialCreditCode = organizationClub.socialCreditCode
+						this.firstClubType = organizationClub.firstClubType
+						this.secondClubType = organizationClub.secondClubType
+						this.uploadBusinessImage = organizationClub.businessLicenseImage
+						this.uploadMentuzImage = organizationClub.headpic
+						this.uploadMedicalImage = organizationClub.medicalPracticeLicenseImg
+						this.department = organizationClub.department						
+						this.clubTelePhone = organizationClub. contractPhone
+						this.clubFax = organizationClub.fax
+						this.companyPprofile = organizationClub.info
+						//机构类型&&主营项目
+						switch(this.firstClubType){
+							case '1':
+								this.organizationTypeText = '医美'
+								this.isOrganizationType = 0
+								this.mentuzCampList = this.setNewMainpro(organizationClub.mainpro)
+								break;
+							case '2':
+								this.organizationTypeText = '生美'
+								this.isOrganizationType = 1
+								this.medicaCampList = this.setNewMainpro(organizationClub.mainpro)
+								break;
+							case null:
+								this.organizationTypeText = '请选择机构类型'
+								this.isOrganizationType = 2
+								break;
+						}						
+						//机构类型
+						switch(this.secondClubType){
+							case '1':
+								this.current = 0								
+								break;
+							case '2':
+								this.current = 1									
+								break;
+							case '3':
+								this.current = 2									
+								break;
+						}
+					})
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000)
 				})
 			},
-			registerStepsSub(){
+			organizationUpdateInfo(){//提交审核
+				if(!this.isMainproCheck){
+					let mainproList = []
+					if(this.firstClubType == '1'){
+						this.mentuzCampList.forEach(item =>{
+							mainproList.push(item).toString()
+						})
+					}else{
+						this.medicaCampList.forEach(item =>{
+							mainproList.push(item).toString()
+						})
+					}
+					this.mainpro = mainproList
+				}
 				let params ={
+						userID:this.userID,
+						clubID:this.clubID,					//会所ID
 						name:this.clubName,
 						linkMan:this.clubContact,
-						bindMobile:this.registerMobile,
-						activationCode:this.mobileCode,
+						contractMobile2:this.mobile,
+						contractMobile:this.newMobile,
+						mobileCode:this.mobileCode,
+						newMobileCode:this.newMobileCode,
 						sname:this.abbreviation,
 						provinceID:this.addressData.provinceID,
 						cityID:this.addressData.cityID,
@@ -375,29 +449,28 @@
 						businessLicenseImage:this.uploadBusinessImage,
 						headpic:this.uploadMentuzImage,
 						firstClubType:this.isOrganizationType, //机构类型分类 医美:0和生美:1
-						secondClubType:this.secondClubType,	//机构类型二级分类 诊所:1,门诊:2,医院:3
-						department:this.department,			//科室
+						secondClubType:this.secondClubType,		//机构类型二级分类 诊所:1,门诊:2,医院:3
+						department:this.department,				//科室
 						medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
 						isAgreed:this.isAgreed,				//是否勾选协议	
 						mainpro:this.mainpro,
-						whichStep:3
+						fax:this.clubFax,
+						contractPhone:this.clubTelePhone,
+						info : this.companyPprofile
 				}
-				organizationRegister(params).then(res =>{
-					this.$util.msg('您的机构账号已提交审核',2000);
-					this.$api.switchTabTo('/pages/tabBar/home/home')
-				}).catch(res =>{
-					this.$util.msg(res.msg,2000);
+				console.log(params)
+				organizationUpdate(params).then(response =>{
+					this.$util.msg(response.msg,2000);
+					setTimeout(()=>{
+						this.$api.switchTabTo('/pages/tabBar/user/user')
+					},2000)
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000);
 				})
 			},
 			getMobileCodeFn(){
-				let params = {
-						mobile:this.registerMobile,
-						activateCodeType:2,
-						platformType:2,
-						imgCode:this.imageCode,
-						token:this.imageCodetoken,
-				}
-				getMobileCode(params).then(res =>{
+				let params = { mobile : this.mobile }
+				getClubMobileCode(params).then(response =>{
 					this.$util.msg('验证短信已发送',2000);
 					const TIME_COUNT = 60;
 			     	if (!this.codeTime) {
@@ -415,44 +488,32 @@
 			        		}
 			       		},1000)
 			      	}
-				}).catch( res =>{
-					this.$util.msg(res.msg,2000);
+				}).catch( response =>{
+					this.$util.msg(response.msg,2000);
 				})
 			},
 			getNewMobileCodeFn(){
-				let params = {
-						mobile:this.registerMobile,
-						activateCodeType:2,
-						platformType:2,
-						imgCode:this.imageCode,
-						token:this.imageCodetoken,
-				}
-				getMobileCode(params).then(res =>{
+				let params = { newMobile : this.newMobile }
+				getClubNewMobileCode(params).then(response =>{
 					this.$util.msg('验证短信已发送',2000);
 					const TIME_COUNT = 60;
-			     	if (!this.codeTime) {
-			       		this.count = TIME_COUNT;
+			     	if (!this.codeTimeNew) {
+			       		this.newCount = TIME_COUNT;
 			       		this.isNewMobileDisabled = true;
-			       		this.codeTime = setInterval(() => {
-			       			if (this.count > 1 && this.count <= TIME_COUNT) {
-			         			this.count--
-			         			this.newMobileCodeText = this.count +'s重新发送'
+			       		this.codeTimeNew = setInterval(() => {
+			       			if (this.newCount > 1 && this.newCount <= TIME_COUNT) {
+			         			this.newCount
+			         			this.newMobileCodeText = this.newCount +'s重新发送'
 			        		} else {
 				         		this.isNewMobileDisabled = false;
-				         		clearInterval(this.codeTime)
-				         		this.codeTime = null
+				         		clearInterval(this.codeTimeNew)
+				         		this.codeTimeNew = null
 								this.newMobileCodeText = '获取验证码'
 			        		}
 			       		},1000)
 			      	}
 				}).catch( res =>{
-					this.$util.msg(res.msg,2000);
-				})
-			},
-			getVerificationCode(){//图形验证
-				getImageCode().then(res => {
-					this.imageCodeUrl = res.data.baseImage
-					this.imageCodetoken = res.data.token
+					this.$util.msg(response.msg,2000);
 				})
 			},
 			// 三级联动选择
@@ -557,10 +618,12 @@
 				}
 			},
 			chooseMaleLike(e){
+				this.isMainproCheck = true
 				this.mainpro = this.checkLikes(e,this.mentuzCampList)
 				console.log(this.mainpro)
 			},
 			chooseMaleLikes(e){
+				this.isMainproCheck = true
 				this.mainpro = this.checkLikes(e,this.medicaCampList)
 				console.log(this.mainpro)
 			},
@@ -595,12 +658,20 @@
 			showAustomItem() {
 				this.isShowAustomItem = !this.isShowAustomItem
 			},
+			setNewMainpro(arr){//回显处理主营内容
+				let _ARRAY = []
+				arr.split(',').forEach((item,index) =>{
+					let _OBJ = {value:index,name:item,checked:true}
+					_ARRAY.push(_OBJ)
+				})
+				return _ARRAY
+			},
 			addCustomItem(){
 				if(this.isOrganizationType == 0){
-					let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue}
+					let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue,checked:true}
 					this.mentuzCampList.push(item)
 				}else{
-					let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue}
+					let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue,checked:true}
 					this.medicaCampList.push(item)
 				}
 			},
@@ -739,7 +810,9 @@
 							}
 						}
 						&.disabled{
+							background: #F7F7F7;
 							.row-input{
+								background: #F7F7F7;
 								color: #999999;
 							}
 						}

+ 43 - 38
pages/user/account/account.vue

@@ -68,6 +68,7 @@
 	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
 	import tuiNomore from "@/components/tui-components/nomore/nomore"
 	import uniCalendar from '@/components/uni-calendar/uni-calendar.vue'
+	import { accountInfo } from "@/api/use.js"
 	var date = new Date();
 	export default{
 		components: {
@@ -134,53 +135,57 @@
 					  * @param:pageSize(每页条数)
 					  * @param:userId(用户ID)
 					  */ 
-					let param = {year:year,month:month,userId:this.userID,index:1,pageSize:this.pageSize, type:this.balanceType,}
-					this.$api.lodingGet('/personal/touchBalance',param,
-						response => {
-							this.initAbleUserMoney(response.ableUserMoney)
-							let resData = response.page.results
-							this.hasNextPage = response.page.hasNextPage;
-							if(resData && resData.length > 0){
-								this.isEmpty = false;
-								this.accountList = [...resData];
+					let params = {year:year,month:month,userId:this.userID,pageNum:1,pageSize:this.pageSize, type:this.balanceType,}
+					accountInfo(params).then(response =>{
+						let infoData = response.data
+						this.initAbleUserMoney(infoData.ableUserMoney)
+						let resultsData = infoData.pageDate.results
+						this.hasNextPage =  infoData.pageDate.hasNextPage;
+						console.log(resultsData.length)
+						if(resultsData && resultsData.length > 0){
+							this.isEmpty = false;
+							this.accountList = [...resultsData];
+						}else{
+							this.isEmpty = true
+						}
+						if(this.hasNextPage){
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						}else{
+							if(this.accountList.length < 2){
+								this.pullUpOn = true
 							}else{
-								this.isEmpty = true
-							}
-							if(this.hasNextPage){
 								this.pullUpOn = false
-								this.nomoreText = '上拉显示更多'
-							}else{
-								if(this.accountList.length < 2){
-									this.pullUpOn = true
-								}else{
-									this.pullUpOn = false
-									this.nomoreText = '已至底部'
-								}
+								this.nomoreText = '已至底部'
 							}
 						}
-					)		
+					}).catch(response =>{
+						this.$util.msg(response.msg,2000)
+					})
 				})	
 			},	
 			getOnReachBottomData(index,year,month){//上拉加载
 				this.pageNum+=1
-				let param = {year:year,month:month,userId:this.userID,index:this.pageNum,pageSize:this.pageSize,type:this.balanceType}
-				this.$api.get('/personal/touchBalance',param,
-					response => {
-						let resData = response.page.results
-						this.hasNextPage = response.page.hasNextPage;
-						this.accountList = this.accountList.concat(resData)
-						this.pullFlag = false;// 防上拉暴滑
-						setTimeout(()=>{this.pullFlag = true;},500)
-						if(this.hasNextPage){
-							this.pullUpOn = false
-							this.nomoreText = '上拉显示更多'
-						}else{
-							this.loadding = false
-							this.pullUpOn = false
-							this.nomoreText = '已至底部'
-						}
+				let param = {year:year,month:month,userId:this.userID,pageNum:this.pageNum,pageSize:this.pageSize,type:this.balanceType}
+				accountInfo(params).then(response =>{
+					let infoData = response.data
+					this.initAbleUserMoney(infoData.ableUserMoney)
+					let resultsData = infoData.pageDate.results
+					this.hasNextPage =  infoData.pageDate.hasNextPage;
+					this.accountList = this.accountList.concat(resultsData)
+					this.pullFlag = false;// 防上拉暴滑
+					setTimeout(()=>{this.pullFlag = true;},500)
+					if(this.hasNextPage){
+						this.pullUpOn = false
+						this.nomoreText = '上拉显示更多'
+					}else{
+						this.loadding = false
+						this.pullUpOn = false
+						this.nomoreText = '已至底部'
 					}
-				)	
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000)
+				})
 			},
 			initAbleUserMoney(money){//拆分金额并转千分位格式显示
 				if(money == 0){

+ 10 - 10
pages/user/address/address.vue

@@ -15,7 +15,7 @@
 							<text class="mobile">{{item.mobile}}</text>
 						</view>
 						<view class="u-box b-b">
-							<text class="address">收货地址:{{item.province}}{{item.city}}{{item.town}}{{item.addressDetail}}</text>
+							<text class="address">收货地址:{{item.province}}{{item.city}}{{item.town}}{{item.address}}</text>
 						</view>
 						<view class="u-box b-t">
 							<view v-if="item.defaultFlag == 1" class="tag-left">
@@ -97,14 +97,14 @@
 				}, 500)
 			},
 			initAddressList(){	
-				let params = {index:this.pageNum,pageSize:this.pageSize,userID:this.userID}
+				let params = {pageNum:this.pageNum,pageSize:this.pageSize,userID:this.userID}
 				queryAddressList(params).then(response =>{
-					if(response.results == ''){
+					if(response.data.results == ''){
 						this.isEmpty = true
 					}else{
 						this.isEmpty = false
 						let results =[];
-						results = response.results;
+						results = response.data.results;
 						this.addressList = this.addressList.concat(results);
 						this.pageNum = response.index +1;
 						if(this.pageNum === response.totalPage + 1 ){
@@ -155,13 +155,13 @@
 		onShow() {
 			this.$api.getStorage().then((resolve) =>{
 				this.userID = resolve.userID
+				this.pageNum = 1;
+				this.addressList = [];
+				this.initAddressList();
+				var pages = getCurrentPages();
+				var prevPage = pages[pages.length - 2];  //上一个页面	
+					// prevPage.setData({select:''})
 			})
-			this.pageNum = 1;
-			this.addressList = [];
-			this.initAddressList();
-			var pages = getCurrentPages();
-			var prevPage = pages[pages.length - 2];  //上一个页面	
-				// prevPage.setData({select:''})
 		}
 	}
 </script>

+ 14 - 13
pages/user/address/addressManage.vue

@@ -9,7 +9,7 @@
 			</view>
 			<view class="text-input b-b" @click="showMulLinkageThreePicker">
 				<text class="input">
-					{{addressData.address}}
+					{{addressData.allAddress}}
 				</text>		
 				<text class="iconfont icon-xiayibu"></text>
 			</view>
@@ -45,7 +45,7 @@
 <script>	
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
 	import authorize from '@/common/config/authorize.js'	
-	import { addNewAddress } from '@/api/cart.js'
+	import { addNewAddress,updateAddress } from '@/api/cart.js'
 	export default {
 		components:{
 			mpvueCityPicker
@@ -59,7 +59,7 @@
 				switchDefault:false,
 				addressData:{
 					addressID:'',
-					address:'所在地区',
+					allAddress:'所在地区',
 					userID: '',			//用户id ,只在新增收货地址时传
 					shouHuoRen: '',		//收货人
 					mobile:'',			//收货人手机
@@ -71,15 +71,15 @@
 			}
 		},
 		onLoad(option){
-			// console.log(option.data)
+			console.log(option.data)
 			let title = '添加新地址'
 			if(option.type==='edit'){
 				title = '编辑收货地址'
 				this.isConfirm = false;
 				this.addType = 2;				
 				this.addressData = JSON.parse(option.data)
-				this.addressData.address = `${this.addressData.province}-${this.addressData.city}-${this.addressData.town}`
-				this.addressData.userOrganizeID = this.userOrganizeID;
+				this.addressData.allAddress = `${this.addressData.province}-${this.addressData.city}-${this.addressData.town}`
+				this.addressData.addressDetail = this.addressData.address 
 				this.addressData.defaultFlag = this.addressData.defaultFlag;
 				if(this.addressData.defaultFlag == 1){
 					this.switchDefault = true
@@ -125,12 +125,11 @@
 				}
 				if(this.addType ==1){
 					this.params ={
-							userID:data.userID  ,//用户id ,只在新增收货地址时传
+							userID:data.userID  ,		//用户id ,只在新增收货地址时传
 							shouHuoRen:data.shouHuoRen ,//收货人
-							townID:data.townID,//区ID
+							townID:data.townID,			//区ID
 							addressDetail:data.addressDetail,//地址
-							mobile:data.mobile,//手机
-							userOrganizeID:this.userOrganizeID,//组织ID
+							mobile:data.mobile,			//手机
 							defaultFlag:data.defaultFlag//是否默认收货地址(0 不是默认,1 默认)
 						}
 					this.postAddressData(this.params)	
@@ -142,11 +141,13 @@
 			postAddressData(res){
 				this.btnText(true)
 				addNewAddress(res).then( response=>{
-					this.$util.msg(response.msg,3000);
+					this.$util.msg(response.msg,2000);
 					this.btnText(false)
-					uni.navigateBack();
+					setTimeout(()=>{
+						uni.navigateBack();
+					},2000)
 				}).catch(response =>{
-					this.$util.msg(response.msg,3000);
+					this.$util.msg(response.msg,2000);
 					setTimeout(function(){
 						uni.switchTab({
 							url:'/pages/tabBar/home/home'

+ 37 - 48
pages/user/invoice/invoice.vue

@@ -30,8 +30,8 @@
 		<view class="submit-btn" @click="submitNow">确认</view>
 	</view>
 </template>
-
 <script>
+	import { querySaveInvoice, queryInvoice } from "@/api/other.js"
 	export default {
 		data() {
 			return {
@@ -51,12 +51,12 @@
 		onLoad() {
 			this.$api.getStorage().then((resolve) =>{
 				this.userId = resolve.userID
-				this.sendData('init');
-				let phone = wx.getSystemInfoSync();  //调用方法获取机型
+				this.getInvoiceInfo()
+				let phone = wx.getSystemInfoSync()  //调用方法获取机型
 			    if (phone.platform == 'ios') {
-			        this.isIos = true;
+			        this.isIos = true
 			    } else if (phone.platform == 'android') {
-					this.isIos = false;
+					this.isIos = false
 			    }
 			})
 		},
@@ -128,51 +128,40 @@
 					this.showMsg('请填写注册地址');
 					return false;
 				}
-				this.sendData();
+				this.saveInvoiceInfo();
+			},
+			getInvoiceInfo(){
+				this.$api.getStorage().then((resolve) =>{
+					queryInvoice({userId:resolve.userID}).then(response =>{
+						let resData = response.data
+						console.log(resData)
+						this.invoiceData.companyName = resData.invoiceTitle;
+						this.invoiceData.taxId = resData.corporationTaxNum;
+						this.invoiceData.bankName = resData.openBank;
+						this.invoiceData.phoneNum = resData.registeredPhone;
+						this.invoiceData.address = resData.registeredAddress;
+						this.inputBankNum(resData.bankAccountNo);
+					}).catch(response =>{
+						this.$util.msg(response.msg,2000);
+					})
+				})
 			},
-			sendData(type) {
-				let self = this,
-					invoiceData = self.invoiceData,
-					data = '';
-				if(type === 'init') {
-					data = {userId: self.userId};
-				} else {
-					const {companyName:invoiceTitle, taxId:corporationTaxNum, bankName: openBank,
-							bankNum: bankAccountNo, phoneNum:registeredPhone, address:registeredAddress} = invoiceData;
-					data = {userId: self.userId, invoiceTitle, corporationTaxNum, openBank,
+			saveInvoiceInfo() {
+				let invoiceData = this.invoiceData
+				const {companyName:invoiceTitle, taxId:corporationTaxNum, bankName: openBank,
+						bankNum: bankAccountNo, phoneNum:registeredPhone, address:registeredAddress} = invoiceData;
+				let params = {userId: this.userId, invoiceTitle, corporationTaxNum, openBank,
 							bankAccountNo: bankAccountNo.replace(/\s*/g,""), registeredPhone, registeredAddress};
-				}
-				self.$api.post('/personal/invoice', data,
-					response => {
-						const code = response.code;
-						const resData = response.data;
-						if(code == 1) {
-							if(type === 'init') {
-								if(resData) {
-									invoiceData.companyName = resData.invoiceTitle;
-									invoiceData.taxId = resData.corporationTaxNum;
-									invoiceData.bankName = resData.openBank;
-									invoiceData.phoneNum = resData.registeredPhone;
-									invoiceData.address = resData.registeredAddress;
-									self.inputBankNum(resData.bankAccountNo);
-								}
-							} else {
-								self.showMsg('保存成功');
-								setTimeout(()=>{
-									uni.navigateBack({
-										delta: 1
-									})
-								},1100)
-							}
-						} else {
-							uni.showToast({
-								icon: 'none',
-								title: '网络错误,请稍后重试。',
-								duration: 3000
-							})
-						}
-					}
-				)
+				querySaveInvoice(params).then(response =>{
+					this.$util.msg('保存成功',2000);
+					setTimeout(()=>{
+						uni.navigateBack({
+							delta: 1
+						})
+					},1100)
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000);
+				})	
 			}
 		}
 	}

+ 154 - 126
pages/user/operator/list.vue

@@ -2,22 +2,20 @@
 	<view class="container operator clearfix">
 		<view class="operator-top clearfix">
 			<view class="operator-title">
-				<view class="head"><image src="../../../static/temp/logo@3x.png" mode=""></image></view>
+				<view class="head"><image src="../../../static/temp/icon-club@3x.png" mode=""></image></view>
 				<view class="title">{{clubName}}</view>
 			</view>
 			<view class="operator-search">
 				<view class="search-wrap">
 					<view class="search-from name">
-						<view class="label">姓名:</view>
 						<input class="input" type="text" v-model="linkman" placeholder="请输入姓名" maxlength="6"/>
 					</view>
 					<view class="search-from phone">
-						<view class="label">手机号:</view>
 						<input class="input" type="text" v-model="clubMobile" placeholder="请输入手机号" maxlength="11"/>
 					</view>
-				</view>
-				<view class="search-wrap">
-					<button class="search-btn" type="default" @click.stop="searchOpertor">搜索</button>
+					<view class="search-from search">
+						<button class="search-btn" type="default" @click.stop="searchOpertor">搜索</button>
+					</view>
 				</view>
 			</view>
 		</view>
@@ -27,47 +25,56 @@
 				<view class="add-btn" @click="this.$api.navigateTo('/pages/user/operator/addoperator')">添加运营人员</view>
 			</view>
 			<view v-else class="operator-list">
-				<scroll-view scroll-y="true">
+				<scroll-view scroll-y="true" >
 					<view class="list" v-for="(item, index) in operatorList" :key="index" @click.stop="showOperatorModel(item)">
 						<view class="list-left">
-							<view class="list-head"><image :src="item.image" mode=""></image></view>
+							<view class="list-head"><image :src="item.headimgurl ? item.headimgurl : '../../../static/temp/logo@3x.png'" mode=""></image></view>
 							<view class="list-tel">
-								<text class="txt">{{item.name}}</text>
+								<text class="txt">{{item.linkName}}</text>
 								<text class="txt">{{item.mobile}}</text>
 							</view>
 						</view>
 						<view class="list-opea">
 							<view class="opea-type">
-								<view class="opea-type-cell" v-if="item.status != '0'">
+								<view class="opea-type-cell" v-if="item.effectiveFlag != null">
 									<text class="iconfont icon-iconfontweixin" :style="{color: iconStautsColor(item.status)}"></text>
-									<text :style="{color: rexpStautsColor(item.status)}">{{ rexpStautsText(item.status) }}</text>
+									<text :style="{color: rexpStautsColor(item.effectiveFlag)}">{{ rexpStautsText(item.effectiveFlag) }}</text>
+								</view>
+								<view class="opea-type-cell none" v-else>
+									<text>- -</text>
 								</view>
 							</view>
 							<view class="opea-del">
-								<view class="opea-type-cell" @click.stop="deleteOperator(item)">
+								<view class="opea-type-cell" @click.stop="deleteOperator(item.id)">
 									<text class="iconfont icon-shanchu"></text>
 									<text>删除</text>
 								</view>
 							</view>
 						</view>
 					</view>
+					<!--加载loadding-->
+					<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
+					<tui-nomore :visible="!pullUpOn" bgcolor="#F7F7F7" :text='nomoreText'></tui-nomore>
+					<!--加载loadding-->
 				</scroll-view>
-				<view class="add-btn" @click="this.$api.navigateTo('/pages/user/operator/addoperator')">添加运营人员</view>
 			</view>
 		</view>
+		<div class="operator-btn">
+			<view class="add-btn" @click="this.$api.navigateTo('/pages/user/operator/addoperator')">添加运营人员</view>
+		</div>
 		<view class="operator-model" v-if="isOperatorModel" @click.stop="closeModel">
 			<view class="operator-alert">
 				<text class="iconfont icon-iconfontguanbi" @click.stop="closeModel"></text>
 				<view class="content">
-					<view class="ciew-t">姓名:{{modelData.name}}</view>
+					<view class="ciew-t">姓名:{{modelData.linkName}}</view>
 					<view class="ciew-t">手机号:{{modelData.mobile}}</view>
-					<view class="ciew-t">邀请码:{{modelData.code ? modelData.code : '无'}}<text :style="{color: rexpStautsColor(modelData.status)}">{{modelStautsText(modelData.status)}}</text></view>
-					<view class="ciew-t">邀请码有效期:{{modelData.time}}</view>
+					<view class="ciew-t">邀请码:{{modelData.invitationCode ? modelData.invitationCode : '无'}}<text :style="{color: rexpStautsColor(modelData.status)}">{{modelStautsText(modelData.effectiveFlag)}}</text></view>
+					<view class="ciew-t">邀请码有效期:{{modelData.effectiveDays}}天</view>
 					<view class="ciew-t">状态:{{modelData.status == '2' ? '已绑定' : '未绑定'}}</view>
-					<view class="ciew-t">添加时间:{{modelData.addtime}}</view>
-					<view class="ciew-t">绑定时间:{{modelData.bindtime}}</view>
+					<view class="ciew-t">添加时间:{{modelData.addTime}}</view>
+					<view class="ciew-t">绑定时间:{{modelData.bindTime}}</view>
 				</view>
-				<view class="btn" v-if="modelData.status != '2'" @click.stop="updateInvitationCode">更新邀请码</view>
+				<view class="btn" v-if="modelData.status != '2'" @click.stop="updateInvitationCode(modelData)">更新邀请码</view>
 			</view>
 		</view>
 	</view>
@@ -75,24 +82,32 @@
 
 <script>
 	import authorize from '@/common/config/authorize.js'	
-	import modelAlert from '@/components/module/modelAlert/modelAlert.vue'
+	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
+	import tuiNomore from "@/components/tui-components/nomore/nomore"
+	
 	import { queryOperatorList, deleteOperator , updateCode } from "@/api/operator.js"
 	export default {
 		components:{
-			modelAlert
+			tuiLoadmore,
+			tuiNomore,
 		},
 		data() {
 			return {
 				clubName:'采美商城采购机构按时',
+				linkman:'',
+				clubMobile:'',
 				isSelect:false,
 				isEmpty:false,
 				isLoadMore:false,
 				alertText:'确定要删除该地址?',
+				nomoreText: '上拉显示更多',
 				userID:'',
 				pageNum:1,
 				pageSize:10,
 				addressList: [],
 				hasNextPage:false,
+				loadding: false,
+				pullUpOn: true,
 				allowDataStatus:true,
 				wrapperHeight:'100%',
 				scrollHeight:'',
@@ -100,49 +115,7 @@
 				currPage:'',//当前页面
 				prevPage:'',//上一个页面
 				isOperatorModel:false,
-				operatorList:[
-					{
-						image:'../../../static/temp/logo@3x.png',
-						name:'张三',
-						mobile:'18888888888',
-						status:'1',
-						code:'456789',
-						time:'5',
-						static:'1',
-						addtime:'2020-03-18 23:48:56',
-						bindtime:'2020-03-18 23:48:56',
-					},
-					{
-						image:'../../../static/temp/logo@3x.png',
-						name:'张三',
-						mobile:'18888888888',
-						status:'2',
-						code:'456789',
-						time:'5',
-						addtime:'2020-03-18 23:48:56',
-						bindtime:'2020-03-18 23:48:56',
-					},
-					{
-						image:'../../../static/temp/logo@3x.png',
-						name:'张三',
-						mobile:'18888888888',
-						status:'3',
-						code:'456789',
-						time:'5',
-						addtime:'2020-03-18 23:48:56',
-						bindtime:'2020-03-18 23:48:56',
-					},
-					{
-						image:'../../../static/temp/logo@3x.png',
-						name:'张三',
-						mobile:'18888888888',
-						status:'0',
-						code:'',
-						time:'5',
-						addtime:'2020-03-18 23:48:56',
-						bindtime:'2020-03-18 23:48:56',
-					},
-				],
+				operatorList:[],
 				modelData:''
 			}
 		},
@@ -150,12 +123,6 @@
 			if(option.type=='select'){this.isSelect = true;}
 			this.setScrollHeight();
 		},
-		onReachBottom() {
-			// console.log('滑动到页面底部')
-			if(this.isLoadMore) {
-				// this.initAddressList();
-			}
-		},
 		methods: {
 			setScrollHeight() {
 				// 窗口高度 - 底部距离
@@ -172,28 +139,57 @@
 				}, 500)
 			},
 			searchOpertor(){
-				this.initAddressList()
+				this.pageNum=1
+				this.initOperatorList()
 			},
-			initAddressList(){	
-				queryOperatorList({status:2,pageNum:this.pageNum,pageSize:this.pageSize}).then(response =>{
-					if(response.results == ''){
-						this.isEmpty = true
-					}else{
+			initOperatorList(){	
+				let params = {pageNum:this.pageNum,pageSize:this.pageSize,linkName:this.linkman,mobile:this.clubMobile}
+				queryOperatorList(params).then(response =>{
+					let responseData = response.data
+					if(responseData.results&&responseData.results.length > 0){
 						this.isEmpty = false
-						let results =[];
-						results = response.results;
-						this.addressList = this.addressList.concat(results);
-						this.pageNum = response.index +1;
-						if(this.pageNum === response.totalPage + 1 ){
-							this.isLoadMore = false;
-						} else {
-							this.isLoadMore = true;
+						this.hasNextPage = response.data.hasNextPage
+						this.operatorList =responseData.results
+						this.pullFlag = false;
+						setTimeout(()=>{this.pullFlag = true;},500)
+						if(this.hasNextPage){
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						}else{
+							this.pullUpOn = true
+							this.loadding = false
+							this.nomoreText = '已至底部'
+						}
+					}else{
+						this.isEmpty = true
+					}
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000)
+				})
+			},	
+			getOnReachBottomData(){
+				this.pageNum+=1
+				let params = {pageNum:this.pageNum,pageSize:this.pageSize,linkName:this.linkman,mobile:this.clubMobile}
+				queryOperatorList(params).then(response =>{
+					let responseData = response.data
+					if(responseData.results&&responseData.results.length > 0){
+						this.hasNextPage = response.data.hasNextPage
+						this.operatorList = this.operatorList.concat(responseData.results) 
+						this.pullFlag = false;// 防上拉暴滑
+						setTimeout(()=>{this.pullFlag = true;},500)
+						if(this.hasNextPage){
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						}else{
+							this.pullUpOn = false
+							this.loadding = false
+							this.nomoreText = '已至底部'
 						}
 					}
 				}).catch(response =>{
-					this.$util.msg(response.msg,2000);
+					this.$util.msg(response.msg,2000)
 				})
-			},		
+			},
 			showOperatorModel(item){
 				console.log(item)
 				this.isOperatorModel = true
@@ -203,28 +199,33 @@
 				this.isOperatorModel = false
 			},
 			deleteOperator(id){//删除运营人员
-				console.log('删除地址的ID',id)
+				console.log('删除的ID',id)
 				this.$util.modal('','确定删除运营人员吗?','确定删除','取消',true,() =>{
 					deleteOperator({id:id}).then(response =>{
-						this.$util.msg('删除成功',2000);
+						this.$util.msg('删除成功',2000)
+						this.initOperatorList()
 					}).catch(response =>{
-						this.$util.msg(response.msg,2000);
+						this.$util.msg(response.msg,2000)
 					})
 				})
 			},
 			updateInvitationCode(item){	//更新邀请码	
 				this.$util.modal('','确定更新邀请码并发送给运营人员?','确定更新','取消',true,() =>{
 					updateCode({id:item.id,status:item.status}).then(response =>{
-						this.$util.msg('更新邀请码成功',2000);
+						this.$util.msg('更新邀请码成功',2000)
 						this.isOperatorModel = false
+						this.initOperatorList()
 					}).catch(response =>{
-						this.$util.msg(response.msg,2000);
+						this.$util.msg(response.msg,2000)
 					})
 				})
 			},
-			rexpStautsText(status) {
+			rexpStautsText(n) {
 			      let text = ''
-			      switch (status) {
+			      switch (n) {
+					case '':
+						text = '--'
+						break
 			        case '1':
 			          text = '邀请码有效'
 			          break
@@ -237,9 +238,9 @@
 			      }
 			      return text
 			},
-			modelStautsText(status) {
+			modelStautsText(n) {
 			      let text = ''
-			      switch (status) {
+			      switch (n) {
 			        case '1':
 			          text = '(有效)'
 			          break
@@ -277,10 +278,17 @@
 			  return textColor
 			},
 		},
+		onReachBottom() {
+			if(this.hasNextPage){
+				this.loadding = true
+				this.pullUpOn = true
+				this.getOnReachBottomData()
+			}	
+		},
 		onShow() {
 			this.pageNum = 1;
 			this.addressList = [];
-			this.initAddressList();
+			this.initOperatorList();
 			var pages = getCurrentPages();
 			var prevPage = pages[pages.length - 2];  //上一个页面	
 				// prevPage.setData({select:''})
@@ -303,9 +311,12 @@
 	.operator-top{
 		width: 702rpx;
 		padding: 0 24rpx;
-		height: auto;
+		height: 282rpx;
 		background: #FFFFFF;
-		margin-bottom: 24rpx;
+		position:fixed ;
+		top: 0;
+		left: 0;
+		z-index: 999;
 		.operator-title{
 			width: 100%;
 			height: 92rpx;
@@ -337,14 +348,14 @@
 			.search-from{
 				width: 300rpx;
 				height: 40rpx;
-				padding: 24rpx;
+				padding: 20rpx;
 				background: $sub-bg-color;
 				border-radius: 14rpx;
 				position: relative;
 				margin-bottom: 20rpx;
 				float: left;
 				&.name{
-					width: 260rpx;
+					width: 180rpx;
 					margin-right: 20rpx;
 					.input{
 						width: 180rpx;
@@ -357,9 +368,10 @@
 					}
 				}
 				&.phone{
-					width: 324rpx;
+					width: 228rpx;
+					margin-right: 20rpx;
 					.input{
-						width: 220rpx;
+						width: 228rpx;
 						padding-left:10rpx;
 						font-size: $font-size-28;
 						color: $text-color;
@@ -368,6 +380,20 @@
 						height: 40rpx;
 					}
 				}
+				&.search{
+					width: 170rpx;
+					padding: 0;
+					background: #FFFFFF;
+					.search-btn{
+						width: 170rpx;
+						height: 78rpx;
+						border: 1px solid $color-system;
+						border-radius: 14rpx;
+						font-size: $font-size-28;
+						color: $color-system;
+						line-height: 78rpx;
+					}
+				}
 				.label{
 					text-align: left;
 					font-size: $font-size-28;
@@ -377,17 +403,13 @@
 				}
 				
 			}
-			.search-btn{
-				width: 702rpx;
-				height: 88rpx;
-				border: 1px solid $color-system;
-				border-radius: 14rpx;
-				font-size: $font-size-28;
-				color: $color-system;
-				line-height: 88rpx;
-			}
+			
 		}
 	}
+	.operator-main{
+		padding-top: 282rpx;
+		padding-bottom: 120rpx;
+	}
 	.list{
 		display: flex;
 		align-items: center;
@@ -441,6 +463,9 @@
 						margin-right: 8rpx;
 						font-size: $font-size-32;
 					}
+					&.none{
+						text-align: center;
+					}
 				}
 			}
 			.opea-del{
@@ -474,7 +499,7 @@
 		bottom: 0;
 		right: 0;
 		margin: auto;
-		z-index: 992;
+		z-index: 1000;
 		.operator-alert{
 			width: 430rpx;
 			height: 376rpx;
@@ -487,7 +512,7 @@
 			bottom: 0;
 			right: 0;
 			margin: auto;
-			z-index: 999;
+			z-index: 1001;
 			.icon-iconfontguanbi{
 				width: 68rpx;
 				height: 68rpx;
@@ -520,24 +545,27 @@
 			}
 		}
 	}
-	
-	.add-btn{
+	.operator-btn{
 		position: fixed;
-		left: 24rpx;
-		right: 24rpx;
-		bottom: 34rpx;
+		width: 100%;
+		height: 140rpx;
+		left: 0;
+		bottom: 0;
+		background: #FFFFFF;
 		z-index: 95;
 		display: flex;
 		align-items: center;
 		justify-content: center;
-		width: 702rpx;
-		height: 88rpx;
-		font-size: $font-size-28;
-		line-height: 88rpx;
-		color: #FFFFFF;
-		text-align: center;
-		background: $btn-confirm;
-		border-radius: 14rpx;
+		.add-btn{
+			width: 702rpx;
+			height: 88rpx;
+			font-size: $font-size-28;
+			line-height: 88rpx;
+			color: #FFFFFF;
+			text-align: center;
+			background: $btn-confirm;
+			border-radius: 14rpx;
+		}
 	}
 	.adds-btn{
 		width: 702rpx;