注册以及首页界面优化

This commit is contained in:
jia 2023-12-07 11:53:21 +08:00
parent 45547b52b7
commit be68268fb5
7 changed files with 30 additions and 27 deletions

View File

@ -88,11 +88,16 @@
logregister(formData).then((res) => { logregister(formData).then((res) => {
if (res.code == 1) { if (res.code == 1) {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}) })
uni.$u.toast('注册成功'); uni.$u.toast('注册成功');
}else{
if(res.data&&res.data.has_register==1){
uni.redirectTo({
url:'/pages/Login/login'
})
}
} }
}) })

View File

@ -102,9 +102,7 @@
</view> </view>
<!-- 土壤监测 --> <!-- 土壤监测 -->
<view class=""> <view class="">
<view class="soil-monitor"> <view class="soil-monitor">
<view class="head"> <view class="head">
<view class="tit"> <view class="tit">
@ -286,45 +284,45 @@
name: "土壤温度", name: "土壤温度",
num: 20, num: 20,
unit: "℃", unit: "℃",
}, { }, {
icon: "/static/img/SD.png", icon: "/static/img/SD.png",
name: "土壤湿度", name: "土壤湿度",
num: 20, num: 20,
unit: "%RH", unit: "%RH",
}, { }, {
icon: "/static/img/sj.png", icon: "/static/img/DD.png",
name: "土壤导电率", name: "土壤导电率",
num: 20, num: 20,
unit: "μS/cm", unit: "μS/cm",
}, { }, {
icon: "/static/img/CTPH.png", icon: "/static/img/PH.png",
name: "土壤PH值", name: "土壤PH值",
num: 20, num: 20,
unit: "PH", unit: "PH",
}, { }, {
icon: "/static/img/AHL.png", icon: "/static/img/AHL.png",
name: "土壤含氮量", name: "土壤含氮量",
num: 20, num: 20,
unit: "mg/kg", unit: "mg/kg",
}, { }, {
icon: "/static/img/AQHL.png", icon: "/static/img/Hl.png",
name: "土壤含磷量", name: "土壤含磷量",
num: 20, num: 20,
unit: "mg/kg", unit: "mg/kg",
}, { }, {
icon: "/static/img/AQHL.png", icon: "/static/img/HJ.png",
name: "土壤含钾量", name: "土壤含钾量",
num: 20, num: 20,
unit: "mg/kg", unit: "mg/kg",
}, },
]) ])
onLoad(() => { onLoad(() => {
// console.log(store.state.userInfo) // console.log(store.state.userInfo)
@ -332,7 +330,7 @@
uni.redirectTo({ uni.redirectTo({
url: '/pages/Login/login' url: '/pages/Login/login'
}) })
} }
}) })
const dataobj = reactive({}) const dataobj = reactive({})
@ -356,7 +354,7 @@
} }
}); });
} }
const show = ref(false) const show = ref(false)
const showLoading = ref(false) const showLoading = ref(false)
const columns = reactive([]); const columns = reactive([]);
@ -366,51 +364,51 @@
name: "风速", name: "风速",
num: 20, num: 20,
unit: "%", unit: "%",
}, { }, {
icon: "/static/img/FX.png", icon: "/static/img/FX.png",
name: "风向", name: "风向",
num: 20, num: 20,
unit: "%", unit: "%",
}, { }, {
icon: "/static/img/CTWD.png", icon: "/static/img/CTWD.png",
name: "温度", name: "温度",
num: 20, num: 20,
unit: "℃", unit: "℃",
}, { }, {
icon: "/static/img/SD.png", icon: "/static/img/SD.png",
name: "湿度", name: "湿度",
num: 20, num: 20,
unit: "%RH", unit: "%RH",
}, { }, {
icon: '/static/img/CO2.png', icon: '/static/img/CO2.png',
name: "二氧化碳", name: "二氧化碳",
num: 20, num: 20,
unit: "ppm", unit: "ppm",
}, { }, {
icon: "/static/img/sj.png", icon: "/static/img/QY.png",
name: "气压", name: "气压",
num: 20, num: 20,
unit: "KPa", unit: "KPa",
}, { }, {
icon: "/static/img/JY.png", icon: "/static/img/JY.png",
name: "雨量", name: "雨量",
num: 20, num: 20,
unit: "mm", unit: "mm",
}, { }, {
icon: "/static/img/GZ.png", icon: "/static/img/GZ.png",
name: "光照量", name: "光照量",
num: 20, num: 20,
unit: "Lux", unit: "Lux",
}, },
]) ])
onShow(() => { onShow(() => {
getlist() getlist()

BIN
static/img/DD.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

BIN
static/img/HJ.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

BIN
static/img/PH.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

BIN
static/img/QY.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 B

BIN
static/img/hl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B