Selaa lähdekoodia

机构用户类型优化

zhengjinyi 5 vuotta sitten
vanhempi
commit
be3513a758

+ 0 - 28
api/seller.js

@@ -56,34 +56,6 @@ export function getSellerHome(params) {
  */
 export function sellerClubRegister(params) {
 	return new Promise(function(resolve,reject) {
-		if( params.email == ''){
-			uni.showToast({title: '请输入邮箱地址',duration: 2000,mask:true, icon:'none'})
-			return
-		}
-		if(!$reg.isEmail(params.email)){
-			uni.showToast({title: '请输入正确的邮箱地址',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if( params.name == ''){
-			uni.showToast({title: '请输入机构名称',duration: 2000,mask:true, icon:'none'})
-			return
-		}
-		if( params.linkMan1 == ''){
-			uni.showToast({title: '请输入联系人名称',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if( params.bindMobile == ''){
-			uni.showToast({title: '请输入手机号',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if(!$reg.isMobile(params.bindMobile)){
-			uni.showToast({title: '手机格式不正确',duration: 2000,mask:true,icon:'none'})
-			return
-		}		
-		if(params.isAgreed == 0){
-			uni.showToast({title: '请勾选同意协议',duration: 2000,mask:true,icon:'none'})
-			return
-		}
 		request.post('/seller/club/register',params,true,res => {
 			if(res.code == 0){
 				resolve(res)

+ 59 - 52
api/use.js

@@ -8,23 +8,27 @@ import request from '@/common/config/caimeiApi.js'
 import $reg from '@/common/config/common.js'
 
 /**
- *机构注册第一步校验
+ *机构普通注册
  */
 export function organizationVerifyRegisterFirst(params) {
 	return new Promise(function(resolve,reject) {
-		if( params.email == ''){
-			uni.showToast({title: '请输入邮箱地址',duration: 2000,mask:true, icon:'none'})
+		if( params.userName == ''){
+			uni.showToast({title: '请输入联系人名称',duration: 2000,mask:true,icon:'none'})
 			return
 		}
-		if(!$reg.isEmail(params.email)){
-			uni.showToast({title: '请输入正确的邮箱地址',duration: 2000,mask:true,icon:'none'})
+		if( params.bindMobile == ''){
+			uni.showToast({title: '请输入手机号',duration: 2000,mask:true,icon:'none'})
 			return
 		}
-		if( params.mailboxCode == ''){
-			uni.showToast({title: '请输入邮箱验证码',duration: 2000,mask:true,icon:'none'})
+		if(!$reg.isMobile(params.bindMobile)){
+			uni.showToast({title: '手机格式不正确',duration: 2000,mask:true,icon:'none'})
 			return
 		}
-		if(!$reg.isEmailCode(params.mailboxCode)){
+		if( params.activationCode == ''){
+			uni.showToast({title: '请输入手机验证码',duration: 2000,mask:true,icon:'none'})
+			return
+		}
+		if(!$reg.isMobileCode(params.activationCode)){
 			uni.showToast({title: '验证码格式不正确',duration: 2000,mask:true,icon:'none'})
 			return
 		}
@@ -44,45 +48,11 @@ export function organizationVerifyRegisterFirst(params) {
 			uni.showToast({title: '两次输入的密码不一致',duration: 2000,mask:true,icon:'none'})
 			return
 		}
-		request.post('/club/verifyRegister',params,true,res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- *机构注册第二步校验
- */
-export function organizationVerifyRegisterTwo(params) {
-	return new Promise(function(resolve,reject) {
-		if( params.name == ''){
-			uni.showToast({title: '请输入机构名称',duration: 2000,mask:true, icon:'none'})
-			return
-		}
-		if( params.linkMan1 == ''){
-			uni.showToast({title: '请输入联系人名称',duration: 2000,mask:true,icon:'none'})
+		if(params.isAgreed == 0){
+			uni.showToast({title: '请勾选同意协议',duration: 2000,mask:true,icon:'none'})
 			return
 		}
-		if( params.bindMobile == ''){
-			uni.showToast({title: '请输入手机号',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if(!$reg.isMobile(params.bindMobile)){
-			uni.showToast({title: '手机格式不正确',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if( params.activationCode == ''){
-			uni.showToast({title: '请输入手机验证码',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if(!$reg.isMobileCode(params.activationCode)){
-			uni.showToast({title: '验证码格式不正确',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		request.post('/club/verifyRegister',params,true,res => {
+		request.post('/club/common',params,true,res => {
 			if(res.code == 0){
 				resolve(res);
 			}else{
@@ -95,12 +65,8 @@ export function organizationVerifyRegisterTwo(params) {
  *机构注册提交审核
  */
 export function organizationRegister(params) {
-	if(params.isAgreed!=1){
-		uni.showToast({title: '请勾选协议',duration: 2000,mask:true,icon:'none'})
-		return
-	}
 	return new Promise(function(resolve,reject) {
-		request.post('/user/club/clubRegister',params,true, res => {
+		request.post('/club/upgrade',params,true, res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{
@@ -160,7 +126,11 @@ export function organizationUpdate(params) {
 export function organizationLogin(params) {
 	return new Promise(function(resolve,reject) {
 		request.post('/user/login',params,true, res => {
-			resolve(res)
+			if(res.code == 0){
+				resolve(res)
+			}else{
+				reject(res)
+			}
 		})
 	})
 }		
@@ -370,4 +340,41 @@ export function emailPassword(params) {
 		})
 	})
 }
-
+/**
+ *跟换手机号
+ */
+export function changeMobile(params) {
+	return new Promise(function(resolve,reject) {
+		if( params.contractMobile == ''){
+			uni.showToast({title: '请输入新的手机号码',duration: 2000,mask:true,icon:'none'})
+			return
+		}
+		if(!$reg.isMobile(params.contractMobile)){
+			uni.showToast({title: '请输入正确的手机号码',duration: 2000,mask:true,icon:'none'})
+			return
+		}
+		if( params.mobileCode == ''){
+			uni.showToast({title: '请输入旧手机验证码',duration: 2000,mask:true,icon:'none'})
+			return
+		}
+		if(!$reg.isMobileCode(params.mobileCode)){
+			uni.showToast({title: '旧手机验证码格式不正确',duration: 2000,mask:true,icon:'none'})
+			return
+		}
+		if( params.newMobileCode == ''){
+			uni.showToast({title: '请输入新手机验证码',duration: 2000,mask:true,icon:'none'})
+			return
+		}
+		if(!$reg.isMobileCode(params.newMobileCode)){
+			uni.showToast({title: '新手机验证码格式不正确',duration: 2000,mask:true,icon:'none'})
+			return
+		}
+		request.post('/club/changeMobile',params,true, res => {
+			if(res.code == 0){
+				resolve(res)
+			}else{
+				reject(res)
+			}
+		})
+	})
+}

+ 1 - 1
api/utils.js

@@ -149,7 +149,7 @@ export function uploadFileImage() {
 			success: (res) => {
 				const tempFilePaths = res.tempFilePaths;
 				const uploadTask = uni.uploadFile({
-					url : requestUrl+'/formData/MultiPictareaddData',
+					url : 'https://spi-b.caimei365.com/formData/MultiPictareaddData',
 					filePath: tempFilePaths[0],
 					name: 'file',
 					header: {

+ 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.26:8008'	 //超超联调地址
-    URL_CONFIG = 'https://spi-b.caimei365.com'//采美测试地址
+    // URL_CONFIG = 'https://spi-b.caimei365.com'//采美测试地址
 }else{
     // 生产环境
     URL_CONFIG = 'https://spi.caimei365.com'

+ 5 - 1
common/css/iconfont.scss

@@ -4,7 +4,7 @@
 	font-family: iconfont;
 	font-weight: normal;
 	font-style: normal;
-	src: url('https://at.alicdn.com/t/font_1519039_22khhigq2s1.ttf') format('truetype');
+	src: url('https://at.alicdn.com/t/font_1519039_d70s0ku7d2e.ttf') format('truetype');
 }
 .iconfont {
 	font-family: "iconfont" !important;
@@ -13,6 +13,10 @@
 	-webkit-font-smoothing: antialiased;
 	-moz-osx-font-smoothing: grayscale;
 }
+.icon-xiangshangjiantou:before {
+  content: "\e661";
+}
+
 .icon-dingdanxuanzhong:before {
   content: "\e6c2";
 }

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

@@ -9,12 +9,12 @@
 						<text class="list-details-title">{{item.name}}</text>
 						<text class="list-details-specs">规格:{{item.unit}}</text>
 						<text class="list-details-miniQuantity">起订量:{{item.ladderPriceFlag == '1' ? item.maxBuyNumber : item.minBuyNumber}}</text>
-						<view class="list-details-price" v-if="item.price1TextFlag == 1">
+<!-- 						<view class="list-details-price" v-if="item.price1TextFlag == 1">
 							<view class="list-none">
 								<view class="price-small">未公开价格</view>
 							</view>
-						</view>
-						<view class="list-details-price" v-else>
+						</view> -->
+						<view class="list-details-price">
 							<view class="list-shop">
 								<view class="list-price" >
 									<text class="price-view activity" v-if="item.isShowActFlg">活动价</text>

+ 20 - 7
components/cm-module/listTemplate/commodityList.vue

@@ -9,16 +9,27 @@
 					<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="!hasLogin" class="list-login-now">
+						<view v-if="hasLogin"class="list-price">
+							<view v-if="userIdentity == 1">
+								<text>¥<text class="price-larger">{{item.retailPrice?item.retailPrice.toFixed(2):'0.00'}}</text></text>
+							</view>	
+							<view v-if="userIdentity == 4">
+								<view class="price-larger" v-if="item.price1TextFlag == '1' || item.price1TextFlag == '2'">
+									<text class="txt">未公开价格</text>
+								</view>
+								<text v-else>¥<text class="price-larger">{{item.retailPrice?item.retailPrice.toFixed(2):'0.00'}}</text></text>
+							</view>
+							<view v-else>
+								<view class="price-larger" v-if="item.price1TextFlag == '1'">
+									<text class="txt">未公开价格</text>
+								</view>
+								<text v-else>¥<text class="price-larger">{{item.retailPrice?item.retailPrice.toFixed(2):'0.00'}}</text></text>
+							</view>
+						</view>	
+						<view  class="list-login-now"  v-else>
 							<text class="p-no">价格:</text>
 							<uni-stars :stars="parseInt(item.price1Grade)" :font-size='36' :width-info="180"></uni-stars>
 						</view>
-						<view class="list-price" v-else>
-							<view class="price-larger" v-if="item.price1TextFlag == '1'">
-								<text class="txt">未公开价格</text>
-							</view>
-							<text v-else>¥<text class="price-larger">{{item.retailPrice?item.retailPrice.toFixed(2):'0.00'}}</text></text>
-						</view>
 						<button v-if="fromRegularPurchasePage" class="add-cart-btn" @click.stop="operationHanld(item)">选择数量</button>
 					</view>
 				</view>
@@ -74,6 +85,7 @@
 				showSkeleton: true,
 				showEmpty: false,
 				userID: '',
+				userIdentity:'',
 				scrollHeight: '',
 				commodityList: [],
 				showLoading: false,
@@ -118,6 +130,7 @@
 			getListFromServer(loadMore) {
 				this.$api.getStorage().then((resolve) =>{
 					this.userID = resolve.userID ? resolve.userID : '';
+					this.userIdentity = resolve.userIdentity
 					this.getQueryGoodslist(loadMore)
 				}).catch(error =>{
 					this.getQueryGoodslist(loadMore)

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

@@ -29,12 +29,12 @@
 						<text class="list-details-title">{{item.name}}</text>
 						<text class="list-details-specs">规格:{{item.unit?item.unit:''}}</text>
 						<text class="list-details-miniQuantity">起订量:{{item.minBuyNumber}}</text>
-						<view class="list-details-price" v-if="item.price1TextFlag == 1">
+<!-- 						<view class="list-details-price" v-if="item.price1TextFlag == 1">
 							<view class="list-none">
 								<view class="price-small">未公开价格</view>
 							</view>
-						</view>
-						<view class="list-details-price" v-else>
+						</view> -->
+						<view class="list-details-price">
 							<view class="list-shop">
 								<view class="list-price" >
 									<text class="price-view activity" v-if="item.isShowActFlg">活动价</text>

+ 8 - 11
components/seller/home.vue

@@ -71,10 +71,7 @@
 									<text class="mclap">{{item.name}}</text>
 								</view>
 								<view class="" v-if="hasLogin">
-									<view class="title-none" v-if="item.price1TextFlag == '1'">
-										<text class="p big">未公开价格</text>
-									</view>
-									<view class="price tui-skeleton-rect" v-else>
+									<view class="price tui-skeleton-rect">
 										<text class="p sm">¥</text>
 										<text class="p big">{{item.retailPrice.toFixed(2)}}</text>
 									</view>
@@ -169,11 +166,11 @@
 				skeletonShow: true,
 				organizeProducts:[],//常用商品
 				productsClassifyList:[
-					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/icon-vip%403x.png',classifyName:'采美采购'},
-					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/icon-vip%403x.png',classifyName:'采美采购'},
-					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/icon-vip%403x.png',classifyName:'采美采购'},
-					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/icon-vip%403x.png',classifyName:'采美采购'},
-					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/icon-vip%403x.png',classifyName:'采美采购'}
+					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'},
+					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'},
+					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'},
+					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'},
+					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'}
 				],//分类导航
 				firstModulesName:'https://img.caimei365.com/group1/M00/03/8C/Cmis215XHXSAAZU0AACaPrfbB8I435.png', //优惠模块1
 				secondModulesName:'', //优惠模块2
@@ -181,8 +178,8 @@
 				secondModulesImage:'',//优惠模块icon2
 				thirdModulesName:'', //优惠模块3
 				navInforList:[
-					{text:'会员中心',icon:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/icon-vip%403x.png'},
-					{text:'在线客服',icon:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/icon-kefu%403x.png'}
+					{text:'会员中心',icon:'https://img.caimei365.com/group1/M00/03/9E/Cmis216iRzOAEGPnAAA4hM3shV4061.png'},
+					{text:'在线客服',icon:'https://img.caimei365.com/group1/M00/03/9E/Cmis216iRzOAFXZBAABKeY23aWA452.png'}
 				],
 				navServerList:[
 					{text:'会员优惠',icon:'../../static/temp/server1@2x.png',path:'/pages/service/member'},

+ 1 - 1
components/seller/user.vue

@@ -20,7 +20,7 @@
 			<view class="user-order">
 				<view class="tab-title tui-skeleton-fillet" @click="navigator('/seller/pages/order/order-list?listType=0')">
 					<text class="cell-tit tui-skeleton-fillet">我的订单</text>
-					<text class="cell-more tui-skeleton-fillet">查看更多</text>
+					<text class="cell-more tui-skeleton-fillet">查看全部</text>
 					<text class="iconfont icon-xiayibu"></text>
 				</view>
 				<view class="order-section">

+ 12 - 6
pages.json

@@ -168,6 +168,18 @@
 				"navigationBarTitleText": "注册",
 				"navigationStyle":"custom"
 			}
+		},{
+			"path": "pages/login/registers",
+			"style": {
+				"navigationBarTitleText": "注册",
+				"navigationStyle":"custom"
+			}
+		},{
+			"path": "pages/login/apply",
+			"style": {
+				"navigationBarTitleText": "升级会员机构",
+				"navigationStyle":"custom"
+			}
 		},{
 			"path": "pages/login/login",
 			"style": {
@@ -193,12 +205,6 @@
 			"style": {
 				"navigationBarTitleText": "绑定运营人员"
 			}
-		},{
-			"path": "pages/login/apply",
-			"style": {
-				"navigationBarTitleText": "修改申请资料",
-				"navigationStyle":"custom"
-			}
 		},{
 			"path": "pages/login/information",
 			"style": {

+ 119 - 30
pages/goods/product.vue

@@ -41,43 +41,117 @@
 								<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>
-								<view class="wrap-main-pricenone" v-if="product.price1TextFlag == 1">
-									<text>未公开价格</text>
-								</view>
-								<view class="wrap-main-price" v-else>
-									<view class="p-main" v-if="ladderPriceFlag == '0' || product.actStatus == 1">
-										<view class="p-active" v-if="product.actStatus == 1">
-											<image class="icon-active" src="../../static/temp/icon-active.png" mode="" ></image>
-										</view>
-										<view class="p-price tui-skeleton-fillet">
-											<text class="txt sm">¥</text>
-											<text class="txt big">{{retailPrice}}</text>
-											<text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
+								<view class="" v-if="userIdentity == 1">
+									<view class="wrap-main-price">
+										<view class="p-main" v-if="ladderPriceFlag == '0' || product.actStatus == 1">
+											<view class="p-active" v-if="product.actStatus == 1">
+												<image class="icon-active" src="../../static/temp/icon-active.png" mode="" ></image>
+											</view>
+											<view class="p-price tui-skeleton-fillet">
+												<text class="txt sm">¥</text>
+												<text class="txt big">{{retailPrice}}</text>
+												<text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
+											</view>
+											<view class="p-minBuy">起订量:<text class="min-text">{{minBuyNumber}}</text></view>
 										</view>
-										<view class="p-minBuy">
-											起订量:
-											<text class="min-text">{{minBuyNumber}}</text>
+										<view class="wrap-ladder" v-else>
+											<view class="ladder-text">
+												<text class="ladder-h1">说明:</text>
+												<text class="ladder-p">本商品有以下优惠购物方案</text>
+											</view>
+											<view class="ladder-main tui-skeleton-fillet">
+												<view class="ladder-left">
+													<view class="ladder-b">起订量:</view>
+													<view class="ladder-b">价格:</view>
+												</view>
+												<view class="ladder-right">
+													<view class="ladder-li" v-for="(ladder,index) in  ladderPriceList" :key="index">
+														<view class="ladder-a">{{ladder.buyNumRangeShow}}</view>
+														<view class="ladder-a">¥{{ladder.buyPrice.toFixed(2)}}</view>
+													</view>
+												</view>
+											</view>
 										</view>
+									</view>	
+								</view>
+								<view class="" v-if="userIdentity == 4">
+									<view class="wrap-main-pricenone" v-if="product.price1TextFlag == 1">
+										<text>未公开价格</text>
+									</view>
+									<view class="wrap-main-pricenone" v-if="product.price1TextFlag == 2">
+										<text>未公开价格</text>
 									</view>
-									<view class="wrap-ladder" v-else>
-										<view class="ladder-text">
-											<text class="ladder-h1">说明:</text>
-											<text class="ladder-p">本商品有以下优惠购物方案</text>
+									<view class="wrap-main-none" v-if="product.price1TextFlag == 2" @click.stop="goUpgradeApply">
+										<text>上传营业执照升级为会员机构即可查看价格 >></text>
+									</view>
+									<view class="wrap-main-price" v-else>
+										<view class="p-main" v-if="ladderPriceFlag == '0' || product.actStatus == 1">
+											<view class="p-active" v-if="product.actStatus == 1">
+												<image class="icon-active" src="../../static/temp/icon-active.png" mode="" ></image>
+											</view>
+											<view class="p-price tui-skeleton-fillet">
+												<text class="txt sm">¥</text>
+												<text class="txt big">{{retailPrice}}</text>
+												<text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
+											</view>
+											<view class="p-minBuy">起订量:<text class="min-text">{{minBuyNumber}}</text></view>
 										</view>
-										<view class="ladder-main tui-skeleton-fillet">
-											<view class="ladder-left">
-												<view class="ladder-b">起订量:</view>
-												<view class="ladder-b">价格:</view>
+										<view class="wrap-ladder" v-else>
+											<view class="ladder-text">
+												<text class="ladder-h1">说明:</text>
+												<text class="ladder-p">本商品有以下优惠购物方案</text>
 											</view>
-											<view class="ladder-right">
-												<view class="ladder-li" v-for="(ladder,index) in  ladderPriceList" :key="index">
-													<view class="ladder-a">{{ladder.buyNumRangeShow}}</view>
-													<view class="ladder-a">¥{{ladder.buyPrice.toFixed(2)}}</view>
+											<view class="ladder-main tui-skeleton-fillet">
+												<view class="ladder-left">
+													<view class="ladder-b">起订量:</view>
+													<view class="ladder-b">价格:</view>
+												</view>
+												<view class="ladder-right">
+													<view class="ladder-li" v-for="(ladder,index) in  ladderPriceList" :key="index">
+														<view class="ladder-a">{{ladder.buyNumRangeShow}}</view>
+														<view class="ladder-a">¥{{ladder.buyPrice.toFixed(2)}}</view>
+													</view>
 												</view>
 											</view>
 										</view>
+									</view>					
+								</view>
+								<view class="" v-if="userIdentity == 2">
+									<view class="wrap-main-pricenone" v-if="product.price1TextFlag == 1">
+										<text>未公开价格</text>
 									</view>
-								</view>								
+									<view class="wrap-main-price" v-else>
+										<view class="p-main" v-if="ladderPriceFlag == '0' || product.actStatus == 1">
+											<view class="p-active" v-if="product.actStatus == 1">
+												<image class="icon-active" src="../../static/temp/icon-active.png" mode="" ></image>
+											</view>
+											<view class="p-price tui-skeleton-fillet">
+												<text class="txt sm">¥</text>
+												<text class="txt big">{{retailPrice}}</text>
+												<text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
+											</view>
+											<view class="p-minBuy">起订量:<text class="min-text">{{minBuyNumber}}</text></view>
+										</view>
+										<view class="wrap-ladder" v-else>
+											<view class="ladder-text">
+												<text class="ladder-h1">说明:</text>
+												<text class="ladder-p">本商品有以下优惠购物方案</text>
+											</view>
+											<view class="ladder-main tui-skeleton-fillet">
+												<view class="ladder-left">
+													<view class="ladder-b">起订量:</view>
+													<view class="ladder-b">价格:</view>
+												</view>
+												<view class="ladder-right">
+													<view class="ladder-li" v-for="(ladder,index) in  ladderPriceList" :key="index">
+														<view class="ladder-a">{{ladder.buyNumRangeShow}}</view>
+														<view class="ladder-a">¥{{ladder.buyPrice.toFixed(2)}}</view>
+													</view>
+												</view>
+											</view>
+										</view>
+									</view>	
+								</view>
 							</view>
 						</view>
 					</view>
@@ -331,7 +405,6 @@
 						this.retailPrice = this.product.retailPrice.toFixed(2);
 						this.buyRetailPrice = this.product.retailPrice;
 					}
-					// }
 					//处理下架商品和售罄商品
 					if(this.product.validFlag =='3' || this.stock == 0 ){
 						this.disabled = true
@@ -345,10 +418,18 @@
 						this.tabCurrentIndex = 0;// 页面显示是默认选中第三
 						this.disabledText = ''
 					}
-					if(this.product.price1TextFlag == 1){
+					if(this.userIdentity == 4){
+						if(this.product.price1TextFlag == "2"){
+							this.disabled = true
+						}else{
+							this.disabled = false
+						}
+					}
+					if(this.product.price1TextFlag == "1"){
 						this.disabled = true
 					}
 					this.goodsData.disabled = this.disabled
+					console.log(this.goodsData.disabled)
 					this.goodsData.isNoneDisabled = this.isNoneDisabled
 					if(this.product.validFlag =='3'){
 						this.disabledText = '下架'
@@ -504,6 +585,9 @@
 					}
 				})	
 			},
+			goUpgradeApply(){
+				this.$api.navigateTo('/pages/login/apply')
+			},
 			setHeaderBtnPosi(){
 				// 获得胶囊按钮位置信息
 				let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
@@ -658,6 +742,11 @@
 				font-size: $font-size-28;
 				font-weight: 600;
 			}
+			.wrap-main-none{
+				line-height: 44rpx;
+				color: #3A82FF;
+				font-size: $font-size-28;
+			}
 			.p-active{
 				width: 130rpx;
 				height: 44rpx;

+ 129 - 318
pages/login/apply.vue

@@ -1,72 +1,36 @@
 <template>
 	<view class="container register" :style="{paddingTop:CustomBar+'px'}">
 		<cu-custom :navbar-data='nvabarData'  @navigateBack="hanldNavigateBack"></cu-custom>
-		<view class="register-error clearfix" :style="{top:CustomBar+'px'}">
-			<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>
-			<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>
-					</view>
+		<view class="register-main clearfix">
+			<view class="register-row none clearfix">
+				<view class="register-title first"><text>补充以下详细信息即可升级为会员机构,</text></view>
+				<view class="register-title"><text>享受更多更好的服务。</text></view>
+			</view>	
+		</view>	
+		<view class="register-main clearfix" v-if="clubStatus == 92">
+			<view class="register-row none clearfix">
+				<view class="error-title">审核未通过原因:</view>
+				<view class="error-main">
+					<text class="error-item" v-for="(item, index) in errorList" :key="index">
+						{{ item }}
+					</text>
 				</view>
-			</view>
-		</view>
-		<view class="register-main first clearfix">
-			<view class="register-row">
-				<view class="register-title">基本信息</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="30"/>
-				</view>
-			</view>
-			<view class="register-row clearfix">
+			</view>	
+		</view>	
+		<view class="register-main detailed clearfix">
+			<view class="register-row none clearfix">
 				<view class="register-from">
-					<view class="label">联系人:</view>
-					<input class="row-input" type="text" v-model="clubContact" placeholder="请输入联系姓名" maxlength="6"/>
+					<view class="label">邮箱:</view>
+					<input class="row-input" type="text" name="input" v-model="registerEmail" placeholder="请输入您的常用邮箱" maxlength="30"/>
 				</view>
+				<view class="register-tip"><text>提示:邮箱可用作登录账号,请使用公司邮箱或法人邮箱</text></view>
 			</view>
 			<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"/>
-					<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="number" v-model="mobileCode" placeholder="请输入上述手机号的验证码" maxlength="6"/>
-				</view>
-				<view class="register-from btn" :class="[isMobileDisabled  ? 'disabled' : '']">
-					<button class="row-input"  type="button" @click.stop="getMobileCodeFn" :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="newMobile" placeholder="请输入新手机号" maxlength="11"/>
-				</view>
-			</view>
-			<view class="register-row clearfix" v-show="isShowCheckPhone">
-				<view class="register-from code">
-					<input class="row-input" type="number" v-model="newMobileCode" placeholder="请输入新手机号的验证码" maxlength="6"/>
-				</view>
-				<view class="register-from btn" :class="[isNewMobileDisabled  ? 'disabled' : '']" >
-					<button class="row-input"  type="button" @click.stop="getNewMobileCodeFn" :disabled="isNewMobileDisabled">{{ newMobileCodeText }}</button>
+					<view class="label">机构名称:</view>
+					<input class="row-input" type="text" v-model="clubName" placeholder="请输入您的机构名称" maxlength="30"/>
 				</view>
 			</view>
-		</view>
-		<view class="register-main clearfix" >
-			<view class="register-row">
-				<view class="register-title">详细信息<text class="txt">(请尽量填写,有利于快速审核通过)</text></view>
-			</view>
-		</view>
-		<view class="register-main detailed clearfix">
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">机构简称:</view>
@@ -77,7 +41,7 @@
 				<view class="register-from"  @click="showMulLinkageThreePicker">
 					<view class="label">机构地址:</view>
 					<text class="row-input" :class="addressData.address === '请选择机构所在地区' ? 'none' : ''">
-						{{addressData.address}}
+						{{addressData.address }}
 					</text>		
 					<text class="iconfont icon-xiayibu"></text>
 				</view>
@@ -114,8 +78,6 @@
 						</view>
 					</view>
 				</view>
-			</view>
-			<view class="register-row clearfix">
 				<view class="register-picture">
 					<view class="label">门头照:</view>
 					<view class="upload-picture">
@@ -153,7 +115,7 @@
 				</view>
 			</view>
 			<view class="register-row clearfix" v-if="isOrganizationType == 1">
-				<view class="register-picture">
+				<view class="register-picture zz">
 					<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>
@@ -225,17 +187,8 @@
 				</view>
 			</view>
 			<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 @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 ">
-					<view class="register-btn sub" @click.stop="organizationUpdateInfo">提交审核</view>
+					<view class="register-btn sub" @click.stop="organizationUpdateInfo">确认升级并提交审核</view>
 				</view>
 			</view>
 			<mpvue-city-picker :themeColor="themeColor"
@@ -252,8 +205,8 @@
 import { mapMutations } from 'vuex';
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
 	import { beautyList,mentuzCampNullList,medicaCampNullList } from '@/common/json/data.json.js' //本地数据
-	import { organizationUpdateModifyInfo , organizationModifyUpdate  } from "@/api/use.js"
-	import { getClubMobileCode,getClubNewMobileCode,uploadFileImage } from "@/api/utils.js" 
+	import { organizationUpdateModifyInfo , organizationRegister  } from "@/api/use.js"
+	import { uploadFileImage } from "@/api/utils.js" 
 	export default{
 		components:{
 			mpvueCityPicker
@@ -263,36 +216,21 @@ import { mapMutations } from 'vuex';
 				nvabarData: {		//顶部自定义导航
 					showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
 					showSearch: 0,
-					title: '修改申请信息', // 导航栏 中间的标题
+					title: '升级会员机构', // 导航栏 中间的标题
 				},
 				CustomBar:this.CustomBar,// 顶部导航栏高度
-				isOpenError:false,
 				errorList:[],
-				isShowCheckPhone:false,		//是否显示修改手机
 				tabCurrentIndex:3,	
-				isPreviewImage:false,   	//预览图片开关
-				isMobileDisabled: false,	//手机验证码按钮控制
-				isNewMobileDisabled: false,	//手机验证码按钮控制
-				userID:'',					//用户ID
-				clubID:'',					//会所ID
-			    count: '',					//倒计时
-			    newCount: '',				//倒计时
-			    codeTime: null,
-			    codeTimeNew: null,
-				clubName:'',	 			//机构名称
-				abbreviation:'',	 		//机构简称
-				clubContact:'',	 			//联系人
-				mobile:'',					//联系人手机号
-				newMobile:'',				//新联系人手机号
-				mobileCode:'',				//手机号验证码
-				newMobileCode:'',			//新手机号手机验证码
-				mobileCodeText: '获取验证码',
-				newMobileCodeText: '获取验证码',
+				clubStatus:'',			//审核状态
+				isPreviewImage:false,   //预览图片开关
+				userID:'',				//用户ID
+				clubID:'',				//会所ID
+				registerEmail:'',		//邮箱
+				clubName:'',	 		//机构名称
+				abbreviation:'',	 	//机构简称
 				socialCreditCode:'',	//统一社会信用代码
-				isAgreed:1,				//是否勾选协议
 				isDisabled:true,
 				isShowInput:false,
-				isCheck:true,			//是否勾选协议
 				uploadBusinessImage:'',	//营业执照图片
 				uploadMentuzImage:'',  	//门头照图片
 				uploadMedicalImage:'', 	//资质照图片
@@ -300,9 +238,6 @@ import { mapMutations } from 'vuex';
 				isDepartment:false,     //是否显示科室
 				secondClubType:'',		//机构类型二级分类
 				mainpro:'',				//主营内容
-				clubTelePhone:'',		//固定电话
-				clubFax:'',				//传真
-				companyPprofile:'',		//公司简介
 				firstClubType:'',		//机构类型
 				isOrganizationType:0,
 				organizationTypeText:'请选择机构类型',
@@ -327,11 +262,13 @@ import { mapMutations } from 'vuex';
 			}	
 		},
 		onLoad(option) {
+			this.clubStatus = option.clubStatus
+			console.log(this.clubStatus)
 			this.organizationInfo()
 		},
 		methods:{
 			hanldNavigateBack(){
-				this.$util.modal('','资料尚未提交审核,确定放弃修改吗?','确定','取消',true,() =>{
+				this.$util.modal('','资料尚未提交审核,确定放弃升级吗?','确定','取消',true,() =>{
 					uni.navigateBack({
 						delta: 1
 					});
@@ -343,13 +280,13 @@ import { mapMutations } from 'vuex';
 					organizationUpdateModifyInfo({userID:this.userID}).then(response =>{
 						let organizationClub = response.data.club
 						let organizationUser = response.data.user
-						this.errorList =organizationUser.auditNoteList
-						this.email = organizationUser.email	
+						if(organizationUser.auditNoteList!=null){
+							this.errorList =organizationUser.auditNoteList
+						}
+						this.registerEmail = organizationUser.email	
 						this.clubID = organizationUser.clubID
-						this.clubName = organizationClub.name
-						this.clubContact = organizationClub.linkMan1
-						this.mobile = organizationUser.bindMobile
-						this.abbreviation = organizationClub.sname
+						this.clubName = this.$reg.checkData(organizationClub.name)
+						this.abbreviation = this.$reg.checkData(organizationClub.sname)
 						if( organizationClub.provinceID == null ){
 							this.addressData.provinceID = ''
 						}else{
@@ -365,18 +302,15 @@ import { mapMutations } from 'vuex';
 						}else{
 							this.addressData.townID = organizationClub.townID
 						}
-						this.addressData.address = organizationClub.provincialAddress?organizationClub.provincialAddress:''
-						this.addressData.addressDetail = organizationClub.address
-						this.socialCreditCode = organizationClub.socialCreditCode
+						this.addressData.address = organizationClub.provincialAddress ? organizationClub.provincialAddress:'请选择机构所在地区'
+						this.addressData.addressDetail = this.$reg.checkData(organizationClub.address)
+						this.socialCreditCode = this.$reg.checkData(organizationClub.socialCreditCode)
 						this.firstClubType = organizationClub.firstClubType
-						this.secondClubType = organizationClub.secondClubType
+						this.secondClubType = this.$reg.checkData(organizationClub.secondClubType)
 						this.uploadBusinessImage = this.$reg.checkData(organizationClub.businessLicenseImage) 
 						this.uploadMentuzImage = this.$reg.checkData(organizationClub.headpic)
 						this.uploadMedicalImage = this.$reg.checkData(organizationClub.medicalPracticeLicenseImg)
-						this.department = organizationClub.department						
-						this.clubTelePhone = this.$reg.checkData(organizationClub. contractPhone)
-						this.clubFax = this.$reg.checkData(organizationClub.fax)
-						this.companyPprofile = this.$reg.checkData(organizationClub.info)
+						this.department = this.$reg.checkData(organizationClub.department)						
 						//机构类型&&主营项目
 						switch(this.firstClubType){
 							case '1':
@@ -417,10 +351,6 @@ import { mapMutations } from 'vuex';
 				})
 			},
 			organizationUpdateInfo(){//提交审核
-				if(!this.isCheck){
-					this.$util.msg('请勾选同意协议',2000);
-					return
-				}
 				if(!this.isMainproCheck){
 					let mainproList = []
 					if(this.firstClubType == '1'){
@@ -434,15 +364,45 @@ import { mapMutations } from 'vuex';
 					}
 					this.mainpro = mainproList.join('/')
 				}
+				if( this.registerEmail == ''){
+					this.$util.msg('请输入邮箱地址',2000);
+					return
+				}
+				if( !this.$reg.isEmail(this.registerEmail)){
+					this.$util.msg('请输入正确的邮箱地址',2000);
+					return
+				}
+				if( this.clubName == ''){
+					this.$util.msg('请输入机构名称',2000);
+					return
+				}
+				if( this.addressData.townID == ''){
+					this.$util.msg('请选择机构地址',2000);
+					return
+				}
+				if( this.addressData.addressDetail == ''){
+					this.$util.msg('请填写机构详细地址',2000);
+					return
+				}
+				if( this.socialCreditCode == ''){
+					this.$util.msg('请填写社会统一社会信用代码',2000);
+					return
+				}
+				if( this.uploadBusinessImage == ''){
+					this.$util.msg('请上传您的营业执照',2000);
+					return
+				}
+				if(this.isOrganizationType!=0){
+					if(this.mainpro == ''){
+						this.$util.msg('请选择住机构主营内容',2000);
+						return
+					}
+				}
 				let params ={
 						userID:this.userID,
 						clubID:this.clubID,					//会所ID
+						contractEmail1:this.registerEmail,
 						name:this.clubName,
-						linkMan1:this.clubContact,
-						contractMobile2:this.mobile,
-						contractMobile:this.newMobile,
-						mobileCode:this.mobileCode,
-						newMobileCode:this.newMobileCode,
 						sname:this.abbreviation,
 						provinceID:this.addressData.provinceID,
 						cityID:this.addressData.cityID,
@@ -451,18 +411,14 @@ import { mapMutations } from 'vuex';
 						socialCreditCode:this.socialCreditCode,
 						businessLicenseImage:this.uploadBusinessImage,
 						headpic:this.uploadMentuzImage,
-						firstClubType:this.isOrganizationType, //机构类型分类 医美:0和生美:1
+						firstClubType:this.isOrganizationType,  //机构类型分类 医美:0和生美:1
 						secondClubType:this.secondClubType,		//机构类型二级分类 诊所:1,门诊:2,医院:3
 						department:this.department,				//科室
 						medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
-						isAgreed:this.isAgreed,				//是否勾选协议	
 						mainpro:this.mainpro,
-						fax:this.clubFax,
-						contractPhone:this.clubTelePhone,
-						info : this.companyPprofile
 				}
-				organizationModifyUpdate(params).then(response =>{
-					this.$util.msg('修改成功',2000,true,'success')
+				organizationRegister(params).then(response =>{
+					this.$util.msg('您的升级申请已提交审核',2000);
 					setTimeout(()=>{
 						this.$api.switchTabTo('/pages/tabBar/home/home')
 					},2000)
@@ -470,74 +426,6 @@ import { mapMutations } from 'vuex';
 					this.$util.msg(error.msg,2000);
 				})
 			},
-			getMobileCodeFn(){
-				if( this.mobile == ''){
-					this.$util.msg('请输入手机号',2000);
-					return
-				}
-				if(!this.$reg.isMobile(this.mobile)){
-					this.$util.msg('请输入正确的手机号',2000);
-					return
-				}
-				let params = { mobile : this.mobile }
-				this.isMobileDisabled = true;
-				getClubMobileCode(params).then(response =>{
-					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( error =>{
-					this.$util.msg(error.msg,2000);
-					this.isMobileDisabled = false;
-				})
-			},
-			getNewMobileCodeFn(){
-				if( this.newMobile == ''){
-					this.$util.msg('请输入手机号',2000);
-					return
-				}
-				if(!this.$reg.isMobile(this.newMobile)){
-					this.$util.msg('请输入正确的手机号',2000);
-					return
-				}
-				let params = { newMobile : this.newMobile }
-				this.isNewMobileDisabled = true;
-				getClubNewMobileCode(params).then(response =>{
-					this.$util.msg('验证短信已发送',2000);
-					const TIME_COUNT = 60;
-			     	if (!this.codeTimeNew) {
-			       		this.newCount = TIME_COUNT;
-			       		this.isNewMobileDisabled = true;
-			       		this.codeTimeNew = setInterval(() => {
-			       			if (this.newCount > 1 && this.newCount <= TIME_COUNT) {
-			         			this.newCount--
-			         			this.newMobileCodeText = this.newCount +'s重新发送'
-			        		} else {
-				         		this.isNewMobileDisabled = false;
-				         		clearInterval(this.codeTimeNew)
-				         		this.codeTimeNew = null
-								this.newMobileCodeText = '获取验证码'
-			        		}
-			       		},1000)
-			      	}
-				}).catch( error =>{
-					this.$util.msg(error.msg,2000);
-					this.isNewMobileDisabled = false;
-				})
-			},
 			// 三级联动选择
 			showMulLinkageThreePicker() {
 				this.isShowInput = true
@@ -660,14 +548,6 @@ import { mapMutations } from 'vuex';
 				}
 				return arr.join('/')
 			},
-			agreeCheck() {
-				this.isCheck = !this.isCheck
-				if(this.isCheck){
-					this.isAgreed = 1
-				}else{
-					this.isAgreed = 0
-				}
-			},
 			onBlurInput(e){//
 				if(e.detail.value ===''){
 					this.isDisabled = true
@@ -695,20 +575,6 @@ import { mapMutations } from 'vuex';
 					this.medicaCampList.push(item)
 				}
 			},
-			showOpenError(){//顶部审核信息详情
-				this.isOpenError = !this.isOpenError
-			},
-			showCheckPhone(){//控制修改手机显隐
-				this.isShowCheckPhone = !this.isShowCheckPhone
-			},
-			checkDataNullFn(res){
-				let data;
-				data = res ? res :''
-				return data
-			},
-			steps(index) {//$attrstab切换
-				this.tabCurrentIndex = index;
-			}
 		},
 		onShow() {
 			if(this.isPreviewImage){
@@ -724,99 +590,13 @@ import { mapMutations } from 'vuex';
 		width: 100%;
 		height: auto;
 		border-top: 1px solid #F7F7F7;
-		.model-warp.none{
-			display: none;			
-		}
-		.model-warp.show{
-			display: block;
-		}
-		.register-error{
-			width: 100%;
-			height: auto;
-			position: fixed;
-			top: 0;
-			left: 0;
-			z-index: 999;
-			.error-top{
-				width: 702rpx;
-				padding: 0 24rpx;
-				height: 90rpx;
-				line-height: 90rpx;
-				background: #FF0000;
-				border-bottom: 1px solid #F7F7F7;
-				&.error-top--none{
-					background:#FFFFFF;
-					.name{
-						color: #333333;
-					}
-					.icon{
-						color: #333333;
-					}
-				}
-				.name{
-					font-size: $font-size-32;
-					color: #FFFFFF;
-					float: left;
-				}
-				.icon{
-					float: right;
-					font-size: $font-size-32;
-					color: #FFFFFF;
-				}
-				.icon-xiangxiajiantou{
-					transform: rotate(0deg);
-					transform-origin: center center;
-					float: right;
-					font-size: $font-size-32;
-					color: #FFFFFF;
-					/* transition: transform 0.3s ease;*/
-					transition-property: transform;
-					transition-duration: 0.3s;
-					transition-timing-function: ease;
-					margin-left: 10rpx;
-				}
-				.icon-xiangxiajiantou-active{
-					transform: rotate(180deg);
-					color: #333333;
-				
-				}
-			}
-			.animation{
-				/* transition: transform 0.3s ease;*/
-				transition-property: transform;
-				transition-duration: 0.2s;
-				transition-timing-function: ease;
-			}
-			.error-main{
-				width: 702rpx;
-				height: auto;
-				padding: 24rpx;
-				overflow: hidden;
-				background: #FFFFFF;
-				.error-main-list{
-					width:100% ;
-					height: auto;
-					background: #FFFFFF;
-					.item{
-						height: auto;
-						line-height: 60rpx;
-						font-size: $font-size-28;
-						color: #FF0000;
-						.num{
-							margin-right: 10rpx;
-						}
-					}
-				}
-			}
-			.error-main--hide {
-				padding: 0 24rpx;
-				height: 0px;
-				line-height: 0px;
-			}		
-		}
+		background: #EFEFEF;
 		.register-main{
 			width: 100%;
 			height: auto;
+			background: #FFFFFF;
+			padding: 20rpx 0;
+			margin-bottom: 20rpx;
 			&.detailed{
 				padding-bottom: 300rpx;
 			}
@@ -840,16 +620,42 @@ import { mapMutations } from 'vuex';
 				height: auto;
 				padding: 0 24rpx;
 				margin-bottom: 20rpx;
-				.register-title{
-					line-height: 60rpx;
-					font-size: $font-size-32;
+				&.none{
+					margin-bottom: 0;
+				}
+				.error-title{
+					line-height: 40rpx;
+					font-size: $font-size-28;
 					color: $text-color;
 					text-align: left;
-					padding-left: 20rpx;
-					.txt{
+				}
+				.error-main{
+					padding: 10rpx 0;
+					.error-item{
+						padding:0 20rpx;
+						margin:10rpx;
+						background: #F53636;
+						height: 52rpx;
+						line-height: 52rpx;
+						border-radius: 26rpx;
 						font-size: $font-size-26;
+						color: #FFFFFF;
+						text-align: center;
+						display: inline-block;
 					}
 				}
+				.register-tip{
+					line-height: 64rpx;
+					font-size: $font-size-24;
+					color: #CECECE;
+					text-align: left;
+				}
+				.register-title{
+					line-height: 44rpx;
+					font-size: $font-size-24;
+					color: $text-color;
+					text-align: left;
+				}
 				.row-btn{
 					position: absolute;
 					right: 24rpx;
@@ -1002,7 +808,7 @@ import { mapMutations } from 'vuex';
 						align-items: center;
 						&.btn{
 							margin: 0 auto;
-							margin-left: 126rpx;
+							margin-left: 116rpx;
 						}
 						.row-input{
 							display: flex;
@@ -1079,7 +885,12 @@ import { mapMutations } from 'vuex';
 			}
 			.register-picture{
 				height: 102rpx;
-				margin: 40rpx 0 0 0;
+				margin: 30rpx 0;
+				width: 42%;
+				float: left;
+				&.zz{
+					width: 100%;
+				}
 				.label{
 					float: left;
 					font-size: $font-size-28;

+ 1 - 16
pages/login/bindwechat.vue

@@ -87,25 +87,9 @@
 				count: '',				//倒计时
 				mobileCodeText: '获取验证码',
 				codeTime: null,
-				loginType:'',			//跳转类型
-				alertText:'',
-				listType: '',
-				listVal: '',
-				detilType:'',
-				id:'',//商品ID
-				getOption:''
 			}
 		},
 		onLoad(option) {
-			let data = JSON.parse(option.data);
-			this.codeType = option.codeType
-			this.option = option
-			this.loginType = data.type;
-			this.id = data.id
-			if(data.listType) {
-				this.listType = data.listType;
-				this.listVal = data.listVal;
-			}
 			this.getVerificationCode()
 		},
 		methods:{
@@ -196,6 +180,7 @@
 								nickName:res.userInfo.nickName,
 								headimgurl:res.userInfo.avatarUrl,
 						}
+						console.log(params)
 						bindingWechat(params).then(response =>{
 							wxLogin.wxLoginAuthorize()
 							this.$api.switchTabTo('/pages/tabBar/user/user')

+ 87 - 204
pages/login/information.vue

@@ -3,22 +3,7 @@
 		<cu-custom :navbar-data='nvabarData'  @navigateBack="hanldNavigateBack"></cu-custom>
 		<view class="register-main first clearfix">
 			<view class="register-row">
-				<view class="register-title">账户信息</view>
-			</view>
-			<view class="register-row clearfix">
-				<view class="register-from">
-					<view class="label">邮箱:</view>
-					<view class="row-input">{{ email }}</view>
-				</view>
-			</view>
-			<view class="register-row">
-				<view class="register-title">基本信息</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="30"/>
-				</view>
+				<view class="register-title">注册信息</view>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
@@ -29,38 +14,26 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">手机号:</view>
-					<input class="row-input" type="number" disabled="true" v-model="mobile" placeholder="请输入手机号" maxlength="11"/>
-					<view class="row-btn" @click="showCheckPhone">{{ isShowCheckPhone ? '取消修改' : '修改手机号' }}</view>
+					<view class="row-input">{{ mobile }}</view>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-show="isShowCheckPhone">
-				<view class="register-from code">
-					<input class="row-input" type="number" v-model="mobileCode" placeholder="请输入上述手机号的验证码" maxlength="6"/>
-				</view>
-				<view class="register-from btn" :class="[isMobileDisabled  ? 'disabled' : '']">
-					<button class="row-input"  type="button" @click.stop="getMobileCodeFn" :disabled="isMobileDisabled">{{ mobileCodeText }}</button>
-				</view>
+		</view>
+		<view class="register-main clearfix" v-if="userIdentity === 2">
+			<view class="register-row">
+				<view class="register-title">升级信息</view>
 			</view>
-			<view class="register-row clearfix" v-show="isShowCheckPhone">
+			<view class="register-row clearfix">
 				<view class="register-from">
-					<input class="row-input" type="number" v-model="newMobile" placeholder="请输入新手机号" maxlength="11"/>
+					<view class="label">邮箱:</view>
+					<input class="row-input" type="text" name="input" v-model="email" placeholder="请输入邮箱地址" maxlength="30"/>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-show="isShowCheckPhone">
-				<view class="register-from code">
-					<input class="row-input" type="number" v-model="newMobileCode" placeholder="请输入新手机号的验证码" maxlength="6"/>
-				</view>
-				<view class="register-from btn" :class="[isNewMobileDisabled  ? 'disabled' : '']" >
-					<button class="row-input"  type="button" @click.stop="getNewMobileCodeFn" :disabled="isNewMobileDisabled">{{ newMobileCodeText }}</button>
+			<view class="register-row clearfix">
+				<view class="register-from">
+					<view class="label">机构名称:</view>
+					<input class="row-input" type="text" v-model="clubName" placeholder="请输入您的机构名称" maxlength="30"/>
 				</view>
 			</view>
-		</view>
-		<view class="register-main clearfix" >
-			<view class="register-row">
-				<view class="register-title">详细信息<text class="txt">(请尽量填写,有利于快速审核通过)</text></view>
-			</view>
-		</view>
-		<view class="register-main detailed clearfix">
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">机构简称:</view>
@@ -108,8 +81,6 @@
 						</view>
 					</view>
 				</view>
-			</view>
-			<view class="register-row clearfix">
 				<view class="register-picture">
 					<view class="label">门头照:</view>
 					<view class="upload-picture">
@@ -147,7 +118,7 @@
 				</view>
 			</view>
 			<view class="register-row clearfix" v-if="isOrganizationType == 1">
-				<view class="register-picture">
+				<view class="register-picture zz">
 					<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>
@@ -218,6 +189,17 @@
 					</view>
 				</view>
 			</view>
+			<mpvue-city-picker :themeColor="themeColor"
+								ref="mpvueCityPicker" 
+							    :pickerValueDefault="cityPickerValueDefault"
+								@onCancel="onCancel" 
+								@onConfirm="onConfirm">
+			</mpvue-city-picker>
+		</view>
+		<view class="register-main detailed clearfix">
+			<view class="register-row">
+				<view class="register-title">其他信息</view>
+			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">固定电话:</view>
@@ -231,9 +213,7 @@
 				</view>
 			</view>
 			<view class="register-row text-textarea clearfix">
-				<view class="textarea show" v-if="isCompanyPprofile" @click="showTextarea">{{'请填写公司简介,最多500字'}}</view>
-				<textarea 	v-else
-							class="textarea" 
+				<textarea 	class="textarea" 
 							type="text" 
 							v-model="companyPprofile" 
 							placeholder="请填写公司简介,最多500字" 
@@ -244,26 +224,11 @@
 				/>
 			</view>
 			<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 @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">
 					<view class="register-btn sub" @click.stop="organizationUpdateInfo">确定</view>
 				</view>
 			</view>
-			<mpvue-city-picker :themeColor="themeColor"
-								ref="mpvueCityPicker" 
-							    :pickerValueDefault="cityPickerValueDefault"
-								@onCancel="onCancel" 
-								@onConfirm="onConfirm">
-			</mpvue-city-picker>
-		</view>
+		</view>	
 	</view>
 </template>
 
@@ -286,32 +251,19 @@
 					title: '修改资料', // 导航栏 中间的标题
 				},
 				CustomBar:this.CustomBar,// 顶部导航栏高度
-				isShowCheckPhone:false,		//是否显示修改手机
-				tabCurrentIndex:3,	
 				isPreviewImage:false,   	//预览图片开关
-				isMobileDisabled: false,	//手机验证码按钮控制
-				isNewMobileDisabled: false,	//手机验证码按钮控制
 				userID:'',					//用户ID
 				clubID:'',					//会所ID
+				userIdentity:'',			//机构用户类型
 				email:'',					//邮箱
-			    count: '',					//倒计时
-			    newCount: '',					//倒计时
-			    codeTime: null,
-			    codeTimeNew: null,
 				clubName:'',	 			//机构名称
 				abbreviation:'',	 		//机构简称
 				clubContact:'',	 			//联系人
 				mobile:'',					//联系人手机号
-				newMobile:'',				//新联系人手机号
-				mobileCode:'',				//手机号验证码
-				newMobileCode:'',			//新手机号手机验证码
-				mobileCodeText: '获取验证码',
-				newMobileCodeText: '获取验证码',
 				socialCreditCode:'',	//统一社会信用代码
 				isAgreed:1,				//是否勾选协议
 				isDisabled:true,
 				isShowInput:false,
-				isCheck:true,			//是否勾选协议
 				uploadBusinessImage:'',	//营业执照图片
 				uploadMentuzImage:'',  	//门头照图片
 				uploadMedicalImage:'', 	//资质照图片
@@ -364,10 +316,11 @@
 						let organizationUser = response.data.user
 						this.email = organizationUser.email ? organizationUser.email :''	
 						this.clubID = organizationUser.clubID
+						this.userIdentity = organizationUser.userIdentity
 						this.clubName = organizationClub.name ? organizationClub.name : ''
 						this.clubContact = organizationClub.linkMan1
 						this.mobile = organizationUser.bindMobile ? organizationUser.bindMobile : ''
-						this.abbreviation = organizationClub.sname
+						this.abbreviation = this.$reg.checkData(organizationClub.sname)
 						if( organizationClub.provinceID == null ){
 							this.addressData.provinceID = ''
 						}else{
@@ -384,9 +337,9 @@
 							this.addressData.townID = organizationClub.townID
 						}
 						this.addressData.addressDetail = organizationClub.address ? organizationClub.address : ''
-						this.socialCreditCode = organizationClub.socialCreditCode
+						this.socialCreditCode = this.$reg.checkData(organizationClub.socialCreditCode)
 						this.firstClubType = organizationClub.firstClubType
-						this.secondClubType = organizationClub.secondClubType
+						this.secondClubType = this.$reg.checkData(organizationClub.secondClubType)
 						this.addressData.address =  organizationClub.provincialAddress ? organizationClub.provincialAddress : ''
 						this.uploadBusinessImage = this.$reg.checkData(organizationClub.businessLicenseImage)
 						this.uploadMedicalImage = this.$reg.checkData(organizationClub.medicalPracticeLicenseImg)
@@ -434,49 +387,53 @@
 				})
 			},
 			organizationUpdateInfo(){//提交审核
-				if(!this.isCheck){
-					this.$util.msg('请勾选同意协议',2000);
-					return
-				}
-				if(!this.isMainproCheck){
-					let mainproList = []
-					if(this.firstClubType == '1'){
-						this.mentuzCampList.forEach(item =>{
-							mainproList.push(item.name)
-						})
-					}else{
-						this.medicaCampList.forEach(item =>{
-							mainproList.push(item.name)
-						})
+				let params = {}
+				if(this.userIdentity === 4){
+					 params = {
+							userID:this.userID,
+							clubID:this.clubID,					//会所ID
+							linkMan1:this.clubContact,
+							fax:this.clubFax,
+							contractPhone:this.clubTelePhone,
+							info : this.companyPprofile,
+						}		
+				}else{
+					if(!this.isMainproCheck){
+						let mainproList = []
+						if(this.firstClubType == '1'){
+							this.mentuzCampList.forEach(item =>{
+								mainproList.push(item.name)
+							})
+						}else{
+							this.medicaCampList.forEach(item =>{
+								mainproList.push(item.name)
+							})
+						}
+						this.mainpro = mainproList.join('/')
+					}
+					params 	= {
+							userID:this.userID,
+							clubID:this.clubID,					//会所ID
+							name:this.clubName,
+							linkMan1:this.clubContact,
+							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,
+							fax:this.clubFax,
+							contractPhone:this.clubTelePhone,
+							info : this.companyPprofile
 					}
-					this.mainpro = mainproList.join('/')
-				}
-				let params ={
-						userID:this.userID,
-						clubID:this.clubID,					//会所ID
-						name:this.clubName,
-						linkMan1:this.clubContact,
-						contractMobile2:this.mobile,
-						contractMobile:this.newMobile,
-						mobileCode:this.mobileCode,
-						newMobileCode:this.newMobileCode,
-						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,
-						fax:this.clubFax,
-						contractPhone:this.clubTelePhone,
-						info : this.companyPprofile
 				}
 				organizationUpdate(params).then(response =>{
 					this.$util.msg('修改成功',2000,true,'success')
@@ -487,74 +444,6 @@
 					this.$util.msg(error.msg,2000);
 				})
 			},
-			getMobileCodeFn(){
-				if( this.mobile == ''){
-					this.$util.msg('请输入手机号',2000);
-					return
-				}
-				if(!this.$reg.isMobile(this.mobile)){
-					this.$util.msg('请输入正确的手机号',2000);
-					return
-				}
-				let params = { mobile : this.mobile }
-				this.isMobileDisabled = true;
-				getClubMobileCode(params).then(response =>{
-					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( error =>{
-					this.$util.msg(error.msg,2000);
-					this.isMobileDisabled = false;
-				})
-			},
-			getNewMobileCodeFn(){
-				if( this.newMobile == ''){
-					this.$util.msg('请输入手机号',2000);
-					return
-				}
-				if(!this.$reg.isMobile(this.newMobile)){
-					this.$util.msg('请输入正确的手机号',2000);
-					return
-				}
-				let params = { newMobile : this.newMobile }
-				this.isNewMobileDisabled = true;
-				getClubNewMobileCode(params).then(response =>{
-					this.$util.msg('验证短信已发送',2000);
-					const TIME_COUNT = 60;
-			     	if (!this.codeTimeNew) {
-			       		this.newCount = TIME_COUNT;
-			       		this.isNewMobileDisabled = true;
-			       		this.codeTimeNew = setInterval(() => {
-			       			if (this.newCount > 1 && this.newCount <= TIME_COUNT) {
-			         			this.newCount--
-			         			this.newMobileCodeText = this.newCount +'s重新发送'
-			        		} else {
-				         		this.isNewMobileDisabled = false;
-				         		clearInterval(this.codeTimeNew)
-				         		this.codeTimeNew = null
-								this.newMobileCodeText = '获取验证码'
-			        		}
-			       		},1000)
-			      	}
-				}).catch( error =>{
-					this.$util.msg(error.msg,2000);
-					this.isNewMobileDisabled = false;
-				})
-			},
 			// 三级联动选择
 			showMulLinkageThreePicker() {
 				this.isShowInput = true
@@ -680,14 +569,6 @@
 				}
 				return arr.join('/')
 			},
-			agreeCheck() {
-				this.isCheck = !this.isCheck
-				if(this.isCheck){
-					this.isAgreed = 1
-				}else{
-					this.isAgreed = 0
-				}
-			},
 			onBlurInput(e){//
 				if(e.detail.value ===''){
 					this.isDisabled = true
@@ -715,14 +596,11 @@
 					this.medicaCampList.push(item)
 				}
 			},
-			showCheckPhone(){//控制修改手机显隐
-				this.isShowCheckPhone = !this.isShowCheckPhone
-			},
-			steps(index) {//$attrstab切换
-				this.tabCurrentIndex = index;
-			}
 		},
 		onShow() {
+			this.$api.getStorage().then((resolve) =>{
+				this.userIdentity = resolve.userIdentity
+			})
 			if(this.isPreviewImage){
 				this.isPreviewImage = false
 				return
@@ -1007,7 +885,12 @@
 			}
 			.register-picture{
 				height: 102rpx;
-				margin: 40rpx 0 0 0;
+				margin: 30rpx 0;
+				width: 42%;
+				float: left;
+				&.zz{
+					width: 100%;
+				}
 				.label{
 					float: left;
 					font-size: $font-size-28;

+ 5 - 21
pages/login/login-accont.vue

@@ -80,31 +80,15 @@
 			},
 			OrganizationLogin(){
 				organizationLogin({mobileOrEmail:this.accountNumber,password:this.password,source:'www'}).then(response =>{
-					if(response.code == '0' ){
-						this.storeUpdataeStatus(response.data)
-						this.$api.navigateTo(`/pages/login/bindwechat?data=${JSON.stringify(this.getOption)}&codeType=${response.code}`)
-					}else if(response.code == '4'){
-						this.storeUpdataeStatus(response.data)					
-						this.$api.navigateTo(`/pages/login/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/login/apply')
-						})
-					}else{
-						this.$util.msg(response.msg,2000);
-					}
+					this.storeUpdataeStatus(response.data)
+					this.$api.navigateTo(`/pages/login/bindwechat?data=${JSON.stringify(this.getOption)}&codeType=${response.code}`)
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000);
 				})
 			},
 			storeUpdataeStatus(data){
-				let user_key = {
-						clubID:data.clubID,
-						shopID:data.shopID,
-						userID:data.userID,
-						bindMobile:data.bindMobile,
-				}						
 				uni.setStorageSync('token',data.token)
-				this.$store.commit('updateStatus',user_key)
+				this.$store.commit('updateStatus',data)
 				this.login(data);
 			},
 			passwordClick() { //密码显隐操作

+ 174 - 226
pages/login/register.vue

@@ -1,78 +1,23 @@
 <template>
 	<view class="container register" :style="{paddingTop:CustomBar+'px'}">
 		<cu-custom :navbar-data='nvabarData'  @navigateBack="hanldNavigateBack"></cu-custom>
-		<view class="register-tab">
-			<view class="nav-item" :class="{ current: tabCurrentIndex === 1 }" >
-				  账户信息<view class="line"></view>
-			</view>					
-			<view class="nav-item" :class="{ current: tabCurrentIndex === 2 }" >
-				  基本信息<view class="line"></view>
-			</view>
-			<view class="nav-item" :class="{ current: tabCurrentIndex === 3 }" >
-				  详细信息
-			</view>
-		</view>
 		<view class="register-main clearfix" v-if="tabCurrentIndex === 1">
-			<view class="register-row clearfix">
-				<view class="register-from">
-					<view class="label">邮箱:</view>
-					<input class="row-input" type="text" name="input" v-model="registerEmail" placeholder="请输入您的常用邮箱" maxlength="30"/>
-				</view>
-			</view>
-			<view class="register-row clearfix">
-				<view class="register-from code">
-					<view class="label">邮箱验证码:</view>
-					<input class="row-input" type="text"  name="input" v-model="regEmailCode" placeholder="请输入邮箱验证码" maxlength="4"/>
-				</view>
-				<view class="register-from btn" :class="[isEmialDisabled ? 'disabled' : '']">
-					<button class="row-input"  
-							type="button"  
-							@click.stop="getEmailCodeFn"  
-							:disabled="isEmialDisabled">
-							{{ emailCodeText }}
-					</button>
-				</view>
-			</view>
-			<view class="register-row clearfix">
-				<view class="register-from">
-					<view class="label">登录密码:</view>
-					<input class="row-input" type="password" name="input" v-model="password" placeholder="密码必须为8-16位字母数字组合" maxlength="16"/>
-				</view>
-			</view>
-			<view class="register-row clearfix">
-				<view class="register-from">
-					<view class="label">确认密码:</view>
-					<input class="row-input" type="password" name="input" v-model="passwordCheck" placeholder="请确认密码" maxlength="16"/>
-				</view>
-			</view>
-			<view class="register-row clearfix">
-				<view class="register-btn"  @click="registerStepsfirst">下一步</view>
-			</view>
-			<view class="register-row">
-				<view class="register-text">
-					<text class="txt">注:</text>
-					<text>邮件可能存在1-2分钟的延迟,同时请留意垃圾箱邮件!</text>
-				</view>
-			</view>
-		</view>
-		<view class="register-main clearfix" v-if="tabCurrentIndex === 2">
-			<view class="register-row clearfix">
-				<view class="register-from">
-					<view class="label">机构名称:</view>
-					<input class="row-input" type="text" name="input" v-model="clubName" placeholder="请输入您的机构名称" maxlength="30"/>
-				</view>
+			<view class="register-logo">
+				<image class="logo" src="../../static/login-logo@3x.png" mode=""></image>
+				<text class="logo-text">生美/医美采购服务平台</text>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">联系人:</view>
-					<input class="row-input" type="text" name="input" v-model="clubContact" placeholder="请输入联系姓名" maxlength="6"/>
+					<input class="row-input" type="text" name="input" v-model="userName" placeholder="请输入联系姓名" maxlength="6"/>
 				</view>
 			</view>
-			<view class="register-row clearfix">
+			<view class="register-row none clearfix">
 				<view class="register-from">
 					<view class="label">手机号:</view>
-					<input class="row-input" type="number" name="input" v-model="registerMobile" placeholder="请输入手机号" maxlength="11"/>
+					<input class="row-input" type="number" name="input" v-model="bindMobile" placeholder="请输入手机号" maxlength="11"/>
 				</view>
+				<view class="register-tip"><text>提示:手机号可用作登陆账号</text></view>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from imgcode">
@@ -104,14 +49,50 @@
 				</view>
 			</view>
 			<view class="register-row clearfix">
-				<view class="register-btn"  @click="registerStepsTwo">下一步</view>
+				<view class="register-from">
+					<view class="label">登录密码:</view>
+					<input class="row-input" type="password" name="input" v-model="password" placeholder="密码必须为8-16位字母数字组合" maxlength="16"/>
+				</view>
 			</view>
 			<view class="register-row clearfix">
-				<view class="register-btn none"  @click="steps(1)">上一步</view>
+				<view class="register-from">
+					<view class="label">确认密码:</view>
+					<input class="row-input" type="password" name="input" v-model="passwordCheck" placeholder="请确认密码" maxlength="16"/>
+				</view>
+			</view>
+			<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 @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 ">
+					<view class="register-btn sub" @click.stop="registerStepsfirst">注册</view>
+				</view>
 			</view>
 		</view>
-		<view class="register-main detailed clearfix" v-if="tabCurrentIndex === 3">
-			<view class="register-tips"><text class="iconfont icon-gantanhao-yuankuang">详细信息请尽量填写,有利于快速审核通过</text></view>
+		<view class="register-main detailed clearfix" v-if="tabCurrentIndex === 2">
+			<view class="register-row clearfix">
+				<view class="register-title first"><text>补充以下详细信息即可升级为会员机构,</text></view>
+				<view class="register-title"><text>享受更多更好的服务。</text></view>
+			</view>	
+			<view class="register-row none clearfix">
+				<view class="register-from">
+					<view class="label">邮箱:</view>
+					<input class="row-input" type="text" name="input" v-model="registerEmail" placeholder="请输入您的常用邮箱" maxlength="30"/>
+				</view>
+				<view class="register-tip"><text>提示:邮箱可用作登录账号,请使用公司邮箱或法人邮箱</text></view>
+			</view>
+			<view class="register-row clearfix">
+				<view class="register-from">
+					<view class="label">机构名称:</view>
+					<input class="row-input" type="text" name="input" v-model="clubName" placeholder="请输入您的机构名称" maxlength="30"/>
+				</view>
+			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">机构简称:</view>
@@ -159,8 +140,6 @@
 						</view>
 					</view>
 				</view>
-			</view>
-			<view class="register-row clearfix">
 				<view class="register-picture">
 					<view class="label">门头照:</view>
 					<view class="upload-picture">
@@ -198,7 +177,7 @@
 				</view>
 			</view>
 			<view class="register-row clearfix" v-if="isOrganizationType == 1">
-				<view class="register-picture">
+				<view class="register-picture zz">
 					<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>
@@ -270,20 +249,11 @@
 				</view>
 			</view>
 			<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 @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 class="register-row clearfix">
+					<view class="register-btn none"  @click="registerGoLogin">先跳过,以后再升级</view>
 				</view>
 				<view class="register-row ">
-					<view class="register-btn sub" @click.stop="registerStepsSub">提交审核</view>
-				</view>
-				<view class="register-row clearfix">
-					<view class="register-btn none"  @click="steps(2)">上一步</view>
+					<view class="register-btn sub" @click.stop="registerStepsSub">确认升级并提交审核</view>
 				</view>
 			</view>
 			<mpvue-city-picker :themeColor="themeColor"
@@ -299,9 +269,10 @@
 <script>
 	import { mapMutations } from 'vuex';
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
+	import { beautyList,mentuzCampNullList,medicaCampNullList } from '@/common/json/data.json.js' //本地数据
 	import authorize from '@/common/config/authorize.js' 
-	import { organizationRegister , organizationVerifyRegisterFirst ,organizationVerifyRegisterTwo } from "@/api/use.js"
-	import { getImageCode, getEmailCode, getMobileCode, uploadFileImage } from "@/api/utils.js"
+	import { organizationVerifyRegisterFirst,organizationRegister ,organizationLogin } from "@/api/use.js"
+	import { getImageCode, getMobileCode, uploadFileImage } from "@/api/utils.js"
 	export default{
 		components:{
 			mpvueCityPicker
@@ -316,22 +287,17 @@
 				CustomBar:this.CustomBar,// 顶部导航栏高度
 				tabCurrentIndex:1,			//显示step
 				isPreviewImage:false,   	//预览图片开关
-				isEmialDisabled: false,		//验证码按钮控制
 				isMobileDisabled: false,	//手机验证码按钮控制
-			    count: '',					//倒计时
-			    mobilCount: '',					//倒计时
-			    emailCodeText: '获取验证码',
+			    mobilCount: '',				//倒计时
 			    mobileCodeText: '获取验证码',
-			    codeTime: null,
 			    mobilTime: null,
 				registerEmail:'', 		//注册邮箱
-				regEmailCode:'',  		//邮箱验证码
 				password:'',			//密码
 				passwordCheck:'',		//校验密码
 				clubName:'',	 		//机构名称
 				abbreviation:'',	 	//机构简称
-				clubContact:'',	 		//联系人
-				registerMobile:'',		//联系人手机号
+				userName:'',	 		//联系人
+				bindMobile:'',		//联系人手机号
 				mobileCode:'',			//手机验证码
 				imageCode:'',			//图形验证码
 				imageCodeUrl:'',		//图形验证码图片
@@ -350,18 +316,9 @@
 				mainpro:'',				//主营内容
 				isOrganizationType:0,
 				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'}
-				],
+				beautyList:beautyList,
+				mentuzCampList:mentuzCampNullList,
+				medicaCampList:medicaCampNullList,
 				typtIndex:0,
 				organizationType:3,
 				current:0,
@@ -374,11 +331,16 @@
 					provinceID:'',		//区ID
 					addressDetail: '',	//地址
 				},
+				userID:'',		//机构userID
+				clubID:'',		//机构ID
+				getOption:''	//页面传递参数
 			}
 		},
 		onLoad(option) {
+			this.getOption = JSON.stringify(option)
 		},
 		methods:{
+			...mapMutations(['login']),
 			hanldNavigateBack(){
 				this.$util.modal('','注册尚未完成,确定放弃注册吗?','确定','取消',true,() =>{
 					uni.navigateBack({
@@ -388,47 +350,78 @@
 			},
 			registerStepsfirst(){
 				let params ={
-						email:this.registerEmail,
-						mailboxCode:this.regEmailCode,
+						userName:this.userName,
+						bindMobile:this.bindMobile,
+						activationCode:this.mobileCode,
 						password:this.password,
 						passWordConfirm:this.passwordCheck,
-						whichStep:1,
+						isAgreed:this.isAgreed,				//是否勾选协议
 				}
-				organizationVerifyRegisterFirst(params).then(res =>{
-					this.tabCurrentIndex = 2
-					this.getVerificationCode()
+				organizationVerifyRegisterFirst(params).then(response =>{
+					this.$util.msg('注册成功',2000);	
+					this.userID = response.data.userID
+					this.clubID = response.data.clubID
+					setTimeout(()=>{
+						this.tabCurrentIndex = 2
+						this.nvabarData.title = '升级会所机构'
+					},2000)
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000);
 				})
 			},
-			registerStepsTwo(){
-				let params ={
-						name:this.clubName,
-						linkMan1:this.clubContact,
-						bindMobile:this.registerMobile,
-						activationCode:this.mobileCode,
-						whichStep:2,
-				}
-				organizationVerifyRegisterTwo(params).then(res =>{
-					this.tabCurrentIndex = 3
+			registerGoLogin(){
+				organizationLogin({mobileOrEmail:this.bindMobile,password:this.password,source:'www'}).then(response =>{
+					this.storeUpdataeStatus(response.data)
+					this.$api.navigateTo('/pages/login/bindwechat')
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000);
 				})
 			},
+			storeUpdataeStatus(data){
+				uni.setStorageSync('token',data.token)
+				this.$store.commit('updateStatus',data)
+				this.login(data);
+			},
 			registerStepsSub(){
-				if(!this.isCheck){
-					this.$util.msg('请勾选同意协议',2000);
+				if( this.registerEmail == ''){
+					this.$util.msg('请输入邮箱地址',2000);
+					return
+				}
+				if( !this.$reg.isEmail(this.registerEmail)){
+					this.$util.msg('请输入正确的邮箱地址',2000);
+					return
+				}
+				if( this.clubName == ''){
+					this.$util.msg('请输入机构名称',2000);
+					return
+				}
+				if( this.addressData.townID == ''){
+					this.$util.msg('请选择机构地址',2000);
 					return
 				}
+				if( this.addressData.addressDetail == ''){
+					this.$util.msg('请填写机构详细地址',2000);
+					return
+				}
+				if( this.socialCreditCode == ''){
+					this.$util.msg('请填写社会统一社会信用代码',2000);
+					return
+				}
+				if( this.uploadBusinessImage == ''){
+					this.$util.msg('请上传您的营业执照',2000);
+					return
+				}
+				if(this.isOrganizationType!=0){
+					if(this.mainpro == ''){
+						this.$util.msg('请选择住机构主营内容',2000);
+						return
+					}
+				}
 				let params ={
-						email:this.registerEmail,
-						mailboxCode:this.regEmailCode,
-						password:this.password,
-						passWordConfirm:this.passwordCheck,
+						userID:this.userID,
+						clubID:this.clubID,
+						contractEmail1:this.registerEmail,
 						name:this.clubName,
-						linkMan1:this.clubContact,
-						bindMobile:this.registerMobile,
-						activationCode:this.mobileCode,
 						sname:this.abbreviation,
 						provinceID:this.addressData.provinceID,
 						cityID:this.addressData.cityID,
@@ -438,61 +431,26 @@
 						businessLicenseImage:this.uploadBusinessImage,
 						headpic:this.uploadMentuzImage,
 						firstClubType:this.isOrganizationType, //机构类型分类 医美:0和生美:1
-						secondClubType:this.secondClubType,	//机构类型二级分类 诊所:1,门诊:2,医院:3
+						secondClubType:this.secondClubType,	 //机构类型二级分类 诊所:1,门诊:2,医院:3
 						department:this.department,			//科室
 						medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
-						isAgreed:this.isAgreed,				//是否勾选协议	
-						mainpro:this.mainpro,
-						whichStep:3
+						mainpro:this.mainpro
 				}
 				organizationRegister(params).then(res =>{
-					this.$util.msg('您的机构账号已提交审核',2000);
+					this.$util.msg('您的升级申请已提交审核',2000);
 					setTimeout(()=>{
-						this.$api.switchTabTo('/pages/tabBar/home/home')
+						this.registerGoLogin()
 					},2000)
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000);
 				})
 			},
-			getEmailCodeFn(){
-				if( this.registerEmail == ''){
-					this.$util.msg('请输入邮箱地址',2000);
-					return
-				}
-				if(!this.$reg.isEmail(this.registerEmail)){
-					this.$util.msg('请输入正确的邮箱地址',2000);
-					return
-				}
-				this.isEmialDisabled = true;
-				getEmailCode({email:this.registerEmail,status:2}).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--
-			         			this.emailCodeText = this.count +'s重新发送'
-			        		} else {
-				         		clearInterval(this.codeTime)
-				         		this.codeTime = null
-								this.emailCodeText = '获取验证码'
-								this.isEmialDisabled = false;
-			        		}
-			       		},1000)
-			      	}
-				}).catch( error =>{
-					this.$util.msg(error.msg,2000);
-					this.isEmialDisabled = false;
-				})
-			},
 			getMobileCodeFn(){
-				if( this.registerMobile == ''){
+				if( this.bindMobile == ''){
 					this.$util.msg('请输入手机号',2000);
 					return
 				}
-				if(!this.$reg.isMobile(this.registerMobile)){
+				if(!this.$reg.isMobile(this.bindMobile)){
 					this.$util.msg('请输入正确的手机号',2000);
 					return
 				}
@@ -501,7 +459,7 @@
 					return
 				}
 				let params = {
-						mobile:this.registerMobile,
+						mobile:this.bindMobile,
 						activateCodeType:2,
 						platformType:2,
 						imgCode:this.imageCode,
@@ -682,12 +640,10 @@
 					let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue}
 					this.medicaCampList.push(item)
 				}
-			},
-			steps(index) {//$attrstab切换
-				this.tabCurrentIndex = index;
 			}
 		},
 		onShow() {
+			this.getVerificationCode()
 			if(this.isPreviewImage){
 				this.isPreviewImage = false
 				return
@@ -700,69 +656,40 @@
 	.register{
 		width: 100%;
 		height: auto;
-		.model-warp.none{
-			display: none;			
-		}
-		.model-warp.show{
-			display: block;
-		}
-		.register-tab{
-			width: 570rpx;
-			height: 60rpx;
-			padding: 60rpx 90rpx;
-			position: relative;
-			.nav-item{
-				width: 142rpx;
-				background: #FFFFFF;
-				line-height: 60rpx;
-				border-radius: 30rpx;
-				text-align: center;
-				color: #999999;
-				font-size:$font-size-26;
-				float: left;
-				margin-right: 72rpx;
-				position: relative;
-				.line{
-					height: 3rpx;
-					width: 50rpx;
-					background: #999999;
-					position: absolute;
-					right: -58rpx;
-					top: 32rpx;
-				}
-				&:last-child{
-					margin-right: 0;
-				}
-				&.current{
-					color:#FFFFFF;
-					background: $btn-confirm;
-					
-				}
-			}
-		}
 		.register-main{
 			width: 100%;
 			height: auto;
-			&.detailed{
-				padding-bottom: 330rpx;
-			}
-			.register-tips{
+			.register-logo{
+				width: 100%;
 				display: flex;
 				flex-direction: column;
 				align-items: center;
-				line-height: 44rpx;
-				font-size: $font-size-24;
-				color: #FF0000;
-				margin-bottom: 40rpx;
-				.iconfont{
-					font-size: $font-size-24;
+				height: 198rpx;
+				padding:60rpx 0 40rpx 0;
+				.logo{
+					width: 138rpx;
+					height: 118rpx;
+					display: block;
+				}
+				.logo-text{
+					font-size: 30rpx;
+					line-height: 44rpx;
+					color: $color-system;
+					font-weight: 600;
+					margin-top: 20rpx;
 				}
 			}
+			&.detailed{
+				padding-bottom: 330rpx;
+			}			
 			.register-row{
 				width: 702rpx;
 				height: auto;
 				padding: 0 24rpx;
 				margin-bottom: 20rpx;
+				&.none{
+					margin-bottom: 0;
+				}
 				.register-text{
 					line-height: 44rpx;
 					margin-top: 100rpx;
@@ -773,6 +700,21 @@
 						margin-right: 15rpx;
 					}
 				}
+				.register-title{
+					line-height: 44rpx;
+					font-size: $font-size-24;
+					color: $text-color;
+					text-align: left;
+					&.first{
+						margin-top: 20rpx;
+					}
+				}
+				.register-tip{
+					line-height: 64rpx;
+					font-size: $font-size-24;
+					color: #CECECE;
+					text-align: left;
+				}
 				.register-from{
 					width: 654rpx;
 					height: 40rpx;
@@ -963,7 +905,7 @@
 						align-items: center;
 						&.btn{
 							margin: 0 auto;
-							margin-left: 126rpx;
+							margin-left: 116rpx;
 						}
 						.row-input{
 							display: flex;
@@ -1043,7 +985,12 @@
 			}
 			.register-picture{
 				height: 102rpx;
-				margin: 40rpx 0 0 0;
+				margin: 30rpx 0;
+				width: 42%;
+				float: left;
+				&.zz{
+					width: 100%;
+				}
 				.label{
 					float: left;
 					font-size: $font-size-28;
@@ -1160,8 +1107,9 @@
 				background: $btn-confirm;
 				margin-top: 96rpx;
 				&.none{
+					border: 1px solid $color-system;
 					background: #FFFFFF;
-					color: $text-color;
+					color:$color-system;
 					margin-top: 0;
 				}
 				&.sub{

+ 27 - 14
pages/tabBar/home/home.vue

@@ -72,12 +72,23 @@
 									<text class="mclap">{{item.name}}</text>
 								</view>
 								<view class="" v-if="isLogin">
-									<view class="title-none" v-if="item.price1TextFlag == '1'">
-										<text class="p big">未公开价格</text>
+									<view v-if="userIdentity == 4">
+										<view class="title-none" v-if="item.price1TextFlag == '1' || item.price1TextFlag == '2'">
+											<text class="p big">未公开价格</text>
+										</view>
+										<view class="price tui-skeleton-rect" v-else>
+											<text class="p sm">¥</text>
+											<text class="p big">{{item.retailPrice!=null ? item.retailPrice.toFixed(2):''}}</text>
+										</view>
 									</view>
-									<view class="price tui-skeleton-rect" v-else>
-										<text class="p sm">¥</text>
-										<text class="p big">{{item.retailPrice!=null ? item.retailPrice.toFixed(2):''}}</text>
+									<view v-else>
+										<view class="title-none" v-if="item.price1TextFlag == '1'">
+											<text class="p big">未公开价格</text>
+										</view>
+										<view class="price tui-skeleton-rect" v-else>
+											<text class="p sm">¥</text>
+											<text class="p big">{{item.retailPrice!=null ? item.retailPrice.toFixed(2):''}}</text>
+										</view>
 									</view>
 								</view>
 								<view v-else class="no-price">
@@ -168,13 +179,14 @@
 				isLogin:false,
 				bannerImageList:[],
 				skeletonShow: true,
+				userIdentity:'',
 				organizeProducts:[],//常用商品
 				productsClassifyList:[
-					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/icon-vip%403x.png',classifyName:'采美采购'},
-					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/icon-vip%403x.png',classifyName:'采美采购'},
-					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/icon-vip%403x.png',classifyName:'采美采购'},
-					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/icon-vip%403x.png',classifyName:'采美采购'},
-					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/icon-vip%403x.png',classifyName:'采美采购'}
+					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'},
+					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'},
+					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'},
+					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'},
+					{classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'}
 				],//分类导航
 				firstModulesName:'https://img.caimei365.com/group1/M00/03/8C/Cmis215XHXSAAZU0AACaPrfbB8I435.png', //优惠模块1
 				secondModulesName:'', //优惠模块2
@@ -182,8 +194,8 @@
 				secondModulesImage:'',//优惠模块icon2
 				thirdModulesName:'', //优惠模块3
 				navInforList:[
-					{text:'会员中心',icon:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/icon-vip%403x.png'},
-					{text:'在线客服',icon:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/icon-kefu%403x.png'}
+					{text:'会员中心',icon:'https://img.caimei365.com/group1/M00/03/9E/Cmis216iRzOAEGPnAAA4hM3shV4061.png'},
+					{text:'在线客服',icon:'https://img.caimei365.com/group1/M00/03/9E/Cmis216iRzOAFXZBAABKeY23aWA452.png'}
 				],
 				navServerList:[
 					{text:'会员优惠',icon:'../../../static/temp/server1@2x.png',path:'/pages/service/member'},
@@ -208,6 +220,7 @@
 						userInfoLogin({code:wechatcode,encryptedData:wxResponse.encryptedData,iv:wxResponse.iv}).then(response =>{
 							this.isLogin = true;
 							this.userID = response.data.userID;						
+							this.userIdentity = response.data.userIdentity;						
 							this.$store.commit('updateStatus',response.data)
 							this.login(response.data);
 							uni.setStorageSync('token',response.data.token)
@@ -286,8 +299,7 @@
 				console.log(e.detail.query)
 			},
 			showTost(){
-				// this.$util.msg("正在开发中,敬请期待~",2000)
-				this.$api.navigateTo(`/seller/pages/login/login`)
+				this.$util.msg("正在开发中,敬请期待~",2000)
 				// uni.navigateToMiniProgram({
 				// 	appId: 'wx5a5cda32926f55ac',
 				// 	path: '/pages/tabBar/home/home',
@@ -325,6 +337,7 @@
 		},
 		onPullDownRefresh() {//下拉刷新
 			this.getHomeInformation()
+			this.getOrganizeProducts()
 			uni.stopPullDownRefresh()
 		},
 		onShareAppMessage(res){//分享转发

+ 71 - 33
pages/tabBar/user/user.vue

@@ -21,7 +21,7 @@
 			<view class="user-order">
 				<view class="tab-title" @click="navigator('/pages/user/order/order-list?state=0')">
 					<text class="cell-tit">我的订单</text>
-					<text class="cell-more">查看更多</text>
+					<text class="cell-more">查看全部</text>
 					<text class="iconfont icon-xiayibu"></text>
 				</view>
 				<view class="order-section">
@@ -84,6 +84,15 @@
 			</view>
 			<!-- 底部跳转 -->
 			<view class="foot-list">
+				<view class="list-cell-item" v-show="userIdentity == 4">
+					<view class="list-cell" @click="navigator(`/pages/login/apply?clubStatus=${clubStatus}`)" hover-class="cell-hover" :hover-stay-time="50">
+						<text class="cell-tit">升级会员机构</text>
+						<text class="cell-more">
+							<text class="txt">{{clubStatusText(clubStatus)}}</text>
+							<text class="iconfont icon-xiayibu"></text>
+						</text>
+					</view>
+				</view>
 				<view class="list-cell-item">
 					<view class="list-cell"  v-for="(item, index) in firstList" :key="index" @click="navigator(item.path)" hover-class="cell-hover" :hover-stay-time="50">
 						<text class="cell-tit">{{item.name}}</text>
@@ -97,7 +106,7 @@
 					</view>
 				</view>
 				<view class="list-cell-item">
-					<view class="list-cell" @click="navigator('/pages/user/setting/setting')" hover-class="cell-hover" :hover-stay-time="50">
+					<view class="list-cell" @click="navigator(`/pages/user/setting/setting?phone=${bindMobile}`)" hover-class="cell-hover" :hover-stay-time="50">
 						<text class="cell-tit">账户设置</text>
 						<text class="cell-more iconfont icon-xiayibu"></text>
 					</view>
@@ -135,6 +144,9 @@
 				openid:'',
 				aboutHtml:'',
 				telPhone:'',
+				bindMobile:'',
+				clubStatus:'',	//机构升级会员机构审核状态1:待审核  91:审核失败
+				userIdentity:'', //机构等级
 				confirmedCount:0,//待确认
 				paymentCount:0, //待付款角标
 				waitShipmentsCount:0, //待收货角标
@@ -162,30 +174,37 @@
 				personalInfo({userID:this.userID}).then(response =>{
 					this.$store.commit('updateAllNum',response.data.count)
 					let data =response.data
-					let _userData = data.user
-					let _clubData = data.club
-					if(_userData.ableUserMoney == 0 || _userData.ableUserMoney ==null){
+					let $userData = data.user
+					let $clubData = data.club
+					if($userData.ableUserMoney == 0 || $userData.ableUserMoney ==null){
 						this.userMoney = '0.00';
 					}else{
-						let i =  _userData.ableUserMoney.toString().lastIndexOf('.');
+						let i =  $userData.ableUserMoney.toString().lastIndexOf('.');
 						let money;
 						if(i==-1){
-							money = this.$api.FormatMoney(_userData.ableUserMoney); //会所剩余余额
+							money = this.$api.FormatMoney($userData.ableUserMoney); //会所剩余余额
 							this.userMoney = money +'.00'
 						}else{
-							money = this.$api.FormatMoney(_userData.ableUserMoney); //会所剩余余额
+							money = this.$api.FormatMoney($userData.ableUserMoney); //会所剩余余额
 							this.userMoney = money
 						}
 					}
-					this.name = _clubData.name //会所名称
-					this.headpic = _userData.image //会所头像
+					this.userIdentity = $userData.userIdentity //机构等级
+					if(this.userIdentity == 2){
+						this.name = $clubData.name //会员机构名称
+					}else{
+						this.name = $userData.userName //普通机构名称
+					}
+					this.headpic = $userData.image //会所头像
+					this.bindMobile = $userData.bindMobile//登录手机号
+					this.clubStatus = $userData.clubStatus //机构审核状态
 					this.contactNumber = data.organize.contactNumber //联系电话		
 					this.confirmedCount = this.showBadge(data.confirmedCount)//待确认
 					this.paymentCount = this.showBadge(data.paymentCount)//待付款
 					this.waitShipmentsCount = this.showBadge(data.waitShipmentsCount)//待收货		
 					this.shipmentsCount = this.showBadge(data.shipmentsCount)//已发货	
 					this.salesReturnCount = this.showBadge(data.salesReturnCount)//退货/款	
-					let clubInfo ={name:this.name,image:this.headpic,clubID:_clubData.clubID}
+					let clubInfo ={name:this.name,image:this.headpic,clubID:$clubData.clubID}
 					uni.setStorage({//缓存机构
 						key: 'clubInfo',  
 						data: clubInfo  
@@ -206,29 +225,44 @@
 				let num ='';
 				if(n>100){num = 99}else{num = n;}
 				return num;
-			},
-			onPullDownRefresh() {//下拉刷新
-				this.getUserInfo()
-				uni.stopPullDownRefresh()
-			},
-			onShow(){
-				if(this.hasLogin){
-					this.$api.getStorage().then((resolve) =>{
-						this.userID = resolve.userID
-						this.getUserInfo()
-					})
-				}else{
-					this.$store.commit('updateAllNum',0)
-					authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-						if(wxResponse == 1){
-							this.$api.redirectTo('/pages/login/login-accont?type=0')
-						}else{
-							this.$api.navigateTo('/pages/authorization/authorization?type=0')
-						}
-					})	
+			},	
+			clubStatusText(state){
+				let stateText;
+				switch(state){
+					case 90:
+						 stateText = ''
+						 break;
+					case 1:
+						 stateText = '待审核'
+						 break;
+					case 92:
+						 stateText = '审核不通过'
+						 break;
 				}
-			},			
-		}
+				return stateText
+			}
+		},
+		onPullDownRefresh() {//下拉刷新
+			this.getUserInfo()
+			uni.stopPullDownRefresh()
+		},
+		onShow(){
+			if(this.hasLogin){
+				this.$api.getStorage().then((resolve) =>{
+					this.userID = resolve.userID
+					this.getUserInfo()
+				})
+			}else{
+				this.$store.commit('updateAllNum',0)
+				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
+					if(wxResponse == 1){
+						this.$api.redirectTo('/pages/login/login-accont?type=0')
+					}else{
+						this.$api.navigateTo('/pages/authorization/authorization?type=0')
+					}
+				})	
+			}
+		}	
 	}
 </script>
 
@@ -408,6 +442,10 @@
 			font-size:$font-size-28;
 			color:$text-color;
 			margin-left:10rpx;
+			.txt{
+				color: #FB4343;
+				padding-right: 10rpx;
+			}
 		}
 		.cell-tit{
 			flex: 1;

+ 267 - 280
pages/user/setting/phone.vue

@@ -1,312 +1,299 @@
 <template>
-	<view class="container clearfix">
-		<view v-if="isEmpty" class="empty-container">
-			<image class="empty-container-image" src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AFmO1AAGxLZjSeDg040.png" mode="aspectFit"></image>
-			<view class="txt">您还没有收货地址</view>
-			<view class="txt">点击底部按钮添加收货地址吧~~</view>
-			<view class="login-btn" @click="addAddress('add')">添加新地址</view>
-		</view>
-		<view v-else class="address-list" :style="{'height': scrollHeight + 'px'}">
-			<scroll-view scroll-y="true" :style="{'height': scrollHeight + 'px'}">
-				<view class="list" v-for="(item, index) in addressList" :key="index" @click="checkAddress(item)">
-					<view class="wrapper">
-						<view class="u-box">
-							<text class="name">{{item.shouHuoRen}}</text>
-							<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>
-						</view>
-						<view class="u-box b-t">
-							<view v-if="item.defaultFlag == 1" class="tag-left">
-								<view class="tag">默认地址</view>
-							</view>
-							<view v-else class="tag-left"></view>
-							<view class="tag-right">
-								<view class="t-b"  @click.stop="deleteAddress(item.addressID)">
-									<text class="iconfont icon-shanchu"></text>
-									<text class="txt">删除</text>
-								</view>
-								<view class="t-b"  @click.stop="addAddress('edit',item)">
-									<text class="iconfont icon-bianji"></text>
-									<text class="txt">编辑</text>
-								</view>
-								
-							</view>
-						</view>
-					</view>
+	<view class="container register">
+		<view class="register-main first clearfix">
+			<view class="register-row clearfix">
+				<view class="register-from">
+					<view class="label">原手机号:</view>
+					<view class="row-input">{{bindMobile}}</view>
+				</view>
+			</view>
+			<view class="register-row clearfix">
+				<view class="register-from code">
+					<input class="row-input" type="number" v-model="mobileCode" placeholder="请输入原手机号的验证码" maxlength="6"/>
+				</view>
+				<view class="register-from btn" :class="[isMobileDisabled  ? 'disabled' : '']">
+					<button class="row-input"  type="button" @click.stop="getMobileCodeFn" :disabled="isMobileDisabled">{{ mobileCodeText }}</button>
+				</view>
+			</view>
+			<view class="register-row clearfix">
+				<view class="register-from">
+					<input class="row-input" type="number" v-model="contractMobile" placeholder="请输入新手机号" maxlength="11"/>
 				</view>
-			</scroll-view>
-			<view class="add-btn" @click="addAddress('add')">添加新地址</view>
+			</view>
+			<view class="register-row clearfix">
+				<view class="register-from code">
+					<input class="row-input" type="number" v-model="newMobileCode" placeholder="请输入新手机号的验证码" maxlength="6"/>
+				</view>
+				<view class="register-from btn" :class="[isNewMobileDisabled  ? 'disabled' : '']" >
+					<button class="row-input"  type="button" @click.stop="getNewMobileCodeFn" :disabled="isNewMobileDisabled">{{ newMobileCodeText }}</button>
+				</view>
+			</view>
+			<view class="register-row clearfix">
+				<view class="register-btn"  @click="bindMobileCheck">确定</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/cm-module/modelAlert/modelAlert.vue'
-	export default {
-		components:{
-			modelAlert
-		},
+	import { mapMutations } from 'vuex';
+	import { getClubMobileCode,getClubNewMobileCode } from "@/api/utils.js" 
+	import { changeMobile } from "@/api/use.js" 
+	var self;
+	export default{
 		data() {
-			return {
-				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:''//上一个页面
-			}
+			return{
+				userID:'',					//用户ID
+			    count: '',					//倒计时
+			    newCount: '',				//倒计时
+			    codeTime: null,
+			    codeTimeNew: null,
+				bindMobile:'',				//联系人手机号
+				contractMobile:'',			//新联系人手机号
+				mobileCode:'',				//手机号验证码
+				newMobileCode:'',			//新手机号手机验证码
+				mobileCodeText: '获取验证码',
+				newMobileCodeText: '获取验证码',
+				isMobileDisabled: false,	//手机验证码按钮控制
+				isNewMobileDisabled: false,	//手机验证码按钮控制
+			}	
 		},
-		onLoad(option){	
-			if(option.type=='select'){this.isSelect = true;}
-			this.setScrollHeight();
+		onLoad(option) {
+			this.bindMobile = option.phone
 		},
-		onReachBottom() {
-			if(this.isLoadMore) {
-				this.initAddressList();
-			}
-		},
-		methods: {
-			setScrollHeight() {
-				// 窗口高度 - 底部距离
-				setTimeout(()=> {
-					const query = wx.createSelectorQuery().in(this);
-					query.selectAll('.add-btn').boundingClientRect();
-					query.exec(res => {
-						if(res[0][0]){
-							let winHeight = this.$api.getWindowHeight(),
-								eleTop = res[0][0].top - 1;
-								this.scrollHeight =  eleTop;
-						}
-					})
-				}, 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;
-								}
-							}
-						}
-					)
+		methods:{
+			bindMobileCheck(){
+				let params = {
+						contractMobile2:this.bindMobile,
+						contractMobile:this.contractMobile,
+						mobileCode:this.mobileCode,
+						newMobileCode:this.newMobileCode,
+						userID:this.userID
+				}
+				changeMobile(params).then(response =>{
+					this.$util.msg('修改成功',1500,true,'success')
+					setTimeout(()=>{
+						uni.navigateBack({delta: 1})
+					},2000)
+				}).catch( error =>{
+					this.$util.msg(error.msg,2000);
 				})
 			},
-			//选择地址
-			checkAddress(item){
-				//是否需要返回地址(从订单确认页跳过来选收货地址)
-				if(!this.isSelect){return ;}
-				uni.setStorageSync('selectAddress',item)
-				var pages = getCurrentPages();
-				var prevPage = pages[pages.length - 2];  //上一个页面	
-					prevPage.setData({select:'select'})
-				uni.navigateBack();
-			},
-			addAddress(type,item){
-				uni.navigateTo({
-					url: `/pages/user/address/addressManage?type=${type}&data=${JSON.stringify(item)}`
+			getMobileCodeFn(){
+				if( this.bindMobile == ''){
+					this.$util.msg('请输入手机号',2000);
+					return
+				}
+				if(!this.$reg.isMobile(this.bindMobile)){
+					this.$util.msg('请输入正确的手机号',2000);
+					return
+				}
+				let params = { mobile : this.bindMobile }
+				this.isMobileDisabled = true;
+				getClubMobileCode(params).then(response =>{
+					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( error =>{
+					this.$util.msg(error.msg,2000);
+					this.isMobileDisabled = false;
 				})
 			},
-			//删除收货地址
-			deleteAddress(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,2000);
-								this.isShowDelModal = false;
-								setTimeout(function(){
-									uni.switchTab({
-										url:'/pages/tabBar/home/home'
-									})
-								},1000)
-							}
-						}
-					)
-				})	
-			},
+			getNewMobileCodeFn(){
+				if( this.contractMobile == ''){
+					this.$util.msg('请输入手机号',2000);
+					return
+				}
+				if(!this.$reg.isMobile(this.contractMobile)){
+					this.$util.msg('请输入正确的手机号',2000);
+					return
+				}
+				let params = { newMobile : this.contractMobile }
+				this.isNewMobileDisabled = true;
+				getClubNewMobileCode(params).then(response =>{
+					this.$util.msg('验证短信已发送',2000);
+					const TIME_COUNT = 60;
+			     	if (!this.codeTimeNew) {
+			       		this.newCount = TIME_COUNT;
+			       		this.isNewMobileDisabled = true;
+			       		this.codeTimeNew = setInterval(() => {
+			       			if (this.newCount > 1 && this.newCount <= TIME_COUNT) {
+			         			this.newCount--
+			         			this.newMobileCodeText = this.newCount +'s重新发送'
+			        		} else {
+				         		this.isNewMobileDisabled = false;
+				         		clearInterval(this.codeTimeNew)
+				         		this.codeTimeNew = null
+								this.newMobileCodeText = '获取验证码'
+			        		}
+			       		},1000)
+			      	}
+				}).catch( error =>{
+					this.$util.msg(error.msg,2000);
+					this.isNewMobileDisabled = false;
+				})
+			}
 		},
 		onShow() {
-			this.pageNum = 1;
-			this.addressList = [];
-			this.initAddressList();
-			var pages = getCurrentPages();
-			var prevPage = pages[pages.length - 2];  //上一个页面	
-				// prevPage.setData({select:''})
+			this.$api.getStorage().then((resolve) =>{
+				this.userID = resolve.userID
+			})
 		}
 	}
 </script>
 
-<style lang='scss'>
-	page {
-		height: auto;
-	}
-	page,.container{
-		/* padding-bottom: 120upx; */
-		background: #F7F7F7;
-		border-top: 1px solid #EBEBEB;
-	}
-	.container{
-		position: relative;
-	}
-	.list{
-		display: flex;
-		align-items: center;
-		width: 702rpx;
+<style lang="scss">
+	.register{
+		width: 100%;
 		height: auto;
-		padding: 24rpx;
-		background: #FFFFFF;
-		position: relative;
-		border-bottom: 1px solid #EBEBEB;
-	}
-	.wrapper{
-		display: flex;
-		flex-direction: column;
-		flex: 1;
-	}
-	.u-box.b-b{
-		
-	}
-	.u-box.b-b{
-		margin-bottom:24rpx;
-	}
-	.u-box.b-t{
-		margin-bottom:0;
-	}
-	.u-box{
-		display: flex;
-		align-items: center;
-		font-size: $font-size-28;
-		color: $text-color;
-		line-height: 40rpx;
-		margin-bottom: 12rpx;
-		.name{
-			margin-right: 40rpx;
-			font-weight: bold;
+		border-top: 1px solid #F7F7F7;
+		.model-warp.none{
+			display: none;			
 		}
-		.mobile{
-			font-weight: bold;
+		.model-warp.show{
+			display: block;
 		}
-		.tag-left{
-			flex: 6;
-			.tag{
-				width: 120rpx;
-				height: 40rpx;
-				background: $color-system;
-				border-radius: 20rpx;
-				font-size: $font-size-24;
-				color: #FFFFFF;
-				line-height: 40rpx;
-				text-align: center;
-				padding: 0 6rpx;
+		.register-main{
+			width: 100%;
+			height: auto;
+			&.detailed{
+				padding-bottom: 300rpx;
 			}
-		}
-		.tag-right{
-			flex: 4;
-			display: flex;
-			text-align: right;
-			.t-b{
-				flex: 1;
-				line-height: 40rpx;
-				.txt{
+			&.first{
+				padding-top: 40rpx;
+			}
+			.register-tips{
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				line-height: 44rpx;
+				font-size: $font-size-24;
+				color: #FF0000;
+				margin-bottom: 40rpx;
+				.iconfont{
 					font-size: $font-size-24;
-					color: $text-color;
-					line-height: 40rpx;
 				}
 			}
-			.icon-shanchu{
-				color:#FF2A2A ;
-				margin-right: 8rpx;
+			.register-row{
+				width: 702rpx;
+				height: auto;
+				padding: 0 24rpx;
+				margin-bottom: 20rpx;
+				.register-title{
+					line-height: 60rpx;
+					font-size: $font-size-32;
+					color: $text-color;
+					text-align: left;
+					padding-left: 20rpx;
+					.txt{
+						font-size: $font-size-26;
+						font-weight: normal;
+					}
+				}
+				.row-btn{
+					position: absolute;
+					right: 24rpx;
+					top: 0;
+					line-height: 88rpx;
+					text-align: center;
+					font-size: $font-size-28;
+					color: $color-system;
+				}
+				.register-from{
+					width: 654rpx;
+					height: 40rpx;
+					padding: 24rpx;
+					background: $sub-bg-color;
+					border-radius: 14rpx;
+					position: relative;
+					.label{
+						text-align: left;
+						font-size: $font-size-28;
+						color: #666666;
+						line-height: 40rpx;
+						float: left;
+					}
+					.row-input{
+						width: 440rpx;
+						padding-left:10rpx;
+						font-size: $font-size-28;
+						color: $text-color;
+						line-height: 40rpx;
+						float: left;
+						height: 40rpx;
+						&.none{
+							color: #999999;
+						}
+					}
+					&.code{
+						width: 410rpx;
+						float: left;
+						margin-right: 20rpx;
+						.row-input{
+							width: 390rpx;
+						}
+					}
+					&.btn{
+						width: 224rpx;
+						height: 88rpx;
+						float: left;
+						background: $btn-confirm;
+						padding: 0;
+						.row-input{
+							width: 224rpx;
+							height: 88rpx;
+							line-height: 88rpx;
+							padding: 0;
+							color: #FFFFFF;
+							background: $btn-confirm;
+							text-align: center;
+							border-radius: 14rpx;
+							&.none{
+								background: #F7F7F7;
+							}
+						}
+						&.disabled{
+							background: #F7F7F7;
+							.row-input{
+								background: #F7F7F7;
+								color: #999999;
+							}
+						}
+					}
+					&.btn{
+						margin-top: 0;
+					}
+				}
 			}
-			.icon-bianji{
-				color: #2A7AFF;
-				margin-right: 8rpx;
+			.register-btn{
+				width: 702rpx;
+				height: 88rpx;
+				border-radius: 14rpx;
+				font-size: $font-size-28;
+				line-height: 88rpx;
+				color: #FFFFFF;
+				margin: 0 auto;
+				text-align: center;
+				background: $btn-confirm;
+				margin-top: 96rpx;
+				&.sub{
+					margin-top: 0;
+				}
 			}
 		}
-		.address{
-			font-size: $font-size-28;
-			color: $text-color;
-			line-height: 40rpx;
-			-o-text-overflow: ellipsis;
-			text-overflow: ellipsis;
-			display: -webkit-box;
-			word-break: break-all;
-			-webkit-box-orient: vertical;
-			-webkit-line-clamp: 2;
-			overflow: hidden;
-		}
-	}
-	.add-btn{
-		position: fixed;
-		left: 24rpx;
-		right: 24rpx;
-		bottom: 34rpx;
-		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;
-	}
-	.adds-btn{
-		width: 702rpx;
-		height: 88rpx;
-		font-size: 28rpx;
-		line-height: 88rpx;
-		color: #FFFFFF;
-		margin: 0 auto;
-		text-align: center;
-		background: #000000;
-		border-radius: 14rpx;
 	}
 </style>
-

+ 31 - 4
pages/user/setting/setting.vue

@@ -2,6 +2,13 @@
 	<view class="container clearfix">
 		<view class="foot-list">
 			<view class="list-cell-item">
+				<view class="list-cell" @click="navigator(`/pages/user/setting/phone?phone=${bindMobile}`)" hover-class="cell-hover" :hover-stay-time="50">
+					<text class="cell-tit">更换手机号</text>
+					<text class="cell-more">
+						<text class="txt">{{hidePhone(bindMobile)}}</text>
+						<text class="iconfont icon-xiayibu"></text>
+					</text>
+				</view>
 				<view class="list-cell" @click="navigator('/pages/login/password')" hover-class="cell-hover" :hover-stay-time="50">
 					<text class="cell-tit">修改密码</text>
 					<text class="cell-more iconfont icon-xiayibu"></text>
@@ -12,20 +19,36 @@
 </template>
 
 <script>
-	import authorize from '@/common/config/authorize.js'	
+	import { personalInfo } from "@/api/use.js"
 	export default {
 		data() {
 			return {
-				
+				bindMobile:''
 			}
 		},
-		onLoad() {
+		onLoad(option) {
 			
 		},
 		methods:{
+			initSetting(){
+				this.$api.getStorage().then((resolve) =>{
+					personalInfo({userID:resolve.userID}).then(response =>{
+						this.bindMobile=response.data.user.bindMobile
+					}).catch(error =>{
+						this.$util.msg(error.msg,2000)
+					})
+				})
+			},
 			navigator(url){
 				this.$api.navigateTo(url)
-			}			
+			},
+			hidePhone(val){
+				let phone = this.$reg.hidePhone(val) 
+				return phone
+			}
+		},
+		onShow() {
+			this.initSetting()
 		}
 	}
 </script>
@@ -67,6 +90,10 @@
 			font-size:$font-size-28;
 			color:$text-color;
 			margin-left:10rpx;
+			.txt{
+				color: #999999;
+				padding-right: 10rpx;
+			}
 		}
 		.cell-tit{
 			flex: 1;

+ 145 - 87
seller/pages/club/list.vue

@@ -1,20 +1,27 @@
 <template>
-	<view class="container club clearfix" :style="{paddingBottom:isIphoneX?'140rpx':'98rpx'}">
+	<view class="container club clearfix" :style="{ paddingBottom:isIphoneX?'140rpx':'98rpx' }">
 		<view class="club-search clearfix">
-			<view class="search-from name">
-				<text class="iconfont icon-iconfonticonfontsousuo1"></text>
-				<input class="input" 
-					   type="text" 
-					   confirm-type="search"
-					   v-model="searchInputVal" 
-					   @input="onShowClose" 
-					   @confirm="initclubList()" 
-					   placeholder="请输入机构名称" 
-					   maxlength="16"/>
-				<text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
+			<view class="search-top">
+				<view class="search-from name">
+					<text class="iconfont icon-iconfonticonfontsousuo1"></text>
+					<input class="input" 
+						   type="text" 
+						   confirm-type="search"
+						   v-model="searchInputVal" 
+						   @input="onShowClose" 
+						   @confirm="initclubList()" 
+						   placeholder="请输入机构名称" 
+						   maxlength="16"/>
+					<text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
+				</view>
+				<view class="search-btn">
+					<button class="search-btn" type="default" @click.stop="searchClubList">搜索</button>
+				</view>
 			</view>
-			<view class="search-btn">
-				<button class="search-btn" type="default" @click.stop="searchClubList">搜索</button>
+			<view class="search-tab">
+				<view class="tab-item" v-for="(item,index) in  listTab" :key="index" :class="{ current: tabCurrentNum === index }" @click="tabCurrentClick(index)">
+					<text class="item-text">{{item.name}}<text class="line"></text></text>
+				</view>
 			</view>
 		</view>
 		<view class="club-main">
@@ -28,13 +35,13 @@
 						<view class="list-left">
 							<view class="list-head"><image :src="item.headpic ? item.headpic : '../../../static/temp/icon-club@3x.png'" mode=""></image></view>
 							<view class="list-tel">
-								<text class="txt">{{item.name}}</text>
+								<text class="txt">{{item.userIdentity ===2 ? item.name : item.linkMan1}}</text>
 								<text class="txt sm">
 									<text class="txt-le">{{item.linkMan1 ? item.linkMan1 : ''}}</text>
 									{{item.contractMobile1 ? item.contractMobile1 : ''}}</text>
 							</view>
 						</view>
-						<view class="list-opea" v-if="tabCurrentIndex===2">
+						<view class="list-opea">
 							<view class="opea-type-dell" @click.stop="checkData(item)">
 								<text class="iconfont icon-xieboke"></text>
 								<text>修改资料</text>
@@ -44,12 +51,6 @@
 								<text>历史订单</text>
 							</view>
 						</view>
-						<view class="list-opea" v-else>
-							<view class="opea-type-cell" @click.stop="checkData(item)">
-								<text class="iconfont icon-xieboke"></text>
-								<text>修改资料</text>
-							</view>
-						</view>
 					</view>
 					<!--加载loadding-->
 					<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
@@ -58,19 +59,19 @@
 				</scroll-view>
 			</view>
 		</view>
-		<view class="tabBar" :style="{height:isIphoneX?'140rpx':'98rpx'}">
+		<view class="tabBar" :style="{height:isIphoneX?'140rpx':'98rpx'}" v-if="tabCurrentNum ===0">
 			<view class="tabBar_list" :style="{paddingBottom:isIphoneX?'40rpx':''}">
 				<view  class="tabBar_item" :class="{ 'current' : tabCurrentIndex === 0}"   @click="tabClick(0)" >
-					<text class="iconfont icon-lishidingdan"></text>
-					<view class="tabBar_name">待审核</view>
+					<text class="iconfont icon-shenhetongguo"></text>
+					<view class="tabBar_name">待升级</view>
 				</view>
 				<view  class="tabBar_item" :class="{ 'current1' : tabCurrentIndex === 1}"   @click="tabClick(1)" >
-					<text class="iconfont icon-shenhebutongguo"></text>
-					<view class="tabBar_name">审核未通过</view>
+					<text class="iconfont icon-lishidingdan"></text>
+					<view class="tabBar_name">升级中</view>
 				</view>
 				<view  class="tabBar_item" :class="{ 'current2' : tabCurrentIndex === 2}"   @click="tabClick(2)" >
-					<text class="iconfont icon-shenhetongguo"></text>
-					<view class="tabBar_name">已上线</view>
+					<text class="iconfont icon-shenhebutongguo"></text>
+					<view class="tabBar_name">升级失败</view>
 				</view>
 			</view>
 		</view>
@@ -89,11 +90,13 @@
 		},
 		data() {
 			return {
+				listTab:[{name:'普通机构'},{name:'会员机构'}],
 				serviceProviderId:'',
 				isShowClose:false,
 				searchInputVal:'',
 				isEmpty:false,
 				nomoreText: '上拉显示更多',
+				userIdentity:4,
 				pageNum:1,
 				pageSize:10,
 				hasNextPage:false,
@@ -106,11 +109,13 @@
 				deleteAddressId:'',
 				currPage:'',//当前页面
 				prevPage:'',//上一个页面
+				tabCurrentNum:0,
 				tabCurrentIndex:0,
-				listStatus:1,
+				listStatus:90,
 				clubList:[],
 				isIphoneX:this.$store.state.isIphoneX,
 				show_index:0,//控制显示那个组件
+				
 			}
 		},
 		onLoad(){				
@@ -136,7 +141,7 @@
 				this.initclubList()
 			},
 			initclubList(){	
-				let params = {name:this.searchInputVal,pageNum:1,pageSize:this.pageSize,spId:this.serviceProviderId,status:this.listStatus}
+				let params = {userIdentity:this.userIdentity,name:this.searchInputVal,pageNum:1,pageSize:this.pageSize,spId:this.serviceProviderId,status:this.listStatus}
 				getSellerClubList(params).then(response =>{
 					let responseData = response.data
 					if(responseData.results&&responseData.results.length > 0){
@@ -162,7 +167,7 @@
 			},	
 			getOnReachBottomData(){
 				this.pageNum+=1
-				let params = {name:this.searchInputVal,pageNum:this.pageNum,pageSize:this.pageSize,spId:this.serviceProviderId,status:this.listStatus}
+				let params = {userIdentity:this.userIdentity,name:this.searchInputVal,pageNum:this.pageNum,pageSize:this.pageSize,spId:this.serviceProviderId,status:this.listStatus}
 				getSellerClubList(params).then(response =>{
 					let responseData = response.data
 					if(responseData.results&&responseData.results.length > 0){
@@ -187,27 +192,40 @@
 				this.tabCurrentIndex = index;
 				switch(index){
 					case 0:
-						this.listStatus = 1
+						this.listStatus = 90
 						break;
 					case 1:
-						this.listStatus = 92
+						this.listStatus = 1
 						break;
 					case 2:
-						this.listStatus = 90
+						this.listStatus = 92
 						break;
 				}
 				this.initclubList()
 			},
-			checkData(item){
-				switch(this.tabCurrentIndex){
+			tabCurrentClick(index) {//商品详情&&供应商信息tab切换
+				this.tabCurrentNum = index;
+				switch(index){
 					case 0:
-						this.$api.navigateTo(`/seller/pages/login/information?userID=${item.userID}&status=${item.status}`)
+						this.tabCurrentIndex = 0
+						this.userIdentity = 4
+						this.listStatus = 90
+						this.initclubList()
 						break;
 					case 1:
-						this.$api.navigateTo(`/seller/pages/login/apply?userID=${item.userID}&status=${item.status}`)
+						this.userIdentity = 2
+						this.listStatus = 90
+						this.initclubList()
+						break
+				}
+			},	
+			checkData(item){
+				switch(this.tabCurrentNum){
+					case 0:
+						this.$api.navigateTo(`/seller/pages/login/apply?userID=${item.userID}`)
 						break;
-					case 2:
-						this.$api.navigateTo(`/seller/pages/login/information?userID=${item.userID}&status=${item.status}`)
+					case 1:
+						this.$api.navigateTo(`/seller/pages/login/information?userID=${item.userID}`)
 						break;
 				}
 			},
@@ -257,66 +275,106 @@
 		position: relative;
 	}
 	.club-search{
-		height: 64rpx;
-		width: 702rpx;
-		padding: 24rpx;
+		height: auto;
+		width: 100%;
+		padding: 24rpx 0 0 0;
 		background: #FFFFFF;
 		display: flex;
-		align-items: center;
+		flex-direction: column;
 		position: fixed;
 		top: 0;
 		left: 0;
 		z-index: 999;
-		.search-from{
-			width: 582rpx;
-			height: 64rpx;
-			background: #F7F7F7;
-			border-radius: 14rpx;
-			float: left;
-			position: relative;
-			.input{
-				width: 500rpx;
+		.search-top{
+			flex: 1;
+			display: flex;
+			align-items: center;
+			padding: 24rpx;
+			.search-from{
+				width: 582rpx;
 				height: 64rpx;
+				background: #F7F7F7;
+				border-radius: 14rpx;
 				float: left;
-				line-height: 64rpx;
-				color: $text-color;
-				font-size: $font-size-24;
+				position: relative;
+				.input{
+					width: 500rpx;
+					height: 64rpx;
+					float: left;
+					line-height: 64rpx;
+					color: $text-color;
+					font-size: $font-size-24;
+				}
+				.icon-iconfonticonfontsousuo1{
+					width: 64rpx;
+					height: 64rpx;
+					line-height: 64rpx;
+					text-align: center;
+					display: block;
+					font-size: $font-size-38;
+					float: left;
+					color: #999999;
+				}
+				.icon-shanchu1{
+					font-size: $font-size-32;
+					color: #999999;
+					position: absolute;
+					width: 64rpx;
+					height: 64rpx;
+					line-height: 64rpx;
+					text-align: center;
+					top: 0;
+					right: 0;
+					z-index: 10;
+				}
 			}
-			.icon-iconfonticonfontsousuo1{
-				width: 64rpx;
-				height: 64rpx;
+			.search-btn{
+				width: 120rpx;
 				line-height: 64rpx;
 				text-align: center;
-				display: block;
-				font-size: $font-size-38;
+				font-size: $font-size-28;
+				color: $color-system;
 				float: left;
-				color: #999999;
-			}
-			.icon-shanchu1{
-				font-size: $font-size-32;
-				color: #999999;
-				position: absolute;
-				width: 64rpx;
-				height: 64rpx;
-				line-height: 64rpx;
-				text-align: center;
-				top: 0;
-				right: 0;
-				z-index: 10;
+				background: #FFFFFF;
 			}
 		}
-		.search-btn{
-			width: 120rpx;
-			line-height: 64rpx;
-			text-align: center;
-			font-size: $font-size-28;
-			color: $color-system;
-			float: left;
+		.search-tab{
+			height: 80rpx;
+			display: flex;
+			flex: 1;
 			background: #FFFFFF;
+			border-bottom: 1px solid #EFEFEF;
+			.tab-item{
+				flex: 1;
+				line-height: 80rpx;
+				text-align: center;
+				color: $text-color;
+				font-size: $font-size-28;
+				position: relative;
+				.item-text{
+					padding: 10rpx 0;
+					border-bottom:2px solid #FFFFFF;
+				}
+				&:nth-child(1)::before{
+					content: '';
+					width: 2px;
+					height: 50rpx;
+					position: absolute;
+					right: 0;
+					top: 15rpx;
+					background: #EBEBEB;
+				}
+				&.current{
+					color: $color-system;
+					.item-text{
+						border-color:$color-system;;
+					}
+				}
+			}
 		}
 	}
 	.club-main{
-		padding-top: 122rpx;
+		padding-top: 224rpx;
 		.list{
 			display: flex;
 			align-items: center;
@@ -414,15 +472,15 @@
 					}
 				}
 				&.current1{
-					color: #FF0000;
+					color: #16E15C;
 					.iconfont{
-						color:#FF0000;
+						color:#16E15C;
 					}
 				}
 				&.current2{
-					color: #16E15C;
+					color: #FF0000;
 					.iconfont{
-						color:#16E15C;
+						color:#FF0000;
 					}
 				}
 				.iconfont{

+ 292 - 197
seller/pages/login/apply.vue

@@ -1,44 +1,101 @@
 <template>
 	<view class="container register" :style="{paddingTop:CustomBar+'px'}">
 		<cu-custom :navbar-data='nvabarData'  @navigateBack="hanldNavigateBack"></cu-custom>
-		<view class="register-error clearfix" :style="{top:CustomBar+'px'}">
-			<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="register-main first clearfix" v-if="clubStatus == 92">
+			<view class="register-row none clearfix">
+				<view class="error-title">审核未通过原因:</view>
+				<view class="error-main">
+					<text class="error-item" v-for="(item, index) in errorList" :key="index">
+						{{ item }}
+					</text>
+				</view>
+			</view>	
+		</view>	
+		<view class="register-main first clearfix">
+			<view class="register-row clearfix">
+				<text class="register-title">注册信息</text>
 			</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>
-					</view>
+			<view class="register-row clearfix">
+				<view class="register-from">
+					<view class="label">联系人:</view>
+					<input class="row-input" type="text" name="input" v-model="clubContact" placeholder="请输入联系姓名" maxlength="6"/>
+				</view>
+			</view>
+			<view class="register-row clearfix">
+				<view class="register-from">
+					<view class="label">手机号:</view>
+					<view class="row-input">{{ mobile }}</view>
 				</view>
 			</view>
 		</view>
-		<view class="register-main first clearfix">
+		<view class="register-main clearfix">
 			<view class="register-row">
-				<view class="register-title">基本信息</view>
+				<view class="register-title">其他信息</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="30"/>
+					<view class="label">固定电话:</view>
+					<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="clubContact" placeholder="请输入联系姓名" maxlength="6"/>
+					<view class="label">传真:</view>
+					<input class="row-input" type="text" v-model="clubFax" placeholder="请填写机构的传真" maxlength="15"/>
+				</view>
+			</view>
+			<view class="register-row text-textarea clearfix">
+				<textarea 	class="textarea" 
+							type="text" 
+							v-model="companyPprofile" 
+							placeholder="请填写公司简介,最多500字" 
+							placeholder-class="placeholder"
+							maxlength="500"
+							@input="onTextareaInputInfo"
+							:class="isShowInput ? '':''"
+				/>
+			</view>
+		</view>	
+		<view class="register-main clearfix" v-if="clubStatus == 90" :class="isUpgrade ? '' : 'detailed'">
+			<view class="register-row clearfix">
+				<view class="register-txt first"><text>您还可以填写更多信息,帮机构直接注册成为会员机构。</text></view>
+				<view class="register-txt"><text>不过这些信息需要审核。</text></view>
+				<view class="register-bet" @tap.stop="showUpgrade()" v-if="isDownUpgrade">
+					<text>展开信息填写<text class="iconfont icon-xiangxiajiantou"></text></text>
+				</view>
+			</view>	
+			<view class="register-fiexd clearfix">
+				<view class="register-bet" @tap.stop="hideUpgrade()" v-if="isUpgrade">
+					<text>收起<text class="iconfont icon-xiangshangjiantou"></text></text>
+				</view>
+				<view class="register-row ">
+					<view class="register-btn sub" @click.stop="organizationUpgradeInfo">{{registerBtnText}}</view>
 				</view>
 			</view>
 		</view>
-		<view class="register-main clearfix" >
-			<view class="register-row">
-				<view class="register-title">详细信息<text class="txt">(请尽量填写,有利于快速审核通过)</text></view>
+		<view class="register-main clearfix" v-else>
+			<view class="register-fiexd clearfix">
+				<view class="register-row ">
+					<view class="register-btn sub" @click.stop="organizationUpdateInfo">提交审核</view>
+				</view>
 			</view>
 		</view>
-		<view class="register-main detailed clearfix">
+		<view class="register-main detailed clearfix" v-if="isShowUpgrade">
+			<view class="register-row">
+				<view class="register-title">升级信息</view>
+			</view>
+			<view class="register-row clearfix">
+				<view class="register-from">
+					<view class="label">邮箱:</view>
+					<input class="row-input" type="text" name="input" v-model="registerEmail" placeholder="请输入您的常用邮箱" maxlength="30"/>
+				</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="30"/>
+				</view>
+			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">机构简称:</view>
@@ -49,7 +106,7 @@
 				<view class="register-from"  @click="showMulLinkageThreePicker">
 					<view class="label">机构地址:</view>
 					<text class="row-input" :class="addressData.address === '请选择机构所在地区' ? 'none' : ''">
-						{{addressData.address ? addressData.address :''}}
+						{{addressData.address }}
 					</text>		
 					<text class="iconfont icon-xiayibu"></text>
 				</view>
@@ -86,8 +143,6 @@
 						</view>
 					</view>
 				</view>
-			</view>
-			<view class="register-row clearfix">
 				<view class="register-picture">
 					<view class="label">门头照:</view>
 					<view class="upload-picture">
@@ -125,7 +180,7 @@
 				</view>
 			</view>
 			<view class="register-row clearfix" v-if="isOrganizationType == 1">
-				<view class="register-picture">
+				<view class="register-picture zz">
 					<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>
@@ -196,20 +251,6 @@
 					</view>
 				</view>
 			</view>
-			<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 @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 ">
-					<view class="register-btn sub" @click.stop="organizationUpdateInfo">提交审核</view>
-				</view>
-			</view>
 			<mpvue-city-picker :themeColor="themeColor"
 								ref="mpvueCityPicker" 
 							    :pickerValueDefault="cityPickerValueDefault"
@@ -224,10 +265,8 @@
 import { mapMutations } from 'vuex';
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
 	import { beautyList,mentuzCampNullList,medicaCampNullList } from '@/common/json/data.json.js' //本地数据
-	import { organizationUpdateModifyInfo  } from "@/api/use.js"
+	import { organizationUpdateModifyInfo , organizationRegister ,organizationUpdate } from "@/api/use.js"
 	import { uploadFileImage } from "@/api/utils.js" 
-	import { sellerClubUpdate } from "@/api/seller.js" 
-	var self;
 	export default{
 		components:{
 			mpvueCityPicker
@@ -237,23 +276,26 @@ import { mapMutations } from 'vuex';
 				nvabarData: {		//顶部自定义导航
 					showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
 					showSearch: 0,
-					title: '修改申请信息', // 导航栏 中间的标题
+					title: '修改资料', // 导航栏 中间的标题
 				},
 				CustomBar:this.CustomBar,// 顶部导航栏高度
-				isOpenError:false,
 				errorList:[],
+				tabCurrentIndex:3,	
+				clubStatus:'',			//审核状态
 				isPreviewImage:false,   //预览图片开关
 				userID:'',				//用户ID
 				clubID:'',				//会所ID
-				status:'',				//机构状态
+				clubContact:'',			//联系人姓名
+				mobile:'',				//联系人手机号
+				registerEmail:'',		//邮箱
 				clubName:'',	 		//机构名称
 				abbreviation:'',	 	//机构简称
-				clubContact:'',	 		//联系人
 				socialCreditCode:'',	//统一社会信用代码
-				isAgreed:1,				//是否勾选协议
 				isDisabled:true,
 				isShowInput:false,
-				isCheck:true,			//是否勾选协议
+				isUpgrade:false,
+				isShowUpgrade:false,
+				isDownUpgrade:true,
 				uploadBusinessImage:'',	//营业执照图片
 				uploadMentuzImage:'',  	//门头照图片
 				uploadMedicalImage:'', 	//资质照图片
@@ -267,11 +309,11 @@ import { mapMutations } from 'vuex';
 				firstClubType:'',		//机构类型
 				isOrganizationType:0,
 				organizationTypeText:'请选择机构类型',
-				beautyList:beautyList,
-				mentuzCampNullList:mentuzCampNullList,
-				medicaCampNullList:medicaCampNullList,
-				mentuzCampList:[],
-				medicaCampList:[],
+				beautyList:beautyList,//医美分类
+				mentuzCampNullList:mentuzCampNullList,//医美分类
+				medicaCampNullList:medicaCampNullList,//生美分类
+				mentuzCampList:[],		//医美主营
+				medicaCampList:[],		//生美主营
 				typtIndex:0,
 				organizationType:0,
 				current:0,
@@ -285,16 +327,16 @@ import { mapMutations } from 'vuex';
 					provinceID:'',		//省ID
 					addressDetail: '',	//地址详情
 				},
+				registerBtnText:'确定'
 			}	
 		},
 		onLoad(option) {
 			this.userID = option.userID
-			this.status = option.status
 			this.organizationInfo()
 		},
 		methods:{
 			hanldNavigateBack(){
-				this.$util.modal('','资料尚未提交审核,确定放弃修改吗?','确定','取消',true,() =>{
+				this.$util.modal('','资料尚未提交审核,确定放弃升级吗?','确定','取消',true,() =>{
 					uni.navigateBack({
 						delta: 1
 					});
@@ -304,13 +346,21 @@ import { mapMutations } from 'vuex';
 				organizationUpdateModifyInfo({userID:this.userID}).then(response =>{
 					let organizationClub = response.data.club
 					let organizationUser = response.data.user
-					this.errorList =organizationUser.auditNoteList
-					this.email = organizationUser.email	
-					this.clubID = organizationUser.clubID
-					this.clubName = organizationClub.name
+					this.clubStatus = organizationClub.status
+					if(this.clubStatus === 90){
+						this.isShowUpgrade = false
+					}else{
+						this.isShowUpgrade = true
+					}
+					if(organizationUser.auditNoteList!=null){
+						this.errorList =organizationUser.auditNoteList
+					}
 					this.clubContact = organizationClub.linkMan1
 					this.mobile = organizationUser.bindMobile
-					this.abbreviation = organizationClub.sname
+					this.registerEmail = organizationUser.email	
+					this.clubID = organizationUser.clubID
+					this.clubName = this.$reg.checkData(organizationClub.name)
+					this.abbreviation = this.$reg.checkData(organizationClub.sname)
 					if( organizationClub.provinceID == null ){
 						this.addressData.provinceID = ''
 					}else{
@@ -326,18 +376,18 @@ import { mapMutations } from 'vuex';
 					}else{
 						this.addressData.townID = organizationClub.townID
 					}
-					this.addressData.address = organizationClub.provincialAddress
-					this.addressData.addressDetail = organizationClub.address
-					this.socialCreditCode = organizationClub.socialCreditCode
+					this.addressData.address = organizationClub.provincialAddress ? organizationClub.provincialAddress:'请选择机构所在地区'
+					this.addressData.addressDetail = this.$reg.checkData(organizationClub.address)
+					this.socialCreditCode = this.$reg.checkData(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 ? organizationClub.contractPhone : ''
-					this.clubFax = organizationClub.fax ? organizationClub.fax : ''
-					this.companyPprofile = organizationClub.info ? organizationClub.info : ''
+					this.secondClubType = this.$reg.checkData(organizationClub.secondClubType)
+					this.uploadBusinessImage = this.$reg.checkData(organizationClub.businessLicenseImage) 
+					this.uploadMentuzImage = this.$reg.checkData(organizationClub.headpic)
+					this.uploadMedicalImage = this.$reg.checkData(organizationClub.medicalPracticeLicenseImg)
+					this.department = this.$reg.checkData(organizationClub.department)
+					this.clubTelePhone = this.$reg.checkData(organizationClub.contractPhone)
+					this.clubFax = this.$reg.checkData(organizationClub.fax)
+					this.companyPprofile = this.$reg.checkData(organizationClub.info)
 					//机构类型&&主营项目
 					switch(this.firstClubType){
 						case '1':
@@ -353,11 +403,17 @@ import { mapMutations } from 'vuex';
 							this.isOrganizationType = 0
 							break;
 					}	
-					if(organizationClub.mainpro!=null){
+					if(organizationClub.mainpro == "" || organizationClub.mainpro == null){
+						this.mentuzCampList = this.mentuzCampNullList
+						this.medicaCampList = this.medicaCampNullList
+					}else{
 						if(this.firstClubType == '1'){
 							this.mentuzCampList = this.setNewMainpro(organizationClub.mainpro)
+							this.medicaCampList = this.medicaCampNullList
+							
 						}else{
 							this.medicaCampList = this.setNewMainpro(organizationClub.mainpro)
+							this.mentuzCampList = this.mentuzCampNullList
 						}
 					}
 					//机构类型
@@ -370,11 +426,32 @@ import { mapMutations } from 'vuex';
 					this.$util.msg(error.msg,2000)
 				})
 			},
-			organizationUpdateInfo(){//提交审核
-				if(!this.isCheck){
-					this.$util.msg('请勾选同意协议',2000);
-					return
+			organizationUpdateInfo(){//普通机构修改资料
+				this.clubUpgradeApi()
+			},
+			organizationUpgradeInfo(){//普通机构提交审核
+				if(this.isUpgrade){
+					this.clubUpgradeApi()
+				}else{
+					 let params = {
+							userID:this.userID,
+							clubID:this.clubID,					//会所ID
+							linkMan1:this.clubContact,
+							fax:this.clubFax,
+							contractPhone:this.clubTelePhone,
+							info : this.companyPprofile,
+						}		
+					organizationUpdate(params).then(response =>{
+						this.$util.msg('修改成功',2000,true,'success')
+						setTimeout(()=>{
+							uni.navigateBack({delta: 1})
+						},2000)
+					}).catch(error =>{
+						this.$util.msg(error.msg,2000);
+					})
 				}
+			},
+			clubUpgradeApi(){
 				if(!this.isMainproCheck){
 					let mainproList = []
 					if(this.firstClubType == '1'){
@@ -388,11 +465,47 @@ import { mapMutations } from 'vuex';
 					}
 					this.mainpro = mainproList.join('/')
 				}
-				let params ={
+				if( this.registerEmail == ''){
+					this.$util.msg('请输入邮箱地址',2000);
+					return
+				}
+				if( !this.$reg.isEmail(this.registerEmail)){
+					this.$util.msg('请输入正确的邮箱地址',2000);
+					return
+				}
+				if( this.clubName == ''){
+					this.$util.msg('请输入机构名称',2000);
+					return
+				}
+				if( this.addressData.townID == ''){
+					this.$util.msg('请选择机构地址',2000);
+					return
+				}
+				if( this.addressData.addressDetail == ''){
+					this.$util.msg('请填写机构详细地址',2000);
+					return
+				}
+				if( this.socialCreditCode == ''){
+					this.$util.msg('请填写社会统一社会信用代码',2000);
+					return
+				}
+				if( this.uploadBusinessImage == ''){
+					this.$util.msg('请上传您的营业执照',2000);
+					return
+				}
+				if(this.isOrganizationType!=0){
+					if(this.mainpro == ''){
+						this.$util.msg('请选择住机构主营内容',2000);
+						return
+					}
+				}
+				
+				let params = {
 						userID:this.userID,
-						clubID:this.clubID,					//会所ID
-						name:this.clubName,
+						clubID:this.clubID,		//会所ID	
 						linkMan1:this.clubContact,
+						contractEmail1:this.registerEmail,
+						name:this.clubName,
 						sname:this.abbreviation,
 						provinceID:this.addressData.provinceID,
 						cityID:this.addressData.cityID,
@@ -401,23 +514,19 @@ import { mapMutations } from 'vuex';
 						socialCreditCode:this.socialCreditCode,
 						businessLicenseImage:this.uploadBusinessImage,
 						headpic:this.uploadMentuzImage,
-						firstClubType:this.isOrganizationType, //机构类型分类 医美:0和生美:1
+						firstClubType:this.isOrganizationType,  //机构类型分类 医美:0和生美:1
 						secondClubType:this.secondClubType,		//机构类型二级分类 诊所:1,门诊:2,医院:3
 						department:this.department,				//科室
 						medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
-						isAgreed:this.isAgreed,				//是否勾选协议	
 						mainpro:this.mainpro,
 						fax:this.clubFax,
 						contractPhone:this.clubTelePhone,
 						info : this.companyPprofile,
-						status:this.status
 				}
-				sellerClubUpdate(params).then(response =>{
-					this.$util.msg('提交成功',2000,true,'success')
+				organizationRegister(params).then(response =>{
+					this.$util.msg('您的升级申请已提交审核',2000);
 					setTimeout(()=>{
-						uni.navigateBack({
-							delta: 1
-						});
+						uni.navigateBack({delta: 1})
 					},2000)
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000);
@@ -545,14 +654,6 @@ import { mapMutations } from 'vuex';
 				}
 				return arr.join('/')
 			},
-			agreeCheck() {
-				this.isCheck = !this.isCheck
-				if(this.isCheck){
-					this.isAgreed = 1
-				}else{
-					this.isAgreed = 0
-				}
-			},
 			onBlurInput(e){//
 				if(e.detail.value ===''){
 					this.isDisabled = true
@@ -580,8 +681,19 @@ import { mapMutations } from 'vuex';
 					this.medicaCampList.push(item)
 				}
 			},
-			showOpenError(){//顶部审核信息详情
-				this.isOpenError = !this.isOpenError
+			showUpgrade(){
+				this.isUpgrade = true
+				this.isShowUpgrade = true
+				this.isDownUpgrade = false
+				this.registerBtnText = '提交审核'
+			},
+			hideUpgrade(){
+				this.$util.modal('提示','收起后,您填写的升级信息将会被清空确定收起吗?','确定','取消',true,() =>{
+					this.isUpgrade = false
+					this.isShowUpgrade = false
+					this.isDownUpgrade = true
+					this.registerBtnText = '确定'
+				})
 			}
 		},
 		onShow() {
@@ -598,104 +710,16 @@ import { mapMutations } from 'vuex';
 		width: 100%;
 		height: auto;
 		border-top: 1px solid #F7F7F7;
-		.model-warp.none{
-			display: none;			
-		}
-		.model-warp.show{
-			display: block;
-		}
-		.register-error{
-			width: 100%;
-			height: auto;
-			position: fixed;
-			top: 0;
-			left: 0;
-			z-index: 999;
-			.error-top{
-				width: 702rpx;
-				padding: 0 24rpx;
-				height: 90rpx;
-				line-height: 90rpx;
-				background: #FF0000;
-				border-bottom: 1px solid #F7F7F7;
-				&.error-top--none{
-					background:#FFFFFF;
-					.name{
-						color: #333333;
-					}
-					.icon{
-						color: #333333;
-					}
-				}
-				.name{
-					font-size: $font-size-32;
-					color: #FFFFFF;
-					float: left;
-				}
-				.icon{
-					float: right;
-					font-size: $font-size-32;
-					color: #FFFFFF;
-				}
-				.icon-xiangxiajiantou{
-					transform: rotate(0deg);
-					transform-origin: center center;
-					float: right;
-					font-size: $font-size-32;
-					color: #FFFFFF;
-					/* transition: transform 0.3s ease;*/
-					transition-property: transform;
-					transition-duration: 0.3s;
-					transition-timing-function: ease;
-					margin-left: 10rpx;
-				}
-				.icon-xiangxiajiantou-active{
-					transform: rotate(180deg);
-					color: #333333;
-				
-				}
-			}
-			.animation{
-				/* transition: transform 0.3s ease;*/
-				transition-property: transform;
-				transition-duration: 0.2s;
-				transition-timing-function: ease;
-			}
-			.error-main{
-				width: 702rpx;
-				height: auto;
-				padding: 24rpx;
-				overflow: hidden;
-				background: #FFFFFF;
-				.error-main-list{
-					width:100% ;
-					height: auto;
-					background: #FFFFFF;
-					.item{
-						height: auto;
-						line-height: 60rpx;
-						font-size: $font-size-28;
-						color: #FF0000;
-						.num{
-							margin-right: 10rpx;
-						}
-					}
-				}
-			}
-			.error-main--hide {
-				padding: 0 24rpx;
-				height: 0px;
-				line-height: 0px;
-			}		
-		}
+		background: #EFEFEF;
 		.register-main{
 			width: 100%;
 			height: auto;
+			background: #FFFFFF;
 			&.detailed{
-				padding-bottom: 300rpx;
+				padding-bottom: 200rpx;
 			}
 			&.first{
-				padding-top: 110rpx;
+				padding-top: 30rpx;
 			}
 			.register-tips{
 				display: flex;
@@ -714,14 +738,64 @@ import { mapMutations } from 'vuex';
 				height: auto;
 				padding: 0 24rpx;
 				margin-bottom: 20rpx;
-				.register-title{
-					line-height: 60rpx;
-					font-size: $font-size-32;
+				&.none{
+					margin-bottom: 0;
+				}
+				.error-title{
+					line-height: 40rpx;
+					font-size: $font-size-28;
 					color: $text-color;
 					text-align: left;
-					padding-left: 20rpx;
-					.txt{
+				}
+				.error-main{
+					padding: 10rpx 0;
+					.error-item{
+						padding:0 20rpx;
+						margin:10rpx;
+						background: #F53636;
+						height: 52rpx;
+						line-height: 52rpx;
+						border-radius: 26rpx;
 						font-size: $font-size-26;
+						color: #FFFFFF;
+						text-align: center;
+						display: inline-block;
+					}
+				}
+				.register-txt{
+					line-height: 44rpx;
+					font-size: $font-size-26;
+					color: $text-color;
+					text-align: left;
+					&.first{
+						margin-top: 20rpx;
+					}
+				}
+				.register-bet{
+					width: 100%;
+					display: flex;
+					line-height: 60rpx;
+					height: 60rpx;
+					align-items: center;
+					flex-direction: column;
+					font-size: $font-size-28;
+					color: $color-system;
+					margin-top: 40rpx;
+					text{
+						margin: 0 5rpx;
+					}
+				}
+				.register-tip{
+					line-height: 64rpx;
+					font-size: $font-size-24;
+					color: #CECECE;
+					text-align: left;
+				}
+				.register-title{
+					font-size: $font-size-32;
+					color: $text-color;
+					text{
+						font-size: $font-size-24;
 					}
 				}
 				.row-btn{
@@ -848,7 +922,7 @@ import { mapMutations } from 'vuex';
 						background: #FFFFFF;
 						margin-top: 30rpx;
 						.label{
-							line-height: 70rpx;
+							line-height: 76rpx;
 						}
 						.row-input{
 							width: 100%;
@@ -876,7 +950,7 @@ import { mapMutations } from 'vuex';
 						align-items: center;
 						&.btn{
 							margin: 0 auto;
-							margin-left: 126rpx;
+							margin-left: 116rpx;
 						}
 						.row-input{
 							display: flex;
@@ -953,7 +1027,12 @@ import { mapMutations } from 'vuex';
 			}
 			.register-picture{
 				height: 102rpx;
-				margin: 40rpx 0 0 0;
+				margin: 30rpx 0;
+				width: 42%;
+				float: left;
+				&.zz{
+					width: 100%;
+				}
 				.label{
 					float: left;
 					font-size: $font-size-28;
@@ -1035,6 +1114,22 @@ import { mapMutations } from 'vuex';
 				left: 0;
 				z-index: 99;
 				background: #FFFFFF;
+				.register-bet{
+					width: 100%;
+					display: flex;
+					line-height: 60rpx;
+					height: 60rpx;
+					align-items: center;
+					flex-direction: column;
+					font-size: $font-size-28;
+					color: $color-system;
+					.icon-xiangxiajiantou{
+						transform:rotate(180deg);
+					}
+					text{
+						margin: 0 5rpx;
+					}
+				}
 				.register-agree{
 					display: flex;
 					flex-direction: column;

+ 81 - 70
seller/pages/login/information.vue

@@ -3,27 +3,79 @@
 		<cu-custom :navbar-data='nvabarData'  @navigateBack="hanldNavigateBack"></cu-custom>
 		<view class="register-main first clearfix">
 			<view class="register-row">
-				<view class="register-title">基本信息</view>
+				<view class="register-title">注册信息</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="30"/>
+					<view class="label">联系人:</view>
+					<input class="row-input" type="text" v-model="clubContact" placeholder="请输入联系姓名" maxlength="6"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
-					<view class="label">联系人:</view>
-					<input class="row-input" type="text" v-model="clubContact" placeholder="请输入联系姓名" maxlength="6"/>
+					<view class="label">手机号:</view>
+					<view class="row-input">{{ mobile }}</view>
 				</view>
 			</view>
 		</view>
-		<view class="register-main clearfix" >
+		<view class="register-main clearfix">
 			<view class="register-row">
-				<view class="register-title">详细信息<text class="txt">(请尽量填写,有利于快速审核通过)</text></view>
+				<view class="register-title">其他信息</view>
+			</view>
+			<view class="register-row clearfix">
+				<view class="register-from">
+					<view class="label">固定电话:</view>
+					<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="clubFax" placeholder="请填写机构的传真" maxlength="15"/>
+				</view>
+			</view>
+			<view class="register-row text-textarea clearfix">
+				<textarea 	class="textarea" 
+							type="text" 
+							v-model="companyPprofile" 
+							placeholder="请填写公司简介,最多500字" 
+							placeholder-class="placeholder"
+							maxlength="500"
+							@input="onTextareaInputInfo"
+							:class="isShowInput ? '':''"
+				/>
+			</view>
+			<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 @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">
+					<view class="register-btn sub" @click.stop="organizationUpdateInfo">确定</view>
+				</view>
 			</view>
 		</view>
 		<view class="register-main detailed clearfix">
+			<view class="register-row">
+				<view class="register-title">升级信息</view>
+			</view>
+			<view class="register-row clearfix">
+				<view class="register-from">
+					<view class="label">邮箱:</view>
+					<input class="row-input" type="text" name="input" v-model="email" placeholder="请输入邮箱地址" maxlength="30"/>
+				</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="30"/>
+				</view>
+			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">机构简称:</view>
@@ -47,7 +99,7 @@
 							v-model="addressData.addressDetail" 
 							placeholder="详细地址:如道路、门牌号、小区等" 
 							placeholder-class="placeholder"
-							maxlength="25"
+							maxlength="35"
 							@input="onTextareaInput"
 							:class="isShowInput ? '':''"
 				/>
@@ -71,8 +123,6 @@
 						</view>
 					</view>
 				</view>
-			</view>
-			<view class="register-row clearfix">
 				<view class="register-picture">
 					<view class="label">门头照:</view>
 					<view class="upload-picture">
@@ -110,7 +160,7 @@
 				</view>
 			</view>
 			<view class="register-row clearfix" v-if="isOrganizationType == 1">
-				<view class="register-picture">
+				<view class="register-picture zz">
 					<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>
@@ -181,45 +231,6 @@
 					</view>
 				</view>
 			</view>
-			<view class="register-row clearfix">
-				<view class="register-from">
-					<view class="label">固定电话:</view>
-					<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="clubFax" placeholder="请填写机构的传真" maxlength="15"/>
-				</view>
-			</view>
-			<view class="register-row text-textarea clearfix">
-				<view class="textarea show" v-if="isCompanyPprofile" @click="showTextarea">{{'请填写公司简介,最多500字'}}</view>
-				<textarea 	v-else
-							class="textarea" 
-							type="text" 
-							v-model="companyPprofile" 
-							placeholder="请填写公司简介,最多500字" 
-							placeholder-class="placeholder"
-							maxlength="500"
-							@input="onTextareaInputInfo"
-							:class="isShowInput ? '':''"
-				/>
-			</view>
-			<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 @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">
-					<view class="register-btn sub" @click.stop="organizationUpdateInfo">确定</view>
-				</view>
-			</view>
 			<mpvue-city-picker :themeColor="themeColor"
 								ref="mpvueCityPicker" 
 							    :pickerValueDefault="cityPickerValueDefault"
@@ -234,9 +245,8 @@
 	import { mapMutations } from 'vuex';
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
 	import { beautyList,mentuzCampNullList,medicaCampNullList } from '@/common/json/data.json.js' //本地数据
-	import { organizationUpdateModifyInfo } from "@/api/use.js"
+	import { organizationUpdateModifyInfo , organizationUpdate } from "@/api/use.js"
 	import { uploadFileImage } from "@/api/utils.js" 
-	import { sellerClubUpdate } from "@/api/seller.js" 
 	export default{
 		components:{
 			mpvueCityPicker
@@ -252,7 +262,8 @@
 				isPreviewImage:false,   //预览图片开关
 				userID:'',				//机构的userID
 				clubID:'',				//会所ID
-				status:'',				//机构状态
+				mobile:'',				//联系人手机号
+				userIdentity:'',		//机构用户类型
 				email:'',				//邮箱
 				clubName:'',	 		//机构名称
 				abbreviation:'',	 	//机构简称
@@ -296,8 +307,8 @@
 			}	
 		},
 		onLoad(option) {
+			console.log(option)
 			this.userID = option.userID
-			this.status = option.status					
 			this.organizationInfo()
 		},
 		methods:{
@@ -312,11 +323,15 @@
 				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.userIdentity = organizationUser.userIdentity
 					this.clubContact = organizationClub.linkMan1
 					this.mobile = organizationUser.bindMobile
+					this.clubTelePhone = organizationClub.contractPhone ? organizationClub.contractPhone : ''
+					this.clubFax = organizationClub.fax ? organizationClub.fax : ''
+					this.companyPprofile = organizationClub.info ? organizationClub.info : ''
+					this.email = organizationUser.email	
+					this.clubName = organizationClub.name
 					this.abbreviation = organizationClub.sname
 					if( organizationClub.provinceID == null ){
 						this.addressData.provinceID = ''
@@ -342,9 +357,6 @@
 					this.uploadMedicalImage = organizationClub.medicalPracticeLicenseImg
 					this.uploadMentuzImage = organizationClub.headpic
 					this.department = organizationClub.department						
-					this.clubTelePhone = organizationClub.contractPhone ? organizationClub.contractPhone : ''
-					this.clubFax = organizationClub.fax ? organizationClub.fax : ''
-					this.companyPprofile = organizationClub.info ? organizationClub.info : ''
 					//机构类型&&主营项目
 					switch(this.firstClubType){
 						case '1':
@@ -383,10 +395,6 @@
 				})
 			},
 			organizationUpdateInfo(){//提交审核
-				if(!this.isCheck){
-					this.$util.msg('请勾选同意协议',2000);
-					return
-				}
 				if(!this.isMainproCheck){
 					let mainproList = []
 					if(this.firstClubType == '1'){
@@ -400,7 +408,7 @@
 					}
 					this.mainpro = mainproList.join('/')
 				}
-				let params ={
+				let params = {
 						userID:this.userID,
 						clubID:this.clubID,					//会所ID
 						name:this.clubName,
@@ -422,10 +430,8 @@
 						fax:this.clubFax,
 						contractPhone:this.clubTelePhone,
 						info : this.companyPprofile,
-						status:this.status
-						
-				}
-				sellerClubUpdate(params).then(response =>{
+					}
+				organizationUpdate(params).then(response =>{
 					this.$util.msg('修改成功',2000,true,'success')
 					setTimeout(()=>{
 						uni.navigateBack({
@@ -805,7 +811,7 @@
 						justify-content: space-between;
 						&.btn{
 							margin: 0 auto;
-							margin-left: 126rpx;
+							margin-left: 116rpx;
 						}
 						.row-input{
 							display: flex;
@@ -882,7 +888,12 @@
 			}
 			.register-picture{
 				height: 102rpx;
-				margin: 40rpx 0 0 0;
+				margin: 30rpx 0;
+				width: 42%;
+				float: left;
+				&.zz{
+					width: 100%;
+				}
 				.label{
 					float: left;
 					font-size: $font-size-28;

+ 188 - 55
seller/pages/login/register.vue

@@ -3,48 +3,66 @@
 		<cu-custom :navbar-data='nvabarData'  @navigateBack="hanldNavigateBack"></cu-custom>
 		<view class="register-main first clearfix">
 			<view class="register-row clearfix">
-				<text class="register-title">账户信息</text>
+				<text class="register-title">注册信息</text>
+			</view>
+			<view class="register-row clearfix">
+				<view class="register-from">
+					<view class="label">联系人:</view>
+					<input class="row-input" type="text" name="input" v-model="clubContact" placeholder="请输入联系姓名" maxlength="6"/>
+				</view>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from code">
-					<view class="label">邮箱:</view>
-					<input class="row-input" type="text"  name="input" v-model="registerEmail" placeholder="请输入机构邮箱地址" maxlength="30"/>
+					<view class="label">手机号:</view>
+					<input class="row-input phone" type="text" v-model="registerMobile" placeholder="请输入联系人手机号" maxlength="11"/>
 				</view>
 				<view class="register-from btn">
-					<button class="row-input" type="button" @click.stop="registerCheckEmail()">检测</button>
+					<button class="row-input" type="button" @click.stop="registerCheckMobile()">检测</button>
 				</view>
 			</view>
 		</view>
 		<view class="register-main clearfix">
 			<view class="register-row clearfix">
-				<text class="register-title">基本信息</text>
+				<view class="register-txt first"><text>您还可以填写更多信息,帮机构直接注册成为会员机构。</text></view>
+				<view class="register-txt"><text>不过这些信息需要审核。</text></view>
+				<view class="register-bet" @tap.stop="showUpgrade()" v-if="isDownUpgrade">
+					<text>展开信息填写<text class="iconfont icon-xiangxiajiantou"></text></text>
+				</view>
+			</view>	
+			<view class="register-fiexd clearfix">
+				<view class="register-bet" @tap.stop="hideUpgrade()" v-if="isUpgrade">
+					<text>收起<text class="iconfont icon-xiangshangjiantou"></text></text>
+				</view>
+				<view class="register-agree">
+					<view class="agree-text"  @tap.stop="agreeCheck()">
+						<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 ">
+					<view class="register-btn sub" @click.stop="registerStepsSub">{{registerBtnText}}</view>
+				</view>
 			</view>
+		</view>
+		<view class="register-main detailed clearfix" v-show="isUpgrade">
 			<view class="register-row clearfix">
-				<view class="register-from">
-					<view class="label">机构名称:</view>
-					<input class="row-input" type="text" name="input" v-model="clubName" placeholder="请输入您的机构名称" maxlength="30"/>
-				</view>
+				<text class="register-title">升级信息</text></text>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
-					<view class="label">联系人:</view>
-					<input class="row-input" type="text" name="input" v-model="clubContact" placeholder="请输入联系姓名" maxlength="6"/>
+					<view class="label">邮箱:</view>
+					<input class="row-input" type="text"  name="input" v-model="registerEmail" placeholder="请输入机构邮箱地址" maxlength="30"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
-				<view class="register-from code">
-					<view class="label">手机号:</view>
-					<input class="row-input phone" type="text" v-model="registerMobile" placeholder="请输入联系人手机号" maxlength="11"/>
-				</view>
-				<view class="register-from btn">
-					<button class="row-input" type="button" @click.stop="registerCheckMobile()">检测</button>
+				<view class="register-from">
+					<view class="label">机构名称:</view>
+					<input class="row-input" type="text" name="input" v-model="clubName" placeholder="请输入您的机构名称" maxlength="30"/>
 				</view>
 			</view>
-		</view>
-		<view class="register-main detailed clearfix">
-			<view class="register-row clearfix">
-				<text class="register-title">详细信息<text>(请尽量填写)</text></text>
-			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">机构简称:</view>
@@ -68,7 +86,7 @@
 							v-model="addressData.addressDetail" 
 							placeholder="详细地址:如道路、门牌号、小区等" 
 							placeholder-class="placeholder"
-							maxlength="25"
+							maxlength="35"
 							@input="onTextareaInput"
 							:class="isShowInput ? '':''"
 				/>
@@ -92,8 +110,6 @@
 						</view>
 					</view>
 				</view>
-			</view>
-			<view class="register-row clearfix">
 				<view class="register-picture">
 					<view class="label">门头照:</view>
 					<view class="upload-picture">
@@ -131,7 +147,7 @@
 				</view>
 			</view>
 			<view class="register-row clearfix" v-if="isOrganizationType == 1">
-				<view class="register-picture">
+				<view class="register-picture zz">
 					<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>
@@ -202,20 +218,6 @@
 					</view>
 				</view>
 			</view>
-			<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 @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 ">
-					<view class="register-btn sub" @click.stop="registerStepsSub">提交审核</view>
-				</view>
-			</view>
 			<mpvue-city-picker :themeColor="themeColor"
 								ref="mpvueCityPicker" 
 							    :pickerValueDefault="cityPickerValueDefault"
@@ -228,6 +230,7 @@
 
 <script>
 	import { mapMutations } from 'vuex';
+	import { beautyList,mentuzCampNullList,medicaCampNullList } from '@/common/json/data.json.js' //本地数据
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
 	import authorize from '@/common/config/authorize.js' 
 	import { uploadFileImage } from "@/api/utils.js"
@@ -256,6 +259,8 @@
 				isAgreed:0,				//是否勾选协议
 				isDisabled:true,
 				isShowInput:false,
+				isUpgrade:false,
+				isDownUpgrade:true,
 				isCheck:false,			//是否勾选协议
 				uploadBusinessImage:'',	//营业执照图片
 				uploadMentuzImage:'',  	//门头照图片
@@ -266,18 +271,9 @@
 				mainpro:'',				//主营内容
 				isOrganizationType:0,
 				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'}
-				],
+				beautyList:beautyList,
+				mentuzCampList:mentuzCampNullList,
+				medicaCampList:medicaCampNullList,
 				typtIndex:0,
 				organizationType:3,
 				current:0,
@@ -290,6 +286,7 @@
 					provinceID:'',		//区ID
 					addressDetail: '',	//地址
 				},
+				registerBtnText:'确定'
 			}
 		},
 		onLoad(option) {
@@ -333,7 +330,59 @@
 				})
 			},
 			registerStepsSub(){
-				let params ={
+				let params = {};
+				if(this.isUpgrade){
+					if( this.clubContact == ''){
+						this.$util.msg('请输入联系人姓名',2000);
+						return
+					}
+					if( this.registerMobile == ''){
+						this.$util.msg('请输入联系人手机号',2000);
+						return
+					}
+					if(!this.$reg.isMobile(this.registerMobile)){
+						this.$util.msg('手机格式不正确',2000);
+						return
+					}	
+					if( this.registerEmail == ''){
+						this.$util.msg('请输入邮箱地址',2000);
+						return
+					}
+					if(!this.$reg.isEmail(this.registerEmail)){
+						this.$util.msg('请输入正确的邮箱地址',2000);
+						return
+					}
+					if( this.clubName == ''){
+						this.$util.msg('请输入机构名称',2000);
+						return
+					}
+					if( this.addressData.townID == ''){
+						this.$util.msg('请选择机构地址',2000);
+						return
+					}
+					if( this.addressData.addressDetail == ''){
+						this.$util.msg('请填写机构详细地址',2000);
+						return
+					}
+					if( this.socialCreditCode == ''){
+						this.$util.msg('请填写社会统一社会信用代码',2000);
+						return
+					}
+					if( this.uploadBusinessImage == ''){
+						this.$util.msg('请上传您的营业执照',2000);
+						return
+					}
+					if(this.isOrganizationType!=0){
+						if(this.mainpro == ''){
+							this.$util.msg('请选择住机构主营内容',2000);
+							return
+						}
+					}
+					if(this.isAgreed == 0){
+						this.$util.msg('请勾选同意协议',2000);
+						return
+					}
+					params ={
 						email:this.registerEmail,
 						name:this.clubName,
 						linkMan1:this.clubContact,
@@ -353,6 +402,30 @@
 						isAgreed:this.isAgreed,				//是否勾选协议	
 						mainpro:this.mainpro,
 						userID:this.userID
+					}
+				}else{
+					if( this.clubContact == ''){
+						this.$util.msg('请输入联系人姓名',2000);
+						return
+					}
+					if( this.registerMobile == ''){
+						this.$util.msg('请输入联系人手机号',2000);
+						return
+					}
+					if(!this.$reg.isMobile(this.registerMobile)){
+						this.$util.msg('手机格式不正确',2000);
+						return
+					}	
+					if(this.isAgreed == 0){
+						this.$util.msg('请勾选同意协议',2000);
+						return
+					}
+					params ={
+						linkMan1:this.clubContact,
+						bindMobile:this.registerMobile,
+						isAgreed:this.isAgreed,				//是否勾选协议	
+						userID:this.userID
+					}
 				}
 				sellerClubRegister(params).then(response =>{
 					this.$util.msg('注册成功,已短息通知联系人',2000);
@@ -379,6 +452,9 @@
 			onTextareaInput(e){//地址详细信息
 			   this.addressData.addressDetail = e.detail.value;
 			},
+			onTextareaInputInfo(e){//公司简介
+			   this.companyPprofile = e.detail.value;
+			},
 			chooseBusinessImage() {//营业执照图片上传
 				uploadFileImage().then(res =>{
 					this.uploadBusinessImage = JSON.parse(res.data).data
@@ -512,6 +588,18 @@
 					this.medicaCampList.push(item)
 				}
 			},
+			showUpgrade(){
+				this.isUpgrade = true
+				this.isDownUpgrade = false
+				this.registerBtnText = '提交审核'
+			},
+			hideUpgrade(){
+				this.$util.modal('提示','收起后,您填写的升级信息将会被清空确定收起吗?','确定','取消',true,() =>{
+					this.isUpgrade = false
+					this.isDownUpgrade = true
+					this.registerBtnText = '确定'
+				})
+			}
 		},
 		onShow() {
 			if(this.isPreviewImage){
@@ -603,6 +691,29 @@
 						font-size: $font-size-24;
 					}
 				}
+				.register-txt{
+					line-height: 44rpx;
+					font-size: $font-size-26;
+					color: $text-color;
+					text-align: left;
+					&.first{
+						margin-top: 20rpx;
+					}
+				}
+				.register-bet{
+					width: 100%;
+					display: flex;
+					line-height: 60rpx;
+					height: 60rpx;
+					align-items: center;
+					flex-direction: column;
+					font-size: $font-size-28;
+					color: $color-system;
+					margin-top: 40rpx;
+					text{
+						margin: 0 5rpx;
+					}
+				}
 				.register-text{
 					line-height: 44rpx;
 					margin-top: 100rpx;
@@ -759,7 +870,7 @@
 						align-items: center;
 						&.btn{
 							margin: 0 auto;
-							margin-left: 126rpx;
+							margin-left: 116rpx;
 						}
 						.row-input{
 							display: flex;
@@ -839,7 +950,12 @@
 			}
 			.register-picture{
 				height: 102rpx;
-				margin: 40rpx 0 0 0;
+				margin: 30rpx 0;
+				width: 42%;
+				float: left;
+				&.zz{
+					width: 100%;
+				}
 				.label{
 					float: left;
 					font-size: $font-size-28;
@@ -920,6 +1036,23 @@
 				left: 0;
 				z-index: 999;
 				background: #FFFFFF;
+				.register-bet{
+					width: 100%;
+					display: flex;
+					line-height: 60rpx;
+					height: 60rpx;
+					align-items: center;
+					flex-direction: column;
+					font-size: $font-size-28;
+					color: $color-system;
+					margin-top: 20rpx;
+					.icon-xiangxiajiantou{
+						transform:rotate(180deg);
+					}
+					text{
+						margin: 0 5rpx;
+					}
+				}
 				.register-agree{
 					display: flex;
 					flex-direction: column;