Explorar el Código

小程序更新

xiaoshushu hace 3 años
padre
commit
e2ce60bdcf

+ 49 - 34
smart-admin/src/main/java/com/huijy/web/controller/api/ApiIndexController.java

@@ -20,7 +20,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-@Api(value = "小程序",tags = "小程序接口")
+@Api(value = "小程序", tags = "小程序接口")
 @RestController
 @RequestMapping("/api/index")
 public class ApiIndexController extends ApiAbstractController {
@@ -70,13 +70,14 @@ public class ApiIndexController extends ApiAbstractController {
         memberLocationService.insertMemberLocation(location);
         return AjaxResult.success();
     }
+
     //上传会员拨打记录
     @PostMapping("/pushHelp")
     @ApiOperation("上传会员拨打记录")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "lat", value = "坐标的lat",dataType = "String", paramType = "body"),
-            @ApiImplicitParam(name = "lng", value = "坐标的lng",dataType = "String",paramType = "body"),
-            @ApiImplicitParam(name = "phone", value = "求助电话",dataType = "String", paramType = "body")
+            @ApiImplicitParam(name = "lat", value = "坐标的lat", dataType = "String", paramType = "body"),
+            @ApiImplicitParam(name = "lng", value = "坐标的lng", dataType = "String", paramType = "body"),
+            @ApiImplicitParam(name = "phone", value = "求助电话", dataType = "String", paramType = "body")
     })
     public AjaxResult pushHelp(@ApiIgnore Member member, @RequestBody MemberHelp help) {
 
@@ -100,15 +101,15 @@ public class ApiIndexController extends ApiAbstractController {
     @ApiOperation("分页获取主要内容信息")
     @UnLogin
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "type", value = "类型:1、党政服务;2、景区介绍;3、旅游攻略;4、热门活动",required = true,defaultValue = "1",dataType = "Integer",
-                    allowableValues = "1,2,3,4",paramType = "query"),
-            @ApiImplicitParam(name = "pageNum", required = true,defaultValue = "1",value = "页码", paramType = "query"),
-            @ApiImplicitParam(name = "pageSize", required = true,defaultValue = "20", value = "显示记录数", paramType = "query")
+            @ApiImplicitParam(name = "type", value = "类型:1、党政服务;2、景区介绍;3、旅游攻略;4、热门活动", required = true, defaultValue = "1", dataType = "Integer",
+                    allowableValues = "1,2,3,4", paramType = "query"),
+            @ApiImplicitParam(name = "pageNum", required = true, defaultValue = "1", value = "页码", paramType = "query"),
+            @ApiImplicitParam(name = "pageSize", required = true, defaultValue = "20", value = "显示记录数", paramType = "query")
     })
     public TableDataInfo getPageContent(@ApiIgnore Member member, Integer type) {
-       // AboutUs aboutUs = aboutUsService.selectAboutUsByAboutUsId(1L);
+        // AboutUs aboutUs = aboutUsService.selectAboutUsByAboutUsId(1L);
         Content content = new Content();
-        content.setServiceInfo(type+"");
+        content.setServiceInfo(type + "");
         content.setReleaseFlag("1");
         startPage();
         List<Content> list = contentService.selectContentList(content);
@@ -122,7 +123,7 @@ public class ApiIndexController extends ApiAbstractController {
     @ApiOperation("获取主要内容详细信息")
     @UnLogin
 
-    public AjaxResult getContentInfo(@ApiIgnore Member member, @PathVariable  Integer contentId) {
+    public AjaxResult getContentInfo(@ApiIgnore Member member, @PathVariable Integer contentId) {
         // AboutUs aboutUs = aboutUsService.selectAboutUsByAboutUsId(1L);
 
         Content info = contentService.selectContentByContentId(contentId.longValue());
@@ -136,18 +137,18 @@ public class ApiIndexController extends ApiAbstractController {
     @PostMapping("/shopApply")
     @ApiOperation("商铺开通申请")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "name", value = "商铺名称",required = true,paramType = "body"),
+            @ApiImplicitParam(name = "name", value = "商铺名称", required = true, paramType = "body"),
             @ApiImplicitParam(name = "addres", value = "地址", paramType = "body"),
-            @ApiImplicitParam(name = "bossName", value = "老板名称",required = true, paramType = "body"),
-            @ApiImplicitParam(name = "bossPhone", value = "老板电话",required = true, paramType = "body"),
+            @ApiImplicitParam(name = "bossName", value = "老板名称", required = true, paramType = "body"),
+            @ApiImplicitParam(name = "bossPhone", value = "老板电话", required = true, paramType = "body"),
             @ApiImplicitParam(name = "businessHours", value = "营业时间", paramType = "body"),
             @ApiImplicitParam(name = "briefContent", value = "简介", paramType = "body"),
             @ApiImplicitParam(name = "lat", value = "坐标的lat", paramType = "body"),
             @ApiImplicitParam(name = "lng", value = "坐标的lng", paramType = "body"),
-            @ApiImplicitParam(name = "shopType", value = "商铺类型 1、商铺 2、酒店",defaultValue = "1",paramType = "body"),
+            @ApiImplicitParam(name = "shopType", value = "商铺类型 1、商铺 2、酒店", defaultValue = "1", paramType = "body"),
     })
     public AjaxResult storeApply(@ApiIgnore Member member, @RequestBody Shop shop) {
-        if (shop == null){
+        if (shop == null) {
             AjaxResult.error("提交数据为空");
         }
         shop.setAuditFlag("0");
@@ -169,8 +170,8 @@ public class ApiIndexController extends ApiAbstractController {
     @GetMapping("/getShopInfo/{shopId}")
     @ApiOperation("获取商铺列表")
     public AjaxResult getShopInfo(@ApiIgnore Member member, @PathVariable Long shopId) {
-        if (shopId == null){
-            AjaxResult.error("提交数据为空");
+        if (shopId == null) {
+            return AjaxResult.error("提交数据为空");
         }
         Shop shop = shopService.selectShopByShopId(shopId);
         Map<String, Object> resultObj = new HashMap<String, Object>();
@@ -178,12 +179,26 @@ public class ApiIndexController extends ApiAbstractController {
         return AjaxResult.success(resultObj);
     }
 
+    //更新门店信息
+    @PostMapping("/updateShop")
+    @ApiOperation("未审核时,允许更新门店信息")
+    public AjaxResult updateShop(@RequestBody Shop shop) {
+        if (shop.getShopId() == null) {
+            return AjaxResult.error("提交数据为空");
+        }
+        //未审核时才允许更新门店信息
+        if (!shop.getAuditFlag().equals("0")) {
+            return AjaxResult.error("店铺信息不允许更新");
+        }
+        shopService.updateShop(shop);
+        return AjaxResult.success();
+    }
 
     //更新门店坐标
     @PostMapping("/updateLatLng")
     @ApiOperation("更新门店坐标")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "shopId", value = "商铺id",required = true,paramType = "body"),
+            @ApiImplicitParam(name = "shopId", value = "商铺id", required = true, paramType = "body"),
             @ApiImplicitParam(name = "lat", value = "坐标的lat", paramType = "body"),
             @ApiImplicitParam(name = "lng", value = "坐标的lng", paramType = "body")
     })
@@ -191,12 +206,12 @@ public class ApiIndexController extends ApiAbstractController {
         String lat = (String) params.get("lat");
         String lng = (String) params.get("lng");
         Integer shopId = (Integer) params.get("shopId");
-        if (shopId==null || shopId<=0){
-            return  AjaxResult.error("店铺id不能为空");
+        if (shopId == null || shopId <= 0) {
+            return AjaxResult.error("店铺id不能为空");
         }
         Shop shop = shopService.selectShopByShopId(shopId.longValue());
-        if (shop == null){
-            return  AjaxResult.error("获取店铺信息出错");
+        if (shop == null) {
+            return AjaxResult.error("获取店铺信息出错");
         }
         shop.setLat(lat);
         shop.setLng(lng);
@@ -209,7 +224,7 @@ public class ApiIndexController extends ApiAbstractController {
     @PostMapping("/pushRecord")
     @ApiOperation("门店数据上报")
     public AjaxResult storeApply(@ApiIgnore Member member, @RequestBody ShopSalesRecord shopSalesRecord) {
-        if (shopSalesRecord==null){
+        if (shopSalesRecord == null) {
             AjaxResult.error("上传数据为空");
         }
         shopSalesRecordService.insertShopSalesRecord(shopSalesRecord);
@@ -219,7 +234,7 @@ public class ApiIndexController extends ApiAbstractController {
     //返回标记物类型
     @PostMapping("/getMarkerType")
     @ApiOperation("获取标记物类型")
-    public AjaxResult getMarkerDictData(){
+    public AjaxResult getMarkerDictData() {
         SysDictData dictData = new SysDictData();
         dictData.setDictType("marker_type");
         dictData.setStatus("0");
@@ -234,14 +249,14 @@ public class ApiIndexController extends ApiAbstractController {
     @GetMapping("/getPageMarker")
     @ApiOperation("根据标记物类型分页获取标记物信息")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "markerType", value = "标记物类型:0为所有类型",required = true,defaultValue = "0",dataType = "String",paramType = "query"),
-            @ApiImplicitParam(name = "pageNum", required = true,defaultValue = "1",value = "页码", paramType = "query"),
-            @ApiImplicitParam(name = "pageSize", required = true,defaultValue = "20", value = "显示记录数", paramType = "query")
+            @ApiImplicitParam(name = "markerType", value = "标记物类型:0为所有类型", required = true, defaultValue = "0", dataType = "String", paramType = "query"),
+            @ApiImplicitParam(name = "pageNum", required = true, defaultValue = "1", value = "页码", paramType = "query"),
+            @ApiImplicitParam(name = "pageSize", required = true, defaultValue = "20", value = "显示记录数", paramType = "query")
     })
     public TableDataInfo getPageMarker(String markerType) {
 
         Marker marker = new Marker();
-        if (StringUtils.isNotEmpty(markerType) && !markerType.equalsIgnoreCase("0")){
+        if (StringUtils.isNotEmpty(markerType) && !markerType.equalsIgnoreCase("0")) {
             marker.setMarkerType(markerType);
         }
         startPage();
@@ -253,7 +268,7 @@ public class ApiIndexController extends ApiAbstractController {
 
     @PostMapping("/getEarlyWarnType")
     @ApiOperation("获取预警类型")
-    public AjaxResult getEarlyWarnType(){
+    public AjaxResult getEarlyWarnType() {
         SysDictData dictData = new SysDictData();
         dictData.setDictType("early_warning_type");
         dictData.setStatus("0");
@@ -267,14 +282,14 @@ public class ApiIndexController extends ApiAbstractController {
     @GetMapping("/getPageEarlyWarn")
     @ApiOperation("根据预警类型分页获取预警信息")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "earlyWarnType", value = "预警类型:0为所有类型",required = true,defaultValue = "0",dataType = "String",paramType = "query"),
-            @ApiImplicitParam(name = "pageNum", required = true,defaultValue = "1",value = "页码", paramType = "query"),
-            @ApiImplicitParam(name = "pageSize", required = true,defaultValue = "20", value = "显示记录数", paramType = "query")
+            @ApiImplicitParam(name = "earlyWarnType", value = "预警类型:0为所有类型", required = true, defaultValue = "0", dataType = "String", paramType = "query"),
+            @ApiImplicitParam(name = "pageNum", required = true, defaultValue = "1", value = "页码", paramType = "query"),
+            @ApiImplicitParam(name = "pageSize", required = true, defaultValue = "20", value = "显示记录数", paramType = "query")
     })
     public TableDataInfo getPageEarlyWarn(String earlyWarnType) {
 
         EarlyWarning earlyWarning = new EarlyWarning();
-        if (StringUtils.isNotEmpty(earlyWarnType) && !earlyWarnType.equalsIgnoreCase("0")){
+        if (StringUtils.isNotEmpty(earlyWarnType) && !earlyWarnType.equalsIgnoreCase("0")) {
             earlyWarning.setEarlyWarningType(earlyWarnType);
         }
         startPage();

+ 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_ht6cfvq625q.ttf?t=1631771735015') format('truetype');
+	src: url('https://at.alicdn.com/t/font_2816842_arp22mrk3ue.ttf?t=1633749647568') format('truetype');
 	/* src: url('~@/static/font/iconfont.ttf') format('truetype'); */
 }
 .icon {

+ 2 - 1
smart-ui-app/common/http.js

@@ -14,6 +14,8 @@ const urls = {
 	getAboutUs: ip + '/api/index/getAboutUs/', //获取关于我们的信息
 	pushRecord: ip + '/api/index/pushRecord', //门店数据上报
 	shopApply: ip + '/api/index/shopApply', //商铺开通申请
+	getShopList: ip + '/api/index/getShopList', //获取商铺列表
+	updateShop: ip + '/api/index/updateShop', //更新门店信息
 	getPageMarker: ip + '/api/index/getPageMarker', //根据标记物类型分页获取标记物信息
 	pushHelp: ip + '/api/index/pushHelp', //上传会员拨打记录
 }
@@ -51,7 +53,6 @@ const request = (opt) => {
 			setTimeout(() => {
 				uni.hideLoading();
 			}, 500)
-			/*******************系统内部错误***************************/
 			if (res.data.code == 200) {
 				opt.success(res);
 			} else {

+ 37 - 10
smart-ui-app/pages.json

@@ -11,21 +11,14 @@
 			}
 		},
 		{
-			"path": "pages/travel/detail",
+			"path": "pages/shop/list",
 			"style": {
-				"navigationBarTitleText": "旅游路线",
+				"navigationBarTitleText": "我的店铺",
 				"enablePullDownRefresh": false
 			}
 
 		},
 		{
-			"path": "pages/user/my",
-			"style": {
-				"navigationBarTitleText": "我的",
-				"navigationStyle": "custom"
-			}
-		},
-		{
 			"path": "pages/shop/apply",
 			"style": {
 				"navigationBarTitleText": "店铺开通申请",
@@ -42,6 +35,23 @@
 
 		},
 		{
+			"path": "pages/travel/detail",
+			"style": {
+				"navigationBarTitleText": "内容详情",
+				"enablePullDownRefresh": false
+			}
+
+		},
+		{
+			"path": "pages/user/my",
+			"style": {
+				"navigationBarTitleText": "我的",
+				"navigationStyle": "custom"
+			}
+		},
+
+
+		{
 			"path": "pages/other/about",
 			"style": {
 				"navigationBarTitleText": "关于我们"
@@ -90,8 +100,25 @@
 				"enablePullDownRefresh": false
 			}
 
+		}, {
+			"path": "pages/travel/introduction",
+			"style": {
+				"navigationBarTitleText": "旅游攻略",
+				"enablePullDownRefresh": true,
+				"backgroundTextStyle": "dark"
+			}
+
 		}
-	],
+	    ,{
+            "path" : "pages/travel/route",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "路线",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+    ],
 	"tabBar": {
 		"color": "#7A7E83",
 		"selectedColor": "#c74547",

+ 7 - 7
smart-ui-app/pages/index/index.vue

@@ -29,11 +29,11 @@
 					<view class="icon" style="background-color: #e23e33;">&#xe695;</view>
 					<view class="title">党政服务</view>
 				</view>
-				<view class="f">
+				<view class="f" @click="navigate('/pages/travel/introduction')">
 					<view class="icon" style="background-color: #2cc937;">&#xe647;</view>
 					<view class="title">旅游攻略</view>
 				</view>
-				<view class="f" @click="tab('/pages/government/index?type=4')">
+				<view class="f" @click="navigate('/pages/government/activity')">
 					<view class="icon" style="background-color: #e23e33;">&#xe645;</view>
 					<view class="title">热门活动</view>
 				</view>
@@ -41,17 +41,17 @@
 			<view class="flex mt10">
 				<view class="item" @click="tab('/pages/travel/index')">
 					<view class="tag">景区介绍</view>
-					<image src="../../static/img1.jpg" mode="aspectFill" class="gray"></image>
+					<image src="../../static/img77.jpg" mode="aspectFill" class="gray"></image>
 					<view class="more">点击显示更多</view>
 				</view>
 				<view class="item" @click="tab('/pages/government/index')">
 					<view class="tag">党政服务信息</view>
-					<image src="../../static/img1.jpg" mode="aspectFill" class="gray"></image>
+					<image src="../../static/img3.jpg" mode="aspectFill" class="gray"></image>
 					<view class="more">点击显示更多</view>
 				</view>
 			</view>
 			<view class="flex">
-				<view class="item">
+				<view class="item" @click="navigate('/pages/travel/introduction')">
 					<view class="tag">旅游攻略</view>
 					<image src="../../static/img2.jpg" mode="aspectFill" class="gray"></image>
 					<view class="more">点击显示更多</view>
@@ -150,7 +150,7 @@ export default {
 	color: white;
 	.wz {
 		position: absolute;
-		top: 40px;
+		top: 45px;
 		left: 20px;
 		z-index: 111111;
 		.icon {
@@ -159,7 +159,7 @@ export default {
 	}
 	.wd {
 		position: absolute;
-		top: 70px;
+		top: 80px;
 		left: 20px;
 		z-index: 111111;
 		.qw {

+ 62 - 6
smart-ui-app/pages/shop/apply.vue

@@ -1,7 +1,8 @@
 <template>
 	<view>
 		<view class="cn">
-			<u-steps :list="numList" :current="current"></u-steps>
+			<u-steps :list="numList" mode="number" :current="num" active-color="#c74547"></u-steps>
+			<u-subsection :list="subsection" :current="current" @change="section" button-color="#c74547" active-color="#ffffff"></u-subsection>
 			<view class="info">
 				<view class="form_group hr">
 					<view class="lable">商铺名称</view>
@@ -20,11 +21,16 @@
 					<input type="number" placeholder="请输入老板电话" v-model="item.bossPhone" />
 				</view>
 				<view class="form_group hr">
+					<view class="lable">地图坐标</view>
+					<input type="number" placeholder="请在地图上选择坐标" @click="wz()" v-model="zb" :disabled="true" />
+				</view>
+				<view class="form_group hr">
 					<view class="lable">商铺简介</view>
 					<textarea placeholder="请输入商铺简介" v-model="item.briefContent" />
 				</view>
 			</view>
-			<button class="btn" @click="up()">申请开通</button>
+			<button class="btn" @click="up()" v-if="!item.auditFlag">申请开通</button>
+			<button class="btn" @click="up()" v-if="item.auditFlag == 0">更新资料</button>
 		</view>
 	</view>
 </template>
@@ -33,18 +39,64 @@
 export default {
 	data() {
 		return {
-			numList: [{ name: '申请开通' }, { name: '资料审核' }, { name: '商家入驻' }],
+			subsection: [{ name: '商铺', value: 1 }, { name: '酒店', value: 2 }],
+			numList: [{ name: '资料填写' }, { name: '资料审核' }, { name: '审核通过' }],
+			num: 0,
 			current: 0,
-			item: {}
+			item: {},
+			zb: ''
 		};
 	},
+	onLoad(e) {
+		if (e.item) {
+			this.item = JSON.parse(e.item);
+			if(this.item.lat){
+				this.zb = '纬度:' + this.item.lat + ' 经度:' + this.item.lng;
+			}
+			this.subsection.forEach((item,index)=>{
+				if(item.value==this.item.shopType){
+					this.current=index;
+				}
+			})
+			this.item.shopType = this.subsection[this.current].value;
+			if (this.item.auditFlag == 0) {
+				this.num = 1;
+			}
+			if (this.item.auditFlag == 1) {
+				this.num = 2;
+			}
+		}
+	},
 	methods: {
+		section(current) {
+			this.current = current;
+		},
+		wz() {
+			uni.getLocation({
+				type: 'gcj02', //返回可以用于uni.openLocation的经纬度
+				success: res => {
+					uni.chooseLocation({
+						success: r => {
+							this.zb = '纬度:' + r.latitude + ' 经度:' + r.longitude;
+							this.item.lat = r.latitude;
+							this.item.lng = r.longitude;
+						}
+					});
+				},
+				fail: res => {
+					console.log('zx:' + JSON.stringify(res));
+				}
+			});
+		},
 		up() {
+			this.item.shopType = this.subsection[this.current].value;
+			this.item.memberId = this.$getUser().memberId;
 			let rule = [
 				{ name: 'name', checkType: 'notnull', errorMsg: '请输入商铺名称' },
 				{ name: 'addres', checkType: 'notnull', errorMsg: '请输入商铺地址' },
 				{ name: 'bossName', checkType: 'notnull', errorMsg: '请输入老板名称' },
-				{ name: 'bossPhone', checkType: 'notnull', errorMsg: '请输入老板电话' }
+				{ name: 'bossPhone', checkType: 'notnull', errorMsg: '请输入老板电话' },
+				{ name: 'lat', checkType: 'notnull', errorMsg: '请在地图上选择坐标' }
 			];
 			if (!this.$verify.check(this.item, rule)) {
 				uni.showModal({ content: this.$verify.error, showCancel: false });
@@ -52,11 +104,12 @@ export default {
 			}
 			this.$http.request({
 				method: 'POST',
-				url: this.$http.urls.shopApply,
+				url: this.item.shopId ? this.$http.urls.updateShop : this.$http.urls.shopApply,
 				data: this.item,
 				success: res => {
 					uni.showToast({ title: '提交成功' });
 					setTimeout(() => {
+						uni.$emit('shop');
 						uni.navigateBack();
 					}, 700);
 				}
@@ -71,6 +124,9 @@ export default {
 	text-align: center;
 	margin-top: 20px;
 }
+.u-subsection {
+	margin-top: 20px;
+}
 .cn {
 	padding: 15px;
 	.info {

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 41 - 0
smart-ui-app/pages/shop/list.vue


+ 36 - 4
smart-ui-app/pages/shop/up.vue

@@ -1,6 +1,7 @@
 <template>
 	<view>
-		<view class="mtop"><image src="../../static/lx.jpg" mode="widthFix"></image></view>
+		<view class="mtop"><image src="../../static/my.jpg" mode="widthFix"></image></view>
+		<view class="time">上次上报:{{ time }}</view>
 		<view class="cn">
 			<view class="info">
 				<view class="form_group hr">
@@ -20,7 +21,7 @@
 					<input type="number" placeholder="请输入团客接待人数" v-model="item.groupReception" />
 				</view>
 				<view class="form_group hr">
-					<view class="lable">销售金额</view>
+					<view class="lable">销售金额(元)</view>
 					<input type="number" placeholder="请输入销售金额" v-model="item.salesAmount" />
 				</view>
 			</view>
@@ -33,9 +34,33 @@
 export default {
 	data() {
 		return {
-			item: {}
+			item: {},
+			time: '未上报过'
 		};
 	},
+	onLoad(e) {
+		if (e.item) {
+			let shop = JSON.parse(e.item);
+			this.item.shopId = shop.shopId;
+			if (shop.shopType == 1) {
+				this.$nextTick(() => {
+					uni.setNavigationBarTitle({
+						title: '门店数据上报'
+					});
+				});
+			}
+			if (shop.shopType == 2) {
+				this.$nextTick(() => {
+					uni.setNavigationBarTitle({
+						title: '酒店数据上报'
+					});
+				});
+			}
+		}
+		if (uni.getStorageSync('time') != '') {
+			this.time = this.$u.timeFrom(new Date(uni.getStorageSync('time').replace(/\-/g, '/')).getTime());
+		}
+	},
 	methods: {
 		up() {
 			let rule = [
@@ -55,6 +80,7 @@ export default {
 				data: this.item,
 				success: res => {
 					uni.showToast({ title: '上报成功' });
+					uni.setStorageSync('time', this.$util.getDate('time'));
 					setTimeout(() => {
 						uni.navigateBack();
 					}, 700);
@@ -69,9 +95,15 @@ export default {
 .mtop {
 	text-align: center;
 	image {
-		width: 80%;
+		margin-top: 15px;
+		width: 40%;
 	}
 }
+.time {
+	text-align: center;
+	color: $dar;
+	font-size: 13px;
+}
 .cn {
 	padding: 15px;
 	.info {

+ 56 - 43
smart-ui-app/pages/travel/detail.vue

@@ -1,59 +1,72 @@
 <template>
-	<view><map class="map" :latitude="item.lat" :longitude="item.lng" :polygons="polygons" show-compass="true"></map></view>
+	<view class="contents">
+		<view class="title">
+			<text>{{ item.title }}</text>
+		</view>
+		<view class="ly">
+			<text>{{ item.author }}</text>
+			<text class="day">4天前</text>
+		</view>
+		<view>
+			<view class="fwb"><u-parse :html="item.content"></u-parse></view>
+			<view class="mt10">
+				<view class="">来源:作者名称</view>
+				<view class="">编辑丨编辑名称</view>
+				<view class="">责编丨初审名称</view>
+				<view class="">审核丨终审名称</view>
+			</view>
+		</view>
+	</view>
 </template>
 
 <script>
 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: []
-				}
-			]
+			ip: this.$http.urls.ip,
+			item: {}
 		};
 	},
-	onLoad() {
-		this.getData();
-		this.windowHeight = uni.getSystemInfoSync().windowHeight;
+	onLoad(e) {
+		this.$http.request({
+			url: this.$http.urls.getContentInfo + e.id,
+			success: res => {
+				console.log('asd:' + JSON.stringify(res));
+				this.item = res.data.data.info;
+				//this.item.contents = res.data.data.contents.replace(/\<img/gi, '<img style=width:100%;height:auto');
+			}
+		});
 	},
-	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 });
-				}
-			});
-		}
-	}
+	methods: {}
 };
 </script>
 
 <style lang="scss">
-.map {
-	position: fixed;
-	width: 100%;
-	height: 100%;
-	top: 0px;
+.contents {
+	padding: 20px;
+	.ly {
+		font-size: 14px;
+		margin-bottom: 15px;
+		color: #2196f3;
+		.day {
+			color: #818184;
+			padding-left: 10px;
+		}
+	}
+	.title {
+		padding-top: 20px;
+		font-size: 23px;
+		font-weight: 400;
+		margin-bottom: 20px;
+	}
+	.pic {
+		width: 100%;
+		border-radius: 3px;
+		margin-top: 3px;
+	}
+	.fwb {
+		margin-top: 15px;
+		color: #909090;
+	}
 }
 </style>

+ 7 - 3
smart-ui-app/pages/travel/index.vue

@@ -6,10 +6,10 @@
 				<view class="con">
 					<view class="title omit">{{ item.title }}</view>
 					<view class="ms">
-						<text class="ll">{{item.browseNum}}</text>
+						<text class="ll">{{ item.browseNum }}</text>
 						<text class="wz">浏览</text>
 					</view>
-					<view class="lx">
+					<view class="lx" @click.stop="lx(item)">
 						<text class="icon">&#xe696;</text>
 						景区路线
 					</view>
@@ -49,9 +49,13 @@ export default {
 				}
 			});
 		},
+		//路线
+		lx(item) {
+			uni.navigateTo({ url: '/pages/travel/route' });
+		},
 		//详情
 		detail(item) {
-			uni.navigateTo({ url: '/pages/travel/detail' });
+			uni.navigateTo({ url: '/pages/travel/detail?id=' + item.contentId });
 		},
 		//刷新数据
 		refresh() {

+ 137 - 0
smart-ui-app/pages/travel/introduction.vue

@@ -0,0 +1,137 @@
+<template>
+	<view>
+		<view class="list">
+			<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
+				<image :src="ip + item.showPictures" mode="aspectFill" class="pic"></image>
+				<view class="con">
+					<view class="title omit">{{ item.title }}</view>
+					<view class="ms">
+						<text class="ll">{{ item.browseNum }}</text>
+						<text class="wz">浏览</text>
+					</view>
+<!-- 					<view class="lx">
+						<text class="icon">&#xe696;</text>
+						景区路线
+					</view> -->
+				</view>
+				<view class="clear"></view>
+			</view>
+			<view class="loading"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			ip: this.$http.urls.ip,
+			list: [],
+			param: { pageNum: 1, pageSize: 10, type: 3 },
+			loadMore: true
+		};
+	},
+	onLoad() {
+		this.getData();
+	},
+	methods: {
+		//获取数据
+		getData() {
+			this.$http.request({
+				url: this.$http.urls.getPageContent,
+				data: this.param,
+				loading: 'false',
+				success: 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/travel/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: 15px 8px 15px 8px;
+		border-bottom: 1px solid #e5e5e5;
+		border-radius: 5px;
+		margin-top: 10px;
+		box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
+		.pic {
+			float: left;
+			width: 30%;
+			border-radius: 3px;
+			height: 80px;
+			background-color: #dcdcdc;
+		}
+		.con {
+			padding-left: 30px;
+			width: 60%;
+			float: left;
+			.title {
+				font-size: 15px;
+				text-align: left;
+				color: #252525;
+				font-weight: bold;
+			}
+			.ms {
+				margin-top: 10px;
+				.ll {
+					color: #d72424;
+					font-size: 16px;
+					padding-right: 5px;
+				}
+				.wz {
+					font-size: 12px;
+				}
+			}
+			.lx {
+				float: right;
+				color: #fff;
+				background: #d72424;
+				border-radius: 10px;
+				padding: 8px 10px;
+				font-size: 16px;
+				color: white;
+				font-weight: 700;
+				margin-right: -20px;
+				.icon {
+					padding-right: 5px;
+					font-size: 20px;
+				}
+			}
+		}
+	}
+}
+</style>

+ 59 - 0
smart-ui-app/pages/travel/route.vue

@@ -0,0 +1,59 @@
+<template>
+	<view><map class="map" :latitude="item.lat" :longitude="item.lng" :polygons="polygons" show-compass="true"></map></view>
+</template>
+
+<script>
+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">
+.map {
+	position: fixed;
+	width: 100%;
+	height: 100%;
+	top: 0px;
+}
+</style>

+ 6 - 6
smart-ui-app/pages/user/login.vue

@@ -28,17 +28,17 @@ export default {
 				lang: 'zh_CN',
 				provider: 'weixin',
 				success: info => {
-					console.log('登陆:' + JSON.stringify(info));
+					console.log('获取微信资料:' + JSON.stringify(info));
 					uni.login({
 						provider: 'weixin',
 						success: res => {
-							console.log("res:"+JSON.stringify(res));
+							console.log('微信登陆成功:' + JSON.stringify(res));
 							this.$http.request({
-								url: this.$http.urls.wxLogin+res.code,
-								data:info,
-								method:'POST',
+								url: this.$http.urls.wxLogin + res.code,
+								data: info,
+								method: 'POST',
 								success: res => {
-									res.data.data.memberInfo.apiToken=res.data.data.apiToken;
+									res.data.data.memberInfo.apiToken = res.data.data.apiToken;
 									uni.setStorageSync('user', res.data.data.memberInfo);
 									uni.navigateBack({ delta: 1 });
 								}

+ 2 - 8
smart-ui-app/pages/user/my.vue

@@ -11,18 +11,12 @@
 			</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="sjia" @click="navigate('/pages/shop/list')" 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>

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


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


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


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


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


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


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


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


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio