File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 214214 {
215215 "path" : " pages/API/login/login" ,
216216 "style" : {
217- "navigationBarTitleText" : " 微信登录 "
217+ "navigationBarTitleText" : " 授权登录 "
218218 }
219219 },
220220 {
Original file line number Diff line number Diff line change 66 <block v-if =" hasLogin === true" >
77 <view class =" uni-h3 uni-center uni-common-mt" >已登录</view >
88 <view class =" uni-hello-text uni-center" >
9- <text >每个帐号仅需登录 1 次,\n后续每次进入页面即可自动拉取用户信息。</text >
9+ <text >每个账号仅需登录 1 次,\n后续每次进入页面即可自动拉取用户信息。</text >
1010 </view >
1111 </block >
1212 <block v-if =" hasLogin === false" >
4040 },
4141 onLoad () {
4242 uni .getProvider ({
43- service: " oauth" ,
43+ service: ' oauth' ,
4444 success : (e ) => {
4545 console .log (' oauth..........' );
4646 this .providerList = e .provider .map ((value ) => {
6161 case ' baidu' :
6262 providerName = ' 百度登录'
6363 break ;
64+ case ' alipay' :
65+ providerName = ' 支付宝登录'
66+ break ;
6467 }
6568 return {
6669 name: providerName,
8083 provider: provider .id ,
8184 success : (res ) => {
8285 console .log (' login success:' , res);
83- this .login (provider .id ); // 改变保存在store里的登录状态
86+ // 更新保存在 store 中的登录状态
87+ this .login (provider .id );
8488 },
8589 fail : (err ) => {
8690 console .log (' login fail:' , err);
8791 }
88- })
92+ });
8993 }
9094 }
9195 }
You can’t perform that action at this time.
0 commit comments