Parcourir la source

修改新手提示,设置,任务栏等

slambb il y a 4 ans
Parent
commit
7ab50cba99
33 fichiers modifiés avec 1166 ajouts et 274 suppressions
  1. 4 1
      App.vue
  2. 18 3
      common/config.js
  3. 41 16
      components/modal/action-jump/action-jump.vue
  4. 2 2
      components/side-bar/side-bar.vue
  5. 11 4
      components/side-bar/sideBar.js
  6. 2 2
      manifest.json
  7. 19 1
      pages.json
  8. 82 46
      pages/login-page/login/login.vue
  9. 158 43
      pages/login-page/pwd/pwd.vue
  10. 186 49
      pages/personal-page/personal/personal.vue
  11. 102 0
      pages/platform-page/guide/guide.vue
  12. 106 0
      pages/platform-page/settings/settings.vue
  13. 2 2
      platform/app-plus/subNVue/drawer.nvue
  14. 233 31
      platform/app-plus/subNVue/guide.nvue
  15. BIN
      static/common/modal/task-close@2x.png
  16. BIN
      static/common/subNVue/guide/guide-bluetooth-big@2x.png
  17. BIN
      static/common/subNVue/guide/level-game-fab@2x.png
  18. BIN
      static/common/subNVue/guide/level-game-next@2x.png
  19. BIN
      static/common/subNVue/guide/level-game-title@2x.png
  20. BIN
      static/modal/action-jump/directionJump.png
  21. BIN
      static/modal/action-jump/directionJumpWhite.png
  22. BIN
      static/modal/action-jump/midJump.png
  23. BIN
      static/modal/action-jump/midJumpWhite.png
  24. BIN
      static/modal/action-jump/rotateJump.png
  25. BIN
      static/modal/action-jump/rotateJumpWhite.png
  26. BIN
      static/modal/level-tip/level-tip-bg@2x.png
  27. BIN
      static/modal/level-tip/level-tip-box@2x.png
  28. BIN
      static/modal/level-tip/level-tip-logo@2x.png
  29. BIN
      static/settings@2x.png
  30. 10 0
      util/util-css/main-nvue.css
  31. 26 8
      util/util-css/main.css
  32. 28 0
      util/util-js/store.js
  33. 136 66
      util/util-js/verify.js

+ 4 - 1
App.vue

@@ -6,7 +6,7 @@
 	export default {
 
 		methods: {
-			...mapMutations(['onLuanchLogin', 'getBLEDeviceList', 'getFinalUseDevice','onAccAndGyroConvertDataGet']),
+			...mapMutations(['onLuanchLogin', 'getBLEDeviceList', 'getFinalUseDevice','onAccAndGyroConvertDataGet','getGuideUnlockState']),
 
 		},
 		onLaunch: function() {
@@ -56,6 +56,9 @@
 			
 			
 			this.onAccAndGyroConvertDataGet();
+			
+			//获取guide任务的解锁状态
+			this.getGuideUnlockState();
 		},
 		onShow: function() {
 			console.log('App Show');

+ 18 - 3
common/config.js

@@ -9,10 +9,10 @@ const active = "dev";
 //线上地址,腾讯云服务器
 // const host="https://www.9527fun.cn/api_prd"
 //测试地址,阿里云服务器
-// const host="https://www.9527fun.cn/api_dev"
+const host="https://www.9527fun.cn/api_dev"
 //本地测试地址
 // const host = "http://192.168.1.11:9090/api_dev"
-const host = "http://192.168.0.112:9090/api_dev"
+// const host = "http://192.168.0.112:9090/api_dev"
 // const host = "http://47.104.216.192:9090/api_dev"
 // const host = "http://121.4.103.151:9090/api_prd"
 // const host = "http://121.4.59.141:9090/api_dev"
@@ -22,9 +22,15 @@ const URL = {
 	VERIFICATION: `${host}/program/Verification_Info`,
 	//注册登录
 	SMSLOGIN: `${host}/program/SMS_login`,
+	/**
+	 * @deprecated since version 2.4.10
+	 */
 	//获取验证码
 	GETCODE: `${host}/program/getCode`,
-	//根据类型获取验证码,0:电话 和1:邮箱 
+	/**
+	 * 新增 
+	 * 根据类型获取验证码,0:电话 和1:邮箱 
+	 */
 	GETCODEACCORDINGTYPE:`${host}/program/getCodeAccordingType`,
 	
 	//短信绑定手机号
@@ -33,8 +39,17 @@ const URL = {
 	DELETEPHONE: `${host}/program/delete_phone`,
 	//绑定微信信息
 	BINDWXINFO: `${host}/program/bind_wx_info`,
+	/**
+	 * @deprecated since version 2.4.10
+	 */
 	//密码登录
 	PASSWORDlOGIN: `${host}/program/password_login`,
+	/**
+	 * 新增 
+	 * 根据类型使用密码登录,0:电话 和1:邮箱 
+	 */
+	LOGINPASSWORDBASEDONTHETYPE:`${host}/program/password_login_type`,
+	
 	// 小程序用户登录
 	USERlOGINURL: `${host}/program/client_login`,
 	// 苹果用户登录

+ 41 - 16
components/modal/action-jump/action-jump.vue

@@ -29,7 +29,9 @@
 				</view>
 			</view>
 			<view class="flex justify-center align-center" style="height: 100rpx; width: 444rpx; ">
-				<view class="text-12px text-white text-center">
+				<view v-if="bTipLevel" class="cu-btn make-text-bPurple text-16px text-bold"
+					style="width: 272rpx;height:80rpx;border-radius: 10px;" @click="onTipLevel">选择关卡</view>
+				<view v-else class="text-12px text-white text-center">
 					{{taskDescribe}}
 				</view>
 			</view>
@@ -107,10 +109,12 @@
 	} from "@/util/util-js/enum.js"
 
 	import {
+		mapState,
 		mapMutations
 	} from 'vuex';
 
 	export default {
+		computed: mapState(['systemInfo']),
 		components: {
 
 		},
@@ -133,7 +137,7 @@
 				isY: true,
 				canvasW: 0, // 画布宽
 				canvasH: 0, // 画布高
-				SystemInfo: {}, // 设备信息
+				// SystemInfo: {}, // 设备信息
 
 				directionJump: null,
 				midJump: null,
@@ -263,8 +267,13 @@
 				 * 是否去到下一个关卡
 				 */
 				canGoNext: false,
-				
-				onLogData:'',
+
+				onLogData: '',
+
+				/**
+				 * 是否显示关卡提示
+				 */
+				bTipLevel: false
 			}
 		},
 		watch: {
@@ -294,19 +303,31 @@
 			let _self = this;
 			this.actionJumpCanvas = uni.createCanvasContext("actionJumpCanvas", this);
 			// console.log("this.actionJumpCanvas:", this.actionJumpCanvas);
-			this.SystemInfo = uni.getSystemInfoSync();
-			this.canvasW = this.SystemInfo.windowWidth; // 画布宽度
+			// this.SystemInfo = this.systemInfo; // uni.getSystemInfoSync();
+			this.canvasW = this.systemInfo.windowWidth; // 画布宽度
 			this.canvasH = 114;
 			this.onLoadImage();
-			
-			setTimeout(()=>{
+
+			setTimeout(() => {
 				this.onListenActionJump();
-			},2000)
+			}, 2000)
+
+			//更新一次状态
+			const value = uni.getStorageSync('levelButtonPrompt');
+			if (value) {
+				_self.isSelected = value.isSelected;
+			} else {
+				_self.isSelected = false;
+			}
 
 			// console.log('==========>1 action jump currentMode:', this.currentMode);
 		},
 		methods: {
 			...mapMutations(['onWriteBLEConnectionValue', 'onConvertDeviceData']),
+			//更新新手状态提示
+			onUpdateTipLevelValue(value) {
+				this.bTipLevel = value;
+			},
 			onListenActionJump() {
 				let _self = this;
 				console.log("*****************onListenActionJump*****************************");
@@ -824,7 +845,7 @@
 				this.$emit('gameOver', {
 					myWin: myWin,
 					type: 'calorieMode',
-					isOffEvent:true
+					isOffEvent: true
 				});
 			},
 			//pk模式下结束游戏关卡
@@ -837,7 +858,7 @@
 
 				this.$emit('gameOver', {
 					type: 'pkMode',
-					isOffEvent:true
+					isOffEvent: true
 				});
 			},
 			setFaultCount(value) {
@@ -946,7 +967,7 @@
 				this.onLogData = data;
 				let _rotateLimit = 4;
 				let _jumpLimit = 8;
-				
+
 				switch (_jumpType) {
 					case 0:
 						//JumpType.NORMAL = 0
@@ -954,7 +975,7 @@
 						this.eliminateJumpPrefabFormTemp(_tempState);
 						break;
 					case 1:
-						if (currentMaxValue < -_jumpLimit || valleyOfWaveMinValue < - 20) {
+						if (currentMaxValue < -_jumpLimit || valleyOfWaveMinValue < -20) {
 							//left jump
 							_tempState[1].bTrigger = true;
 						}
@@ -983,9 +1004,9 @@
 						console.log('没有对应的_jumpType', _jumpType);
 						break;
 				}
-				
+
 				// if (currentMaxValue == 0) {
-					
+
 				// } else {
 				// 	// console.log('2====', data);
 
@@ -1033,7 +1054,7 @@
 				for (let i = 0; i < _tempState.length; i++) {
 					let _state = _tempState[i];
 					if (_state.bTrigger)
-						console.log(JSON.stringify(_state)+JSON.stringify(this.onLogData));
+						console.log(JSON.stringify(_state) + JSON.stringify(this.onLogData));
 					//如果当前的跳类型和预制目标一样
 					if (_state.jumpCode == _temp.jumpCode && _state.bTrigger) {
 						//成功
@@ -1153,6 +1174,10 @@
 					if (callback)
 						callback(data);
 				}).exec();
+			},
+
+			onTipLevel() {
+				this.$emit("tipLevel");
 			}
 		}
 	}

+ 2 - 2
components/side-bar/side-bar.vue

@@ -173,8 +173,8 @@
 					case "ranking":
 						url = '/pages/game-page/game-ranking/game-ranking';
 						break;
-					case "feedback":
-						url = '/pages/login-page/feedback/feedback';
+					case "settings":
+						url = '/pages/platform-page/settings/settings';
 						break;
 					case "friend":
 						url = '/pages/friend-page/main/main';

+ 11 - 4
components/side-bar/sideBar.js

@@ -59,12 +59,19 @@ export default {
 		// 	name: '扫一扫',
 		// 	page_type: "QRCode",
 		// },
+		// {
+		// 	id: 6,
+		// 	type: 'image',
+		// 	url: '/static/feedback@2x.png',
+		// 	name: '意见反馈',
+		// 	page_type: "feedback",
+		// },
 		{
-			id: 6,
+			id: 7,
 			type: 'image',
-			url: '/static/feedback@2x.png',
-			name: '意见反馈',
-			page_type: "feedback",
+			url: '/static/settings@2x.png',
+			name: '设置',
+			page_type: "settings",
 		}
 	]
 }

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "哔蹦",
     "appid" : "__UNI__2635DF5",
     "description" : "",
-    "versionName" : "2.4.10",
-    "versionCode" : 21091002,
+    "versionName" : "2.4.12",
+    "versionCode" : 21092402,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 19 - 1
pages.json

@@ -278,7 +278,25 @@
 			}
 
 		}
-	],
+	    ,{
+            "path" : "pages/platform-page/settings/settings",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/platform-page/guide/guide",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+    ],
 	"subPackages": [{
 		"root": "pages/personal-page",
 		"pages": [

+ 82 - 46
pages/login-page/login/login.vue

@@ -19,32 +19,33 @@
 				<view v-if="bPhoneNumberAndPasswordLogin">
 					<view class="input-container" style="margin: 10px 102rpx 0 68rpx;">
 						<view class="input-row padding  align-center" style="width: 318px;">
-							<view class="text-18px text-regular " style="width: 72rpx;">
+							<view class="text-18px text-regular " style="width: 72rpx;white-space:nowrap;">
 								{{bMobileLogin?' +86':'邮箱'}}
 							</view>
 							<view class="margin-left-sm margin-right-sm"
 								style="width: 2rpx; height: 25rpx; background-color: rgba(209, 209, 209, 1);">
 							</view>
-							<m-input type="number" clearable v-model="account"
-								:placeholder="bMobileLogin?'请填写11位手机号码':'请输入邮箱'"></m-input>
+							<m-input :type="bMobileLogin?'number':'string'" :maxlength="bMobileLogin?'11':'32'"
+								clearable v-model="account" :placeholder="bMobileLogin?'请填写11位手机号码':'请输入邮箱'"></m-input>
 						</view>
 
 					</view>
 					<view class="input-container" style="margin: 8px 102rpx 0 68rpx;">
 						<view class="input-row padding align-center" style="width: 318px;">
-							<view class="text-18px text-regular " style="width: 72rpx;">
+							<view class="text-18px text-regular " style="width: 72rpx;white-space:nowrap;">
 								密码
 							</view>
 							<view class="margin-left-sm margin-right-sm"
 								style="width: 2rpx; height: 25rpx; background-color: rgba(209, 209, 209, 1);">
 							</view>
-							<m-input type="password" maxlength="14" displayable v-model="password" placeholder="请输入密码">
+							<m-input type="password" maxlength="16" displayable v-model="password" placeholder="请输入密码">
 							</m-input>
 						</view>
 
 					</view>
-
-					<view class="btn-row" style="margin: 20px 0 0 0;">
+					<view @click="onSwitchGetCode" class="make-text-bPurple text-14px text-right text-regular"
+						style="margin: 40rpx 96rpx 0 0;">{{bPhoneNumberAndPasswordLogin?'验证码登录':'密码登录'}} </view>
+					<view class="btn-row" style="margin: 32rpx 0 0 0;">
 						<view class="btn-confirm" @tap="bindLogin">登录</view>
 					</view>
 				</view>
@@ -58,22 +59,25 @@
 							<view class="margin-left-sm margin-right-sm"
 								style="width: 2rpx; height: 25rpx; background-color: rgba(209, 209, 209, 1);">
 							</view>
-							<m-input :type="bMobileLogin?'number':'string'" :maxlength="bMobileLogin?'11':'20'" clearable v-model="account"
-								:placeholder="bMobileLogin?'请填写11位手机号码':'请输入邮箱'"></m-input>
+							<m-input :type="bMobileLogin?'number':'string'" :maxlength="bMobileLogin?'11':'32'"
+								clearable v-model="account" :placeholder="bMobileLogin?'请填写11位手机号码':'请输入邮箱'"></m-input>
 						</view>
 					</view>
-					<view class="btn-row" style="margin: 32px 0 0 0;">
+					<view @click="onSwitchGetCode" class="make-text-bPurple text-14px text-right text-regular "
+						style="margin: 40rpx 96rpx 0 0; ">{{bPhoneNumberAndPasswordLogin?'验证码登录':'密码登录'}} </view>
+					<view class="btn-row" style="margin: 28rpx 0 0 0;">
 						<view class="btn-confirm" @tap="onNavToReg">获取验证码</view>
 					</view>
 				</view>
 				<view v-else>
 					<!-- 手机端登录 -->
 					<view class="text-22px make-text-bPurple" style="margin: 34px 0 0 96rpx;">输入验证码</view>
-					<view v-if="bMobileLogin" class="text-16px text-gray" style="margin: 20px 0 0 96rpx;">已发送4位验证码至 +86
+					<view v-if="bMobileLogin" class="text-16px text-gray text-lines2"
+						style="margin: 20px 96rpx 0 96rpx; word-wrap: break-word;">已发送4位验证码至 +86
 						{{phoneNumber}}
 					</view>
-					<view v-else class="text-16px text-gray" style="margin: 20px 0 0 96rpx;">已发送4位验证码至 {{mailboxNumber}}
-						邮箱</view>
+					<view v-else class="text-16px text-gray text-lines2"
+						style="margin: 20px 96rpx 0 96rpx;word-wrap: break-word;">已发送4位验证码至 {{mailboxNumber}}</view>
 
 					<view class="code-input-main">
 						<view class="inputLine">
@@ -103,7 +107,16 @@
 				</view>
 
 			</view>
-
+			<view v-if="bGetCode">
+				<view class="action-row-text " style="margin-top: 20rpx;">
+					<view class="text-gray">登录即代表同意哔蹦</view>
+					<view class="text-bold text-decoration make-text-bPurple" @tap="onSwitchAgree('agreement')">用户协议
+					</view>
+					<view class="text-gray">和</view>
+					<view class="text-bold text-decoration make-text-bPurple" @tap="onSwitchAgree('privacy')">隐私政策
+					</view>
+				</view>
+			</view>
 			<!-- v-if="hasProvider" style="border: 1rpx solid #000000;"-->
 			<view class="oauth-row" v-if="bGetCode" v-bind:style="{top: positionTop + 'px'}">
 				<view v-if="hasProvider&&providerList.length>0">
@@ -128,19 +141,6 @@
 						</view>
 					</view>
 				</view>
-
-				<view class="">
-					<view class="action-row-text" style="margin-top: 0;">
-						<view class="text-gray">登录即代表同意哔蹦</view>
-						<view class="text-bold text-decoration make-text-bPurple" @tap="onSwitchAgree('agreement')">用户协议
-						</view>
-						<view class=" ">和</view>
-						<view class="text-bold text-decoration make-text-bPurple" @tap="onSwitchAgree('privacy')">隐私政策
-						</view>
-					</view>
-					<view @click="onSwitchGetCode" class="make-text-bPurple text-right text-bold"
-						style="margin: 20rpx 120rpx 0 0;">{{bPhoneNumberAndPasswordLogin?'验证码登录':'密码登录'}} </view>
-				</view>
 			</view>
 
 		</view>
@@ -230,7 +230,7 @@
 					if (_self.clientName.indexOf('iPad') > -1) {
 						_self.positionTop = headHeight + 390;
 					} else {
-						_self.positionTop = headHeight + 280;
+						_self.positionTop = headHeight + 315;
 					}
 					// let midView = uni.createSelectorQuery().in(this).select('#MidArea');
 					// midView.fields({
@@ -265,17 +265,42 @@
 
 			bindLogin() {
 				let _self = this;
+				uni.showToast({
+					icon: 'loading',
+					title: '',
+					mask: true,
+					duration: 10000
+				});
 				/**
-				 * 客户端对账号信息进行一些必要的校验。
-				 * 这里先简单处理
+				 * 密码登录的情况下
+				 * 处理手机号码和邮箱号码验证。
 				 */
-				if (this.account.length < 11) {
-					uni.showToast({
-						icon: 'none',
-						title: '账号最短为 11 个字符'
-					});
-					return;
+				if (this.bMobileLogin) {
+					if (!verify.checkPhone(this.account)) {
+						uni.showToast({
+							icon: 'none',
+							title: '请输入正确手机号'
+						});
+						return;
+					}
+				} else {
+					//todo 后面要验证邮箱
+					if (!verify.checkEMail(this.account)) {
+						uni.showToast({
+							icon: 'none',
+							title: '请输入正确邮箱号'
+						});
+						return;
+					}
 				}
+
+				// if (this.account.length < 11) {
+				// 	uni.showToast({
+				// 		icon: 'none',
+				// 		title: '账号最短为 11 个字符'
+				// 	});
+				// 	return;
+				// }
 				if (this.password.length < 6) {
 					uni.showToast({
 						icon: 'none',
@@ -284,9 +309,10 @@
 					return;
 				}
 
-				reqUtil.requestData(config.URL.PASSWORDlOGIN, {
-					"phoneNumber": this.account,
-					"password": this.password
+				reqUtil.requestData(config.URL.LOGINPASSWORDBASEDONTHETYPE, {
+					"account": this.account,
+					"password": this.password,
+					"type": this.bMobileLogin ? 0 : 1
 				}).then(res => {
 						console.log('requestData PASSWORDlOGIN =====', res);
 						if (res.code == 0) {
@@ -521,27 +547,39 @@
 			onSwitchLogin(bMobileLogin) {
 				this.bMobileLogin = bMobileLogin;
 				//如果是已获取的验证码页面,返回获取验证码界面
-				if (this.bGetCode == false)
+				if (!this.bGetCode)
 					this.bGetCode = true;
 			},
 			onSwitchGetCode() {
 				this.bPhoneNumberAndPasswordLogin = !this.bPhoneNumberAndPasswordLogin;
 			},
 			onNavToReg() {
-				if(this.bMobileLogin){
+				if (this.bMobileLogin) {
 					if (!verify.checkPhone(this.account)) {
 						uni.showToast({
 							icon: 'none',
-							title: '输入手机号错误'
+							title: '输入正确手机号'
 						});
 						return;
 					}
 					this.$store.state.phoneNumber = this.account;
-				}else{
+				} else {
 					//todo 后面要验证邮箱
-					
+					if (!verify.checkEMail(this.account)) {
+						uni.showToast({
+							icon: 'none',
+							title: '请输入正确邮箱号'
+						});
+						return;
+					}
 					this.$store.state.mailboxNumber = this.account;
 				}
+
+				// uni.showToast({
+				// 	icon: 'none',
+				// 	title: '账号:'+ this.account
+				// });
+				// return;
 				this.bGetCode = false;
 				this.onGetCode();
 			},
@@ -937,8 +975,6 @@
 	}
 
 	.btn-row {
-		/* margin-top: 50upx; */
-		/* padding: 20upx; */
 		display: flex;
 		justify-content: center;
 		align-items: center;

+ 158 - 43
pages/login-page/pwd/pwd.vue

@@ -1,53 +1,168 @@
 <template>
-    <view class="content">
-        <view class="input-group">
-            <view class="input-row">
-                <text class="title">邮箱:</text>
-                <m-input type="text" focus clearable v-model="email" placeholder="请输入邮箱"></m-input>
-            </view>
-        </view>
+	<view>
+		<uni-nav-bar id="nav-bar" status-bar="true" @clickLeft="onBack()" :title="bModifyPassword?'修改密码':'设置密码'" color="#000000" fixed="true"
+			:border="false">
+			<view slot="left">
+				<view class=" flex align-center margin-left">
+					<image class="p-left-arrow" src="../../../static/p-left-arrow.png"></image>
+				</view>
+			</view>
+			<view slot="right">
+				<view class="make-text-bPurple text-regular margin-right" @click="savePassword">保存</view>
+			</view>
 
-        <view class="btn-row">
-            <button type="primary" class="primary" @tap="findPassword">提交</button>
-        </view>
-    </view>
+		</uni-nav-bar>
+		<block v-if="bModifyPassword">
+			<view class="card-view password-item flex justify-center ">
+				<m-input style=" margin-left: 46rpx;" type="text" focus clearable v-model="account" placeholder="请输入手机号/邮箱">
+				</m-input>
+			</view>
+			<view class="card-view password-item flex justify-center ">
+				<m-input style=" margin-left: 46rpx;" type="password" maxlength="16" displayable v-model="oldPassword"
+					placeholder="请输入旧密码">
+				</m-input>
+			</view>
+			<view class="card-view password-item flex justify-center ">
+				<m-input style=" margin-left: 46rpx;" type="password" maxlength="16" displayable v-model="newPassword"
+					placeholder="请输入新密码">
+				</m-input>
+			</view>
+			<view class="card-view password-item flex justify-center ">
+				<m-input style=" margin-left: 46rpx;" type="password" maxlength="16" displayable v-model="confirmPassword"
+					placeholder="请再次输入新密码">
+				</m-input>
+			</view>
+		</block>
+		<block v-else>
+			<view class="card-view password-item flex justify-center ">
+				<m-input style=" margin-left: 46rpx;" type="text" focus clearable v-model="account" placeholder="请输入手机号/邮箱">
+				</m-input>
+			</view>
+			<view class="card-view cu-form-group ">
+				<view style="width: 16rpx;"></view>
+				<m-input type="number" focus clearable v-model="verificationCode" placeholder="请输入验证码">
+				</m-input>
+				<button class='cu-btn make-bg-bPurple shadow text-white'>获取验证码</button>
+			</view>
+			<view class="card-view password-item flex justify-center ">
+				<m-input style=" margin-left: 46rpx;" type="password" maxlength="16" displayable v-model="newPassword"
+					placeholder="请输入新密码">
+				</m-input>
+			</view>
+			<view class="card-view password-item flex justify-center ">
+				<m-input style=" margin-left: 46rpx;" type="password" maxlength="16" displayable v-model="confirmPassword"
+					placeholder="请确认新密码">
+				</m-input>
+			</view>
+		</block>
+		
+
+		<view class="text-red margin-xl text-regular">密码必须是6-18位字符,数字、字母、特殊字符 (不能是纯数字、字母的组合)</view>
+
+	</view>
 </template>
 
 <script>
-    import service from '../../../util/util-js/service.js';
-    import mInput from '../../../components/m-input.vue';
+	import service from '../../../util/util-js/service.js';
+	import mInput from '../../../components/m-input.vue';
+	import verify from '../../../util/util-js/verify.js'
+	
 
-    export default {
-        components: {
-            mInput
-        },
-        data() {
-            return {
-                email: ''
-            }
-        },
-        methods: {
-            findPassword() {
-                /**
-                 * 仅做示例
-                 */
-                if (this.email.length < 3 || !~this.email.indexOf('@')) {
-                    uni.showToast({
-                        icon: 'none',
-                        title: '邮箱地址不合法',
-                    });
-                    return;
-                }
-                uni.showToast({
-                    icon: 'none',
-                    title: '已发送重置邮件至注册邮箱,请注意查收。',
-                    duration: 3000
-                });
-            }
-        }
-    }
+	export default {
+		components: {
+			mInput
+		},
+		data() {
+			return {
+				account: '',
+				oldPassword: '',
+				newPassword: '',
+				confirmPassword: '',
+				verificationCode: '',
+				bModifyPassword:true
+			}
+		},
+		onLoad(option) {
+			//设置页面状态
+			this.bModifyPassword = option.bModify?true:false;
+		},
+		methods: {
+			onBack() {
+				uni.navigateBack({
+					delta: 1
+				})
+			},
+			savePassword() {
+				/**
+				 * 同时判断两个类型
+				 */
+				if (!~this.account.indexOf('@') && !verify.checkPhone(this.account)) {
+				
+					uni.showToast({
+						icon: 'none',
+						title: '手机号不合法',
+					});
+					return;
+				}else if(~this.account.indexOf('@') && !verify.checkEMail(this.account))
+				{
+					uni.showToast({
+						icon: 'none',
+						title: '邮箱地址不合法',
+					});
+					return;
+				}
+				
+				if(this.verificationCode == '' 
+				|| this.verificationCode == undefined 
+				|| this.verificationCode == null){
+					uni.showToast({
+						icon: 'none',
+						title: '输入验证码',
+					});
+					return;
+				}
+
+				if(!verify.checkPassword(this.newPassword)){
+					uni.showToast({
+						icon: 'none',
+						title: '新的密码格式不合法',
+					});
+					return;
+				}
+				
+				if(!verify.checkPassword(this.confirmPassword)){
+					uni.showToast({
+						icon: 'none',
+						title: '确认的密码格式不合法',
+					});
+					return;
+				}
+				
+				if(this.confirmPassword != this.newPassword){
+					uni.showToast({
+						icon: 'none',
+						title: '请输入两个相同的密码',
+					});
+					return;
+				}
+				
+				uni.showToast({
+					icon: 'none',
+					title: '已发送重置邮件至注册邮箱,请注意查收。',
+					duration: 3000
+				});
+				//todo 处理新密码
+			}
+		}
+	}
 </script>
 
 <style>
-
+	.password-item {
+		height: 100rpx;
+	}
+	
+	.card-view{
+		border-radius: 10px;
+	}
 </style>

+ 186 - 49
pages/personal-page/personal/personal.vue

@@ -233,7 +233,8 @@
 									:levelData="currentJumpTask!=null?currentJumpTask.item:null"
 									:currentMode="currentMode" @actionJumpCheck="onPersonalCheck"
 									@actionJumpControllerPlay="onActionControlPlay"
-									@actionJumpDataUpdate="onActionJumpDataUpdate" @gameOver="onActionJumpGameOver">
+									@actionJumpDataUpdate="onActionJumpDataUpdate" @gameOver="onActionJumpGameOver"
+									@tipLevel="onTipLevel">
 								</action-jump>
 							</view>
 							<!-- <button @tap="onTestAddLocalCalorie">11</button> -->
@@ -263,11 +264,17 @@
 			<view class="example">
 				<button @click="onGetActionJumpView()">显示 onGetActionJumpView</button>
 			</view>
-			<view class="example">
-				<button @click="onGetBluetoothConnectView()">显示 bluetoothConnect</button>
-			</view>
+		<view class="example">
+			<button @click="onGetBluetoothConnectView()">显示 bluetoothConnect</button>
+		</view>
  -->
-
+			
+		<!-- 	<view class="example">
+				<button @click="showGuide('level-game-tip',{levelType:'rotationJump'})">显示 level-game-tip</button>
+			</view> -->
+			<!-- <view class="example">
+				<button @click="onTipLevel">显示 ontipLevel</button>
+			</view> -->
 			<view class="example" style="margin-top: 10rpx;">
 				<button @click="onNavToDirection">跳转校准页面</button>
 			</view>
@@ -278,10 +285,15 @@
 		</scroll-view>
 
 		<!-- 底部中间上滑按钮 -->
-		<view class="flex flex-direction justify-center align-center task-up-button">
-			<image style="width: 156rpx; height: 32rpx;" src="../../../static/personal/slideUp.png" @tap="showModal"
-				data-target="slideUpModal"></image>
-			<view style="width: 100%;height: 36rpx; background-color: #FFFFFF; color: #FFFFFF;"></view>
+		<view class="flex flex-direction justify-end align-center task-up-button" @tap="showModal"
+			data-target="slideUpModal">
+			<!-- <image style="width: 156rpx; height: 32rpx;" src="../../../static/personal/slideUp.png" @tap="showModal"
+				data-target="slideUpModal"></image> -->
+			<image style="width: 147px;height: 31px; top: -6px;" class="position-absolute-center"
+				src="../../../static/modal/level-tip/level-tip-bg@2x.png"></image>
+			<image style="width: 30px;height: 23px; " src="../../../static/modal/level-tip/level-tip-logo@2x.png">
+			</image>
+			<view style="width: 100%;height: 16rpx; background-color: #FFFFFF; color: #FFFFFF;"></view>
 		</view>
 
 		<!-- 右下角导航栏 -->
@@ -411,8 +423,13 @@
 		<!-- 任务栏 -->
 		<view class="cu-modal bottom-modal" :class="modalName=='slideUpModal'?'show':''" @tap="hideModal">
 			<view class="cu-dialog bg-white" style="border-radius: 15px 15px 0 0 ;" @tap.stop="">
-				<view class="flex justify-center align-center" style="width: 100%; height: 60rpx;" @tap="hideModal">
+				<view class="flex justify-center align-center position-relative" style="width: 750rpx; height: 64rpx;"
+					@tap="hideModal">
 					<view class="text-blue make-bg-bPurple radius" style="width: 80rpx; height: 4px;"></view>
+					<view class="position-absolute-right-top">
+						<image style="width: 64rpx;height: 64rpx;" src="../../../static/common/modal/task-close@2x.png">
+						</image>
+					</view>
 				</view>
 				<view class="flex justify-between" style="width: 100%; padding: 34rpx 60rpx 46rpx 81rpx;">
 					<view class="flex align-center justify-center">
@@ -437,8 +454,10 @@
 				<scroll-view scroll-y="true" style="height: 800rpx; max-height: 800rpx;min-height: 460rpx;"
 					:style="{ height: modalHeight + 'px' }" :scroll-into-view="taskIntoView"
 					:scroll-top="taskScrollTop">
+					<!-- :class="!item.isUnlock?'':'make-text-bPurple'" -->
 					<view class="my-column-cu-steps">
-						<view class="cu-item" :class="!item.isUnlock?'':'make-text-bPurple'"
+						<view class="cu-item"
+							:class="(currentJumpTask!=null&&item.id==currentJumpTask.item.id)?'make-bg-bPurple-01':''"
 							v-for="(item,index) in currentTaskList" :key="index" :id='"task_"+index'
 							@click="selectTask(index,item)">
 							<image v-if="item.isUnlock" class="my-column-cu-image"
@@ -450,24 +469,26 @@
 							<image v-else class="my-column-cu-image" src="../../../static/common/modal/lock.png">
 							</image>
 							<view class="content">
-								<view class="text-15px text-bold text-cut text-left "
-									style="margin-left: 48rpx; width: 360rpx;">
+								<view class="text-15px text-bold text-cut text-left text-black text-medium"
+									style="margin-left: 48rpx; width: 360rpx;margin-top: 30rpx;">
 									{{index+1}}. {{item.name}}
 								</view>
-								<view class="flex justify-start align-center" style="margin:30rpx 0 30rpx 86rpx;">
+								<view class="flex justify-start align-center" style="margin:20rpx 0 20rpx 86rpx;">
 									<!-- 居中绘制星星样式 -->
 									<view class="flex align-center justify-center"
 										style="margin-right: 36rpx;margin-top: 4rpx;">
-										<image style="width: 24rpx;height: 26rpx; margin-right: 18rpx;"
+										<image style="width: 36rpx;height: 36rpx; margin-right: 18rpx;"
 											src="/static/common/sideBar/sGold.png"></image>
-										<view class="text-13px" style="line-height: 26rpx;">{{item.consumeGold}}
+										<view class="text-13px text-black text-medium" style="line-height: 26rpx;">
+											{{item.consumeGold}}
 										</view>
 									</view>
 									<view class="flex align-center justify-center"
 										style="margin-right: 36rpx;margin-top: 4rpx;">
-										<image style="width: 24rpx;height: 26rpx; margin-right: 18rpx;"
+										<image style="width: 38rpx;height: 34rpx; margin-right: 18rpx;"
 											src="/static/common/sideBar/sDiamond.png"></image>
-										<view class="text-13px" style="line-height: 26rpx;">{{item.consumeDiamond}}
+										<view class="text-13px text-black text-medium" style="line-height: 26rpx;">
+											{{item.consumeDiamond}}
 										</view>
 									</view>
 
@@ -489,10 +510,13 @@
 							<image class="my-column-cu-right-image" style="pointer-events:auto;"
 								src="../../../static/common/modal/medal.png" @click="showPopup('prompt',item)">
 							</image>
-
+							<view v-if="currentJumpTask!=null&&item.id==currentJumpTask.item.id"
+								class="position-absolute-right-bottom make-text-bPurple text-13px text-medium "
+								style="right: 70rpx;bottom: 24rpx;">游戏中...</view>
+							<!-- /static/devicesOther/radio-g -->
 							<image class="my-column-cu-image"
-								style="left: 130rpx;top: 40rpx; width: 50rpx;height: 50rpx;"
-								:src="(currentJumpTask!=null&&item.id==currentJumpTask.item.id)?'/static/devicesOther/radio-b.png':'/static/devicesOther/radio-g.png'"
+								style="left: 140rpx;top: 50rpx; width: 30rpx;height: 30rpx;"
+								:src="(currentJumpTask!=null&&item.id==currentJumpTask.item.id)?'/static/devicesOther/radio-b.png':'.png'"
 								mode="aspectFit"></image>
 
 						</view>
@@ -505,7 +529,7 @@
 
 			</view>
 		</view>
-		
+
 		<!-- 这里vConsole 是为了解决再页面内显示vconsole -->
 		<view id="vconsole" :prop="vLog" :change:prop="vconsole.updateData"></view>
 	</view>
@@ -608,7 +632,8 @@
 			'systemInfo', 'navHeight', 'tabbarHeight',
 			'cDiamond', 'cGold',
 			'finallySelectFriendInfo',
-			'currentJumpTask', 'singlePersonList', 'multiPersonList'
+			'currentJumpTask', 'singlePersonList', 'multiPersonList',
+			'guideUnlockState'
 		]),
 		components: {
 			// uniNavBar,
@@ -985,17 +1010,18 @@
 			// #ifdef APP-PLUS
 			//制作一个新手引导,以nvue为主。
 			//第一步提示设置计划,之后在回调registerPopupEvent 中处理
-			this.showGuide('plan', null);
-			// if (!this.bNewGuide) {
-
-			// } else {
-			// 	//添加设备绑腿提示
-			// 	//guide.nvue 里面存储
-			// 	const value = uni.getStorageSync('deviceDirectionPrompt');
-			// 	if (!value && !value.isSelected) {
-			// 		this.showGuide('device-tip', null);
-			// 	}
-			// }
+			if (this.guideUnlockState.firstInstallation) {
+				//第一次安装登录。提示
+				this.onGetBluetoothConnectView({
+					hiddenType: 'firstInstallation'
+				});
+				console.log("guideUnlockState 1=============:", this.guideUnlockState);
+				let guideUnlockState = Object.assign(this.guideUnlockState, {
+					firstInstallation: false
+				});
+				this.setGuideUnlockState(guideUnlockState);
+			}
+
 			// #endif
 
 
@@ -1046,7 +1072,8 @@
 				'getUserWallets', 'setGoldAndDiamond',
 				'onConvertDeviceData',
 				'showDrawerById', 'showPopupById', 'showGuideById',
-				'getSignInList', 'onUserSignIn'
+				'getSignInList', 'onUserSignIn',
+				'setGuideUnlockState'
 			]),
 			BasicsSteps() {
 				this.basics = this.basics == this.basicsList.length - 1 ? 0 : this.basics + 1
@@ -2359,12 +2386,14 @@
 				}, 200)
 
 			},
-			onGetBluetoothConnectView() {
+			onGetBluetoothConnectView(initData) {
 
 				_self.$refs.roundFabRef.onGetRoundFabView((data) => {
-					console.log(JSON.stringify(data));
+					console.log(JSON.stringify(data), initData.firstInstallation);
 					// #ifdef APP-PLUS
-					_self.showGuide('bluetoothConnect', data);
+					let temp = Object.assign({}, data, initData);
+					console.log('当前的temp:', temp);
+					_self.showGuide('bluetoothConnect', temp);
 					// #endif
 				});
 				// let view = uni.createSelectorQuery().select('#roundFabID');
@@ -2591,10 +2620,20 @@
 			 * 悬停按钮
 			 */
 			fabClick() {
-				// uni.showToast({
-				// 	title: '点击了悬浮按钮',
-				// 	icon: 'none'
-				// })
+				//如果第一次点击悬停按钮
+				if (this.guideUnlockState.firstDisconnectBluetooth) {
+
+					this.onGetBluetoothConnectView({
+						hiddenType: 'firstDisconnectBluetooth'
+					});
+					let guideUnlockState = Object.assign(this.guideUnlockState, {
+						firstDisconnectBluetooth: false
+					});
+					this.setGuideUnlockState(guideUnlockState);
+					return;
+				}
+
+
 
 				if (this.cIndex != -1 && this.BLEConnectDevice != null) {
 					//先检测
@@ -2878,6 +2917,31 @@
 			 * 任务相关
 			 */
 			selectTask(_index, _item) {
+				// console.log(JSON.stringify(_item));
+				//第一次选择关卡时候判断
+				if(this.guideUnlockState.firstUnlockJumpUp && _item.id == 1){
+					this.showGuide('level-game-tip',{levelType:'midJump',hiddenType: 'firstUnlockJumpUp'})
+					let guideUnlockState = Object.assign(this.guideUnlockState, {
+						firstUnlockJumpUp: false
+					});
+					this.setGuideUnlockState(guideUnlockState);
+					return;
+				}else if(this.guideUnlockState.firstUnlockLeftAndRightJump && _item.id == 6){
+					this.showGuide('level-game-tip',{levelType:'directionJump',hiddenType: 'firstUnlockLeftAndRightJump'})
+					let guideUnlockState = Object.assign(this.guideUnlockState, {
+						firstUnlockLeftAndRightJump: false
+					});
+					this.setGuideUnlockState(guideUnlockState);
+					return;
+				}else if(this.guideUnlockState.firstUnlockLeftAndRightRotationJump && _item.id == 9){
+					this.showGuide('level-game-tip',{levelType:'rotationJump',hiddenType: 'firstUnlockLeftAndRightRotationJump'})
+					let guideUnlockState = Object.assign(this.guideUnlockState, {
+						firstUnlockLeftAndRightRotationJump: false
+					});
+					this.setGuideUnlockState(guideUnlockState);
+					return;
+				}
+				
 				if (_item.isUnlock) {
 					let _data = {
 						modeName: this.currentMode, //记录时候记录当前的mode 
@@ -3051,7 +3115,7 @@
 				})
 
 				uni.$on('guide-popup-page', (data) => {
-					// console.log('guide-popup-page', JSON.stringify(data));
+					console.log('guide-popup-page', JSON.stringify(data));
 					switch (data.type) {
 						case 'button':
 							if (data.messageType == 'plan') {
@@ -3062,16 +3126,77 @@
 							} else if (data.messageType == 'bluetoothConnect') {
 								if (data.confirm) {
 									//跳转播放
-									this.onGetActionJumpView();
+									// this.onGetActionJumpView();
+									//首次安装
+									if (data.hiddenType == 'firstInstallation') {
+										setTimeout(() => {
+											this.showGuide('device-tip', {
+												hiddenType: 'firstInstallation'
+											});
+										}, 30)
+									} else if (data.hiddenType == 'firstDisconnectBluetooth') {
+										this.fabClick();
+									}
 								}
 							} else if (data.messageType == 'actionJumpPlay') {
 								if (data.confirm) {
-									setTimeout(() => {
-										this.showGuide('device-tip', null);
-									}, 30)
+
+								}
+							} else if (data.messageType == 'device-tip') {
+								if (data.confirm) {
+									if (data.hiddenType == 'firstInstallation') {
+										setTimeout(() => {
+											this.showGuide('level-button-tip', {
+												hiddenType: 'firstInstallation'
+											});
+										}, 30)
+									}
+								}
+							} else if (data.messageType == 'level-button-tip') {
+								if (data.confirm) {
+
 								}
 							}
 
+							break;
+						case 'selected':
+							console.log('当前操作的类型 selected:', data.messageType)
+							if (data.messageType == 'level-button-tip') {
+								if (data.isSelected) {
+									uni.setStorage({
+										key: 'levelButtonPrompt',
+										data: {
+											isSelected: true
+										}
+									})
+									this.$refs.actionJumpRef.onUpdateTipLevelValue(true);
+
+								} else {
+									uni.setStorage({
+										key: 'levelButtonPrompt',
+										data: {
+											isSelected: false
+										}
+									})
+									this.$refs.actionJumpRef.onUpdateTipLevelValue(false);
+								}
+							} else if (data.messageType == 'device-tip') {
+								if (data.isSelected) {
+									uni.setStorage({
+										key: 'deviceDirectionPrompt',
+										data: {
+											isSelected: true
+										}
+									})
+								} else {
+									uni.setStorage({
+										key: 'deviceDirectionPrompt',
+										data: {
+											isSelected: false
+										}
+									})
+								}
+							}
 							break;
 						default:
 							uni.showToast({
@@ -3095,6 +3220,18 @@
 
 			moveBoxingHandle() {
 				return;
+			},
+
+			/**
+			 * 提示打开关卡
+			 */
+			onTipLevel() {
+				// #ifdef APP-PLUS
+				this.showGuide('level-button-tip', null);
+				// #endif
+				// #ifdef H5
+				console.warn("不支持nvue");
+				// #endif
 			}
 		}
 	};
@@ -3762,11 +3899,11 @@
 		/* #ifdef APP-PLUS */
 		position: fixed;
 		/* #endif */
-		bottom: -10px;
+		bottom: 0;
 		right: 0;
 		left: 0;
 		margin: auto;
 		width: 100%;
-		height: 68rpx;
+		height: 82rpx;
 	}
 </style>

+ 102 - 0
pages/platform-page/guide/guide.vue

@@ -0,0 +1,102 @@
+<template>
+	<view>
+		<uni-nav-bar id="nav-bar" status-bar="true" @clickLeft="onBack()" :title="title" color="#000000" fixed="true"
+			:border="false">
+			<view slot="left">
+				<view class=" flex align-center margin-left">
+					<image class="p-left-arrow" src="../../../static/p-left-arrow.png"></image>
+				</view>
+			</view>
+
+		</uni-nav-bar>
+		<view class="card-view settings-item" v-for="(item,index) in list" :key="index">
+			<view class="content position-relative" @tap="onNavTo(item)">
+				<text class="text-black text-regular text-16px margin-left-xl">{{item.gameName}}</text>
+				<view class="only-arrow"></view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import reqUtil from "@/util/util-js/requstUtil.js"
+	import config from "@/common/config.js"
+	import {
+		mapState
+	} from 'vuex';
+	export default {
+		computed: mapState(['platform', 'gamePlatform']),
+		data() {
+			return {
+				list: [{
+						gameName: '新手指导',
+						navType: 'password'
+					}, {
+						gameName: '蓝牙连接指导',
+						navType: 'guide'
+					},
+					{
+						gameName: '游戏手柄校准指导',
+						navType: 'feedback'
+					},
+					{
+						gameName: '游戏指导',
+						navType: 'feedback'
+					}
+				],
+				title: "新手指导",
+				type: '',
+			}
+		},
+		onLoad(option) {
+
+
+
+		},
+		methods: {
+
+			onBack() {
+				uni.navigateBack({
+					delta: 1
+				})
+			},
+
+			onNavTo(item) {
+				console.log(item);
+				let url = '';
+				switch (item.navType) {
+					case 'password':
+						//todo 判断密码是否已经设置。如果没有,进入设置密码,如果已经设置了,进入修改密码;
+						break;
+					case 'guide':
+						break;
+					case 'feedback':
+						break;
+				}
+
+
+				// uni.navigateTo({
+				// 	url: url,
+				// 	success: res => {},
+				// 	fail: () => {},
+				// 	complete: () => {}
+				// });
+			}
+		}
+	}
+</script>
+
+<style>
+	.content {
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		height: 50px;
+	}
+
+	.settings-item {
+		position: relative;
+		background-color: #FFFFFF;
+		border-radius: 10px;
+	}
+</style>

+ 106 - 0
pages/platform-page/settings/settings.vue

@@ -0,0 +1,106 @@
+<template>
+	<view>
+		<uni-nav-bar id="nav-bar" status-bar="true" @clickLeft="onBack()" :title="title" color="#000000" fixed="true"
+			:border="false">
+			<view slot="left">
+				<view class=" flex align-center margin-left">
+					<image class="p-left-arrow" src="../../../static/p-left-arrow.png"></image>
+				</view>
+			</view>
+
+		</uni-nav-bar>
+		<view class="card-view settings-item" v-for="(item,index) in list" :key="index">
+			<view class="content position-relative"  @tap="onNavTo(item)">
+				<text class="text-black text-regular text-16px margin-left-xl">{{item.gameName}}</text>
+				<view v-if="index == 0" class="position-absolute-center">
+					<view class="text-gray" style="text-align: end;margin-right: 88rpx; line-height: 100rpx;">{{bModify?'已设置':'未设置'}}</view>
+				</view>
+				<view class="only-arrow"></view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import reqUtil from "@/util/util-js/requstUtil.js"
+	import config from "@/common/config.js"
+	import {
+		mapState
+	} from 'vuex';
+	export default {
+		computed: mapState(['platform', 'gamePlatform']),
+		data() {
+			return {
+				list: [{
+					gameName: '设置密码',
+					navType: 'password'
+				}, {
+					gameName: '新手指导',
+					navType: 'guide'
+				}, {
+					gameName: '意见反馈',
+					navType: 'feedback'
+				}],
+				title: "设置",
+				type: '',
+				page: 1,
+				size: 10,
+				bDontUpdate: false,
+				bModify: true,
+			}
+		},
+		onLoad(option) {
+
+
+
+		},
+		methods: {
+
+			onBack() {
+				uni.navigateBack({
+					delta: 1
+				})
+			},
+
+			onNavTo(item) {
+				console.log(item);
+				let url = '';
+				switch (item.navType) {
+					case 'password':
+						//todo 判断密码是否已经设置。如果没有,进入设置密码,如果已经设置了,进入修改密码;
+						url = '/pages/login-page/pwd/pwd?bModify=' + this.bModify;
+						break;
+					case 'guide':
+						url = '/pages/platform-page/guide/guide';
+						break;
+					case 'feedback':
+						url = '/pages/login-page/feedback/feedback';
+						break;
+				}
+
+
+				uni.navigateTo({
+					url: url,
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+			}
+		}
+	}
+</script>
+
+<style>
+	.content {
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		height: 50px;
+	}
+
+	.settings-item {
+		position: relative;
+		background-color: #FFFFFF;
+		border-radius: 10px;
+	}
+</style>

+ 2 - 2
platform/app-plus/subNVue/drawer.nvue

@@ -117,8 +117,8 @@
 					case "ranking":
 						url = '/pages/game-page/game-ranking/game-ranking';
 						break;
-					case "feedback":
-						url = '/pages/login-page/feedback/feedback';
+					case "settings":
+						url = '/pages/platform-page/settings/settings';
 						break;
 					case "friend":
 						url = '/pages/friend-page/main/main';

+ 233 - 31
platform/app-plus/subNVue/guide.nvue

@@ -1,13 +1,56 @@
 <template>
 	<view class="guide-wrapper">
+		<view v-if="currentType == 'level-button-tip'" class="guide-container position-relative"
+			@click="buttonMessage('confirm')">
+			<!-- top: 55px; 相当于 上间隔 -->
+			<view class="mask-bg-07" :style="{height:guideHeight+'px'}"></view>
+			<!-- 中心位置 225 -->
+			<view style="width: 750rpx;height: 231px;">
+				<view style="height: 200px;" class="mask-bg-07">
+					<view class="position-absolute-center" style="top: 0;left:100rpx;">
+						<image style="width: 488rpx;height: 366rpx;"
+							src="../../../static/modal/level-tip/level-tip-box@2x.png">
+						</image>
+					</view>
+					<view class="position-absolute-center">
+						<text class="text-white text-14px text-lines2"
+							style="top: -80rpx;left:70rpx; width: 300rpx;">点击此按钮选择关卡</text>
+						<view v-if="hiddenType != 'firstInstallation'" class="flex flex-direction-row"
+							style="top: -50rpx;left:50rpx;" @click="switchSelected()">
+							<image v-if="!isSelected" style="width: 40rpx;height: 40rpx; margin-right: 20rpx;"
+								src="../../../static/common/subNVue/guide/check-box.png"></image>
+							<image v-else style="width: 40rpx;height: 40rpx; margin-right: 20rpx;"
+								src="../../../static/common/subNVue/guide/check-box-selected.png"></image>
+							<text class="text-15px text-white">不再提示</text>
+						</view>
+					</view>
+				</view>
+				<view style="width: 750rpx;height: 82rpx;" class="flex flex-direction-row">
+					<view class="flex-sub mask-bg-07"></view>
+					<view class="position-relative justify-center align-center"
+						style="width: 147px;height: 82rpx; background-color: rgba(0,0,0,0.7);">
+						<image style="width: 147px;height: 31px;" class="position-absolute-center"
+							src="../../../static/modal/level-tip/level-tip-bg@2x.png"></image>
+						<image style="width: 30px;height: 23px; "
+							src="../../../static/modal/level-tip/level-tip-logo@2x.png"></image>
+					</view>
+
 
+					<view class="flex-sub mask-bg-07"></view>
+				</view>
+			</view>
+			<!-- 计算剩余空白 -->
+			<view class="mask-bg-07 flex-sub"></view>
+		</view>
 		<view v-if="currentType == 'device-tip'"
-			class="guide-container justify-center align-center position-relative mask-bg-07">
+			class="guide-container justify-center align-center position-relative mask-bg-07"
+			@click="buttonMessage('confirm')">
 			<view class="mid">
 				<image class="bind-tip-image" src="../../../static/modal/tip/bind-tip-bg.png"></image>
 				<text class="text-16px text-center text-white"
 					style="width: 500rpx;margin-bottom: 130rpx;">请将手柄十字键朝上插入绑带中,佩戴在右侧小腿侧面</text>
-				<view class="flex flex-direction-row" @click="switchSelected()">
+				<view v-if="hiddenType != 'firstInstallation'" class="flex flex-direction-row"
+					@click="switchSelected()">
 					<image v-if="!isSelected" style="width: 40rpx;height: 40rpx; margin-right: 20rpx;"
 						src="../../../static/common/subNVue/guide/check-box.png"></image>
 					<image v-else style="width: 40rpx;height: 40rpx; margin-right: 20rpx;"
@@ -29,7 +72,8 @@
 						</image>
 					</view>
 					<view class="position-absolute-center">
-						<text class="text-white text-14px text-lines2" style="top: -30rpx;left:90rpx; width: 300rpx;">开始关卡前定制自己的卡路里,目标计划吧</text>
+						<text class="text-white text-14px text-lines2"
+							style="top: -30rpx;left:90rpx; width: 300rpx;">开始关卡前定制自己的卡路里,目标计划吧</text>
 					</view>
 				</view>
 				<view style="width: 750rpx;height: 120px;" class="flex flex-direction-row">
@@ -76,21 +120,26 @@
 			<!-- top: 55px; 相当于 上间隔 -->
 			<view class="mask-bg-07" :style="{height:guideHeight+'px'}"></view>
 			<!-- 中心位置 225 -->
-			<view style="width: 750rpx;height: 284px;">
-				<view style="height: 200px;" class="mask-bg-07">
-					<view class="position-absolute-center" style="top: 0;left:100rpx;">
-						<image style="width: 488rpx;height: 366rpx;"
-							src="../../../static/common/subNVue/guide/guide-bluetooth@3x.png">
+			<view style="width: 750rpx;height: 764rpx;">
+				<view style="height: 596rpx;" class="mask-bg-07">
+					<view class="position-absolute-center" style="top: 0;left:31rpx;">
+						<image style="width: 626rpx;height: 596rpx;"
+							src="../../../static/common/subNVue/guide/guide-bluetooth-big@2x.png">
 						</image>
 					</view>
-					<view class="position-absolute-center">
-						<text class="text-white text-14px" style="top: -10rpx;left:80rpx;">点击此处进行蓝牙连接</text>
+					<view class="position-absolute-center ">
+						<text class="text-left  text-white text-14px"
+							style="width: 542rpx;">1、长按开关键3秒,绿灯连续闪烁为可连接状态.</text>
+						<text class="text-left  text-white text-14px" style="width: 542rpx;">2、选择设备类型进行连接.</text>
+						<text class="text-left  text-white text-14px"
+							style="width: 542rpx;">3、手柄连接成功后,将手柄十字键朝上插入绑带中.</text>
+						<text class="text-left  text-white text-14px" style="width: 542rpx;">4、用绑带将手柄朝上绑在右脚脚踝上.</text>
 					</view>
 				</view>
-				<view style="width: 750rpx;height: 84px;" class="flex flex-direction-row">
+				<view style="width: 750rpx;height: 168rpx;" class="flex flex-direction-row">
 					<!-- 这里width 当做 left -->
 					<view class="mask-bg-07" :style="{width:guideLeft+'px'}"></view>
-					<image style="width: 100px;height: 100px; opacity: 0.7;top: -16px;"
+					<image style="width: 100px;height: 100px; opacity: 0.7;top: -12px;"
 						src="../../../static/common/subNVue/guide/guide-circle-mask.png"></image>
 					<view class="mask-bg-07 flex-sub"></view>
 				</view>
@@ -99,6 +148,44 @@
 			<view class="mask-bg-07 flex-sub"></view>
 		</view>
 
+		<view v-if="currentType == 'level-game-tip'"
+			class="guide-container justify-center align-center position-relative mask-bg-07"
+			@click="buttonMessage('confirm')">
+			<view class="game-mid">
+				<view style="height: 278rpx;width: 750rpx;" class="position-relative">
+					<view class="position-absolute-center" style="top: 0;left:0rpx;">
+						<image style="width: 442rpx;height: 278rpx;"
+							src="../../../static/common/subNVue/guide/level-game-title@2x.png"></image>
+					</view>
+					<view class="position-absolute-center">
+						<text class="text-white text-14px"
+							style="top: 0rpx;left:20rpx;">{{unlockLevelInfo.title}}</text>
+					</view>
+				</view>
+
+				<view class="flex flex-direction-row align-center justify-center margin-17px">
+					<text class="game-number">1</text>
+					<text class="text-16px text-left text-white " style="width:476rpx;">{{unlockLevelInfo.firstText}}</text>
+				</view>
+				<image
+					:style="{ width: unlockLevelInfo.firstWidth  + 'rpx', height: unlockLevelInfo.firstHeight  + 'rpx' ,transform:'scaleX('+unlockLevelInfo.firstDirection +')' }"
+					:src="unlockLevelInfo.firstImage"></image>
+				<view class="flex flex-direction-row align-center justify-center margin-17px">
+					<text class="game-number">2</text>
+					<text class="text-16px text-left text-white " style="width:476rpx;">{{unlockLevelInfo.secondText}}</text>
+				</view>
+				<image
+					:style="{ width: unlockLevelInfo.secondWidth  + 'rpx', height: unlockLevelInfo.secondHeight  + 'rpx' ,transform:'scaleX('+unlockLevelInfo.secondDirection +')' }"
+					:src="unlockLevelInfo.secondImage">
+				</image>
+
+
+				<image style="width: 232rpx;height: 78rpx;margin-top: 48rpx;"
+					src="../../../static/common/subNVue/guide/level-game-next@2x.png"></image>
+
+
+			</view>
+		</view>
 
 	</view>
 </template>
@@ -117,9 +204,69 @@
 				lists: [],
 				isSelected: false,
 				currentType: 'none',
+				/**
+				 * 隐藏guide时候,随后的操作类型
+				 */
+				hiddenType: 'none',
 				operationItem: null,
 				guideHeight: 55,
 				guideLeft: 166,
+
+				//三个关卡的对应信息
+				unlockLevelInfo: {
+					title: '',
+					firstText: '',
+					firstImage: '',
+					firstWidth: 0,
+					firstHeight: 0,
+					secondText: '',
+					secondImage: '',
+					secondWidth: 0,
+					secondHeight: 0
+				},
+
+				midJumpInfo: {
+					title: '解锁向上跳',
+					firstText: '请先确保手柄已经连接成功。',
+					firstImage: '../../../static/common/subNVue/guide/level-game-fab@2x.png',
+					firstDirection: 1,
+					firstWidth: 102,
+					firstHeight: 108,
+					secondText: '通过向上跳的方式消除标志块',
+					secondImage: '../../../static/modal/action-jump/midJumpWhite.png',
+					secondDirection: 1,
+					secondWidth: 68,
+					secondHeight: 68
+
+				},
+
+				directionJumpInfo: {
+					title: '解锁左右跳',
+					firstText: '此为左跳图标,通过向左跳的方式消除标志块',
+					firstImage: '../../../static/modal/action-jump/directionJumpWhite.png',
+					firstDirection: -1,
+					firstWidth: 68,
+					firstHeight: 68,
+					secondText: '此为右跳图标,通过向右跳的方式消除标志块',
+					secondImage: '../../../static/modal/action-jump/directionJumpWhite.png',
+					secondDirection: 1,
+					secondWidth: 68,
+					secondHeight: 68
+				},
+
+				rotationJumpInfo: {
+					title: '解锁左右旋跳',
+					firstText: '此为左旋跳图标,通过向左旋跳的方式消除标志块',
+					firstImage: '../../../static/modal/action-jump/directionJumpWhite.png',
+					firstDirection: -1,
+					firstWidth: 68,
+					firstHeight: 68,
+					secondText: '此为右旋跳图标,通过向右旋跳的方式消除标志块',
+					secondImage: '../../../static/modal/action-jump/directionJumpWhite.png',
+					secondDirection: 1,
+					secondWidth: 68,
+					secondHeight: 68
+				}
 			}
 		},
 		created() {
@@ -141,13 +288,43 @@
 						.statusBarHeight - 275;
 				} else if (vm.currentType == "bluetoothConnect") {
 					let _viewData = data.item;
-					vm.guideHeight = _viewData.top + _viewData.height - _viewData.height / 4 - vm.systemInfo
-						.statusBarHeight - 225;
+					console.log(_viewData);
+					console.log(vm.systemInfo);
+					//+ _viewData.height - _viewData.height / 4 - vm.systemInfo.statusBarHeight
+					vm.guideHeight = _viewData.top - 298;
 					vm.guideLeft = _viewData.left - _viewData.width / 2 + 5;
+					//获取类型
+					vm.hiddenType = _viewData.hiddenType || 'none';
+					console.log("vm.hiddenType:", vm.hiddenType);
 				} else if (vm.currentType == "plan") {
 					let _viewData = data.item;
 					vm.guideHeight = vm.systemInfo.screenHeight - 284 - 32;
 					// vm.guideLeft = 55;
+				} else if (vm.currentType == "level-button-tip") {
+					let _viewData = data.item;
+					vm.guideHeight = vm.systemInfo.screenHeight - 284 - 32 + 3;
+					const value = uni.getStorageSync('levelButtonPrompt');
+					if (value) {
+						vm.isSelected = value.isSelected;
+					} else {
+						vm.isSelected = false;
+					}
+				} else if (vm.currentType == "device-tip") {
+					const value = uni.getStorageSync('deviceDirectionPrompt');
+					if (value) {
+						vm.isSelected = value.isSelected;
+					} else {
+						vm.isSelected = false;
+					}
+				} else if (vm.currentType == "level-game-tip") {
+					let _viewData = data.item;
+					if (_viewData.levelType == 'midJump') {
+						vm.unlockLevelInfo = Object.assign({}, vm.midJumpInfo);
+					} else if (_viewData.levelType == 'directionJump') {
+						vm.unlockLevelInfo = Object.assign({}, vm.directionJumpInfo);
+					} else if (_viewData.levelType == 'rotationJump') {
+						vm.unlockLevelInfo = Object.assign({}, vm.rotationJumpInfo);
+					}
 				}
 			})
 		},
@@ -158,23 +335,29 @@
 			switchSelected() {
 				console.log('switchSelected', this.isSelected, !this.isSelected);
 				this.isSelected = !this.isSelected;
-				if (this.isSelected) {
-					//this.buttonMessage('confirm');
-					uni.setStorage({
-						key: 'deviceDirectionPrompt',
-						data: {
-							isSelected: true
-						}
-					})
-				} else {
-					// this.buttonMessage('cancel');
-					uni.setStorage({
-						key: 'deviceDirectionPrompt',
-						data: {
-							isSelected: false
-						}
-					})
-				}
+
+				uni.$emit('guide-popup-page', {
+					type: 'selected',
+					messageType: this.currentType,
+					isSelected: this.isSelected,
+					operationItem: this.operationItem
+				})
+
+				// if (this.isSelected) {
+				// 	uni.setStorage({
+				// 		key: 'deviceDirectionPrompt',
+				// 		data: {
+				// 			isSelected: true
+				// 		}
+				// 	})
+				// } else {
+				// 	uni.setStorage({
+				// 		key: 'deviceDirectionPrompt',
+				// 		data: {
+				// 			isSelected: false
+				// 		}
+				// 	})
+				// }
 			},
 
 			buttonMessage(buttonEvent) {
@@ -184,6 +367,7 @@
 					uni.$emit('guide-popup-page', {
 						type: 'button',
 						messageType: this.currentType,
+						hiddenType: this.hiddenType,
 						confirm: buttonEvent == 'confirm' ? true : false,
 						cancel: buttonEvent == 'cancel' ? true : false,
 						info: buttonEvent + ' 该元素被点击了!',
@@ -227,6 +411,13 @@
 
 	}
 
+	.game-mid {
+		justify-content: center;
+		align-items: center;
+		height: 850rpx;
+		width: 750rpx;
+	}
+
 	.bind-tip-image {
 		border-width: 14rpx;
 		border-style: solid;
@@ -330,4 +521,15 @@
 		left: 150px;
 		/* margin-left: -250px; */
 	}
+
+	.game-number {
+		border-radius: 18px;
+		border-width: 1rpx;
+		width: 22px;
+		height: 22px;
+		text-align: center;
+		color: #FFFFFF;
+		border-color: #FFFFFF;
+		margin-right: 13px;
+	}
 </style>

BIN
static/common/modal/task-close@2x.png


BIN
static/common/subNVue/guide/guide-bluetooth-big@2x.png


BIN
static/common/subNVue/guide/level-game-fab@2x.png


BIN
static/common/subNVue/guide/level-game-next@2x.png


BIN
static/common/subNVue/guide/level-game-title@2x.png


BIN
static/modal/action-jump/directionJump.png


BIN
static/modal/action-jump/directionJumpWhite.png


BIN
static/modal/action-jump/midJump.png


BIN
static/modal/action-jump/midJumpWhite.png


BIN
static/modal/action-jump/rotateJump.png


BIN
static/modal/action-jump/rotateJumpWhite.png


BIN
static/modal/level-tip/level-tip-bg@2x.png


BIN
static/modal/level-tip/level-tip-box@2x.png


BIN
static/modal/level-tip/level-tip-logo@2x.png


BIN
static/settings@2x.png


+ 10 - 0
util/util-css/main-nvue.css

@@ -372,6 +372,10 @@
 	margin: 12px;
 }
 
+.margin-17px {
+	margin: 17px;
+}
+
 .margin-24px {
 	margin: 24px;
 }
@@ -414,6 +418,12 @@
 	align-items: center;
 }
 
+.position-absolute-right-top {
+	position: absolute;
+	right: 0;
+	top: 0;
+}
+
 
 /* 自定义导航栏的图片大小 */
 .png-more {

+ 26 - 8
util/util-css/main.css

@@ -2553,6 +2553,7 @@ button.cuIcon.lg {
 	background: rgba(0, 0, 0, 0.6);
 	transition: all 0.3s ease-in-out 0s;
 	pointer-events: none;
+	width: 750rpx;
 }
 
 .cu-modal::before {
@@ -4136,6 +4137,10 @@ scroll-view.cu-steps .cu-item {
 	background-color: rgba(151, 151, 255, 1);
 }
 
+.make-bg-bPurple-01 {
+	background-color: rgba(151, 151, 255, 0.1);
+}
+
 .make-text-r-blue {
 	color: rgba(55, 192, 252, 255);
 }
@@ -4195,10 +4200,6 @@ scroll-view.cu-steps .cu-item {
 	/* background-color: #FFFFFF; */
 }
 
-.text-medium {
-	font-size: 400;
-}
-
 
 /* 图片部分大小 */
 .w-left-arrow {
@@ -4456,7 +4457,7 @@ scroll-view.cu-steps .cu-item {
 .my-column-cu-steps .cu-item .my-column-cu-image {
 	display: block;
 	position: absolute;
-	top: 0rpx;
+	top: 30rpx;
 	left: 82rpx;
 	
 	width: 76rpx;
@@ -4466,22 +4467,23 @@ scroll-view.cu-steps .cu-item {
 .my-column-cu-steps .cu-item .my-column-cu-right-image {
 	display: block;
 	position: absolute;
-	top: 0rpx;
+	top: 30rpx;
 	right: 88rpx;
 	
 	width: 76rpx;
 	height: 76rpx;
 }
 
+
 .my-column-cu-steps .cu-item::before,
 .my-column-cu-steps .cu-item::after {
 	content: "";
 	display: block;
 	position: absolute;
 	width: 0px;
-	height: calc(100% - 106rpx);
+	height: calc(100% - 146rpx);
 	border-left: 1px dashed #ccc;
-	top: calc(0px - (100% + 50rpx) / 2);
+	top: calc(20px - (100% + 50rpx) / 2);
 	left: 120rpx;
 	/* right: 0; */
 	/* margin: auto; */
@@ -4543,6 +4545,18 @@ scroll-view.cu-steps .cu-item {
 	align-items: center;
 }
 
+.position-absolute-right-top {
+	position: absolute;
+	right: 0;
+	top: 0;
+}
+
+.position-absolute-right-bottom {
+	position: absolute;
+	right: 0;
+	bottom: 0;
+}
+
 /* 100 - Thin
 200 - Extra Light (Ultra Light)
 300 - Light
@@ -4557,3 +4571,7 @@ scroll-view.cu-steps .cu-item {
 	font-weight: 400;
 }
 
+.text-medium {
+	font-size: 400;
+}
+

+ 28 - 0
util/util-js/store.js

@@ -39,11 +39,26 @@ const store = new Vuex.Store({
 		remainingDays: 0,
 		signature: '',
 		avatarUrl: "/static/defaultAvatar.png",
+
+		/**
+		 * 新手教程相关
+		 */
 		// 是否是新用户,
 		//TODO:登录接口返回的数据来判断
 		bNewUser: false,
 		//是否是第一次走新手
 		bNewGuide: false,
+		//解锁状态,和首次安装app相关
+		guideUnlockState: {
+			//是否首次安装
+			firstInstallation: true,
+			firstDisconnectBluetooth: true,
+			firstUnlockJumpUp: true,
+			firstUnlockLeftAndRightJump: true,
+			firstUnlockLeftAndRightRotationJump: true
+		},
+
+
 		token: '',
 		gender: 0,
 
@@ -481,6 +496,19 @@ const store = new Vuex.Store({
 			this.commit('onAccAndGyroConvertDataSave');
 		},
 
+		setGuideUnlockState(state, _guideUnlockState) {
+			uni.setStorageSync('guideUnlockState', _guideUnlockState);
+			state.guideUnlockState = _guideUnlockState;
+		},
+
+		getGuideUnlockState(state, _guideUnlockState) {
+			//如果存在本地任务
+			const value = uni.getStorageSync('guideUnlockState');
+			if (value) {
+				state.guideUnlockState = value;
+			}
+		},
+
 		/**
 		 * 设置当前操作的任务记录到本地
 		 * @param {Object} state

+ 136 - 66
util/util-js/verify.js

@@ -1,80 +1,150 @@
+
+function checkPassword(string){
+	//密码组合规则-6-16位数字和字符组合,不能纯数字、纯英文
+	// var filter = /^(?=.*[0-9\!@#\$%\^&\*])(?=.*[a-zA-Z]).{6,16}$/;
+	//不限制特殊字符种类 /^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{6,18}$/
+	// 6-18位字符,数字、字母、特殊字符-=_+,. ,必须两种及以上组合
+	var filter = /^(?![\d]+$)(?![a-zA-Z]+$)(?![-=+_.,]+$)[\da-zA-Z-=+_.,]{6,16}$/;
+	if (string == undefined) {
+		return false;
+	} else if (!filter.test(string)) {
+		return false;
+	} else {
+		return true;
+	}
+}
+
+
+function checkEMail(string) {
+
+	var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
+	if (string == undefined) {
+		return false;
+	} else if (!myreg.test(string)) {
+		return false;
+	} else {
+		return true;
+	}
+}
+
+
 function checkPhone(string) {
 
-  // var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/;
-  var myreg = /^(13[0-9]|14[5-9]|15[012356789]|166|17[0-8]|18[0-9]|19[8-9])[0-9]{8}$/;
-  if (string == undefined) {
-    return false;
-  } else if (string.length < 11) {
-    return false;
-  } else if (!myreg.test(string)) {
-    return false;
-  } else {
-    return true;
-  }
+	// var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/;
+	var myreg = /^(13[0-9]|14[5-9]|15[012356789]|166|17[0-8]|18[0-9]|19[8-9])[0-9]{8}$/;
+	if (string == undefined) {
+		return false;
+	} else if (string.length < 11) {
+		return false;
+	} else if (!myreg.test(string)) {
+		return false;
+	} else {
+		return true;
+	}
 }
 
 function checkRequired(string) {
-  if (string == undefined || string=='') {
-    return false;
-  } else {
-    return true;
-  }
+	if (string == undefined || string == '') {
+		return false;
+	} else {
+		return true;
+	}
 }
 
-function checkLength(num,length){
-  if (num < length) {
-    return false;
-  } else {
-    return true;
-  }
+function checkLength(num, length) {
+	if (num < length) {
+		return false;
+	} else {
+		return true;
+	}
 }
 
 function checkCardId(string) {
-  var code = string;
+	var code = string;
 
-  var city = { 11: "北京", 12: "天津", 13: "河北", 14: "山西", 15: "内蒙古", 21: "辽宁", 22: "吉林", 23: "黑龙江 ", 31: "上海", 32: "江苏", 33: "浙江", 34: "安徽", 35: "福建", 36: "江西", 37: "山东", 41: "河南", 42: "湖北 ", 43: "湖南", 44: "广东", 45: "广西", 46: "海南", 50: "重庆", 51: "四川", 52: "贵州", 53: "云南", 54: "西藏 ", 61: "陕西", 62: "甘肃", 63: "青海", 64: "宁夏", 65: "新疆", 71: "台湾", 81: "香港", 82: "澳门", 91: "国外 " };
-  var tip = "";
-  var pass = true;
-  var reg = /^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/;
-  if (!code || !code.match(reg)) {
-    tip = "身份证号格式错误";
-    pass = false;
-  } else if (!city[code.substr(0, 2)]) {
-    tip = "地址编码错误";
-    pass = false;
-  } else {
-    //18位身份证需要验证最后一位校验位
-    if (code.length == 18) {
-      code = code.split('');
-      //∑(ai×Wi)(mod 11)
-      //加权因子
-      var factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
-      //校验位
-      var parity = [1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2];
-      var sum = 0;
-      var ai = 0;
-      var wi = 0;
-      for (var i = 0; i < 17; i++) {
-        ai = code[i];
-        wi = factor[i];
-        sum += ai * wi;
-      }
-      var last = parity[sum % 11];
-      if (parity[sum % 11] != code[17]) {
-        tip = "校验位错误";
-        pass = false;
-      }
-    }
-  }
-  console.log(pass)
-  if (pass) { return true }
-  if (!pass) return false;
+	var city = {
+		11: "北京",
+		12: "天津",
+		13: "河北",
+		14: "山西",
+		15: "内蒙古",
+		21: "辽宁",
+		22: "吉林",
+		23: "黑龙江 ",
+		31: "上海",
+		32: "江苏",
+		33: "浙江",
+		34: "安徽",
+		35: "福建",
+		36: "江西",
+		37: "山东",
+		41: "河南",
+		42: "湖北 ",
+		43: "湖南",
+		44: "广东",
+		45: "广西",
+		46: "海南",
+		50: "重庆",
+		51: "四川",
+		52: "贵州",
+		53: "云南",
+		54: "西藏 ",
+		61: "陕西",
+		62: "甘肃",
+		63: "青海",
+		64: "宁夏",
+		65: "新疆",
+		71: "台湾",
+		81: "香港",
+		82: "澳门",
+		91: "国外 "
+	};
+	var tip = "";
+	var pass = true;
+	var reg = /^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/;
+	if (!code || !code.match(reg)) {
+		tip = "身份证号格式错误";
+		pass = false;
+	} else if (!city[code.substr(0, 2)]) {
+		tip = "地址编码错误";
+		pass = false;
+	} else {
+		//18位身份证需要验证最后一位校验位
+		if (code.length == 18) {
+			code = code.split('');
+			//∑(ai×Wi)(mod 11)
+			//加权因子
+			var factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
+			//校验位
+			var parity = [1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2];
+			var sum = 0;
+			var ai = 0;
+			var wi = 0;
+			for (var i = 0; i < 17; i++) {
+				ai = code[i];
+				wi = factor[i];
+				sum += ai * wi;
+			}
+			var last = parity[sum % 11];
+			if (parity[sum % 11] != code[17]) {
+				tip = "校验位错误";
+				pass = false;
+			}
+		}
+	}
+	console.log(pass)
+	if (pass) {
+		return true
+	}
+	if (!pass) return false;
 
 }
 
-export default{
-  checkPhone,
-  checkRequired,
-  checkCardId,
-  checkLength
-}
+export default {
+	checkPassword,
+	checkEMail,
+	checkPhone,
+	checkRequired,
+	checkCardId,
+	checkLength
+}