xiaoshushu 3 роки тому
батько
коміт
0bf3264e40

+ 1 - 1
smart-ui-app/App.vue

@@ -25,7 +25,7 @@ button::after { border: none }
 /**挂载iconfont图表*/
 @font-face {
 	font-family: 'iconfont';
-	src: url('https://at.alicdn.com/t/font_2816842_pf6sfv219m.ttf?t=1631771735015') format('truetype');
+	src: url('https://at.alicdn.com/t/font_2816842_ht6cfvq625q.ttf?t=1631771735015') format('truetype');
 	/* src: url('~@/static/font/iconfont.ttf') format('truetype'); */
 }
 .icon {

+ 2 - 1
smart-ui-app/common/common.scss

@@ -123,10 +123,11 @@
 	}
 	input {
 		flex: 0.62;
-		padding-top: 2px;
 		font-size: 14px;
+		padding-left: 15px;
 	}
 	textarea {
+		margin-left: 17px;
 		font-size: 14px;
 		flex: 0.7;
 		padding: 5px 10px 5px 5px;

+ 11 - 29
smart-ui-app/common/http.js

@@ -1,6 +1,7 @@
 //const ip = 'http://192.168.0.101:8080';
 //const ip = 'https://qfnj.gaswkj.com/prod-api';
-const ip = 'http://192.168.2.102:8080';
+//const ip = 'http://192.168.2.102:8080';
+const ip = 'http://139.159.189.40/prod-api';
 /**
  * 全部接口(集中管理)
  */
@@ -11,6 +12,10 @@ const urls = {
 	getPageContent: ip + '/api/index/getPageContent', //分页获取主要内容信息
 	getContentInfo: ip + '/api/index/getContentInfo/', //获取主要内容详细信息
 	getAboutUs: ip + '/api/index/getAboutUs/', //获取关于我们的信息
+	pushRecord: ip + '/api/index/pushRecord', //门店数据上报
+	shopApply: ip + '/api/index/shopApply', //商铺开通申请
+	getPageMarker: ip + '/api/index/getPageMarker', //根据标记物类型分页获取标记物信息
+	pushHelp: ip + '/api/index/pushHelp', //上传会员拨打记录
 }
 /**
  * 封装的http请求
@@ -22,7 +27,7 @@ const request = (opt) => {
 	opt.method = opt.method || 'GET';
 	opt.header = opt.header || {
 		"Content-Type": "application/json;charset=UTF-8",
-		"Authorization": getUser().token || ''
+		"apiToken": getUser().apiToken || ''
 
 	};
 	opt.loading = opt.loading || 'true';
@@ -46,40 +51,17 @@ const request = (opt) => {
 			setTimeout(() => {
 				uni.hideLoading();
 			}, 500)
-			/*******************未登录***************************/
-			if (res.data.code === 606) {
-				uni.removeStorageSync('user');
-				uni.showModal({
-					title: '提示',
-					content: '您还未登陆,请先登陆!',
-					success: res => {
-						if (res.confirm) {
-							uni.navigateTo({
-								url: '/pages/user/login'
-							})
-						}
-					}
-				});
-				return;
-			}
-			/*******************未授权或账号被锁定***************************/
-			if (res.data.code === 401) {
-				uni.removeStorageSync('user');
-				uni.showModal({
-					content: res.data.msg,
-					showCancel: false
-				});
-				return;
-			}
 			/*******************系统内部错误***************************/
-			if (res.data.code === 500) {
+			if (res.data.code == 200) {
+				opt.success(res);
+			} else {
 				uni.showModal({
 					content: res.data.msg,
 					showCancel: false
 				});
 				return;
 			}
-			opt.success(res);
+
 		},
 		fail: e => {
 			uni.hideLoading();

+ 86 - 81
smart-ui-app/manifest.json

@@ -1,83 +1,88 @@
 {
-    "name" : "智慧旅游",
-    "appid" : "__UNI__8B92F0F",
-    "description" : "",
-    "versionName" : "1.0.0",
-    "versionCode" : "100",
-    "transformPx" : false,
-    /* 5+App特有相关 */
-    "app-plus" : {
-        "usingComponents" : true,
-        "nvueStyleCompiler" : "uni-app",
-        "compilerVersion" : 3,
-        "splashscreen" : {
-            "alwaysShowBeforeRender" : true,
-            "waiting" : true,
-            "autoclose" : true,
-            "delay" : 0
-        },
-        /* 模块配置 */
-        "modules" : {},
-        /* 应用发布信息 */
-        "distribute" : {
-            /* android打包配置 */
-            "android" : {
-                "permissions" : [
-                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
-                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
-                ]
-            },
-            /* ios打包配置 */
-            "ios" : {},
-            /* SDK配置 */
-            "sdkConfigs" : {}
-        }
-    },
-    /* 快应用特有相关 */
-    "quickapp" : {},
-    /* 小程序特有相关 */
-    "mp-weixin" : {
-        "appid" : "wx01e139c8c2cd0fa4",
-        "setting" : {
-            "urlCheck" : false
-        },
-        "usingComponents" : true
-    },
-    "mp-alipay" : {
-        "usingComponents" : true
-    },
-    "mp-baidu" : {
-        "usingComponents" : true
-    },
-    "mp-toutiao" : {
-        "usingComponents" : true
-    },
-    "uniStatistics" : {
-        "enable" : false
-    },
-    "h5" : {
-        "router" : {
-            "base" : "/h6/"
-        },
-        "sdkConfigs" : {
-            "maps" : {
-                "qqmap" : {
-                    "key" : ""
-                }
-            }
-        }
-    }
+	"name": "智慧旅游",
+	"appid": "__UNI__8B92F0F",
+	"description": "",
+	"versionName": "1.0.0",
+	"versionCode": "100",
+	"transformPx": false,
+	/* 5+App特有相关 */
+	"app-plus": {
+		"usingComponents": true,
+		"nvueStyleCompiler": "uni-app",
+		"compilerVersion": 3,
+		"splashscreen": {
+			"alwaysShowBeforeRender": true,
+			"waiting": true,
+			"autoclose": true,
+			"delay": 0
+		},
+		/* 模块配置 */
+		"modules": {},
+		/* 应用发布信息 */
+		"distribute": {
+			/* android打包配置 */
+			"android": {
+				"permissions": [
+					"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+					"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+					"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+					"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+					"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+					"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.CAMERA\"/>",
+					"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+					"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+					"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+					"<uses-feature android:name=\"android.hardware.camera\"/>",
+					"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+				]
+			},
+			/* ios打包配置 */
+			"ios": {},
+			/* SDK配置 */
+			"sdkConfigs": {}
+		}
+	},
+	/* 快应用特有相关 */
+	"quickapp": {},
+	/* 小程序特有相关 */
+	"mp-weixin": {
+		"appid": "wx01e139c8c2cd0fa4",
+		"setting": {
+			"urlCheck": false
+		},
+		"usingComponents": true,
+		"permission": {
+			"scope.userLocation": {
+				"desc": "你的位置信息将用于小程序位置接口的效果展示"
+			}
+		}
+	},
+	"mp-alipay": {
+		"usingComponents": true
+	},
+	"mp-baidu": {
+		"usingComponents": true
+	},
+	"mp-toutiao": {
+		"usingComponents": true
+	},
+	"uniStatistics": {
+		"enable": false
+	},
+	"h5": {
+		"router": {
+			"base": "/h6/"
+		},
+		"sdkConfigs": {
+			"maps": {
+				"qqmap": {
+					"key": ""
+				}
+			}
+		}
+	}
 }

+ 34 - 8
smart-ui-app/pages.json

@@ -11,11 +11,12 @@
 			}
 		},
 		{
-			"path": "pages/other/about",
+			"path": "pages/travel/detail",
 			"style": {
-				"navigationBarTitleText": "关于我们"
+				"navigationBarTitleText": "旅游路线",
+				"enablePullDownRefresh": false
 			}
-		
+
 		},
 		{
 			"path": "pages/user/my",
@@ -25,6 +26,29 @@
 			}
 		},
 		{
+			"path": "pages/shop/apply",
+			"style": {
+				"navigationBarTitleText": "店铺开通申请",
+				"enablePullDownRefresh": false
+			}
+
+		},
+		{
+			"path": "pages/shop/up",
+			"style": {
+				"navigationBarTitleText": "门店数据上报",
+				"enablePullDownRefresh": false
+			}
+
+		},
+		{
+			"path": "pages/other/about",
+			"style": {
+				"navigationBarTitleText": "关于我们"
+			}
+
+		},
+		{
 			"path": "pages/user/login",
 			"style": {
 				"navigationBarTitleText": "授权登陆"
@@ -40,27 +64,29 @@
 			"path": "pages/travel/index",
 			"style": {
 				"navigationBarTitleText": "景区",
-				"enablePullDownRefresh": false
+				"enablePullDownRefresh": true,
+				"backgroundTextStyle": "dark"
 			}
 
 		}, {
 			"path": "pages/government/index",
 			"style": {
 				"navigationBarTitleText": "党政服务",
-				"enablePullDownRefresh": false
+				"enablePullDownRefresh": true,
+				"backgroundTextStyle": "dark"
 			}
 
 		}, {
 			"path": "pages/government/detail",
 			"style": {
-				"navigationBarTitleText": "政务详情",
+				"navigationBarTitleText": "内容详情",
 				"enablePullDownRefresh": false
 			}
 
 		}, {
-			"path": "pages/travel/detail",
+			"path": "pages/government/activity",
 			"style": {
-				"navigationBarTitleText": "旅游路线",
+				"navigationBarTitleText": "热门活动",
 				"enablePullDownRefresh": false
 			}
 

+ 102 - 0
smart-ui-app/pages/government/activity.vue

@@ -0,0 +1,102 @@
+<template>
+	<view>
+		<view class="list">
+			<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
+				<view class="r65">
+					<view class="title">{{ item.title }}</view>
+				</view>
+				<view class="r35 day">{{ item.createTime.substring(0, 11) }}</view>
+				<view class="clear"></view>
+			</view>
+			<view class="loading"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			list: [],
+			param: { pageNum: 1, pageSize: 10, type: 4 },
+			loadMore: true
+		};
+	},
+	onLoad() {
+		this.getData();
+	},
+	methods: {
+		//获取数据
+		getData() {
+			this.$http.request({
+				url: this.$http.urls.getPageContent,
+				data: this.param,
+				loading: 'false',
+				success: res => {
+					console.log(JSON.stringify(res));
+					this.loadMore = res.data.pages > this.param.pageNum ? true : false;
+					res.data.rows.forEach(item => {
+						this.list.push(item);
+					});
+				}
+			});
+		},
+		//详情
+		detail(item) {
+			uni.navigateTo({ url: '/pages/government/detail?id=' + item.contentId });
+		},
+		//刷新数据
+		refresh() {
+			this.loadMore = true;
+			this.param.pageNum = 1;
+			this.list = [];
+			this.getData();
+		}
+	},
+	//下拉刷新
+	onPullDownRefresh() {
+		setTimeout(() => {
+			uni.stopPullDownRefresh();
+			this.refresh();
+		}, 1000);
+	},
+	//上拉加载
+	onReachBottom() {
+		if (this.loadMore) {
+			this.param.pageNum++;
+			this.getData();
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.list {
+	padding: 0px 10px 70px 10px;
+	.item {
+		background-color: white;
+		padding: 18px;
+		border-bottom: 1px solid #e5e5e5;
+		border-radius: 5px;
+		margin-top: 10px;
+		box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
+		.title {
+			font-size: 15px;
+			text-align: left;
+			color: #252525;
+			font-weight: bold;
+		}
+		.desc {
+			color: #969799;
+			font-size: 13px;
+			padding-top: 10px;
+		}
+		.day {
+			color: #969799;
+			font-size: 13px;
+			padding-top: 15px;
+			padding-left: 20px;
+		}
+	}
+}
+</style>

+ 53 - 22
smart-ui-app/pages/index/index.vue

@@ -33,18 +33,18 @@
 					<view class="icon" style="background-color: #2cc937;">&#xe647;</view>
 					<view class="title">旅游攻略</view>
 				</view>
-				<view class="f">
+				<view class="f" @click="tab('/pages/government/index?type=4')">
 					<view class="icon" style="background-color: #e23e33;">&#xe645;</view>
 					<view class="title">热门活动</view>
 				</view>
 			</view>
 			<view class="flex mt10">
-				<view class="item">
-					<view class="tag">热门活动</view>
+				<view class="item" @click="tab('/pages/travel/index')">
+					<view class="tag">景区介绍</view>
 					<image src="../../static/img1.jpg" mode="aspectFill" class="gray"></image>
 					<view class="more">点击显示更多</view>
 				</view>
-				<view class="item">
+				<view class="item" @click="tab('/pages/government/index')">
 					<view class="tag">党政服务信息</view>
 					<image src="../../static/img1.jpg" mode="aspectFill" class="gray"></image>
 					<view class="more">点击显示更多</view>
@@ -56,7 +56,7 @@
 					<image src="../../static/img2.jpg" mode="aspectFill" class="gray"></image>
 					<view class="more">点击显示更多</view>
 				</view>
-				<view class="item">
+				<view class="item" @click="navigate('/pages/government/activity')">
 					<view class="tag">热门活动</view>
 					<image src="../../static/img4.jpg" mode="aspectFill" class="gray"></image>
 					<view class="more">点击显示更多</view>
@@ -72,32 +72,62 @@ export default {
 	data() {
 		return {
 			ip: this.$http.urls.ip,
-			goods_list: [],
-			scrollTop: 0
+			scrollTop: 0,
+			item: {}
 		};
 	},
 	onPageScroll(e) {
 		this.scrollTop = e.scrollTop;
 	},
 	onLoad(e) {
-		//this.init();
+		this.init();
 	},
 	methods: {
-		call() {
-			uni.showModal({
-				title: '提示',
-				content: '是否拨打0892-88888888求援电话?',
+		init() {
+			this.$http.request({
+				url: this.$http.urls.getAboutUs,
 				success: res => {
-					if (res.confirm) {
-					}
+					this.item = res.data.data.aboutUs;
 				}
 			});
 		},
-		init() {
-			this.$http.request({
-				url: this.$http.urls.home,
-				success: res => {
-					this.goods_list = res.data.data.goods_list;
+		//拨打sos
+		call() {
+			if (!this.$hasLogin()) {
+				uni.showModal({ content: '登陆才能使用该功能', showCancel: false });
+				return;
+			}
+			//拨打电话获取位置
+			uni.authorize({
+				scope: 'scope.userLocation',
+				success: s => {
+					uni.getLocation({
+						type: 'wgs84',
+						success: res => {
+							uni.showModal({
+								title: '提示',
+								content: '是否拨打' + this.item.helpPhone + '求援电话?',
+								success: c => {
+									if (c.confirm) {
+										this.$http.request({
+											method: 'POST',
+											url: this.$http.urls.pushHelp,
+											data: { memberId: this.$getUser().memberId, lat: res.latitude, lng: res.longitude, phone: '13097850971' },
+											success: r => {
+												uni.makePhoneCall({
+													phoneNumber: this.item.helpPhone
+												});
+											}
+										});
+									}
+								}
+							});
+						}
+					});
+				},
+				fail(res) {
+					//1.2 拒绝授权
+					console.log(JSON.stringify(res));
 				}
 			});
 		},
@@ -106,8 +136,8 @@ export default {
 				url: url
 			});
 		},
-		detail(item) {
-			uni.navigateTo({ url: '/pages/goods/detail?id=' + item.id });
+		navigate(url) {
+			uni.navigateTo({ url: url });
 		}
 	}
 };
@@ -120,7 +150,7 @@ export default {
 	color: white;
 	.wz {
 		position: absolute;
-		top: 10px;
+		top: 40px;
 		left: 20px;
 		z-index: 111111;
 		.icon {
@@ -240,6 +270,7 @@ export default {
 	text-align: center;
 	border-radius: 10px 0px 0px 10px;
 	box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.3);
+	opacity: 0.8;
 	.icon {
 		font-size: 25px;
 		padding-bottom: 3px;

+ 86 - 0
smart-ui-app/pages/shop/apply.vue

@@ -0,0 +1,86 @@
+<template>
+	<view>
+		<view class="cn">
+			<u-steps :list="numList" :current="current"></u-steps>
+			<view class="info">
+				<view class="form_group hr">
+					<view class="lable">商铺名称</view>
+					<input type="text" placeholder="请输入商铺名称" v-model="item.name" />
+				</view>
+				<view class="form_group hr">
+					<view class="lable">商铺地址</view>
+					<input type="text" placeholder="请输入商铺地址" v-model="item.addres" />
+				</view>
+				<view class="form_group hr">
+					<view class="lable">老板名称</view>
+					<input type="text" placeholder="请输入老板名称" v-model="item.bossName" />
+				</view>
+				<view class="form_group hr">
+					<view class="lable">老板电话</view>
+					<input type="number" placeholder="请输入老板电话" v-model="item.bossPhone" />
+				</view>
+				<view class="form_group hr">
+					<view class="lable">商铺简介</view>
+					<textarea placeholder="请输入商铺简介" v-model="item.briefContent" />
+				</view>
+			</view>
+			<button class="btn" @click="up()">申请开通</button>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			numList: [{ name: '申请开通' }, { name: '资料审核' }, { name: '商家入驻' }],
+			current: 0,
+			item: {}
+		};
+	},
+	methods: {
+		up() {
+			let rule = [
+				{ name: 'name', checkType: 'notnull', errorMsg: '请输入商铺名称' },
+				{ name: 'addres', checkType: 'notnull', errorMsg: '请输入商铺地址' },
+				{ name: 'bossName', checkType: 'notnull', errorMsg: '请输入老板名称' },
+				{ name: 'bossPhone', checkType: 'notnull', errorMsg: '请输入老板电话' }
+			];
+			if (!this.$verify.check(this.item, rule)) {
+				uni.showModal({ content: this.$verify.error, showCancel: false });
+				return;
+			}
+			this.$http.request({
+				method: 'POST',
+				url: this.$http.urls.shopApply,
+				data: this.item,
+				success: res => {
+					uni.showToast({ title: '提交成功' });
+					setTimeout(() => {
+						uni.navigateBack();
+					}, 700);
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.steps {
+	text-align: center;
+	margin-top: 20px;
+}
+.cn {
+	padding: 15px;
+	.info {
+		background-color: white;
+		border-radius: 5px;
+		margin-top: 10px;
+		box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+	}
+	.btn {
+		margin-top: 25px;
+	}
+}
+</style>

+ 87 - 0
smart-ui-app/pages/shop/up.vue

@@ -0,0 +1,87 @@
+<template>
+	<view>
+		<view class="mtop"><image src="../../static/lx.jpg" mode="widthFix"></image></view>
+		<view class="cn">
+			<view class="info">
+				<view class="form_group hr">
+					<view class="lable">散客预约人数</view>
+					<input type="text" placeholder="请输入散客预约人数" v-model="item.scatteredAppointment" />
+				</view>
+				<view class="form_group hr">
+					<view class="lable">散客接待人数</view>
+					<input type="number" placeholder="请输入散客接待人数" v-model="item.scatteredReception" />
+				</view>
+				<view class="form_group hr">
+					<view class="lable">团客预约人数</view>
+					<input type="number" placeholder="请输入团客预约人数" v-model="item.groupAppointment" />
+				</view>
+				<view class="form_group hr">
+					<view class="lable">团客接待人数</view>
+					<input type="number" placeholder="请输入团客接待人数" v-model="item.groupReception" />
+				</view>
+				<view class="form_group hr">
+					<view class="lable">销售金额</view>
+					<input type="number" placeholder="请输入销售金额" v-model="item.salesAmount" />
+				</view>
+			</view>
+			<button class="btn" @click="up()">上报数据</button>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			item: {}
+		};
+	},
+	methods: {
+		up() {
+			let rule = [
+				{ name: 'scatteredAppointment', checkType: 'notnull', errorMsg: '请输入散客预约人数' },
+				{ name: 'scatteredReception', checkType: 'notnull', errorMsg: '请输入散客接待人数' },
+				{ name: 'groupAppointment', checkType: 'notnull', errorMsg: '请输入团客预约人数' },
+				{ name: 'groupReception', checkType: 'notnull', errorMsg: '请输入团客接待人数' },
+				{ name: 'salesAmount', checkType: 'notnull', errorMsg: '请输入销售金额' }
+			];
+			if (!this.$verify.check(this.item, rule)) {
+				uni.showModal({ content: this.$verify.error, showCancel: false });
+				return;
+			}
+			this.$http.request({
+				method: 'POST',
+				url: this.$http.urls.pushRecord,
+				data: this.item,
+				success: res => {
+					uni.showToast({ title: '上报成功' });
+					setTimeout(() => {
+						uni.navigateBack();
+					}, 700);
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.mtop {
+	text-align: center;
+	image {
+		width: 80%;
+	}
+}
+.cn {
+	padding: 15px;
+	.info {
+		background-color: white;
+		border-radius: 5px;
+		margin-top: 10px;
+		box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+	}
+	.btn {
+		margin-top: 25px;
+	}
+}
+</style>

+ 47 - 9
smart-ui-app/pages/travel/detail.vue

@@ -1,21 +1,59 @@
 <template>
-	<view>
-		<image src="../../static/tp.jpg" mode="widthFix" class="pic"></image>
-	</view>
+	<view><map class="map" :latitude="item.lat" :longitude="item.lng" :polygons="polygons" show-compass="true"></map></view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				
-			};
+export default {
+	data() {
+		return {
+			param: { pageNum: 1, pageSize: 10, markerType: 0 },
+			item: { lat: 29.431988858402345, lng: 88.2551640092571 },
+			list: [],
+			covers: [],
+			polygons: [
+				{
+					strokeWidth: 3,
+					strokeColor: '#2196F3',
+					fillColor: '#03a9f482',
+					points: []
+				}
+			]
+		};
+	},
+	onLoad() {
+		this.getData();
+		this.windowHeight = uni.getSystemInfoSync().windowHeight;
+	},
+	methods: {
+		//获取数据
+		getData() {
+			this.$http.request({
+				url: this.$http.urls.getPageMarker,
+				data: this.param,
+				loading: 'false',
+				success: res => {
+					console.log('asd:' + JSON.stringify(this.item));
+					res.data.rows.forEach(item => {
+						item.locationSet = JSON.parse(item.locationSet);
+						this.list.push(item);
+					});
+					this.item = this.list[0];
+					this.item.locationSet.forEach(item => {
+						this.polygons[0].points.push({ latitude: item.lat, longitude: item.lng });
+					});
+					//this.covers.push({ latitude: this.item.locationSet.lat, longitude: this.item.locationSet.lng, iconPath: this.$http.urls.ip + this.item.iconPictures });
+				}
+			});
 		}
 	}
+};
 </script>
 
 <style lang="scss">
-.pic{
+.map {
+	position: fixed;
 	width: 100%;
+	height: 100%;
+	top: 0px;
 }
 </style>

+ 1 - 1
smart-ui-app/pages/travel/index.vue

@@ -6,7 +6,7 @@
 				<view class="con">
 					<view class="title omit">{{ item.title }}</view>
 					<view class="ms">
-						<text class="ll">1233</text>
+						<text class="ll">{{item.browseNum}}</text>
 						<text class="wz">浏览</text>
 					</view>
 					<view class="lx">

+ 1 - 0
smart-ui-app/pages/user/login.vue

@@ -38,6 +38,7 @@ export default {
 								data:info,
 								method:'POST',
 								success: res => {
+									res.data.data.memberInfo.apiToken=res.data.data.apiToken;
 									uni.setStorageSync('user', res.data.data.memberInfo);
 									uni.navigateBack({ delta: 1 });
 								}

+ 29 - 3
smart-ui-app/pages/user/my.vue

@@ -6,16 +6,23 @@
 				<view class="xs" @click="navigate('/pages/user/info')">
 					<view v-if="user == ''">登录 / 注册</view>
 					<view class="nickName" v-else>{{ user.nickName }}</view>
-					<view class="nh">你好,欢迎来到智慧旅游</view>
+					<view class="nh">{{ user == '' ? '你还未登陆' : ' 你好,欢迎来到智慧旅游' }}</view>
 				</view>
 			</view>
 			<image src="../../static/bj.jpg" mode="aspectFill"></image>
 		</view>
+		<view class="sjia" @click="navigate('/pages/shop/apply')" v-if="user!=''">
+			<text>商家申请</text>
+		</view>
 		<view class="main">
 			<view class="flex menu">
-				<view class="f">
+				<!-- 				<view class="f">
 					<view class="icon" style="background-color: #607D8B">&#xe636;</view>
 					<view class="title">我的预约</view>
+				</view> -->
+				<view class="f" @click="navigate('/pages/shop/up')">
+					<view class="icon" style="background-color: #607D8B">&#xe636;</view>
+					<view class="title">数据上报</view>
 				</view>
 				<view class="f">
 					<view class="icon" style="background-color: #e23e33;">&#xe610;</view>
@@ -77,7 +84,7 @@ export default {
 		position: absolute;
 		top: 70px;
 		left: 20px;
-		z-index: 111111;
+		z-index: 11;
 		.head {
 			width: 75px;
 			height: 75px;
@@ -148,4 +155,23 @@ export default {
 		}
 	}
 }
+.sjia {
+	position: fixed;
+	top: 13%;
+	right: 0px;
+	width: 90px;
+	background: red;
+	z-index: 111;
+	padding: 5px 10px 5px 10px;
+	color: white;
+	font-size: 15px;
+	text-align: center;
+	border-radius: 10px 0px 0px 10px;
+	box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.3);
+	opacity: 0.7;
+	.icon {
+		font-size: 25px;
+		padding-bottom: 3px;
+	}
+}
 </style>

BIN
smart-ui-app/static/lx.jpg