Browse Source

1.修改邮箱登录。
2.添加邮箱绑定。
3.修改新手教程,修复对应bug。
4.添加设置里面新手指引操作

slambb 4 years ago
parent
commit
ff6e2ce54c

+ 15 - 4
App.vue

@@ -6,7 +6,9 @@
 	export default {
 
 		methods: {
-			...mapMutations(['onLuanchLogin', 'getBLEDeviceList', 'getFinalUseDevice','onAccAndGyroConvertDataGet','getGuideUnlockState']),
+			...mapMutations(['onLuanchLogin', 'getBLEDeviceList', 'getFinalUseDevice', 'onAccAndGyroConvertDataGet',
+				'getGuideUnlockState', 'setGuideUnlockState'
+			]),
 
 		},
 		onLaunch: function() {
@@ -53,10 +55,19 @@
 			//开始登陆
 			this.onLuanchLogin({});
 			// #endif
-			
-			
+
+
 			this.onAccAndGyroConvertDataGet();
-			
+
+
+			// this.setGuideUnlockState({
+			// 	//是否首次安装
+			// 	firstInstallation: true,
+			// 	firstDisconnectBluetooth: true,
+			// 	firstUnlockJumpUp: true,
+			// 	firstUnlockLeftAndRightJump: true,
+			// 	firstUnlockLeftAndRightRotationJump: true
+			// });
 			//获取guide任务的解锁状态
 			this.getGuideUnlockState();
 		},

+ 21 - 14
common/config.js

@@ -9,7 +9,7 @@ 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"
@@ -31,10 +31,17 @@ const URL = {
 	 * 新增 
 	 * 根据类型获取验证码,0:电话 和1:邮箱 
 	 */
-	GETCODEACCORDINGTYPE:`${host}/program/getCodeAccordingType`,
-	
-	//短信绑定手机号
+	GETCODEACCORDINGTYPE: `${host}/program/getCodeAccordingType`,
+
+	/**
+	 * 短信绑定手机号
+	 * @deprecated since version 2.4.10
+	 */
 	BINDPHONE: `${host}/program/SMS_bind_phone`,
+	//根据类型绑定手机号,0:电话 和1:邮箱 
+	BINDACCOUNT: `${host}/program/SMS_bind_account`,
+
+
 	// 解绑手机号
 	DELETEPHONE: `${host}/program/delete_phone`,
 	//绑定微信信息
@@ -48,8 +55,8 @@ const URL = {
 	 * 新增 
 	 * 根据类型使用密码登录,0:电话 和1:邮箱 
 	 */
-	LOGINPASSWORDBASEDONTHETYPE:`${host}/program/password_login_type`,
-	
+	LOGINPASSWORDBASEDONTHETYPE: `${host}/program/password_login_type`,
+
 	// 小程序用户登录
 	USERlOGINURL: `${host}/program/client_login`,
 	// 苹果用户登录
@@ -104,7 +111,7 @@ const URL = {
 	ADDFIRENDINFO: `${host}/user_info/friend_add`,
 	DELETEFIRENDINFO: `${host}/user_info/friend_delete`,
 	GETFRIENDLIST: `${host}/user_info/get_friend_list`,
-	
+
 	/**
 	 * 20210902
 	 * 用户签到相关部分
@@ -174,16 +181,16 @@ const URL = {
 	/**
 	 * 任务部分
 	 */
-	GETLEVELJUMPLIST: `${host}/level/getLevelJumpList`,//只获取levelJump列表,后续其他扩展新加
-	PASSTHELEVEL: `${host}/level/passTheLevel`,//通用处理过关操作
-	UNLOCKLEVEL: `${host}/level/unlockLevel`,//通用处理解锁关卡操作
-	
-	PKLEVELREWARD:`${host}/level/pkLevelReward`,//pk奖励
-	
+	GETLEVELJUMPLIST: `${host}/level/getLevelJumpList`, //只获取levelJump列表,后续其他扩展新加
+	PASSTHELEVEL: `${host}/level/passTheLevel`, //通用处理过关操作
+	UNLOCKLEVEL: `${host}/level/unlockLevel`, //通用处理解锁关卡操作
+
+	PKLEVELREWARD: `${host}/level/pkLevelReward`, //pk奖励
+
 	/**
 	 * 奖励,荣誉,金币,钻石等
 	 */
-	GETALLHONORS: `${host}/reward/getAllHonorList`,//获取全部荣誉
+	GETALLHONORS: `${host}/reward/getAllHonorList`, //获取全部荣誉
 
 	/**
 	 * fc 游戏接口

+ 3 - 3
components/modal/action-jump/action-jump.vue

@@ -315,12 +315,12 @@
 			//更新一次状态
 			const value = uni.getStorageSync('levelButtonPrompt');
 			if (value) {
-				_self.isSelected = value.isSelected;
+				_self.bTipLevel = !value.isSelected;
 			} else {
-				_self.isSelected = false;
+				_self.bTipLevel = true;
 			}
 
-			// console.log('==========>1 action jump currentMode:', this.currentMode);
+			// console.log('==========>levelButtonPrompt:', _self.bTipLevel);
 		},
 		methods: {
 			...mapMutations(['onWriteBLEConnectionValue', 'onConvertDeviceData']),

+ 2 - 2
manifest.json

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

+ 9 - 0
pages.json

@@ -296,6 +296,15 @@
             }
             
         }
+        ,{
+            "path" : "pages/platform-page/guide/guide-bluetoothConnect",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"subPackages": [{
 		"root": "pages/personal-page",

+ 96 - 38
pages/login-page/bindPhone/bindPhone.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="container">
 		<uni-nav-bar id="nav-bar" status-bar="true" @clickLeft="onBack" :title="pageTitle" color="#000000" fixed="true"
-		 :border="false">
+			:border="false">
 			<view slot="left">
 				<view class=" flex align-center margin-left">
 					<image class="p-left-arrow" src="../../../static/p-left-arrow.png"></image>
@@ -13,19 +13,23 @@
 
 		<!-- 手机端登录,获取验证码 -->
 		<view class="input-container" style="margin: 32px 102rpx 0 68rpx;">
-			<view class="make-text-bPurple text-bold margin-bottom" style="font-size: 20px;">绑定手机</view>
+			<view class="make-text-bPurple text-bold margin-bottom" style="font-size: 20px;">{{pageTitle}}</view>
 			<view class="input-row padding" style="width: 318px;">
-				<m-input type="number" maxlength="11" clearable  v-model="account" placeholder="请填写11位手机号码"></m-input>
+				<m-input :type="bBindPhone?'number':'string'" :maxlength="bBindPhone?'11':'32'" clearable
+					v-model="account" :placeholder="bBindPhone?'请填写11位手机号码':'请输入邮箱'"></m-input>
 			</view>
 		</view>
 		<view class="flex justify-between" style="margin: 32px  96rpx 0 68rpx; ">
 			<view class="text-22px make-text-bPurple">输入验证码</view>
-			<view v-if="bCodeDisabled" class="btn-code" style="background-color: rgb(0,0,0);opacity: 0.5;">重新获取({{count}})</view>
+			<view v-if="bCodeDisabled" class="btn-code" style="background-color: rgb(0,0,0);opacity: 0.5;">
+				重新获取({{count}})</view>
 			<view v-else class="btn-code" @tap="onGetCode">获取验证码</view>
 		</view>
 
 		<!-- 手机端登录 -->
-		<view class="text-16px text-gray" style="margin: 20px 0 0 96rpx;">已发送4位验证码...</view>
+		<view v-if="bCodeDisabled" class="text-16px text-gray" style="margin: 20px 0 0 96rpx;">已发送4位验证码至{{account}}
+		</view>
+		<view v-else class="text-16px text-gray" style="margin: 20px 0 0 96rpx;">获取验证码后输入下面方格...</view>
 
 		<view class="code-input-main">
 			<view class="inputLine">
@@ -79,29 +83,61 @@
 
 				pageTitle: "绑定手机",
 				bConfirm: false,
+				bBindPhone: true
 			}
 		},
 		computed: mapState(['bNewUser', 'forcedLogin', 'phoneNumber', 'bCodeDisabled', 'count']),
+		onLoad(option) {
+			if (option.type == 'phone') {
+				this.pageTitle = "绑定手机";
+				this.bBindPhone = true;
+			} else if (option.type == 'mailBox') {
+				this.pageTitle = "绑定邮箱";
+				this.bBindPhone = false;
+			}
+		},
 		methods: {
-			...mapMutations(['countDown','resetCountDown']),
+			...mapMutations(['countDown', 'resetCountDown']),
 			onBack() {
 				uni.navigateBack({
 					delta: 1
 				})
 			},
 			onGetCode() {
-				if (!verify.checkPhone(this.account)) {
-					uni.showToast({
-						icon: 'none',
-						title: '输入手机号错误'
-					});
-					return;
-				}
-				// this.$store.state.phoneNumber = this.account;
 				//置灰状态
 				if (this.bCodeDisabled) return;
-				//调用store 倒计时
-				this.countDown(this.account);
+				
+				if (this.bBindPhone) {
+					if (!verify.checkPhone(this.account)) {
+						uni.showToast({
+							icon: 'none',
+							title: '请输入正确手机号'
+						});
+						return;
+					}
+
+					//调用store 倒计时
+					this.countDown({
+						account: this.account,
+						type: 0
+					});
+				} else {
+					if (!verify.checkEMail(this.account)) {
+						uni.showToast({
+							icon: 'none',
+							title: '请输入正确邮箱号'
+						});
+						return;
+					}
+
+					//调用store 倒计时
+					this.countDown({
+						account: this.account,
+						type: 1
+					});
+				}
+
+
 
 			},
 			inputEvent(res) {
@@ -111,38 +147,53 @@
 			//注册
 			onConfirm() {
 				var _self = this;
-				if (!verify.checkPhone(_self.account)) {
-					uni.showToast({
-						icon: 'none',
-						title: '输入手机号错误'
-					});
-					return;
+
+				if (this.bBindPhone) {
+					if (!verify.checkPhone(this.account)) {
+						uni.showToast({
+							icon: 'none',
+							title: '请输入正确手机号'
+						});
+						return;
+					}
+				} else {
+					if (!verify.checkEMail(this.account)) {
+						uni.showToast({
+							icon: 'none',
+							title: '请输入正确邮箱号'
+						});
+						return;
+					}
 				}
 				if (_self.bConfirm) return;
-				
+
 				uni.showToast({
-					title:"",
-					icon:"loading",
-					mask:true,
-					duration:10000
+					title: "",
+					icon: "loading",
+					mask: true,
+					duration: 10000
 				})
 				_self.bConfirm = true;
-			
-				reqUtil.requestData(config.URL.BINDPHONE, {
-					"phoneNumber": _self.account,
+
+				reqUtil.requestData(config.URL.BINDACCOUNT, {
+					"account": _self.account,
+					"type": _self.bBindPhone ? 0 : 1,
 					"code": _self.inputCode
 				}).then(res => {
-						console.log('requestData BINDPHONE =====', res);
+						console.log('requestData BINDACCOUNT =====', res);
 						uni.hideToast();
 						_self.bConfirm = false;
 						if (res.code == 0) {
 							uni.showToast({
-								title: "绑定手机号成功",
+								title: _self.bBindPhone ? '绑定手机号成功!' : '绑定邮箱成功!',
 								mask: true,
 								duration: 1000
 							})
-							_self.$store.state.phoneNumber = _self.account;
-							
+							if (_self.bBindPhone)
+								_self.$store.state.phoneNumber = _self.account;
+							else
+								_self.$store.state.mailboxNumber = _self.account;
+
 							_self.resetCountDown();
 							// 绑定电话成功后,回退页面
 							uni.navigateBack({
@@ -151,21 +202,28 @@
 
 						} else if (res.code == 213) {
 							uni.showToast({
-								title: "手机号已使用过,请换个号码",
+								title: "手机号已使用过,请换个号码!",
+								mask: true,
+								icon: 'none',
+								duration: 3000
+							})
+						} else if (res.code == 216) {
+							uni.showToast({
+								title: "邮箱号已使用过,请换个邮箱!",
 								mask: true,
 								icon: 'none',
 								duration: 3000
 							})
 						} else {
 							uni.showToast({
-								title: "绑定失败",
+								title: "绑定失败",
 								mask: true,
 								icon: 'none',
 								duration: 1000
 							})
 						}
-						
-					
+
+
 					},
 					e => {
 						console.log(e);

+ 12 - 10
pages/login-page/login/login.vue

@@ -53,7 +53,7 @@
 				<view v-else-if="bGetCode">
 					<view class="input-container" style="margin: 32px 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"
@@ -108,7 +108,7 @@
 
 			</view>
 			<view v-if="bGetCode">
-				<view class="action-row-text " style="margin-top: 20rpx;">
+				<view class="action-row-text " style="margin-top: 30rpx;">
 					<view class="text-gray">登录即代表同意哔蹦</view>
 					<view class="text-bold text-decoration make-text-bPurple" @tap="onSwitchAgree('agreement')">用户协议
 					</view>
@@ -134,7 +134,7 @@
 								<view>通过微信注册</view>
 							</view>
 						</view>
-						<view v-if="appleOauth" class="btn-apple-confirm" @tap="onAppleReg">
+						<view  v-if="appleOauth" class="btn-apple-confirm" @tap="onAppleReg">
 							<image style="width: 48rpx;height: 48rpx;margin-right: 5px;"
 								src="../../../static/img/apple.png"></image>
 							<view>通过Apple注册</view>
@@ -230,7 +230,7 @@
 					if (_self.clientName.indexOf('iPad') > -1) {
 						_self.positionTop = headHeight + 390;
 					} else {
-						_self.positionTop = headHeight + 315;
+						_self.positionTop = headHeight + 378;
 					}
 					// let midView = uni.createSelectorQuery().in(this).select('#MidArea');
 					// midView.fields({
@@ -663,12 +663,12 @@
 				//调用store 倒计时
 				if (this.bMobileLogin) {
 					this.countDown({
-						count: this.phoneNumber,
+						account: this.phoneNumber,
 						type: 0
 					});
 				} else {
 					this.countDown({
-						count: this.mailboxNumber,
+						account: this.mailboxNumber,
 						type: 1
 					});
 				}
@@ -1022,15 +1022,17 @@
 	}
 
 	.btn-apple-confirm {
-		width: 636rpx;
-		height: 102rpx;
+		width: 380rpx;
+		height: 64rpx;
 		/* background-color: rgba(151, 151, 255, 1); */
 		border: 1px solid #000000;
-		border-radius: 10px;
+		
+		border-radius: 8px;
 		display: flex;
 		justify-content: center;
 		align-items: center;
-		font-size: 17px;
+		font-size: 12px;
+		font-weight: bold;
 		color: #000000;
 		margin-top: 7px;
 	}

+ 69 - 35
pages/my-page/userInfo/userInfo.vue

@@ -1,8 +1,8 @@
 <template>
 	<view>
 
-		<uni-nav-bar id="nav-bar" status-bar="true" @clickLeft="onBack()" :title="pageTitle" color="#000000" fixed="true"
-		 :border="false">
+		<uni-nav-bar id="nav-bar" status-bar="true" @clickLeft="onBack()" :title="pageTitle" color="#000000"
+			fixed="true" :border="false">
 			<view slot="left">
 				<view v-if="!bNewUser" class=" flex align-center margin-left">
 					<image class="p-left-arrow" src="../../../static/p-left-arrow.png"></image>
@@ -29,11 +29,13 @@
 					昵称
 				</view>
 
-				<input maxlength="8" placeholder="输入名字" :value="changeData.userName" @input="onInput('name',$event)"></input>
+				<input maxlength="8" placeholder="输入名字" :value="changeData.userName"
+					@input="onInput('name',$event)"></input>
 
 
 			</view>
-			<view class="item-group flex align-center" @tap="showModal" data-target="showPickerModal" data-type="gender">
+			<view class="item-group flex align-center" @tap="showModal" data-target="showPickerModal"
+				data-type="gender">
 				<view class="text-grey padding-sm margin-name text-width flex">性别
 					<view v-if="bNewUser" style="position: relative; width: 4px;">
 						<!-- <view class="cu-tag badge"></view> -->
@@ -41,7 +43,8 @@
 				</view>
 				<view class="text-bold">{{changeData.gender==0?'男':'女'}}</view>
 			</view>
-			<view class="item-group flex align-center" @tap="showModal" data-target="showPickerModal" data-type="birthday">
+			<view class="item-group flex align-center" @tap="showModal" data-target="showPickerModal"
+				data-type="birthday">
 				<view class="text-grey padding-sm margin-name text-width flex">生日
 					<view v-if="bNewUser" style="position: relative; width: 4px;">
 						<!-- <view class="cu-tag badge"></view> -->
@@ -61,8 +64,9 @@
 
 			<view class="flex justify-start  ">
 				<view class="text-grey padding-sm margin-name text-width flex-shrink">个性签名</view>
-				<textarea class="sign-text text-bold" maxlength="50" placeholder="在这里留下你的签名吧!" :value="changeData.signature!=='null'?changeData.signature:''"
-				 @input="onInput('signature',$event)"></textarea>
+				<textarea class="sign-text text-bold" maxlength="50" placeholder="在这里留下你的签名吧!"
+					:value="changeData.signature!=='null'?changeData.signature:''"
+					@input="onInput('signature',$event)"></textarea>
 			</view>
 		</view>
 		<view class="card-view margin-top ">
@@ -95,11 +99,11 @@
 					<view class="item-group">
 						<view class="text-grey padding-sm margin-name text-width flex">手机
 						</view>
-						<view class="text-bold">{{phoneNumber!==''?phoneNumber:'未绑定' }}</view>
+						<view class="text-bold text-cut" style="width: 220rpx;">{{phoneNumber!==''?phoneNumber:'未绑定' }}</view>
 					</view>
 
 				</view>
-				<view class="right-container" @tap="onBindPhone">
+				<view class="right-container" @tap="onBindType('phone')">
 					<image style="width: 48rpx;height: 48rpx;" src="/static/bindPhone.png"></image>
 					<text class="text-grey text-sm" style="margin: 0 24rpx;">{{phoneNumber!==''?'已绑定':'去绑定'}}</text>
 					<view class="only-arrow"></view>
@@ -108,6 +112,25 @@
 
 		</view>
 
+		<view class="card-view margin-top">
+			<view class="cu-item shadow padding-top-sm padding-bottom-sm flex justify-between">
+				<view class="content">
+					<view class="item-group">
+						<view class="text-grey padding-sm margin-name text-width flex">邮箱
+						</view>
+						<view class="text-bold text-cut" style="width: 220rpx;">{{mailboxNumber!==''?mailboxNumber:'未绑定' }}11111111111111111111</view>
+					</view>
+
+				</view>
+				<view class="right-container" @tap="onBindType('mailbox')">
+					<image style="width: 48rpx;height: 48rpx;" src="/static/bindPhone.png"></image>
+					<text class="text-grey text-sm" style="margin: 0 24rpx;">{{mailboxNumber!==''?'已绑定':'去绑定'}}</text>
+					<view class="only-arrow"></view>
+				</view>
+			</view>
+
+		</view>
+
 		<view v-if="bInstallWechat&&!bHideWeixin" class="card-view margin-top ">
 			<view class="cu-item  shadow padding-top-sm padding-bottom-sm flex justify-between">
 				<view class="content">
@@ -133,10 +156,11 @@
 			<view class="btn-confirm" @tap="onNavUser">保存</view>
 		</view>
 
-		<view class="cu-modal bottom-modal" :class="modalName=='showPickerModal'?'show':''" @touchmove.stop.prevent="moveHandle">
+		<view class="cu-modal bottom-modal" :class="modalName=='showPickerModal'?'show':''"
+			@touchmove.stop.prevent="moveHandle">
 			<view class="cu-dialog" style="border-top-right-radius: 20rpx; border-top-left-radius: 20rpx;">
-				<myPicker v-if="modalName == 'showPickerModal' ? true:false" :pickerObj="pickerObj" @confirmEvent="onConfirm"
-				 @cancelEvent="hideModal">
+				<myPicker v-if="modalName == 'showPickerModal' ? true:false" :pickerObj="pickerObj"
+					@confirmEvent="onConfirm" @cancelEvent="hideModal">
 				</myPicker>
 			</view>
 		</view>
@@ -144,7 +168,8 @@
 		<view class="cu-modal" :class="modalName=='showBindModal'?'show':''" @touchmove.stop.prevent="moveHandle">
 			<view class="cu-bind-modal">
 				<view style="position: absolute; top: 0; left: 0; width: 100%; height:100%;">
-					<image style="position: absolute;top: 0;left: 0; width: 100%;height: 100%;" src="../../../static/modelBg.png"></image>
+					<image style="position: absolute;top: 0;left: 0; width: 100%;height: 100%;"
+						src="../../../static/modelBg.png"></image>
 				</view>
 				<view class="flex flex-direction justify-between " style="position: relative; height: 100%;">
 					<view class="flex justify-around justify-center align-center" style="margin: 170rpx 30rpx 0 30rpx;">
@@ -154,10 +179,13 @@
 					</view>
 					<view class="text-16px">{{bindModal.content}}</view>
 
-					<view class="flex justify-around align-center" style=" border-top: 1rpx solid #EEEEEE; margin-bottom: 2px;">
-						<view class="flex justify-center align-center  text-16px" style="width: 100%;height: 123rpx;" @tap="hideModal">稍后再说</view>
+					<view class="flex justify-around align-center"
+						style=" border-top: 1rpx solid #EEEEEE; margin-bottom: 2px;">
+						<view class="flex justify-center align-center  text-16px" style="width: 100%;height: 123rpx;"
+							@tap="hideModal">稍后再说</view>
 						<view style="height: 123rpx;width: 1px;background-color: #EEEEEE;"></view>
-						<view class="flex justify-center align-center  text-16px" style="width: 100%;height: 123rpx;" @tap="hideBindModal">确定</view>
+						<view class="flex justify-center align-center  text-16px" style="width: 100%;height: 123rpx;"
+							@tap="hideBindModal">确定</view>
 					</view>
 				</view>
 
@@ -180,7 +208,7 @@
 	} from 'vuex'
 	export default {
 		computed: mapState(['bNewUser', 'height', 'weight', 'userName', 'avatarUrl', 'days', 'signature', "gender",
-			'birthday', 'city', 'phoneNumber', 'openid','bInstallWechat','bHideWeixin'
+			'birthday', 'city', 'phoneNumber', 'mailboxNumber', 'openid', 'bInstallWechat', 'bHideWeixin'
 		]),
 		components: {
 			myPicker
@@ -201,7 +229,7 @@
 				pickerObj,
 				bChoose: false,
 				// oldData: null,
-				changeData:null,
+				changeData: null,
 				//是否可以更新
 				bCanUpdate: false,
 
@@ -230,7 +258,7 @@
 			// 	"city":this.city,
 			// 	"sBirthday": date.formatDate(dateTemp)
 			// };
-			
+
 			this.changeData = {
 				'height': this.height,
 				'weight': this.weight,
@@ -240,7 +268,7 @@
 				"gender": this.gender,
 				"cityCode": this.city.cityCode,
 				'birthday': this.birthday,
-				"city":this.city,
+				"city": this.city,
 				"sBirthday": date.formatDate(dateTemp)
 			};
 
@@ -259,13 +287,13 @@
 					success: (res) => {
 						this.bChoose = true;
 						let size = res.tempFiles[0].size;
-						console.log('res:',res);
-						if(size<=10000000){
+						console.log('res:', res);
+						if (size <= 10000000) {
 							this.changeData.avatarUrl = res.tempFiles[0].path;
-						}else{
+						} else {
 							uni.showToast({
-								title:'上传的图片不能超过10M',
-								icon:'none',
+								title: '上传的图片不能超过10M',
+								icon: 'none',
 							})
 						}
 					}
@@ -304,7 +332,7 @@
 			//上传用户数据
 			onNavUser() {
 				let that = this;
-				
+
 				uni.showToast({
 					title: "",
 					icon: "loading",
@@ -323,7 +351,7 @@
 					"weight": this.changeData.weight,
 					"height": this.changeData.height,
 				}
-				console.log("更新时候的 data信息:",data);
+				console.log("更新时候的 data信息:", data);
 				//如果选择了图片,用图片接口更新数据
 				if (that.bChoose) {
 					reqUtil.reqUpload(config.URL.USERINFOADDAVATAR, data, that.changeData.avatarUrl).then(res => {
@@ -348,7 +376,7 @@
 										// 	url: "../../personal-page/personal/personal"
 										// })
 										uni.redirectTo({
-											url:'../firstPlan/firstPlan'
+											url: '../firstPlan/firstPlan'
 										})
 									} else {
 										uni.navigateBack({
@@ -405,7 +433,7 @@
 										// 	url: "../../personal-page/personal/personal"
 										// })
 										uni.redirectTo({
-											url:'../firstPlan/firstPlan'
+											url: '../firstPlan/firstPlan'
 										})
 									} else {
 										uni.navigateBack({
@@ -538,7 +566,7 @@
 			},
 
 
-			onBindPhone() {
+			onBindType(type) {
 				// //TODO 弹出解绑提示
 				// this.bindModal = {
 				// 	title: '解绑',
@@ -546,16 +574,22 @@
 				// 	type: "deletePhoneNumber"
 				// };
 				// this.modalName = "showBindModal";
-				if (!this.phoneNumber) {
-					uni.navigateTo({
-						url: "../../login-page/bindPhone/bindPhone"
-					})
-				} else {
+				if (type == 'phone' && this.phoneNumber) {
 					uni.showToast({
 						title: '已绑定手机',
 						icon: 'none',
 					})
+					return;
+				} else if (type == 'mailbox' && this.mailboxNumber) {
+					uni.showToast({
+						title: '已绑定邮箱',
+						icon: 'none',
+					})
+					return;
 				}
+				uni.navigateTo({
+					url: "../../login-page/bindPhone/bindPhone?type=" + type
+				})
 
 			},
 			onBindWeixin() {

+ 88 - 47
pages/personal-page/personal/personal.vue

@@ -268,8 +268,8 @@
 			<button @click="onGetBluetoothConnectView()">显示 bluetoothConnect</button>
 		</view>
  -->
-			
-		<!-- 	<view class="example">
+
+			<!-- 	<view class="example">
 				<button @click="showGuide('level-game-tip',{levelType:'rotationJump'})">显示 level-game-tip</button>
 			</view> -->
 			<!-- <view class="example">
@@ -550,8 +550,8 @@
 			updateData(newValue, oldValue, ownerInstance, instance) {
 				// newValue: 新数据
 				// oldValue: 老数据
-				// var log = console.log.bind(console);
-				// log(newValue)
+				var log = console.log.bind(console);
+				log(newValue)
 			}
 		}
 	}
@@ -999,6 +999,14 @@
 			// 		})
 			// 	}
 			// }
+
+			// #ifdef APP-PLUS
+			if (this.guideUnlockState.firstInstallation) {
+				// 根据onshow 去调用first显示。 由于 onShow生命周期比 onReady 快。所以此时没有 注册 onShowFirstInstallation
+				// 即 onShowFirstInstallation 是调用不到的
+				uni.$emit("onShowFirstInstallation");
+			}
+			// #endif
 		},
 		onReady() {
 			// 计算屏幕剩余高度  填补剩余高度
@@ -1007,25 +1015,18 @@
 				.systemInfo
 				.statusBarHeight;
 
+			console.log("personal onReady");
+
 			// #ifdef APP-PLUS
-			//制作一个新手引导,以nvue为主。
 			//第一步提示设置计划,之后在回调registerPopupEvent 中处理
+			//第一次安装登录。提示 计划,这里注册一次信息
+			uni.$on("onShowFirstInstallation", this.onShowFirstInstallation);
 			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);
+				// 如果新安装便触发一次,新手调用
+				uni.$emit("onShowFirstInstallation");
 			}
 
 			// #endif
-
-
-
 		},
 		onUnload() {
 			console.log("personal ********* onUnload *********");
@@ -1046,6 +1047,8 @@
 
 			this.unregisterPopupEvent();
 
+			uni.$off("onShowFirstInstallation", this.onShowFirstInstallation);
+
 		},
 		onHide() {
 			_self.bHide = true;
@@ -1794,6 +1797,7 @@
 						})
 						return;
 					}
+
 					//调用开始
 					this.onActionJumpPlay();
 				}
@@ -1974,6 +1978,40 @@
 						})
 						return;
 					}
+
+					let _item = this.currentJumpTask.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;
+					}
 				}
 
 				this.onStartCheck();
@@ -2918,30 +2956,6 @@
 			 */
 			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 
@@ -3120,8 +3134,16 @@
 						case 'button':
 							if (data.messageType == 'plan') {
 								if (data.confirm) {
-									//跳转提示蓝牙
-									this.onGetBluetoothConnectView();
+
+									//首次安装
+									if (data.hiddenType == 'firstInstallation') {
+										//跳转提示连接手柄蓝牙
+										setTimeout(() => {
+											this.onGetBluetoothConnectView({
+												hiddenType: 'firstInstallation'
+											});
+										}, 50)
+									}
 								}
 							} else if (data.messageType == 'bluetoothConnect') {
 								if (data.confirm) {
@@ -3130,10 +3152,13 @@
 									//首次安装
 									if (data.hiddenType == 'firstInstallation') {
 										setTimeout(() => {
-											this.showGuide('device-tip', {
+											// this.showGuide('device-tip', {
+											// 	hiddenType: 'firstInstallation'
+											// });
+											this.showGuide('level-button-tip', {
 												hiddenType: 'firstInstallation'
 											});
-										}, 30)
+										}, 50)
 									} else if (data.hiddenType == 'firstDisconnectBluetooth') {
 										this.fabClick();
 									}
@@ -3169,7 +3194,8 @@
 											isSelected: true
 										}
 									})
-									this.$refs.actionJumpRef.onUpdateTipLevelValue(true);
+									//如果选择不提示。则隐藏按钮
+									this.$refs.actionJumpRef.onUpdateTipLevelValue(false);
 
 								} else {
 									uni.setStorage({
@@ -3178,7 +3204,8 @@
 											isSelected: false
 										}
 									})
-									this.$refs.actionJumpRef.onUpdateTipLevelValue(false);
+									//如果选择提示。则显示按钮
+									this.$refs.actionJumpRef.onUpdateTipLevelValue(true);
 								}
 							} else if (data.messageType == 'device-tip') {
 								if (data.isSelected) {
@@ -3188,6 +3215,7 @@
 											isSelected: true
 										}
 									})
+									//todo 后续处理是否自动提示,true就不自动提示
 								} else {
 									uni.setStorage({
 										key: 'deviceDirectionPrompt',
@@ -3195,6 +3223,7 @@
 											isSelected: false
 										}
 									})
+									//todo 后续处理是否自动提示,false就自动提示
 								}
 							}
 							break;
@@ -3232,6 +3261,18 @@
 				// #ifdef H5
 				console.warn("不支持nvue");
 				// #endif
+			},
+
+			onShowFirstInstallation() {
+				//第一次安装登录。提示 计划
+				this.showGuide('plan', {
+					hiddenType: 'firstInstallation'
+				});
+				console.log("guideUnlockState 1=============:", this.guideUnlockState);
+				let guideUnlockState = Object.assign(this.guideUnlockState, {
+					firstInstallation: false
+				});
+				this.setGuideUnlockState(guideUnlockState);
 			}
 		}
 	};

+ 297 - 0
pages/platform-page/guide/guide-bluetoothConnect.vue

@@ -0,0 +1,297 @@
+<template>
+	<view>
+		<uni-nav-bar id="nav-bar" status-bar="true" @clickLeft="onBack()" @clickRight="onNavUpdateDevice()"
+			title="选择设备类型1" 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=" flex align-center " style="margin-right: 10rpx;">
+					<image style="width: 60rpx;height: 50rpx;" src="../../../static/devicesIconSimple/upgrade.png">
+					</image>
+				</view>
+			</view>
+		</uni-nav-bar>
+		<view class="card-view padding-top padding-bottom" :style="{'z-index': threeZIndex}"
+			v-for="(item,index) in devicesList" :key="index" :class="item.bRatio?'hardware-border':''"
+			:id="'task_'+index">
+			<view class="flex justify-between align-center">
+				<view class="flex justify-start align-center">
+					<image style="margin-left: 20rpx; width: 200rpx;height: 120rpx;" :src="item.icon" mode="aspectFit">
+					</image>
+					<view style="width: 350rpx;margin-left: 10rpx;">
+						<view style="margin: 20rpx 0rpx; font-weight: bold; font-size: 18px; color: #565656;">
+							{{item.cname}}
+						</view>
+						<view style="font-size: 12px; white-space:pre-wrap;" class="make-text-bPurple">{{item.describe}}
+						</view>
+					</view>
+
+				</view>
+				<!-- item.bRatio -->
+				<image style="margin-right: 60rpx; width: 60rpx;height: 60rpx;"
+					:src="threeZIndex == 1100?'/static/devicesOther/radio-b.png':'/static/devicesOther/radio-g.png'"
+					mode="aspectFit"></image>
+			</view>
+		</view>
+
+		<view class="position-absolute-center" style="z-index: 999; width: 750rpx;display: flex;">
+			<swiper class="swiper" :style="{height:currentHeight+'px'}" :circular="circular" :vertical="true"
+				@change="onSwiperChange">
+				<!-- 1 -->
+				<swiper-item class="flex justify-center align-center">
+					<view style="width: 590rpx; height: 626rpx;" class="position-relative">
+						<view class="bluetooth-guide-number" style="position: absolute;left: 94rpx;top: 8rpx;">1</view>
+						<image style="width: 590rpx; height: 626rpx;"
+							src="../../../static/guide/blutooth/guide-ble-1@2x.png">
+						</image>
+					</view>
+				
+				</swiper-item>
+				<!-- 2 -->
+				<swiper-item class="flex justify-center align-center flex-direction">
+				
+					<image style="width: 354rpx; height: 306rpx; margin-bottom: 28rpx;"
+						src="../../../static/guide/blutooth/guide-ble-device.png">
+					</image>
+					<view class="position-relative">
+						<image style="width: 520rpx; height:166rpx;" src="../../../static/guide/blutooth/boxMid@2x.png">
+						</image>
+						<view class="position-absolute-center text-regular"
+							style="width: 438rpx;height: 96rpx;top: 26rpx;">长按游戏设备开关3秒,设备灯连续闪烁为可连接状态</view>
+					</view>
+					<view class="bluetooth-guide-number" style="margin-top: 36rpx;">2</view>
+				</swiper-item>
+				<!-- 3 -->
+				<swiper-item class="flex justify-start align-center flex-direction">
+				
+					<view :style="{height:threeTipHeight+'px'}"></view>
+					<view class="flex justify-end">
+						<view class="bluetooth-guide-number" style="margin-top: 32rpx;">3</view>
+						<view class="position-relative">
+							<image style="width: 462rpx; height:206rpx;"
+								src="../../../static/guide/blutooth/boxRight@2x.png">
+							</image>
+							<view class="position-absolute-center text-regular"
+								style="width: 392rpx;height: 144rpx;top: 44rpx;">选择设备类型连接,按钮勾选上表示手柄连接成功。如果连接失败请重试</view>
+						</view>
+					</view>
+				
+				</swiper-item>
+				<!-- 4 -->
+				<swiper-item class="flex justify-center align-center flex-direction">
+				
+					<image style="width: 446rpx; height: 384rpx; margin-bottom: 28rpx;"
+						src="../../../static/guide/blutooth/guide-ble-bind.png">
+					</image>
+					<view class="position-relative">
+						<image style="width: 520rpx; height:166rpx;" src="../../../static/guide/blutooth/boxMid@2x.png">
+						</image>
+						<view class="position-absolute-center text-regular"
+							style="width: 438rpx;height: 96rpx;top: 26rpx;">请将手柄十字键朝上插入绑带中,用绑带将手柄朝上绑在右脚脚踝上</view>
+					</view>
+					<view class="bluetooth-guide-number" style="margin-top: 36rpx;">4</view>
+				</swiper-item>
+				<!-- 5 -->
+				<swiper-item class="flex justify-start align-center flex-direction">
+
+					<view :style="{height:threeTipHeight+'px'}"></view>
+					<view class="position-relative">
+						<image style="width: 520rpx; height:162rpx;"
+							src="../../../static/guide/blutooth/boxMid@2x.png">
+						</image>
+						<view class="position-absolute-center flex align-center justify-center"  style="width: 438rpx;top: 32rpx;">
+							<image style="width: 60rpx;height:60rpx;margin-right: 28rpx;" src="../../../static/guide/blutooth/guide-ble-finish@2x.png"></image>
+							<view class=" text-regular " style="width: 336rpx;height: 90rpx;">
+								您已绑定成功,返回主界面选择关卡开始游戏吧</view>
+					
+						</view>
+						
+					</view>
+					<button class="cu-btn make-bg-bPurple text-white " style="width: 520rpx; height:81rpx;margin-top: 100rpx;"  @click="onBack()">返回上一页</button>
+				</swiper-item>
+
+			</swiper>
+		</view>
+
+	</view>
+
+
+</template>
+
+<script>
+	import config from '@/common/config.js'
+	import reqUtil from '@/util/util-js/requstUtil.js';
+
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+
+	export default {
+		computed: mapState(['BLEInfoList', 'systemInfo']),
+		data() {
+			return {
+				devicesList: [],
+				circular: true,
+				videoList: [{
+						id: "video0",
+						src: "",
+						img: ""
+					},
+					{
+						id: "video1",
+						src: "",
+						img: ""
+					},
+					{
+						id: "video2",
+						src: "",
+						img: ""
+					}
+				],
+				videoDataList: [],
+				currentHeight: 0,
+				threeTipHeight: 0,
+				threeZIndex: 100,
+			}
+		},
+		onLoad(op) {
+
+			this.BLEInfoList.forEach((item, index, selfarr) => {
+				//item.deviceType == 'BLEHandle' || 
+				if (item.deviceType == 'BLERope') {
+					let item = Object.assign({}, selfarr[index]);
+					this.devicesList.push(item);
+				}
+			})
+
+			this.currentHeight = this.systemInfo.windowHeight;
+			// console.log(this.currentHeight);
+
+
+		},
+		onUnload() {
+
+		},
+		onShow() {
+
+		},
+		onReady() {
+			let view = uni.createSelectorQuery().select('#task_0');
+			view.boundingClientRect(data => {
+				// console.log('参数:' + JSON.stringify(data));
+				//13 是间隔
+				this.threeTipHeight = data.top + data.height + 13;
+			}).exec();
+		},
+		onHide() {},
+		methods: {
+			...mapMutations([]),
+
+			onBack() {
+				uni.navigateBack({
+					delta: 1
+				})
+			},
+			onNavUpdateDevice() {
+				uni.showToast({
+					title: '点击此处升级硬件',
+					icon: 'none'
+				})
+			},
+			onSwiperChange(e) {
+				let currentIndex = e.detail.current;
+				// console.log(currentIndex);
+				if (currentIndex === this._videoIndex) {
+					return;
+				}
+
+				if (currentIndex === 2) {
+					setTimeout(() => {
+						this.threeZIndex = 1100;
+					}, 200)
+				} else {
+					this.threeZIndex = 100;
+				}
+
+				// let isNext = false;
+				// if (currentIndex === 0 && this._videoIndex === this.videoList.length - 1) {
+				// 	isNext = true;
+				// } else if (currentIndex === this.videoList.length - 1 && this._videoIndex === 0) {
+				// 	isNext = false;
+				// } else if (currentIndex > this._videoIndex) {
+				// 	isNext = true;
+				// }
+
+				// if (isNext) {
+				// 	this._videoDataIndex++;
+				// } else {
+				// 	this._videoDataIndex--;
+				// }
+
+				// if (this._videoDataIndex < 0) {
+				// 	this._videoDataIndex = this.videoDataList.length - 1;
+				// } else if (this._videoDataIndex >= this.videoDataList.length) {
+				// 	this._videoDataIndex = 0;
+				// }
+
+				// this.circular = (this._videoDataIndex != 0);
+
+				// if (this._videoIndex >= 0) {
+				//     this._videoContextList[this._videoIndex].pause();
+				//     this._videoContextList[this._videoIndex].seek(0);
+				// }
+
+				// this._videoIndex = currentIndex;
+
+
+			},
+			onNavtoHome(){
+				uni.reLaunch({
+					url:'../../personal-page/personal/personal'
+				})
+			}
+		}
+
+	}
+</script>
+
+<style>
+	.hardware-border {
+		border: 1rpx solid #9898FF;
+		box-sizing: border-box;
+	}
+
+
+	.swiper {
+		flex: 1;
+		background-color: rgba(0, 0, 0, 0.32);
+	}
+
+	.swiper-item {
+		flex: 1;
+	}
+
+	.video {
+		flex: 1;
+		/* #ifndef APP-PLUS */
+		width: 100%;
+		/* #endif */
+	}
+
+	.bluetooth-guide-number {
+		border-radius: 18px;
+		border-width: 1rpx;
+		width: 30px;
+		height: 30px;
+		text-align: center;
+		line-height: 30px;
+		color: #000000;
+		/* border-color: #FFFFFF; */
+		background-color: #FFFFFF;
+		margin-right: 13px;
+	}
+</style>

+ 45 - 23
pages/platform-page/guide/guide.vue

@@ -22,26 +22,27 @@
 	import reqUtil from "@/util/util-js/requstUtil.js"
 	import config from "@/common/config.js"
 	import {
-		mapState
+		mapState,
+		mapMutations
 	} from 'vuex';
 	export default {
-		computed: mapState(['platform', 'gamePlatform']),
+		computed: mapState(['guideUnlockState']),
 		data() {
 			return {
 				list: [{
 						gameName: '新手指导',
-						navType: 'password'
+						navType: 'personalGuide'
 					}, {
 						gameName: '蓝牙连接指导',
-						navType: 'guide'
-					},
-					{
-						gameName: '游戏手柄校准指导',
-						navType: 'feedback'
+						navType: 'bluetoothConnect'
 					},
+					// {
+					// 	gameName: '游戏手柄校准指导',
+					// 	navType: 'feedback'
+					// },
 					{
 						gameName: '游戏指导',
-						navType: 'feedback'
+						navType: 'gameGuide'
 					}
 				],
 				title: "新手指导",
@@ -54,7 +55,7 @@
 
 		},
 		methods: {
-
+			...mapMutations(['setGuideUnlockState']),
 			onBack() {
 				uni.navigateBack({
 					delta: 1
@@ -65,22 +66,43 @@
 				console.log(item);
 				let url = '';
 				switch (item.navType) {
-					case 'password':
-						//todo 判断密码是否已经设置。如果没有,进入设置密码,如果已经设置了,进入修改密码;
-						break;
-					case 'guide':
-						break;
-					case 'feedback':
+					case 'personalGuide':
+						//跳回首页时候,重置新手教程
+						let guideUnlockState = Object.assign(this.guideUnlockState, {
+							//是否首次安装
+							firstInstallation: true,
+							// firstDisconnectBluetooth: true,
+							firstUnlockJumpUp: true,
+							firstUnlockLeftAndRightJump: true,
+							firstUnlockLeftAndRightRotationJump: true
+						});
+						this.setGuideUnlockState(guideUnlockState);
+						
+						uni.switchTab({
+							url: '../../personal-page/personal/personal',
+							success: res => {},
+							fail: () => {},
+							complete: () => {}
+						});
+						return;
+					case 'bluetoothConnect':
+						url = './guide-bluetoothConnect';
 						break;
+					case 'gameGuide':
+						uni.showToast({
+							title: '功能未实现',
+							icon: 'none'
+						})
+						return;
 				}
+				console.error(1111)
+				uni.navigateTo({
+					url: url,
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
 
-
-				// uni.navigateTo({
-				// 	url: url,
-				// 	success: res => {},
-				// 	fail: () => {},
-				// 	complete: () => {}
-				// });
 			}
 		}
 	}

+ 67 - 50
platform/app-plus/subNVue/drawer.nvue

@@ -77,9 +77,14 @@
 			// }
 		},
 		methods: {
-			...mapMutations(['loginUserInfo', 'onLuanchLogin', 'delectToken','showPopupById']),
-			hideDrawer() {
-				uni.getCurrentSubNVue().hide('auto')
+			...mapMutations(['loginUserInfo', 'onLuanchLogin', 'delectToken', 'showPopupById']),
+			hideDrawer(callback) {
+				uni.getCurrentSubNVue().hide('auto', 200);
+
+				setTimeout(() => {
+					if (callback)
+						callback();
+				}, 300)
 			},
 			clickitem(e, _pageType) {
 				// uni.$emit('drawer-page', e);
@@ -87,48 +92,51 @@
 			},
 			// 跳转编辑信息页面
 			onNavEditInfoPage() {
-				this.hideDrawer();
-				uni.navigateTo({
-					url: '../../my-page/userInfo/userInfo',
-					success: res => {},
-					fail: () => {},
-					complete: () => {}
+				this.hideDrawer(()=>{
+					uni.navigateTo({
+						url: '../../my-page/userInfo/userInfo',
+						success: res => {},
+						fail: () => {},
+						complete: () => {}
+					});
 				});
 			},
 			//侧边栏对应页面跳转
 			onNavListItem(pageType) {
-				this.hideDrawer();
-				// console.log(pageType);
-				if (pageType == "my") {
-					this.onNavMyPage();
-					return;
-				}
-				if(pageType == "signBoard")
-				{	
-					this.showPopupById({type:'signIn',item:null});
-					return;
-				}
-				let url = '';
-				switch (pageType) {
-					case "recently":
-					case "watchGame":
-						url = '/pages/personal-page/list/list?type=' + pageType;
-						break;
-					case "ranking":
-						url = '/pages/game-page/game-ranking/game-ranking';
-						break;
-					case "settings":
-						url = '/pages/platform-page/settings/settings';
-						break;
-					case "friend":
-						url = '/pages/friend-page/main/main';
-						break;
-				}
-				uni.navigateTo({
-					url: url,
-					success: res => {},
-					fail: () => {},
-					complete: () => {}
+				this.hideDrawer(()=>{
+					if (pageType == "my") {
+						this.onNavMyPage();
+						return;
+					}
+					if (pageType == "signBoard") {
+						this.showPopupById({
+							type: 'signIn',
+							item: null
+						});
+						return;
+					}
+					let url = '';
+					switch (pageType) {
+						case "recently":
+						case "watchGame":
+							url = '/pages/personal-page/list/list?type=' + pageType;
+							break;
+						case "ranking":
+							url = '/pages/game-page/game-ranking/game-ranking';
+							break;
+						case "settings":
+							url = '/pages/platform-page/settings/settings';
+							break;
+						case "friend":
+							url = '/pages/friend-page/main/main';
+							break;
+					}
+					uni.navigateTo({
+						url: url,
+						success: res => {},
+						fail: () => {},
+						complete: () => {}
+					});
 				});
 			},
 
@@ -136,16 +144,25 @@
 			 * 退出登录
 			 */
 			onExit() {
-				console.log("退出登录");
-				this.hideDrawer();
-				// 清除token,退回首页
-				this.delectToken({
-					success: (res) => {
-						uni.reLaunch({
-							url: '../../login-page/login/login'
-						})
-					}
+				uni.showToast({
+					title: '正在退出登录...',
+					icon: 'loading',
+					mask: true,
+					duration: 5000
+				})
+				this.hideDrawer(()=>{
+					// 清除token,退回首页
+					this.delectToken({
+						success: (res) => {
+							uni.hideToast();
+							uni.reLaunch({
+								url: '../../login-page/login/login'
+							})
+						}
+					});
 				});
+				
+
 			}
 		}
 	}

+ 8 - 13
platform/app-plus/subNVue/guide.nvue

@@ -73,7 +73,7 @@
 					</view>
 					<view class="position-absolute-center">
 						<text class="text-white text-14px text-lines2"
-							style="top: -30rpx;left:90rpx; width: 300rpx;">开始关卡前定制自己的卡路里,目标计划吧</text>
+							style="top: -30rpx;left:90rpx; width: 300rpx;">请先定制属于您的专属计划,好的开始是成功的一半。</text>
 					</view>
 				</view>
 				<view style="width: 750rpx;height: 120px;" class="flex flex-direction-row">
@@ -270,6 +270,7 @@
 			}
 		},
 		created() {
+			console.log('*********一个guide created')
 			const vm = this;
 			// for (let i = 1; i < 20; i++) {
 			// 	this.lists.push('item' + i);
@@ -279,29 +280,23 @@
 				vm.content = data.content;
 				vm.currentType = data.type;
 				vm.operationItem = data.operationItem;
-				// console.log(JSON.stringify(data),vm.currentType);
+				let _viewData = data.item;
+				//获取类型
+				vm.hiddenType = (_viewData && _viewData.hiddenType) || 'none';
+				console.log("vm.hiddenType:", vm.hiddenType);
 				if (vm.currentType == "actionJumpPlay") {
-					let _viewData = data.item;
-					// console.log(JSON.stringify(vm.systemInfo)); 
 					// _viewData.height/4 = 27.5
 					vm.guideHeight = _viewData.top + _viewData.height - _viewData.height / 4 - vm.systemInfo
 						.statusBarHeight - 275;
 				} else if (vm.currentType == "bluetoothConnect") {
-					let _viewData = data.item;
-					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) {
@@ -310,6 +305,7 @@
 						vm.isSelected = false;
 					}
 				} else if (vm.currentType == "device-tip") {
+					//提示绑带
 					const value = uni.getStorageSync('deviceDirectionPrompt');
 					if (value) {
 						vm.isSelected = value.isSelected;
@@ -317,7 +313,6 @@
 						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') {

BIN
static/guide/blutooth/boxMid@2x.png


BIN
static/guide/blutooth/boxRight@2x.png


BIN
static/guide/blutooth/guide-ble-1@2x.png


BIN
static/guide/blutooth/guide-ble-bind.png


BIN
static/guide/blutooth/guide-ble-device.png


BIN
static/guide/blutooth/guide-ble-finish@2x.png


+ 6 - 0
util/util-css/main.css

@@ -4551,6 +4551,12 @@ scroll-view.cu-steps .cu-item {
 	top: 0;
 }
 
+.position-absolute-left-top {
+	position: absolute;
+	left: 0;
+	top: 0;
+}
+
 .position-absolute-right-bottom {
 	position: absolute;
 	right: 0;

+ 4 - 3
util/util-js/store.js

@@ -507,6 +507,7 @@ const store = new Vuex.Store({
 			if (value) {
 				state.guideUnlockState = value;
 			}
+			console.log('获取guideUnlockState',state.guideUnlockState)
 		},
 
 		/**
@@ -924,7 +925,7 @@ const store = new Vuex.Store({
 		 */
 		countDown(state, context) {
 			let {
-				count,
+				account,
 				type
 			} = context;
 			//限制验证码操作
@@ -945,7 +946,7 @@ const store = new Vuex.Store({
 			}, 60000);
 			//GETCODE "phoneNumber": phoneNumber; GETCODEACCORDINGTYPE
 			reqUtil.requestData(config.URL.GETCODEACCORDINGTYPE, {
-				count,
+				account,
 				type
 			}).then(res => {
 					console.log('requestData GETCODE =====', res);
@@ -1251,7 +1252,7 @@ const store = new Vuex.Store({
 			let self = this;
 			// console.log("app登录或h5 初始化对应数据")
 			reqUtil.requestData(config.URL.USERINFOURL).then(res => {
-					console.log('获取用户数据:USERINFOURL =====', res);
+					console.warn('获取用户数据:USERINFOURL =====', res);
 					if (res.code == 0) {
 						let userInfo = res.data.userInfo;
 						state.phoneNumber = res.data.phoneNumber || '';