Commit 7210b752 by 胡悦

提交

1 parent f98bab1d
......@@ -3,7 +3,8 @@ import router from './router/index.js'
import util from './utils/util.js'
import './utils/Track'
import {
ssoApi
ssoApi,
wechantApi
} from './api/api'
App({
onLaunch: function () {
......@@ -33,27 +34,27 @@ App({
appId: _this.globalData.appId
}).then(res => {
wx.$authStatus = res.code != 0
if (returnResponse) {
console.log(res,' ====')
resolve(res)
} else {
util.setSessionId(res.data.sessionId)
const openId = res.data.openId
if(openId) {
// ...
// wx.$util.setUserInfo(data)
// return
}
if (res.code != -1) {
if (res.code == 0) {
util.setUserInfo(res.data)
// util.setSessionId(res.data.sessionId)
} else {
util.showToast(res.message || '网络异常')
util.setSessionId(res.data.sessionId)
const openId = res.data.openId
wechantApi.getUserInfo({
openId
}).then(result => {
if (returnResponse) {
console.log(res,' ====')
resolve(res)
} else {
if (res.code != -1) {
if (res.code == 0) {
util.setUserInfo(res.data)
// util.setSessionId(res.data.sessionId)
} else {
util.showToast(res.message || '网络异常')
}
}
resolve(res)
}
resolve(res)
}
})
}).catch(() => {
wx.$authStatus = true
reject()
......
......@@ -30,9 +30,9 @@
<image class="user-bg" webp src="{{IMGURL}}home/user-bg.png" />
</view>
<view class="btn-group">
<view class="phone-btn">
<view class="phone-btn" bindtap="callPhone">
<image class="icon-dial" webp src="{{IMGURL}}home/icon-dial.png"></image>
<view class="phone-text" bindtap="callPhone">拨打电话</view>
<view class="phone-text">拨打电话</view>
</view>
<button class="btn-plain btn" bindtap="addPhone">保存名片</button>
<button class="btn-primary btn" open-type="share">分享名片</button>
......
......@@ -44,7 +44,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.25.4",
"appid": "wxc0e73a3d0afbcb06",
"appid": "wx5d1208f9c8712943",
"projectname": "%E5%B9%BF%E8%81%94%E5%B0%8F%E7%A8%8B%E5%BA%8F%E6%A8%A1%E7%89%88",
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!