浏览代码

修复V6.2.0测试bug,增加公共小程序顶部自定义导航组件cu-custom

zhengjinyi 5 年之前
父节点
当前提交
c8a59c8c29

+ 47 - 10
App.vue

@@ -2,22 +2,59 @@
 	/**
 	/**
 	 * vuex管理登陆状态,具体可以参考官方登陆模板示例
 	 * vuex管理登陆状态,具体可以参考官方登陆模板示例
 	 */
 	 */
+	import Vue from 'vue'
 	import { mapState,mapMutations} from 'vuex';
 	import { mapState,mapMutations} from 'vuex';
 	import authorize from '@/common/config/authorize.js'
 	import authorize from '@/common/config/authorize.js'
 	import { userInfoLogin } from "@/api/use.js"
 	import { userInfoLogin } from "@/api/use.js"
 	export default {
 	export default {
 		onLaunch: function() {
 		onLaunch: function() {
+			let self = this
+			uni.getSystemInfo({
+				success: function(e) {
+					let modelmes = e.model;
+					if (modelmes.search('iPhone X') != -1) { //XS,XR,XS MAX均可以适配
+					  self.$store.dispatch('setVariableFun',true)
+					}
+					// #ifndef MP
+					Vue.prototype.StatusBar = e.statusBarHeight;
+					if (e.platform == 'android') {
+						Vue.prototype.CustomBar = e.statusBarHeight + 50;
+						Vue.prototype.platformClass = true
+					} else {
+						Vue.prototype.CustomBar = e.statusBarHeight + 45;
+						Vue.prototype.platformClass = false
+					};
+					// #endif
+			
+					// #ifdef MP-WEIXIN || MP-QQ
+					console.log(e.platform)
+					if (e.platform == 'android') {
+						Vue.prototype.platformClass = 'left'
+					} else {
+						Vue.prototype.platformClass = 'center'
+					}
+					Vue.prototype.StatusBar = e.statusBarHeight;
+					Vue.prototype.fontSizeSetting = e.fontSizeSetting
+					Vue.prototype.screenWidth = e.screenWidth
+					let capsule = wx.getMenuButtonBoundingClientRect();
+					Vue.prototype.capsule = capsule
+					if (capsule) {
+						Vue.prototype.Custom = capsule;
+						// Vue.prototype.capsuleSafe = uni.upx2px(750) - capsule.left + uni.upx2px(750) - capsule.right;
+						Vue.prototype.CustomBar = capsule.bottom + capsule.top - e.statusBarHeight;
+					} else {
+						Vue.prototype.CustomBar = e.statusBarHeight + 50;
+					}
+					// #endif		
+				
+			
+					// #ifdef MP-ALIPAY
+					Vue.prototype.StatusBar = e.statusBarHeight;
+					Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
+					// #endif
+				}
+			})
 			this.refresh()
 			this.refresh()
-			let _self = this;
-			 uni.getSystemInfo({
-				 success: res => {
-					 let modelmes = res.model;
-					 if (modelmes.search('iPhone X') != -1) { //XS,XR,XS MAX均可以适配
-					   this.$store.dispatch('setVariableFun',true)
-					 }
-					 // uni.setStorageSync('modelmes', modelmes)
-				 }
-			 })
 		},
 		},
 		methods:{
 		methods:{
 			...mapMutations(['login','logout']),
 			...mapMutations(['login','logout']),

+ 5 - 5
common/css/iconfont.scss

@@ -4,7 +4,7 @@
 	font-family: iconfont;
 	font-family: iconfont;
 	font-weight: normal;
 	font-weight: normal;
 	font-style: normal;
 	font-style: normal;
-	src: url('https://at.alicdn.com/t/font_1519039_k3wm9mm5pf.ttf') format('truetype');
+	src: url('https://at.alicdn.com/t/font_1519039_c3ktzj6f83l.ttf') format('truetype');
 }
 }
 .iconfont {
 .iconfont {
 	font-family: "iconfont" !important;
 	font-family: "iconfont" !important;
@@ -13,6 +13,10 @@
 	-webkit-font-smoothing: antialiased;
 	-webkit-font-smoothing: antialiased;
 	-moz-osx-font-smoothing: grayscale;
 	-moz-osx-font-smoothing: grayscale;
 }
 }
+.icon-shouyeyong:before {
+  content: "\e65e";
+}
+
 .icon-wenhao:before {
 .icon-wenhao:before {
   content: "\e671";
   content: "\e671";
 }
 }
@@ -29,10 +33,6 @@
   content: "\e62c";
   content: "\e62c";
 }
 }
 
 
-.icon-xiaochengxu_tubiao-:before {
-  content: "\e624";
-}
-
 .icon-iconfontguanbi:before {
 .icon-iconfontguanbi:before {
   content: "\e623";
   content: "\e623";
 }
 }

+ 2 - 1
main.js

@@ -5,7 +5,8 @@ import App from './App'
 import * as Api from '@/common/config/caimeiApi.js'
 import * as Api from '@/common/config/caimeiApi.js'
 import * as Regs from '@/common/config/common.js'
 import * as Regs from '@/common/config/common.js'
 import Json from './json' //本地数据
 import Json from './json' //本地数据
-
+import cuCustom from './components/cu-custom.vue'
+Vue.component('cu-custom',cuCustom)
 /**
 /**
  *  示例使用了uni.scss下的变量, 除变量外已尽量移除特有语法,可直接替换为其他预处理器使用
  *  示例使用了uni.scss下的变量, 除变量外已尽量移除特有语法,可直接替换为其他预处理器使用
  */
  */

+ 6 - 3
pages.json

@@ -164,7 +164,8 @@
 		},{
 		},{
 			"path": "pages/user-module/register",
 			"path": "pages/user-module/register",
 			"style": {
 			"style": {
-				"navigationBarTitleText": "注册"
+				"navigationBarTitleText": "注册",
+				"navigationStyle":"custom"
 			}
 			}
 		},{
 		},{
 			"path": "pages/user-module/login",
 			"path": "pages/user-module/login",
@@ -189,12 +190,14 @@
 		},{
 		},{
 			"path": "pages/user-module/apply",
 			"path": "pages/user-module/apply",
 			"style": {
 			"style": {
-				"navigationBarTitleText": "修改申请资料"
+				"navigationBarTitleText": "修改申请资料",
+				"navigationStyle":"custom"
 			}
 			}
 		},{
 		},{
 			"path": "pages/user-module/information",
 			"path": "pages/user-module/information",
 			"style": {
 			"style": {
-				"navigationBarTitleText": "修改资料"
+				"navigationBarTitleText": "修改资料",
+				"navigationStyle":"custom"
 			}
 			}
 		},{
 		},{
 			"path": "pages/user-module/password",
 			"path": "pages/user-module/password",

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

@@ -1,5 +1,6 @@
 <template>
 <template>
-	<view class="container register">
+	<view class="container register" :style="{paddingTop:CustomBar+'px'}">
+		<cu-custom :navbar-data='nvabarData'  @navigateBack="hanldNavigateBack"></cu-custom>
 		<view class="register-error clearfix">
 		<view class="register-error clearfix">
 			<view class="error-top animation" @click="showOpenError" :class="{'error-top--none': isOpenError}" >
 			<view class="error-top animation" @click="showOpenError" :class="{'error-top--none': isOpenError}" >
 				<view class="name">审核未通过原因</view>
 				<view class="name">审核未通过原因</view>
@@ -263,6 +264,12 @@ import { mapMutations } from 'vuex';
 		},
 		},
 		data() {
 		data() {
 			return{
 			return{
+				nvabarData: {		//顶部自定义导航
+					showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
+					showSearch: 0,
+					title: '修改申请资料', // 导航栏 中间的标题
+				},
+				CustomBar:this.CustomBar,// 顶部导航栏高度
 				isOpenError:false,
 				isOpenError:false,
 				errorList:[],
 				errorList:[],
 				isShowCheckPhone:false,		//是否显示修改手机
 				isShowCheckPhone:false,		//是否显示修改手机
@@ -326,6 +333,13 @@ import { mapMutations } from 'vuex';
 			this.organizationInfo()
 			this.organizationInfo()
 		},
 		},
 		methods:{
 		methods:{
+			hanldNavigateBack(){
+				this.$util.modal('','资料尚未提交审核,确定放弃修改吗?','确定','取消',true,() =>{
+					uni.navigateBack({
+						delta: 1
+					});
+				})
+			},
 			organizationInfo(){
 			organizationInfo(){
 				this.$api.getStorage().then((resolve) =>{
 				this.$api.getStorage().then((resolve) =>{
 					this.userID = resolve.userID
 					this.userID = resolve.userID
@@ -400,6 +414,10 @@ import { mapMutations } from 'vuex';
 				})
 				})
 			},
 			},
 			organizationUpdateInfo(){//提交审核
 			organizationUpdateInfo(){//提交审核
+				if(!this.isCheck){
+					this.$util.msg('请勾选同意协议',2000);
+					return
+				}
 				if(!this.isMainproCheck){
 				if(!this.isMainproCheck){
 					let mainproList = []
 					let mainproList = []
 					if(this.firstClubType == '1'){
 					if(this.firstClubType == '1'){

+ 0 - 1
pages/user-module/bindwechat.vue

@@ -178,7 +178,6 @@
 			       		},1000)
 			       		},1000)
 			      	}
 			      	}
 				}).catch( res =>{
 				}).catch( res =>{
-					console.log(res)
 					this.$util.msg(res.msg,2000)
 					this.$util.msg(res.msg,2000)
 					this.isMobileDisabled = false;
 					this.isMobileDisabled = false;
 					this.getVerificationCode()
 					this.getVerificationCode()

+ 20 - 3
pages/user-module/information.vue

@@ -1,5 +1,6 @@
 <template>
 <template>
-	<view class="container register">
+	<view class="container register" :style="{paddingTop:CustomBar+'px'}">
+		<cu-custom :navbar-data='nvabarData'  @navigateBack="hanldNavigateBack"></cu-custom>
 		<view class="register-main first clearfix">
 		<view class="register-main first clearfix">
 			<view class="register-row">
 			<view class="register-row">
 				<view class="register-title">账户信息</view>
 				<view class="register-title">账户信息</view>
@@ -153,7 +154,7 @@
 				<view class="register-picture">
 				<view class="register-picture">
 					<view class="label zz">医疗执业许可证:</view>
 					<view class="label zz">医疗执业许可证:</view>
 					<view class="upload-picture">
 					<view class="upload-picture">
-						<view class="upload-none" v-if="uploadMedicalImage == ''" @click="chooseMedicalImage"><text class="iconfont icon-jiahao"></text></view>
+						<view class="upload-none" v-if="uploadMedicalImage == null" @click="chooseMedicalImage"><text class="iconfont icon-jiahao"></text></view>
 						<view class="upload-image" v-else>
 						<view class="upload-image" v-else>
 							<image :src="uploadMedicalImage" mode=""  @click="viewMedicalImage"></image>
 							<image :src="uploadMedicalImage" mode=""  @click="viewMedicalImage"></image>
 							<view class="upload-del" @click="delMedicalImage">
 							<view class="upload-del" @click="delMedicalImage">
@@ -282,6 +283,12 @@
 		},
 		},
 		data() {
 		data() {
 			return{
 			return{
+				nvabarData: {		//顶部自定义导航
+					showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
+					showSearch: 0,
+					title: '修改资料', // 导航栏 中间的标题
+				},
+				CustomBar:this.CustomBar,// 顶部导航栏高度
 				isShowCheckPhone:false,		//是否显示修改手机
 				isShowCheckPhone:false,		//是否显示修改手机
 				tabCurrentIndex:3,	
 				tabCurrentIndex:3,	
 				isPreviewImage:false,   	//预览图片开关
 				isPreviewImage:false,   	//预览图片开关
@@ -343,6 +350,13 @@
 			this.organizationInfo()
 			this.organizationInfo()
 		},
 		},
 		methods:{
 		methods:{
+			hanldNavigateBack(){
+				this.$util.modal('','确定放弃本次修改吗?','确定','取消',true,() =>{
+					uni.navigateBack({
+						delta: 1
+					});
+				})
+			},
 			organizationInfo(){
 			organizationInfo(){
 				this.$api.getStorage().then((resolve) =>{
 				this.$api.getStorage().then((resolve) =>{
 					this.userID = resolve.userID
 					this.userID = resolve.userID
@@ -416,6 +430,10 @@
 				})
 				})
 			},
 			},
 			organizationUpdateInfo(){//提交审核
 			organizationUpdateInfo(){//提交审核
+				if(!this.isCheck){
+					this.$util.msg('请勾选同意协议',2000);
+					return
+				}
 				if(!this.isMainproCheck){
 				if(!this.isMainproCheck){
 					let mainproList = []
 					let mainproList = []
 					if(this.firstClubType == '1'){
 					if(this.firstClubType == '1'){
@@ -429,7 +447,6 @@
 					}
 					}
 					this.mainpro = mainproList.join('/')
 					this.mainpro = mainproList.join('/')
 				}
 				}
-				console.log(this.mainpro)
 				let params ={
 				let params ={
 						userID:this.userID,
 						userID:this.userID,
 						clubID:this.clubID,					//会所ID
 						clubID:this.clubID,					//会所ID

+ 10 - 0
pages/user-module/login-accont.vue

@@ -25,6 +25,7 @@
 		</view>
 		</view>
 		<view class="login-btn"  @click="confirmLogin">登录</view>
 		<view class="login-btn"  @click="confirmLogin">登录</view>
 		<view class="login-btn-last" @click.stop="this.$api.navigateTo(`/pages/user-module/login?data=${getOption}`)">邀请码登录</view>
 		<view class="login-btn-last" @click.stop="this.$api.navigateTo(`/pages/user-module/login?data=${getOption}`)">邀请码登录</view>
+		<view class="login-tel">客服热线:0755-22907771</view>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -199,6 +200,15 @@
 			color: $text-color;
 			color: $text-color;
 			text-align: center;
 			text-align: center;
 		}
 		}
+		.login-tel{
+			width: 702rpx;
+			font-size: $font-size-28;
+			line-height: 80rpx;
+			margin: 0 auto;
+			color: $text-color;
+			text-align: center;
+			margin-top: 100rpx;
+		}
 		.model-authorization{
 		.model-authorization{
 			width: 100%;
 			width: 100%;
 			height: 100%;
 			height: 100%;

+ 4 - 4
pages/user-module/password.vue

@@ -49,15 +49,15 @@
 			</view>
 			</view>
 			<view class="login-form clearfix">
 			<view class="login-form clearfix">
 				<view class="login-input pwd">
 				<view class="login-input pwd">
-					<input v-show="isShowEye" type="text" v-model="password"  maxlength="18" class="input" placeholder="请输入新密码,必须为8-16位字母数字的组合" autocomplete="new-password"/>
-					<input v-show="!isShowEye" type="password" v-model="password"  :password="true" maxlength="18" class="input" placeholder="请输入新密码,必须为8-16位字母数字的组合" autocomplete="new-password"/>
+					<input v-show="isShowEye" type="text" v-model="password"  maxlength="16" class="input" placeholder="请输入新密码,必须为8-16位字母数字的组合" autocomplete="new-password"/>
+					<input v-show="!isShowEye" type="password" v-model="password"  :password="true" maxlength="16" class="input" placeholder="请输入新密码,必须为8-16位字母数字的组合" autocomplete="new-password"/>
 					<view class="iconfont" :class="isShowEye ? iconEyen : iconEyes"  @click="passwordEye"></view>
 					<view class="iconfont" :class="isShowEye ? iconEyen : iconEyes"  @click="passwordEye"></view>
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="login-form clearfix">
 			<view class="login-form clearfix">
 				<view class="login-input pwd">
 				<view class="login-input pwd">
-					<input v-show="isShowEyes" type="text" v-model="passwordCheck"  maxlength="18" class="input" placeholder="请确认密码" autocomplete="new-password"/>
-					<input v-show="!isShowEyes" type="password" v-model="passwordCheck"  :password="true" maxlength="18" class="input" placeholder="请确认密码" autocomplete="new-password"/>
+					<input v-show="isShowEyes" type="text" v-model="passwordCheck"  maxlength="16" class="input" placeholder="请确认密码" autocomplete="new-password"/>
+					<input v-show="!isShowEyes" type="password" v-model="passwordCheck"  :password="true" maxlength="16" class="input" placeholder="请确认密码" autocomplete="new-password"/>
 					<view class="iconfont" :class="isShowEyes ? iconEyen : iconEyes"  @click="passwordEyes"></view>
 					<view class="iconfont" :class="isShowEyes ? iconEyen : iconEyes"  @click="passwordEyes"></view>
 				</view>
 				</view>
 			</view>
 			</view>

+ 29 - 7
pages/user-module/register.vue

@@ -1,5 +1,6 @@
 <template>
 <template>
-	<view class="container register">
+	<view class="container register" :style="{paddingTop:CustomBar+'px'}">
+		<cu-custom :navbar-data='nvabarData'  @navigateBack="hanldNavigateBack"></cu-custom>
 		<view class="register-tab">
 		<view class="register-tab">
 			<view class="nav-item" :class="{ current: tabCurrentIndex === 1 }" >
 			<view class="nav-item" :class="{ current: tabCurrentIndex === 1 }" >
 				  账户信息<view class="line"></view>
 				  账户信息<view class="line"></view>
@@ -35,13 +36,13 @@
 			<view class="register-row clearfix">
 			<view class="register-row clearfix">
 				<view class="register-from">
 				<view class="register-from">
 					<view class="label">登录密码:</view>
 					<view class="label">登录密码:</view>
-					<input class="row-input" type="password" name="input" v-model="password" placeholder="密码必须为8-16位字母数字组合" maxlength="20"/>
+					<input class="row-input" type="password" name="input" v-model="password" placeholder="密码必须为8-16位字母数字组合" maxlength="16"/>
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="register-row clearfix">
 			<view class="register-row clearfix">
 				<view class="register-from">
 				<view class="register-from">
 					<view class="label">确认密码:</view>
 					<view class="label">确认密码:</view>
-					<input class="row-input" type="password" name="input" v-model="passwordCheck" placeholder="请确认密码" maxlength="20"/>
+					<input class="row-input" type="password" name="input" v-model="passwordCheck" placeholder="请确认密码" maxlength="16"/>
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="register-row clearfix">
 			<view class="register-row clearfix">
@@ -70,7 +71,7 @@
 			<view class="register-row clearfix">
 			<view class="register-row clearfix">
 				<view class="register-from imgcode">
 				<view class="register-from imgcode">
 					<view class="label">图形验证码:</view>
 					<view class="label">图形验证码:</view>
-					<input class="row-input" type="text" name="input" v-model="imageCode" placeholder="请输入图形验证码" maxlength="6"/>
+					<input class="row-input" type="text" name="input" v-model="imageCode" placeholder="请输入图形验证码" maxlength="4"/>
 				</view>
 				</view>
 				<view class="register-from img-btn">
 				<view class="register-from img-btn">
 					<view class="vscodeimg">
 					<view class="vscodeimg">
@@ -305,6 +306,12 @@
 		},
 		},
 		data() {
 		data() {
 			return{
 			return{
+				nvabarData: {		//顶部自定义导航
+					showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
+					showSearch: 0,
+					title: '注册', // 导航栏 中间的标题
+				},
+				CustomBar:this.CustomBar,// 顶部导航栏高度
 				tabCurrentIndex:1,			//显示step
 				tabCurrentIndex:1,			//显示step
 				isPreviewImage:false,   	//预览图片开关
 				isPreviewImage:false,   	//预览图片开关
 				isEmialDisabled: false,		//验证码按钮控制
 				isEmialDisabled: false,		//验证码按钮控制
@@ -369,7 +376,19 @@
 			console.log(option)
 			console.log(option)
 		},
 		},
 		methods:{
 		methods:{
-			
+			hanldNavigateBack(){
+				if(this.tabCurrentIndex == 1){
+					this.$util.modal('','注册尚未完成,确定放弃注册吗?','确定','取消',true,() =>{
+						uni.navigateBack({
+							delta: 1
+						});
+					})
+				}else{
+					uni.navigateBack({
+						delta: 1
+					});
+				}
+			},
 			registerStepsfirst(){
 			registerStepsfirst(){
 				let params ={
 				let params ={
 						email:this.registerEmail,
 						email:this.registerEmail,
@@ -403,6 +422,10 @@
 				})
 				})
 			},
 			},
 			registerStepsSub(){
 			registerStepsSub(){
+				if(!this.isCheck){
+					this.$util.msg('请勾选同意协议',2000);
+					return
+				}
 				let params ={
 				let params ={
 						email:this.registerEmail,
 						email:this.registerEmail,
 						mailboxCode:this.regEmailCode,
 						mailboxCode:this.regEmailCode,
@@ -684,7 +707,6 @@
 	.register{
 	.register{
 		width: 100%;
 		width: 100%;
 		height: auto;
 		height: auto;
-		border-top: 1px solid #F7F7F7;
 		.model-warp.none{
 		.model-warp.none{
 			display: none;			
 			display: none;			
 		}
 		}
@@ -720,7 +742,7 @@
 				}
 				}
 				&.current{
 				&.current{
 					color:#FFFFFF;
 					color:#FFFFFF;
-					background: $color-system;
+					background: $btn-confirm;
 					
 					
 				}
 				}
 			}
 			}

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

@@ -22,7 +22,7 @@
 		<view class="operator-main">
 		<view class="operator-main">
 			<view v-if="isEmpty" class="empty-container">
 			<view v-if="isEmpty" class="empty-container">
 				<view class="txt">暂无运营人员</view>
 				<view class="txt">暂无运营人员</view>
-s			</view>
+			</view>
 			<view v-else class="operator-list">
 			<view v-else class="operator-list">
 				<scroll-view scroll-y="true" >
 				<scroll-view scroll-y="true" >
 					<view class="list" v-for="(item, index) in operatorList" :key="index" @click.stop="showOperatorModel(item)">
 					<view class="list" v-for="(item, index) in operatorList" :key="index" @click.stop="showOperatorModel(item)">