Commit 982598af by fengzhaoyu

合并ISV分支 dev是线上分支

parents aaa76a65 5a3d1b64
const login = () => { const login = () => {
const app = getApp() const app = getApp()
let mingUserId = dd.getStorageSync({ key: 'mingUserId' }).data let mingUserId = dd.getStorageSync({ key: 'mingUserId' }).data
let username = dd.getStorageSync({ key: 'username' }).data
// 有token // 有token
if(dd.getStorageSync({ key: 'token' }).data && dd.getStorageSync({ key: 'token' }).data.access_token) { if(dd.getStorageSync({ key: 'token' }).data && dd.getStorageSync({ key: 'token' }).data.access_token) {
let hasToken = dd.getStorageSync({ key: 'token' }).data; // token let hasToken = dd.getStorageSync({ key: 'token' }).data; // token
...@@ -92,8 +93,8 @@ const login = () => { ...@@ -92,8 +93,8 @@ const login = () => {
'Content-Type': 'application/x-www-form-urlencoded' 'Content-Type': 'application/x-www-form-urlencoded'
}, },
data: { data: {
username: mingUserId, username: username,
password: mingUserId, password: username,
scope: 'server', scope: 'server',
grant_type: 'password' grant_type: 'password'
}, },
......
...@@ -54,11 +54,11 @@ Page({ ...@@ -54,11 +54,11 @@ Page({
method: 'POST', method: 'POST',
dataType: 'json', dataType: 'json',
success: function(res) { success: function(res) {
if (res.data.resultCode == 0) { if(res.data.resultCode == 0) {
const data = res.data.data const data = res.data.data
dd.setStorageSync({ dd.setStorageSync({
key: 'name', key: 'username',
data: data.oapiUser.name data: data.username
}) })
dd.setStorageSync({ dd.setStorageSync({
key: 'mingUserId', key: 'mingUserId',
......
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({ ...@@ -12,7 +12,8 @@ create.Page({
// store: exampleStore, // store: exampleStore,
avatar: '', avatar: '',
realityBalance: '', realityBalance: '',
cardNo: '' cardNo: '',
maxClickCount: 0
}, },
onLoad(query) { onLoad(query) {
dd.hideLoading() dd.hideLoading()
...@@ -173,7 +174,7 @@ create.Page({ ...@@ -173,7 +174,7 @@ create.Page({
maxClickCount--; maxClickCount--;
if (maxClickCount == 0) { if (maxClickCount == 0) {
dd.alert({ dd.alert({
content: '0.0.19' content: '0.0.22'
}); });
maxClickCount = 5; 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