From f3c0343e9970e1c0ef5d81ef80ed7561efcf988a Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Wed, 1 Feb 2023 10:12:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=94=E8=B0=83=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 4 +-- common/request.js | 4 +-- pages.js | 2 +- pages/home/index.vue | 7 +++-- pages/purchase/detail.vue | 36 +++++++++++++++++++++---- pages/purchase/record.vue | 55 ++++++++++++++++++++++++++++++++------- store/index.js | 6 ++--- 7 files changed, 88 insertions(+), 26 deletions(-) diff --git a/App.vue b/App.vue index a8c1b05..21e9769 100644 --- a/App.vue +++ b/App.vue @@ -20,9 +20,7 @@ if(this.$store.getters.token){ }else{ - // uni.reLaunch({ - // url:"pages/home/login", - // }) + this.$store.commit('outLogin') } }, onShow: function() { diff --git a/common/request.js b/common/request.js index 6914b0d..067297f 100644 --- a/common/request.js +++ b/common/request.js @@ -2,8 +2,8 @@ import store from "@/store" export function host(host='default',suffix='/plant_manage'){ var url=process.env.NODE_ENV === 'development'?{ - default:`http://2uktvr.natappfree.cc` //陈 - // default:`http://6h8nxd.natappfree.cc` //马 + // default:`http://zrxsae.natappfree.cc` //陈 + default:`http://k3megd.natappfree.cc` //马 }:{ default:`http://qv6mj8.natappfree.cc` } diff --git a/pages.js b/pages.js index 29ea2be..04f9a4a 100644 --- a/pages.js +++ b/pages.js @@ -37,12 +37,12 @@ module.exports = hot((pagesJson)=>{ current: 0, list: [ // {name:"测试页面",path:"pages/demo"}, + {name: "地块管理",path: "pages/massif/mana/index","query": ""}, {name: "登录",path: "pages/home/login","query": ""}, {name: "首页",path: "pages/home/index","query": ""}, {name: "仓库管理",path: "pages/warehouse/mana","query": ""}, {name: "仓库基本信息",path: "pages/warehouse/info","query": ""}, {name: "仓库详情",path: "pages/warehouse/detail","query": ""}, - {name: "地块管理",path: "pages/massifMana","query": ""}, {name: "地块详情",path: "pages/massifDetail","query": ""}, {name: "地块基本信息",path: "pages/massifInfo","query": ""} ] diff --git a/pages/home/index.vue b/pages/home/index.vue index 8b5b7a5..b53bdd0 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -349,8 +349,11 @@ import request from '@/common/request.js' }, }, onLoad() { - // this.getMassif() - this.isAdmin && this.getPlantBase() + if(this.isAdmin){ + this.getPlantBase() + }else{ + this.getMassif(this.$store.getters['userInfo'].plantBaseInfoId) + } }, onShow(){ diff --git a/pages/purchase/detail.vue b/pages/purchase/detail.vue index ee16979..0622fcc 100644 --- a/pages/purchase/detail.vue +++ b/pages/purchase/detail.vue @@ -63,25 +63,51 @@ \ No newline at end of file diff --git a/pages/purchase/record.vue b/pages/purchase/record.vue index b540ccd..5e77b24 100644 --- a/pages/purchase/record.vue +++ b/pages/purchase/record.vue @@ -74,18 +74,18 @@ \ No newline at end of file diff --git a/store/index.js b/store/index.js index 4b31437..b3e7423 100644 --- a/store/index.js +++ b/store/index.js @@ -22,9 +22,9 @@ export default new Vuex.Store({ outLogin(state){ state.userInfo={} state.token='' - uni.reLaunch({ - url:"/pages/home/login", - }) + // uni.reLaunch({ + // url:"/pages/home/login", + // }) }, setHeadImg(state,val){ state.userInfo.avatar=val