Commit 982598af by fengzhaoyu

合并ISV分支 dev是线上分支

parents aaa76a65 5a3d1b64
const login = () => {
const app = getApp()
let mingUserId = dd.getStorageSync({ key: 'mingUserId' }).data
let username = dd.getStorageSync({ key: 'username' }).data
// 有token
if(dd.getStorageSync({ key: 'token' }).data && dd.getStorageSync({ key: 'token' }).data.access_token) {
let hasToken = dd.getStorageSync({ key: 'token' }).data; // token
......@@ -92,8 +93,8 @@ const login = () => {
'Content-Type': 'application/x-www-form-urlencoded'
},
data: {
username: mingUserId,
password: mingUserId,
username: username,
password: username,
scope: 'server',
grant_type: 'password'
},
......
......@@ -54,25 +54,25 @@ Page({
method: 'POST',
dataType: 'json',
success: function(res) {
if (res.data.resultCode == 0) {
if(res.data.resultCode == 0) {
const data = res.data.data
dd.setStorageSync({
key: 'name',
data: data.oapiUser.name
})
dd.setStorageSync({
key: 'mingUserId',
data: data.mingUserId
})
dd.setStorageSync({
key: 'userId',
data: data.oapiUser.userid
})
dd.setStorageSync({
key: 'avatar',
data: data.oapiUser.avatar
})
$login.login()
dd.setStorageSync({
key: 'username',
data: data.username
})
dd.setStorageSync({
key: 'mingUserId',
data: data.mingUserId
})
dd.setStorageSync({
key: 'userId',
data: data.oapiUser.userid
})
dd.setStorageSync({
key: 'avatar',
data: data.oapiUser.avatar
})
$login.login()
}
else if (res.data.resultCode == 4003) {
dd.alert({
......
const app = getApp()
import create from 'dd-store'
import exampleStore from '/stores/exampleStore'
import $http from './../../API/http'
create.Page({
store: exampleStore,
useAll: true,
data: {
query: ''
},
onLoad(query) {
console.log(query.index, 'query')
this.setData({ query: query.index })
dd.setNavigationBar({
title: '外部联系人',
});
},
onReady() {
const _that = this
dd.chooseExternalUsers({
multiple: false, //是否多选 true多选,false单选,默认是单选
limitTips: "请单选",
success: function(res) {
if (_that.data.query == 0) {
_that.store.data.visitorName = res[0].name
_that.store.data.selectVisitors = false
_that.update()
}
else {
_that.store.data.visitorPeer[_that.data.query - 1].name = res[0].name
_that.store.data.selectVisitors = false
_that.update()
}
dd.navigateBack({
delta: 1
})
},
fail: function(err) {
_that.store.data.selectVisitors = false
dd.navigateBack({
delta: 1
})
}
});
},
onShow() {
// 页面显示
},
onHide() {
// 页面隐藏
},
onUnload() {
// 页面被关闭
},
onTitleClick() {
// 标题被点击
},
onReachBottom() {
},
onShareAppMessage() {
// 返回自定义分享信息
return {
title: 'My App',
desc: 'My App description',
path: 'pages/index/index',
};
},
});
......@@ -12,7 +12,8 @@ create.Page({
// store: exampleStore,
avatar: '',
realityBalance: '',
cardNo: ''
cardNo: '',
maxClickCount: 0
},
onLoad(query) {
dd.hideLoading()
......@@ -173,7 +174,7 @@ create.Page({
maxClickCount--;
if (maxClickCount == 0) {
dd.alert({
content: '0.0.19'
content: '0.0.22'
});
maxClickCount = 5;
}
......
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