Commit 90e6400b by LJM

移动端--支持新组织登录:粤丰实、工品

parent 0711bc63
......@@ -295,6 +295,12 @@
} else if (company_id == 3) {
this.warehouse_arr = [{ name: '华云现货仓', value: '11' }];
this.formParams.warehouse_id = 11;
} else if (company_id == 9) {
this.warehouse_arr = [{ name: '粤丰实-现货仓', value: '12' }];
this.formParams.warehouse_id = 12;
} else if (company_id == 10) {
this.warehouse_arr = [{ name: '工品-现货仓', value: '13' }];
this.formParams.warehouse_id = 13;
}
},
methods: {
......
......@@ -2,7 +2,7 @@
<view class="index">
<view class="head row bothSide">
<view class="column">
<text class="t1">{{ company_id == 1 ? '深圳市猎芯科技有限公司' : company_id == 3 ? '深圳华云数智工业科技有限公司' : '深贸电子有限公司' }}</text>
<text class="t1">{{org_name}}</text>
<view class="row verCenter" v-if="info.user_info">
<text class="iconfont icon-juxing"></text>
<text class="t2">{{ info.user_info.name }}</text>
......@@ -107,7 +107,7 @@
export default {
data() {
return {
company_id: 1,
org_name: '',
info: {}
};
},
......@@ -115,7 +115,7 @@
this.getData();
},
onShow() {
this.company_id = uni.getStorageSync('company_id') || 1;
this.org_name = uni.getStorageSync('org_name');
},
methods: {
getData() {
......@@ -136,6 +136,7 @@
uni.removeStorageSync('oa_skey');
uni.removeStorageSync('oa_user_id');
uni.removeStorageSync('company_id');
uni.removeStorageSync('org_name');
uni.removeStorageSync('oa_user_email');
uni.redirectTo({
url: '/pages/mine/login'
......
......@@ -4,9 +4,9 @@
<image src="/static/WMS@2x.png" mode="aspectFill"></image>
</view>
<view class="company row rowCenter verCenter">
<picker @change="bindPickerChange" :value="index" :range="array">
<picker @change="bindPickerChange" :value="index" :range="array" range-key="name">
<view class="row verCenter">
<view class="uni-input">{{ array[index] }}</view>
<view class="uni-input">{{ array[index].name }}</view>
<view class="uni-arrow"></view>
</view>
</picker>
......@@ -42,9 +42,16 @@
data() {
return {
index: 0,
array: ['深圳市猎芯科技有限公司', '深贸电子有限公司', '深圳华云数智工业科技有限公司'],
array: [
{ name: '深圳市猎芯科技有限公司', value: 1 },
{ name: '深贸电子有限公司', value: 2 },
{ name: '深圳华云数智工业科技有限公司', value: 3 },
{ name: '深圳市粤丰实工业有限公司', value: 9 },
{ name: '深圳工品数字科技有限公司', value: 10 }
],
name: '',
passwd: '',
org_id: 1,
disabled: false,
isFirst: true,
online_version: '', //线上后台版本
......@@ -56,6 +63,7 @@
uni.removeStorageSync('oa_skey');
uni.removeStorageSync('oa_user_id');
uni.removeStorageSync('company_id');
uni.removeStorageSync('org_name');
uni.removeStorageSync('oa_user_email');
//记住密码
......@@ -79,6 +87,7 @@
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
this.org_id = this.array[e.detail.value].value;
this.disabled = false;
},
/**
......@@ -176,7 +185,7 @@
* 组织切换
*/
changeOrgId() {
this.request(API.changeOrgId, 'POST', { org_id: Number(this.index) + 1 }, false).then(res => {
this.request(API.changeOrgId, 'POST', { org_id: this.org_id }, false).then(res => {
if (res.code === 0) {
this.disabled = false;
uni.setStorageSync('img_upload_url', res.data.img_upload_url);
......@@ -226,7 +235,8 @@
if (res.retcode === 0) {
uni.setStorageSync('oa_skey', res.data.skey);
uni.setStorageSync('oa_user_id', res.data.userId);
uni.setStorageSync('company_id', Number(this.index) + 1);
uni.setStorageSync('company_id', this.org_id);
uni.setStorageSync('org_name', this.array[this.index].name);
//必须调用选用组织
this.changeOrgId();
} else {
......
......@@ -173,6 +173,12 @@
} else if (company_id == 3) {
this.warehouse_arr = [{ name: '华云现货仓', value: '11' }];
this.formParams.warehouse_id = 11;
} else if (company_id == 9) {
this.warehouse_arr = [{ name: '粤丰实-现货仓', value: '12' }];
this.formParams.warehouse_id = 12;
} else if (company_id == 10) {
this.warehouse_arr = [{ name: '工品-现货仓', value: '13' }];
this.formParams.warehouse_id = 13;
}
},
methods: {
......
// const API_BASE_USER = 'http://user.liexindev.net'; //用户系统
// const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
// const API_BASE = 'http://wms.liexindev.net'; //WMS系统
// const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统
const API_BASE_USER = 'http://user.liexindev.net'; //用户系统
const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
const API_BASE = 'http://wms.liexindev.net'; //WMS系统
const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统
const API_BASE_USER = 'https://user.ichunt.net'; //用户系统
const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统
const API_BASE = 'https://wms.ichunt.net'; //WMS系统
const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
// const API_BASE_USER = 'https://user.ichunt.net'; //用户系统
// const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统
// const API_BASE = 'https://wms.ichunt.net'; //WMS系统
// const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
const API = {
......
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 sign in to comment