This commit is contained in:
Gwk 2022-08-30 16:01:31 +08:00
parent 7174522c57
commit a07097d5f4

View File

@ -36,7 +36,8 @@
el: '#app', el: '#app',
data: { data: {
tenantList: [], tenantList: [],
selectedTenant: null selectedTenant: null,
}, },
methods: { methods: {
selChange(tenant) { selChange(tenant) {
@ -46,6 +47,7 @@
opacity: 'toggle' opacity: 'toggle'
}) })
localStorage.setItem('tenant', tenant.identifier); localStorage.setItem('tenant', tenant.identifier);
wx.miniProgram.getEnv(function(res) { wx.miniProgram.getEnv(function(res) {
if (res.miniprogram) { if (res.miniprogram) {
wx.miniProgram.postMessage({ wx.miniProgram.postMessage({
@ -58,7 +60,7 @@
} }
}, },
created() { created() {
fetch('http://192.168.26.198:3001/epi-project/tenants').then(r => r.json()).then(res => { fetch('http://192.168.26.198:3000/epi-project/tenants').then(r => r.json()).then(res => {
this.tenantList = res.data; this.tenantList = res.data;
}) })
} }