| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039 |
- <template>
- <view>
- <view class="weather">
- <image
- :src="
- 'https://webstaticimg.oss-cn-hangzhou.aliyuncs.com/bigdata_app/img/weather/' +
- weatherinfo.wea +
- '.png'
- "
- mode=""
- class="weaimg"
- ></image>
- <view class="weatext">
- <view class="weatext_title">
- {{ hello }}
- </view>
- <view class=""> 欢迎登录云飞智控 </view>
- </view>
- </view>
- <view class="weatherinfo">
- <view class="weatherinfo_item">
- <image
- src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/weizhi.png"
- mode=""
- class="weaimg"
- ></image>
- <view class="textbox">
- {{ weatherinfo.district || '-' }}
- </view>
- </view>
- <view class="weatherinfo_item">
- <image
- src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/wendu.png"
- mode=""
- class="weaimg"
- ></image>
- <view class="textbox"> {{ weatherinfo.at || '-' }}℃ </view>
- </view>
- <view class="weatherinfo_item">
- <image
- src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/shidu.png"
- mode=""
- class="weaimg"
- ></image>
- <view class="textbox"> {{ weatherinfo.ah || '-' }} </view>
- </view>
- <view class="weatherinfo_item">
- <view class="first_item"> PM2.5 </view>
- <view class="textbox">
- {{ weatherinfo.air_pm25 || '-' }}
- </view>
- </view>
- </view>
- <view class="functionbox">
- <view class="functionbox_title"> 功能应用 </view>
- <view class="functionbox_text">
- <view
- class="functionbox_text_item"
- v-if="jurisdiction.sqtf"
- @click="tabfunction(0)"
- >
- <image
- src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/base.png"
- mode=""
- class="itemimg"
- ></image>
- <view class=""> 四情基地 </view>
- </view>
- <view class="functionbox_text_item" @click="tabfunction(1)">
- <image
- src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/worm.png"
- mode=""
- class="itemimg"
- ></image>
- <view class=""> 田间随识 </view>
- </view>
- <view
- class="functionbox_text_item"
- v-if="jurisdiction.zjtf"
- @click="tabfunction(2)"
- >
- <image
- src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/knowledge.png"
- mode=""
- class="itemimg"
- ></image>
- <view class=""> 知识百科 </view>
- </view>
- <view class="functionbox_text_item" @click="tabfunction(3)">
- <image
- src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/aftersale.png"
- mode=""
- class="itemimg"
- ></image>
- <view class=""> 售后服务 </view>
- </view>
- </view>
- </view>
- <view class="facilitybox">
- <view class="facilitybox_title"> 系统设备 </view>
- <view class="facilitybox_itembox">
- <view
- class="facilitybox_item"
- v-if="jurisdiction.cbtf"
- @click="tabequipment('../cb/index/index')"
- >
- <image
- src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/cb.png"
- mode=""
- class="itemimg"
- ></image>
- <view class=""> 测报系统 </view>
- </view>
- <view
- class="facilitybox_item"
- v-if="jurisdiction.cbyj"
- @click="tabequipment('../cbqxyj/cbwarn')"
- >
- <image
- src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/cbyj.png"
- mode=""
- class="itemimg"
- ></image>
- <view class=""> 测报预警 </view>
- </view>
- <view
- class="facilitybox_item"
- v-if="jurisdiction.fztf"
- @click="tabequipment('../prevention/index')"
- >
- <image
- src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/fz.png"
- mode=""
- class="itemimg"
- ></image>
- <view class=""> 防治系统 </view>
- </view>
- <view
- class="facilitybox_item"
- v-if="jurisdiction.jktf"
- @click="tabequipment('../monitor/index')"
- >
- <image
- src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/jk.png"
- mode=""
- class="itemimg"
- ></image>
- <view class=""> 监控系统 </view>
- </view>
- <view
- class="facilitybox_item"
- v-if="jurisdiction.hjtf"
- @click="tabequipment('../environment/index')"
- >
- <image
- src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/hj.png"
- mode=""
- class="itemimg"
- ></image>
- <view class=""> 环境监测 </view>
- </view>
- <view
- class="facilitybox_item"
- v-if="jurisdiction.qxz"
- @click="tabequipment('../qxzyj/cbwarn', 5)"
- >
- <image
- src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/qxyj.png"
- mode=""
- class="itemimg"
- ></image>
- <view class=""> 气象预警 </view>
- </view>
- <view
- class="facilitybox_item"
- v-if="jurisdiction.sq"
- @click="tabequipment('../qxzyj/cbwarn', '15')"
- >
- <image
- src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/sqyj.png"
- mode=""
- class="itemimg"
- >
- </image>
- <view class=""> 墒情预警 </view>
- </view>
- <view
- class="facilitybox_item"
- v-if="jurisdiction.ggtf"
- @click="tabequipment('../irrigate/index')"
- >
- <image
- src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/guangai.png"
- mode=""
- class="itemimg"
- ></image>
- <view class=""> 智能灌溉 </view>
- </view>
- <view
- class="facilitybox_item"
- v-if="jurisdiction.sbtf"
- @click="tabequipment('../equipMange/index/index')"
- >
- <image
- src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/user.png"
- mode=""
- class="itemimg"
- ></image>
- <view class=""> 用户管理 </view>
- </view>
- </view>
- </view>
- <view class="insectattack">
- <view class="insectattack_title" @click="worm">
- <view class=""> 虫情百科 </view>
- <view class="iconbox">
- <u-icon name="arrow-right"></u-icon>
- </view>
- </view>
- <!-- <view class="insectattack_listbox">
- <view class="insectattack_list">
- <view class="list_box list_box1" @click="introduce(79,'虫情百科')">
- <view class="list_boxbg">
- <image src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/cao.png" mode="" class="list_boxbg_img"></image>
- </view>
- <view class="list_box_xiang">
- <view class="list_box_xiang_click">
- 详情
- </view>
- </view>
- <view class="list_box_info">
- <view class="list_box_info_name">
- 小地老虎
- </view>
- <view class="list_box_info_text">
- 该虫能危害百余种植物,是对农、林木幼苗危害很大的地下害虫, 在东北主要危害落叶松、红松、水曲柳、核桃楸等苗木
- </view>
- </view>
- </view>
- <view class="list_box list_box2" @click="introduce(369,'虫情百科')">
- <view class="list_boxbg">
- <image src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/yee.jpg" mode="" class="list_boxbg_img"></image>
- </view>
- <view class="list_box_xiang">
- <view class="list_box_xiang_click">
- 详情
- </view>
- </view>
- <view class="list_box_info">
- <view class="list_box_info_name">
- 草地贪夜蛾
- </view>
- <view class="list_box_info_text">
- 草地贪夜蛾被认为是世界上最具破坏性的害虫之一,其巨大的破坏性主要源于其“贪”的本性——贪吃、贪育、贪婪、广适、耐药。
- </view>
- </view>
- </view>
- <view class="list_box list_box3" @click="introduce(6,'虫情百科')">
- <view class="list_boxbg">
- <image src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/lingc.jpg" mode="" class="list_boxbg_img"></image>
- </view>
- <view class="list_box_xiang">
- <view class="list_box_xiang_click">
- 详情
- </view>
- </view>
- <view class="list_box_info">
- <view class="list_box_info_name">
- 棉铃虫
- </view>
- <view class="list_box_info_text">
- 棉铃虫具有高度多食性,可以为害20余科200多种植物,但比较喜食禾本科、锦葵科、茄科和豆科植物的花蕾和果实等繁殖器官。
- </view>
- </view>
- </view>
- <view class="list_box list_box4" @click="introduce(67,'虫情百科')">
- <view class="list_boxbg">
- <image src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/ming.png" mode="" class="list_boxbg_img"></image>
- </view>
- <view class="list_box_xiang">
- <view class="list_box_xiang_click">
- 详情
- </view>
- </view>
- <view class="list_box_info">
- <view class="list_box_info_name">
- 稻纵卷叶螟
- </view>
- <view class="list_box_info_text">
- 生命潜能强,寿命长,产卵期长,产卵量也多。各代雌、雄蛾比例几乎各占半数。蛾子有强烈的趋荫蔽栖息习性
- </view>
- </view>
- </view>
- </view>
- </view> -->
- </view>
- <view class="insectattack">
- <view class="insectattack_title" @click="virus">
- <view class=""> 病害百科 </view>
- <view class="iconbox">
- <u-icon name="arrow-right"></u-icon>
- </view>
- </view>
- <!-- <view class="insectattack_listbox">
- <view class="insectattack_list">
- <view class="list_box list_box5" @click="introduce(267,'病害百科')">
- <view class="list_boxbg">
- <image src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/mai.png" mode="" class="list_boxbg_img"></image>
- </view>
- <view class="list_box_xiang">
- <view class="list_box_xiang_click">
- 详情
- </view>
- </view>
- <view class="list_box_info">
- <view class="list_box_info_name">
- 小麦赤霉病
- </view>
- <view class="list_box_info_text">
- 小麦赤霉病从苗期到穗期均可发生,引起苗腐、茎基腐、秆腐和穗腐,以穗腐危害最大。湿度大时,病部均可见粉红色霉层。
- </view>
- </view>
- </view>
- <view class="list_box list_box6" @click="introduce(320,'病害百科')">
- <view class="list_boxbg">
- <image src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/dadou.jpg" mode="" class="list_boxbg_img"></image>
- </view>
- <view class="list_box_xiang">
- <view class="list_box_xiang_click">
- 详情
- </view>
- </view>
- <view class="list_box_info">
- <view class="list_box_info_name">
- 大豆根腐病
- </view>
- <view class="list_box_info_text">
- 初期茎基部或胚根表皮出现淡红褐色不规则的小斑,后变红褐色凹陷坏死斑,绕根茎扩展致根皮枯死
- </view>
- </view>
- </view>
- <view class="list_box list_box7" @click="introduce(292,'病害百科')">
- <view class="list_boxbg">
- <image src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/yumi.png" mode="" class="list_boxbg_img"></image>
- </view>
- <view class="list_box_xiang">
- <view class="list_box_xiang_click">
- 详情
- </view>
- </view>
- <view class="list_box_info">
- <view class="list_box_info_name">
- 玉米大斑病
- </view>
- <view class="list_box_info_text">
- 玉米大斑病主要为害叶片,严重时也为害叶鞘和苞叶。植株下部叶片先发病,然后向上扩展。
- </view>
- </view>
- </view>
- <view class="list_box list_box8" @click="introduce(278,'病害百科')">
- <view class="list_boxbg">
- <image src="https://www.hnyfwlw.com:8006/bigdata_app/newindex/dao.png" mode="" class="list_boxbg_img"></image>
- </view>
- <view class="list_box_xiang">
- <view class="list_box_xiang_click">
- 详情
- </view>
- </view>
- <view class="list_box_info">
- <view class="list_box_info_name">
- 水稻稻瘟病
- </view>
- <view class="list_box_info_text">
- 发生于三叶前,由种子带菌所致。病苗基部灰黑,上部变褐,卷缩而死,湿度较大时病部产生大量灰黑色霉层。
- </view>
- </view>
- </view>
- </view>
- </view> -->
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- weatherinfo: {
- wea: '晴',
- },
- hello: '',
- jurisdiction: {
- cbtf: false,
- jktf: false,
- hjtf: false,
- fztf: false,
- sytf: false,
- sbtf: false,
- sqtf: false,
- zjtf: false,
- ggtf: false,
- qxz: false,
- sq: false,
- cbyj: false,
- },
- show: false,
- url: '',
- loadTF: false,
- };
- },
- watch: {
- url(news) {
- if (news != '') {
- uni.pageScrollTo({
- scrollTop: 0,
- duration: 500,
- });
- }
- },
- },
- methods: {
- moveHandle() {
- return;
- },
- async getcity(lng, lat) {
- const res = await this.$myRequest({
- url: '/api/api_gateway?method=device.device_manage.weathers',
- data: {
- lng: lng,
- lat: lat,
- },
- });
- // uni.showToast({
- // title: JSON.stringify(res[0]),
- // duration: 20000,
- // icon:'none'
- // });
- // console.log(res);
- this.weatherinfo = res[0];
- },
- async getUserlogin() {
- const res = await this.$myRequest({
- url: '/api/api_gateway?method=user.login.user_login_info',
- });
- // this.jurisdiction = {
- // cbtf: false,
- // jktf: false,
- // hjtf: false,
- // fztf: false,
- // sytf: false,
- // sbtf: false,
- // sqtf: false,
- // zjtf: false,
- // }
- uni.setStorage({
- key: 'jurisdiction',
- data: JSON.stringify(res.children),
- });
- uni.setStorage({
- key: 'myuser_type',
- data: JSON.stringify(res.myuser_type),
- });
- uni.setStorage({
- key: 'myuid',
- data: JSON.stringify(res.myuid),
- });
- let QueryPermission = (id) => {
- let list = res.children;
- for (var i = 0; i < list.length; i++) {
- if (list[i].children) {
- var data = list[i].children;
- for (var j = 0; j < data.length; j++) {
- if (data[j].children) {
- var item = data[j].children;
- for (var k = 0; k < item.length; k++) {
- if (item[k].pur_id == id) {
- return true;
- }
- }
- }
- }
- }
- }
- return false;
- };
- this.jurisdiction = {
- cbtf: false,
- jktf: false,
- hjtf: false,
- fztf: false,
- sytf: false,
- sbtf: false,
- sqtf: false,
- zjtf: false,
- qxz: QueryPermission(242),
- sq: QueryPermission(284),
- cbyj: QueryPermission(243),
- };
- console.log(res.children);
- for (var i = 0; i < res.children.length; i++) {
- switch (res.children[i].pur_id) {
- case 36:
- this.jurisdiction.cbtf = true; //"测报系统"
- break;
- case 42:
- this.jurisdiction.jktf = true; //"可视农业"
- break;
- case 40:
- this.jurisdiction.hjtf = true; //"环境监测系统"
- break;
- case 44:
- this.jurisdiction.fztf = true; //"防治系统"
- break;
- case 58:
- this.jurisdiction.sytf = true; //"溯源系统"
- break;
- case 28:
- this.jurisdiction.sbtf = true; //"系统管理"
- break;
- case 25:
- this.jurisdiction.sqtf = true; //"四情基地"
- break;
- case 124:
- this.jurisdiction.zjtf = true; //"专家诊断"
- break;
- // case "灌溉控制系统":
- // this.jurisdiction.sftf = true
- // break;
- case 202:
- this.jurisdiction.ggtf = true; //"灌溉控制系统"
- break;
- }
- }
- },
- tabfunction(index) {
- if (index == 0) {
- uni.navigateTo({
- url: '../fourBase/index',
- });
- } else if (index == 1) {
- // var that = this
- // this.show = true
- uni.navigateTo({
- url: '/pages/identifyPest/identifyPest',
- });
- } else if (index == 2) {
- uni.navigateTo({
- url: '../expertDiagnosis/index',
- });
- } else if (index == 3) {
- uni.navigateTo({
- url: '../afterSale/index',
- });
- }
- },
- tabequipment(url, type) {
- console.log(url);
- uni.navigateTo({
- url: `${url}${type ? `?typeId=${type}` : ''}`,
- });
- },
- // onok(ev) {
- // this.path = this.url;
- // console.log(ev);
- // this.loadTF = true;
- // uni.showLoading({
- // mask: true,
- // success: function () {
- // console.log(999);
- // },
- // });
- // var publiukey = `-----BEGIN PUBLIC KEY-----
- // MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC6m92fXUrccS4SoLg4W4jPRNua
- // 4BcRk4ldLcqPuQpD2Mds2+hw+Gi+0MUnshF/r/DTcCJgkt7rtoY9EB6/XJ6MFw14
- // whhESFie/lZUWRsk8M89Rkr8m5rwmBl+uLAd5LopyshFqKTBXeT2ytHP1JCQLPBO
- // 34Fy4/yEz4qEzkzBuwIDAQAB
- // -----END PUBLIC KEY-----`;
- // var time = +new Date();
- // var str2 = 'YuNfEi' + time + 'YuNfEi';
- // var pubblicData = jsencrypt.setEncrypt(publiukey, str2);
- // if (this.flag == 2) {
- // console.log('111');
- // // pest.pests.insect_discern 虫害
- // uni.uploadFile({
- // // url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
- // url: 'https://wx.hnyfwlw.com/api/api_gateway?method=pest.pests.insect_discern', //仅为示例,非真实的接口地址
- // filePath: ev.path,
- // name: 'img_file',
- // formData: {
- // user: 'test',
- // sign: pubblicData,
- // },
- // success: (uploadFileRes) => {
- // this.loadTF = false;
- // console.log(JSON.parse(uploadFileRes.data));
- // uni.navigateTo({
- // url:
- // '../disandpests/index?datas=' +
- // uploadFileRes.data +
- // '&path=' +
- // ev.path,
- // });
- // },
- // fail(res) {
- // console.log(res);
- // },
- // });
- // } else if (this.flag == 1) {
- // //pest.pests.insect_discern病害识别
- // // uni.showLoading({
- // // title: '加载中'
- // // });
- // uni.uploadFile({
- // // url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
- // url: 'https://wx.hnyfwlw.com/api/api_gateway?method=pest.pests.plant_discern', //仅为示例,非真实的接口地址
- // filePath: ev.path,
- // name: 'img_file',
- // formData: {
- // user: 'test',
- // sign: pubblicData,
- // },
- // success: (uploadFileRes) => {
- // this.loadTF = false;
- // console.log(JSON.parse(uploadFileRes.data));
- // uni.navigateTo({
- // url:
- // '../disandpests/index?datas=' +
- // uploadFileRes.data +
- // '&path=' +
- // ev.path,
- // });
- // },
- // });
- // }
- // this.url = '';
- // },
- // oncancle() {
- // // url设置为空,隐藏控件
- // this.url = '';
- // },
- // confirm() {
- // this.flag = 1;
- // uni.chooseImage({
- // count: 1, //默认9
- // // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
- // sourceType: ['camera', 'album'], //从相册选择
- // success: (res) => {
- // this.url = res.tempFilePaths[0];
- // },
- // });
- // console.log(1);
- // },
- // cancel() {
- // this.flag = 2;
- // uni.chooseImage({
- // count: 1, //默认9
- // // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
- // sourceType: ['camera', 'album'], //从相册选择
- // success: (res) => {
- // console.log(1);
- // this.url = res.tempFilePaths[0];
- // },
- // });
- // },
- worm() {
- uni.navigateTo({
- url: '../expertDiagnosis/wormcase?name=虫情百科',
- });
- },
- virus() {
- uni.navigateTo({
- url: '../expertDiagnosis/wormcase?name=病害百科',
- });
- },
- introduce(id, title) {
- uni.navigateTo({
- url: '../expertDiagnosis/introduce?id=' + id + '&title=' + title,
- });
- },
- checkLocationPermission(isTest) {
- let session_key = uni.getStorageSync('session_key');
- let _this = this;
- // 当用户登录之后再弹位置权限框
- if(session_key) {
- uni.getSetting({
- success(res) {
- console.log(res);
- if(res.authSetting['scope.userLocation']) {
- uni.getLocation({
- type: 'wgs84 ',
- success: (res) => {
- // console.log(res, 'loacation');
- // uni.showToast({
- // title: `${res.longitude}, ${res.longitude}`,
- // duration: 20000,
- // icon:'none'
- // });
- _this.getcity(res.longitude, res.latitude);
- },
- fail(e) {
- uni.showToast({
- title: JSON.stringify(e),
- duration: 5000,
- icon:'none'
- });
- }
- });
- } else {
- uni.authorize({
- scope: 'scope.userLocation',
- success: () => {
- // 用户已授权
- uni.getLocation({
- type: 'wgs84 ',
- success: (res) => {
- console.log(res, 'loacation');
- _this.getcity(res.longitude, res.latitude);
- },
- });
- },
- fail: () => {
- // 用户拒绝授权,可引导用户至设置页手动开启
- if(isTest) {
- uni.showModal({
- title: '需要授权',
- content: '天气功能需要获取您的地理位置,请在设置中打开位置权限',
- success: (modalRes) => {
- if (modalRes.confirm) {
- uni.openSetting()
- } else {
- uni.showToast({
- title: '您拒绝了授权,将无法查看天气信息',
- duration: 2000,
- icon:'none'
- });
- }
- },
- })
- }
- },
- })
- }
- }
- })
- }
- }
- },
- onLoad() {
- console.log(this.$isneutral);
- var time = new Date();
- var hours = time.getHours();
- if (hours < 12) {
- this.hello = '上午好!';
- } else {
- this.hello = '下午好!';
- }
- this.getUserlogin();
- this.checkLocationPermission(true); // 首次加载弹框提醒
- },
- onShow() {
- this.loadTF = false;
- this.getUserlogin();
- this.checkLocationPermission();
- },
- };
- </script>
- <style lang="less">
- page {
- background-image: url(https://www.hnyfwlw.com:8006/bigdata_app/newindex/bg.png);
- background-size: 100%;
- background-repeat: no-repeat;
- background-color: #f9f9f9;
- }
- .weather {
- display: flex;
- width: 85%;
- margin: 0 auto;
- padding-top: 40rpx;
- .weaimg {
- width: 296rpx;
- height: 296rpx;
- }
- .weatext {
- width: 300rpx;
- text-align: center;
- font-size: 36rpx;
- color: #fff;
- padding-top: 60rpx;
- margin-left: 60rpx;
- .weatext_title {
- font-size: 80rpx;
- margin-bottom: 30rpx;
- }
- }
- }
- .weatherinfo {
- display: flex;
- background-color: rgba(255, 255, 255, 0.2);
- width: 85%;
- margin: 60rpx auto;
- padding: 30rpx;
- justify-content: space-around;
- border-radius: 170rpx;
- .weatherinfo_item {
- text-align: center;
- .first_item {
- height: 50rpx;
- margin-bottom: 10rpx;
- color: #fff;
- line-height: 50rpx;
- }
- .weaimg {
- width: 50rpx;
- height: 50rpx;
- }
- .textbox {
- text-align: center;
- color: #fff;
- }
- }
- }
- .functionbox {
- width: 85%;
- margin: 0 auto;
- padding: 30rpx;
- // box-sizing: border-box;
- background-color: #fff;
- border-radius: 30rpx;
- .functionbox_title {
- padding-left: 20rpx;
- font-size: 34rpx;
- }
- .functionbox_text {
- display: flex;
- justify-content: space-around;
- margin-top: 30rpx;
- .functionbox_text_item {
- text-align: center;
- color: #616666;
- .itemimg {
- width: 60rpx;
- height: 60rpx;
- margin-bottom: 20rpx;
- }
- }
- }
- }
- .facilitybox {
- width: 90%;
- margin: 0 auto;
- padding: 30rpx;
- .facilitybox_title {
- font-size: 34rpx;
- // padding-left: 20rpx;
- }
- .facilitybox_itembox {
- display: flex;
- // justify-content: space-around;
- flex-wrap: wrap;
- margin-top: 30rpx;
- .facilitybox_item {
- width: 25%;
- text-align: center;
- color: #616666;
- margin-bottom: 20rpx;
- .itemimg {
- width: 100rpx;
- height: 100rpx;
- margin-bottom: 20rpx;
- }
- }
- }
- }
- .insectattack {
- width: 90%;
- margin: 0 auto;
- padding: 30rpx;
- .insectattack_title {
- font-size: 34rpx;
- // padding-left: 20rpx;
- display: flex;
- justify-content: space-between;
- .iconbox {
- width: 40rpx;
- height: 40rpx;
- background-color: #cfd6d6;
- color: #909696;
- border-radius: 40rpx;
- line-height: 40rpx;
- text-align: center;
- font-size: 20rpx;
- }
- }
- .insectattack_listbox {
- // padding: 0 20rpx;
- overflow-x: auto;
- .insectattack_list {
- width: 1104rpx;
- display: flex;
- margin-top: 30rpx;
- flex-wrap: wrap;
- .list_box {
- // background-color: #f00;
- background-size: 100% 100%;
- width: 246rpx;
- height: 324rpx;
- margin-right: 30rpx;
- border-radius: 20rpx;
- position: relative;
- .list_boxbg {
- width: 100%;
- height: 100%;
- position: absolute;
- top: 0;
- left: 0;
- z-index: -1;
- .list_boxbg_img {
- width: 100%;
- height: 100%;
- }
- }
- .list_box_xiang {
- width: 95%;
- margin-top: 0rpx auto;
- display: flex;
- justify-content: flex-end;
- padding-top: 20rpx;
- .list_box_xiang_click {
- padding: 8rpx 15rpx;
- background-color: rgba(0, 0, 0, 0.2);
- color: #fff;
- font-size: 20rpx;
- border-radius: 52rpx;
- }
- }
- .list_box_info {
- width: 90%;
- margin: 130rpx auto 0;
- height: 120rpx;
- border-radius: 10rpx;
- background-image: linear-gradient(
- to right,
- #ffffff,
- rgba(255, 255, 255, 0.44)
- );
- padding: 10rpx;
- box-sizing: border-box;
- .list_box_info_name {
- font-weight: 700;
- }
- .list_box_info_text {
- font-size: 18rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- }
- }
- }
- // .list_box1 {
- // background-image: url(../../static/images/newindex/cao.png);
- // }
- // .list_box2 {
- // background-image: url(../../static/images/newindex/yee.jpg);
- // }
- // .list_box3 {
- // background-image: url(../../static/images/newindex/lingc.jpg);
- // }
- // .list_box4 {
- // background-image: url(../../static/images/newindex/ming.png);
- // }
- // .list_box5 {
- // background-image: url(../../static/images/newindex/mai.png);
- // }
- // .list_box6 {
- // background-image: url(../../static/images/newindex/dadou.jpg)
- // }
- // .list_box7 {
- // background-image: url(../../static/images/newindex/yumi.png);
- // }
- // .list_box8 {
- // background-image: url(../../static/images/newindex/dao.png);
- // }
- }
- }
- }
- .loading {
- position: absolute;
- top: 0;
- left: 0;
- z-index: 100;
- width: 100%;
- height: 100vh;
- background-color: rgba(0, 0, 0, 0.5);
- display: flex;
- justify-content: center;
- align-items: center;
- }
- </style>
|