Browse Source

接口

master
向顺璞 4 years ago
parent
commit
7856a9824f
  1. BIN
      .DS_Store
  2. 11
      app.js
  3. BIN
      assets/.DS_Store
  4. BIN
      assets/images/wx.png
  5. 4
      pages/auth/auth.wxml
  6. 18
      pages/auth/auth.wxss

BIN
.DS_Store vendored

Binary file not shown.

11
app.js

@ -6,7 +6,16 @@ App({
const logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
wx.login({
success (res) {
if (res.code) {
//发起网络请求
$api.getUserAuth(res.code)
} else {
console.log('登录失败!' + res.errMsg)
}
}
})
},
globalData: {

BIN
assets/.DS_Store vendored

Binary file not shown.

BIN
assets/images/wx.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

4
pages/auth/auth.wxml

@ -5,7 +5,7 @@
<view class="top">
<image class="log" src="../../assets/images/tabIcon/air.png"></image>
<view class="msg">
<view class="tag">
<view class="tag center">
<view class="tag-icon">
<image class="tag-yes"></image>
</view>
@ -16,7 +16,7 @@
</view>
</view>
<button class="login" type='primary' open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
<image class="wx-log"></image>
<image class="wx-log" src="../../assets/images/wx.png"></image>
<text class="wx-text">微信用户一键登录</text>
</button>
</view>

18
pages/auth/auth.wxss

@ -1,5 +1,5 @@
/* pages/auth/auth.wxss */
.main{
.main {
display: flex;
flex-direction: column;
justify-content: space-between;
@ -7,20 +7,28 @@
padding: 220rpx 0 40rpx 0;
}
.top{
.top {
display: flex;
flex-direction: column;
align-items: center;
}
.log{
.log {
width: 150rpx;
height: 150rpx;
}
.login {
width: 667rpx;
height: 79rpx;
width: 667rpx !important;
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
text-indent: 6rpx;
}
.wx-log {
width: 40rpx;
height: 40rpx;
}
Loading…
Cancel
Save