Forráskód Böngészése

用户体系优化V1.0.0

zhengjinyi 5 éve
szülő
commit
d3f7a41626

+ 1 - 3
App.vue

@@ -28,10 +28,9 @@
 						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)
 						uni.removeStorageSync('sessionid')
 						uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
-						this.getHomeInformation()
+						this.$store.commit('updateStatus',user_key)
 					}).catch(response =>{
 						this.isLogin = false;
 						this.userID ='';
@@ -39,7 +38,6 @@
 						uni.removeStorageSync('sessionid')
 						uni.setStorageSync('sessionid','JSESSIONID='+response.data)
 						this.$store.commit('updateStatus',user_key)
-						this.getHomeInformation()
 					})
 				})
 			},

+ 6 - 6
api/cart.js

@@ -54,7 +54,7 @@ export function cartDelete(params) {
  */
 export function queryAddressList(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
+		request.get('/findAddress/personalCenter',params, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{
@@ -68,7 +68,7 @@ export function queryAddressList(params) {
  */
 export function addNewAddress(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
+		request.get('/findAddress/saveAddress',params, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{
@@ -78,11 +78,11 @@ export function addNewAddress(params) {
 	})
 }
 /**
- *添加新地址
+ *删除地址
  */
 export function deleteNewAddress(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
+		request.get('/findAddress/deleteAddress',params, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{
@@ -92,11 +92,11 @@ export function deleteNewAddress(params) {
 	})
 }
 /**
- *修改地址
+ *修改保存
  */
 export function updateAddress(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
+		request.get('/findAddress/saveAddress',params, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{

+ 6 - 3
api/operator.js

@@ -9,10 +9,13 @@ import $reg from '@/common/config/common.js'
 
 /**
  *获取运营人员管理列表
+ *@param status
+ *@param pageNum
+ *@param pageSize
  */
 export function queryOperatorList(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
+		request.get('/operation/list',params, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{
@@ -40,7 +43,7 @@ export function addOperator(params) {
  */
 export function deleteOperator(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
+		request.post('/operation/delete',params, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{
@@ -54,7 +57,7 @@ export function deleteOperator(params) {
  */
 export function updateCode(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
+		request.get('/operation/updateInvitationCode',params, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{

+ 4 - 4
api/other.js

@@ -37,12 +37,12 @@ export function queryAfterSale(params) {
 	})
 }
 /**
- *取消订单
- * @param
+ *机构协议,用户协议,隐私权政策
+ *@param helpPageID 隐私权政策id:1013,平台规则id:1023,机构协议:1036
  */
-export function cancelOrder(params) {
+export function protocolAgree(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
+		request.get('/club/protocol',params, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{

+ 1 - 1
api/product.js

@@ -93,7 +93,7 @@ export function queryProductDetils(params) {
  */
 export function queryPreferred(params) {
 	return new Promise(function(resolve,reject) {
-		request.get("/product//preferred",params, res => {
+		request.get("/product/preferred",params, res => {
 			if(res.code == '0'){
 				resolve(res);
 			}else{

+ 7 - 3
api/use.js

@@ -253,9 +253,13 @@ export function bindingWechat(params) {
 /**
  *邀请码授权登录
  */
-export function invitationLogin(params) {
+export function invitationCodeLogin(params) {
 	return new Promise(function(resolve,reject) {
-		request.post('/club/authorization',params, res => {
+		if( params.invitationCode == ''){
+			uni.showToast({title: '请输入邀请码',duration: 2000,mask:true, icon:'none'})
+			return
+		}
+		request.post('/club/invitationCode',params, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{
@@ -269,7 +273,7 @@ export function invitationLogin(params) {
  */
 export function personalInfo(params) {
 	return new Promise(function(resolve,reject) {
-		request.post('/club/authorization',params, res => {
+		request.get('/personalCenter/myCentre',params, res => {
 			if(res.code == '0'){
 				resolve(res)
 			}else{

+ 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'

+ 2 - 2
components/module/modelAlert/shareAlert.vue

@@ -46,8 +46,8 @@
 							this.$parent.shareCode = this.shareCode;
 						}else{
 							this.$parent.isShareModal = false;
-							this.$util.modal('提示',response.msg,false,() =>{
-								 this.$api.switchTabTo('/pages/tabBar/home/home');
+							this.$util.modal('提示',response.msg,'确定','',false,() =>{
+								 this.$api.switchTabTo('/pages/tabBar/home/home')
 							})
 						}
 					}

+ 2 - 1
main.js

@@ -20,11 +20,12 @@ const msg = (title, duration=1500, mask=true, icon='none')=>{
 		icon
 	});
 }
-const modal = (title,content,confirmText,showCancel=false,callBack) =>{
+const modal = (title,content,confirmText,cancelText,showCancel=false,callBack) =>{
 	uni.showModal({
 		title,
 		content,
 		confirmText,
+		cancelText,
 		confirmColor:'#E15616',
 		showCancel,
 		success: function (res) {

+ 1 - 0
pages/goods/product.vue

@@ -245,6 +245,7 @@
 		},
 		onLoad(option) {
 			let self = this;
+			console.log(option)
 			this.productID = option.id;//获取商品ID
 			if(option.page == 2){
 				this.backPage = option.page

+ 6 - 13
pages/service/organagree.vue

@@ -6,6 +6,7 @@
 
 <script>
 	import richTextTemplate from '@/components/module/listTemplate/richTextTemplate'
+	import { protocolAgree } from "@/api/other.js"
 	
 	export default{
 		components: {
@@ -13,29 +14,21 @@
 		},
 		data() {
 			return{
-				serverUrl: '',
 				type: ''
 			}
 		},
 		onLoad(){
-			this.serverUrl = '/home/afterSale';
 			this.type = 'afterSale';
 			this.initData();
 		},
 		methods:{
 			initData(){
 				let self = this;
-				self.$api.get(self.serverUrl,{organizeID:self.userOrganizeID}, response => {
-					if (response.code == "1") {
-						let _data =response.data,
-							type = self.type;
-						if(type) {
-							let html = self.$api.adaptRichTextImg(_data[type]);
-							self.$refs.childTemplate.html = html;
-						}
-					} else {
-						uni.showToast({icon:'none', title: response.msg, duration: 2000});
-					}
+				protocolAgree({helpPageID:1036}).then(response =>{
+					let data =response.data.content
+					self.$refs.childTemplate.html = self.$api.adaptRichTextImg(data);
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000)
 				})
 			}
 		}

+ 6 - 13
pages/service/privacyagree.vue

@@ -6,6 +6,7 @@
 
 <script>
 	import richTextTemplate from '@/components/module/listTemplate/richTextTemplate'
+	import { protocolAgree } from "@/api/other.js"
 	
 	export default{
 		components: {
@@ -13,29 +14,21 @@
 		},
 		data() {
 			return{
-				serverUrl: '',
 				type: ''
 			}
 		},
 		onLoad(){
-			this.serverUrl = '/home/afterSale';
 			this.type = 'afterSale';
 			this.initData();
 		},
 		methods:{
 			initData(){
 				let self = this;
-				self.$api.get(self.serverUrl,{organizeID:self.userOrganizeID}, response => {
-					if (response.code == "1") {
-						let _data =response.data,
-							type = self.type;
-						if(type) {
-							let html = self.$api.adaptRichTextImg(_data[type]);
-							self.$refs.childTemplate.html = html;
-						}
-					} else {
-						uni.showToast({icon:'none', title: response.msg, duration: 2000});
-					}
+				protocolAgree({helpPageID:1013}).then(response =>{
+					let data =response.data.content
+					self.$refs.childTemplate.html = self.$api.adaptRichTextImg(data);
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000)
 				})
 			}
 		}

+ 6 - 13
pages/service/useragree.vue

@@ -6,6 +6,7 @@
 
 <script>
 	import richTextTemplate from '@/components/module/listTemplate/richTextTemplate'
+	import { protocolAgree } from "@/api/other.js"
 	
 	export default{
 		components: {
@@ -13,29 +14,21 @@
 		},
 		data() {
 			return{
-				serverUrl: '',
 				type: ''
 			}
 		},
 		onLoad(){
-			this.serverUrl = '/home/afterSale';
 			this.type = 'afterSale';
 			this.initData();
 		},
 		methods:{
 			initData(){
 				let self = this;
-				self.$api.get(self.serverUrl,{organizeID:self.userOrganizeID}, response => {
-					if (response.code == "1") {
-						let _data =response.data,
-							type = self.type;
-						if(type) {
-							let html = self.$api.adaptRichTextImg(_data[type]);
-							self.$refs.childTemplate.html = html;
-						}
-					} else {
-						uni.showToast({icon:'none', title: response.msg, duration: 2000});
-					}
+				protocolAgree({helpPageID:1023}).then(response =>{
+					let data =response.data.content
+					self.$refs.childTemplate.html = self.$api.adaptRichTextImg(data);
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000)
 				})
 			}
 		}

+ 10 - 7
pages/tabBar/category/category.vue

@@ -6,8 +6,8 @@
 		</view>
 		<view class="category-list">
 			<!-- 左侧分类导航 -->
-			<scroll-view  scroll-y="true" class="left-aside" >
-				<view class="row" v-if="m.smalltypeList.length > 0" v-for="(m, index) in categoryList" :key="index" :class="[index==showCategoryIndex?'on':'']" @tap="showCategory(index)">
+			<scroll-view class="left-aside" scroll-y="true" scroll-with-animation :scroll-top="verticalNavTop" style="height:calc(100vh - 102rpx)">
+				<view class="row" v-if="m.smalltypeList.length > 0" v-for="(m, index) in categoryList" :key="index" :class="[index==showCategoryIndex?'on':'']" @tap="showCategory($event,index)" :data-id="index">
 					<view class="text">
 						{{m.name}}
 					</view>
@@ -45,11 +45,13 @@
 			return {
 				headerShow:true,
 				hotSearchText: '你想要的这里都有',
+				clickPath:'/pages/search/search',
 				showCategoryIndex: 0,
 				//分类列表
 				categoryList: [],
 				search: '',
-				cateTop: {}
+				cateTop: {},
+				verticalNavTop: 0,
 			}
 		},
 		onShow() {
@@ -81,8 +83,9 @@
 					this.$util.msg(res.msg,2000);
 				})
 			},
-			showCategory(index){//分类切换显示
+			showCategory(e,index){//分类切换显示
 				this.showCategoryIndex = index;
+				this.verticalNavTop = (e.currentTarget.dataset.id - 1) * 50
 			},
 			toSearch () {// 跳转至搜索详情页
 				uni.navigateTo({
@@ -173,10 +176,10 @@
 						}
 						.block{
 							width: 10rpx;
-							height: 100rpx;
-							top: 0;
+							height: 60rpx;
+							top: 20rpx;
 							background-color: $color-system;
-							border-radius: 0 5rpx 5rpx 0;
+							border-radius: 0 15rpx 15rpx 0;
 						}
 					}
 				}

+ 38 - 39
pages/tabBar/user/user.vue

@@ -115,7 +115,9 @@
 </template>
 <script>
 	import uniBadge from '@/components/uni-badge/uni-badge.vue'
-	import { mapState,mapMutations } from 'vuex';
+	import { mapState,mapMutations } from 'vuex'
+	import { personalInfo } from "@/api/use.js"
+	
 	export default{
 		components: {
 			uniBadge
@@ -153,38 +155,34 @@
 		},
 		methods:{
 			initData(){
-				this.$api.get('/personal/myCentre',{openid:this.openid,userOrganizeID:this.userOrganizeID}, 
-					response => {
-						if (response.code == "1") {
-							this.$store.commit('updateAllNum',response.data.cartCount)
-							let user_data =response.data;
-							if(user_data.userMoney == 0){
-								this.userMoney = '0.00';
-							}else{
-								let i =  user_data.userMoney.toString().lastIndexOf('.');
-								let money;
-								if(i==-1){
-									money = this.$api.FormatMoney(user_data.userMoney); //会所剩余余额
-									this.userMoney = money +'.00'
-								}else{
-									money = this.$api.FormatMoney(user_data.userMoney); //会所剩余余额
-									this.userMoney = money
-								}
-							}
-							this.name = user_data.name //会所名称
-							if(user_data.headpic!=''){
-								this.headpic = user_data.headpic //会所头像
-							}
-							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);					
-						} else {
-							this.$util.msg(response.msg,2000);
+				personalInfo({userID:10766}).then(response =>{
+					this.$store.commit('updateAllNum',response.data.cartCount)
+					let user_data =response.data;
+					if(user_data.userMoney == 0){
+						this.userMoney = '0.00';
+					}else{
+						let i =  user_data.userMoney.toString().lastIndexOf('.');
+						let money;
+						if(i==-1){
+							money = this.$api.FormatMoney(user_data.userMoney); //会所剩余余额
+							this.userMoney = money +'.00'
+						}else{
+							money = this.$api.FormatMoney(user_data.userMoney); //会所剩余余额
+							this.userMoney = money
 						}
 					}
-				)
+					this.name = user_data.name //会所名称
+					if(user_data.headpic!=''){
+						this.headpic = user_data.headpic //会所头像
+					}
+					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);					
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000)
+				})
 			},
 			toPhone(){
 				uni.makePhoneCall({
@@ -204,14 +202,15 @@
 				uni.stopPullDownRefresh()
 			},
 			onShow(){
-				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;
-				}
+				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;
+				// }
 			}
 		}
 	}

+ 295 - 249
pages/user-module/apply.vue

@@ -3,14 +3,14 @@
 		<view class="register-error clearfix">
 			<view class="error-top animation" @click="showOpenError" :class="{'error-top--none': isOpenError}" >
 				<view class="name">审核未通过原因:</view>
-				<view class="icon">{{isOpenError ? '' : '查看详情'}}<text class="iconfont icon-xiangxiajiantou" :class="{'icon-xiangxiajiantou-active':isOpenError}"></text></view>
+				<view class="icon">{{ isOpenError ? '' : '查看详情'}}<text class="iconfont icon-xiangxiajiantou" :class="{'icon-xiangxiajiantou-active':isOpenError}"></text></view>
 			</view>
 			<view class="error-main animation" :class="{'error-main--hide':!isOpenError}" 
 				:style="{'transform':isOpenError?'translateY(0)':'translateY(-50%)','-webkit-transform':isOpenError?'translateY(0)':'translateY(-50%)'}">
 				<view class="error-main-list">
 					<view class="item" v-for="(item, index) in errorList" :key="index">
-						<text class="num">{{index+1}}.</text>
-						<text>{{item.text}}</text>
+						<text class="num">{{ index+1 }}.</text>
+						<text>{{ item.text }}</text>
 					</view>
 				</view>
 			</view>
@@ -34,29 +34,29 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">手机号:</view>
-					<input class="row-input" type="number" v-model="registerEmail" placeholder="请输入手机号" maxlength="11"/>
-					<view class="row-btn" @click="showCheckPhone">{{isShowCheckPhone?'取消修改':'修改手机号'}}</view>
+					<input class="row-input" type="number" v-model="mobile" placeholder="请输入手机号" maxlength="11"/>
+					<view class="row-btn" @click="showCheckPhone">{{ isShowCheckPhone ? '取消修改' : '修改手机号' }}</view>
 				</view>
 			</view>
 			<view class="register-row clearfix" v-show="isShowCheckPhone">
 				<view class="register-from code">
-					<input class="row-input" type="text" v-model="regEmailCode" placeholder="请输入上述手机号的验证码" maxlength="6"/>
+					<input class="row-input" type="text" v-model="mobileCode" placeholder="请输入上述手机号的验证码" maxlength="6"/>
 				</view>
-				<view class="register-from btn" :class="[isDisabled === true ? 'disabled' : 'none']">
-					<button class="row-input"  type="button" @click.stop="getEmailCode" :disabled="isDisabled">获取验证码</button>
+				<view class="register-from btn" :class="[isMobileDisabled  ? 'disabled' : '']" @click.stop="getMobileCodeFn">
+					<button class="row-input"  type="button" :disabled="isMobileDisabled">{{ mobileCodeText }}</button>
 				</view>
 			</view>
 			<view class="register-row clearfix" v-show="isShowCheckPhone">
 				<view class="register-from">
-					<input class="row-input" type="number" v-model="registerEmail" placeholder="请输入新手机号" maxlength="11"/>
+					<input class="row-input" type="number" v-model="newMobile" placeholder="请输入新手机号" maxlength="11"/>
 				</view>
 			</view>
 			<view class="register-row clearfix" v-show="isShowCheckPhone">
 				<view class="register-from code">
-					<input class="row-input" type="text" v-model="regEmailCode" placeholder="请输入新手机号的验证码" maxlength="6"/>
+					<input class="row-input" type="text" v-model="newMobileCode" placeholder="请输入新手机号的验证码" maxlength="6"/>
 				</view>
-				<view class="register-from btn" :class="[isDisabled === true ? 'disabled' : 'none']">
-					<button class="row-input"  type="button" @click.stop="getEmailCode" :disabled="isDisabled">获取验证码</button>
+				<view class="register-from btn" :class="[isMobileDisabled  ? 'disabled' : '']" @click.stop="getNewMobileCodeFn">
+					<button class="row-input"  type="button" :disabled="isNewMobileDisabled">{{ newMobileCodeText }}</button>
 				</view>
 			</view>
 		</view>
@@ -131,13 +131,15 @@
 			<view class="register-row clearfix">
 				<view class="register-from picker">
 					<view class="label">机构类型:</view>
-					<picker @change="bindPickerChange" :value="index" :range="organizationTypeList" range-key="name">
+					<view class="row-input picker" @click="bindPickerChange">{{ organizationTypeText }}</view>
+					<text class="iconfont icon-xiayibu"></text>
+<!-- 				<picker @change="bindPickerChange" :value="index" :range="organizationTypeList" range-key="name">
 						<view class="row-input" :class="[isOrganizationType == 0 ? 'none' : '']">{{organizationTypeList[typtIndex].name}}</view>
 					</picker>
-					<text class="iconfont icon-xiayibu"></text>
+ -->					
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 1">
+			<view class="register-row clearfix" v-if="isOrganizationType == 0">
 				<view class="register-from radio">
 					<radio-group @change="radioChange">
 						<label class="row-input" v-for="(item, index) in beautyList" :key="item.value">
@@ -153,7 +155,7 @@
 					<input class="row-input keshi" type="text" v-model="clubContact" placeholder="请填写经营的科室,至少三个,用逗号隔开" maxlength="16"/>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 1">
+			<view class="register-row clearfix" v-if="isOrganizationType == 0">
 				<view class="register-picture">
 					<view class="label zz">医疗执业许可证:</view>
 					<view class="upload-picture">
@@ -167,7 +169,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 1">
+			<view class="register-row clearfix" v-if="isOrganizationType == 0">
 				<view class="register-from group">
 					<view class="label">主营内容:</view>
 					<checkbox-group class="content-class" @change="chooseMaleLike" >
@@ -186,7 +188,7 @@
 				</view>
 				<view class="register-from group btn" v-show="isShowAustomItem">
 					<view class="content-class btn">
-						<input class="row-input" type="text" v-model="customItemValue" placeholder="请输入自定义项目"  @blur="onBlurInput" maxlength="5"/>
+						<input class="row-input other" type="text" v-model="customItemValue" placeholder="请输入自定义项目"  @blur="onBlurInput" maxlength="5"/>
 						<button type="default" 
 								class="confirm-btn" 
 								:class="[isDisabled === true ? 'disabled' : 'none']" 
@@ -196,7 +198,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 2">
+			<view class="register-row clearfix" v-if="isOrganizationType == 1">
 				<view class="register-from group">
 					<view class="label">主营内容:</view>
 					<checkbox-group class="content-class" @change="chooseMaleLikes">
@@ -215,7 +217,7 @@
 				</view>
 				<view class="register-from group btn" v-show="isShowAustomItem">
 					<view class="content-class btn">
-						<input class="row-input" type="text" v-model="customItemValue" placeholder="请输入自定义项目"  @blur="onBlurInput" maxlength="5"/>
+						<input class="row-input other" type="text" v-model="customItemValue" placeholder="请输入自定义项目"  @blur="onBlurInput" maxlength="5"/>
 						<button type="default" 
 								class="confirm-btn" 
 								:class="[isDisabled === true ? 'disabled' : 'none']" 
@@ -228,8 +230,11 @@
 			<view class="register-fiexd clearfix">
 				<view class="register-agree">
 					<view class="agree-text"  @tap.stop="agreeCheck()">
-						<button class="checkbox iconfont" :class="[isCheck?'icon-gouxuan':'icon-weigouxuan']"></button> 
-						我已阅读并同意<text>《机构协议》</text><text>《用户协议》</text>及<text>《隐私权政策》</text>
+						<button class="checkbox iconfont" :class="[isCheck ?'icon-gouxuan':'icon-weigouxuan']"></button> 
+						我已阅读并同意
+						<text @click.stop="this.$api.navigateTo('/pages/service/organagree')">《机构协议》</text>
+						<text @click.stop="this.$api.navigateTo('/pages/service/useragree')">《用户协议》</text>及
+						<text @click.stop="this.$api.navigateTo('/pages/service/privacyagree')">《隐私权政策》</text>
 					</view>
 				</view>
 				<view class="register-row ">
@@ -249,35 +254,51 @@
 <script>
 	import { mapMutations } from 'vuex';
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
-	import uniTag from '@/components/uni-tag/uni-tag.vue';
-	import authorize from '@/common/config/authorize.js' 
-	import configUrl from '@/common/config/config.js' 
+	import { organizationRegister , organizationVerifyRegisterFirst ,organizationVerifyRegisterTwo } from "@/api/use.js"
+	import { getImageCode, getMobileCode, uploadFileImage } from "@/api/utils.js" 
 	var self;
 	export default{
 		components:{
-			uniTag,
 			mpvueCityPicker
 		},
 		data() {
 			return{
-				isOpenError:false,
 				errorList:[
 					{text:'图片模糊'},
 					{text:'营业执照错误'},
 					{text:'手机号码错误图片模糊图片模糊图片模糊图片模糊图片模糊图片模糊图片模糊图片模糊图片模糊图片模糊图片模糊'}
 				],
-				isDisabled:false,
+				isOpenError:false,			//审核不通过提示信息显隐
+				isShowCheckPhone:false,		//是否显示修改手机
+				tabCurrentIndex:3,	
+				isPreviewImage:false,   	//预览图片开关
+				isMobileDisabled: false,	//手机验证码按钮控制
+				isNewMobileDisabled: false,	//手机验证码按钮控制
+			    count: '',					//倒计时
+			    codeTime: null,
+				clubName:'',	 			//机构名称
+				abbreviation:'',	 		//机构简称
+				clubContact:'',	 			//联系人
+				mobile:'',					//联系人手机号
+				newMobile:'',				//新联系人手机号
+				mobileCode:'',				//手机号验证码
+				newMobileCode:'',			//新手机号手机验证码
+				mobileCodeText: '获取验证码',
+				newMobileCodeText: '获取验证码',
+				socialCreditCode:'',	//统一社会信用代码
+				isAgreed:0,				//是否勾选协议
+				isDisabled:true,
 				isShowInput:false,
-				isCheck:true,		//勾选协议
-				uploadBusinessImage:'',
-				uploadMentuzImage:'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1431188283,1203112303&fm=26&gp=0.jpg',
-				uploadMedicalImage:'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1431188283,1203112303&fm=26&gp=0.jpg',
-				isOrganizationType:0,
-				organizationTypeList:[
-					{name:'请选择机构类型',value:0},
-					{name:'医美',value:1},
-					{name:'生美',value:2}
-				],
+				isCheck:true,			//是否勾选协议
+				uploadBusinessImage:'',	//营业执照图片
+				uploadMentuzImage:'',  	//门头照图片
+				uploadMedicalImage:'', 	//资质照图片
+				department:'',			//科室
+				isDepartment:false,     //是否显示科室
+				secondClubType:'',		//机构类型二级分类
+				mainpro:'',				//主营内容
+				isOrganizationType:3,
+				organizationTypeText:'请选择机构类型',
 				beautyList:[{value:'1',name:'诊所'},{value:'2',name:'门诊'},{value:'3',name:'医院'}],
 				mentuzCampList:[{value:'1',name:'整形'},{value:'2',name:'轻医美'},{value:'3',name:'皮肤科'}],
 				medicaCampList:[
@@ -293,84 +314,130 @@
 				typtIndex:0,
 				organizationType:0,
 				current:0,
-				isShowCheckPhone:false,
-				isDepartment:false, //是否显示科室
 				isShowAustomItem:false, //是否显示其他添加
-				customItemValue:'', //自定义项目
-				invitationCode:'',  //获取用户登录的邀请码
-				isToast:false,		//控制显示未输入邀请码提示	
-				isUserInfo:false,	//控制显示授权弹窗
-				nickName:'',		//存储用户名
-				userInfo:'',		//存储微信用户授权信息
-				isSuccess:false,
-				toestText:'',
-				telPhone:'',
-				registerType:'',		//跳转类型
-				alertText:'',
-				listType: '',
-				listVal: '',
-				detilType:'',
-				id:'',//商品ID
+				customItemValue:'', 	//自定义项目
 				addressData:{
-					addressID:'',
 					address:'请选择机构所在地区',
-					userID: '',			//用户id ,只在新增收货地址时传
-					shouHuoRen: '',		//收货人
-					mobile:'',			//收货人手机
 					townID:'',			//区ID
+					cityID:'',			//区ID
+					provinceID:'',		//区ID
 					addressDetail: '',	//地址
-					defaultFlag:0,		//是否默认收货地址(0 不是默认,1 默认)
 				},
-			}
+			}	
 		},
 		onLoad(option) {
 			console.log(option)
-			self = this;
-			self.registerType = option.type;
-			self.id = option.id
-			if(option.listType) {
-				self.listType = option.listType;
-				self.listVal = option.listVal;
-			}
 		},
 		methods:{
-			...mapMutations(['register']),
-			goregister() {
-				self.$api.get('/register/isEnabled',{userOrganizeID:self.userOrganizeID,invitationCode:self.invitationCode}, res => {
-					if (res.code == "1") {
-						//查看此微信用户是否已经授权过
-						authorize.getSetting().then(res =>{
-							// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-							if(res == 2){
-								self.isUserInfo = true
-							}else{
-								self.isUserInfo = false
-								self.wxGetUserInfo()
-							}
-						})
-					}else if(res.code =='0'){
-						self.toestText ='请输入邀请码';
-						self.alertText ='邀请码';
-						self.telPhone = res.msg;
-						self.isToast = true;
-					}else if(res.code =='-2'){
-						self.toestText ='邀请码已失效';
-						self.alertText ='新邀请码';
-						self.telPhone = res.msg;
-						self.isToast = true;
-					}else if(res.code =='-3'){
-						self.toestText ='邀请码已被使用';
-						self.alertText ='新邀请码';
-						self.telPhone = res.msg;
-						self.isToast = true;
-					}else{
-						uni.showToast({icon:'none', title: res.msg, duration: 3000});
-						self.isUserInfo = false
-					}
+			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);
 				})
 			},
-			showOpenError(){
-				this.isOpenError = !this.isOpenError
+			registerStepsSub(){
+				let params ={
+						name:this.clubName,
+						linkMan:this.clubContact,
+						bindMobile:this.registerMobile,
+						activationCode:this.mobileCode,
+						sname:this.abbreviation,
+						provinceID:this.addressData.provinceID,
+						cityID:this.addressData.cityID,
+						townID:this.addressData.townID,
+						address:this.addressData.addressDetail,
+						socialCreditCode:this.socialCreditCode,
+						businessLicenseImage:this.uploadBusinessImage,
+						headpic:this.uploadMentuzImage,
+						firstClubType:this.isOrganizationType, //机构类型分类 医美:0和生美:1
+						secondClubType:this.secondClubType,	//机构类型二级分类 诊所:1,门诊:2,医院:3
+						department:this.department,			//科室
+						medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
+						isAgreed:this.isAgreed,				//是否勾选协议	
+						mainpro:this.mainpro,
+						whichStep:3
+				}
+				organizationRegister(params).then(res =>{
+					this.$util.msg('您的机构账号已提交审核',2000);
+					this.$api.switchTabTo('/pages/tabBar/home/home')
+				}).catch(res =>{
+					this.$util.msg(res.msg,2000);
+				})
+			},
+			getMobileCodeFn(){
+				let params = {
+						mobile:this.registerMobile,
+						activateCodeType:2,
+						platformType:2,
+						imgCode:this.imageCode,
+						token:this.imageCodetoken,
+				}
+				getMobileCode(params).then(res =>{
+					this.$util.msg('验证短信已发送',2000);
+					const TIME_COUNT = 60;
+			     	if (!this.codeTime) {
+			       		this.count = TIME_COUNT;
+			       		this.isMobileDisabled = true;
+			       		this.codeTime = setInterval(() => {
+			       			if (this.count > 1 && this.count <= TIME_COUNT) {
+			         			this.count--
+			         			this.mobileCodeText = this.count +'s重新发送'
+			        		} else {
+				         		this.isMobileDisabled = false;
+				         		clearInterval(this.codeTime)
+				         		this.codeTime = null
+								this.mobileCodeText = '获取验证码'
+			        		}
+			       		},1000)
+			      	}
+				}).catch( res =>{
+					this.$util.msg(res.msg,2000);
+				})
+			},
+			getNewMobileCodeFn(){
+				let params = {
+						mobile:this.registerMobile,
+						activateCodeType:2,
+						platformType:2,
+						imgCode:this.imageCode,
+						token:this.imageCodetoken,
+				}
+				getMobileCode(params).then(res =>{
+					this.$util.msg('验证短信已发送',2000);
+					const TIME_COUNT = 60;
+			     	if (!this.codeTime) {
+			       		this.count = TIME_COUNT;
+			       		this.isNewMobileDisabled = true;
+			       		this.codeTime = setInterval(() => {
+			       			if (this.count > 1 && this.count <= TIME_COUNT) {
+			         			this.count--
+			         			this.newMobileCodeText = this.count +'s重新发送'
+			        		} else {
+				         		this.isNewMobileDisabled = false;
+				         		clearInterval(this.codeTime)
+				         		this.codeTime = 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
+				})
 			},
 			// 三级联动选择
 			showMulLinkageThreePicker() {
@@ -378,170 +445,129 @@
 				this.$refs.mpvueCityPicker.show()
 			},
 			onConfirm(e) {
-				// console.log('地址',e);
+				console.log('地址',e);
 				this.addressData.address = e.name;
-				this.addressData.townID = e.cityCode;	
+				this.addressData.townID = e.townCode;
+				this.addressData.cityID = e.cityCode;
+				this.addressData.provinceID = e.provinceCode;
 			},	
-			bindPickerChange(e) {
-				console.log('picker发送选择改变,携带值为:' + e.target.value)
-				this.current=0
-				this.isDepartment = false
+			onTextareaInput(e){
+			   this.addressData.addressDetail = e.detail.value;
+			},
+			chooseBusinessImage() {//营业执照图片上传
+				uploadFileImage().then(res =>{
+					this.uploadBusinessImage = JSON.parse(res.data).data
+				})
+			},
+			chooseMentuzImage() {//门头照图片上传
+				uploadFileImage().then(res =>{
+					this.uploadMentuzImage = JSON.parse(res.data).data
+				})
+			},
+			chooseMedicalImage() {//资质照图片上传
+				uploadFileImage().then(res =>{
+					this.uploadMedicalImage = JSON.parse(res.data).data
+				})
+			},
+			viewBusinessImage(e) {
+				this.myPreviewImageFn(this.uploadBusinessImage)
+			},
+			viewMentuzImage(e) {
+				this.myPreviewImageFn(this.uploadMentuzImage)
+			},
+			viewMedicalImage(e) {
+				this.myPreviewImageFn(this.uploadMedicalImage)
+			},
+			myPreviewImageFn(url){
+				this.isPreviewImage = true
+				let mentuzArray = []
+				mentuzArray.push(url)
+				uni.previewImage({
+					urls: mentuzArray,
+					current: 0
+				});
+			},
+			delBusinessImage(){
+				this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
+					 this.uploadBusinessImage = ''
+				})
+			},
+			delMentuzImage(){
+				this.$util.modal('','确定删除门头照图片吗?','确定','取消',true,() =>{
+					this.uploadMentuzImage = ''
+				})
+			},			
+			delMedicalImage(){
+				this.$util.modal('','确定删除资质图片吗?','确定','取消',true,() =>{
+					this.uploadMedicalImage = ''
+				})
+			},
+			bindPickerChange() {
+				let self = this
+				uni.showActionSheet({
+					title:'标题',
+					itemList: ['医美', '生美'],
+					success: (e) => {
+						self.isOrganizationType = e.tapIndex
+						switch(e.tapIndex){
+							case 0:
+								this.organizationTypeText = '医美'
+								break;
+							case 1:
+								this.organizationTypeText = '生美'
+								break;
+						}
+					}
+				})
+			
+			},
+			bindPickerChange2(e) {
+				console.log('picker携带值为:' + e.target.value)
 				this.typtIndex = e.target.value
 				this.isOrganizationType = e.target.value
 			},
 			radioChange(e) {
-				let _value = e.target.value
-				if( _value == '2' || _value == '3'){
+				this.secondClubType = e.target.value;
+				if( this.secondClubType == '2' || this.secondClubType == '3'){
 					this.isDepartment = true
 				}else{
 					this.isDepartment = false
 				}
 				for (let i = 0; i < this.beautyList.length; i++) {
-					if (this.beautyList[i].value === _value) {
+					if (this.beautyList[i].value === this.secondClubType) {
 						this.current = i;
 						break;
 					}
 				}
 			},
 			chooseMaleLike(e){
-				let items = this.mentuzCampList
-				let	values = e.detail.value
-				for (var i = 0, lenI = items.length; i < lenI; ++i) {
-					const item = items[i]
-					if(values.indexOf(item.value) >= 0){
-						this.$set(item,'checked',true)
-					}else{
-						this.$set(item,'checked',false)
-					}
-				}
+				this.mainpro = this.checkLikes(e,this.mentuzCampList)
+				console.log(this.mainpro)
 			},
 			chooseMaleLikes(e){
-				let items = this.medicaCampList
+				this.mainpro = this.checkLikes(e,this.medicaCampList)
+				console.log(this.mainpro)
+			},
+			checkLikes(e,list){
+				let items = list
 				let	values = e.detail.value
-				for (var i = 0, lenI = items.length; i < lenI; ++i) {
+				let arr = []
+				for (let i = 0, lenI = items.length; i < lenI; ++i) {
 					const item = items[i]
 					if(values.indexOf(item.value) >= 0){
 						this.$set(item,'checked',true)
+						arr.push(item.name)
 					}else{
 						this.$set(item,'checked',false)
 					}
 				}
-			},
-			onTextareaInput(e){
-			   this.addressData.addressDetail = e.detail.value;
-			   // console.log(this.addressData.addressDetail)
-			},
-			chooseBusinessImage() {
-				let self = this;
-				uni.chooseImage({
-					count: 1, //默认1
-					sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
-					sourceType: ['album','camera'], //从相册选择
-					success: (res) => {
-						const tempFilePaths = res.tempFilePaths;
-						const uploadTask = uni.uploadFile({
-							url : 'https://mall-b.caimei365.com/formData/MultiPictareaddData',
-							filePath: tempFilePaths[0],
-							name: 'file',
-							formData: {
-								'user': 'test'
-							},
-							success: function (data) {
-								console.log(data.data);
-								self.uploadBusinessImage = res.tempFilePaths
-							},
-							error : function(e){
-								 console.log(e);
-							}
-						})
-					},
-					
-				})
-			},
-			chooseMentuzImage() {
-				let self = this;
-				uni.chooseImage({
-					count: 1, //默认1
-					sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
-					sourceType: ['album','camera'], //从相册选择
-					success: (res) => {
-						const tempFilePaths = res.tempFilePaths;
-						const uploadTask = uni.uploadFile({
-							url : 'https://mall-b.caimei365.com/formData/MultiPictareaddData',
-							filePath: tempFilePaths[0],
-							name: 'file',
-							formData: {
-								'user': 'test'
-							},
-							success: function (res) {
-								console.log(res.data);
-								self.uploadMentuzImage = res.data
-							},
-							error : function(e){
-								 console.log(e);
-							}
-						})
-					}
-				});
-			},
-			chooseMedicalImage() {
-				let self = this;
-				uni.chooseImage({
-					count: 1, //默认1
-					sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
-					sourceType: ['album','camera'], //从相册选择
-					success: (res) => {
-						const tempFilePaths = res.tempFilePaths;
-						const uploadTask = uni.uploadFile({
-							url : 'https://mall-b.caimei365.com/formData/MultiPictareaddData',
-							filePath: tempFilePaths[0],
-							name: 'file',
-							formData: {
-								'user': 'test'
-							},
-							success: function (res) {
-								console.log(res.data);
-								self.uploadMedicalImage = res.data
-							},
-							error : function(e){
-								 console.log(e);
-							}
-						})
-					}
-				});
-			},
-			viewMentuzImage(e) {
-				let self = this
-				uni.previewImage({
-					urls: self.uploadMentuzImage,
-					current: e.currentTarget.dataset.url
-				});
-			},
-			viewBusinessImage(e) {
-				let self = this
-				uni.previewImage({
-					urls: self.uploadBusinessImage,
-					current: e.currentTarget.dataset.url
-				});
-			},
-			viewMedicalImage(e) {
-				let self = this
-				uni.previewImage({
-					urls: self.uploadMedicalImage,
-					current: e.currentTarget.dataset.url
-				});
-			},
-			delBusinessImage(){
-				this.uploadBusinessImage = ''
-			},
-			delMentuzImage(){
-				this.uploadMentuzImage = ''
-			},			
-			delMedicalImage(){
-				this.uploadMedicalImage = ''
+				return arr.toString()
 			},
 			agreeCheck() {
 				this.isCheck = !this.isCheck
+				if(this.isCheck){
+					this.isAgreed = 1
+				}
 			},
 			onBlurInput(e){//
 				if(e.detail.value ===''){
@@ -550,14 +576,11 @@
 					this.isDisabled = false
 				}
 			},
-			getEmailCode(){
-				this.isDisabled = true
-			},
 			showAustomItem() {
 				this.isShowAustomItem = !this.isShowAustomItem
 			},
 			addCustomItem(){
-				if(this.isOrganizationType == 1){
+				if(this.isOrganizationType == 0){
 					let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue}
 					this.mentuzCampList.push(item)
 				}else{
@@ -565,8 +588,21 @@
 					this.medicaCampList.push(item)
 				}
 			},
-			showCheckPhone(){
+			showOpenError(){//顶部审核信息详情
+				this.isOpenError = !this.isOpenError
+			},
+			showCheckPhone(){//控制修改手机显隐
 				this.isShowCheckPhone = !this.isShowCheckPhone
+			},
+			steps(index) {//$attrstab切换
+				console.log(index)
+				this.tabCurrentIndex = index;
+			}
+		},
+		onShow() {
+			if(this.isPreviewImage){
+				this.isPreviewImage = false
+				return
 			}
 		}
 	}
@@ -736,6 +772,10 @@
 						&.none{
 							color: #999999;
 						}
+						&.picker{
+							text-align: left;
+							color: #999999;
+						}
 						&.keshi{
 							width: 550rpx;
 						}
@@ -751,21 +791,26 @@
 					&.btn{
 						width: 176rpx;
 						float: left;
+						background: $btn-confirm;
 						.row-input{
 							width: 176rpx;
 							padding: 0;
-							background: #F7F7F7;
-							text-align: center;
-						}
-						&.none{
+							color: #FFFFFF;
 							background: $btn-confirm;
-							.row-input{
-								color: #FFFFFF;
-								background: $btn-confirm;
+							text-align: center;
+							&.other{
+								width: 240rpx;
+								background: #F7F7F7;
+								margin-right: 20rpx;
+							}
+							&.none{
+								background: #F7F7F7;
 							}
 						}
 						&.disabled{
+							background: #F7F7F7;
 							.row-input{
+								background: #F7F7F7;
 								color: #999999;
 							}
 						}
@@ -797,6 +842,7 @@
 						}
 						.row-radio{
 							float: left;
+							transform: scale(0.8);
 						}
 						.row-text{
 							width: 100rpx;

+ 3 - 6
pages/user-module/bindemail.vue

@@ -81,22 +81,19 @@
 						code:this.bindEmailCode
 				}
 				bindingEmail(params).then(res =>{
-					this.$util.msg(res.msg,2000)
-					setTimeout(function(){
-						this.$api.navigateTo(`/pages/user-module/bindwechat?data=${JSON.stringify(this.getOption)}&type=${this.loginType}`)
-					},2000)
+					this.$api.navigateTo(`/pages/user-module/bindwechat?data=${JSON.stringify(this.getOption)}&type=${this.loginType}`)
 				})
 			},
 			bindEmailNone(){
 				this.$api.navigateTo(`/pages/user-module/bindwechat?data=${JSON.stringify(this.getOption)}&type=${this.loginType}`)
 			},
 			getEmailCodeFn(){
+				this.isEmialDisabled = true;
 				getEmailCode({email:this.bindEmail,status:1}).then(res =>{
 					this.$util.msg('验证邮件已发送至邮箱,请登录邮箱查收',2000)
 					const TIME_COUNT = 60;
 			     	if (!this.codeTime) {
 			       		this.count = TIME_COUNT;
-			       		this.isEmialDisabled = true;
 			       		this.codeTime = setInterval(() => {
 			       			if (this.count > 1 && this.count <= TIME_COUNT) {
 			         			this.count--
@@ -183,7 +180,7 @@
 				flex-direction: column;
 				align-items: center;
 				&.code{
-					width: 380rpx;
+					width: 377rpx;
 					float: left;
 					margin-right: 20rpx;
 				}

+ 3 - 6
pages/user-module/bindwechat.vue

@@ -116,10 +116,7 @@
 						verificationCode:this.mobildeCode,
 				}
 				bindingWechat(params).then(res =>{
-					this.$util.msg(res.msg,2000)
-					setTimeout(()=>{
-						this.goUserLogininit()
-					},2000)
+					this.goUserLogininit()
 				}).catch(res =>{
 					this.$util.msg(res.msg,2000)
 				})
@@ -139,11 +136,11 @@
 						token:this.imageCodetoken,
 				}
 				getbindWechatCode(params).then(res =>{
-					this.$util.msg('验证短信已发送',2000)
 					const TIME_COUNT = 60;
+					this.isMobileDisabled = true;
+					this.$util.msg('验证短信已发送',2000)
 			     	if (!this.codeTime) {
 			       		this.count = TIME_COUNT;
-			       		this.isMobileDisabled = true;
 			       		this.codeTime = setInterval(() => {
 			       			if (this.count > 1 && this.count <= TIME_COUNT) {
 			         			this.count--

+ 290 - 268
pages/user-module/information.vue

@@ -28,29 +28,29 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">手机号:</view>
-					<input class="row-input" type="number" v-model="registerEmail" placeholder="请输入手机号" maxlength="11"/>
-					<view class="row-btn" @click="showCheckPhone">{{isShowCheckPhone?'取消修改':'修改手机号'}}</view>
+					<input class="row-input" type="number" v-model="mobile" placeholder="请输入手机号" maxlength="11"/>
+					<view class="row-btn" @click="showCheckPhone">{{ isShowCheckPhone ? '取消修改' : '修改手机号' }}</view>
 				</view>
 			</view>
 			<view class="register-row clearfix" v-show="isShowCheckPhone">
 				<view class="register-from code">
-					<input class="row-input" type="text" v-model="regEmailCode" placeholder="请输入上述手机号的验证码" maxlength="6"/>
+					<input class="row-input" type="text" v-model="mobileCode" placeholder="请输入上述手机号的验证码" maxlength="6"/>
 				</view>
-				<view class="register-from btn" :class="[isDisabled ? 'disabled' : 'none']">
-					<button class="row-input"  type="button" @click.stop="getEmailCode" :disabled="isDisabled">获取验证码</button>
+				<view class="register-from btn" :class="[isMobileDisabled  ? 'disabled' : '']" @click.stop="getMobileCodeFn">
+					<button class="row-input"  type="button" :disabled="isMobileDisabled">{{ mobileCodeText }}</button>
 				</view>
 			</view>
 			<view class="register-row clearfix" v-show="isShowCheckPhone">
 				<view class="register-from">
-					<input class="row-input" type="number" v-model="registerEmail" placeholder="请输入新手机号" maxlength="11"/>
+					<input class="row-input" type="number" v-model="newMobile" placeholder="请输入新手机号" maxlength="11"/>
 				</view>
 			</view>
 			<view class="register-row clearfix" v-show="isShowCheckPhone">
 				<view class="register-from code">
-					<input class="row-input" type="text" v-model="regEmailCode" placeholder="请输入新手机号的验证码" maxlength="6"/>
+					<input class="row-input" type="text" v-model="newMobileCode" placeholder="请输入新手机号的验证码" maxlength="6"/>
 				</view>
-				<view class="register-from btn" :class="[isDisabled ? 'disabled' : 'none']">
-					<button class="row-input"  type="button" @click.stop="getEmailCode" :disabled="isDisabled">获取验证码</button>
+				<view class="register-from btn" :class="[isMobileDisabled  ? 'disabled' : '']" @click.stop="getNewMobileCodeFn">
+					<button class="row-input"  type="button" :disabled="isNewMobileDisabled">{{ newMobileCodeText }}</button>
 				</view>
 			</view>
 		</view>
@@ -125,13 +125,15 @@
 			<view class="register-row clearfix">
 				<view class="register-from picker">
 					<view class="label">机构类型:</view>
-					<picker @change="bindPickerChange" :value="index" :range="organizationTypeList" range-key="name">
+					<view class="row-input picker" @click="bindPickerChange">{{ organizationTypeText }}</view>
+					<text class="iconfont icon-xiayibu"></text>
+<!-- 				<picker @change="bindPickerChange" :value="index" :range="organizationTypeList" range-key="name">
 						<view class="row-input" :class="[isOrganizationType == 0 ? 'none' : '']">{{organizationTypeList[typtIndex].name}}</view>
 					</picker>
-					<text class="iconfont icon-xiayibu"></text>
+ -->					
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 1">
+			<view class="register-row clearfix" v-if="isOrganizationType == 0">
 				<view class="register-from radio">
 					<radio-group @change="radioChange">
 						<label class="row-input" v-for="(item, index) in beautyList" :key="item.value">
@@ -147,7 +149,7 @@
 					<input class="row-input keshi" type="text" v-model="clubContact" placeholder="请填写经营的科室,至少三个,用逗号隔开" maxlength="16"/>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 1">
+			<view class="register-row clearfix" v-if="isOrganizationType == 0">
 				<view class="register-picture">
 					<view class="label zz">医疗执业许可证:</view>
 					<view class="upload-picture">
@@ -161,7 +163,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 1">
+			<view class="register-row clearfix" v-if="isOrganizationType == 0">
 				<view class="register-from group">
 					<view class="label">主营内容:</view>
 					<checkbox-group class="content-class" @change="chooseMaleLike" >
@@ -180,7 +182,7 @@
 				</view>
 				<view class="register-from group btn" v-show="isShowAustomItem">
 					<view class="content-class btn">
-						<input class="row-input" type="text" v-model="customItemValue" placeholder="请输入自定义项目"  @blur="onBlurInput" maxlength="5"/>
+						<input class="row-input other" type="text" v-model="customItemValue" placeholder="请输入自定义项目"  @blur="onBlurInput" maxlength="5"/>
 						<button type="default" 
 								class="confirm-btn" 
 								:class="[isDisabled ? 'disabled' : 'none']" 
@@ -190,7 +192,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 2">
+			<view class="register-row clearfix" v-if="isOrganizationType == 1">
 				<view class="register-from group">
 					<view class="label">主营内容:</view>
 					<checkbox-group class="content-class" @change="chooseMaleLikes">
@@ -209,7 +211,7 @@
 				</view>
 				<view class="register-from group btn" v-show="isShowAustomItem">
 					<view class="content-class btn">
-						<input class="row-input" type="text" v-model="customItemValue" placeholder="请输入自定义项目"  @blur="onBlurInput" maxlength="5"/>
+						<input class="row-input other" type="text" v-model="customItemValue" placeholder="请输入自定义项目"  @blur="onBlurInput" maxlength="5"/>
 						<button type="default" 
 								class="confirm-btn" 
 								:class="[isDisabled ? 'disabled' : 'none']" 
@@ -222,13 +224,13 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">固定电话:</view>
-					<input class="row-input" type="text" v-model="clubName" placeholder="请填写机构的固定电话" maxlength="15"/>
+					<input class="row-input" type="text" v-model="clubTelePhone" placeholder="请填写机构的固定电话" maxlength="15"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">传真:</view>
-					<input class="row-input" type="text" v-model="clubName" placeholder="请填写机构的传真" maxlength="15"/>
+					<input class="row-input" type="text" v-model="clubFax" placeholder="请填写机构的传真" maxlength="15"/>
 				</view>
 			</view>
 			<view class="register-row text-textarea clearfix">
@@ -247,8 +249,11 @@
 			<view class="register-fiexd clearfix">
 				<view class="register-agree">
 					<view class="agree-text"  @tap.stop="agreeCheck()">
-						<button class="checkbox iconfont" :class="[isCheck?'icon-gouxuan':'icon-weigouxuan']"></button> 
-						我已阅读并同意<text>《机构协议》</text><text>《用户协议》</text>及<text>《隐私权政策》</text>
+						<button class="checkbox iconfont" :class="[isCheck ?'icon-gouxuan':'icon-weigouxuan']"></button> 
+						我已阅读并同意
+						<text @click.stop="this.$api.navigateTo('/pages/service/organagree')">《机构协议》</text>
+						<text @click.stop="this.$api.navigateTo('/pages/service/useragree')">《用户协议》</text>及
+						<text @click.stop="this.$api.navigateTo('/pages/service/privacyagree')">《隐私权政策》</text>
 					</view>
 				</view>
 				<view class="register-row ">
@@ -268,35 +273,48 @@
 <script>
 	import { mapMutations } from 'vuex';
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
-	import uniTag from '@/components/uni-tag/uni-tag.vue';
-	import authorize from '@/common/config/authorize.js' 
-	import configUrl from '@/common/config/config.js' 
+	import { organizationRegister , organizationVerifyRegisterFirst ,organizationVerifyRegisterTwo } from "@/api/use.js"
+	import { getImageCode, getMobileCode, uploadFileImage } from "@/api/utils.js" 
 	var self;
 	export default{
 		components:{
-			uniTag,
 			mpvueCityPicker
 		},
 		data() {
 			return{
-				isOpenError:false,
-				errorList:[
-					{text:'图片模糊'},
-					{text:'营业执照错误'},
-					{text:'手机号码错误图片模糊图片模糊图片模糊图片模糊图片模糊图片模糊图片模糊图片模糊图片模糊图片模糊图片模糊'}
-				],
+				isShowCheckPhone:false,		//是否显示修改手机
+				tabCurrentIndex:3,	
+				isPreviewImage:false,   	//预览图片开关
+				isMobileDisabled: false,	//手机验证码按钮控制
+				isNewMobileDisabled: false,	//手机验证码按钮控制
+			    count: '',					//倒计时
+			    codeTime: null,
+				clubName:'',	 			//机构名称
+				abbreviation:'',	 		//机构简称
+				clubContact:'',	 			//联系人
+				mobile:'',					//联系人手机号
+				newMobile:'',				//新联系人手机号
+				mobileCode:'',				//手机号验证码
+				newMobileCode:'',			//新手机号手机验证码
+				mobileCodeText: '获取验证码',
+				newMobileCodeText: '获取验证码',
+				socialCreditCode:'',	//统一社会信用代码
+				isAgreed:0,				//是否勾选协议
 				isDisabled:true,
 				isShowInput:false,
-				isCheck:true,		//勾选协议
-				uploadBusinessImage:'',
-				uploadMentuzImage:'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1431188283,1203112303&fm=26&gp=0.jpg',
-				uploadMedicalImage:'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1431188283,1203112303&fm=26&gp=0.jpg',
-				isOrganizationType:0,
-				organizationTypeList:[
-					{name:'请选择机构类型',value:0},
-					{name:'医美',value:1},
-					{name:'生美',value:2}
-				],
+				isCheck:true,			//是否勾选协议
+				uploadBusinessImage:'',	//营业执照图片
+				uploadMentuzImage:'',  	//门头照图片
+				uploadMedicalImage:'', 	//资质照图片
+				department:'',			//科室
+				isDepartment:false,     //是否显示科室
+				secondClubType:'',		//机构类型二级分类
+				mainpro:'',				//主营内容
+				clubTelePhone:'',		//固定电话
+				clubFax:'',				//传真
+				companyPprofile:'',		//公司简介
+				isOrganizationType:3,
+				organizationTypeText:'请选择机构类型',
 				beautyList:[{value:'1',name:'诊所'},{value:'2',name:'门诊'},{value:'3',name:'医院'}],
 				mentuzCampList:[{value:'1',name:'整形'},{value:'2',name:'轻医美'},{value:'3',name:'皮肤科'}],
 				medicaCampList:[
@@ -312,85 +330,130 @@
 				typtIndex:0,
 				organizationType:0,
 				current:0,
-				isShowCheckPhone:false,
-				isDepartment:false, //是否显示科室
 				isShowAustomItem:false, //是否显示其他添加
-				customItemValue:'', //自定义项目
-				isCompanyPprofile:true,
-				invitationCode:'',  //获取用户登录的邀请码
-				isToast:false,		//控制显示未输入邀请码提示	
-				isUserInfo:false,	//控制显示授权弹窗
-				nickName:'',		//存储用户名
-				userInfo:'',		//存储微信用户授权信息
-				isSuccess:false,
-				toestText:'',
-				telPhone:'',
-				registerType:'',		//跳转类型
-				alertText:'',
-				listType: '',
-				listVal: '',
-				detilType:'',
-				id:'',//商品ID
+				customItemValue:'', 	//自定义项目
 				addressData:{
-					addressID:'',
 					address:'请选择机构所在地区',
-					userID: '',			//用户id ,只在新增收货地址时传
-					shouHuoRen: '',		//收货人
-					mobile:'',			//收货人手机
 					townID:'',			//区ID
+					cityID:'',			//区ID
+					provinceID:'',		//区ID
 					addressDetail: '',	//地址
-					defaultFlag:0,		//是否默认收货地址(0 不是默认,1 默认)
 				},
-			}
+			}	
 		},
 		onLoad(option) {
 			console.log(option)
-			self = this;
-			self.registerType = option.type;
-			self.id = option.id
-			if(option.listType) {
-				self.listType = option.listType;
-				self.listVal = option.listVal;
-			}
 		},
 		methods:{
-			...mapMutations(['register']),
-			goregister() {
-				self.$api.get('/register/isEnabled',{userOrganizeID:self.userOrganizeID,invitationCode:self.invitationCode}, res => {
-					if (res.code == "1") {
-						//查看此微信用户是否已经授权过
-						authorize.getSetting().then(res =>{
-							// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-							if(res == 2){
-								self.isUserInfo = true
-							}else{
-								self.isUserInfo = false
-								self.wxGetUserInfo()
-							}
-						})
-					}else if(res.code =='0'){
-						self.toestText ='请输入邀请码';
-						self.alertText ='邀请码';
-						self.telPhone = res.msg;
-						self.isToast = true;
-					}else if(res.code =='-2'){
-						self.toestText ='邀请码已失效';
-						self.alertText ='新邀请码';
-						self.telPhone = res.msg;
-						self.isToast = true;
-					}else if(res.code =='-3'){
-						self.toestText ='邀请码已被使用';
-						self.alertText ='新邀请码';
-						self.telPhone = res.msg;
-						self.isToast = true;
-					}else{
-						uni.showToast({icon:'none', title: res.msg, duration: 3000});
-						self.isUserInfo = false
-					}
+			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);
+				})
+			},
+			registerStepsSub(){
+				let params ={
+						name:this.clubName,
+						linkMan:this.clubContact,
+						bindMobile:this.registerMobile,
+						activationCode:this.mobileCode,
+						sname:this.abbreviation,
+						provinceID:this.addressData.provinceID,
+						cityID:this.addressData.cityID,
+						townID:this.addressData.townID,
+						address:this.addressData.addressDetail,
+						socialCreditCode:this.socialCreditCode,
+						businessLicenseImage:this.uploadBusinessImage,
+						headpic:this.uploadMentuzImage,
+						firstClubType:this.isOrganizationType, //机构类型分类 医美:0和生美:1
+						secondClubType:this.secondClubType,	//机构类型二级分类 诊所:1,门诊:2,医院:3
+						department:this.department,			//科室
+						medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
+						isAgreed:this.isAgreed,				//是否勾选协议	
+						mainpro:this.mainpro,
+						whichStep:3
+				}
+				organizationRegister(params).then(res =>{
+					this.$util.msg('您的机构账号已提交审核',2000);
+					this.$api.switchTabTo('/pages/tabBar/home/home')
+				}).catch(res =>{
+					this.$util.msg(res.msg,2000);
 				})
 			},
-			showOpenError(){
-				this.isOpenError = !this.isOpenError
+			getMobileCodeFn(){
+				let params = {
+						mobile:this.registerMobile,
+						activateCodeType:2,
+						platformType:2,
+						imgCode:this.imageCode,
+						token:this.imageCodetoken,
+				}
+				getMobileCode(params).then(res =>{
+					this.$util.msg('验证短信已发送',2000);
+					const TIME_COUNT = 60;
+			     	if (!this.codeTime) {
+			       		this.count = TIME_COUNT;
+			       		this.isMobileDisabled = true;
+			       		this.codeTime = setInterval(() => {
+			       			if (this.count > 1 && this.count <= TIME_COUNT) {
+			         			this.count--
+			         			this.mobileCodeText = this.count +'s重新发送'
+			        		} else {
+				         		this.isMobileDisabled = false;
+				         		clearInterval(this.codeTime)
+				         		this.codeTime = null
+								this.mobileCodeText = '获取验证码'
+			        		}
+			       		},1000)
+			      	}
+				}).catch( res =>{
+					this.$util.msg(res.msg,2000);
+				})
+			},
+			getNewMobileCodeFn(){
+				let params = {
+						mobile:this.registerMobile,
+						activateCodeType:2,
+						platformType:2,
+						imgCode:this.imageCode,
+						token:this.imageCodetoken,
+				}
+				getMobileCode(params).then(res =>{
+					this.$util.msg('验证短信已发送',2000);
+					const TIME_COUNT = 60;
+			     	if (!this.codeTime) {
+			       		this.count = TIME_COUNT;
+			       		this.isNewMobileDisabled = true;
+			       		this.codeTime = setInterval(() => {
+			       			if (this.count > 1 && this.count <= TIME_COUNT) {
+			         			this.count--
+			         			this.newMobileCodeText = this.count +'s重新发送'
+			        		} else {
+				         		this.isNewMobileDisabled = false;
+				         		clearInterval(this.codeTime)
+				         		this.codeTime = 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
+				})
 			},
 			// 三级联动选择
 			showMulLinkageThreePicker() {
@@ -398,182 +461,129 @@
 				this.$refs.mpvueCityPicker.show()
 			},
 			onConfirm(e) {
-				// console.log('地址',e);
+				console.log('地址',e);
 				this.addressData.address = e.name;
-				this.addressData.townID = e.cityCode;	
+				this.addressData.townID = e.townCode;
+				this.addressData.cityID = e.cityCode;
+				this.addressData.provinceID = e.provinceCode;
 			},	
-			bindPickerChange(e) {
-				console.log('picker发送选择改变,携带值为:' + e.target.value)
-				this.current=0
-				this.isDepartment = false
-				this.typtIndex = e.target.value
-				this.isOrganizationType = e.target.value
-			},
-			radioChange(e) {
-				let _value = e.target.value
-				if( _value == '2' || _value == '3'){
-					this.isDepartment = true
-				}else{
-					this.isDepartment = false
-				}
-				for (let i = 0; i < this.beautyList.length; i++) {
-					if (this.beautyList[i].value === _value) {
-						this.current = i;
-						break;
-					}
-				}
-			},
-			chooseMaleLike(e){
-				let items = this.mentuzCampList
-				let	values = e.detail.value
-				for (var i = 0, lenI = items.length; i < lenI; ++i) {
-					const item = items[i]
-					if(values.indexOf(item.value) >= 0){
-						this.$set(item,'checked',true)
-					}else{
-						this.$set(item,'checked',false)
-					}
-				}
-			},
-			chooseMaleLikes(e){
-				let items = this.medicaCampList
-				let	values = e.detail.value
-				for (var i = 0, lenI = items.length; i < lenI; ++i) {
-					const item = items[i]
-					if(values.indexOf(item.value) >= 0){
-						this.$set(item,'checked',true)
-					}else{
-						this.$set(item,'checked',false)
-					}
-				}
-			},
 			onTextareaInput(e){
 			   this.addressData.addressDetail = e.detail.value;
-			   // console.log(this.addressData.addressDetail)
 			},
-			chooseBusinessImage() {
-				let self = this;
-				uni.chooseImage({
-					count: 1, //默认1
-					sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
-					sourceType: ['album','camera'], //从相册选择
-					success: (res) => {
-						const tempFilePaths = res.tempFilePaths;
-						const uploadTask = uni.uploadFile({
-							url : 'https://mall-b.caimei365.com/formData/MultiPictareaddData',
-							filePath: tempFilePaths[0],
-							name: 'file',
-							formData: {
-								'user': 'test'
-							},
-							success: function (data) {
-								console.log(data.data);
-								self.uploadBusinessImage = res.tempFilePaths
-							},
-							error : function(e){
-								 console.log(e);
-							}
-						})
-					},
-					
+			chooseBusinessImage() {//营业执照图片上传
+				uploadFileImage().then(res =>{
+					this.uploadBusinessImage = JSON.parse(res.data).data
 				})
 			},
-			chooseMentuzImage() {
-				let self = this;
-				uni.chooseImage({
-					count: 1, //默认1
-					sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
-					sourceType: ['album','camera'], //从相册选择
-					success: (res) => {
-						const tempFilePaths = res.tempFilePaths;
-						const uploadTask = uni.uploadFile({
-							url : 'https://mall-b.caimei365.com/formData/MultiPictareaddData',
-							filePath: tempFilePaths[0],
-							name: 'file',
-							formData: {
-								'user': 'test'
-							},
-							success: function (res) {
-								console.log(res.data);
-								self.uploadMentuzImage = res.data
-							},
-							error : function(e){
-								 console.log(e);
-							}
-						})
-					}
-				});
-			},
-			chooseMedicalImage() {
-				let self = this;
-				uni.chooseImage({
-					count: 1, //默认1
-					sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
-					sourceType: ['album','camera'], //从相册选择
-					success: (res) => {
-						const tempFilePaths = res.tempFilePaths;
-						const uploadTask = uni.uploadFile({
-							url : 'https://mall-b.caimei365.com/formData/MultiPictareaddData',
-							filePath: tempFilePaths[0],
-							name: 'file',
-							formData: {
-								'user': 'test'
-							},
-							success: function (res) {
-								console.log(res.data);
-								self.uploadMedicalImage = res.data
-							},
-							error : function(e){
-								 console.log(e);
-							}
-						})
-					}
-				});
+			chooseMentuzImage() {//门头照图片上传
+				uploadFileImage().then(res =>{
+					this.uploadMentuzImage = JSON.parse(res.data).data
+				})
 			},
-			viewMentuzImage(e) {
-				let self = this
-				let mentuzArray = []
-				mentuzArray.push(self.uploadMentuzImage)
-				uni.previewImage({
-					urls: mentuzArray,
-					current: 0
-				});
+			chooseMedicalImage() {//资质照图片上传
+				uploadFileImage().then(res =>{
+					this.uploadMedicalImage = JSON.parse(res.data).data
+				})
 			},
 			viewBusinessImage(e) {
-				let self = this
-				let businessArray = []
-				businessArray.push(self.uploadBusinessImage)
-				uni.previewImage({
-					urls: businessArray,
-					current: 0
-				});
+				this.myPreviewImageFn(this.uploadBusinessImage)
+			},
+			viewMentuzImage(e) {
+				this.myPreviewImageFn(this.uploadMentuzImage)
 			},
 			viewMedicalImage(e) {
-				let self = this
-				let medicalArray = []
-				medicalArray.push(self.uploadMedicalImage)
+				this.myPreviewImageFn(this.uploadMedicalImage)
+			},
+			myPreviewImageFn(url){
+				this.isPreviewImage = true
+				let mentuzArray = []
+				mentuzArray.push(url)
 				uni.previewImage({
-					urls: self.medicalArray,
+					urls: mentuzArray,
 					current: 0
 				});
 			},
 			delBusinessImage(){
-				this.$util.modal('提示','确定删除营业执照图片吗?',true,() =>{
+				this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
 					 this.uploadBusinessImage = ''
 				})
 			},
 			delMentuzImage(){
-				this.$util.modal('提示','确定删除门头照图片吗?',true,() =>{
+				this.$util.modal('','确定删除门头照图片吗?','确定','取消',true,() =>{
 					this.uploadMentuzImage = ''
 				})
 			},			
 			delMedicalImage(){
-				this.$util.modal('提示','确定删除资质图片吗?',true,() =>{
+				this.$util.modal('','确定删除资质图片吗?','确定','取消',true,() =>{
 					this.uploadMedicalImage = ''
 				})
 			},
+			bindPickerChange() {
+				let self = this
+				uni.showActionSheet({
+					title:'标题',
+					itemList: ['医美', '生美'],
+					success: (e) => {
+						self.isOrganizationType = e.tapIndex
+						switch(e.tapIndex){
+							case 0:
+								this.organizationTypeText = '医美'
+								break;
+							case 1:
+								this.organizationTypeText = '生美'
+								break;
+						}
+					}
+				})
+			
+			},
+			bindPickerChange2(e) {
+				console.log('picker携带值为:' + e.target.value)
+				this.typtIndex = e.target.value
+				this.isOrganizationType = e.target.value
+			},
+			radioChange(e) {
+				this.secondClubType = e.target.value;
+				if( this.secondClubType == '2' || this.secondClubType == '3'){
+					this.isDepartment = true
+				}else{
+					this.isDepartment = false
+				}
+				for (let i = 0; i < this.beautyList.length; i++) {
+					if (this.beautyList[i].value === this.secondClubType) {
+						this.current = i;
+						break;
+					}
+				}
+			},
+			chooseMaleLike(e){
+				this.mainpro = this.checkLikes(e,this.mentuzCampList)
+				console.log(this.mainpro)
+			},
+			chooseMaleLikes(e){
+				this.mainpro = this.checkLikes(e,this.medicaCampList)
+				console.log(this.mainpro)
+			},
+			checkLikes(e,list){
+				let items = list
+				let	values = e.detail.value
+				let arr = []
+				for (let i = 0, lenI = items.length; i < lenI; ++i) {
+					const item = items[i]
+					if(values.indexOf(item.value) >= 0){
+						this.$set(item,'checked',true)
+						arr.push(item.name)
+					}else{
+						this.$set(item,'checked',false)
+					}
+				}
+				return arr.toString()
+			},
 			agreeCheck() {
 				this.isCheck = !this.isCheck
+				if(this.isCheck){
+					this.isAgreed = 1
+				}
 			},
 			onBlurInput(e){//
 				if(e.detail.value ===''){
@@ -582,14 +592,11 @@
 					this.isDisabled = false
 				}
 			},
-			getEmailCode(){
-				this.isDisabled = true
-			},
 			showAustomItem() {
 				this.isShowAustomItem = !this.isShowAustomItem
 			},
 			addCustomItem(){
-				if(this.isOrganizationType == 1){
+				if(this.isOrganizationType == 0){
 					let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue}
 					this.mentuzCampList.push(item)
 				}else{
@@ -597,11 +604,18 @@
 					this.medicaCampList.push(item)
 				}
 			},
-			showTextarea() {
-				this.isCompanyPprofile = false
-			},
-			showCheckPhone(){
+			showCheckPhone(){//控制修改手机显隐
 				this.isShowCheckPhone = !this.isShowCheckPhone
+			},
+			steps(index) {//$attrstab切换
+				console.log(index)
+				this.tabCurrentIndex = index;
+			}
+		},
+		onShow() {
+			if(this.isPreviewImage){
+				this.isPreviewImage = false
+				return
 			}
 		}
 	}
@@ -689,6 +703,10 @@
 						&.none{
 							color: #999999;
 						}
+						&.picker{
+							text-align: left;
+							color: #999999;
+						}
 						&.keshi{
 							width: 550rpx;
 						}
@@ -704,17 +722,20 @@
 					&.btn{
 						width: 176rpx;
 						float: left;
+						background: $btn-confirm;
 						.row-input{
 							width: 176rpx;
 							padding: 0;
-							background: #F7F7F7;
-							text-align: center;
-						}
-						&.none{
+							color: #FFFFFF;
 							background: $btn-confirm;
-							.row-input{
-								color: #FFFFFF;
-								background: $btn-confirm;
+							text-align: center;
+							&.other{
+								width: 240rpx;
+								background: #F7F7F7;
+								margin-right: 20rpx;
+							}
+							&.none{
+								background: #F7F7F7;
 							}
 						}
 						&.disabled{
@@ -750,6 +771,7 @@
 						}
 						.row-radio{
 							float: left;
+							transform: scale(0.8);
 						}
 						.row-text{
 							width: 100rpx;

+ 14 - 11
pages/user-module/login-accont.vue

@@ -64,20 +64,20 @@
 						password:this.password,
 						source:'www',
 				}
-				organizationLogin(params).then(res =>{
-					if(res.code == '0' ){
-						this.storeUpdataeStatus(res.data)
-						this.$api.navigateTo(`/pages/user-module/bindwechat?data=${JSON.stringify(this.getOption)}&codeType=${res.code}`)
-					}else if(res.code == '4'){
-						this.storeUpdataeStatus(res.data)					
-						this.$api.navigateTo(`/pages/user-module/bindemail?data=${JSON.stringify(this.getOption)}&codeType=${res.code}`)
-					}else if(res.code == '-3'){
-						this.storeUpdataeStatus(res.data)
-						this.$util.modal('',res.msg,'前往修改',true,() =>{
+				organizationLogin(params).then(response =>{
+					if(response.code == '0' ){
+						this.storeUpdataeStatus(response.data)
+						this.$api.navigateTo(`/pages/user-module/bindwechat?data=${JSON.stringify(this.getOption)}&codeType=${response.code}`)
+					}else if(response.code == '4'){
+						this.storeUpdataeStatus(response.data)					
+						this.$api.navigateTo(`/pages/user-module/bindemail?data=${JSON.stringify(this.getOption)}&codeType=${response.code}`)
+					}else if(response.code == '-3'){
+						this.storeUpdataeStatus(response.data)
+						this.$util.modal('',response.msg,'前往修改','',false,() =>{
 							 this.$api.navigateTo('/pages/user-module/apply')
 						})
 					}else{
-						this.$util.msg(res.msg,2000);
+						this.$util.msg(response.msg,2000);
 					}
 				})
 			},
@@ -95,6 +95,9 @@
 			passwordClick() { //密码显隐操作
 				this.isShowEye = !this.isShowEye;
 			},
+		},
+		onShow() {
+		
 		}
 	}
 </script>

+ 25 - 28
pages/user-module/login.vue

@@ -42,6 +42,7 @@
 <script>
 	import { mapMutations } from 'vuex';
 	import authorize from '@/common/config/authorize.js' 
+	import { invitationCodeLogin  } from '@/api/use.js'
 	var self;
 	export default{
 		data() {
@@ -75,38 +76,34 @@
 		methods:{
 			...mapMutations(['login']),
 			goLogin() {
-				self.$api.get('/login/isEnabled',{userOrganizeID:self.userOrganizeID,invitationCode:self.invitationCode}, res => {
-					if (res.code == "1") {
-						//查看此微信用户是否已经授权过
-						authorize.getSetting().then(res =>{
-							// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-							if(res == 2){
-								self.isUserInfo = true
-							}else{
-								self.isUserInfo = false
-								self.wxGetUserInfo()
-							}
-						})
-					}else if(res.code =='0'){
-						self.toestText ='请输入邀请码';
-						self.alertText ='邀请码';
-						self.telPhone = res.msg;
-						self.isToast = true;
-					}else if(res.code =='-2'){
-						self.toestText ='邀请码已失效';
-						self.alertText ='新邀请码';
-						self.telPhone = res.msg;
-						self.isToast = true;
+				invitationCodeLogin({invitationCode:this.invitationCode}).then(response =>{
+					//查看此微信用户是否已经授权过
+					authorize.getSetting().then(res =>{
+						// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
+						if(res == 2){
+							this.isUserInfo = true
+						}else{
+							this.isUserInfo = false
+							this.wxGetUserInfo()
+						}
+					})
+				}).catch(response =>{
+					if(res.code =='-2'){
+						this.toestText ='邀请码已失效';
+						this.alertText ='新邀请码';
+						this.telPhone = res.msg;
+						this.isToast = true;
 					}else if(res.code =='-3'){
-						self.toestText ='邀请码已被使用';
-						self.alertText ='新邀请码';
-						self.telPhone = res.msg;
-						self.isToast = true;
+						this.toestText ='邀请码已被使用';
+						this.alertText ='新邀请码';
+						this.telPhone = res.msg;
+						this.isToast = true;
 					}else{
-						uni.showToast({icon:'none', title: res.msg, duration: 3000});
-						self.isUserInfo = false
+						this.$util.msg(response.msg,2000)
+						this.isUserInfo = false
 					}
 				})
+				
 			},
 			//授权登录 
 			getuserinfo: function (e) {

+ 65 - 39
pages/user-module/register.vue

@@ -123,7 +123,7 @@
 							:class="isShowInput ? '':''"
 				/>
 			</view>
-			<view class="register-row clearfix">
+			<view class="register-row clearfix" >
 				<view class="register-from">
 					<view class="label">营业执照编号:</view>
 					<input class="row-input" type="text" v-model="socialCreditCode" placeholder="请填写社会统一信用代码" maxlength="16"/>
@@ -160,13 +160,14 @@
 			<view class="register-row clearfix">
 				<view class="register-from picker">
 					<view class="label">机构类型:</view>
-					<picker @change="bindPickerChange" :value="index" :range="organizationTypeList" range-key="name">
+						<view class="row-input picker" @click="bindPickerChange">{{ organizationTypeText }}</view>
+<!-- 					<picker @change="bindPickerChange" :value="index" :range="organizationTypeList" range-key="name">
 						<view class="row-input" :class="[isOrganizationType == 0 ? 'none' : '']">{{organizationTypeList[typtIndex].name}}</view>
-					</picker>
+					</picker> -->
 					<text class="iconfont icon-xiayibu"></text>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 1">
+			<view class="register-row clearfix" v-if="isOrganizationType == 0" >
 				<view class="register-from radio">
 					<radio-group @change="radioChange">
 						<label class="row-input" v-for="(item, index) in beautyList" :key="item.value">
@@ -176,13 +177,13 @@
 					</radio-group>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-show="isDepartment">
+			<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="department" placeholder="请填写经营的科室,至少三个,用逗号隔开" maxlength="16"/>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 1">
+			<view class="register-row clearfix" v-if="isOrganizationType == 0">
 				<view class="register-picture">
 					<view class="label zz">医疗执业许可证:</view>
 					<view class="upload-picture">
@@ -196,7 +197,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 1">
+			<view class="register-row clearfix" v-if="isOrganizationType == 0">
 				<view class="register-from group">
 					<view class="label">主营内容:</view>
 					<checkbox-group class="content-class" @change="chooseMaleLike" >
@@ -215,9 +216,9 @@
 				</view>
 				<view class="register-from group btn" v-show="isShowAustomItem">
 					<view class="content-class btn">
-						<input class="row-input none" type="text" v-model="customItemValue" placeholder="请输入自定义项目"  @blur="onBlurInput" maxlength="5"/>
+						<input class="row-input other" type="text" v-model="customItemValue" placeholder="请输入自定义项目"  @blur="onBlurInput" maxlength="5"/>
 						<button type="default" 
-								class="confirm-btn" 
+								class="confirm-btn other" 
 								:class="[isDisabled === true ? 'disabled' : 'none']" 
 								:disabled="isDisabled"
 								@click.stop="addCustomItem"
@@ -225,7 +226,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 2">
+			<view class="register-row clearfix" v-if="isOrganizationType == 1">
 				<view class="register-from group">
 					<view class="label">主营内容:</view>
 					<checkbox-group class="content-class" @change="chooseMaleLikes">
@@ -244,7 +245,7 @@
 				</view>
 				<view class="register-from group btn" v-show="isShowAustomItem">
 					<view class="content-class btn">
-						<input class="row-input none" type="text" v-model="customItemValue" placeholder="请输入自定义项目"  @blur="onBlurInput" maxlength="5"/>
+						<input class="row-input other" type="text" v-model="customItemValue" placeholder="请输入自定义项目"  @blur="onBlurInput" maxlength="5"/>
 						<button type="default" 
 								class="confirm-btn" 
 								:class="[isDisabled === true ? 'disabled' : 'none']" 
@@ -284,23 +285,21 @@
 <script>
 	import { mapMutations } from 'vuex';
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
-	import uniTag from '@/components/uni-tag/uni-tag.vue';
 	import authorize from '@/common/config/authorize.js' 
 	import { organizationRegister , organizationVerifyRegisterFirst ,organizationVerifyRegisterTwo } from "@/api/use.js"
 	import { getImageCode, getEmailCode, getMobileCode, uploadFileImage } from "@/api/utils.js"
 	var self;
 	export default{
 		components:{
-			uniTag,
 			mpvueCityPicker
 		},
 		data() {
 			return{
 				tabCurrentIndex:1,	
-				isPreviewImage:false,   //预览图片开关
-				isEmialDisabled: false,	//验证码按钮控制
+				isPreviewImage:false,   	//预览图片开关
+				isEmialDisabled: false,		//验证码按钮控制
 				isMobileDisabled: false,	//手机验证码按钮控制
-			    count: '',				//倒计时
+			    count: '',					//倒计时
 			    emailCodeText: '获取验证码',
 			    mobileCodeText: '获取验证码',
 			    codeTime: null,
@@ -320,20 +319,16 @@
 				isAgreed:0,				//是否勾选协议
 				isDisabled:true,
 				isShowInput:false,
-				isCheck:false,			//是否全选
-				uploadBusinessImage:'',//营业执照图片
-				uploadMentuzImage:'',  //门头照图片
-				uploadMedicalImage:'', //资质照图片
+				isCheck:false,			//是否勾选协议
+				uploadBusinessImage:'',	//营业执照图片
+				uploadMentuzImage:'',  	//门头照图片
+				uploadMedicalImage:'', 	//资质照图片
 				department:'',			//科室
 				isDepartment:false,     //是否显示科室
 				secondClubType:'',		//机构类型二级分类
 				mainpro:'',				//主营内容
-				isOrganizationType:0,
-				organizationTypeList:[
-					{name:'请选择机构类型',value:0},
-					{name:'医美',value:1},
-					{name:'生美',value:2}
-				],
+				isOrganizationType:3,
+				organizationTypeText:'请选择机构类型',
 				beautyList:[{value:'1',name:'诊所'},{value:'2',name:'门诊'},{value:'3',name:'医院'}],
 				mentuzCampList:[{value:'1',name:'整形'},{value:'2',name:'轻医美'},{value:'3',name:'皮肤科'}],
 				medicaCampList:[
@@ -362,15 +357,9 @@
 		},
 		onLoad(option) {
 			console.log(option)
-			self = this;
-			self.registerType = option.type;
-			self.id = option.id
-			if(option.listType) {
-				self.listType = option.listType;
-				self.listVal = option.listVal;
-			}
 		},
 		methods:{
+			
 			registerStepsfirst(){
 				let params ={
 						email:this.registerEmail,
@@ -420,7 +409,7 @@
 						socialCreditCode:this.socialCreditCode,
 						businessLicenseImage:this.uploadBusinessImage,
 						headpic:this.uploadMentuzImage,
-						firstClubType:this.isOrganizationType, //机构类型分类 医美:1和生美:2
+						firstClubType:this.isOrganizationType, //机构类型分类 医美:0和生美:1
 						secondClubType:this.secondClubType,	//机构类型二级分类 诊所:1,门诊:2,医院:3
 						department:this.department,			//科室
 						medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
@@ -543,15 +532,40 @@
 				});
 			},
 			delBusinessImage(){
-				this.uploadBusinessImage = ''
+				this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
+					 this.uploadBusinessImage = ''
+				})
 			},
 			delMentuzImage(){
-				this.uploadMentuzImage = ''
+				this.$util.modal('','确定删除门头照图片吗?','确定','取消',true,() =>{
+					this.uploadMentuzImage = ''
+				})
 			},			
 			delMedicalImage(){
-				this.uploadMedicalImage = ''
+				this.$util.modal('','确定删除资质图片吗?','确定','取消',true,() =>{
+					this.uploadMedicalImage = ''
+				})
 			},
-			bindPickerChange(e) {
+			bindPickerChange() {
+				let self = this
+				uni.showActionSheet({
+					title:'标题',
+					itemList: ['医美', '生美'],
+					success: (e) => {
+						self.isOrganizationType = e.tapIndex
+						switch(e.tapIndex){
+							case 0:
+								this.organizationTypeText = '医美'
+								break;
+							case 1:
+								this.organizationTypeText = '生美'
+								break;
+						}
+					}
+				})
+			
+			},
+			bindPickerChange2(e) {
 				console.log('picker携带值为:' + e.target.value)
 				this.typtIndex = e.target.value
 				this.isOrganizationType = e.target.value
@@ -610,7 +624,7 @@
 				this.isShowAustomItem = !this.isShowAustomItem
 			},
 			addCustomItem(){
-				if(this.isOrganizationType == 1){
+				if(this.isOrganizationType == 0){
 					let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue}
 					this.mentuzCampList.push(item)
 				}else{
@@ -725,6 +739,10 @@
 						&.none{
 							color: #999999;
 						}
+						&.picker{
+							text-align: left;
+							color: #999999;
+						}
 						&.keshi{
 							width: 550rpx;
 						}
@@ -794,6 +812,11 @@
 							color: #FFFFFF;
 							background: $btn-confirm;
 							text-align: center;
+							&.other{
+								width: 240rpx;
+								background: #F7F7F7;
+								margin-right: 20rpx;
+							}
 							&.none{
 								background: #F7F7F7;
 							}
@@ -891,6 +914,9 @@
 							border-radius: 10rpx;
 							line-height: 88rpx;
 							text-align: center;
+							&.other{
+								width: 213rpx;
+							}
 							&.none{
 								color: #FFFFFF;
 								background: $btn-confirm;

+ 38 - 54
pages/user/address/address.vue

@@ -50,6 +50,7 @@
 <script>
 	import authorize from '@/common/config/authorize.js'	
 	import modelAlert from '@/components/module/modelAlert/modelAlert.vue'
+	import { queryAddressList , deleteNewAddress } from '@/api/cart.js'
 	export default {
 		components:{
 			modelAlert
@@ -59,17 +60,14 @@
 				isSelect:false,
 				isEmpty:false,
 				isLoadMore:false,
-				alertText:'确定要删除该地址?',
 				userID:'',
 				pageNum:1,
 				pageSize:10,
 				addressList: [],
 				hasNextPage:false,
 				allowDataStatus:true,
-				isShowDelModal:false,
 				wrapperHeight:'100%',
 				scrollHeight:'',
-				deleteAddressId:'',
 				currPage:'',//当前页面
 				prevPage:''//上一个页面
 			}
@@ -85,8 +83,7 @@
 			}
 		},
 		methods: {
-			setScrollHeight() {
-				// 窗口高度 - 底部距离
+			setScrollHeight() {	// 窗口高度 - 底部距离
 				setTimeout(()=> {
 					const query = wx.createSelectorQuery().in(this);
 					query.selectAll('.add-btn').boundingClientRect();
@@ -100,26 +97,24 @@
 				}, 500)
 			},
 			initAddressList(){	
-				this.$api.getStorage().then((resolve) =>{
-					this.userID = resolve.userID
-					this.$api.get('/personal/findAddress',{index:this.pageNum,pageSize:this.pageSize,userID:this.userID},
-						response => {
-							if(response.results == ''){
-								this.isEmpty = true
-							}else{
-								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;
-								}
-							}
+				let params = {index:this.pageNum,pageSize:this.pageSize,userID:this.userID}
+				queryAddressList(params).then(response =>{
+					if(response.results == ''){
+						this.isEmpty = true
+					}else{
+						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;
 						}
-					)
+					}
+				}).catch(response =>{
+					this.$util.msg(res.msg,2000)
 				})
 			},
 			//选择地址
@@ -140,38 +135,27 @@
 			//删除收货地址
 			deleteAddress(id){
 				console.log('删除地址的ID',id)
-				this.isShowDelModal = true;
-				this.deleteAddressId =id;
-			},
-			confirmDetele(){
-				authorize.getCode('weixin').then(wechatcode =>{
-					this.$api.get('/personal/delete?code='+`${wechatcode}`,{addressID:this.deleteAddressId,userOrganizeID:this.userOrganizeID},
-						response => {
-							if(response.code==1){
-								uni.showToast({
-									icon: 'none',
-									title: response.msg,
-									duration: 2000
-								})
-								this.isShowDelModal = false;
-								this.pageNum = 1;
-								this.addressList = [];
-								this.initAddressList();
-							}else{
-								this.$util.msg(response.msg,3000);
-								this.isShowDelModal = false;
-								setTimeout(function(){
-									uni.switchTab({
-										url:'/pages/tabBar/home/home'
-									})
-								},1000)
-							}
-						}
-					)
-				})	
-			},
+				this.$util.modal('','确定要删除该地址?','确定删除',true,() =>{
+					deleteNewAddress({addressID:id,userID:resolve.userID}).then(response =>{
+						this.$util.msg(response.msg,2000)
+						this.pageNum = 1;
+						this.addressList = [];
+						this.initAddressList();
+					}).catch(response =>{
+						this.$util.msg(response.msg,2000);
+						setTimeout(function(){
+							uni.switchTab({
+								url:'/pages/tabBar/home/home'
+							})
+						},1000)
+					})
+				})
+			}
 		},
 		onShow() {
+			this.$api.getStorage().then((resolve) =>{
+				this.userID = resolve.userID
+			})
 			this.pageNum = 1;
 			this.addressList = [];
 			this.initAddressList();

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

@@ -45,6 +45,7 @@
 <script>	
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
 	import authorize from '@/common/config/authorize.js'	
+	import { addNewAddress } from '@/api/cart.js'
 	export default {
 		components:{
 			mpvueCityPicker
@@ -139,26 +140,19 @@
 				}
 			},
 			postAddressData(res){
-				let self = this;
-				self.btnText(true)
-				authorize.getCode('weixin').then(wechatcode =>{
-					self.$api.post('/personal/save?code='+`${wechatcode}`,JSON.stringify(res),
-						response => {
-							if(response.code==1){
-								self.$util.msg(response.msg,3000);
-								self.btnText(false)
-								uni.navigateBack();
-							}else{
-								self.$util.msg(response.msg,3000);
-								setTimeout(function(){
-									uni.switchTab({
-										url:'/pages/tabBar/home/home'
-									})
-								},1000)
-							}
-						}
-					)
-				})	
+				this.btnText(true)
+				addNewAddress(res).then( response=>{
+					this.$util.msg(response.msg,3000);
+					this.btnText(false)
+					uni.navigateBack();
+				}).catch(response =>{
+					this.$util.msg(response.msg,3000);
+					setTimeout(function(){
+						uni.switchTab({
+							url:'/pages/tabBar/home/home'
+						})
+					},1000)
+				})
 			},
 			btnText(flg){
 				if(flg){

+ 35 - 62
pages/user/operator/list.vue

@@ -17,7 +17,7 @@
 					</view>
 				</view>
 				<view class="search-wrap">
-					<button class="search-btn" type="default">搜索</button>
+					<button class="search-btn" type="default" @click.stop="searchOpertor">搜索</button>
 				</view>
 			</view>
 		</view>
@@ -70,17 +70,13 @@
 				<view class="btn" v-if="modelData.status != '2'" @click.stop="updateInvitationCode">更新邀请码</view>
 			</view>
 		</view>
-		<!-- 删除弹窗 -->
-		<model-alert v-if="isShowDelModal"
-					 :alertText='alertText' 
-					 @btnConfirm ='confirmDetele'>
-		</model-alert>
 	</view>
 </template>
 
 <script>
 	import authorize from '@/common/config/authorize.js'	
 	import modelAlert from '@/components/module/modelAlert/modelAlert.vue'
+	import { queryOperatorList, deleteOperator , updateCode } from "@/api/operator.js"
 	export default {
 		components:{
 			modelAlert
@@ -98,7 +94,6 @@
 				addressList: [],
 				hasNextPage:false,
 				allowDataStatus:true,
-				isShowDelModal:false,
 				wrapperHeight:'100%',
 				scrollHeight:'',
 				deleteAddressId:'',
@@ -176,27 +171,27 @@
 					})
 				}, 500)
 			},
+			searchOpertor(){
+				this.initAddressList()
+			},
 			initAddressList(){	
-				this.$api.getStorage().then((resolve) =>{
-					this.userID = resolve.userID
-					this.$api.get('/personal/findAddress',{index:this.pageNum,pageSize:this.pageSize,userID:this.userID},
-						response => {
-							if(response.results == ''){
-								this.isEmpty = true
-							}else{
-								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;
-								}
-							}
+				queryOperatorList({status:2,pageNum:this.pageNum,pageSize:this.pageSize}).then(response =>{
+					if(response.results == ''){
+						this.isEmpty = true
+					}else{
+						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;
 						}
-					)
+					}
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000);
 				})
 			},		
 			showOperatorModel(item){
@@ -209,46 +204,24 @@
 			},
 			deleteOperator(id){//删除运营人员
 				console.log('删除地址的ID',id)
-				this.$util.modal('提示','确定删除运营人员吗?',true,() =>{
-					this.$util.msg('删除成功',3000);
-					this.isOperatorModel = false
+				this.$util.modal('','确定删除运营人员吗?','确定删除','取消',true,() =>{
+					deleteOperator({id:id}).then(response =>{
+						this.$util.msg('删除成功',2000);
+					}).catch(response =>{
+						this.$util.msg(response.msg,2000);
+					})
 				})
-				// this.isShowDelModal = true;
-				// this.deleteAddressId =id;
 			},
-			updateInvitationCode(){	//更新邀请码	
-				this.$util.modal('提示','确定更新邀请码并发送给运营人员?',true,() =>{
-					this.$util.msg('更新邀请码成功',3000);
-					this.isOperatorModel = false
+			updateInvitationCode(item){	//更新邀请码	
+				this.$util.modal('','确定更新邀请码并发送给运营人员?','确定更新','取消',true,() =>{
+					updateCode({id:item.id,status:item.status}).then(response =>{
+						this.$util.msg('更新邀请码成功',2000);
+						this.isOperatorModel = false
+					}).catch(response =>{
+						this.$util.msg(response.msg,2000);
+					})
 				})
 			},
-			confirmDetele(){
-				authorize.getCode('weixin').then(wechatcode =>{
-					this.$api.get('/personal/delete?code='+`${wechatcode}`,{addressID:this.deleteAddressId,userOrganizeID:this.userOrganizeID},
-						response => {
-							if(response.code==1){
-								uni.showToast({
-									icon: 'none',
-									title: response.msg,
-									duration: 2000
-								})
-								this.isShowDelModal = false;
-								this.pageNum = 1;
-								this.addressList = [];
-								this.initAddressList();
-							}else{
-								this.$util.msg(response.msg,3000);
-								this.isShowDelModal = false;
-								setTimeout(function(){
-									uni.switchTab({
-										url:'/pages/tabBar/home/home'
-									})
-								},1000)
-							}
-						}
-					)
-				})	
-			},
 			rexpStautsText(status) {
 			      let text = ''
 			      switch (status) {

+ 1 - 1
pages/user/order/order-details.vue

@@ -149,7 +149,7 @@
 							this.returnedPurchaseFee = resData.order.returnedPurchaseFee
 							this.freightData = {freePostFlag:resData.order.freePostFlag,cellPhone:resData.cellPhone}
 						}else{
-							this.$util.modal('提示',response.msg,false,() =>{
+							this.$util.modal('提示',response.msg,'确定','',false,() =>{
 								 uni.navigateBack({data:1})
 							})
 						}

+ 2 - 2
pages/user/order/orderShareLogin.vue

@@ -56,8 +56,8 @@
 									this.$api.redirectTo(`/pages/user/order/order-sharedetails?orderID=${this.orderID}`)
 								}
 							}else if(response.code === "-2"){
-								this.$util.modal('提示',response.msg,false,() =>{
-									 this.$api.switchTabTo('/pages/tabBar/home/home');
+								this.$util.modal('提示',response.msg,'确定','',false,() =>{
+									 this.$api.switchTabTo('/pages/tabBar/home/home')
 								})
 							}else{
 								this.isShareStatus = true