Browse Source

支付宝支付问题及样式跳转

DELL 3 years ago
parent
commit
42b82b5fcf

+ 106 - 104
src/components/auth/auth.vue

@@ -1,111 +1,113 @@
 <template>
-  <view>
-    <u-popup :show="authShow" mode="bottom">
-      <view class="auth-wrap">
-        <view class="tip">为了正常使用功能,请授权用户信息。</view>
-        <!-- #ifdef MP-ALIPAY -->
-        <button :loading="authIng" @click="getInfoAli()" type="default">授权</button>
-        <view style="height: 100rpx;"></view>
-        <!-- #endif -->
-        <!-- #ifndef MP-ALIPAY -->
-        <button :loading="authIng" @click="getInfo()" type="default">授权</button>
-        <!-- #endif -->
-      </view>
-    </u-popup>
-  </view>
+	<view>
+		<u-popup :show="authShow" mode="bottom">
+			<view class="auth-wrap">
+				<view class="tip">为了正常使用功能,请授权用户信息。</view>
+				<!-- #ifdef MP-ALIPAY -->
+				<button :loading="authIng" @click="getInfoAli()" type="default">授权</button>
+				<view style="height: 100rpx;"></view>
+				<!-- #endif -->
+				<!-- #ifndef MP-ALIPAY -->
+				<button :loading="authIng" @click="getInfo()" type="default">授权</button>
+				<!-- #endif -->
+			</view>
+		</u-popup>
+	</view>
 </template>
 
 <script>
-  import $http from '../../utils/request.js'
-  export default {
-    name: "auth",
-    props: {
-      authShow: {
-        type: Boolean,
-        default: true
-      },
-      authToken: {
-        type: String,
-        default: ''
-      },
-      authMobile: {
-        type: String,
-        default: ''
-      }
-    },
-    data() {
-      return {
-        authIng: false
-      };
-    },
-    methods: {
-      getInfo() {
-        let _this = this
-        if (this.authIng) {
-          return
-        }
-        _this.authIng = true
-        uni.getUserProfile({
-          desc: '用于填充用户默认信息',
-          success(info) {
-            uni.login({
-              success(res) {
-                $http.post('/api/v1/mp/user/wxauth', {
-                  ...{
-                    identity: 1,
-                    code: res.code
-                  },
-                  ...info.userInfo
-                }).then(res => {
-                  _this.authIng = false
-                  if (res.code === 0) {
-                    uni.$u.toast('授权成功');
-                    _this.authIng = false
-                    _this.$emit('close')
-                  }
-                }).catch(() => {
-                  _this.authIng = false
-                })
-              }
-            })
-          },
-          fail() {
-            _this.authIng = false
-          }
-        })
-      },
-      
-      
-      getInfoAli(){
-        let _this = this
-        if (this.authIng) {
-          return
-        }
-        _this.authIng = true
-        my.getAuthCode ({
-          scopes : ['auth_user'],
-          success: (res) => {
-            $http.post('/api/v1/mp/user/aliAuth', {code: res.authCode}).then(res => {
-              _this.authIng = false
-              if (res.code === 0) {
-                uni.$u.toast('授权成功');
-                _this.authIng = false
-                _this.$emit('close')
-              }
-            }).catch(() => {
-              _this.authIng = false
-            })
-          },
-		  fail: (res)=>{
-				uni.$u.toast('授权失败');
-				uni.removeStorageSync('token')
-				_this.authIng = false
-				_this.$emit('fail')
-		  }
-        })
-      }
-    }
-  }
+	import $http from '../../utils/request.js'
+	export default {
+		name: "auth",
+		props: {
+			authShow: {
+				type: Boolean,
+				default: true
+			},
+			authToken: {
+				type: String,
+				default: ''
+			},
+			authMobile: {
+				type: String,
+				default: ''
+			}
+		},
+		data() {
+			return {
+				authIng: false
+			};
+		},
+		methods: {
+			getInfo() {
+				let _this = this
+				if (this.authIng) {
+					return
+				}
+				_this.authIng = true
+				uni.getUserProfile({
+					desc: '用于填充用户默认信息',
+					success(info) {
+						uni.login({
+							success(res) {
+								$http.post('/api/v1/mp/user/wxauth', {
+									...{
+										identity: 1,
+										code: res.code
+									},
+									...info.userInfo
+								}).then(res => {
+									_this.authIng = false
+									if (res.code === 0) {
+										uni.$u.toast('授权成功');
+										_this.authIng = false
+										_this.$emit('close')
+									}
+								}).catch(() => {
+									_this.authIng = false
+								})
+							}
+						})
+					},
+					fail() {
+						_this.authIng = false
+					}
+				})
+			},
+
+
+			getInfoAli() {
+				let _this = this
+				if (this.authIng) {
+					return
+				}
+				_this.authIng = true
+				my.getAuthCode({
+					scopes: ['auth_user'],
+					success: (res) => {
+						$http.post('/api/v1/mp/user/aliAuth', {
+							code: res.authCode
+						}).then(res => {
+							_this.authIng = false
+							if (res.code === 0) {
+								uni.$u.toast('授权成功');
+								_this.authIng = false
+								_this.$emit('close')
+							}
+						}).catch(() => {
+							_this.authIng = false
+						})
+					},
+					fail: (res) => {
+						uni.$u.toast('授权失败');
+						uni.removeStorageSync('token')
+						_this.authIng = false
+						_this.$emit('fail')
+					}
+				})
+			}
+		}
+	}
 </script>
 
 <style lang="scss" scoped>

+ 5 - 3
src/components/pay-popup/pay-popup.vue

@@ -193,15 +193,17 @@
 									
 								} else if (ele.code == 1005) {
 									_this.authShow = true
+								} else if (ele.code == 1026) {
+									_this.authShow = true
 								} else {
 									payIng = false
 									_this.close()
-									uni.$u.toast('支付失败!');
+									uni.$u.toast('支付失败');
 								}
 							}).catch(() => {
 								payIng = false
 								_this.close()
-								uni.$u.toast('支付失败!');
+								uni.$u.toast('支付异常');
 							})
 						} else {
 							uni.showToast({
@@ -223,7 +225,7 @@
 				}).catch(() => {
 					uni.hideLoading();
 					payIng = false
-					uni.$u.toast('支付失败!');
+					uni.$u.toast('订单创建失败');
 				})
 			},
 

+ 1 - 0
src/packageGoods/goods/list.vue

@@ -193,6 +193,7 @@
 			border-radius: 34px;
 			padding-left: 24rpx;
 			margin-bottom: 32rpx;
+			padding-right: 30rpx;
 		}
 		
 		// 选择

+ 4 - 2
src/packageGoods/order/detail.vue

@@ -257,13 +257,15 @@
 						// #endif
 					} else if (ele.code == 1005) {
 						_this.authShow = true
+					} else if (ele.code == 1026) {
+						_this.authShow = true
 					} else {
 						payIng = false
-						uni.$u.toast('支付失败!');
+						uni.$u.toast(res.msg);
 					}
 				}).catch(() => {
 					payIng = false
-					uni.$u.toast('支付失败!');
+					uni.$u.toast('支付失败');
 					uni.hideLoading();
 				})
 			},

+ 4 - 2
src/packageGoods/order/index.vue

@@ -234,13 +234,15 @@
 						// #endif
 					} else if (ele.code == 1005) {
 						_this.authShow = true
+					} else if (ele.code == 1026) {
+						_this.authShow = true
 					} else {
 						payIng = false
-						uni.$u.toast('支付失败!');
+						uni.$u.toast(res.msg);
 					}
 				}).catch(() => {
 					payIng = false
-					uni.$u.toast('支付失败!');
+					uni.$u.toast('订单创建失败');
 					uni.hideLoading();
 				})
 			},

+ 6 - 4
src/packageGoods/order/settlement.vue

@@ -273,9 +273,11 @@
 									
 								} else if (ele.code == 1005) {
 									_this.authShow = true
+								} else if (ele.code == 1026) {
+									_this.authShow = true
 								} else {
 									payIng = false
-									uni.$u.toast('支付失败!');
+									uni.$u.toast('支付失败');
 									setTimeout(() => {
 										uni.redirectTo({
 											url: `/packageGoods/order/index`
@@ -284,7 +286,7 @@
 								}
 							}).catch(() => {
 								payIng = false
-								uni.$u.toast('支付失败!');
+								uni.$u.toast('支付异常');
 								setTimeout(() => {
 									uni.redirectTo({
 										url: `/packageGoods/order/index`
@@ -305,11 +307,11 @@
 						}
 					} else {
 						payIng = false
-						uni.$u.toast('提交失败!');
+						uni.$u.toast(res.msg);
 					}
 				}).catch(() => {
 					payIng = false
-					uni.$u.toast('提交失败!');
+					uni.$u.toast('订单创建失败');
 					uni.hideLoading();
 				})
 			},

+ 5 - 0
src/packageOther/about/index.vue

@@ -10,7 +10,12 @@
 		<view class="about">
 			<view class="flex about-logo">
 				<image src="../../static/public/logo.png" mode="scaleToFill"></image>
+				<!-- #ifndef MP-ALIPAY -->
 				<view class="edition">v 2.1.9</view>
+				<!-- #endif -->
+				<!-- #ifdef MP-ALIPAY -->
+				<view class="edition">v 2.1.11</view>
+				<!-- #endif -->
 			</view>
 			<view class="about-action">
 				<u-cell-group :border="false">

+ 4 - 4
src/pages/activity/index.vue

@@ -263,11 +263,11 @@
 						}
 
 						.timetwo {
-							width: 425rpx;
+							width: 420rpx;
 							background: rgba(249, 130, 44, 0.08);
 							margin-top: 10rpx;
 							border: 2rpx solid #F9822C;
-							font-size: 26rpx;
+							font-size: 24rpx;
 							border-radius: 6rpx;
 							color: #F9822C;
 							padding: 0 15rpx;
@@ -281,7 +281,7 @@
 						.details-button {
 							width: 200rpx;
 							height: 72rpx;
-							line-height: 72rpx;
+							line-height: 70rpx;
 							background-color: #F9822C;
 							color: #fff;
 							margin-top: 30rpx;
@@ -292,7 +292,7 @@
 						.details-buttonTwo {
 							width: 200rpx;
 							height: 72rpx;
-							line-height: 72rpx;
+							line-height: 70rpx;
 							background-color: #BBBBBB;
 							color: #fff;
 							margin-top: 30rpx;

+ 1 - 0
src/pages/core/index.vue

@@ -561,6 +561,7 @@
 			padding-left: 30rpx;
 			background: #F4F5F6;
 			border-radius: 35rpx;
+			padding-right: 30rpx;
 			
 			&__btn {
 				z-index: 200;

+ 2 - 2
src/pages/index/index.vue

@@ -89,8 +89,8 @@
 					<swiper class="ticket-title-swiper flex" :duration="0" :current="ticketTitleIndex"
 						previous-margin="110px" next-margin="110px" :autoplay="false" :circular="true"
 						@change="changeTicketTitle">
-						<swiper-item v-for="(item, index) in ticketList" :key="index" @click="clickTicketTitle(index)">
-							<view class="ticket-title-swiper-item flex"
+						<swiper-item v-for="(item, index) in ticketList" :key="index">
+							<view class="ticket-title-swiper-item flex" @click="clickTicketTitle(index)"
 								:class="{ 'action': ticketTitleIndex == index }">
 								<text>{{ item.title }}</text>
 							</view>

+ 178 - 177
src/pages/login/code.vue

@@ -1,179 +1,180 @@
 <template>
-  <view class="container">
-    <!-- #ifdef MP-ALIPAY -->
-    <u-navbar title="手机验证码登录" :border="true" :placeholder="true" :autoBack="true" leftIconSize="0" />
-    <!-- #endif -->
-    <!-- #ifndef MP-ALIPAY -->
-    <u-navbar title="手机验证码登录" :border="true" :placeholder="true" :autoBack="true" />
-    <!-- #endif -->
-    <view class="container">
-      <view class="login">
-        <view class="login-title">验证码登录</view>
-        <view class="login-input pat">
-          <u-input placeholder="请输入手机号" type="number" v-model="mobile" border="none" clearable @blur="changeNumber"/>
-        </view>
-        <view class="login-input">
-          <u-input placeholder="请输入短信验证码" type="number" v-model="code" clearable  @blur="changeCode">
-            <template slot="suffix">
-              <u-code ref="uCode" @change="codeChange" seconds="60" changeText="Xs"></u-code>
-              <u-button @click="getCode" :text="tips" type="default" size="mini"></u-button>
-            </template>
-          </u-input>
-        </view>
-        <u-button @click="login" text="登录" shape="circle" :loading="loading"></u-button>
-      </view>
-    </view>
-    <auth :auth-show="authShow" @close="authClose" />
-  </view>
+	<view class="container">
+		<!-- #ifdef MP-ALIPAY -->
+		<u-navbar title="手机验证码登录" :border="true" :placeholder="true" :autoBack="true" leftIconSize="0" />
+		<!-- #endif -->
+		<!-- #ifndef MP-ALIPAY -->
+		<u-navbar title="手机验证码登录" :border="true" :placeholder="true" :autoBack="true" />
+		<!-- #endif -->
+		<view class="container">
+			<view class="login">
+				<view class="login-title">验证码登录</view>
+				<view class="login-input pat">
+					<u-input placeholder="请输入手机号" type="number" v-model="mobile" border="none" clearable
+						@blur="changeNumber" />
+				</view>
+				<view class="login-input">
+					<u-input placeholder="请输入短信验证码" type="number" v-model="code" clearable @blur="changeCode">
+						<template slot="suffix">
+							<u-code ref="uCode" @change="codeChange" seconds="60" changeText="Xs"></u-code>
+							<u-button @click="getCode" :text="tips" type="default" size="mini"></u-button>
+						</template>
+					</u-input>
+				</view>
+				<u-button @click="login" text="登录" shape="circle" :loading="loading"></u-button>
+			</view>
+		</view>
+		<auth :auth-show="authShow" @close="authClose" />
+	</view>
 </template>
 
 <script>
-  import $http from '@/utils/request.js'
-  import Auth from '../../components/auth/auth.vue'
-  export default {
-    components: {
-      Auth
-    },
-    data() {
-      return {
-        loading: false,
-        mobile: '',
-        codeId: '',
-        code: '',
-        tips: '',
-        authShow: false,
-      };
-    },
-    methods: {
-      codeChange(text) {
-        this.tips = text;
-      },
-      
-      getCode() {
-        const rule = /^[1][0-9][0-9]{9}$/
-        if (!this.mobile) {
-          uni.$u.toast('请输入手机号');
-          return
-        }
-        if (!rule.test(this.mobile)) {
-          uni.$u.toast('请输入正确的手机号');
-          return
-        }
-        if (this.$refs.uCode.canGetCode) {
-          
-          // 这里此提示会被this.start()方法中的提示覆盖
-          uni.$u.toast('验证码已发送');
-          // 通知验证码组件内部开始倒计时
-          this.$refs.uCode.start();
-          $http.post('/api/v1/mp/sms/sendSmsCode', {
-            mobile: this.mobile,
-            noToken: true
-          }).then(res => {
-            if (res.code === 0 && res.data) {
-              this.codeId = res.data
-            }
-          })
-        } else {
-          uni.$u.toast('倒计时结束后再发送');
-        }
-      },
-
-      changeNumber(e) {
-        this.mobile = e
-      },
-      changeCode(e) {
-        this.code = e
-      },
-      
-      login() {
-        let _this = this
-        if (!_this.mobile) {
-          uni.$u.toast('请输入手机号');
-          return
-        }
-        const rule = /^[1][0-9][0-9]{9}$/
-        if (!rule.test(_this.mobile)) {
-          uni.$u.toast('请输入正确的手机号');
-          return
-        }
-        if (!_this.code) {
-          uni.$u.toast('请输入验证码');
-          return
-        }
-        _this.loading = true
-        $http.post('/auth/mobile', {
-          mobile: _this.mobile,
-          messageId: _this.codeId,
-          code: _this.code,
-          identity: 1,
-          noToken: true
-        }).then(res => {
-          _this.loading = false
-          if (res.code === 0 && res.token) {
-            // #ifdef MP-WEIXIN || MP-ALIPAY
-            uni.setStorageSync('token', res.token)
-            _this.getBaseInfo()
-            // #endif
-            // #ifdef H5 
-            uni.$u.toast('登录成功');
-            uni.setStorageSync('token', res.token)
-            setTimeout(() => {
-              uni.navigateBack({
-                delta: 2
-              })
-            }, 500)
-            // #endif
-          }
-        }).catch(() => {
-          _this.loading = false
-        })
-      },
-      
-      getBaseInfo() {
-        $http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
-          uni.hideLoading();
-          if (res.code == 0) {
-            uni.setStorageSync('userInfo', res.data)
-            // #ifdef MP-ALIPAY
-            if (res.data.aliuserId) {
-              uni.$u.toast('登录成功');
-              setTimeout(() => {
-                uni.navigateBack({
-                  delta: 2
-                })
-              }, 500)
-            } else {
-              this.authShow = true
-            }
-            // #endif
-            // #ifndef MP-ALIPAY
-            if (res.data.openId) {
-              uni.$u.toast('登录成功');
-              setTimeout(() => {
-                uni.navigateBack({
-                  delta: 2
-                })
-              }, 500)
-            } else {
-              this.authShow = true
-            }
-            // #endif
-          }
-        }).catch(() => {
-          uni.hideLoading();
-        })
-      },
-      
-      authClose() {
-        this.authShow = false
-        setTimeout(() => {
-          uni.navigateBack({
-            delta: 2
-          })
-        }, 500)
-      },
-    }
-  }
+	import $http from '@/utils/request.js'
+	import Auth from '../../components/auth/auth.vue'
+	export default {
+		components: {
+			Auth
+		},
+		data() {
+			return {
+				loading: false,
+				mobile: '',
+				codeId: '',
+				code: '',
+				tips: '',
+				authShow: false,
+			};
+		},
+		methods: {
+			codeChange(text) {
+				this.tips = text;
+			},
+
+			getCode() {
+				const rule = /^[1][0-9][0-9]{9}$/
+				if (!this.mobile) {
+					uni.$u.toast('请输入手机号');
+					return
+				}
+				if (!rule.test(this.mobile)) {
+					uni.$u.toast('请输入正确的手机号');
+					return
+				}
+				if (this.$refs.uCode.canGetCode) {
+
+					// 这里此提示会被this.start()方法中的提示覆盖
+					uni.$u.toast('验证码已发送');
+					// 通知验证码组件内部开始倒计时
+					this.$refs.uCode.start();
+					$http.post('/api/v1/mp/sms/sendSmsCode', {
+						mobile: this.mobile,
+						noToken: true
+					}).then(res => {
+						if (res.code === 0 && res.data) {
+							this.codeId = res.data
+						}
+					})
+				} else {
+					uni.$u.toast('倒计时结束后再发送');
+				}
+			},
+
+			changeNumber(e) {
+				this.mobile = e
+			},
+			changeCode(e) {
+				this.code = e
+			},
+
+			login() {
+				let _this = this
+				if (!_this.mobile) {
+					uni.$u.toast('请输入手机号');
+					return
+				}
+				const rule = /^[1][0-9][0-9]{9}$/
+				if (!rule.test(_this.mobile)) {
+					uni.$u.toast('请输入正确的手机号');
+					return
+				}
+				if (!_this.code) {
+					uni.$u.toast('请输入验证码');
+					return
+				}
+				_this.loading = true
+				$http.post('/auth/mobile', {
+					mobile: _this.mobile,
+					messageId: _this.codeId,
+					code: _this.code,
+					identity: 1,
+					noToken: true
+				}).then(res => {
+					_this.loading = false
+					if (res.code === 0 && res.token) {
+						// #ifdef MP-WEIXIN || MP-ALIPAY
+						uni.setStorageSync('token', res.token)
+						_this.getBaseInfo()
+						// #endif
+						// #ifdef H5 
+						uni.$u.toast('登录成功');
+						uni.setStorageSync('token', res.token)
+						setTimeout(() => {
+							uni.navigateBack({
+								delta: 2
+							})
+						}, 500)
+						// #endif
+					}
+				}).catch(() => {
+					_this.loading = false
+				})
+			},
+
+			getBaseInfo() {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						uni.setStorageSync('userInfo', res.data)
+						// #ifdef MP-ALIPAY
+						if (res.data.aliuserId) {
+							uni.$u.toast('登录成功');
+							setTimeout(() => {
+								uni.navigateBack({
+									delta: 2
+								})
+							}, 500)
+						} else {
+							this.authShow = true
+						}
+						// #endif
+						// #ifndef MP-ALIPAY
+						if (res.data.openId) {
+							uni.$u.toast('登录成功');
+							setTimeout(() => {
+								uni.navigateBack({
+									delta: 2
+								})
+							}, 500)
+						} else {
+							this.authShow = true
+						}
+						// #endif
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+
+			authClose() {
+				this.authShow = false
+				setTimeout(() => {
+					uni.navigateBack({
+						delta: 2
+					})
+				}, 500)
+			},
+		}
+	}
 </script>
 
 <style lang="scss" scoped>
@@ -182,7 +183,7 @@
 		width: 100%;
 		overflow: hidden;
 	}
-	
+
 	.login {
 		padding: 70rpx 70rpx 0;
 
@@ -210,8 +211,8 @@
 				border: none;
 			}
 		}
-		
-		.pat{
+
+		.pat {
 			padding: 10rpx 66rpx;
 		}
 
@@ -221,8 +222,8 @@
 			color: #fff;
 			border-radius: 32px;
 		}
-		
-		::v-deep .u-button--success{
+
+		::v-deep .u-button--success {
 			background-color: none;
 		}
 	}

+ 225 - 225
src/pages/login/index.vue

@@ -1,239 +1,239 @@
 <template>
-  <view class="container">
-    <!-- #ifdef MP-ALIPAY -->
-    <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" title="登录" leftIconSize="0"></u-navbar>    
-    <!-- #endif -->
-    
-    <!-- #ifndef MP-ALIPAY -->
-    <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" title="登录"></u-navbar>    
-    <!-- #endif -->
+	<view class="container">
+		<!-- #ifdef MP-ALIPAY -->
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" title="登录" leftIconSize="0"></u-navbar>
+		<!-- #endif -->
 
-    <view class="flex login">
-      <view class="flex login-image">
-        <image src="../../static/public/logo.png" mode="scaleToFill"></image>
-        <view class="login-image-txt">盲票</view>
-      </view>
-      <!-- #ifdef MP-ALIPAY -->
-      <view class="login-btn">
-      <button open-type="getAuthorize" @getAuthorize="onGetAuthorize" @error="onAuthError" scope='phoneNumber'>支付宝登录</button>
-      </view>
-      <!-- #endif -->
-      <!-- #ifndef MP-ALIPAY -->
-      <view class="login-btn">
-        <button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-if="checked">微信登录</button>
-        <button @click="getPhoneNumber" v-else>微信登录</button>
-      </view>
-      <!-- #endif -->
-      <view class="flex login-code" @click="toCode">手机号登录/注册</view>
-    </view>
+		<!-- #ifndef MP-ALIPAY -->
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" title="登录"></u-navbar>
+		<!-- #endif -->
 
-    <view class="footer-fixed">
-      <view class="flex about">
-        <view class="checked">
-          <u-checkbox-group>
-            <u-checkbox :value="checked" :checked="checked" size="20" shape="circle" activeColor="#E96737"
-              @change="changeChecked"></u-checkbox>
-          </u-checkbox-group>
-        </view>
-        <view class="txt">登录代表您已同意</view>
-        <navigator hover-class="none" class="txt-about" url="/packageOther/about/protect">《用户使用协议》</navigator>
-        <navigator hover-class="none" class="txt-about" url="/packageOther/about/conceal">、《隐私保护声明》</navigator>
-      </view>
-    </view>
+		<view class="flex login">
+			<view class="flex login-image">
+				<image src="../../static/public/logo.png" mode="scaleToFill"></image>
+				<view class="login-image-txt">盲票</view>
+			</view>
+			<!-- #ifdef MP-ALIPAY -->
+			<view class="login-btn">
+				<button open-type="getAuthorize" @getAuthorize="onGetAuthorize" scope='phoneNumber'>支付宝登录</button>
+			</view>
+			<!-- #endif -->
+			<!-- #ifndef MP-ALIPAY -->
+			<view class="login-btn">
+				<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-if="checked">微信登录</button>
+				<button @click="getPhoneNumber" v-else>微信登录</button>
+			</view>
+			<!-- #endif -->
+			<view class="flex login-code" @click="toCode">手机号登录/注册</view>
+		</view>
 
-    <auth :auth-show="authShow" :auth-token="token" @close="authClose" @fail="fail" />
-  </view>
+		<view class="footer-fixed">
+			<view class="flex about">
+				<view class="checked">
+					<u-checkbox-group>
+						<u-checkbox :value="checked" :checked="checked" size="20" shape="circle" activeColor="#E96737"
+							@change="changeChecked"></u-checkbox>
+					</u-checkbox-group>
+				</view>
+				<view class="txt">登录代表您已同意</view>
+				<navigator hover-class="none" class="txt-about" url="/packageOther/about/protect">《用户使用协议》</navigator>
+				<navigator hover-class="none" class="txt-about" url="/packageOther/about/conceal">、《隐私保护声明》</navigator>
+			</view>
+		</view>
+
+		<auth :auth-show="authShow" :auth-token="token" @close="authClose" @fail="fail" />
+	</view>
 </template>
 
 <script>
-  import $http from '@/utils/request.js'
-  import log from '@/common/log.js'
-  import Auth from '../../components/auth/auth.vue'
-  export default {
-    components: {
-      Auth
-    },
-    data() {
-      return {
-        authShow: false,
-        token: '',
-        checked: true,
-      };
-    },
-    methods: {
-      getPhoneNumber(e) {
-        let _this = this
-        if (!_this.checked) {
-          uni.$u.toast('请阅读并勾选底部协议');
-          return
-        }
-        if (e.detail.errMsg == 'getPhoneNumber:ok') {
-          uni.showLoading({
-            title: '登录中'
-          });
-          if (e.detail & e.detail.code) {
-            $http.post('/api/v1/mp/user/wxauth/mobile', {
-              ...e.detail,
-              identity: 1,
-              noToken: true
-            }).then(res => {
-              uni.hideLoading();
-              if (res.code == 0) {
-                uni.setStorageSync('token', res.token)
-                _this.getBaseInfo()
-              } else {
-                uni.getSystemInfo({
-                  success(res) {
-                    log.info(
-                      `错误信息:===基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system }.===`
-                    )
-                  }
-                })
-              }
-            }).catch(() => {
-              uni.hideLoading();
-              uni.getSystemInfo({
-                success(res) {
-                  log.info(
-                    `错误信息:===基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system }.===`
-                  )
-                }
-              })
-            })
-          } else {
-            uni.login({
-              success(res) {
-                $http.post('/api/v1/mp/user/wxauth/mobile', {
-                  ...e.detail,
-                  loginCode: res.code,
-                  identity: 1,
-                  noToken: true
-                }).then(res => {
-                  uni.hideLoading();
-                  if (res.code == 0) {
-                    uni.setStorageSync('token', res.token)
-                    _this.getBaseInfo()
-                  } else {
-                    uni.getSystemInfo({
-                      success(res) {
-                        log.info(
-                          `错误信息:===基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system }.===`
-                        )
-                      }
-                    })
-                  }
-                }).catch(() => {
-                  uni.hideLoading();
-                  uni.getSystemInfo({
-                    success(res) {
-                      log.info(
-                        `错误信息:===基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system }.===`
-                      )
-                    }
-                  })
-                })
-              }
-            })
-          }
-        }
-      },
-		//拒绝授权
-		fail(){
-			this.authShow = false
+	import $http from '@/utils/request.js'
+	import log from '@/common/log.js'
+	import Auth from '../../components/auth/auth.vue'
+	export default {
+		components: {
+			Auth
+		},
+		data() {
+			return {
+				authShow: false,
+				token: '',
+				checked: true,
+			};
 		},
-      // 关闭授权
-      authClose() {
-        this.authShow = false
-        setTimeout(() => {
-          uni.navigateBack({
-            delta: 1
-          })
-        }, 500)
-      },
+		methods: {
+			getPhoneNumber(e) {
+				let _this = this
+				if (!_this.checked) {
+					uni.$u.toast('请阅读并勾选底部协议');
+					return
+				}
+				if (e.detail.errMsg == 'getPhoneNumber:ok') {
+					uni.showLoading({
+						title: '登录中'
+					});
+					if (e.detail & e.detail.code) {
+						$http.post('/api/v1/mp/user/wxauth/mobile', {
+							...e.detail,
+							identity: 1,
+							noToken: true
+						}).then(res => {
+							uni.hideLoading();
+							if (res.code == 0) {
+								uni.setStorageSync('token', res.token)
+								_this.getBaseInfo()
+							} else {
+								uni.getSystemInfo({
+									success(res) {
+										log.info(
+											`错误信息:===基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system }.===`
+										)
+									}
+								})
+							}
+						}).catch(() => {
+							uni.hideLoading();
+							uni.getSystemInfo({
+								success(res) {
+									log.info(
+										`错误信息:===基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system }.===`
+									)
+								}
+							})
+						})
+					} else {
+						uni.login({
+							success(res) {
+								$http.post('/api/v1/mp/user/wxauth/mobile', {
+									...e.detail,
+									loginCode: res.code,
+									identity: 1,
+									noToken: true
+								}).then(res => {
+									uni.hideLoading();
+									if (res.code == 0) {
+										uni.setStorageSync('token', res.token)
+										_this.getBaseInfo()
+									} else {
+										uni.getSystemInfo({
+											success(res) {
+												log.info(
+													`错误信息:===基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system }.===`
+												)
+											}
+										})
+									}
+								}).catch(() => {
+									uni.hideLoading();
+									uni.getSystemInfo({
+										success(res) {
+											log.info(
+												`错误信息:===基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system }.===`
+											)
+										}
+									})
+								})
+							}
+						})
+					}
+				}
+			},
+			//拒绝授权
+			fail() {
+				this.authShow = false
+			},
+			// 关闭授权
+			authClose() {
+				this.authShow = false
+				setTimeout(() => {
+					uni.navigateBack({
+						delta: 1
+					})
+				}, 500)
+			},
+
+			changeChecked(e) {
+				this.checked = e
+			},
 
-      changeChecked(e) {
-        this.checked = e
-      },
+			toCode() {
+				if (!this.checked) {
+					uni.$u.toast('请阅读并勾选底部协议');
+					return
+				}
+				uni.navigateTo({
+					url: '/pages/login/code'
+				})
+			},
 
-      toCode() {
-        if (!this.checked) {
-          uni.$u.toast('请阅读并勾选底部协议');
-          return
-        }
-        uni.navigateTo({
-          url: '/pages/login/code'
-        })
-      },
+			getBaseInfo() {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						uni.setStorageSync('userInfo', res.data)
+						if (res.data.openId) {
+							uni.$u.toast('登录成功');
+							setTimeout(() => {
+								uni.navigateBack({
+									delta: 1
+								})
+							}, 500)
+						} else {
+							this.authShow = true
+						}
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+			getBaseInfoAli() {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						uni.setStorageSync('userInfo', res.data)
+						if (res.data.aliuserId) {
+							uni.$u.toast('登录成功');
+							setTimeout(() => {
+								uni.navigateBack({
+									delta: 1
+								})
+							}, 500)
+						} else {
+							this.authShow = true
+						}
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+			onGetAuthorize(e) {
+				let _this = this
+				if (!_this.checked) {
+					uni.$u.toast('请阅读并勾选底部协议');
+					return
+				}
+				my.getPhoneNumber({
+					success: (res) => {
+						uni.showLoading({
+							title: '登录中'
+						});
+						$http.post('/api/v1/mp/user/aliAuth/mobile', {
+							encryptedData: res.response,
+							identity: 1,
+							noToken: true
+						}).then(res => {
+							if (res.code == 0) {
+								uni.setStorageSync('token', res.token)
+								_this.getBaseInfoAli()
+							} else {
+								uni.hideLoading();
 
-      getBaseInfo() {
-        $http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
-          uni.hideLoading();
-          if (res.code == 0) {
-            uni.setStorageSync('userInfo', res.data)
-            if (res.data.openId) {
-              uni.$u.toast('登录成功');
-              setTimeout(() => {
-                uni.navigateBack({
-                  delta: 1
-                })
-              }, 500)
-            } else {
-              this.authShow = true
-            }
-          }
-        }).catch(() => {
-          uni.hideLoading();
-        })
-      },
-      getBaseInfoAli(){
-        $http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
-          uni.hideLoading();
-          if (res.code == 0) {
-            uni.setStorageSync('userInfo', res.data)
-            if (res.data.aliuserId) {
-              uni.$u.toast('登录成功');
-              setTimeout(() => {
-                uni.navigateBack({
-                  delta: 1
-                })
-              }, 500)
-            } else {
-              this.authShow = true
-            }
-          }
-        }).catch(() => {
-          uni.hideLoading();
-        })
-      },
-      onGetAuthorize(e){
-        let _this = this
-        if (!_this.checked) {
-          uni.$u.toast('请阅读并勾选底部协议');
-          return
-        }
-         my.getPhoneNumber({
-            success: (res) => {
-            uni.showLoading({
-              title: '登录中'
-            });
-            $http.post('/api/v1/mp/user/aliAuth/mobile', {
-              encryptedData: res.response,
-              identity: 1,
-              noToken: true
-            }).then(res=>{
-              if(res.code == 0){
-                uni.setStorageSync('token', res.token)
-                _this.getBaseInfoAli()
-              }else{
-                uni.hideLoading();
-				
-              }
-            })
-            },
-          })
-      },
-    }
-  }
+							}
+						})
+					},
+				})
+			},
+		}
+	}
 </script>
 
 <style lang="scss" scoped>