瀏覽代碼

commit -m 修改

zhengjinyi 4 年之前
父節點
當前提交
21037edf28

+ 26 - 25
App.vue

@@ -74,36 +74,37 @@ export default {
 	methods: {
 		async getWxAuthorize() {
 			const wechatCode = await authorize.getCode('weixin')
-			this.UserService.userInfoLogin({ code: wechatCode })
-				.then(response => {
-					this.login(response.data)
-					this.$store.commit('updateStatus', response.data)
-				})
-				.catch(error => {
-					uni.setStorage({
-						//缓存游客用户openid
-						key: 'openid',
-						data: error.data.openid
-					})
-					this.logout()
+			this.UserService.userInfoLogin({ 
+				code: wechatCode ,
+			})
+			.then(response => {
+				this.login(response.data)
+				this.$store.commit('updateStatus', response.data)
+			})
+			.catch(error => {
+				uni.setStorage({
+					//缓存游客用户openid
+					key: 'openid',
+					data: error.data.openid
 				})
+				this.logout()
+			})
 		},
 		refresh() {
 			let TIME = 20 * 60 * 1000
 			setInterval(() => {
-				authorize
-					.getSetting()
-					.then(res => {
-						// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-						if (res == 1) {
-							this.getWxAuthorize()
-						} else {
-							console.log('授权失败============>:' + '用户取消授权或者未操作')
-						}
-					})
-					.catch(error => {
-						console.log('授权失败============>:' + '用户授权失败,提醒用户重新授权')
-					})
+				authorize.getSetting()
+				.then(res => {
+					// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
+					if (res == 1) {
+						this.getWxAuthorize()
+					} else {
+						console.log('授权失败============>:' + '用户取消授权或者未操作')
+					}
+				})
+				.catch(error => {
+					console.log('授权失败============>:' + '用户授权失败,提醒用户重新授权')
+				})
 			}, TIME)
 		},
 		diffTime(t) {

+ 4 - 4
components/cm-module/headerNavbar/header-back.vue

@@ -111,13 +111,13 @@
 				}
 		    },
 		    _goHome: function () {
-		      	uni.switchTab({
-		        	url: '/pages/tabBar/home/index'
+		      	uni.navigateTo({
+		        	url: '/pages/index/index'
 		      	})
 		    },
 		    _goUser: function () {
-		      	uni.switchTab({
-		        	url: '/pages/tabBar/user/user'
+		      	uni.navigateTo({
+		        	url: '/pages/index/index'
 		      	})
 		    },
 			_goSearchPath:function () {

+ 2 - 2
components/cm-module/orderDetails/orderButton.vue

@@ -135,10 +135,10 @@
 				margin:22rpx 22rpx 22rpx 0;
 				line-height: 64rpx;
 				font-size:$font-size-26;
-				color: #666666;
+				color: #333333;
 				text-align: center;
 				float: right;
-				border: 2rpx solid #999999;
+				border: 2rpx solid #333333;
 				border-radius: 34rpx;
 				&.btn-payment{
 					line-height: 38rpx;

+ 2 - 2
components/cm-module/orderDetails/orderListButton.vue

@@ -129,11 +129,11 @@
 				margin: 22rpx 0 20rpx 20rpx;
 				line-height: 64rpx;
 				font-size:$font-size-26;
-				color: #999999;
+				color: #333333;
 				text-align: center;
 				float: right;
 				border-radius: 34rpx;
-				border: 2rpx solid #999999;
+				border: 2rpx solid #333333;
 				&.btn-payment{
 					line-height: 38rpx;
 					font-size: 24rpx;

+ 1 - 1
components/thorui/tui-modal/tui-modal.vue

@@ -247,7 +247,7 @@
 	}
 
 	.tui-danger {
-		background: #191919;
+		background: #191919 !important;
 		color: #fff;
 	}
 

+ 18 - 16
pages/index/index.vue

@@ -164,22 +164,24 @@ export default {
 		async GetWxAuthorize() {
 			// 获取微信code
 			const wechatCode = await authorize.getCode('weixin')
-			this.UserService.userInfoLogin({ code: wechatCode })
-				.then(res => {
-					// 登录成功  将信息保存在userInfo中 保存在本地和store
-					this.login(res.data)
-					this.organizeId = res.data.organizeId
-					this.getUserInfoPersonal(this.organizeId)
-					this.refresh = true
-					this.isRequest = true
-				})
-				.catch(err => {
-					// 缓存游客openid
-					uni.setStorageSync('openid', err.data.openid)
-					this.logout()
-					this.refresh = true
-					this.isRequest = true
-				})
+			this.UserService.userInfoLogin({ 
+				code: wechatCode ,
+			})
+			.then(res => {
+				// 登录成功  将信息保存在userInfo中 保存在本地和store
+				this.login(res.data)
+				this.organizeId = res.data.organizeId
+				this.getUserInfoPersonal(this.organizeId)
+				this.refresh = true
+				this.isRequest = true
+			})
+			.catch(err => {
+				// 缓存游客openid
+				uni.setStorageSync('openid', err.data.openid)
+				this.logout()
+				this.refresh = true
+				this.isRequest = true
+			})
 		},
 		//初始化个人中心数据
 		getUserInfoPersonal(organizeId) {

+ 19 - 21
pages/login/login.vue

@@ -58,29 +58,28 @@ export default {
 				success: res => {
 					this.isUserInfo = false
 					this.userInfo = res.userInfo
-					let params = {
+					// 验证邀请码
+					this.UserService.userInvitation({
 						invitationCode: this.invitationCode,
 						nickName: res.userInfo.nickName,
 						openid: uni.getStorageSync('openid')
-					}
-					// 验证邀请码
-					this.UserService.userInvitation(params)
-						.then(response => {
-							console.log(response)
-							// 保存用户信息
-							this.login(response.data)
-							this.$store.commit('updateStatus', response.data)
-							// 登录成功提示
-							this.$util.msg('登录成功', 1500, false, 'success')
-							setTimeout(() => {
-								this.$api.navigateTo(`/pages/index/index`)
-							}, 1500)
-						})
-						.catch(error => {
-							this.loginMessage = error.msg
-							this.isUserInfo = false
-							// this.$util.msg(error.msg, 2000)
-						})
+					})
+					.then(response => {
+						console.log(response)
+						// 保存用户信息
+						this.login(response.data)
+						this.$store.commit('updateStatus', response.data)
+						// 登录成功提示
+						this.$util.msg('登录成功', 1500, false, 'success')
+						setTimeout(() => {
+							this.$api.navigateTo(`/pages/index/index`)
+						}, 1500)
+					})
+					.catch(error => {
+						this.loginMessage = error.msg
+						this.isUserInfo = false
+						// this.$util.msg(error.msg, 2000)
+					})
 				}
 			})
 		},
@@ -148,7 +147,6 @@ export default {
 		background-color: #000;
 		border-radius: 45rpx;
 		color: #fff;
-		box-shadow: 4rpx 4rpx 40rpx rgba(0, 0, 0, 0.2);
 		margin-top: 40rpx;
 	}
 	.login-input {