zouling 1 ano atrás
pai
commit
a8ba3b59e1
46 arquivos alterados com 3722 adições e 262 exclusões
  1. 2 1
      App.vue
  2. 75 0
      components/footer/footer.vue
  3. 558 0
      components/picker/selectMorePicker.vue
  4. 69 0
      components/toptab/banner.vue
  5. 175 0
      components/toptab/phonebtn.vue
  6. 2 1
      config.js
  7. 18 4
      manifest.json
  8. 67 34
      pages.json
  9. 112 0
      pages/index - 副本.vue
  10. 34 32
      pages/index.vue
  11. 79 190
      pages/login.vue
  12. 8 0
      pages/news/index.vue
  13. 505 0
      pages/work/setwoek.nvue
  14. BIN
      static/images/banbg.png
  15. BIN
      static/images/banner.png
  16. BIN
      static/images/icon_banner_hd__selected.png
  17. BIN
      static/images/icon_banner_hd_normal.png
  18. BIN
      static/images/icon_dl_gx_normal.png
  19. BIN
      static/images/icon_hp_gd_more.png
  20. BIN
      static/images/icon_hp_gg.png
  21. BIN
      static/images/icon_hp_xwzx_gdxl.png
  22. BIN
      static/images/icon_tq_dy.png
  23. BIN
      static/images/logo.png
  24. BIN
      static/images/pic_hp_smsy_bg.png
  25. BIN
      static/images/pic_hp_sy_jdjs_bg.png
  26. BIN
      static/images/pic_hp_yy_cb.png
  27. BIN
      static/images/tabbar/home.png
  28. BIN
      static/images/tabbar/home_.png
  29. BIN
      static/images/tabbar/mine.png
  30. BIN
      static/images/tabbar/mine_.png
  31. BIN
      static/images/tabbar/news.png
  32. BIN
      static/images/tabbar/news_.png
  33. BIN
      static/images/tabbar/work.png
  34. BIN
      static/images/tabbar/work_.png
  35. 6 0
      static/index.html
  36. 100 0
      static/style.css
  37. 0 0
      utils/amap-wx.js
  38. 110 0
      utils/common.js
  39. 17 0
      utils/initmap.js
  40. 620 0
      utils/location.js
  41. 582 0
      work/pages/map/map.vue
  42. 575 0
      work/pages/map/maps.nvue
  43. 8 0
      work/pages/work/index.vue
  44. BIN
      work/static/adress.png
  45. BIN
      work/static/map.png
  46. BIN
      work/static/search.png

+ 2 - 1
App.vue

@@ -30,5 +30,6 @@
 </script>
 
 <style lang="scss">
-  @import '@/static/scss/index.scss'
+  @import '@/static/scss/index.scss';
+  @import "@/static/style.css";
 </style>

+ 75 - 0
components/footer/footer.vue

@@ -0,0 +1,75 @@
+<template>
+	<view>
+		
+	
+	<view style="height: 100rpx;"></view>
+    <view class="com_footer">
+		<block v-for="(item,k) in footlist" :key="k" >
+			<view class="in_item" v-if="(item.limit&&checkPermi([item.limit]))||!item.limit" @click="gotopage(item)">
+				<view class="in_imgs">
+					<image  :class="item.imgtype"  v-if="active == item.module" :src="item.icon_checked" mode="scaleToFill"></image>
+					<image :class="item.imgtype" v-else :src="item.icon_nochecked" mode="scaleToFill"></image>
+				</view>
+				<view class="in_txt" v-if="active == item.module" :style="'color: #'+color_checked">{{item.title}}</view>
+				<view class="in_txt" v-else :style="'color: #'+color_nochecked">{{item.title}}</view>
+			</view>
+		</block>
+        
+    </view>
+	</view>
+</template>
+
+<script>
+	// import api from '../../api/api.js'
+	import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
+    export default {
+		props:[
+			'footlist',
+			'footerindex',
+			'color_checked',
+			'color_nochecked',
+			'isHomeIndex'
+		],
+        data () {
+            return{
+				active :'',
+            }
+        },
+		mounted() {
+			var that = this;
+			this.active = this.footerindex;
+		},
+        methods:{
+			checkPermi,checkRole,
+            // 跳转底部导航页面
+			gotopage(e){
+				var that = this;
+				let link = e.link, module = e.module, def = e.default, title = e.title;
+				if(module == 'home'){
+					this.$tab.reLaunch('/pages/index')
+				}else if(module == 'mine'){
+					this.$tab.reLaunch('/pages/mine/index')
+				}else if(module == 'news'){
+					this.$tab.reLaunch('/pages/news/index')
+				}
+			},
+			
+        }
+    }
+</script>
+
+
+
+<style lang="scss" scoped>
+    .com_footer{ display: flex;position: fixed;box-sizing: border-box;z-index: 99;width: 100%;height: 100rpx;bottom: 0;left: 0;background-color: #fff;overflow: hidden;box-shadow: 0px 0px 16rpx 0px rgba(87,87,87,0.41);
+		.in_item{ display: block;flex: 1;padding: 12rpx 0 0 0;overflow: hidden; }
+		.in_imgs{ display: block;width: 48rpx;height: 48rpx;margin: 0 auto; display: flex;align-items: center;justify-content: center;
+			.img1{width: 32rpx;height: 46rpx;}
+			.img2{width: 36rpx;height: 38rpx;}
+			.img3{width: 40rpx;height: 48rpx;}
+		
+		}
+		.in_txt{ font-size: 22rpx;color: #999;text-align: center; font-weight: bold;}
+		.in_txt_on{ color: #20AD20; }
+	}
+</style>

+ 558 - 0
components/picker/selectMorePicker.vue

@@ -0,0 +1,558 @@
+<template name="aui-picker">
+	<view class="aui-picker" v-if="SHOW" :class="{
+		'aui-picker-in': FADE==1,
+		'aui-picker-out': FADE==0}"
+	>
+		
+		<view class="aui-picker-main">
+			<view class="aui-mask" @click.stop="close"></view>
+	        <view class="aui-picker-header">
+				<view @click.stop="close" class="aui-picker-close" >取消</view>
+	            <view class="aui-picker-title" v-if="title">{{title}}</view>
+	            <!-- <view class="aui-picker-close iconfont iconclose" ></view> -->
+				<!-- <view class="aui-picker-sure" @click.stop="getSure" v-if="titflag">确定</view> -->
+				<view class="aui-picker-sure" @click.stop="getSure" >确定</view>
+	        </view>
+	        <view class="aui-picker-nav">
+				<view class="aui-picker-navitem"
+					v-if="nav.length>0"
+					v-for="(item, index) in nav" 
+					:key="index" 
+					:data-index="index" 
+					:class="[index==navCurrentIndex ? 'active' : '', 'aui-picker-navitem-'+index]" 
+		
+					@click.stop="_changeNav($event)"
+				>{{item.name}}</view>	
+							<!-- :style="{margin: nav.length>2 ? '0 10px 0 0' : '0 30px 0 0'}" -->
+				<view class="aui-picker-navitem"									
+					:key="nav.length" 
+					:data-index="nav.length"
+					:class="[nav.length==navCurrentIndex ? 'active' : '', 'aui-picker-navitem-'+nav.length]" 
+					
+					@click.stop="_changeNav($event)"
+				>请选择</view>
+				<!-- :style="{margin: nav.length>2 ? '0 10px 0 0' : '0 30px 0 0'}" -->
+				<view class="aui-picker-navborder" :style="{left: navBorderLeft+'px'}"></view>
+			</view>
+	        <view class="aui-picker-content">
+	            <view class="aui-picker-lists">
+					<view class="aui-picker-list"
+						v-for="(list, index) in queryItems.length + 1"
+						:key="index" 
+						:data-index="index" 
+						:class="[index==navCurrentIndex ? 'active' : '']"
+					>
+						<view class="aui-picker-list-warp" v-if="index == 0">
+							<view class="aui-picker-item" 
+								v-for="(item, key) in items" 
+								v-if="item.pid=='0'"
+								:key="key"
+								:data-pindex="index"
+								:data-index="key"
+								:data-areaid="item.areaId" 
+								:data-pid="item.pid"
+								:data-name="item.name"
+								:class="{'active': result.length>index && result[index].areaid==item.areaId}"
+								:style="{'background': touchConfig.index==key && touchConfig.pindex==index ? touchConfig.style.background : ''}"
+								@click.stop="_chooseItem($event)"
+								@touchstart="_btnTouchStart($event)"
+								@touchmove="_btnTouchEnd($event)"
+								@touchend="_btnTouchEnd($event)"
+							>{{item.name}}</view>
+						</view>
+						<view class="aui-picker-list-warp" v-else>
+							<view class="aui-picker-item" 
+								v-for="(item, key) in queryItems[index-1]"
+								:key="key"
+								:data-pindex="index"
+								:data-index="key"
+								:data-areaid="item.areaId"
+								:data-pid="item.pid"
+								:data-name="item.name"
+								:class="{'active': result.length>index && result[index].areaid==item.areaId}"
+								:style="{'background': touchConfig.index==key && touchConfig.pindex==index ? touchConfig.style.background : ''}"
+								@click.stop="_chooseItem($event)"
+								@touchstart="_btnTouchStart($event)"
+								@touchmove="_btnTouchEnd($event)"
+								@touchend="_btnTouchEnd($event)"
+							>{{item.name}}</view>
+						</view>
+					</view>
+				</view>
+	        </view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: 'aui-picker',
+		props: {
+			title: { //标题
+				type: String,
+				default: ''
+			},
+			titflag:{
+				type: Boolean,
+				default: false,
+			},
+			layer: { //控制几级联动,默认无限级(跟随数据有无下级)
+				type: Number,
+				default: null
+			},
+			data: { //数据 如:[{id: '', name: '', children: [{id: '', name: ''}]}]
+				type: Array,
+				default (){
+					return [
+						// [{id: '', name: '', children: [{id: '', name: ''}]}]
+					]
+				}
+			}
+		},
+		data(){
+			return {
+				SHOW: false,
+				FADE: -1,
+				nav: [],
+				items: [],
+				queryItems: [],
+				navCurrentIndex: 0,
+				navBorderLeft: 25,
+				result: [],
+				touchConfig: {
+					index: -1,
+					pindex: -1,
+					style: {
+						color: '#197DE0',
+						background: '#EFEFEF'
+					} 
+				},
+				loadflag:false
+			}
+		},
+		created(){
+			const _this = this;
+		},
+		watch:{
+			data(){
+				
+				const _this = this;
+				const data = _this.data;
+				_this.items = _this._flatten(data, '0')
+	    }  
+	  },
+		mounted(){
+			
+		},
+		methods:{
+			// 打开
+			open(e){
+				const _this = this;			
+					if(e==1){
+						_this.reset(); //打开时重置picker
+					}
+	
+				return new Promise(function(resolve, reject){
+					_this.SHOW = true;
+					_this.FADE = 1;
+					resolve();
+				});
+			},
+			// 关闭
+			close(){
+				const _this = this;
+				return new Promise(function(resolve, reject){
+					_this.FADE = 0;
+					const _hidetimer = setTimeout(()=>{
+						_this.SHOW = false;
+						_this.FADE = -1;
+						clearTimeout(_hidetimer);
+						resolve();						
+					},100)	
+				});
+			},
+			//重置
+			reset(){
+				const _this = this;
+				_this.queryItems = [];
+				_this.nav = [];
+				_this.navBorderLeft = 25;
+				_this.navCurrentIndex = 0;
+				_this.result = [];
+			},
+			//导航栏切换
+			_changeNav(e){
+				const _this = this;
+				const index = Number(e.currentTarget.dataset.index);
+				_this.navCurrentIndex = index;
+				const _el = uni.createSelectorQuery().in(this).select(".aui-picker-navitem-"+index);
+				_el.boundingClientRect(data => {
+					_this.navBorderLeft = data.left + 15;
+				}).exec();
+			},
+			//数据选择
+			_chooseItem(e){
+				// 加载的时候禁止点击
+				if(this.loadflag){
+					return
+				}
+				this.loadflag=true;
+				const _this = this;
+				const areaid = e.currentTarget.dataset.areaid;
+				const name = e.currentTarget.dataset.name;
+				const pid = e.currentTarget.dataset.pid;
+				const _arr = [];
+				// 获取新数据
+				_this.result[_this.navCurrentIndex] = {areaid: areaid, name: name, pid: pid};
+				_this.$http.post('boman-system/chinaArea/treeSelect',{pid: areaid}).then(res=>{
+					this.loadflag=false;
+					if(res.data.length>0){
+						if(_this.navCurrentIndex == _this.queryItems.length)
+						{ //选择数据
+							_this.queryItems.push(res.data);
+							_this.nav.push({name: name});
+						}
+						else
+						{ //重新选择数据
+							_this.queryItems.splice(_this.navCurrentIndex+1);
+							_this.nav.splice(_this.navCurrentIndex+1);
+							_this.queryItems.splice(_this.navCurrentIndex, 1, res.data);
+							_this.nav.splice(_this.navCurrentIndex, 1, {name: name});
+							//清空后面的选择
+							_this.result.splice(Number(_this.navCurrentIndex+1))
+						}
+						_this.navCurrentIndex = _this.navCurrentIndex + 1;
+						const _el = uni.createSelectorQuery().in(this).select(".aui-picker-navitem-"+_this.navCurrentIndex);
+						setTimeout(()=>{
+							_el.boundingClientRect(data => {
+								_this.navBorderLeft = data.left + 15;
+							}).exec();
+						},100)
+					}else{
+						//无下级数据
+						_this.close().then(()=>{
+							_this.$emit("callback", {status: 0, data: _this.result});
+						});
+					}
+				})
+				// _this.result[_this.navCurrentIndex] = {areaId: areaId, name: name, pid: pid};
+				// if(
+				// 	(!_this._isDefine(_this.layer) && _this._isDefine(_this._deepQuery(_this.data, areaId).children)) 
+				// 	|| 
+				// 	(_this.navCurrentIndex < (Number(_this.layer) - 1) && _this._isDefine(_this._deepQuery(_this.data, areaId).children))
+				// )
+				// { //有下级数据
+				// 	_this._deepQuery(_this.data, areaId).children.forEach(function(item, index){
+				// 		_arr.push({areaId: item.areaId, name: item.name, pid: id});
+				// 	});
+				// 	if(_this.navCurrentIndex == _this.queryItems.length)
+				// 	{ //选择数据
+				// 		_this.queryItems.push(_arr);
+				// 		_this.nav.push({name: name});
+				// 	}
+				// 	else
+				// 	{ //重新选择数据
+				// 		_this.queryItems.splice(_this.navCurrentIndex+1, 1);
+				// 		_this.nav.splice(_this.navCurrentIndex+1, 1);
+				// 		_this.queryItems.splice(_this.navCurrentIndex, 1, _arr);
+				// 		_this.nav.splice(_this.navCurrentIndex, 1, {name: name});
+				// 	}
+				// 	_this.navCurrentIndex = _this.navCurrentIndex + 1;
+				// 	const _el = uni.createSelectorQuery().in(this).select(".aui-picker-navitem-"+_this.navCurrentIndex);
+				// 	setTimeout(()=>{
+				// 		_el.boundingClientRect(data => {
+				// 			_this.navBorderLeft = data.left + 20;
+				// 		}).exec();
+				// 	},100)
+				// }
+				// else
+				// { //无下级数据
+				// 	_this.close().then(()=>{
+				// 		_this.$emit("callback", {status: 0, data: _this.result});
+				// 	});
+				// }
+			},	
+			getSure(){
+				this.close().then(()=>{
+					this.$emit("callback", {status: 0, data: this.result});
+				});
+			},
+			//递归遍历——将树形结构数据转化为数组格式
+			_flatten(tree, pid) {
+				return tree.reduce((arr, {areaId, name, children = []}) =>
+				arr.concat([{areaId, name, pid}], this._flatten(children, areaId)), [])
+			},
+			//根据id查询对应的数据(如查询id=10100对应的对象)
+			_deepQuery(tree, areaId) {
+			    let isGet = false;
+			    let retNode = null;
+			    function deepSearch(tree, areaId){
+			        for(let i = 0; i < tree.length; i++) {
+			            if(tree[i].children && tree[i].children.length > 0) {
+			                deepSearch(tree[i].children, areaId);
+			            }
+			            if(areaId === tree[i].areaId || isGet) {
+			                isGet||(retNode = tree[i]);
+			                isGet = true;
+			                break;
+			            }
+			        }
+			    }
+			    deepSearch(tree, areaId);
+			    return retNode;
+			},
+			/***判断字符串是否为空
+			   @param {string} str 变量
+			   @example: aui.isDefine("变量");
+			*/
+			_isDefine(str){
+				if (str==null || str=="" || str=="undefined" || str==undefined || str=="null" || str=="(null)" || str=='NULL' || typeof (str)=='undefined'){
+					return false;
+				}else{
+					str = str + "";
+					str = str.replace(/\s/g, "");
+					if (str == ""){return false;}
+					return true;
+				}
+			},
+			_btnTouchStart(e){
+				const _this = this,
+					index = Number(e.currentTarget.dataset.index),
+					pindex = Number(e.currentTarget.dataset.pindex);
+				_this.touchConfig.index = index;
+				_this.touchConfig.pindex = pindex;
+			},
+			_btnTouchEnd(e){
+				const _this = this,
+					index = Number(e.currentTarget.dataset.index),
+					pindex = Number(e.currentTarget.dataset.pindex);
+				_this.touchConfig.index = -1;
+				_this.touchConfig.pindex = -1;
+			},	
+		}
+	}
+</script>
+
+<style scoped>
+	/* ====================
+		多级联动弹窗
+	 =====================*/
+	.aui-picker{
+		width: 100vw;
+		height: 100vh;
+		/* opacity: 0;		 */
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 1200;
+		background: rgba(0,0,0,0.5);
+		/* display: none; */
+	}
+	.aui-picker.aui-picker-in{
+		-moz-animation: aui-fade-in .1s ease-out forwards;
+		-ms-animation: aui-fade-in .1s ease-out forwards;
+		-webkit-animation: aui-fade-in .1s ease-out forwards;
+		animation: aui-fade-in .1s ease-out forwards;
+	}
+	.aui-picker.aui-picker-out{
+		-moz-animation: aui-fade-out .1s ease-out forwards;
+		-ms-animation: aui-fade-out .1s ease-out forwards;
+		-webkit-animation: aui-fade-out .1s ease-out forwards;
+		animation: aui-fade-out .1s ease-out forwards;
+	}
+	.aui-picker-main{
+		width: 100vw;
+		height: 50vh;
+		background: #FFF;
+		border-radius: 15px 15px 0 0;
+		position: absolute;
+		left: 0px;
+		/* bottom: -50vh;		 */
+		bottom: 0vh;		
+		z-index: 999;
+	}
+	.aui-picker.aui-picker-in .aui-picker-main{
+		-moz-animation: aui-slide-up-screen .2s ease-out forwards;
+		-ms-animation: aui-slide-up-screen .2s ease-out forwards;
+		-webkit-animation: aui-slide-up-screen .2s ease-out forwards;
+		animation: aui-slide-up-screen .2s ease-out forwards;
+	}
+	.aui-picker.aui-picker-out .aui-picker-main{
+		-moz-animation: aui-slide-down-screen .2s ease-out forwards;
+		-ms-animation: aui-slide-down-screen .2s ease-out forwards;
+		-webkit-animation: aui-slide-down-screen .2s ease-out forwards;
+		animation: aui-slide-down-screen .2s ease-out forwards;
+	}
+	.aui-picker-header{
+		width: 100%;
+		height: 50px;
+		position: relative;
+		z-index: 999;
+		background: #F2F2F2;
+		border-radius: 15px 15px 0 0;
+		display: flex;
+		align-items: center;
+	}
+	.aui-picker-header::after{
+		content: '';
+		width: 100%;
+		height: 1px;
+		background: rgba(100,100,100,.3);
+		-moz-transform: scaleY(.3);
+		-ms-transform: scaleY(.3);
+		-webkit-transform: scaleY(.3);
+		transform: scaleY(.3);
+		position: absolute;
+		left: 0;
+		bottom: 0;
+		z-index: 999;
+	}
+	.aui-picker-title{
+		line-height: 20px;
+		text-align: center;
+		font-size: 17px;
+		color: #333;
+		padding: 15px;
+		box-sizing: border-box;
+		flex: 1;
+		text-align: center;
+		/* position: absolute;
+		left: 50px;
+		right: 50px;
+		top: 0; */
+	}
+	.aui-picker-close{
+		font-size: 15px;
+		color: #333333;
+		flex: 0 0 auto;
+		height: 50px;
+		width: 60px;
+		text-align: center;
+		line-height: 50px;
+	}
+	.aui-picker-sure{
+		flex: 0 0 auto;
+		font-size: 15px;
+		color: #197DE0;
+		height: 50px;
+		width: 60px;
+		text-align: center;
+		line-height: 50px;
+	}
+	/* .aui-picker-close.iconfont{
+		width: 50px;
+		height: 50px;
+		line-height: 50px;
+		text-align: center;
+		font-size: 20px;
+		color: #aaa;
+		border-radius: 0 10px 0 0;
+		position: absolute;
+		right: 0;
+		top: 0;
+	} */
+	.aui-picker-content{
+		width: 100%;
+		height: -webkit-calc(100% - 100px);
+		height: calc(100% - 100px);
+	}
+	.aui-picker-nav{
+		width: 100%;
+		height: 50px;
+		text-align: left;
+		padding: 0 20rpx;
+		margin: 0 0 1px 0;
+		justify-content: flex-start;
+		white-space: nowrap;
+		box-sizing: border-box;
+		position: relative;
+		display: flex;
+		align-items: center;
+	}
+	.aui-picker-nav::after{
+		content: '';
+		width: 100%;
+		height: 1px;
+		background: rgba(100,100,100,.3);
+		-moz-transform: scaleY(.3);
+		-ms-transform: scaleY(.3);
+		-webkit-transform: scaleY(.3);
+		transform: scaleY(.3);
+		position: absolute;
+		left: 0;
+		bottom: 0;
+		z-index: 999;
+	}
+	.aui-picker-navitem{
+		flex: 1;
+		max-width:70px ;
+		/* width: 80px; */
+		line-height: 50px;
+		font-size: 16px;
+		
+		text-align: center;
+		display: inline-block;
+		overflow: hidden;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+	}
+	.aui-picker-navitem.active{
+		color: #197DE0;
+	}
+	.aui-picker-navborder{
+		width: 40px;
+		height: 3px;
+		background: #197DE0;
+		border-radius: 5px;
+		transition: left .15s;
+		position: absolute;
+		left: 25px;
+		bottom: 0;
+	}
+	.aui-picker-lists{
+		width: 100%;
+		height: 100%;
+		justify-content: space-around;
+		white-space: nowrap;
+	}
+	.aui-picker-list{
+		width: 100%;
+		height: 100%;
+		overflow: hidden;
+		overflow-y: scroll;
+		display: none;
+		vertical-align: top;
+	}
+	.aui-picker-list.active{
+		display: inline-block;
+	}
+	.aui-picker-list-warp{
+		width: 100%;
+		height: auto;
+		box-sizing: border-box;
+		padding: 15px 0;
+		display: inline-block;
+	}
+	.aui-picker-item{
+		width: 100%;
+		height: 50px;
+		line-height: 50px;
+		padding: 0 15px;
+		box-sizing: border-box;
+		font-size: 15px;
+		color: #333;
+		position: relative;
+	}
+	.aui-picker-item.active{
+		color: #197DE0;
+	}
+	.aui-picker-item.active::after{
+		content: '✔';
+		font-size: 15px;
+		color: #197DE0;
+		position: absolute;
+		top: 0px;
+		right: 10px;
+	}
+
+</style>

+ 69 - 0
components/toptab/banner.vue

@@ -0,0 +1,69 @@
+<template>
+	<view class="hometop">
+		<swiper class="swiper" circular :indicator-active-color="activecolor" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
+			:duration="duration">
+			<block v-for="(ite,idx) in bannerlist" :key='idx'>
+				<swiper-item>
+					<image :src="baseUrl+ite.path" class="swiperimg"></image>
+				</swiper-item>
+			</block>
+		</swiper>
+		<image :src="bannerbg" class="bange"></image>
+	</view>
+</template>
+
+<script>
+	import config from '@/config.js';
+	const baseUrl = config.baseUrl;
+	export default{
+		props:{
+			bannerlist:{
+				type: Array,
+				default () {
+					return []
+				}
+			},
+		},
+		data(){
+			return{
+				bannerbg:require("@/static/images/banbg.png"),
+				activecolor:'#ffffff',
+				indicatorDots: true,
+				autoplay: false,
+				interval: 2000,
+				duration: 500,
+				baseUrl:''
+			}
+		},
+		mounted() {
+			// this.baseUrl=baseUrl
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.hometop{position: relative;}
+	.swiper{height: 560rpx;position: relative;
+		.swiperimg{width: 100%;height: 100%;}
+	}
+	.swiper /deep/ .uni-swiper-wrapper .uni-swiper-dot{
+		width:10rpx;height:10rpx;border-radius: 50%;background: transparent;border: 2rpx solid #ffffff;box-sizing: border-box;
+		}
+	.swiper /deep/ .uni-swiper-wrapper .uni-swiper-dot-active{
+		width: 22rpx;height: 10rpx;border-radius: 5rpx;background-color: #ffffff;
+	}
+	.swiper /deep/ .uni-swiper-wrapper .uni-swiper-dots-horizontal{
+		left: auto;right: 48rpx;bottom: 260rpx;transform: none;
+	}
+	// wx
+	.swiper /deep/ .wx-swiper-wrapper .wx-swiper-dot{
+		width:10rpx;height:10rpx;border-radius: 50%;background: transparent;border: 2rpx solid #ffffff;box-sizing: border-box;
+		}
+	.swiper /deep/ .wx-swiper-wrapper .wx-swiper-dot-active{
+		width: 22rpx;height: 10rpx;border-radius: 5rpx;background-color: #ffffff;
+	}
+	.swiper /deep/ .wx-swiper-wrapper .wx-swiper-dots-horizontal{
+		left: auto;right: 48rpx;bottom: 260rpx;transform: none;
+	}
+	.bange{position: absolute;left: 0;right: 0;height: 276rpx;bottom: -44rpx;width: 100%;}
+</style>

+ 175 - 0
components/toptab/phonebtn.vue

@@ -0,0 +1,175 @@
+<template>
+  <view>
+	  <view class="box_hei" @click="getClose" v-if="type">
+	  	<view @click.stop="btns"  class="hei_box">
+	  		<view class="box_top">
+	  			<view class="box_title">
+	  				<view>
+	  					痘姆古陶 申请使用
+	  				</view>
+	  			</view>
+	  			<view class="box_nameq">你的手机号码</view>
+	  		</view>
+	  		<!-- <view class="boxs"></view> -->
+	  		<view class="box_btns">
+	  			<view @click="getClose" class="box_btn box_btn1">拒绝</view>
+	  			<button class="box_btn box_btn2" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">允许</button>
+	  		</view>
+	  	</view>
+	  </view>
+  </view>
+</template>
+
+<script>
+	// import tabSearch from "@/components/toptab/search.vue"
+	import {getweChatOpenid} from "@/api/login.js"
+  export default {
+	  props:{
+		type:{
+			type:Boolean,
+			default () {
+				return true
+			}
+		},
+	  },
+	data(){
+		return{
+		}
+	},
+	methods:{
+		getClose(){
+			this.$emit("getClose")
+		},
+		btns(){
+			
+		},
+		async getPhoneNumber(e){
+			const {iv,encryptedData} = e.detail;
+			var that=this;
+			uni.login({
+			    provider: 'weixin',
+			    success: (res) => {
+			        // 获取用户信息
+					if(res.code) {
+						var params={
+							iv: iv,
+							encryptedData: encryptedData,
+							code : res.code,
+						}
+						// 登录还是注册
+						that.$emit("getPhoneNumber",params)
+						
+					}
+			    }
+			})			
+		}, 
+	},
+	onLoad: function() {
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+.box_hei{
+		width: 100%;
+		height: 100%;
+		background: rgba(0,0,0,.8);
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 3;
+		.hei_box{
+			background: #fff;
+			border-radius:22upx 22upx 0 0;
+			height: 440upx;
+			padding: 52upx 28upx 104upx;
+			position: absolute;
+			bottom:0;
+			width: 100%;
+			box-sizing: border-box;
+			.box_top{
+				padding: 0 18upx 62upx;
+				.box_title{
+					display: flex;
+					justify-content: space-between;
+					font-size: 30upx;
+					margin-bottom: 30upx;
+					view{
+						display: flex;
+						align-items: center;
+						color: #333333;
+					}
+					.img{
+						margin-right: 14upx;
+						width: 180upx;
+						height: 48upx;
+					}
+					.imgs{
+						width: 40upx;
+						height: 40upx;
+					}
+				}
+				.box_nameq{
+					color: #333333;
+					font-size: 44upx;
+					font-weight: bold;
+				}
+			}
+			.box_phone{
+				height: 106upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				font-size: 28upx;
+				color: #A6A6A6;
+				border-bottom: 1upx solid #EBEBEB;
+				border-top: 1upx solid #EBEBEB;
+				view{
+					display: flex;
+					align-items: center;
+				}
+				.img{
+					width: 26upx;
+					height: 22upx;
+				}
+				span{
+					color: #333333;
+					font-size: 32upx;
+					padding-right: 18upx;
+					font-weight: bold;
+				}
+			}
+			.box_qita{
+				height: 106upx;
+				font-size: 28upx;
+				color: #7CA4FC;
+				line-height: 106upx;
+			}
+			.boxs{
+				height: 50upx;
+			}
+			.box_btns{
+				margin-top: 10upx;
+				display: flex;
+				justify-content: space-between;
+				.box_btn{
+					width: 324upx;
+					height: 82upx;
+					font-size: 32upx;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					border-radius: 4upx;
+				}
+				.box_btn1{
+					background: #F3F3F3;
+					color: #33B925;
+				}
+				.box_btn2{
+					background: #37962B;
+					color: #FFFFFF;
+				}
+			}
+		}
+	}
+</style>

+ 2 - 1
config.js

@@ -1,7 +1,8 @@
 // 应用全局配置
 module.exports = {
   // baseUrl: 'https://vue.ruoyi.vip/prod-api',
-  baseUrl: 'http://192.168.101.168:8010',
+  baseUrl: 'http://192.168.3.189:8045',
+  // baseUrl: 'http://192.168.3.168:8080',
   // baseUrl: 'http://localhost:8080',
   // 应用信息
   appInfo: {

+ 18 - 4
manifest.json

@@ -41,7 +41,7 @@
     },
     "quickapp" : {},
     "mp-weixin" : {
-        "appid" : "wxccd7e2a0911b3397",
+        "appid" : "wx694b1ba10320b8bc",
         "setting" : {
             "urlCheck" : false,
             "es6" : false,
@@ -51,7 +51,12 @@
         "optimization" : {
             "subPackages" : true
         },
-        "usingComponents" : true
+        "usingComponents" : true,
+        "permission" : {
+            "scope.userLocation" : {
+                "desc" : "获取当前位置"
+            }
+        }
     },
     "vueVersion" : "2",
     "h5" : {
@@ -62,8 +67,17 @@
         },
         "title" : "RuoYi-App",
         "router" : {
-            "mode" : "hash",
-            "base" : "./"
+            "mode" : "history",
+            "base" : ""
+        },
+        "sdkConfigs" : {
+            "maps" : {
+                "amap" : {
+                    "key" : "330d7ec4510f8c49f8f6de0ee34f2187",
+                    "securityJsCode" : "e46619c3cb629347dc27b8ae75063440",
+                    "serviceHost" : ""
+                }
+            }
         }
     }
 }

+ 67 - 34
pages.json

@@ -1,20 +1,24 @@
 {
-  "pages": [{
-    "path": "pages/login",
-    "style": {
-      "navigationBarTitleText": "登录"
-    }
-  }, {
+  "pages": [
+	{
+	  "path": "pages/login",
+	  "style": {
+	    "navigationBarTitleText": "登录",
+		"navigationStyle": "custom"
+	  }
+	}, 
+	  {
+	    "path": "pages/index",
+	    "style": {
+	      "navigationBarTitleText": "若依移动端框架",
+	      "navigationStyle": "custom"
+	    }
+	  }, 
+	  {
     "path": "pages/register",
     "style": {
       "navigationBarTitleText": "注册"
     }
-  }, {
-    "path": "pages/index",
-    "style": {
-      "navigationBarTitleText": "若依移动端框架",
-      "navigationStyle": "custom"
-    }
   }, {
     "path": "pages/work/index",
     "style": {
@@ -71,29 +75,58 @@
       "navigationBarTitleText": "浏览文本"
     }
   }],
-  "tabBar": {
-    "color": "#000000",
-    "selectedColor": "#000000",
-    "borderStyle": "white",
-    "backgroundColor": "#ffffff",
-    "list": [{
-        "pagePath": "pages/index",
-        "iconPath": "static/images/tabbar/home.png",
-        "selectedIconPath": "static/images/tabbar/home_.png",
-        "text": "首页"
-      }, {
-        "pagePath": "pages/work/index",
-        "iconPath": "static/images/tabbar/work.png",
-        "selectedIconPath": "static/images/tabbar/work_.png",
-        "text": "工作台"
-      }, {
-        "pagePath": "pages/mine/index",
-        "iconPath": "static/images/tabbar/mine.png",
-        "selectedIconPath": "static/images/tabbar/mine_.png",
-        "text": "我的"
-      }
-    ]
+  "subPackages": [
+  	{
+  		"root": "work",
+		"pages": [
+			{"path": "pages/work/index",
+			"style": {
+				"navigationBarTitleText": "工作台",
+				"h5":{
+					"titleNView":false
+					}
+				}
+			},
+			{"path": "pages/map/map",
+			"style": {
+				"navigationBarTitleText": "地图",
+				"h5":{
+					"titleNView":false
+					}
+				}
+			}
+		]
+  	}
+  ],
+  "preloadRule":{
+	"pages/index": {
+		"network": "all",
+		"packages": ["work"]
+	}  
   },
+  // "tabBar": {
+  //   "color": "#000000",
+  //   "selectedColor": "#000000",
+  //   "borderStyle": "white",
+  //   "backgroundColor": "#ffffff",
+  //   "list": [{
+  //       "pagePath": "pages/index",
+  //       "iconPath": "static/images/tabbar/home.png",
+  //       "selectedIconPath": "static/images/tabbar/home_.png",
+  //       "text": "首页"
+  //     }, {
+  //       "pagePath": "pages/work/index",
+  //       "iconPath": "static/images/tabbar/news.png",
+  //       "selectedIconPath": "static/images/tabbar/news_.png",
+  //       "text": "新闻"
+  //     }, {
+  //       "pagePath": "pages/mine/index",
+  //       "iconPath": "static/images/tabbar/mine.png",
+  //       "selectedIconPath": "static/images/tabbar/mine_.png",
+  //       "text": "我的"
+  //     }
+  //   ]
+  // },
   "globalStyle": {
     "navigationBarTextStyle": "black",
     "navigationBarTitleText": "RuoYi",

+ 112 - 0
pages/index - 副本.vue

@@ -0,0 +1,112 @@
+<template>
+  <view class="content">
+    <image class="logo" src="@/static/logo.png"></image>
+    <view class="text-area">
+      <text class="title" @click="getMap">Hello RuoYi</text>
+    </view>
+	<!-- <footers v-if="isfootflag" :footlist="footlist" :footerindex="footerindex" :color_checked="color_checked" :color_nochecked="color_nochecked" :isHomeIndex="true"></footers> -->
+  </view>
+</template>
+
+<script>
+import self from "@/utils/location.js"
+import footers from '@/components/footer/footer.vue'
+  export default {
+	data(){
+	  return{
+		// footlist:[
+		// 	{module:'home',title:'首页',icon_checked:require('@/static/images/tabbar/home_.png'),icon_nochecked:require('@/static/images/tabbar/home.png'),},
+		// 	{module:'work',title:'课表',icon_checked:require('@/static/images/tabbar/work_.png'),icon_nochecked:require('@/static/images/tabbar/work.png'),limit:'course:table:list'},
+		// 	{module:'trends',title:'动态',icon_checked:require('@/static/images/tabbar/trends_.png'),icon_nochecked:require('@/static/images/tabbar/trends.png'),limit:'xiaoYuan:notice:list'},
+		// 	{module:'mine',title:'我的',icon_checked:require('@/static/images/tabbar/mine_.png'),icon_nochecked:require('@/static/images/tabbar/mine.png')},
+		// 	],
+		// footerindex:'home',
+		// isfootflag:true,
+	  }
+	},
+	components:{footers},
+    onLoad: function() {
+		this.getLocation()
+    },
+	methods:{
+		getLocation(){
+			self.getLocation(function(res){
+				console.log(res)		
+			})
+		},
+		getMap(){
+			// #ifdef MP-WEIXIN
+			this.$tab.navigateTo('/work/pages/map/map?type=update&lng=117.211954&lat=31.839676&address=时代数码港')
+			// #endif
+			
+		},
+		getphotoFn(e){
+			let that = this;
+			let file =[],count=9
+			if(e=='zj'){
+				file = that.zjfile;
+				count=9
+			}else{
+				file = that.mjfile;
+				count=9
+			}
+			if(file.length < count){
+				uni.chooseImage({
+					count: count - parseInt(file.length),
+					success:function(res){
+						let img= res.tempFilePaths;
+						if(img.length + file.length > count){
+							uni.showToast({
+								title: '最多上传'+count+'张图片',
+								icon: 'none',
+								duration: 2000
+							})
+						}else{
+							let imglen = res.tempFilePaths.length;
+							var fuwufile = [];
+							uploadmore('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
+								if(e=='zj'){
+									that.zjfile = that.zjfile.concat(rs);
+									that.datainfo.identificationPhoto=that.zjfile.join(',')
+								}else{
+									that.mjfile = that.mjfile.concat(rs);
+									that.datainfo.entrancePermit=that.mjfile.join(',')
+								}
+								// console.log(that.datainfo.image,85)
+							})	
+						}
+					}
+				});
+			}
+		},
+	}
+  }
+</script>
+
+<style>
+  .content {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+  }
+
+  .logo {
+    height: 200rpx;
+    width: 200rpx;
+    margin-top: 200rpx;
+    margin-left: auto;
+    margin-right: auto;
+    margin-bottom: 50rpx;
+  }
+
+  .text-area {
+    display: flex;
+    justify-content: center;
+  }
+
+  .title {
+    font-size: 36rpx;
+    color: #8f8f94;
+  }
+</style>

+ 34 - 32
pages/index.vue

@@ -1,43 +1,45 @@
 <template>
-  <view class="content">
-    <image class="logo" src="@/static/logo.png"></image>
-    <view class="text-area">
-      <text class="title">Hello RuoYi</text>
-    </view>
+  <view class="home">
+	<banner :bannerlist="bannerlist"></banner>
+	<footers v-if="isfootflag" :footlist="footlist" :footerindex="footerindex" :color_checked="color_checked" :color_nochecked="color_nochecked" :isHomeIndex="true"></footers>
   </view>
 </template>
 
 <script>
+import self from "@/utils/location.js"
+import banner from "@/components/toptab/banner.vue"
+import footers from '@/components/footer/footer.vue'
   export default {
+	components:{footers,banner},
+	data(){
+	  return{
+		  // limit:'course:table:list'
+		footlist:[
+			{module:'home',title:'首页',icon_checked:require('@/static/images/tabbar/home_.png'),icon_nochecked:require('@/static/images/tabbar/home.png'),imgtype:'img1',},
+			{module:'news',title:'新闻',icon_checked:require('@/static/images/tabbar/news_.png'),icon_nochecked:require('@/static/images/tabbar/news.png'),imgtype:'img2',},
+			{module:'mine',title:'我的',icon_checked:require('@/static/images/tabbar/mine_.png'),icon_nochecked:require('@/static/images/tabbar/mine.png'),imgtype:'img3',},
+			],
+		footerindex:'home',
+		isfootflag:true,
+		color_checked :'7D5F2A',
+		color_nochecked :'7C5E29',
+		bannerlist:[
+			{path:require("@/static/images/banner.png")},
+			{path:require("@/static/images/banner.png")},
+		],
+	  }
+	},
+	
     onLoad: function() {
-    }
+		
+    },
+	methods:{
+	}
   }
 </script>
 
-<style>
-  .content {
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: center;
-  }
-
-  .logo {
-    height: 200rpx;
-    width: 200rpx;
-    margin-top: 200rpx;
-    margin-left: auto;
-    margin-right: auto;
-    margin-bottom: 50rpx;
-  }
-
-  .text-area {
-    display: flex;
-    justify-content: center;
-  }
-
-  .title {
-    font-size: 36rpx;
-    color: #8f8f94;
-  }
+<style scoped lang="scss">
+.home{
+	
+}
 </style>

+ 79 - 190
pages/login.vue

@@ -1,202 +1,91 @@
 <template>
-  <view class="normal-login-container">
-    <view class="logo-content align-center justify-center flex">
-      <image style="width: 100rpx;height: 100rpx;" :src="globalConfig.appInfo.logo" mode="widthFix">
-      </image>
-      <text class="title">若依移动端登录</text>
-    </view>
-    <view class="login-form-content">
-      <view class="input-item flex align-center">
-        <view class="iconfont icon-user icon"></view>
-        <input v-model="loginForm.username" class="input" type="text" placeholder="请输入账号" maxlength="30" />
-      </view>
-      <view class="input-item flex align-center">
-        <view class="iconfont icon-password icon"></view>
-        <input v-model="loginForm.password" type="password" class="input" placeholder="请输入密码" maxlength="20" />
-      </view>
-      <view class="input-item flex align-center" style="width: 60%;margin: 0px;" v-if="captchaEnabled">
-        <view class="iconfont icon-code icon"></view>
-        <input v-model="loginForm.code" type="number" class="input" placeholder="请输入验证码" maxlength="4" />
-        <view class="login-code"> 
-          <image :src="codeUrl" @click="getCode" class="login-code-img"></image>
-        </view>
-      </view>
-      <view class="action-btn">
-        <button @click="handleLogin" class="login-btn cu-btn block bg-blue lg round">登录</button>
-      </view>
-      <view class="reg text-center" v-if="register">
-        <text class="text-grey1">没有账号?</text>
-        <text @click="handleUserRegister" class="text-blue">立即注册</text>
-      </view>
-      <view class="xieyi text-center">
-        <text class="text-grey1">登录即代表同意</text>
-        <text @click="handleUserAgrement" class="text-blue">《用户协议》</text>
-        <text @click="handlePrivacy" class="text-blue">《隐私协议》</text>
-      </view>
-    </view>
-     
+  <view class="regbox">
+	  <view class="rggtop flex0"></view>
+	  <image :src="headimg" class="headimg flex0"></image>
+	   
+	  <view class="flex1">
+		  <button  type="primary" class="rbtn mb20 mt50" open-type="getUserInfo" @getuserinfo="getuserinfo">
+		  	<text class="btn-txt">微信一键登录</text>
+		  </button>
+			<view class="lread" @click="checkflag=!checkflag">
+				<view class="lreadl">
+					<image :src="checkimg" v-if="checkflag"></image>
+					<image :src="ncheckimg" v-else></image>
+				</view>
+				<view class="tit">阅读后自行选择是否同意<text @click.stop="handlePrivacy">用户协议</text>及<text @click.stop="handlePrivacy">隐私政策</text></view>
+			</view>
+	  </view>
+	  <!-- <phone-btn :type="typeflag" @getPhoneNumber='getPhoneNumber' @getClose="getClose"></phone-btn> -->
   </view>
 </template>
 
 <script>
-  import { getCodeImg } from '@/api/login'
-
+	import phoneBtn from "@/components/toptab/phonebtn.vue"
   export default {
-    data() {
-      return {
-        codeUrl: "",
-        captchaEnabled: true,
-        // 用户注册开关
-        register: false,
-        globalConfig: getApp().globalData.config,
-        loginForm: {
-          username: "admin",
-          password: "admin123",
-          code: "",
-          uuid: ''
-        }
-      }
-    },
-    created() {
-      this.getCode()
+	  components:{
+		  phoneBtn
+	  },
+	data(){
+		return{
+			headimg:require('@/static/images/logo.png')
+		}
+	},
+	
+	methods:{
+		 async getuserinfo(e) {
+			 // if(!this.checkflag){
+				//  this.$toast("请同意用户协议")
+				//  return
+			 // }
+		 	const {iv,encryptedData} = e.detail
+		 	const {nickName, avatarUrl, ...userInfo} = e.detail.userInfo
+			// console.log(e.detail)
+		 	try{
+				uni.login({
+                    provider: 'weixin',
+                    success: (res) => {
+                        // 获取用户信息
+						if(res.code){
+							this.avatarUrl = avatarUrl
+							this.nickName = nickName
+							this.code = res.code
+							this.userInfo =e.detail.userInfo
+							uni.setStorageSync('userInfo', e.detail.userInfo)
+							uni.setStorageSync('lcheckflag',true)
+							this.typeflag=true;
+						}
+                    }
+                })
+		 	} catch(e){
+		 		//TODO handle the exception
+		 	}
+		 },
+	},
+	
+	onLoad: function() {	
     },
-    methods: {
-      // 用户注册
-      handleUserRegister() {
-        this.$tab.redirectTo(`/pages/register`)
-      },
-      // 隐私协议
-      handlePrivacy() {
-        let site = this.globalConfig.appInfo.agreements[0]
-        this.$tab.navigateTo(`/pages/common/webview/index?title=${site.title}&url=${site.url}`)
-      },
-      // 用户协议
-      handleUserAgrement() {
-        let site = this.globalConfig.appInfo.agreements[1]
-        this.$tab.navigateTo(`/pages/common/webview/index?title=${site.title}&url=${site.url}`)
-      },
-      // 获取图形验证码
-      getCode() {
-        getCodeImg().then(res => {
-          this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
-          if (this.captchaEnabled) {
-            this.codeUrl = 'data:image/gif;base64,' + res.img
-            this.loginForm.uuid = res.uuid
-          }
-        })
-      },
-      // 登录方法
-      async handleLogin() {
-        if (this.loginForm.username === "") {
-          this.$modal.msgError("请输入您的账号")
-        } else if (this.loginForm.password === "") {
-          this.$modal.msgError("请输入您的密码")
-        } else if (this.loginForm.code === "" && this.captchaEnabled) {
-          this.$modal.msgError("请输入验证码")
-        } else {
-          this.$modal.loading("登录中,请耐心等待...")
-          this.pwdLogin()
-        }
-      },
-      // 密码登录
-      async pwdLogin() {
-        this.$store.dispatch('Login', this.loginForm).then(() => {
-          this.$modal.closeLoading()
-          this.loginSuccess()
-        }).catch(() => {
-          if (this.captchaEnabled) {
-            this.getCode()
-          }
-        })
-      },
-      // 登录成功后,处理函数
-      loginSuccess(result) {
-        // 设置用户信息
-        this.$store.dispatch('GetInfo').then(res => {
-          this.$tab.reLaunch('/pages/index')
-        })
-      }
-    }
   }
 </script>
 
-<style lang="scss">
-  page {
-    background-color: #ffffff;
-  }
-
-  .normal-login-container {
-    width: 100%;
-
-    .logo-content {
-      width: 100%;
-      font-size: 21px;
-      text-align: center;
-      padding-top: 15%;
-
-      image {
-        border-radius: 4px;
-      }
-
-      .title {
-        margin-left: 10px;
-      }
-    }
-
-    .login-form-content {
-      text-align: center;
-      margin: 20px auto;
-      margin-top: 15%;
-      width: 80%;
-
-      .input-item {
-        margin: 20px auto;
-        background-color: #f5f6f7;
-        height: 45px;
-        border-radius: 20px;
-
-        .icon {
-          font-size: 38rpx;
-          margin-left: 10px;
-          color: #999;
-        }
-
-        .input {
-          width: 100%;
-          font-size: 14px;
-          line-height: 20px;
-          text-align: left;
-          padding-left: 15px;
-        }
-
-      }
-
-      .login-btn {
-        margin-top: 40px;
-        height: 45px;
-      }
-      
-      .reg {
-        margin-top: 15px;
-      }
-      
-      .xieyi {
-        color: #333;
-        margin-top: 20px;
-      }
-      
-      .login-code {
-        height: 38px;
-        float: right;
-      
-        .login-code-img {
-          height: 38px;
-          position: absolute;
-          margin-left: 10px;
-          width: 200rpx;
-        }
-      }
-    }
-  }
+<style lang="scss" scoped>
+.regbox{
+	min-height: 100vh;background-color: #f6f2e9;display: flex;flex-direction: column;
+	.rggtop{width: 100%;height: 314rpx;background: linear-gradient(180deg, #EACBA2 0%, rgba(236,207,167,0) 100%);}
+	.rbtn{
+		width: 616rpx;height: 100rpx;border-radius: 50rpx;background-color: #D4A354 ;
+		.btn-txt{font-size: 30rpx;color: #FFFFFF;}
+	}
+}
+.headimg{width: 294rpx;height: 100rpx;margin:0 auto 36rpx;}
+.lread{
+	display: flex;align-items: flex-start;justify-content: center;
+	.lreadl{padding-top: 4rpx;
+		image{width: 28rpx;height: 28rpx;margin-right: 14rpx;}
+	}
+	.tit{font-size: 26rpx;font-weight: 500;color: #666666;line-height: 40rpx;
+		text{color: #4775EA;text-decoration: underline;padding: 0 6rpx;}
+	}
+}
 
+// app
 </style>

+ 8 - 0
pages/news/index.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 505 - 0
pages/work/setwoek.nvue

@@ -0,0 +1,505 @@
+<template>
+	<view class="setbox">
+		<map
+			id="container"
+			class="map"
+			:latitude="center.lat"
+			:longitude="center.lng"
+			@poitap="onClcikImgMap"
+			@tap="onClcikImgMap"
+			:markers="covers"
+			scale="15"
+			:style="'width: 750rpx;height:' + mapheight + 'px;'"
+		></map>
+
+		<view class="maptop">
+			<view class="maptopflex">
+				<image :src="serimg" class="maptopimg"></image>
+				<input ref='input' class="maptopint" id="tipInputs" v-model="searchtxt" @input="searchKeyword" placeholder="请输入地点进行查找" />
+			</view>
+			<!-- 地图联想 -->
+			<view class="addrSearch_list" >
+				<view class="addrSearch_item" v-for="(item, index) in searchList" :key="index" @click="handleAddrClick(item)" @blur='getblur'>
+					<view class="wrap_name">
+						<!-- #ifdef H5 -->
+						<text class="wrap_text">{{item.name.substring(0, item.name.indexOf(searchtxt))}}</text>
+							<text class="wrap_text" style="color: #2797FF;">{{searchtxt}}</text>
+							<text class="wrap_text">{{item.name.substring(item.name.indexOf(searchtxt) + searchtxt.length)}}</text>
+						<!-- #endif -->
+						<!-- #ifndef H5 -->
+						<rich-text :nodes="richNodes(item)"></rich-text>
+						<!-- #endif -->
+					</view>
+					<view class="wrap_addr">
+						<text class="wrap_addrs">{{ item.addr }}</text>
+					</view>
+				</view>
+			</view>
+		</view>
+
+		<view class="mapfot">
+			<view class="mapfott"><text class="mapfottit">标点位置</text></view>
+			<view class="mapfotx">
+				<image :src="adrimg" class="mapfotimg"></image>
+				<text class="mapfottxt" v-if="address">{{ address }}</text>
+			</view>
+			<view class="mapfotn" @click="getNextFn"><text class="mapfotntit">下一步</text></view>
+		</view>
+	</view>
+</template>
+
+<script>
+import amapFile from '@/plugins/amap-wx.js';
+import self from "@/utils/location.js"
+// #ifdef APP
+var myAmapFun = new amapFile.AMapWX({
+	key: '55d039b2d1dbcb54e792bca4de9c3500',
+	batch: true
+	});
+// #endif
+
+
+	export default{
+		data(){
+			return{
+				serimg:require("@/static/images/serch.png"),
+				adrimg:require("@/static/images/adress.png"),
+				mapimg:require("@/static/images/map.png"),
+				center:{
+					lng:'117.211954',
+					lat:'31.839676',
+				},
+				mapflag:false,
+				// userId: this.$store.state.user.userId,
+				// deptId: this.$store.state.user.deptId,
+				address:'',
+				searchtxt:'',
+				type:'add',//新增还是修改,
+				placeSearchComponent:'',
+				autoCompleteComponent:'',
+				map:'',
+				covers: [{
+					latitude: 31.839676,
+					longitude: 117.211954,
+					iconPath: require("@/static/images/map.png"),
+					anchor:{x: 0.5, y: 0.5}
+				}],
+				mapheight:0,
+				mapContext:"",
+				searchList:[],
+				focus:false,
+				location:'',
+			}
+		},
+		onReady() {
+			this.getcreateMap()
+		},
+		onLoad(e) {
+			if(e.type=='update'){
+				this.type='update'
+				this.center.lng=e.lng;
+				this.center.lat=e.lat;
+				this.address=e.address;
+			}else{
+				if(e.address){
+					this.type='update'
+					this.center.lng=e.lng;
+					this.center.lat=e.lat;
+					this.address=e.address;
+				}else{
+					this.type='add';
+				}
+				
+			}
+			if(e.fromurl){
+				this.fromurl=e.fromurl
+			}
+		},
+		mounted() {
+			var that=this;
+			this.getinfo();
+			if(this.type=='add'){
+				this.getlocation()
+			}else{				
+				var lng=this.center.lng;
+				var lat=this.center.lat;
+				that.covers = [];
+				that.covers = [{
+					latitude: lat,
+					longitude: lng,
+					iconPath: that.mapimg,
+					anchor:{x: 0.5, y: 0.5}
+				}]
+				// #ifdef APP
+				that.getCity(lat,  lng)
+				// #endif
+			}
+		},
+		methods:{
+			getNextFn(){
+				if(this.type=='add'){
+					if(this.fromurl&&this.fromurl=='rule'){
+						var address={
+							address:this.address,
+							lng:this.center.lng,
+							lat:this.center.lat,
+						}
+						uni.setStorageSync('location', address);
+						uni.$emit('refreshaddr');
+						uni.navigateBack({delta: 1});
+					}else{
+						uni.redirectTo({
+							url: '/work/pages/setswork?type=add&address='+this.address+'&lng='+this.center.lng+'&lat='+this.center.lat
+						});
+					}
+					
+				}else{
+					var address={
+						address:this.address,
+						lng:this.center.lng,
+						lat:this.center.lat,
+					}
+					uni.setStorageSync('location', address);
+					uni.$emit('refreshaddr');
+					uni.navigateBack({delta: 1});
+				}
+				
+			},
+			searchKeyword(){
+				var that=this;
+				if(this.searchtxt){
+					// #ifdef H5
+					AMap.plugin('AMap.PlaceSearch', function(){
+						let autoOptions = {
+							city:'全国',
+							citylimit: true,
+							pageIndex: 1,
+							pageSize: 20,
+						}
+						let placeSearch = new AMap.PlaceSearch(autoOptions);
+						placeSearch.search(that.searchtxt, function(status, result) {
+							// 搜索成功时,result即是对应的匹配数据
+							if (status === 'complete' && result.info === 'OK') {
+								let items = result.poiList.pois;
+								console.log(items,122)
+								if(items.length > 0){
+									var pois = [];
+									for (let i in items) {
+										var obj = {
+											"name": items[i].name,
+											"addr": items[i].address,
+											"lng": items[i].location.lng,
+											"lat": items[i].location.lat
+										};
+										pois.push(obj);
+									}
+									that.searchList = pois;
+								}
+							}else{
+								that.searchList = [];
+							}
+						})
+					})
+					// #endif
+
+					// #ifndef H5
+					myAmapFun.getInputtips({
+						keywords: that.searchtxt,
+						city: '全国',
+						citylimit: true,
+						success: function(result){
+							if(result.tips.length > 0){
+								let pois = [];
+								let items = result.tips;
+								for (let i in items) {
+									var lnglat = items[i].location.split(',');
+									var obj = {
+										"name": items[i].name,
+										"addr": items[i].district + items[i].address,
+										"lng": lnglat[0],
+										"lat": lnglat[1]
+									};
+									pois.push(obj);
+								}
+								that.searchList = pois;
+							}else{
+								that.searchList = [];
+							}
+						},
+						fail: function(info){
+							that.searchList = [];
+							console.log('fail-search', info)
+						}
+					})
+					// #endif
+				}
+			},
+			handleAddrClick(addr){
+				console.log(addr)
+				var that=this;
+				var lng=addr.lng;
+				var lat=addr.lat;
+				that.center.lng=lng;
+				that.center.lat=lat;
+				that.covers = [];
+				that.covers = [{
+					latitude: addr.lat,
+					longitude: addr.lng,
+					iconPath: that.mapimg,
+					anchor:{x: 0.5, y: 0.5}
+				}]
+				that.address=addr.name || addr.addr;
+				that.searchList=[];
+				that.$refs.input.blur()
+				// #ifdef APP
+				that.getCity(lat,  lng)
+				// #endif
+			},
+			richNodes(item){
+			return [{
+				children: [
+					{
+				type: 'text',
+				attrs: {
+				class:'wrap_text'
+				},
+				text: item.name.substring(0, item.name.indexOf(this.searchtxt))
+				},
+				{
+				type: 'text',
+				attrs: {
+				class:'wrap_texts'
+				},
+				text: this.searchtxt
+				},
+				{
+				type: 'text',
+				attrs: {
+				class:'wrap_text'
+				},
+				text: item.name.substring(item.name.indexOf(this.searchtxt) + this.searchtxt.length)
+				}
+				]
+			}]
+			},
+			// 获取当前屏幕信息
+			getinfo(){
+				var that=this;
+				uni.getSystemInfo({
+					success(e) {
+						that.mapheight=e.windowHeight;
+					},
+				})
+			},
+			getcreateMap(){
+				//mapId 就是你在 map 标签中定义的 id
+				this.mapContext = uni.createMapContext('container', this);
+			},
+			onClcikImgMap(e) {
+				var that=this;
+				var lng=e.detail.longitude;
+				var lat=e.detail.latitude;
+				that.center.lng=lng;
+				that.center.lat=lat;
+				that.covers = [];
+				that.covers = [{
+					latitude: e.detail.latitude,
+					longitude: e.detail.longitude,
+					iconPath: that.mapimg,
+					anchor:{x: 0.5, y: 0.5}
+				}]
+				// #ifdef APP
+				that.getCity(lat,  lng)
+				// #endif
+			},
+			//获取中心点
+			getCenterLanLat() {
+				var that = this;
+					this.mapContext.getCenterLocation({
+					  type: 'gcj02',
+					  success: res => {
+					    that.center.lng=res.longitude;
+					    that.center.lat=res.latitude;
+						that.covers = [];
+						that.covers = [{
+							latitude: e.detail.latitude,
+							longitude: e.detail.longitude,
+							iconPath: that.mapimg,
+							anchor:{x: 0.5, y: 0.5}
+						}]
+					    // #ifdef APP
+						
+					    that.getCity(res.latitude,  res.longitude)
+					    // #endif
+					  },
+					  fail: err => {
+					    console.log('获取当前地图中心的经纬度2', err);
+					  },
+					});
+
+			},
+			getCity(latitude, longitude) {
+				var that = this;
+				that.location = `${longitude},${latitude}`
+
+				myAmapFun.getRegeo({
+				//如果经纬度有问题会导致不进入回调方法,从而报错
+					location: that.location,
+					success: function(e) {
+						//成功回调
+						that.address='';
+						that.address = e[0].regeocodeData.formatted_address; //详细地址
+					},
+					fail: function(info) {
+						//失败回调
+						console.log(info)
+					}
+				})
+			},
+			// 获取定位
+			getlocation(){
+				var that = this;
+				uni.getLocation({
+					type: 'gcj02',
+					geocode: true,
+					success: function(res) {
+						that.center.lng=res.longitude;
+						that.center.lat=res.latitude;
+						// #ifdef H5
+						var adr= address.province+address.city+address.district+address.street+address.streetNum+address.poiName
+						// that.address=res.longitude
+						that.address=adr
+						// #endif
+						// #ifdef APP
+
+						that.getCity(res.latitude,  res.longitude)
+						// #endif
+
+					},
+					fail: function(red) {
+						uni.showToast({
+							title:"获取定位失败"
+						})
+					},
+				})
+			},
+			// 点击刷新方法
+			refresh(e){
+				this.getlocation();
+			},
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.maptop {
+	position: fixed;
+	left: 34rpx;
+	right: 34rpx;
+	top: 24rpx;
+}
+.maptopflex {
+	display: flex;
+	align-items: center;
+	padding: 0 32rpx;
+	box-sizing: border-box;
+	flex-direction: row;
+	width: 684rpx;
+	height: 84rpx;
+	background: #ffffff;
+	box-shadow: 0px 0px 12rpx 0px rgba(75, 75, 75, 0.35);
+	border-radius: 6rpx;
+	margin-bottom: 10rpx;
+}
+.maptopimg {
+	width: 36rpx;
+	height: 38rpx;
+	margin-right: 16rpx;
+}
+.maptopint {
+	font-size: 32rpx;
+	color: #666666;
+	flex: 1;
+	height: 84rpx;
+}
+.mapfot {
+	position: fixed;
+	left: 34rpx;
+	right: 34rpx;
+	bottom: 24rpx;
+	background: #fff;
+	box-shadow: 0px 0px 12rpx 0px rgba(75, 75, 75, 0.35);
+	border-radius: 6rpx;
+	padding: 40rpx 32rpx 32rpx;
+	height: 300rpx;
+}
+.mapfott {
+	margin-bottom: 28rpx;
+}
+.mapfottit {
+	font-size: 33rpx;
+	font-weight: bold;
+	color: #343434;
+}
+.mapfotx {
+	display: flex;
+	margin-bottom: 32rpx;
+	min-height: 70rpx;
+	flex-direction: row;
+}
+
+.mapfotimg {
+	width: 26rpx;
+	height: 28rpx;
+	flex: 0 0 auto;
+	margin-right: 12rpx;
+}
+.mapfottxt {
+	flex: 1;
+	font-size: 32rpx;
+	color: #343434;
+	line-height: 32rpx;
+}
+.mapfotn {
+	width: 618rpx;
+	height: 76rpx;
+	background: #1678ff;
+	border-radius: 6rpx;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+}
+.mapfotntit {
+	font-size: 34rpx;
+	color: #fff;
+}
+
+.addrSearch_item {
+	border-bottom: 2upx solid #f5f5f5;
+	padding: 4upx;
+	background: #ffffff;
+}
+.addrSearch_item .wrap_name {
+	display: flex;
+	flex-direction: row !important;
+}
+.wrap_text {
+	font-size: 34upx;
+	color: #151515;
+	line-height: 40upx;
+}
+.wrap_texts{
+	font-size: 34upx;
+	color: #2797FF;
+	line-height: 40upx;
+}
+.addrSearch_item .wrap_addr {
+	margin-top: 2upx;
+}
+.wrap_addrs {
+	font-size: 28upx;
+	color: #999;
+	line-height: 32upx;
+}
+</style>

BIN
static/images/banbg.png


BIN
static/images/banner.png


BIN
static/images/icon_banner_hd__selected.png


BIN
static/images/icon_banner_hd_normal.png


BIN
static/images/icon_dl_gx_normal.png


BIN
static/images/icon_hp_gd_more.png


BIN
static/images/icon_hp_gg.png


BIN
static/images/icon_hp_xwzx_gdxl.png


BIN
static/images/icon_tq_dy.png


BIN
static/images/logo.png


BIN
static/images/pic_hp_smsy_bg.png


BIN
static/images/pic_hp_sy_jdjs_bg.png


BIN
static/images/pic_hp_yy_cb.png


BIN
static/images/tabbar/home.png


BIN
static/images/tabbar/home_.png


BIN
static/images/tabbar/mine.png


BIN
static/images/tabbar/mine_.png


BIN
static/images/tabbar/news.png


BIN
static/images/tabbar/news_.png


BIN
static/images/tabbar/work.png


BIN
static/images/tabbar/work_.png


+ 6 - 0
static/index.html

@@ -11,6 +11,12 @@
 			document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
 		</script>
 		<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
+		<script type="text/javascript">
+		        window._AMapSecurityConfig = {
+		            securityJsCode:'e46619c3cb629347dc27b8ae75063440',
+		        }
+		</script>
+		<script src="https://webapi.amap.com/maps?v=1.4.15&key=330d7ec4510f8c49f8f6de0ee34f2187"></script>
 	</head>
 	<body>
 		<noscript>

+ 100 - 0
static/style.css

@@ -0,0 +1,100 @@
+.flex{display: flex;}
+.flexc{display: flex;align-items: center;}
+.flex1{flex: 1;}
+.flex0{flex: 0 0 auto;}
+.flex01{flex: 0 1 auto;}
+
+.clearf::after {
+  content: "";
+  display: block;
+  clear: both;
+}
+.flexjs{justify-content: space-between;}
+.wordb{word-break: break-all;}
+.fsi{font-style: italic;}
+.w50{width: 50%;}
+
+.txr{text-align: right;}
+.txc{text-align: center;}
+.txl{text-align: left;}
+.pr{position: relative;}
+image{display: block;}
+.overa{overflow: auto;}
+.over{overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
+.overtwo{word-break: break-all;text-overflow: ellipsis;overflow: hidden;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;white-space: normal;}
+
+.w13{width: 26rpx;}
+
+.cof{color: #ffffff;}
+.coa{color: #AAAAAA;}
+.co47{color: #4775EA;}
+.co16{color: #161616;}
+.co6{color: #666666;}
+.co33{color: #336AD5;}
+.coed{color: #ED7B4C;}
+.co5c{color: #5CC37D;}
+.coeb{color: #EB5663;}
+.co8e{color: #8E8E8E;}
+.c37{color: #374C82;}
+.cfe{color: #FE6A7F;}
+.c6b{color: #6B7390;}
+.cff2{color: #FF2D4F;}
+
+
+.f13{font-size: 26rpx;}
+.f14{font-size: 28rpx;}
+.f15{font-size: 30rpx;}
+.f16{font-size: 32rpx;}
+.f17{font-size: 34rpx;}
+.f18{font-size: 36rpx;}
+.f19{font-size: 38rpx;}
+.f25{font-size: 50rpx;}
+.f30{font-size: 60rpx;}
+.ml2{margin-left: 4rpx;}
+.ml6{margin-left: 12rpx;}
+.ml10{margin-left: 20rpx;}
+.mr10{margin-right: 20rpx;}
+.mt12{margin-top: 24rpx;}
+.mt15{margin-top: 30rpx;}
+.mt20{margin-top: 40rpx;}
+.mt26{margin-top: 52rpx;}
+.mt30{margin-top: 60rpx;}
+.mt40{margin-top: 80rpx;}
+.mt50{margin-top: 100rpx;}
+.mb4{margin-bottom: 8rpx;}
+.mb5{margin-bottom: 10rpx;}
+.mb6{margin-bottom: 12rpx;}
+.mb8{margin-bottom: 16rpx;}
+.mb10{margin-bottom: 20rpx;}
+.mb12{margin-bottom: 24rpx;}
+.mb15{margin-bottom: 30rpx;}
+.mb16{margin-bottom: 32rpx;}
+.mb18{margin-bottom: 36rpx;}
+.mb20{margin-bottom: 40rpx;}
+.mb24{margin-bottom: 48rpx;}
+.mb28{margin-bottom: 56rpx !important;}
+.mb30{margin-bottom: 60rpx;}
+.mlr12{margin: 0 24rpx;}
+
+.lh18{line-height: 36rpx;}
+.lh20{line-height: 40rpx;}
+.lh24{line-height: 48rpx;}
+
+.pl6{padding-left: 12rpx;}
+.pl8{padding-left: 16rpx;}
+.pl16{padding-left: 32rpx;}
+.pr8{padding-right: 16rpx;}
+.pt12{padding-top: 24rpx;}
+.pt20{padding-top: 40rpx;}
+.pt80{padding-top: 160rpx;}
+.pb15{padding-bottom: 30rpx;}
+.plr12{padding: 0 24rpx;}
+.plr13{padding: 0 26rpx;}
+.plr18{padding: 0 36rpx;}
+.plr28{padding: 0 56rpx;}
+.ptb4{padding: 8rpx 0;}
+.ptb6{padding: 12rpx 0;}
+.ptb10{padding: 20rpx 0;}
+.fw{font-weight: bold;}
+.fw5{font-weight: 500;}
+.fwn{font-weight: normal;}

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
utils/amap-wx.js


+ 110 - 0
utils/common.js

@@ -26,7 +26,117 @@ export function showConfirm(content) {
     })
   })
 }
+// 字典值匹配
+export function selectDictLabel(datas, value) {
+	var actions = [];
+	Object.keys(datas).some((key) => {
+		if (datas[key].dictLabel == ('' + value)) {
+			actions.push(datas[key].dictValue);
+			return true;
+		}
+	})
+	return actions.join('');
+}
+// 字典值匹配
+export function selectDictValue(datas, value) {
+	var actions = [];
+	Object.keys(datas).some((key) => {
+		if (datas[key].dictValue == ('' + value)) {
+			actions.push(datas[key].dictLabel);
+			return true;
+		}
+	})
+	return actions.join('');
+}
+// 日期格式
+export function  format (fmt) {
+		    var o = {
+		        "M+": this.getMonth() + 1, //月份
+		        "d+": this.getDate(), //日
+		        "h+": this.getHours(), //小时
+		        "m+": this.getMinutes(), //分
+		        "s+": this.getSeconds(), //秒
+		        "q+": Math.floor((this.getMonth() + 3) / 3), //季度
+		        "S": this.getMilliseconds() //毫秒
+		    };
+		    if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
+		    for (var k in o)
+		        if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
+		    return fmt;
+		}
+// 上传
+//上传图片
+export function uploadmore(api, filePaths, successUp, failUp, i, length, files, callback) {
+	const isToken = (config.headers || {}).isToken === false
+	config.header = config.header || {}
+	if (getToken() && !isToken) {
+	  config.header['Authorization'] = 'Bearer ' + getToken();
+	  config.header['clientid']=clientid;
+	}
+	// get请求映射params参数
+	if (config.params) {
+	  let url = config.url + '?' + tansParams(config.params)
+	  url = url.slice(0, -1)
+	  config.url = url
+	}
+	
+	uni.showLoading({
+		title: '上传中'
+	})
+	var failfile = [];
+	uni.uploadFile({
+		timeout: config.timeout || timeout,
+		url: baseUrl + api, //仅为示例,非真实的接口地址
+		filePath: filePaths[i],
+		name: 'file',
+		header: config.header,
+		formData: config.formData,
+		success: function(resp) {
+			uni.hideLoading();
+			let result = JSON.parse(resp.data)
+			const code = result.code || 200
+			const msg = errorCode[code] || result.msg || errorCode['default']
+			// console.log(result.fileName,8)
+			if (result.code == 200) {
+				successUp++;
+				files[i] = result.fileName;
+			} else if(result.code==401) {
+				showConfirm("登录状态已过期,您可以继续留在该页面,或者重新登录?").then(res => {
+				  if (res.confirm) {
+				    store.dispatch('LogOut').then(res => {
+				      uni.reLaunch({ url: '/pages/login/login' })
+				    })
+				  }
+				})
+				callback('无效的会话,或者会话已过期,请重新登录。');
+			}else{
+				failfile = failfile.concat(filePaths[i])
+				failUp++;
+			}
+		},
+		fail: function(res) {
+			uni.hideLoading();
+			failfile = failfile.concat(filePaths[i])
+			failUp++;
+		},
+		complete: function(rsp) {
+			// console.log(rsp, filePaths[i])
+			uni.hideLoading();
+			i++;
+			if (i == length) {
+				// uni.showToast({
+				// 	title: '总共' + successUp + '张上传成功,' + failUp + '张上传失败!',
+				// 	icon: 'none',
+				// 	duration: 2000
+				// });
+				callback(files);
+			} else { //递归调用upload函数
+				uploadmore(api, filePaths, successUp, failUp, i, length, files, callback);
+			}
+		}
+	});
 
+}
 /**
 * 参数处理
 * @param params 参数

+ 17 - 0
utils/initmap.js

@@ -0,0 +1,17 @@
+import amap from '@/utils/amap-wx.js';
+// 调用高德SDK
+var key='';
+// #ifdef H5
+key='330d7ec4510f8c49f8f6de0ee34f2187'
+// 密钥 e46619c3cb629347dc27b8ae75063440
+// #endif
+// #ifdef APP-PLUS
+key='086e84a2b611922e4f59fdd54c90ff37'
+// #endif
+// #ifdef MP-WEIXIN
+key='086e84a2b611922e4f59fdd54c90ff37'
+// #endif
+const myAmapFun =new amap.AMapWX({
+	key:key
+})
+export default myAmapFun

+ 620 - 0
utils/location.js

@@ -0,0 +1,620 @@
+import myAmapFun from "@/utils/initmap.js"
+var __CFG = null;
+//系统参数
+__CFG = __CFG || {
+	'lat': '',
+	'lng': '',
+	'address': '',
+	'city':'',
+	"UxLocation": {
+		"lng": "",
+		"lat": "",
+		"address": "",
+		'city':'',
+		'temperature':'',
+		'weather':'',
+		'icon':''
+	},
+	iconWeatherMap:[{tit:'风',val:'weaiona',children:['有风', '平静', '微风', '和风', '清风', '强风/劲风', '疾风', '大风', '烈风', '风暴', '狂爆风', '飓风', '热带风暴', '龙卷风']},
+	{tit:'多云',val:'weaionb',children:['少云','多云']},
+	{tit:'晴间多云',val:'weaionc',children:['晴间多云', ]},
+	{tit:'雪',val:'weaiond',children:['雪', '阵雪', '小雪', '中雪', '大雪', '暴雪', '小雪-中雪', '中雪-大雪', '大雪-暴雪', '冷']},
+	{tit:'雾',val:'weaione',children:['浮尘', '扬沙', '沙尘暴', '强沙尘暴', '雾', '浓雾', '强浓雾', '轻雾', '大雾', '特强浓雾']},
+	{tit:'晴',val:'weaionf',children:['晴', '热']},
+	{tit:'雨夹雪',val:'weaiong',children:['雨雪天气', '雨夹雪', '阵雨夹雪']},
+	{tit:'雨',val:'weaionh',children:['阵雨', '雷阵雨', '雷阵雨并伴有冰雹', '小雨', '中雨', '大雨', '暴雨', '大暴雨', '特大暴雨', '强阵雨', '强雷阵雨', '极端降雨', '毛毛雨/细雨', '雨', '小雨-中雨', '中雨-大雨', '大雨-暴雨', '暴雨-大暴雨', '大暴雨-特大暴雨', '冻雨']},
+	{tit:'阴',val:'weaioni',children:['阴','未知']},
+	{tit:'霾',val:'weaionj',children:['霾', '中度霾', '重度霾', '严重霾',]},
+	],
+};
+function setUxLocation(UxLocation){
+    UxLocation = UxLocation || {};
+	__CFG.lng = UxLocation.lng || '';
+	__CFG.lat = UxLocation.lat || '';
+	__CFG.address = UxLocation.address || UxLocation.addr || '';
+	__CFG.city = UxLocation.city || UxLocation.city || '';
+	__CFG.UxLocation = UxLocation;
+}
+//判断是否微信
+function checkIsWeixin() {
+	if (/(micromessenger)/.test(navigator.userAgent.toLowerCase())) {
+		return true;
+	} else {
+		return false;
+	}
+};
+//设置浏览器cookie
+function set_cookie(key, value, expire, path){
+	var keys = __CFG.C_PREFIX + key;
+	path = path || '/';
+	var a = keys + "=" + value;
+	if(typeof(expire) != 'undefined'){
+		var date = new Date();
+		expire = parseInt(expire,10);
+		date.setTime(date.getTime() + expire*1000);
+		a += "; expires="+date.toGMTString();
+	}
+	a += ";path="+path;
+	if(__CFG.C_DOMAIN){
+		a += ";domain="+__CFG.C_DOMAIN;
+	}
+	document.cookie = a;
+};
+
+//删除浏览器cookie
+function remove_cookie(key){
+	if (!key) {
+		return false;
+	} else {
+		var keys = __CFG.C_PREFIX + key;
+		document.cookie = keys+"=;expires="+(new Date(0)).toGMTString();
+	}
+};
+
+//获取浏览器cookie
+function get_cookie(key) {
+	if (!key) {
+		return false;
+	} else {
+		var keys = __CFG.C_PREFIX + key;
+		var reg = new RegExp("(^| )" + keys + "=([^;]*)(;|\x24)");
+		var result = reg.exec(document.cookie);
+		if (result) {
+			return result[2] || '';
+		}
+		return '';
+	}
+};
+function getLocations(callback) {
+	var uxlocation = {"lng": "", "lat": "", "address": ""};
+	callback = typeof(callback) == 'function' ? callback : function(res) {};
+	if (__CFG.lat == '' || __CFG.lng == '') {
+		// #ifndef H5
+		uni.showLoading({
+			title: '获取位置信息中'
+		})
+		uni.getLocation({
+			type: 'gcj02',
+			geocode: 'true',
+			success: function(res) {
+				uxlocation.lat = res.latitude;
+				uxlocation.lng = res.longitude;
+				myAmapFun.getRegeo({
+					success: function(data) {
+						// #ifdef APP-PLUS
+						/* var latlng = {
+							"lat": res.latitude,
+							"lng": res.longitude
+						}
+						plugins.appLnglat(latlng); */
+						// #endif
+						console.log('getRegeo', data);
+						uxlocation.address = data[0].name;
+						setUxLocation(uxlocation);
+						uni.hideLoading();
+						//成功回调
+					},
+					fail: function(info) {
+						//失败回调
+						// console.log(info)
+						uni.navigateTo({
+							url: '/pages/addr/selectReceive'
+						})
+					}
+				})
+				setUxLocation(uxlocation);
+				callback();
+			},
+			
+			fail: function(error) {
+				if (count <= 1) {
+					uni.showToast({
+						icon: 'none',
+						title: '定位失败'
+					})
+				}
+
+				// #ifdef APP-PLUS
+				// plus.nativeUI.alert(JSON.stringify(error))
+				// #endif
+
+				//callback();
+				uni.navigateTo({
+					url: '/pages/addr/selectReceive'
+				})
+			},
+			complete: function(rs) {
+				console.log('complete:'+JSON.stringify(rs))
+			}
+		})
+		// #endif
+		
+		// #ifdef H5
+		var selat = '', selng = '', seaddress = '';
+		if(sessionStorage.getItem('UxLocation')){
+			var uxl = JSON.parse(sessionStorage.getItem('UxLocation'));
+			selat = uxl.lat || '';
+			selng = uxl.lng || '';
+			seaddress = uxl.addr || '';
+		}
+		
+		if (selat && selng){
+			uxlocation.lng = selng;
+			uxlocation.lat = selat;
+			uxlocation.address = seaddress;
+			setUxLocation(uxlocation);
+			callback();	
+		}else{
+			if(checkIsWeixin()){
+				getLocal(function(){
+					callback();
+				});
+			}else{
+				setTimeout(function (){
+					AMap.plugin('AMap.Geolocation', function() {
+						var geolocation = new AMap.Geolocation({
+							enableHighAccuracy: false, // 是否使用高精度定位,默认:true
+							timeout: 10000, // 设置定位超时时间,默认:无穷大
+							// showMarker: true, //定位成功后在定位到的位置显示点标记,默认:true
+							// showCircle: true, //定位成功后用圆圈表示定位精度范围,默认:true
+							// panToLocation: true, //定位成功后将定位到的位置作为地图中心点,默认:true
+							// zoomToAccuracy:true, //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
+							extensions:'all' // 返回周边POI、道路交叉口等信息
+						});
+						geolocation.getCurrentPosition()
+						AMap.event.addListener(geolocation, 'complete', onComplete)
+						AMap.event.addListener(geolocation, 'error', onError)
+						function onComplete (data) {
+							console.log('onComplete:',data);
+							var uaddress = '';
+							if(data.pois && data.pois.length > 0){
+								uaddress = data.pois[0].name;
+							}else if(data.formattedAddress){
+								uaddress = data.formattedAddress;
+							}else if( data.addressComponent){
+								uaddress = data.addressComponent.city + data.addressComponent.district
+							}
+							
+							uxlocation.lng = data.position.lng || '';
+							uxlocation.lat = data.position.lat || '';
+							uxlocation.address = uaddress;
+							setUxLocation(uxlocation);
+							callback();
+						};
+						function onError (data) {
+							// 定位出错
+							uni.navigateTo({
+								url: '/pages/addr/selectReceive'
+							})
+						};
+					})
+				}, 500);
+			}
+		}	
+		// #endif
+	} else {
+		callback();
+	}
+};
+
+function getGeocoder(lng, lat, callback) {
+	callback = typeof(callback) == 'function' ? callback : function(res) {};
+	AMap.plugin('AMap.Geocoder', function() {
+		var geocoder = new AMap.Geocoder({
+			// city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode
+			city: '全国',
+			extensions: 'all'
+		})
+		 
+		var lnglat = [lng, lat];
+
+		geocoder.getAddress(lnglat, function(status, result) {
+			console.log(status,result)
+			if (status === 'complete' && result.info === 'OK') {
+				// result为对应的地理位置详细信息
+				let items = result.regeocode.pois;
+				if(items.length > 0){
+					var pos = {};
+					for (let i in items) {
+						var obj = {
+							"name": items[i].name,
+							"addr": items[i].address,
+							"lng": items[i].location.lng,
+							"lat": items[i].location.lat
+						};
+						if(i == '0'){
+							pos = obj;
+						}
+					}
+					callback(pos);
+				}
+			}else{
+				
+			}
+		})
+	})
+};
+
+//初始化sdk配置  
+function initJssdk(callback ,url){
+	callback = typeof(callback) == 'function' ? callback : function(res) {};
+	//服务端进行签名 ,可使用uni.request替换。 签名算法请看文档  
+	http('client/app/get_wechat',{url:url},function(res){
+		if(res.data){
+			jweixin.config({
+				 debug: false,
+				 appId: res.data.wxjs_config.appId,
+				 timestamp:res.data.wxjs_config.timestamp,
+				 nonceStr: res.data.wxjs_config.nonceStr,
+				 signature:res.data.wxjs_config.signature,
+				 jsApiList: ['checkJsAPi','getLocation','onMenuShareAppMessage','onMenuShareTimeline','onMenuShareQQ','onMenuShareQZone','onMenuShareWeibo','updateAppMessageShareData','updateTimelineShareData','chooseWXPay']
+			});
+			//配置完成后,再执行分享等功能  
+			if(callback){
+				callback(res.data.wxjs_config);
+			}  
+		}
+	},true);  
+};
+	
+// 定位当前位置
+function getLocal(callback){
+	callback = typeof(callback) == 'function' ? callback : function(res) {};
+	var urls = window.location.href;
+	initJssdk(function(signData){ 
+		uni.showLoading({
+			title: '微信定位中...'
+		})
+		var uxlocation = {"lng": "", "lat": "", "address": ""};
+		jweixin.ready(function () {
+			jweixin.getLocation({
+				type: 'gcj02',
+				success: function (res) {
+					uxlocation.lng = res.longitude || '';
+					uxlocation.lat = res.latitude || '';
+					setUxLocation(uxlocation);
+					AMap.plugin('AMap.Geocoder', function() {
+						var geocoder = new AMap.Geocoder({extensions:'all'});
+						AMap.event.addListener(geocoder, 'error', error)
+						var lnglat = [Number(res.longitude), Number(res.latitude)]
+						geocoder.getAddress(lnglat, function(status, result) {
+							if (status === 'complete' && result.info === 'OK') {
+								console.log('complete:',result);
+								uni.hideLoading();
+								// result为对应的地理位置详细信息
+								var addr = '';
+								if(result.regeocode.pois && result.regeocode.pois.length > 0){
+									addr = result.regeocode.pois[0].name;
+								}else if(result.regeocode.formattedAddress){
+									addr = result.regeocode.formattedAddress;
+								}else{
+									addr = result.regeocode.addressComponent.city + result.regeocode.addressComponent.district
+								}
+								uxlocation.address = addr;
+								setUxLocation(uxlocation);
+								callback();
+							}else{
+								uni.hideLoading();
+								callback();
+							}
+						});
+							
+						function error(res){
+							// getGeoLocation(res.longitude,res.latitude);
+							alert('地址信息解析失败');
+							callback();
+						}
+					});
+				},
+				
+				fail: function (res) {
+					uni.hideLoading();
+					alert('微信获取位置失败');
+					uni.navigateTo({
+						url: '/pages/addr/selectReceive'
+					})
+				},
+				
+				cancel: function (res) {
+					uni.hideLoading();
+					alert('用户拒绝获取位置');
+					uni.navigateTo({
+						url: '/pages/addr/selectReceive'
+					})
+				}
+			});
+		});
+	},urls)
+};
+
+function getLocation(callback) {
+	
+	callback = typeof(callback) == 'function' ? callback : function(res) {};
+		var num=1;
+		// #ifdef H5
+		getLocationaddr(callback)
+		// #endif
+		// #ifdef MP-WEIXIN
+		uni.getSetting({
+			success(res) {
+				if(res.authSetting['scope.userLocation'] != undefined){
+					if (res.authSetting['scope.userLocation']) {
+						getLocationaddr(callback)
+						// 已经授权,可以直接调用 getLocation 获取地理位置
+					} else {
+						showConfirm('您还未开启定位,是否去开启定位?').then(cres => {
+						  if (cres.confirm) {
+						    uni.openSetting({
+						    	success(res2) {
+						    		if (res2.authSetting['scope.userLocation']) {
+						    			
+						    		}
+						    	}
+						    });
+							callback(-1)
+						  }
+						})
+					};
+				}else{
+					var uxlocation = {"lng": "", "lat": "", "address": ""};
+					// var citynum=1;
+					uni.getLocation({
+						type: 'gcj02',
+						geocode: 'true',
+						success: function(ares) {
+							uxlocation.lat = ares.latitude;
+							uxlocation.lng = res.longitude;
+							myAmapFun.getRegeo({
+								success: function(data) {
+									// citynum=0;
+									uxlocation.address = data[0].name+data[0].desc||data[0].regeocodeData.formatted_address;
+									uxlocation.city = data[0].regeocodeData.addressComponent.city;
+									setUxLocation(uxlocation);
+									callback(uxlocation);
+									//成功回调
+								},
+								fail: function(info) {
+									//失败回调
+								}
+							})
+							// 获取天气
+							// myAmapFun.getWeather({
+							// 	success(res){
+							// 		//temperature  温度
+							// 		//weather 天气现象
+							// 		uxlocation.city = res.city.data;
+							// 		uxlocation.temperature = res.temperature.data;
+							// 		uxlocation.weather = res.weather.data;
+							// 		var weather=res.weather.data;
+							// 		var weatherMap=__CFG.iconWeatherMap;
+							// 		var url=require('@/static/images/weather/weaionf.png');
+							// 		Object.keys(weatherMap).some((key) => {
+							// 			if (weatherMap[key].children.indexOf(weather)!=-1) {
+							// 				url=require(`@/static/images/weather/${weatherMap[key].val}.png`)
+							// 				return true;
+							// 			}
+							// 		}) 
+							// 		uxlocation.icon = url;
+							// 		setUxLocation(uxlocation);
+							// 		callback(uxlocation);
+							// 	},
+							// 	fail(err){
+							// 		console.log('fail')
+							// 	}
+							// })
+							// if(citynum==1){
+							// 	setUxLocation(uxlocation);
+							// 	callback(uxlocation);
+							// }
+						},
+						
+						fail: function(error) {
+							uni.showToast({
+								icon: 'none',
+								title: '定位失败'
+							})
+					
+							// #ifdef APP-PLUS
+							// #endif
+					
+						},
+						complete: function(rs) {
+							// console.log('complete:'+JSON.stringify(rs))
+						}
+					})
+				}
+			},
+			fail(err) {
+				console.log(err)
+			},
+		})
+		// #endif
+		// #ifdef APP-PLUS
+		let system = uni.getSystemInfoSync();
+			if(system.platform === "android"){
+				var context = plus.android.importClass("android.content.Context");
+				var locationManger = plus.android.importClass("android.location.LocationManager");
+				var main = plus.android.runtimeMainActivity();
+				var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
+				if(!mainSvr.isProviderEnabled(locationManger.GPS_PROVIDER)){
+					uni.showModal({
+						title:"提示",
+						content:"请授权位置获取地址",
+						showCancel:false,
+							success() {
+								if(!mainSvr.isProviderEnabled(locationManger.GPS_PROVIDER)){
+									var Intent = plus.android.importClass("android.content.Intent");
+									var Settings = plus.android.importClass("android.provider.Settings");
+									var intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
+									main.startActivity(intent);
+								}else{
+									console.log("定位已开启")
+									_self.setSite()
+								}
+							}
+						})
+				}else{
+					plus.android.requestPermissions(
+						['android.permission.ACCESS_FINE_LOCATION'], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
+						function(resultObj) {
+							var result = 0;
+							for (var i = 0; i < resultObj.granted.length; i++) {
+								var grantedPermission = resultObj.granted[i];
+								console.log('已获取的权限:' + grantedPermission);
+								result = 1
+							}
+							for (var i = 0; i < resultObj.deniedPresent.length; i++) {
+								var deniedPresentPermission = resultObj.deniedPresent[i];
+								console.log('拒绝本次申请的权限:' + deniedPresentPermission);
+								result = 0
+							}
+							for (var i = 0; i < resultObj.deniedAlways.length; i++) {
+								var deniedAlwaysPermission = resultObj.deniedAlways[i];
+								console.log('永久拒绝申请的权限:' + deniedAlwaysPermission);
+								result = -1
+							}
+							// resolve(result);
+							// 若所需权限被拒绝,则打开APP设置界面,可以在APP设置界面打开相应权限
+							if (result != 1) {
+								showConfirm('您还未开启定位,是否去开启定位?').then(res => {
+								  if (res.confirm) {
+								    gotoAppPermissionSetting()
+									callback(result)
+								  }
+								})
+							}else{
+								getLocationaddr(callback)
+							}
+						},
+						function(error) {
+							console.log('申请权限错误:' + error.code + " = " + error.message);
+							// resolve({
+							// 	code: error.code,
+							// 	message: error.message
+							// });
+						}
+					);
+				}
+			}
+			
+		// #endif
+};
+// 跳转到**应用**的权限页面
+function gotoAppPermissionSetting() {
+	var isIos
+	// #ifdef APP-PLUS
+	isIos = (plus.os.name == "iOS")
+	// #endif
+	if (isIos) {
+		var UIApplication = plus.ios.import("UIApplication");
+		var application2 = UIApplication.sharedApplication();
+		var NSURL2 = plus.ios.import("NSURL");
+		// var setting2 = NSURL2.URLWithString("prefs:root=LOCATION_SERVICES");		
+		var setting2 = NSURL2.URLWithString("app-settings:");
+		application2.openURL(setting2);
+
+		plus.ios.deleteObject(setting2);
+		plus.ios.deleteObject(NSURL2);
+		plus.ios.deleteObject(application2);
+	} else {
+		var Intent = plus.android.importClass("android.content.Intent");
+		var Settings = plus.android.importClass("android.provider.Settings");
+		var Uri = plus.android.importClass("android.net.Uri");
+		var mainActivity = plus.android.runtimeMainActivity();
+		var intent = new Intent();
+		intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
+		var uri = Uri.fromParts("package", mainActivity.getPackageName(), null);
+		intent.setData(uri);
+		mainActivity.startActivity(intent);
+	}
+}
+function getLocationaddr(callback){
+	callback = typeof(callback) == 'function' ? callback : function(res) {};
+	var uxlocation = {"lng": "", "lat": "", "address": ""};
+	uni.getLocation({
+		type: 'gcj02',
+		geocode: 'true',
+		success: function(res) {
+			uxlocation.lat = res.latitude;
+			uxlocation.lng = res.longitude;
+			myAmapFun.getRegeo({
+				success: function(data) {
+					uxlocation.address = data[0].name+data[0].desc||data[0].regeocodeData.formatted_address;
+					uxlocation.city = data[0].regeocodeData.addressComponent.city;
+					setUxLocation(uxlocation);
+					callback(uxlocation);
+				},
+				fail: function(info) {
+					//失败回调
+					console.log(info,223)
+				}
+			})
+			// 获取天气
+			// myAmapFun.getWeather({
+			// 	success(res){
+			// 		//temperature  温度
+			// 		//weather 天气现象
+			// 		uxlocation.city = res.city.data;
+			// 		uxlocation.temperature = res.temperature.data;
+			// 		uxlocation.weather = res.weather.data;
+			// 		var weather=res.weather.data;
+			// 		var weatherMap=__CFG.iconWeatherMap;
+			// 		var url=require('@/static/images/weather/weaionf.png');
+			// 		Object.keys(weatherMap).some((key) => {
+			// 			if (weatherMap[key].children.indexOf(weather)!=-1) {
+			// 				url=require(`@/static/images/weather/${weatherMap[key].val}.png`)
+			// 				return true;
+			// 			}
+			// 		}) 
+			// 		uxlocation.icon = url;
+			// 		setUxLocation(uxlocation);
+			// 		callback(uxlocation);
+			// 	},
+			// 	fail(err){
+			// 		console.log('fail')
+			// 	}
+			// })
+		},
+		
+		fail: function(error) {
+			uni.showToast({
+				icon: 'none',
+				title: '定位失败'
+			})
+	
+			// #ifdef APP-PLUS
+			// #endif
+	
+		},
+		complete: function(rs) {
+			// console.log('complete:'+JSON.stringify(rs))
+		}
+	})
+}
+
+const self = {
+	getLocation,
+	setUxLocation,
+	__CFG
+}
+export default self

+ 582 - 0
work/pages/map/map.vue

@@ -0,0 +1,582 @@
+<template>
+	<view class="setbox">
+		<map
+			id="container"
+			class="map"
+			:latitude="center.lat"
+			:longitude="center.lng"
+			@poitap="onClcikImgMap"
+			@tap="onClcikImgMap"
+			:markers="covers"
+			scale="15"
+			:style="'width: 750rpx;height:' + mapheight + 'px;'"
+		></map>
+
+		<view class="maptop">
+			<view class="maptopflex">
+				<image :src="serimg" class="maptopimg"></image>
+				<input  class="maptopint" id="tipInputs" v-model="searchtxt"  @input="searchKeyword" placeholder="请输入地点进行查找" />
+			</view>
+			<!-- 地图联想 -->
+			<view class="addrSearch_list" >
+				<view class="addrSearch_item" v-for="(item, index) in searchList" :key="index" @click="handleAddrClick(item)" >
+					<view class="wrap_name">
+						<!-- #ifdef H5 -->
+						<text class="wrap_text">{{item.name.substring(0, item.name.indexOf(searchtxt))}}</text>
+							<text class="wrap_text" style="color: #2797FF;">{{searchtxt}}</text>
+							<text class="wrap_text">{{item.name.substring(item.name.indexOf(searchtxt) + searchtxt.length)}}</text>
+						<!-- #endif -->
+						<!-- #ifndef H5 -->
+						<rich-text :nodes="richNodes(item)"></rich-text>
+						<!-- #endif -->
+					</view>
+					<view class="wrap_addr">
+						<text class="wrap_addrs">{{ item.addr }}</text>
+					</view>
+				</view>
+			</view>
+		</view>
+
+		<view class="mapfot">
+			<view class="mapfott"><text class="mapfottit">标点位置</text></view>
+			<view class="mapfotx">
+				<image :src="adrimg" class="mapfotimg"></image>
+				<text class="mapfottxt" v-if="address">{{ address }}</text>
+			</view>
+			<view class="mapfotn" @click="getSureFn"><text class="mapfotntit">确定</text></view>
+		</view>
+	</view>
+</template>
+
+<script>
+import myAmapFun from '@/utils/initmap.js';
+import self from "@/utils/location.js"
+
+	export default{
+		data(){
+			return{
+				serimg:require("@/work/static/search.png"),
+				adrimg:require("@/work/static/adress.png"),
+				mapimg:require("@/work/static/map.png"),
+				// center:{
+				// 	lng:'117.211954',
+				// 	lat:'31.839676',
+				// },
+				center:{
+					lng:'',
+					lat:'',
+				},
+				mapflag:false,
+				// userId: this.$store.state.user.userId,
+				// deptId: this.$store.state.user.deptId,
+				address:'',
+				searchtxt:'',
+				type:'add',//新增还是修改,
+				placeSearchComponent:'',
+				autoCompleteComponent:'',
+				map:'',
+				covers: [{
+					id:0,
+					latitude: '',
+					longitude: '',
+					width:68,   //宽
+					height:68,   //高
+					iconPath: require("@/work/static/map.png"),
+					anchor:{x: 0.5, y: 0.5}
+				}],
+				mapheight:0,
+				mapContext:"",
+				searchList:[],
+				focus:false,
+				location:'',
+				setflag:false,
+			}
+		},
+		onReady() {
+			this.getcreateMap()
+		},
+		onLoad(e) {
+			if(e.type=='update'){
+				this.type='update'
+				this.center.lng=e.lng;
+				this.center.lat=e.lat;
+				this.address=e.address;
+			}else{
+				if(e.address){
+					this.type='update'
+					this.center.lng=e.lng;
+					this.center.lat=e.lat;
+					this.address=e.address;
+				}else{
+					this.type='add';
+				}
+				
+			}
+			if(e.fromurl){
+				this.fromurl=e.fromurl
+			}
+		},
+		onShow() {
+			var that=this;
+			if(this.setflag){
+				this.setflag=false;
+				// #ifndef H5
+				this.getlocationadr()
+				// uni.getSetting({
+				// 	success(res) {
+				// 		if(res.authSetting['scope.userLocation'] != undefined){
+				// 			if (res.authSetting['scope.userLocation']) {
+				// 				// 已经授权,可以直接调用 getLocation 获取地理位置
+				// 				that.getlocation()
+				// 				that.setflag=false;
+				// 			} else {
+				// 				that.$modal.confirm('确定开启定位授权?').then(() => {
+				// 					that.setflag=true;
+				// 				  uni.openSetting({
+				// 				  	success(res2) {
+				// 				  		if (res2.authSetting['scope.userLocation']) {
+								  			
+				// 				  		}
+				// 				  	}
+				// 				  });
+				// 				})
+				// 			};
+				// 		}
+				// 	},
+				// 	fail(err) {
+				// 	},
+				// })
+				// #endif
+			}
+		},
+		mounted() {
+			var that=this;
+			this.getinfo();
+			if(this.type=='add'){
+				// #ifndef H5
+				this.getlocationadr()
+				// #endif
+			}else{				
+				var lng=this.center.lng;
+				var lat=this.center.lat;
+				that.covers = [];
+				that.covers = [{
+					id:1,
+					latitude: lat,
+					longitude: lng,
+					width:68,   //宽
+					height:68,   //高
+					iconPath: that.mapimg,
+					anchor:{x: 0.5, y: 0.5}
+				}]
+				// #ifdef MP-WEIXIN
+				that.getCity(lat,  lng)
+				// #endif
+			}
+		},
+		methods:{
+			// 获取定位
+			getlocationadr(){
+				var that=this;
+				self.getLocation(function(res){
+					if(res==-1){
+						that.setflag=true
+					}else{
+						that.center.lng=res.lng;
+						that.center.lat=res.lat;
+						that.address=res.address;
+						that.covers = [];
+						that.covers = [{
+							id:4,
+							width:68,   //宽
+							height:68,   //高
+							latitude: res.lat,
+							longitude: res.lng,
+							iconPath: that.mapimg,
+							anchor:{x: 0.5, y: 0.5}
+						}]
+						var newobj={
+							lng:res.lng,
+							lat:res.lat,
+							address:res.address
+						}
+						self.setUxLocation(newobj)
+					}	
+				})
+			},
+			getSureFn(){
+				var address={
+					address:this.address,
+					lng:this.center.lng,
+					lat:this.center.lat,
+				}
+				uni.$emit('refreshaddr',address);
+				uni.navigateBack({delta: 1});	
+			},
+			searchKeyword(){
+				var that=this;
+				if(this.searchtxt){
+					// #ifdef H5
+					AMap.plugin('AMap.PlaceSearch', function(){
+						let autoOptions = {
+							city:'全国',
+							citylimit: true,
+							pageIndex: 1,
+							pageSize: 20,
+						}
+						let placeSearch = new AMap.PlaceSearch(autoOptions);
+						placeSearch.search(that.searchtxt, function(status, result) {
+							// 搜索成功时,result即是对应的匹配数据
+							if (status === 'complete' && result.info === 'OK') {
+								let items = result.poiList.pois;
+								if(items.length > 0){
+									var pois = [];
+									for (let i in items) {
+										var obj = {
+											"name": items[i].name,
+											"addr": items[i].address,
+											"lng": items[i].location.lng,
+											"lat": items[i].location.lat
+										};
+										pois.push(obj);
+									}
+									that.searchList = pois;
+								}
+							}else{
+								that.searchList = [];
+							}
+						})
+					})
+					// #endif
+
+					// #ifndef H5
+					myAmapFun.getInputtips({
+						keywords: that.searchtxt,
+						city: '全国',
+						citylimit: true,
+						success: function(result){
+							console.log(result,124)
+							if(result.tips.length > 0){
+								let pois = [];
+								let items = result.tips;
+								for (let i in items) {
+									if(items[i].location&&items[i].location.length>0){
+										var lnglat = items[i].location.split(',');
+										var obj = {
+											"name": items[i].name,
+											"addr": items[i].district + items[i].address,
+											"lng": lnglat[0],
+											"lat": lnglat[1]
+										};
+										pois.push(obj);
+									}
+								}
+								that.searchList = pois;
+							}else{
+								that.searchList = [];
+							}
+						},
+						fail: function(info){
+							that.searchList = [];
+							console.log('fail-search', info)
+						}
+					})
+					// #endif
+				}
+			},
+			handleAddrClick(addr){
+				var that=this;
+				var lng=addr.lng;
+				var lat=addr.lat;
+				that.center.lng=lng;
+				that.center.lat=lat;
+				that.covers = [];
+				that.covers = [{
+					id:2,
+					width:68,   //宽
+					height:68,   //高
+					latitude: addr.lat,
+					longitude: addr.lng,
+					iconPath: that.mapimg,
+					anchor:{x: 0.5, y: 0.5}
+				}]
+				// that.address=addr.name || addr.addr;
+				that.address=addr.addr + addr.name;
+				that.searchList=[];
+				// #ifdef MP-WEIXIN
+				that.getCity(lat,  lng)
+				// #endif
+			},
+			richNodes(item){
+			return [{
+				children: [
+					{
+				type: 'text',
+				attrs: {
+				class:'wrap_text'
+				},
+				text: item.name.substring(0, item.name.indexOf(this.searchtxt))
+				},
+				{
+				type: 'text',
+				attrs: {
+				class:'wrap_texts'
+				},
+				text: this.searchtxt
+				},
+				{
+				type: 'text',
+				attrs: {
+				class:'wrap_text'
+				},
+				text: item.name.substring(item.name.indexOf(this.searchtxt) + this.searchtxt.length)
+				}
+				]
+			}]
+			},
+			// 获取当前屏幕信息
+			getinfo(){
+				var that=this;
+				uni.getSystemInfo({
+					success(e) {
+						that.mapheight=e.windowHeight;
+					},
+				})
+			},
+			getcreateMap(){
+				//mapId 就是你在 map 标签中定义的 id
+				this.mapContext = uni.createMapContext('container', this);
+			},
+			onClcikImgMap(e) {
+				var that=this;
+				var lng=e.detail.longitude;
+				var lat=e.detail.latitude;
+				that.center.lng=lng;
+				that.center.lat=lat;
+				that.covers = [];
+				that.covers = [{
+					id:3,
+					width:68,   //宽
+					height:68,   //高
+					latitude: e.detail.latitude,
+					longitude: e.detail.longitude,
+					iconPath: that.mapimg,
+					anchor:{x: 0.5, y: 0.5}
+				}]
+				// #ifdef MP-WEIXIN
+				that.getCity(lat,  lng)
+				// #endif
+			},
+			//获取中心点
+			getCenterLanLat() {
+				var that = this;
+					this.mapContext.getCenterLocation({
+					  type: 'gcj02',
+					  success: res => {
+					    that.center.lng=res.longitude;
+					    that.center.lat=res.latitude;
+						that.covers = [];
+						that.covers = [{
+							id:4,
+							width:68,   //宽
+							height:68,   //高
+							latitude: e.detail.latitude,
+							longitude: e.detail.longitude,
+							iconPath: that.mapimg,
+							anchor:{x: 0.5, y: 0.5}
+						}]
+					    // #ifdef MP-WEIXIN
+						
+					    that.getCity(res.latitude,  res.longitude)
+					    // #endif
+					  },
+					  fail: err => {
+					    console.log('获取当前地图中心的经纬度2', err);
+					  },
+					});
+
+			},
+			getCity(latitude, longitude,idx) {
+				var that = this;
+				that.location = `${longitude},${latitude}`
+
+				myAmapFun.getRegeo({
+				//如果经纬度有问题会导致不进入回调方法,从而报错
+					location: that.location,
+					success: function(e) {
+						//成功回调
+						that.address='';
+						that.address = e[0].regeocodeData.formatted_address; //详细地址
+						// 存起来
+						if(idx&&idx==1){
+							var newobj={
+								lng:longitude,
+								lat:latitude,
+								address:that.address
+							}
+							self.setUxLocation(newobj)
+						}
+					},
+					fail: function(info) {
+						//失败回调
+						console.log(info)
+					}
+				})
+			},
+			// 获取定位
+			getlocation(){
+				var that = this;
+				uni.getLocation({
+					type: 'gcj02',
+					geocode: true,
+					success: function(res) {
+						that.center.lng=res.longitude;
+						that.center.lat=res.latitude;
+						that.covers = [];
+						that.covers = [{
+							id:4,
+							width:68,   //宽
+							height:68,   //高
+							latitude: res.latitude,
+							longitude: res.longitude,
+							iconPath: that.mapimg,
+							anchor:{x: 0.5, y: 0.5}
+						}]
+						// #ifdef MP-WEIXIN
+						that.getCity(res.latitude,  res.longitude,1)
+						// #endif
+						
+						// #ifdef H5
+						var adr= address.province+address.city+address.district+address.street+address.streetNum+address.poiName
+						// that.address=res.longitude
+						that.address=adr
+						// #endif
+
+					},
+					fail: function(red) {
+						uni.showToast({
+							title:"获取定位失败"
+						})
+					},
+				})
+			},
+			// 点击刷新方法
+			refresh(e){
+				this.getlocation();
+			},
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.maptop {
+	position: fixed;
+	left: 34rpx;
+	right: 34rpx;
+	top: 24rpx;
+}
+.maptopflex {
+	display: flex;
+	align-items: center;
+	padding: 0 32rpx;
+	box-sizing: border-box;
+	flex-direction: row;
+	width: 684rpx;
+	height: 84rpx;
+	background: #ffffff;
+	box-shadow: 0px 0px 12rpx 0px rgba(75, 75, 75, 0.35);
+	border-radius: 6rpx;
+	margin-bottom: 10rpx;
+}
+.maptopimg {
+	width: 36rpx;
+	height: 38rpx;
+	margin-right: 16rpx;
+}
+.maptopint {
+	font-size: 32rpx;
+	color: #666666;
+	flex: 1;
+	height: 84rpx;
+}
+.mapfot {
+	position: fixed;
+	left: 34rpx;
+	right: 34rpx;
+	bottom: 24rpx;
+	background: #fff;
+	box-shadow: 0px 0px 12rpx 0px rgba(75, 75, 75, 0.35);
+	border-radius: 6rpx;
+	padding: 40rpx 32rpx 32rpx;
+	min-height: 300rpx;
+}
+.mapfott {
+	margin-bottom: 28rpx;
+}
+.mapfottit {
+	font-size: 33rpx;
+	font-weight: bold;
+	color: #343434;
+}
+.mapfotx {
+	display: flex;
+	margin-bottom: 32rpx;
+	min-height: 70rpx;
+	flex-direction: row;
+}
+
+.mapfotimg {
+	width: 26rpx;
+	height: 28rpx;
+	flex: 0 0 auto;
+	margin-right: 12rpx;
+}
+.mapfottxt {
+	flex: 1;
+	font-size: 32rpx;
+	color: #343434;
+	line-height: 32rpx;
+}
+.mapfotn {
+	width: 618rpx;
+	height: 76rpx;
+	background: #1678ff;
+	border-radius: 6rpx;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+}
+.mapfotntit {
+	font-size: 34rpx;
+	color: #fff;
+}
+
+.addrSearch_item {
+	border-bottom: 2upx solid #f5f5f5;
+	padding: 4upx;
+	background: #ffffff;
+}
+.addrSearch_item .wrap_name {
+	display: flex;
+	flex-direction: row !important;
+}
+.wrap_text {
+	font-size: 34upx;
+	color: #151515;
+	line-height: 40upx;
+}
+.wrap_texts{
+	font-size: 34upx;
+	color: #2797FF;
+	line-height: 40upx;
+}
+.addrSearch_item .wrap_addr {
+	margin-top: 2upx;
+}
+.wrap_addrs {
+	font-size: 28upx;
+	color: #999;
+	line-height: 32upx;
+}
+</style>

+ 575 - 0
work/pages/map/maps.nvue

@@ -0,0 +1,575 @@
+<template>
+	<view class="setbox">
+		<map
+			id="container"
+			class="map"
+			:latitude="center.lat"
+			:longitude="center.lng"
+			@poitap="onClcikImgMap"
+			@tap="onClcikImgMap"
+			:markers="covers"
+			scale="15"
+			:style="'width: 750rpx;height:' + mapheight + 'px;'"
+		></map>
+
+		<view class="maptop">
+			<view class="maptopflex">
+				<image :src="serimg" class="maptopimg"></image>
+				<input ref='input' class="maptopint" id="tipInputs" v-model="searchtxt" @blur="getBlur" @input="searchKeyword" placeholder="请输入地点进行查找" />
+			</view>
+			<!-- 地图联想 -->
+			<view class="addrSearch_list" >
+				<view class="addrSearch_item" v-for="(item, index) in searchList" :key="index" @click="handleAddrClick(item)" >
+					<view class="wrap_name">
+						<!-- #ifdef H5 -->
+						<text class="wrap_text">{{item.name.substring(0, item.name.indexOf(searchtxt))}}</text>
+							<text class="wrap_text" style="color: #2797FF;">{{searchtxt}}</text>
+							<text class="wrap_text">{{item.name.substring(item.name.indexOf(searchtxt) + searchtxt.length)}}</text>
+						<!-- #endif -->
+						<!-- #ifndef H5 -->
+						<rich-text :nodes="richNodes(item)"></rich-text>
+						<!-- #endif -->
+					</view>
+					<view class="wrap_addr">
+						<text class="wrap_addrs">{{ item.addr }}</text>
+					</view>
+				</view>
+			</view>
+		</view>
+
+		<view class="mapfot">
+			<view class="mapfott"><text class="mapfottit">标点位置</text></view>
+			<view class="mapfotx">
+				<image :src="adrimg" class="mapfotimg"></image>
+				<text class="mapfottxt" v-if="address">{{ address }}</text>
+			</view>
+			<view class="mapfotn" @click="getSureFn"><text class="mapfotntit">确定</text></view>
+		</view>
+	</view>
+</template>
+
+<script>
+import myAmapFun from '@/utils/initmap.js';
+import amapFile from '@/plugins/amap-wx.js';
+import self from "@/utils/location.js";
+// #ifdef APP-PLUS
+// var myAmapFun = new amapFile.AMapWX({
+// 	key: 'ccbe52b1ec5f66295fa4609c90a819b7',
+// 	batch: true
+// 	});
+// #endif
+	export default{
+		data(){
+			return{
+				serimg:require("@/mine/static/score/serch.png"),
+				adrimg:require("@/mine/static/score/adress.png"),
+				mapimg:require("@/mine/static/score/map.png"),
+				// center:{
+				// 	lng:'117.211954',
+				// 	lat:'31.839676',
+				// },
+				center:{
+					lng:'',
+					lat:'',
+				},
+				mapflag:false,
+				// userId: this.$store.state.user.userId,
+				// deptId: this.$store.state.user.deptId,
+				address:'',
+				searchtxt:'',
+				type:'add',//新增还是修改,
+				placeSearchComponent:'',
+				autoCompleteComponent:'',
+				map:'',
+				covers: [{
+					id:0,
+					latitude: '',
+					longitude: '',
+					width:68,   //宽
+					height:68,   //高
+					iconPath: require("@/mine/static/score/map.png"),
+					anchor:{x: 0.5, y: 0.5}
+				}],
+				mapheight:0,
+				mapContext:"",
+				searchList:[],
+				focus:false,
+				location:'',
+				setflag:false,
+			}
+		},
+		onReady() {
+			this.getcreateMap()
+		},
+		onShow() {
+			var that=this;
+			if(this.setflag){
+				this.setflag=false;
+				// #ifndef H5
+				this.getlocationadr()
+				// #endif
+			}
+		},
+		onLoad(e) {
+			if(e.type=='update'){
+				this.type='update'
+				this.center.lng=e.lng;
+				this.center.lat=e.lat;
+				this.address=e.address;
+			}else{
+				if(e.address){
+					this.type='update'
+					this.center.lng=e.lng;
+					this.center.lat=e.lat;
+					this.address=e.address;
+				}else{
+					this.type='add';
+				}
+				
+			}
+			if(e.fromurl){
+				this.fromurl=e.fromurl
+			}
+		},
+		mounted() {
+			var that=this;
+			this.getinfo();
+			if(this.type=='add'){
+				this.getlocationadr()
+			}else{				
+				var lng=this.center.lng;
+				var lat=this.center.lat;
+				that.covers = [];
+				that.covers = [{
+					id:1,
+					latitude: lat,
+					longitude: lng,
+					width:68,   //宽
+					height:68,   //高
+					iconPath: that.mapimg,
+					anchor:{x: 0.5, y: 0.5}
+				}]
+				// #ifdef APP
+				that.getCity(lat,  lng)
+				// #endif
+			}
+		},
+		methods:{
+			getBlur(){
+				
+			},
+			getSureFn(){
+				var address={
+					address:this.address,
+					lng:this.center.lng,
+					lat:this.center.lat,
+				}
+				uni.$emit('refreshaddr',address);
+				uni.navigateBack({delta: 1});	
+			},
+			getNextFn(){
+				var address={
+						address:this.address,
+						lng:this.center.lng,
+						lat:this.center.lat,
+					}
+					uni.$emit('refreshaddr',address);
+					uni.navigateBack({delta: 1});	
+			},
+			searchKeyword(){
+				var that=this;
+				if(this.searchtxt){
+					// #ifdef H5
+					AMap.plugin('AMap.PlaceSearch', function(){
+						let autoOptions = {
+							city:'全国',
+							citylimit: true,
+							pageIndex: 1,
+							pageSize: 20,
+						}
+						let placeSearch = new AMap.PlaceSearch(autoOptions);
+						placeSearch.search(that.searchtxt, function(status, result) {
+							// 搜索成功时,result即是对应的匹配数据
+							if (status === 'complete' && result.info === 'OK') {
+								let items = result.poiList.pois;
+								if(items.length > 0){
+									var pois = [];
+									for (let i in items) {
+										var obj = {
+											"name": items[i].name,
+											"addr": items[i].address,
+											"lng": items[i].location.lng,
+											"lat": items[i].location.lat
+										};
+										pois.push(obj);
+									}
+									that.searchList = pois;
+								}
+							}else{
+								that.searchList = [];
+							}
+						})
+					})
+					// #endif
+
+					// #ifndef H5
+					myAmapFun.getInputtips({
+						keywords: that.searchtxt,
+						city: '全国',
+						citylimit: true,
+						success: function(result){
+							if(result.tips.length > 0){
+								let pois = [];
+								let items = result.tips;
+								for (let i in items) {
+									if(items[i].location&&items[i].location.length>0){
+										var lnglat = items[i].location.split(',');
+										var obj = {
+											"name": items[i].name,
+											"addr": items[i].district + items[i].address,
+											"lng": lnglat[0],
+											"lat": lnglat[1]
+										};
+										pois.push(obj);
+									}
+								}
+								that.searchList = pois;
+							}else{
+								that.searchList = [];
+							}
+						},
+						fail: function(info){
+							that.searchList = [];
+							console.log('fail-search', info)
+						}
+					})
+					// #endif
+				}
+			},
+			handleAddrClick(addr){
+				var that=this;
+				var lng=addr.lng;
+				var lat=addr.lat;
+				that.center.lng=lng;
+				that.center.lat=lat;
+				that.covers = [];
+				that.covers = [{
+					id:2,
+					width:68,   //宽
+					height:68,   //高
+					latitude: addr.lat,
+					longitude: addr.lng,
+					iconPath: that.mapimg,
+					anchor:{x: 0.5, y: 0.5}
+				}]
+				// #ifdef APP
+				that.address=addr.name || addr.addr;
+				that.searchList=[];
+				that.$refs.input.blur()
+				that.getCity(lat,  lng)
+				// #endif
+			},
+			richNodes(item){
+			return [{
+				children: [
+					{
+				type: 'text',
+				attrs: {
+				class:'wrap_text'
+				},
+				text: item.name.substring(0, item.name.indexOf(this.searchtxt))
+				},
+				{
+				type: 'text',
+				attrs: {
+				class:'wrap_texts'
+				},
+				text: this.searchtxt
+				},
+				{
+				type: 'text',
+				attrs: {
+				class:'wrap_text'
+				},
+				text: item.name.substring(item.name.indexOf(this.searchtxt) + this.searchtxt.length)
+				}
+				]
+			}]
+			},
+			// 获取当前屏幕信息
+			getinfo(){
+				var that=this;
+				uni.getSystemInfo({
+					success(e) {
+						that.mapheight=e.windowHeight;
+					},
+				})
+			},
+			getcreateMap(){
+				//mapId 就是你在 map 标签中定义的 id
+				this.mapContext = uni.createMapContext('container', this);
+			},
+			onClcikImgMap(e) {
+				var that=this;
+				var lng=e.detail.longitude;
+				var lat=e.detail.latitude;
+				that.center.lng=lng;
+				that.center.lat=lat;
+				that.covers = [];
+				that.covers = [{
+					id:3,
+					width:68,   //宽
+					height:68,   //高
+					latitude: e.detail.latitude,
+					longitude: e.detail.longitude,
+					iconPath: that.mapimg,
+					anchor:{x: 0.5, y: 0.5}
+				}]
+				// #ifdef APP
+				that.getCity(lat,  lng)
+				// #endif
+			},
+			//获取中心点
+			getCenterLanLat() {
+				var that = this;
+					this.mapContext.getCenterLocation({
+					  type: 'gcj02',
+					  success: res => {
+					    that.center.lng=res.longitude;
+					    that.center.lat=res.latitude;
+						that.covers = [];
+						that.covers = [{
+							id:4,
+							width:68,   //宽
+							height:68,   //高
+							latitude: e.detail.latitude,
+							longitude: e.detail.longitude,
+							iconPath: that.mapimg,
+							anchor:{x: 0.5, y: 0.5}
+						}]
+					    // #ifdef APP
+						
+					    that.getCity(res.latitude,  res.longitude)
+					    // #endif
+					  },
+					  fail: err => {
+					    console.log('获取当前地图中心的经纬度2', err);
+					  },
+					});
+
+			},
+			getCity(latitude, longitude,idx) {
+				var that = this;
+				that.location = `${longitude},${latitude}`
+
+				myAmapFun.getRegeo({
+				//如果经纬度有问题会导致不进入回调方法,从而报错
+					location: that.location,
+					success: function(e) {
+						//成功回调
+						that.address='';
+						that.address = e[0].regeocodeData.formatted_address; //详细地址
+						// 存起来
+						if(idx&&idx==1){
+							var newobj={
+								lng:longitude,
+								lat:latitude,
+								address:that.address
+							}
+							self.setUxLocation(newobj)
+						}
+					},
+					fail: function(info) {
+						//失败回调
+						console.log(info)
+					}
+				})
+			},
+			// 获取定位
+			getlocationadr(){
+				var that=this;
+				self.getLocation(function(res){
+					if(res==-1){
+						that.setflag=true
+					}else{
+						that.center.lng=res.lng;
+						that.center.lat=res.lat;
+						that.address=res.address;
+						that.covers = [];
+						that.covers = [{
+							id:4,
+							width:68,   //宽
+							height:68,   //高
+							latitude: res.lat,
+							longitude: res.lng,
+							iconPath: that.mapimg,
+							anchor:{x: 0.5, y: 0.5}
+						}]
+						var newobj={
+							lng:res.lng,
+							lat:res.lat,
+							address:res.address
+						}
+						self.setUxLocation(newobj)
+					}	
+				})
+			},
+			getlocation(){
+				var that = this;
+				uni.getLocation({
+					type: 'gcj02',
+					geocode: true,
+					success: function(res) {
+						that.center.lng=res.longitude;
+						that.center.lat=res.latitude;
+						that.covers = [];
+						that.covers = [{
+							id:4,
+							width:68,   //宽
+							height:68,   //高
+							latitude: res.latitude,
+							longitude: res.longitude,
+							iconPath: that.mapimg,
+							anchor:{x: 0.5, y: 0.5}
+						}]
+						// #ifdef MP-WEIXIN
+						that.getCity(res.latitude,  res.longitude,1)
+						// #endif
+						
+						// #ifdef H5
+						var adr= address.province+address.city+address.district+address.street+address.streetNum+address.poiName
+						// that.address=res.longitude
+						that.address=adr
+						// #endif
+						// #ifdef APP
+						that.getCity(res.latitude,  res.longitude)
+						// #endif
+
+					},
+					fail: function(red) {
+						uni.showToast({
+							title:"获取定位失败"
+						})
+					},
+				})
+			},
+			// 点击刷新方法
+			refresh(e){
+				this.getlocation();
+			},
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.maptop {
+	position: fixed;
+	left: 34rpx;
+	right: 34rpx;
+	top: 24rpx;
+}
+.maptopflex {
+	display: flex;
+	align-items: center;
+	padding: 0 32rpx;
+	box-sizing: border-box;
+	flex-direction: row;
+	width: 684rpx;
+	height: 84rpx;
+	background: #ffffff;
+	box-shadow: 0px 0px 12rpx 0px rgba(75, 75, 75, 0.35);
+	border-radius: 6rpx;
+	margin-bottom: 10rpx;
+}
+.maptopimg {
+	width: 36rpx;
+	height: 38rpx;
+	margin-right: 16rpx;
+}
+.maptopint {
+	font-size: 32rpx;
+	color: #666666;
+	flex: 1;
+	height: 84rpx;
+}
+.mapfot {
+	position: fixed;
+	left: 34rpx;
+	right: 34rpx;
+	bottom: 24rpx;
+	background: #fff;
+	box-shadow: 0px 0px 12rpx 0px rgba(75, 75, 75, 0.35);
+	border-radius: 6rpx;
+	padding: 40rpx 32rpx 32rpx;
+	min-height: 300rpx;
+}
+.mapfott {
+	margin-bottom: 28rpx;
+}
+.mapfottit {
+	font-size: 33rpx;
+	font-weight: bold;
+	color: #343434;
+}
+.mapfotx {
+	display: flex;
+	margin-bottom: 32rpx;
+	min-height: 70rpx;
+	flex-direction: row;
+}
+
+.mapfotimg {
+	width: 26rpx;
+	height: 28rpx;
+	flex: 0 0 auto;
+	margin-right: 12rpx;
+}
+.mapfottxt {
+	flex: 1;
+	font-size: 32rpx;
+	color: #343434;
+	line-height: 32rpx;
+}
+.mapfotn {
+	width: 618rpx;
+	height: 76rpx;
+	background: #1678ff;
+	border-radius: 6rpx;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+}
+.mapfotntit {
+	font-size: 34rpx;
+	color: #fff;
+}
+
+.addrSearch_item {
+	border-bottom: 2upx solid #f5f5f5;
+	padding: 4upx;
+	background: #ffffff;
+}
+.addrSearch_item .wrap_name {
+	display: flex;
+	flex-direction: row !important;
+}
+.wrap_text {
+	font-size: 34upx;
+	color: #151515;
+	line-height: 40upx;
+}
+.wrap_texts{
+	font-size: 34upx;
+	color: #2797FF;
+	line-height: 40upx;
+}
+.addrSearch_item .wrap_addr {
+	margin-top: 2upx;
+}
+.wrap_addrs {
+	font-size: 28upx;
+	color: #999;
+	line-height: 32upx;
+}
+</style>

+ 8 - 0
work/pages/work/index.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

BIN
work/static/adress.png


BIN
work/static/map.png


BIN
work/static/search.png


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff