From 66c227f7d60edea9f03005fc261f8cba1f3e3301 Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Thu, 2 Feb 2023 09:19:08 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E7=94=B3=E8=AF=B7=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/request.js | 4 +- pages.js | 4 +- pages.json | 38 ++++++++++------- pages/home/index.vue | 2 +- pages/home/my.vue | 7 ++++ pages/purchase/apply.vue | 3 +- uni.scss | 2 +- .../d-form/components/d-form/d-form.vue | 41 ++++++++++++------- 8 files changed, 65 insertions(+), 36 deletions(-) diff --git a/common/request.js b/common/request.js index b292f9d..beef9c2 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://zrxsae.natappfree.cc` //陈 - default:`http://uq5pak.natappfree.cc` //马 + default:`http://wmyrzw.natappfree.cc` //陈 + // default:`http://uq5pak.natappfree.cc` //马 }:{ default:`http://qv6mj8.natappfree.cc` } diff --git a/pages.js b/pages.js index b324d8f..dd16d4e 100644 --- a/pages.js +++ b/pages.js @@ -38,13 +38,13 @@ module.exports = hot((pagesJson)=>{ list: [ // {name:"测试页面",path:"pages/demo"}, // {name: "地块管理",path: "pages/massif/mana/index","query": ""}, + {name: "地块基本信息",path: "pages/massif/info","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/massifDetail","query": ""}, - {name: "地块基本信息",path: "pages/massifInfo","query": ""} + {name: "地块详情",path: "pages/massif/detail","query": ""}, ] } } diff --git a/pages.json b/pages.json index 5d99eac..d1ed763 100644 --- a/pages.json +++ b/pages.json @@ -1,16 +1,26 @@ { - "easycom":{ - "^u-(.*)":"uview-ui/components/u-$1/u-$1.vue" - }, - "globalStyle": { - "navigationBarTextStyle": "black", - "navigationBarTitleText": "uni-app", - "navigationBarBackgroundColor": "#F8F8F8", - "backgroundColor": "#F8F8F8" - }, - "uniIdRouter": {}, - "condition" : { - "current": 0, - "list": [] - } + "easycom" : { + "^u-(.*)" : "uview-ui/components/u-$1/u-$1.vue" + }, + "globalStyle" : { + "navigationBarTextStyle" : "black", + "navigationBarTitleText" : "uni-app", + "navigationBarBackgroundColor" : "#F8F8F8", + "backgroundColor" : "#F8F8F8" + }, + "uniIdRouter" : {}, + "condition" : { + "current" : 0, + "list" : [] + }, + "pages" : [ + { + "path" : "pages/home/index", + "style" : {} + }, + { + "path" : "pages/massif/info", + "style" : {} + } + ] } diff --git a/pages/home/index.vue b/pages/home/index.vue index 4ddd170..66e183b 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -314,7 +314,7 @@ 农事记录 - 投入品 + 投入品 diff --git a/pages/home/my.vue b/pages/home/my.vue index f67a0c6..05d1ca3 100644 --- a/pages/home/my.vue +++ b/pages/home/my.vue @@ -84,6 +84,13 @@ import {host} from '@/common/request' host, } }, + onLoad(options){ + this.$nextTick(()=>{ + if(options.toPage){ + uni.navigateTo({url:`/pages/purchase/${options.toPage}`}) + } + }) + }, methods:{ } diff --git a/pages/purchase/apply.vue b/pages/purchase/apply.vue index ba3a190..2d04281 100644 --- a/pages/purchase/apply.vue +++ b/pages/purchase/apply.vue @@ -146,6 +146,7 @@ export default { } }, onLoad(){ + uni.reLaunch({url:"/pages/home/my?toPage=record"}) this.init() }, methods:{ @@ -175,7 +176,7 @@ export default { body: this.formData }) if(res.statu){ - uni.showToast({title:"保存成功!",icon:"success"}) + uni.switchTab({url:"/pages/home/my?toPage=record"}) }else{ uni.showModal({ title:"提示", diff --git a/uni.scss b/uni.scss index 7af790c..bed6796 100644 --- a/uni.scss +++ b/uni.scss @@ -77,7 +77,7 @@ $uni-font-size-paragraph:15px; @import '@/common/main.css'; @import 'uview-ui/theme.scss'; -@import url('https://at.alicdn.com/t/c/font_3852037_jjiimlkafse.css'); +@import url('https://at.alicdn.com/t/c/font_3852037_dzizkbp2jzo.css'); [class*=plant-]{ font-family: "plantMana" !important; font-size: 16px; diff --git a/uni_modules/d-form/components/d-form/d-form.vue b/uni_modules/d-form/components/d-form/d-form.vue index 6da6cee..8809653 100644 --- a/uni_modules/d-form/components/d-form/d-form.vue +++ b/uni_modules/d-form/components/d-form/d-form.vue @@ -427,40 +427,51 @@ import {dataType} from 'black-knight/lib/config/tools' openMap(){ /* #ifdef APP-PLUS */ this.showMap=true + if(!this.maps){ var amap=uni.createMapContext("amap",this) - +for(var i in plus.maps.MapStyles){ + console.log(i,'-plus.maps.MapStyles-------') +} this.maps=amap.$getAppMap() this.maps.setMapType(plus.maps.MapType.MAPTYPE_SATELLITE) + + var polyline=new plus.maps.Polyline([]) + polyline.setLineWidth(8) + polyline.setStrokeColor("#10C176") + this.maps.addOverlay(polyline) + this.maps.onclick=(e)=>{ - if(this.value.length<0){ + if(this.value.length<=0 && this.markerList.length<=2){ + var marker=new plus.maps.Marker(new plus.maps.Point(e.longitude, e.latitude)); + marker.setIcon("/static/map_point_1.png"); + marker.bringToTop() + marker.setDraggable(true) + marker.onDrag= e=>{ + console.log("-----Drag:",JSON.stringify(e.getPoint())) + } + this.markerList.push(marker) + this.maps.addOverlay(marker); + polyline.setPath(this.markerList.map(v=>{ + var point=v.getPoint() + return new plus.maps.Point(point.longitude, point.latitude) + })) } - console.log(e,'-------maps--click---------') } + // var polygon=new plus.maps.Polygon([ // new plus.maps.Point(116.39524,39.925301), // new plus.maps.Point(116.400444,39.925285), // new plus.maps.Point(116.400558,39.923282), // new plus.maps.Point(116.395502,39.923082), // ]) - // polygon.setLineWidth(2) + // polygon.setLineWidth(3) // polygon.setStrokeColor("#10C176") // polygon.setFillColor("#10C176") // polygon.setFillOpacity(0.3) // this.maps.addOverlay(polygon) - var marker=new plus.maps.Marker(new plus.maps.Point(116.396137,39.924055)); - marker.setIcon("/static/map_point_1.png"); - marker.bringToTop() - marker.setDraggable(true) - marker.onclick= e=>{ - console.log('---onclick----') - } - marker.onDrag= e=>{ - console.log("-----Drag:",JSON.stringify(e.getPoint())) - } - this.maps.addOverlay(marker); } /* #endif */ }