Commit ee750164 authored by 刘怀志's avatar 刘怀志

feat(登录首页): 样式完成

parent 81e91de3
......@@ -3,7 +3,7 @@ import request from '@/utils/request'
// 微信登录方式(宠物主)
export function wxLogin(code) {
return request({
url: '/wechat/petOwner/getWxOpenId/' + code,
url: '/ae-api/wxMiniApp/validLogin/' + code,
method: 'post',
headers: {
isToken: false
......
......@@ -12,7 +12,7 @@
<!-- 下方微信授权登录 -->
<view class="action-btn">
<!-- 协议勾选后获取手机号 -->
<button class="now-style" open-type="getPhoneNumber" @getphonenumber="gotoIndex($event)">
<button class="now-style" open-type="getPhoneNumber" @getphonenumber="goIndexTemp($event)">
<text>点击登录</text>
</button>
</view>
......@@ -72,6 +72,7 @@ export default {
uni.login({
provider: 'weixin',
success: infoRes => {
console.log('infoRes', infoRes)
this.code = infoRes.code
}
})
......@@ -152,6 +153,12 @@ export default {
return
}
},
// todo 跳转首页 暂时使用
goIndexTemp() {
const token = 'eyJhbGciOiJIUzI1NiJ9.eyJwaG9uZSI6bnVsbCwiZXhwIjoxNzQwOTg1Njg0LCJzdWIiOiJhZG1pbiIsImlhdCI6MTc0MDM4MDg4NCwid3hOaWNrbmFtZSI6bnVsbCwidXNlcm5hbWUiOiJhZG1pbiIsInVzZXJuYW1lOmFkbWluIjp7ImJ1c2luZXNzSWQiOiIxIiwidXNlcm5hbWUiOiJhZG1pbiIsInBhc3N3b3JkIjoiJDJhJDEwJG5zUEtLZklKRXpNbmlaS2M5WGFjZ09KczB1Tlp0ellhUGZBdTAxZXZsb2MvWDR3bDNpNDEuIiwiZGVwdElkIjoiNDAxIiwiZGVwdE5hbWUiOiLkuJzpo47mnKznlLDlj5HliqjmnLrmnInpmZDlhazlj7giLCJwaG9uZSI6bnVsbCwid3hOaWNrTmFtZSI6bnVsbCwicm9sZUlkcyI6IiIsInN0YWZmTGV2ZWwiOiIxIiwicHJvZHVjdGl2ZVJvbGVJZHMiOiIiLCJub25Qcm9kdWN0aXZlUm9sZUlkcyI6IiIsImlkbU5hbWUiOiLnrqHnkIblkZgiLCJub3RMb2NrZWQiOnRydWUsImF1dGhvcml0aWVzIjpudWxsLCJlbmFibGVkIjp0cnVlLCJhY2NvdW50Tm9uRXhwaXJlZCI6dHJ1ZSwiYWNjb3VudE5vbkxvY2tlZCI6dHJ1ZSwiY3JlZGVudGlhbHNOb25FeHBpcmVkIjp0cnVlfSwiYnVzaW5lc3NJZCI6IjEifQ.Ak9rM4W-ZqhUox4N4oc6AXOLyL2Z3gKlX1g3pQbx6hw'
this.$store.dispatch('LoginPetOwner', token)
this.$tab.reLaunch('/pages/index')
},
// 用户协议页面跳转
handleToSetting() {
// this.$tab.navigateTo('/pages/agreement/agreement?type=用户协议')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment