Sfoglia il codice sorgente

注册登录联调通过

zhengjinyi 2 anni fa
parent
commit
7350e151c2

+ 0 - 1
components/cm-module/orderDetails/orderInformation.vue

@@ -17,7 +17,6 @@
 			<view class="information-view">
 				<view class="view-num bold">
 					订单标识:<label class="label">{{ orderData.orderMark ? orderData.orderMark : '' }}</label>
-					<text class="clipboard" @click="clipboard(orderData.orderMark)">复制</text>
 				</view>
 			</view>
 			<view class="information-view same">

+ 1 - 1
manifest.json

@@ -56,7 +56,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wxf3cd4ae0cdd11c36",
+        "appid" : "wxaa4acc852618da69",
         "setting" : {
             "urlCheck" : false,
             "minified" : true,

+ 1 - 12
mixins/appMixins.js

@@ -6,7 +6,7 @@ const appMixins = {
         ...mapState(['hasLogin','isWxAuthorize'])
     },
     methods: {
-        ...mapMutations(['login','logout','updateNoticeNum','updateRossShow']),
+        ...mapMutations(['login','logout','updateNoticeNum']),
         async getWxAuthorize(){
             const wechatCode = await authorize.getCode('weixin')// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
             const getUserInfo = await authorize.getUserInfo('weixin')
@@ -18,24 +18,13 @@ const appMixins = {
                 .then(response =>{
                     this.$store.commit('updateStatus',response.data)
                     this.login(response.data)
-                    this.updateRossShow()
                     uni.setStorageSync('token',response.data.token)
                     uni.setStorageSync('unionId',response.data.unionId)
                 })
                 .catch(error =>{
                     this.logout(error.data)
                     this.$store.commit('updateStatus',error.data)
-                    this.updateRossShow()
                     uni.setStorageSync('unionId',error.data.unionId)
-                    if(!this.hasLogin){
-                        if(uni.getStorageSync('isActivitySwitch')){
-                            const  lockTime = uni.getStorageSync('lockTime')
-                            const  eTime = this.diffTime(lockTime)
-                            this.$store.dispatch('setActivityFn',eTime)
-                        }else{
-                            this.$store.dispatch('setActivityFn',true)
-                        }
-                    }
                 })
         },		
         appUpdataRefresh(){

+ 2 - 3
pages.json

@@ -101,10 +101,9 @@
 					}
 				},
 				{
-					"path": "apply",
+					"path": "register-unid",
 					"style": {
-						"navigationBarTitleText": "升级资质机构",
-						"navigationStyle": "custom"
+						"navigationBarTitleText": "修改资料"
 					}
 				},
 				{

+ 38 - 49
pages/goods/product.vue

@@ -17,7 +17,7 @@
 		>
 		</custom-p>
 		<tui-skeleton
-			v-if="skeletonShow"
+			v-if="!skeletonShow"
 			backgroundColor="#fafafa"
 			borderRadius="10rpx"
 			:isLoading="true"
@@ -57,7 +57,7 @@
 						</view>
 						<view class="product-wrap clearfix">
 							<view class="wrap-top">
-								<view class="wrap-top-price"> <cm-price v-if="isRequest" :product="product" /> </view>
+								<view class="wrap-top-price"> <cm-price v-if="skeletonShow" :product="product" /> </view>
 								<view class="p-title tui-skeleton-fillet">
 									<view class="p-title-name">
 										{{ product.name == undefined ? '' : product.name }}
@@ -225,15 +225,13 @@ export default {
 			iconClass: 'icon-aixin',
 			iconColor: '#ff9100',
 			specClass: '', // 规格弹窗css类,控制开关动画
-			isRequest: false,
 			isScrollTop: false,
 			current: 0,
 			isShareType: '',
 			isHeaderPoduct: false,
 			navbarFiexd: 'none',
-			isEvaluate: false,
 			isAnimation: false,
-			skeletonShow: true,
+			skeletonShow: false,
 			disabled: false,
 			userId: 0,
 			productId: 0,
@@ -309,58 +307,49 @@ export default {
 	methods: {
 		async initGetStotage() {
 			// 初始化
-			const userInfo = await this.$api.getStorage()
-			this.userId = this.addParams.userId = userInfo.userId ? userInfo.userId : 0
-			this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
+			// const userInfo = await this.$api.getStorage()
+			// this.userId = this.addParams.userId = userInfo.userId ? userInfo.userId : 0
+			// this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
 			if (isPreviewImg) {
 				isPreviewImg = false
 				return
 			} else {
-				this.initData()
+				this.getProductDetils()
 			}
 		},
-		initData() {
+		async getProductDetils() {
 			// 初始化商品详情查询
-			this.ProductService.QueryProductDetils({
-				userId: this.userId,
-				productId: this.productId,
-				identity: this.identity,
-				typeId: 0
-			})
-				.then(response => {
-					this.productImage = []
-					const dataStr = JSON.stringify(response.data)
-					this.product = JSON.parse(dataStr)
-					this.skuProduct = JSON.parse(dataStr)
-					this.skusCount = this.product.skus.length
-					this.addParams.skuId = this.product.skuId
-					// 判断是否显示已收藏
-					if (this.product.userLike && this.product.userLike == 1) {
-						this.collectionType = true
-					} else {
-						this.collectionType = false
-					}
-					this.html = this.adaptRichTextImg(this.product)
-					//处理商品图片列表
-					this.product.imageList.forEach(item => {
-						this.productImage.push(item.image)
-					})
-					//处理下架商品和售罄商品
-					if (this.product.validFlag == 3) {
-						this.goodsData.disabledText = '下架'
-						this.goodsData.disabled = true
-					}
-					if ((this.hasLogin && this.userIdentity == 2) || this.userIdentity == 4) {
-						this.ProductCartNumber()
-					}
-					setTimeout(() => {
-						this.skeletonShow = false
-						this.isRequest = true
-					}, 1000)
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
+			try{
+				const res = await this.ProductService.getProductDetils({productId: this.productId})
+				const data = res.data
+				const dataStr = JSON.stringify(data)
+				this.product = JSON.parse(dataStr)
+				this.skuProduct = JSON.parse(dataStr)
+				this.skusCount = this.product.skus.length
+				this.addParams.skuId = this.product.skuId
+				// 判断是否显示已收藏
+				if (this.product.userLike && this.product.userLike == 1) {
+					this.collectionType = true
+				} else {
+					this.collectionType = false
+				}
+				this.html = this.adaptRichTextImg(this.product)
+				//处理商品图片列表
+				this.product.imageList.forEach(item => {
+					this.productImage.push(item.image)
 				})
+				//处理下架商品和售罄商品
+				if (this.product.validFlag == 3) {
+					this.goodsData.disabledText = '下架'
+					this.goodsData.disabled = true
+				}
+				if (this.hasLogin) {
+					this.ProductCartNumber()
+				}
+				this.skeletonShow = true
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
 		},
 		adaptRichTextImg(product) {
 			// 商品详情

+ 102 - 81
pages/login/login.vue

@@ -3,70 +3,79 @@
 		<view class="login-main">
 			<image class="logo" :src="staticUrl + 'logo@2x.png'" mode=""></image>
 		</view>
-		<view class="login-form" v-if="loginType === 0">
-			<view class="login-input">
-				<text class="iconfont icon-shoujihao"></text>
-				<input
-					type="number"
-					v-model="codeParams.mobile"
-					maxlength="11"
-					class="input"
-					placeholder="请输入已注册的手机号"
-					@input="handleMobile"
-				/>
+		<tui-skeleton
+			v-if="skeletonShow"
+			backgroundColor="#fafafa"
+			borderRadius="10rpx"
+			:isLoading="true"
+			:loadingType="5"
+		></tui-skeleton>
+		<template else>
+			<view class="login-form" v-if="loginType === 0">
+				<view class="login-input">
+					<text class="iconfont icon-shoujihao"></text>
+					<input
+						type="number"
+						v-model="codeParams.mobile"
+						maxlength="11"
+						class="input"
+						placeholder="请输入已注册的手机号"
+						@input="handleMobile"
+					/>
+				</view>
+				<view class="login-input">
+					<text class="iconfont icon-duanxin"></text>
+					<input
+						type="number"
+						v-model="codeParams.code"
+						maxlength="6"
+						class="input code"
+						placeholder="请输入短信验证码"
+						@input="handleSmsCode"
+					/>
+					<view class="code-btn" :class="isMobileDisabled ? 'disabled':''" @click.stop="handleMobileCode"> {{ mobileCodeText }} </view>
+				</view>
+				<view class="login-input link">
+					<view class="login-reg" v-if="!isUnderLogin" @click.stop="navigatorRegirst('/pages/login/register')">免费注册</view>
+					<view class="login-pwd" @click.stop="handeleLogin(1)">密码登录</view>
+				</view>
 			</view>
-			<view class="login-input">
-				<text class="iconfont icon-duanxin"></text>
-				<input
-					type="number"
-					v-model="codeParams.code"
-					maxlength="6"
-					class="input code"
-					placeholder="请输入短信验证码"
-					@input="handleSmsCode"
-				/>
-				<view class="code-btn" :class="isMobileDisabled ? 'disabled':''" @click.stop="handleMobileCode"> {{ mobileCodeText }} </view>
+			<view class="login-form" v-if="loginType === 1">
+				<view class="login-input">
+					<text class="iconfont icon-shoujihao"></text>
+					<input
+						type="text"
+						v-model="accountParams.mobileOrEmail"
+						maxlength="30"
+						class="input"
+						placeholder="请输入已注册的手机号"
+						@input="handleMobileOrEmail"
+					/>
+				</view>
+				<view class="login-input">
+					<text class="iconfont icon-mima"></text>
+					<input
+						type="text"
+						v-model="accountParams.password"
+						maxlength="18"
+						class="input"
+						placeholder="请输入密码"
+						autocomplete="new-password"
+						@input="handlePassword"
+					/>
+				</view>
+				<view class="login-input link">
+					<view class="login-reg" v-if="!isUnderLogin" @click.stop="navigatorRegirst('/pages/login/register')">免费注册</view>
+					<view class="login-pwd" @click.stop="handeleLogin(0)">验证码登录</view>
+				</view>
 			</view>
-			<view class="login-input link">
-				<view class="login-reg" @click.stop="navigatorRegirst('/pages/login/register')">免费注册</view>
-				<view class="login-pwd" @click.stop="handeleLogin(1)">密码登录</view>
-			</view>
-		</view>
-		<view class="login-form" v-if="loginType === 1">
-			<view class="login-input">
-				<text class="iconfont icon-shouji"></text>
-				<input
-					type="text"
-					v-model="accountParams.mobileOrEmail"
-					maxlength="30"
-					class="input"
-					placeholder="请输入已注册的手机号"
-					@input="handleMobileOrEmail"
-				/>
-			</view>
-			<view class="login-input">
-				<text class="iconfont icon-mima"></text>
-				<input
-					type="text"
-					v-model="accountParams.password"
-					maxlength="18"
-					class="input"
-					placeholder="请输入密码"
-					autocomplete="new-password"
-					@input="handlePassword"
-				/>
-			</view>
-			<view class="login-input link">
-				<view class="login-reg" @click.stop="navigatorRegirst('/pages/login/register')">免费注册</view>
-				<view class="login-pwd" @click.stop="handeleLogin(0)">验证码登录</view>
-			</view>
-		</view>
-		<button class="login-btn" :disabled="isDisabled" :class="isDisabled ? 'disabled' : ''" @click="handleSubLogin">
-			登录
-		</button>
-		<view class="login-text" v-if="loginType === 1" @click.stop="this.$api.navigateTo('/pages/login/password')"
-			>忘记密码?</view
-		>
+			<button class="login-btn" :disabled="isDisabled" :class="isDisabled ? 'disabled' : ''" @click="handleSubLogin">
+				登录
+			</button>
+			<view class="login-text" v-if="loginType === 1" @click.stop="this.$api.navigateTo('/pages/login/password')"
+				>忘记密码?</view
+			>
+		</template>
 	</view>
 </template>
 
@@ -77,6 +86,8 @@ import wxLogin from '@/common/config/wxLogin.js'
 export default {
 	data() {
 		return {
+			staticUrl:this.global.staticUrl,
+			skeletonShow:true,
 			getOption: '', //页面传递参数
 			accountParams: {
 				mobileOrEmail: '', //用户登录账号
@@ -89,14 +100,19 @@ export default {
 				unionId: ''
 			},
 			smsCodeParams: {
-				mobile: '' //用户登录手机号
+				mobile: '' ,//用户登录手机号
+				imgCode:'',
+				platformType:0,
+				isCheckCaptcha:1,
+				activateCodeType:9
 			},
 			loginType: 0,
 			isMobileDisabled: false, //手机验证码按钮控制
 			mobilCount: '', //倒计时
 			mobileCodeText: '获取验证码',
 			mobilTime: null,
-			isDisabled: true
+			isDisabled: true,
+			isUnderLogin:false
 		}
 	},
 	onLoad(option) {
@@ -107,6 +123,13 @@ export default {
 	},
 	methods: {
 		...mapMutations(['login']),
+		async infoClucbUser(){
+			const user = await this.$api.getStorage()
+			if(user.clubStatus === 1 || user.clubStatus === 99){
+				this.isUnderLogin = true
+			}
+			this.skeletonShow = false
+		},
 		handleMobileOrEmail(e) {
 			//账号输入
 			this.accountParams.mobileOrEmail = e.detail.value
@@ -186,17 +209,23 @@ export default {
 				this.userPasswordLogin()
 			}
 		},
-		userCodeLogin() {
+		async userCodeLogin() {
 			// 短信验证码登录
-			this.UserService.userCodeLogin(this.codeParams).then(response => {
-				this.updataeStatus(response)
-			})
+			try{
+				const res =await this.UserService.userCodeLogin(this.codeParams)
+				this.updataeStatus(res)
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
 		},
-		userPasswordLogin() {
+		async userPasswordLogin() {
 			// 账号密码登录
-			this.UserService.AorganizationLogin(this.accountParams).then(response => {
-				this.updataeStatus(response)
-			})
+			try{
+				const res =await this.UserService.AorganizationLogin(this.accountParams)
+				this.updataeStatus(res)
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
 		},
 		updataeStatus(data) {
 			// 处理返回数据
@@ -204,14 +233,6 @@ export default {
 				uni.setStorageSync('token', data.data.token)
 				this.$store.commit('updateStatus', data.data)
 				this.login(data.data)
-				this.$api.navigateTo(
-					`/pages/login/bindwechat?data=${JSON.stringify(this.getOption)}&codeType=${data.code}`
-				)
-			} else if (data.code === -3) {
-				this.$util.modal('', '您的企业账号审核未通过,请修改资料', '前往修改', '', false, () => {
-					this.$store.commit('updateStatus', data.data)
-					this.$api.navigateTo('/pages/login/apply-supplier')
-				})
 			} else {
 				this.$util.msg(data.msg, 2000)
 			}
@@ -228,7 +249,7 @@ export default {
 		}
 	},
 	onShow() {
-		this.checkedAuthorize()
+		this.infoClucbUser()
 	}
 }
 </script>

+ 713 - 0
pages/login/register-unid.vue

@@ -0,0 +1,713 @@
+<template>
+	<view class="container register" :style="{ paddingTop: CustomBar + 'px' }">
+		<view class="register-main title clearfix" v-if="isUnderLogin">
+			<view class="register-row  clearfix" style="padding: 24rpx;margin-bottom: 0;">
+				<view class="error-title">审核未通过原因:</view>
+				<view class="error-main">
+					 {{ auditNote }}
+				</view>
+			</view>
+		</view>
+		<view class="register-main clearfix">
+			<view class="register-row clearfix">
+				<view class="register-from">
+					<view class="label"><text>*</text>联系人</view>
+					<input
+						class="row-input"
+						type="text"
+						v-model="params.linkMan"
+						placeholder="请输入联系姓名"
+						placeholder-class="placeholder"
+						maxlength="6"
+					/>
+				</view>
+			</view>
+			<view class="register-row clearfix">
+				<view class="register-from">
+					<view class="label"><text>*</text>机构名称</view>
+					<input
+						class="row-input"
+						type="text"
+						v-model="params.name"
+						placeholder="请输入您的机构名称"
+						placeholder-class="placeholder"
+						maxlength="30"
+					/>
+				</view>
+			</view>
+			<view class="register-row clearfix">
+				<view class="register-from" @click="showMulLinkageThreePicker">
+					<view class="label"><text>*</text>机构地址</view>
+					<text class="row-input" :class="handleAddress === '请选择机构所在地区' ? 'none' : ''">
+						{{ handleAddress }}
+					</text>
+					<text class="iconfont icon-xiangyou"></text>
+				</view>
+			</view>
+			<view class="register-row text-textarea clearfix">
+				<view
+					class="textarea"
+					v-if="isShowInput"
+					placeholder-class="placeholder"
+					@click="showTextareaFocus"
+					>{{
+						params.address ? params.address : '详细地址:如道路、门牌号、小区等'
+					}}</view
+				>
+				<textarea
+					v-else
+					class="textarea"
+					type="text"
+					v-model="params.address"
+					placeholder="详细地址:如道路、门牌号、小区等"
+					placeholder-class="placeholder"
+					maxlength="25"
+					@input="onTextareaInput"
+					@focus="textareaFocus"
+					@blur="hideTextareaFocus"
+					:class="isShowInput ? '' : ''"
+				/>
+			</view>
+			<view class="register-row clearfix">
+				<view class="register-from">
+					<view class="label"><text>*</text>营业执照编号</view>
+					<input
+						class="row-input"
+						type="text"
+						v-model="params.socialCreditCode"
+						placeholder="请填写社会统一信用代码"
+						placeholder-class="placeholder"
+						maxlength="18"
+					/>
+				</view>
+			</view>
+			<view class="register-row clearfix">
+				<view class="register-picture">
+					<view class="label"><text>*</text>营业执照</view>
+					<view class="upload-picture">
+						<view class="upload-none" v-if="!params.businessLicense" @click="uploadFileImage(1)">
+							<text class="iconfont icon-shangchuantupian"></text>
+							<text>选择图片</text>
+						</view>
+						<view class="upload-image" v-else>
+							<image :src="params.businessLicense" mode="" @click="handleViewImage(params.businessLicense)"></image>
+							<view class="upload-del" @click="handleDelete(1)">
+								<text class="iconfont icon-shanchu"></text>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="register-row clearfix">
+				<view class="register-picture">
+					<view class="label"><text>*</text>门头照</view>
+					<view class="upload-picture">
+						<view class="upload-none"  v-if="!params.shopPhoto" @click="uploadFileImage(2)">
+							<text class="iconfont icon-shangchuantupian"></text>
+							<text>选择图片</text>
+						</view>
+						<view class="upload-image" v-else>
+							<image :src="params.shopPhoto" mode="" @click="handleViewImage(params.shopPhoto)"></image>
+							<view class="upload-del" @click="handleDelete(2)">
+								<text class="iconfont icon-shanchu"></text>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="register-row clearfix">
+				<view class="register-picture">
+					<view class="label"><text>*</text>医疗执业许可证</view>
+					<view class="upload-picture">
+						<view class="upload-none" v-if="!params.medicalPracticeLicense"  @click="uploadFileImage(3)">
+							<text class="iconfont icon-shangchuantupian"></text>
+							<text>选择图片</text>
+						</view>
+						<view class="upload-image" v-else>
+							<image :src="params.medicalPracticeLicense" mode="" @click="handleViewImage(params.medicalPracticeLicense)"></image>
+							<view class="upload-del" @click="handleDelete(3)">
+								<text class="iconfont icon-shanchu"></text>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="register-row ">
+				<view class="register-btn sub" @click.stop="handleConfirm">重新提交审核</view>
+			</view>
+		</view>	
+		<!-- 地址  -->
+		<mpvue-city-picker
+			:themeColor="themeColor"
+			ref="mpvueCityPicker"
+			:pickerValueDefault="cityPickerValueDefault"
+			@onCancel="onCancel"
+			@onConfirm="onConfirm"
+		>
+		</mpvue-city-picker>
+		<!-- 弹窗提示 -->
+		<tui-modal
+			:show="modal"
+			@click="handleClick"
+			@cancel="modal = false"
+			:content="'注册尚未完成,确定放弃注册吗?'"
+			:button="modalButton"
+			color="#333"
+			:size="32"
+			shape="circle"
+			:maskClosable="false"
+		>
+		</tui-modal>
+	</view>
+</template>
+
+<script>
+import { mapState, mapMutations } from 'vuex'
+import authorize from '@/common/config/authorize.js'
+import wxLogin from '@/common/config/wxLogin.js'
+import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
+import { uploadFileImage } from '@/services/public.js'
+export default {
+	components: {
+		mpvueCityPicker
+	},
+	data() {
+		return {
+			params: {
+				name:'',
+				linkMan:'',
+				provinceId: '',
+				cityId: '',
+				townId:'',
+				address: '',
+				organizeType:1, //外部商城机构类型 0内部机构 1外部机构
+				shopPhoto:'',
+				businessLicense:'',
+				medicalPracticeLicense:'',
+			},
+			handleAddress:'请选择机构所在地区',
+			isUnderLogin:false,
+			auditNote:''
+		}
+	},
+	onLoad(option) {
+		this.updateModifyInfo()
+	},
+	computed: {
+		...mapState(['isWxAuthorize'])
+	},
+	methods: {
+		...mapMutations(['login', 'wxLogin']),
+		async updateModifyInfo() {
+			const resolve =await this.$api.getStorage()
+			this.params.userId = resolve.userId ? resolve.userId : 0
+			if(resolve.clubStatus === 92){
+				this.isUnderLogin = true
+			}
+			try{
+				const res =await this.UserService.OrganizationUpdateModifyInfo({ userId: this.params.userId })
+				let club = res.data.club
+				let user = res.data.user
+				this.auditNote = user.auditNote
+				this.params.clubId = user.clubId
+				this.handleAddress = club.provincialAddress ? club.provincialAddress : '请选择机构所在地区'
+				this.params = {...this.params , ...club}
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		handleConfirm(){
+			// 提交审核
+			if (this.params.linkMan == '') {
+				this.$util.msg('请输入联系人名称', 2000)
+				return
+			}
+			if (this.params.name == '') {
+				this.$util.msg('请输入机构名称', 2000)
+				return
+			}
+			if (this.params.townId == '') {
+				this.$util.msg('请选择机构地址', 2000)
+				return
+			}
+			if (this.params.addressDetail == '') {
+				this.$util.msg('请填写机构详细地址', 2000)
+				return
+			}
+			if (this.params.businessLicense == '') {
+				this.$util.msg('请上传营业执照', 2000)
+				return
+			}	
+			if (this.params.shopPhoto == '') {
+				this.$util.msg('请上传门头照', 2000)
+				return
+			}
+			if (this.params.medicalPracticeLicense == '') {
+				this.$util.msg('请上传医疗执业许可证', 2000)
+				return
+			}
+			this.clubUpdate(this.params)
+		},
+		async clubUpdate(params) {
+			// 注册
+			try{
+				await this.UserService.OrganizationUpdate(params)
+				this.$util.msg('提交成功', 2000)
+				this.$api.navigateBack(1)
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		storeUpdataeStatus(data) {
+			uni.setStorageSync('token', data.token)
+			this.$store.commit('updateStatus', data)
+			this.login(data)
+		},
+		// 三级联动选择
+		showMulLinkageThreePicker() {
+			this.isShowInput = true
+			this.$refs.mpvueCityPicker.show()
+		},
+		onConfirm(e) {
+			this.handleAddress = e.name
+			this.params.townId = e.townCode
+			this.params.cityId = e.cityCode
+			this.params.provinceId = e.provinceCode
+		},
+		onTextareaInput(e) {
+			//文本框获取焦点
+			this.params.address = e.detail.value
+		},
+		showTextareaFocus() {
+			//文本框获取焦点
+			this.isShowInput = false
+			this.textareaFocus = true
+		},
+		hideTextareaFocus() {
+			//文本框失去焦点
+			this.isShowInput = true
+			this.textareaFocus = false
+		},
+		//上传
+		async uploadFileImage(type){
+			try{
+				const res = await uploadFileImage()
+				const data = JSON.parse(res.data).data
+				switch (type){
+					case 1:
+						this.params.businessLicense = data
+						break;
+					case 2:
+						this.params.shopPhoto = data
+						break;
+					case 3:
+						this.params.medicalPracticeLicense = data
+						break;
+				}
+			}catch(error){
+				console.log('error',error)
+			}
+			
+		},
+		//预览
+		handleViewImage(url) {
+			this.isPreviewImage = true
+			let mentuzArray = []
+			mentuzArray.push(url)
+			uni.previewImage({
+				urls: mentuzArray,
+				current: 0
+			})
+			
+		},
+		//删除
+		handleDelete(type){
+			switch (type){
+				case 1:
+					this.$util.modal('', '确定删除营业执照图片吗?', '确定', '取消', true, () => {
+						this.params.businessLicense = ''
+					})
+					break;
+				case 2:
+					this.$util.modal('', '确定删除门头照图片吗?', '确定', '取消', true, () => {
+						this.params.shopPhoto = ''
+					})
+					break;
+				case 3:
+					this.$util.modal('', '确定删除资质图片吗?', '确定', '取消', true, () => {
+						this.params.medicalPracticeLicense = ''
+					})
+					break;
+			}
+		},
+		handleClick1(){
+			this.$api.switchTabTo('/pages/tabBar/user/user')
+		}
+	},
+	onShow() {
+		if (this.isPreviewImage) {
+			this.isPreviewImage = false
+			return
+		}
+	}
+}
+</script>
+
+<style lang="scss">
+.register {
+	width: 100%;
+	height: 100%;
+	box-sizing: border-box;
+	background-size: contain;
+	.register-tabs{
+		width: 100%;
+		height: 40rpx;
+		box-sizing: border-box;
+		padding:0 160rpx;
+		margin: 110rpx 0 40rpx 0;
+		.tabs-item{
+			float: left;
+			line-height: 40rpx;
+			font-size: $font-size-30;
+			color: #B2B2B2;
+			.iconfont{
+				font-size: 40rpx;
+			}
+			&.active{
+				color: $color-system;
+			}
+			&.line{
+				width: 50rpx;
+				height: 40rpx;
+				margin: 0 20rpx;
+				.iconfont{
+					font-size: 58rpx;
+				}
+			}
+		}
+	}
+	.register-main {
+		width: 100%;
+		height: auto;
+		position: relative;
+		&.title {
+			background: #FEF6F6;
+			.error-title {
+				line-height: 40rpx;
+				font-size: $font-size-28;
+				color: #F85050;
+				text-align: left;
+			}
+			.error-main {
+				font-size: $font-size-26;
+				color: #F85050;
+				text-align: justify;
+				line-height: 44rpx;
+			}
+		}
+		.register-consult {
+			width: 110rpx;
+			height: 68rpx;
+			background: linear-gradient(223deg, rgba(225, 86, 21, 0.6) 0%, rgba(225, 86, 10, 0.3) 100%);
+			border-radius: 34rpx 0 0 34rpx;
+			position: absolute;
+			right: 0;
+			bottom: 120rpx;
+			text-align: left;
+			line-height: 68rpx;
+			padding-left: 20rpx;
+			.icon-kefunv {
+				font-size: 48rpx;
+				color: #31313b;
+				float: left;
+			}
+			.text {
+				font-size: $font-size-24;
+				display: block;
+				float: left;
+				width: 60rpx;
+				line-height: 30rpx;
+				color: #ffffff;
+				margin-top: 6rpx;
+			}
+		}
+		&.detailed {
+			padding-bottom: 330rpx;
+		}
+		.register-row {
+			width: 100%;
+			height: auto;
+			padding: 0 24rpx;
+			margin-bottom: 30rpx;
+			box-sizing: border-box;
+			&.none {
+				margin-bottom: 0;
+			}
+			.register-from {
+				width: 100%;
+				height: 80rpx;
+				background: #ffffff;
+				position: relative;
+				border-bottom: 1px solid #e1e1e1;
+				.label {
+					text-align: left;
+					font-size: $font-size-28;
+					color: #666666;
+					line-height: 80rpx;
+					float: left;
+					text{
+						color: #F85050;
+					}
+				}
+				.row-input {
+					width: 440rpx;
+					padding-left: 24rpx;
+					font-size: $font-size-28;
+					color: $text-color;
+					line-height: 80rpx;
+					float: left;
+					height: 80rpx;
+					box-sizing: border-box;
+					&.none {
+						color: #999999;
+					}
+					&.code {
+						width: 330rpx;
+					}
+				}
+				.row-btn {
+					width: 180rpx;
+					height: 64rpx;
+					float: left;
+					background: $btn-confirm;
+					padding: 0;
+					border-radius: 32rpx;
+					.row-input {
+						width: 180rpx;
+						height: 64rpx;
+						line-height: 64rpx;
+						padding: 0;
+						color: #ffffff;
+						background: $btn-confirm;
+						text-align: center;
+						border-radius: 32rpx;
+						&.none {
+							background: #f7f7f7;
+						}
+					}
+					&.disabled {
+						background: #f7f7f7;
+						.row-input {
+							background: #f7f7f7;
+							color: #999999;
+							font-size: 24rpx;
+						}
+					}
+				}
+				&.btn {
+					margin-top: 0;
+				}
+			}
+			.icon-xiangyou {
+				width: 88rpx;
+				height: 88rpx;
+				position: absolute;
+				right: 0;
+				top: 0;
+				line-height: 88rpx;
+				text-align: center;
+			}
+			&.text-textarea {
+				background: #ffffff;
+				.textarea {
+					width: 100%;
+					height: 120rpx;
+					padding:24rpx 0 ;
+					font-size: $font-size-28;
+					color: $text-color;
+					z-index: 1;
+					border-bottom: 1px solid #e1e1e1;
+				}
+				.textarea.hide {
+					opacity: 0;
+				}
+				.textarea.show {
+					color: #999999;
+				}
+			}
+		}
+		.register-picture {
+			width: 100%;
+			height: auto;
+			float: left;
+			.label {
+				float: left;
+				font-size: $font-size-28;
+				color: $text-color;
+				line-height: 80rpx;
+				width: 100%;
+				text-align: left;
+				text{
+					color: #F85050;
+				}
+			}
+			.upload-picture {
+				float: left;
+				height: auto;
+				.upload-none {
+					width: 210rpx;
+					height: 210rpx;
+					border: 1px dashed #B2B2B2;
+					border-radius: 10rpx;
+					display: flex;
+					justify-content: center;
+					flex-direction: column;
+					align-items: center;
+					font-size: $font-size-28;
+					color: #B2B2B2;
+					line-height: 50rpx;
+					.iconfont {
+						font-size: $font-size-28;
+					}
+				}
+				.upload-image {
+					width: 210rpx;
+					height: 210rpx;
+					border-radius: 10rpx;
+					margin: 0 20rpx;
+					position: relative;
+					image {
+						width: 210rpx;
+						height: 210rpx;
+						border-radius: 10rpx;
+					}
+					.upload-del {
+						width: 40rpx;
+						height: 40rpx;
+						position: absolute;
+						top: -20rpx;
+						right: -20rpx;
+						line-height: 40rpx;
+						text-align: center;
+						.iconfont {
+							font-size: $font-size-40;
+							color: #F85050;
+						}
+					}
+				}
+			}
+		}
+		.register-input {
+			width: 654rpx;
+			height: 40rpx;
+			padding: 24rpx;
+			margin: 0 auto;
+			margin-bottom: 60rpx;
+			background: #f7f7f7;
+			border-radius: 14rpx;
+			.input {
+				width: 100%;
+				height: 100%;
+				background: #f7f7f7;
+				font-size: $font-size-28;
+				line-height: 40rpx;
+				color: #333333;
+				border-radius: 14rpx;
+			}
+		}
+		.register-btn {
+			width: 100%;
+			height: 88rpx;
+			border-radius: 44rpx;
+			font-size: $font-size-28;
+			line-height: 88rpx;
+			color: #ffffff;
+			margin: 40rpx auto;
+			text-align: center;
+			background: $btn-confirm;
+			&.none {
+				border: 1px solid $color-system;
+				background: #ffffff;
+				color: $color-system;
+				margin-top: 0;
+			}
+		}
+	}
+}
+.tui-alert-box {
+	width: 100%;
+	height: 100%;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	flex-direction: column;
+	position: fixed;
+	left: 0;
+	top: 0;
+	opacity: 1;
+	background: rgba(51, 51, 51, 0.5);
+	z-index: 99999;
+	.tui-alert-content {
+		width: 580rpx;
+		height: 324rpx;
+		border-radius: 16rpx;
+		background-color: #ffffff;
+		position: absolute;
+		top: 0;
+		bottom: 0;
+		right: 0;
+		left: 0;
+		margin: auto;
+		.tui-alert-main {
+			width: 100%;
+			height: 234rpx;
+			box-sizing: border-box;
+			padding: 60rpx 30rpx;
+			line-height: 60rpx;
+			font-size: $font-size-26;
+			color: #666666;
+			text-align: justify;
+			.red {
+				color: #F3B574;
+			}
+		}
+		.tui-alert-btn {
+			width: 100%;
+			height: 90rpx;
+			box-sizing: border-box;
+			line-height: 90rpx;
+			background: $btn-confirm;
+			color: #ffffff;
+			text-align: center;
+			font-size: $font-size-28;
+			border-radius: 0 0 16rpx 16rpx;
+		}
+	}
+}
+.tui-modal-custom {
+	text-align: center;
+}
+
+.tui-modal-custom-text {
+	font-size: 30rpx;
+	color: #333;
+	padding: 30rpx 0 50rpx;
+}
+
+.tui-button-custom{
+	width: 420rpx;
+	height: 84rpx;
+	line-height: 84rpx;
+	text-align: center;
+	color: #FFFFFF;
+	background: $btn-confirm;
+	font-size: $font-size-28;
+	margin: 15rpx auto;
+	border-radius: 42rpx;
+}
+
+.tui-prompt-title {
+	padding-bottom: 20rpx;
+	font-size: 34rpx;
+}
+</style>

+ 103 - 73
pages/login/register.vue

@@ -76,9 +76,9 @@
 					/>
 				</view>
 			</view>
-			<view class="register-main clearfix">
+			<view class="register-main clearfix" style="margin-top: 180rpx;">
 				<view class="register-row ">
-					<view class="register-btn sub" @click.stop="handleStep(1)">下一步</view>
+					<view class="register-btn sub" @click.stop="handleCheckRegist">下一步</view>
 				</view>
 			</view>
 		</view>
@@ -225,7 +225,7 @@
 			<view class="tui-modal-custom">
 				<view class="tui-prompt-title">提交成功!</view>
 				<view class="tui-modal-custom-text">您的资料将会在1-3个工作日内进行审核,审核通过后才能进行采购。</view>
-				<view class="tui-button-custom" @click="modal1 = false"> 确定 </view>
+				<view class="tui-button-custom" @click="handleClick1"> 确定 </view>
 			</view>
 		</tui-modal>
 		<!-- 弹窗提示 -->
@@ -290,27 +290,30 @@ export default {
 			mobilTime: null,
 			params: {
 				bindMobile: '',
-				isAgreed: 0,
 				password: '',
 				passWordConfirm: '',
 				smsCode: '',
-				avatarUrl: '',
+				avatarUrl: 'https://img1.baidu.com/it/u=928439317,3166459101&fm=253&fmt=auto&app=138&f=JPEG?w=504&h=500',
 				nickName: '',
-				source: 1,
 				unionId: '',
-				linkMan:'',
 				name:'',
 				provinceId: '',
 				cityId: '',
 				townId:'',
 				address: '',
-				shopPhoto:'',
-				businessLicense:'',
-				medicalPracticeLicense:'',
+				organizeType:1, //外部商城机构类型 0内部机构 1外部机构
+				shopPhoto:'https://img1.baidu.com/it/u=928439317,3166459101&fm=253&fmt=auto&app=138&f=JPEG?w=504&h=500',
+				businessLicense:'https://img1.baidu.com/it/u=928439317,3166459101&fm=253&fmt=auto&app=138&f=JPEG?w=504&h=500',
+				medicalPracticeLicense:'https://img1.baidu.com/it/u=928439317,3166459101&fm=253&fmt=auto&app=138&f=JPEG?w=504&h=500',
+			},
+			codeParams:{
+				mobile: '',
+				isCheckCaptcha: 1,
+				activateCodeType: 2,
+				platformType: 2
 			},
 			handleAddress:'请选择机构所在地区',
-			userID: '', //机构userID
-			clubID: '' //机构ID
+			isCheckedCode:false
 		}
 	},
 	onLoad(option) {},
@@ -323,12 +326,21 @@ export default {
 		handleStep(step) {
 			this.stepNum = step
 		},
-		handleConfirm() {
-			this.modal1  = true
-			if (this.params.userName == '') {
-				this.$util.msg('请输入联系人名称', 2000)
-				return
+		async handleCheckRegist(){
+			if(this.isCheckedCode){
+				this.stepNum = 1
+			}else{
+				try{
+					this.handleCheck()
+					await this.UserService.checkRegisterClub(this.params)
+					this.isCheckedCode = true
+					this.stepNum = 1
+				}catch(error){
+					this.$util.msg(error.msg, 2000)
+				}
 			}
+		},
+		handleCheck() {
 			if (this.params.bindMobile == '') {
 				this.$util.msg('请输入手机号', 2000)
 				return
@@ -361,10 +373,38 @@ export default {
 				this.$util.msg('两次输入的密码不一致', 2000)
 				return
 			}
+			
+		},
+		handleConfirm(){
+			// 提交审核
+			if (this.params.name == '') {
+				this.$util.msg('请输入机构名称', 2000)
+				return
+			}
+			if (this.params.townId == '') {
+				this.$util.msg('请选择机构地址', 2000)
+				return
+			}
+			if (this.params.addressDetail == '') {
+				this.$util.msg('请填写机构详细地址', 2000)
+				return
+			}
+			if (this.params.businessLicense == '') {
+				this.$util.msg('请上传营业执照', 2000)
+				return
+			}	
+			if (this.params.shopPhoto == '') {
+				this.$util.msg('请上传门头照', 2000)
+				return
+			}
+			if (this.params.medicalPracticeLicense == '') {
+				this.$util.msg('请上传医疗执业许可证', 2000)
+				return
+			}
 			this.params.unionId = uni.getStorageSync('unionId')
-			this.GetUserProfile()
+			this.userProfile()
 		},
-		GetUserProfile() {
+		userProfile() {
 			//获取用户微信个人信息
 			const self = this
 			wx.getUserProfile({
@@ -374,31 +414,21 @@ export default {
 					self.wxLogin(res.userInfo)
 					self.params.nickName = res.userInfo.nickName
 					self.params.avatarUrl = res.userInfo.avatarUrl
-					self.UserRegisterClub(self.params)
-					// 友盟自定义事件
-					if (process.env.NODE_ENV != 'development') {
-						self.$uma.trackEvent('Um_Event_ConfirmRegister', {
-							Um_Key_PageName: '注册机构',
-							Um_Key_PageCategory: '注册机构页面'
-						})
-					}
+					self.userAccountRegister(self.params)
 				},
 				fail() {
 					self.$util.msg('授权失败', 2000)
 				}
 			})
 		},
-		UserRegisterClub(params) {
-			this.UserService.UserRegisterClub(params)
-				.then(response => {
-					wxLogin.wxLoginAuthorize()
-					setTimeout(() => {
-						this.$api.switchTabTo('/pages/tabBar/user/user')
-					}, 2000)
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
+		async userAccountRegister(params) {
+			// 注册
+			try{
+				await this.UserService.userAccountRegister(params)
+				this.modal1 = true
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
 		},
 		storeUpdataeStatus(data) {
 			uni.setStorageSync('token', data.token)
@@ -406,6 +436,7 @@ export default {
 			this.login(data)
 		},
 		getMobileCodeFn() {
+			// 点击获取短信验证码
 			if (this.params.bindMobile == '') {
 				this.$util.msg('请输入手机号', 2000)
 				return
@@ -414,37 +445,35 @@ export default {
 				this.$util.msg('请输入正确的手机号', 2000)
 				return
 			}
-			let params = {
-				mobile: this.params.bindMobile,
-				isCheckCaptcha: 1,
-				activateCodeType: 2,
-				platformType: 2
+			this.codeParams.mobile = this.params.bindMobile
+			this.getMobileCode(this.codeParams)
+		},
+		async getMobileCode(params){
+			//获取短信
+			try{
+				this.isMobileDisabled = true
+				await this.PublicService.GetRegisterMobileCode(params)
+				this.$util.msg('验证短信已发送', 2000)
+				const TIME_COUNT = 60
+				if (!this.mobilTime) {
+					this.mobilCount = TIME_COUNT
+					this.isMobileDisabled = true
+					this.mobilTime = setInterval(() => {
+						if (this.mobilCount > 1 && this.mobilCount <= TIME_COUNT) {
+					this.mobilCount--
+							this.mobileCodeText = this.mobilCount + 's重新发送'
+						} else {
+							this.isMobileDisabled = false
+							clearInterval(this.mobilTime)
+							this.mobilTime = null
+							this.mobileCodeText = '获取验证码'
+						}
+					}, 1000)
+				}
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+				this.isMobileDisabled = false
 			}
-			this.isMobileDisabled = true
-			this.PublicService.GetRegisterMobileCode(params)
-				.then(response => {
-					this.$util.msg('验证短信已发送', 2000)
-					const TIME_COUNT = 60
-					if (!this.mobilTime) {
-						this.mobilCount = TIME_COUNT
-						this.isMobileDisabled = true
-						this.mobilTime = setInterval(() => {
-							if (this.mobilCount > 1 && this.mobilCount <= TIME_COUNT) {
-			  			this.mobilCount--
-								this.mobileCodeText = this.mobilCount + 's重新发送'
-							} else {
-								this.isMobileDisabled = false
-								clearInterval(this.mobilTime)
-								this.mobilTime = null
-								this.mobileCodeText = '获取验证码'
-							}
-						}, 1000)
-					}
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-					this.isMobileDisabled = false
-				})
 		},
 		// 三级联动选择
 		showMulLinkageThreePicker() {
@@ -530,9 +559,11 @@ export default {
 			}
 			this.modal = false
 		},
-		async InitAuthorize() {
-			//是否已授权 0:为取消授权 1:为已授权 2:为未操作
-			wxLogin.wxLoginQuick()
+		handleClick1(){
+			wxLogin.wxLoginAuthorize()
+			setTimeout(()=>{
+				this.$api.switchTabTo('/pages/tabBar/user/user')
+			},1000)
 		}
 	},
 	onShow() {
@@ -540,7 +571,6 @@ export default {
 			this.isPreviewImage = false
 			return
 		}
-		// this.InitAuthorize()
 	}
 }
 </script>
@@ -649,7 +679,7 @@ export default {
 						color: #999999;
 					}
 					&.code {
-						width: 264rpx;
+						width: 330rpx;
 					}
 				}
 				.row-btn {

+ 15 - 9
pages/tabBar/home/components/floors.vue

@@ -13,16 +13,16 @@
 				</view>
 				<scroll-view scroll-x>
 					<view class="tui-goods__list">
-						<view class="tui-goods__item" @tap="group(2)" v-for="pros in floor.products">
+						<view class="tui-goods__item" @click="productDetail(pros.productId)" v-for="pros in floor.products">
 							<view class="tui-goods__imgbox">
-								<image :src="pros.mainImage" mode="widthFix" class="tui-goods__img"></image>
+								<image :src="pros.mainImage" mode="" class="tui-goods__img"></image>
 							</view>
 							<view class="tui-goods__namebox">
 								<text>{{ pros.name }}</text>
 							</view>
 							<view class="tui-pri__box">
-								<view class="tui-sale-pri" v-if="!hasLogin">
-									¥{{ pros.price }}
+								<view class="tui-sale-pri" v-if="hasLogin">
+									¥{{ pros.price | NumFormat }}
 								</view>
 								<view v-else class="tui-no-price">
 									<view class="p-stars">
@@ -55,9 +55,14 @@
 				type:Array
 			}
 		},
+		filters: {
+			NumFormat: function(text) {
+				//处理金额
+				return Number(text).toFixed(2)
+			}
+		},
 		data() {
 			return{
-				current:100,
 			}
 		},
 		created(){
@@ -69,8 +74,9 @@
 			handleFloor(floor){
 				this.$api.navigateTo(`/pages/goods/good-floor?id=${floor.id}`)
 			},
-			initData(list){
-				this.floorList = list
+			productDetail(productId) {
+				// 跳转商品详情
+				this.$api.navigateTo(`/pages/goods/product?id=${productId}`)
 			},
 		}
 	}
@@ -151,8 +157,8 @@
 		}
 		
 		.tui-goods__img {
-			max-width: 210rpx;
-			max-height: 210rpx;
+			width: 210rpx;
+			height: 210rpx;
 			display: block;
 			border-radius: 8rpx;
 		}

+ 3 - 19
pages/tabBar/home/index.js

@@ -20,7 +20,6 @@ const homeMiXins = {
             clubStatus: '',
             current: 0,
             mode: 'round',
-            isLogin: false,
             userIdentity: 0,
             bannerList: [], // 轮播
             mainmenu: [], // 导航分类
@@ -30,10 +29,10 @@ const homeMiXins = {
         }
     },
     computed: {
-        ...mapState(['hasLogin', 'userInfo', 'identity', 'isActivity', 'isWxAuthorize'])
+        ...mapState(['hasLogin', 'userInfo', 'isWxAuthorize'])
     },
     methods: {
-        ...mapMutations(['login', 'logout','updateNoticeNum','updateRossShow']),
+        ...mapMutations(['login', 'logout','updateNoticeNum']),
         async mallOrganizeHome() {
             //初始化首页数据
             try{
@@ -52,7 +51,7 @@ const homeMiXins = {
                 console.log('error',error)
             }
         },
-        async GetWxAuthorize() {
+        async authApplets() {
         	const wechatCode = await authorize.getCode('weixin') // 根据微信的code获取用户登录状态:1已登录过 -1未登录过
         	const getUserInfo = await authorize.getUserInfo('weixin')
         	this.UserService.UserLoginAuthApplets({
@@ -61,31 +60,16 @@ const homeMiXins = {
         		iv: getUserInfo.iv
         	})
         		.then(response => {
-        			this.isLogin = true
-        			this.userID = response.data.userId
-        			this.clubId = response.data.clubId
-        			this.userIdentity = response.data.userIdentity
         			this.clubStatus = response.data.clubStatus
         			this.$store.commit('updateStatus', response.data)
         			this.login(response.data)
         			uni.setStorageSync('token', response.data.token)
         			uni.setStorageSync('unionId', response.data.unionId)
-        			if (response.data.userIdentity == 1) {
-        				this.$api.redirectTo('/pages/seller/index/index')
-        			} else if (response.data.userIdentity === 3) {
-        				this.$api.redirectTo('/pages/supplier/index/index')
-        			}
-        			this.updateRossShow()
-        			this.GetInitBeansInfo()
-        			this.getHomeInformation()
         		})
         		.catch(error => {
-        			this.isLogin = false
         			this.logout()
         			uni.setStorageSync('unionId', error.data.unionId)
         			this.$store.commit('updateStatus', error.data)
-        			this.updateRossShow()
-        			this.getHomeInformation()
         		})
         },
         initShoppingCartCount() {

+ 1 - 1
pages/tabBar/home/index.vue

@@ -67,7 +67,7 @@ export default {
 		}
 	},
 	onShow() {
-		// this.GetWxAuthorize()
+		this.authApplets()
 		this.mallOrganizeHome()
 	},
 	onHide() {

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

@@ -21,17 +21,22 @@
 						<view class="user-item"
 							><text class="u-h1">{{ name }}</text></view
 						>
+					</view>
+				</view>
+				<view class="header-main" v-else-if="isUnderLogin">
+					<view class="header-icon">
+						<view class="header-logo">
+							<image :src="underInfo.shopPhoto ? underInfo.shopPhoto : `${staticUrl}icon_default@3x.png`" mode=""></image>
+						</view>
+					</view>
+					<view class="header-text">
+						<view class="user-item"
+							><text class="u-h1">{{ underInfo.name }}</text></view
+						>
 						<view class="user-item">
-							<view class="user-item-tips none" v-if="userIdentity == 2">
-								审核未通过,请重新提交 >
-							</view>
-							<view
-								class="user-item-tips"
-								v-if="userIdentity == 4"
-								:class="userVip.vipFlag == 0 ? 'none' : ''"
-							>
-								<image class="tips-icon" v-if="userVip.vipFlag == 1" :src="userVipIcon" mode=""></image>
-								{{ userType }}
+							<view class="user-item-tips none">
+								<text v-if="underInfo.clubStatus === 1">待审核</text>
+								<text v-if="underInfo.clubStatus === 92" @click="underNavigator">审核未通过,请重新提交 ></text>
 							</view>
 						</view>
 					</view>
@@ -232,7 +237,9 @@ export default {
 					path: '/pages/user/setting/setting',
 					icon: 'icon_club_4@2x.png'
 				}
-			]
+			],
+			underInfo:{},
+			isUnderLogin:false
 		}
 	},
 	onLoad(option) {},
@@ -241,6 +248,14 @@ export default {
 	},
 	methods: {
 		...mapMutations(['updateNoticeNum']),
+		async infoClucbUser(){
+			const user = await this.$api.getStorage()
+			console.log(user)
+			this.underInfo = user
+			if(this.underInfo.clubStatus === 1 || this.underInfo.clubStatus === 92){
+				this.isUnderLogin = true
+			}
+		},
 		getClubObtainCenter() {
 			// 获取个人中心数据
 			this.UserService.GetClubObtainCenter({ userId: this.userId })
@@ -284,16 +299,6 @@ export default {
 					console.log('获取订单状态数量异常~')
 				})
 		},
-		getPhone() {
-			// 获取联系我们电话
-			this.CommonService.QueryAfterSale()
-				.then(response => {
-					this.contactNumber = response.data.contactNumber
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
-		},
 		toPhone() {
 			// 拨号
 			uni.makePhoneCall({
@@ -307,6 +312,10 @@ export default {
 				this.$api.navigateTo('/pages/login/login?type=0')
 			}
 		},
+		underNavigator(){
+			// 审核未通过修改资料
+			this.$api.navigateTo('/pages/login/register-unid')
+		},
 		showBadge(n) {
 			let num = ''
 			if (n > 100) {
@@ -364,7 +373,7 @@ export default {
 		if (this.hasLogin) {
 			this.initUserData()
 		} else {
-			this.getPhone()
+			this.infoClucbUser()
 			this.$store.commit('updateAllNum', 0)
 		}
 	}
@@ -457,13 +466,13 @@ page {
 			width: 120rpx;
 			height: 120rpx;
 			box-sizing: border-box;
-			padding: 21rpx;
 			background-color: #fff;
 			border-radius: 100%;
 			image {
-				width: 78rpx;
-				height: 78rpx;
+				width: 120rpx;
+				height: 120rpx;
 				display: block;
+				border-radius: 100%;
 			}
 		}
 	}

+ 3 - 27
services/product.service.js

@@ -6,29 +6,6 @@ export default class ProductService {
         Object.assign(this, { AjaxService })
         this.name = 'ProductService'
     }
-    /**
-	 * @商城首页-常用商品列表
-	 * @param:userId 用户ID(未登录传0或者''),
-	 * @param:preferredFlag 新品上线(001) 优惠商品(010) 常用商品(100),,
-	 * @param:pageNum 页码
-	 * @param:pageSize 每页条数
-	 */
-    queryProductPreferred (data = {}) {
-        return this.AjaxService.get({ url:'/product/preferred', data, isLoading: false })
-    }
-    /**
-	 * @分类-商品列表
-	 * @param:userId 用户ID(未登录传0或者''),
-	 * @param:bigTypeID 
-	 * @param:smallTypeID, 
-	 * @param:tinyTypeID 
-	 * @param:sortType 
-	 * @param:pageNum 页码
-	 * @param:pageSize 每页条数
-	 */
-    GetProductListByTypeID(data = {}) {
-        return this.AjaxService.get({ url:'/product/listByTypeID', data, isLoading: false })
-    }
     /**
 	 * @商品列表-查询商品价格
 	 * @param:userId 用户ID(未登录传0或者'')
@@ -72,12 +49,11 @@ export default class ProductService {
 	
     /**
 	 * @商品详情-查询商品详情
-	 * @param:userId 用户ID(未登录传0或者'')
-	 * @param:productIds 商品ID
+	 * @param:productId 商品Id
 	 */
-    QueryProductDetils (data = {}) {
+    getProductDetils (data = {}) {
         return this.AjaxService.get({
-            url:'/commodity/product/details',
+            url:'/commodity/mallProduct/getProductInfo',
             data,
             isLoading: false ,
               

+ 14 - 17
services/user.service.js

@@ -11,30 +11,27 @@ export default class UserService {
     /* 初始化授权登录 */
     UserLoginAuthApplets(data = {}) {
         return this.AjaxService.post({
-            url: '/user/login/auth/applets',
+            url: '/user/login/auth/appletsOrganize',
             data,
             isLoading: false,
 
         })
     }
-    /* 邀请码授权登录 */
-    InvitationCodeLogin(data = {}) {
-        return this.AjaxService.post({
-            url: '/user/login/auth/invitation',
+    /* 注册第一步校验 */
+    checkRegisterClub(data = {}) {
+        return this.AjaxService.get({
+            url: '/user/register/accountInfo',
             data,
-            isLoading: true,
-            isStatus: false,
-
+            isLoading: false,
         })
     }
-    /* 个人机构注册 */
-    UserRegisterClub(data = {}) {
-        return this.AjaxService.post({
-            url: '/user/register/club',
-            data,
-            isLoading: true,
-
-        })
+    /* 机构注册提交审核 */
+    userAccountRegister(data = {}) {
+	    return this.AjaxService.post({
+	        url: '/user/register/accountRegister',
+	        data,
+	        isLoading: true,
+	    })
     }
     /* 供应商注册 */
     SupplierAppletsRegistered(data = {}) {
@@ -82,7 +79,7 @@ export default class UserService {
 	 */
     userLoginCode(data = {}) {
         return this.AjaxService.get({
-            url: '/user/login/code',
+            url: '/user/sms/code',
             data,
             isLoading: true
         })

+ 2 - 31
store/index.js

@@ -33,9 +33,9 @@ const store = new Vuex.Store({
                 data: provider
             })
         },
-        logout(state) {
+        logout(state,provider) {
             state.hasLogin = false
-            state.userInfo = {}
+            state.userInfo = provider
             uni.removeStorage({
                 key: 'userInfo'
             })
@@ -56,24 +56,6 @@ const store = new Vuex.Store({
             let TIME = api.formatDate()
             console.log(`${TIME}`, provider)
             state.userInfo = provider
-            if (state.userInfo) {
-                state.clubType = provider.firstClubType
-                state.identity = provider.userIdentity
-                // 判断登录用户为协销 设置管理员组长权限
-                if(provider.userIdentity === 1){
-                    if(provider.manager>0 || provider.leaderId > 0){
-                        state.isManage = true
-                    }
-                }
-                // 判断以下公司账户设置部分权限
-                if (provider.userId == 5261 || provider.userId == 10947 || provider.userId == 11579) {
-                    state.identity = 1
-                } else if (provider.firstClubType == 1) {
-                    state.identity = 5
-                } else {
-                    state.identity = 0
-                }
-            }
             uni.setStorage({ //缓存用户登陆状态
                 key: 'userInfo',
                 data: provider
@@ -107,17 +89,6 @@ const store = new Vuex.Store({
                     })
                 })
         },
-        async updateRossShow(state){
-            const USER_EVEN = await caimeiApi.getStorage()
-            if(USER_EVEN.userIdentity === 1) { return }
-            getUserService.userInformationVisitRoos({ userId: USER_EVEN.userId ? USER_EVEN.userId : 0 })
-			    .then(response => {
-                    state.isRossShow = response.data
-			    })
-			    .catch(error => {
-                    console.log(error)
-			    })
-        },
         updateAllNum(state, num) {
             if (num >= 100) {
                 uni.setTabBarBadge({