xiaoshushu před 3 roky
rodič
revize
e2dab0e469

+ 41 - 38
smart-system/src/main/java/com/huijy/management/domain/MemberHelp.java

@@ -11,14 +11,17 @@ import org.apache.commons.lang3.builder.ToStringStyle;
  * @author luobo
  * @date 2021-09-12
  */
-public class MemberHelp extends BaseEntity
-{
+public class MemberHelp extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
-    /** 求助记录Id */
+    /**
+     * 求助记录Id
+     */
     private Long memberHelpId;
 
-    /** 会员id */
+    /**
+     * 会员id
+     */
     private Long memberId;
 
     private String memberName;
@@ -27,58 +30,58 @@ public class MemberHelp extends BaseEntity
 
     private String memberPhone;
 
-    /** 求助电话 */
+    /**
+     * 求助电话
+     */
     private String phone;
 
-    /** 坐标lat */
+    /**
+     * 坐标lat
+     */
     private String lat;
 
-    /** 坐标lng */
+    /**
+     * 坐标lng
+     */
     private String lng;
 
-    public void setMemberHelpId(Long memberHelpId)
-    {
+    public void setMemberHelpId(Long memberHelpId) {
         this.memberHelpId = memberHelpId;
     }
 
-    public Long getMemberHelpId()
-    {
+    public Long getMemberHelpId() {
         return memberHelpId;
     }
-    public void setMemberId(Long memberId)
-    {
+
+    public void setMemberId(Long memberId) {
         this.memberId = memberId;
     }
 
-    public Long getMemberId()
-    {
+    public Long getMemberId() {
         return memberId;
     }
-    public void setPhone(String phone)
-    {
+
+    public void setPhone(String phone) {
         this.phone = phone;
     }
 
-    public String getPhone()
-    {
+    public String getPhone() {
         return phone;
     }
-    public void setLat(String lat)
-    {
+
+    public void setLat(String lat) {
         this.lat = lat;
     }
 
-    public String getLat()
-    {
+    public String getLat() {
         return lat;
     }
-    public void setLng(String lng)
-    {
+
+    public void setLng(String lng) {
         this.lng = lng;
     }
 
-    public String getLng()
-    {
+    public String getLng() {
         return lng;
     }
 
@@ -108,16 +111,16 @@ public class MemberHelp extends BaseEntity
 
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("memberHelpId", getMemberHelpId())
-            .append("memberId", getMemberId())
-            .append("phone", getPhone())
-            .append("createTime", getCreateTime())
-            .append("lat", getLat())
-            .append("lng", getLng())
-            .append("memberName", getMemberName())
-            .append("nickName", getNickName())
-            .append("memberPhone", getMemberPhone())
-            .toString();
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("memberHelpId", getMemberHelpId())
+                .append("memberId", getMemberId())
+                .append("phone", getPhone())
+                .append("createTime", getCreateTime())
+                .append("lat", getLat())
+                .append("lng", getLng())
+                .append("memberName", getMemberName())
+                .append("nickName", getNickName())
+                .append("memberPhone", getMemberPhone())
+                .toString();
     }
 }

+ 9 - 9
smart-system/src/main/java/com/huijy/management/mapper/MemberHelpMapper.java

@@ -1,19 +1,19 @@
 package com.huijy.management.mapper;
 
 import java.util.List;
+
 import com.huijy.management.domain.MemberHelp;
 
 /**
  * 求助记录Mapper接口
- * 
+ *
  * @author luobo
  * @date 2021-09-12
  */
-public interface MemberHelpMapper 
-{
+public interface MemberHelpMapper {
     /**
      * 查询求助记录
-     * 
+     *
      * @param memberHelpId 求助记录主键
      * @return 求助记录
      */
@@ -21,7 +21,7 @@ public interface MemberHelpMapper
 
     /**
      * 查询求助记录列表
-     * 
+     *
      * @param memberHelp 求助记录
      * @return 求助记录集合
      */
@@ -29,7 +29,7 @@ public interface MemberHelpMapper
 
     /**
      * 新增求助记录
-     * 
+     *
      * @param memberHelp 求助记录
      * @return 结果
      */
@@ -37,7 +37,7 @@ public interface MemberHelpMapper
 
     /**
      * 修改求助记录
-     * 
+     *
      * @param memberHelp 求助记录
      * @return 结果
      */
@@ -45,7 +45,7 @@ public interface MemberHelpMapper
 
     /**
      * 删除求助记录
-     * 
+     *
      * @param memberHelpId 求助记录主键
      * @return 结果
      */
@@ -53,7 +53,7 @@ public interface MemberHelpMapper
 
     /**
      * 批量删除求助记录
-     * 
+     *
      * @param memberHelpIds 需要删除的数据主键集合
      * @return 结果
      */

+ 1 - 3
smart-system/src/main/resources/mapper/management/FeedbackMapper.xml

@@ -20,9 +20,7 @@
     <select id="selectFeedbackList" parameterType="Feedback" resultMap="FeedbackResult">
         <include refid="selectFeedbackVo"/>
         <where>
-            <if test="title != null  and title != ''">and title = #{title}</if>
-            <if test="content != null  and content != ''">and content = #{content}</if>
-            <if test="pic != null  and pic != ''">and pic = #{pic}</if>
+            <if test="title != null  and title != ''">and title like concat('%', #{title}, '%')</if>
             <if test="phone != null  and phone != ''">and phone = #{phone}</if>
         </where>
     </select>

+ 17 - 15
smart-system/src/main/resources/mapper/management/MemberHelpMapper.xml

@@ -1,31 +1,33 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.huijy.management.mapper.MemberHelpMapper">
 
     <resultMap type="MemberHelp" id="MemberHelpResult">
-        <result property="memberHelpId"    column="member_help_id"    />
-        <result property="memberId"    column="member_id"    />
-        <result property="memberName"    column="member_name"    />
-        <result property="nickName"    column="nick_name"    />
-        <result property="memberPhone"    column="member_phone"    />
-        <result property="phone"    column="phone"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="lat"    column="lat"    />
-        <result property="lng"    column="lng"    />
+        <result property="memberHelpId" column="member_help_id"/>
+        <result property="memberId" column="member_id"/>
+        <result property="memberName" column="member_name"/>
+        <result property="nickName" column="nick_name"/>
+        <result property="memberPhone" column="member_phone"/>
+        <result property="phone" column="phone"/>
+        <result property="createTime" column="create_time"/>
+        <result property="lat" column="lat"/>
+        <result property="lng" column="lng"/>
     </resultMap>
 
     <sql id="selectMemberHelpVo">
         select member_help_id, member_id, phone,member_phone,create_time, lat, lng,
-         (select name from t_member where t_member.member_id = t_member_help.member_id) member_name,
          (select nick_name from t_member where t_member.member_id = t_member_help.member_id) nick_name
          from t_member_help
     </sql>
 
     <select id="selectMemberHelpList" parameterType="MemberHelp" resultMap="MemberHelpResult">
-        <include refid="selectMemberHelpVo"/>
+        SELECT h.member_help_id,h.create_time,h.member_phone,h.lat,h.lng,m.nick_name
+        FROM t_member_help h
+        LEFT JOIN t_member m ON m.member_id=h.member_id
         <where>
+            <if test="memberPhone != null">and h.member_phone = #{memberPhone}</if>
         </where>
     </select>
 
@@ -43,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="lat != null">lat,</if>
             <if test="lng != null">lng,</if>
             <if test="memberPhone != null">member_phone,</if>
-         </trim>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="memberId != null">#{memberId},</if>
             <if test="phone != null">#{phone},</if>
@@ -51,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="lat != null">#{lat},</if>
             <if test="lng != null">#{lng},</if>
             <if test="memberPhone != null">#{memberPhone},</if>
-         </trim>
+        </trim>
     </insert>
 
     <update id="updateMemberHelp" parameterType="MemberHelp">

+ 4 - 0
smart-ui-app/.hbuilderx/launch.json

@@ -2,6 +2,10 @@
   // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
     "version": "0.0",
     "configurations": [{
+     	"app-plus" : 
+     	{
+     		"launchtype" : "local"
+     	},
      	"default" : 
      	{
      		"launchtype" : "local"

+ 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_a2h5ml95zz.ttf') format('truetype'); //在线
+	src: url('https://at.alicdn.com/t/font_2816842_bkqrrarbwmr.ttf?t=1637732404174') format('truetype'); //在线
 	// src: url('~@/static/font/iconfont.ttf') format('truetype'); //本地
 }
 .icon {

+ 19 - 0
smart-ui-app/common/common.scss

@@ -482,3 +482,22 @@
 		margin-top: 20px;
 	}
 }
+.sos {
+	position: fixed;
+	top: 53%;
+	right: 0px;
+	width: 47px;
+	background: red;
+	z-index: 111;
+	padding: 10px 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;
+	}
+}

+ 55 - 7
smart-ui-app/common/http.js

@@ -32,6 +32,7 @@ const urls = {
 	orderDelete: ip + '/api/index/orderDelete', //商家订单删除
 	roomDel: ip + '/api/index/roomDel', //商家删除酒店房间
 	uploadImg: ip + '/api/index/uploadImg', //图片上传请求
+	weather: 'https://www.tianqiapi.com/free/day?appid=46884165&appsecret=b7oFR7GK&unescape=1&city=谢通门&vue=1'
 }
 /**
  * 封装的http请求
@@ -67,18 +68,14 @@ const request = (opt) => {
 			setTimeout(() => {
 				uni.hideLoading();
 			}, 500)
-			if (res.data.code == 200) {
-				opt.success(res);
-				return;
-			}
-			if (res.data.code == 500) {
+			if (res.data.code === 500) {
 				uni.showModal({
 					content: res.data.msg,
 					showCancel: false
 				});
 				return;
 			}
-			if (res.data.code == 401) {
+			if (res.data.code === 401) {
 				uni.removeStorageSync('user');
 				uni.showModal({
 					title: '提示',
@@ -93,6 +90,7 @@ const request = (opt) => {
 				});
 				return;
 			}
+			opt.success(res);
 		},
 		fail: e => {
 			uni.hideLoading();
@@ -117,8 +115,58 @@ const request = (opt) => {
 const getUser = () => {
 	return uni.getStorageSync('user');
 }
+//拨打救援电话
+const call = (aboutUs) => {
+	if (!getUser().memberId) {
+		uni.showModal({ content: '登陆才能使用该功能', showCancel: false });
+		return;
+	}
+	//获取拨打人位置
+	uni.authorize({
+		scope: 'scope.userLocation',
+		success: s => {
+			uni.getLocation({
+				type: 'wgs84',
+				success: res => {
+					console.log("asd:"+JSON.stringify(res));
+					uni.showModal({
+						title: '提示',
+						content: '是否拨打' + aboutUs.helpPhone + '求援电话?',
+						success: c => {
+							if (c.confirm) {
+								//上传拨打救援记录
+								request({
+									method: 'POST',
+									url: urls.pushHelp,
+									data: {
+										memberId: getUser().memberId,
+										lat: res.latitude,
+										lng: res.longitude,
+										phone: aboutUs.helpPhone,
+										memberPhone: getUser().mobile
+									},
+									success: r => {
+										uni.makePhoneCall({
+											phoneNumber: aboutUs
+												.helpPhone
+										});
+									}
+								});
+							}
+						}
+					});
+				}
+			});
+		},
+		fail(res) {
+			//1.2 拒绝授权
+			console.log(JSON.stringify(res));
+		}
+	});
+}
 module.exports = {
 	urls,
 	request,
-	getUser
+	getUser,
+	call,
 };

+ 37 - 3
smart-ui-app/manifest.json

@@ -1,7 +1,7 @@
 {
-    "name" : "智慧旅游",
+    "name" : "谢通门智慧旅游",
     "appid" : "__UNI__8B92F0F",
-    "description" : "",
+    "description" : "谢通门智慧旅游",
     "versionName" : "1.0.0",
     "versionCode" : "100",
     "transformPx" : false,
@@ -43,7 +43,41 @@
             /* ios打包配置 */
             "ios" : {},
             /* SDK配置 */
-            "sdkConfigs" : {}
+            "sdkConfigs" : {
+                "ad" : {}
+            },
+            "icons" : {
+                "android" : {
+                    "hdpi" : "unpackage/res/icons/72x72.png",
+                    "xhdpi" : "unpackage/res/icons/96x96.png",
+                    "xxhdpi" : "unpackage/res/icons/144x144.png",
+                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
+                },
+                "ios" : {
+                    "appstore" : "unpackage/res/icons/1024x1024.png",
+                    "ipad" : {
+                        "app" : "unpackage/res/icons/76x76.png",
+                        "app@2x" : "unpackage/res/icons/152x152.png",
+                        "notification" : "unpackage/res/icons/20x20.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "proapp@2x" : "unpackage/res/icons/167x167.png",
+                        "settings" : "unpackage/res/icons/29x29.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "spotlight" : "unpackage/res/icons/40x40.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png"
+                    },
+                    "iphone" : {
+                        "app@2x" : "unpackage/res/icons/120x120.png",
+                        "app@3x" : "unpackage/res/icons/180x180.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "notification@3x" : "unpackage/res/icons/60x60.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "settings@3x" : "unpackage/res/icons/87x87.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png",
+                        "spotlight@3x" : "unpackage/res/icons/120x120.png"
+                    }
+                }
+            }
         }
     },
     /* 快应用特有相关 */

+ 9 - 9
smart-ui-app/pages.json

@@ -11,7 +11,14 @@
 				"backgroundTextStyle": "dark",
 				"navigationStyle": "custom"
 			}
-
+		
+		},
+		{
+			"path": "pages/user/my",
+			"style": {
+				"navigationBarTitleText": "我的",
+				"navigationStyle": "custom"
+			}
 		},
 		{
 			"path": "pages/shop/list",
@@ -63,13 +70,6 @@
 			}
 		},
 		{
-			"path": "pages/user/my",
-			"style": {
-				"navigationBarTitleText": "我的",
-				"navigationStyle": "custom"
-			}
-		},
-		{
 			"path": "pages/travel/route",
 			"style": {
 				"navigationBarTitleText": "路线",
@@ -127,7 +127,7 @@
 		{
 			"path": "pages/user/info",
 			"style": {
-				"navigationBarTitleText": "个人资料"
+				"navigationBarTitleText": "账户设置"
 			}
 		},
 		{

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

@@ -1,6 +1,6 @@
 <template>
 	<view class="page">
-		<view class="qj" @click="call()">
+		<view class="sos" @click="call()">
 			<view class="icon">&#xe6d1;</view>
 			SOS
 		</view>
@@ -268,23 +268,4 @@ export default {
 	filter: grayscale(30%);
 	filter: black;
 }
-.qj {
-	position: fixed;
-	top: 53%;
-	right: 0px;
-	width: 50px;
-	background: red;
-	z-index: 111;
-	padding: 10px 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.8;
-	.icon {
-		font-size: 25px;
-		padding-bottom: 3px;
-	}
-}
 </style>

+ 24 - 20
smart-ui-app/pages/index/index2.vue

@@ -1,10 +1,14 @@
 <template>
 	<view class="page">
+		<view class="sos" @click="call()">
+			<view class="icon">&#xe6d1;</view>
+			SOS
+		</view>
 		<view class="wd">
-			<view class="qw">28°</view>
+			<view class="qw">{{ weather.tem }}°</view>
 			<view class="xs">
-				<view>中雨 东风2级</view>
-				<view>空气优23</view>
+				<view>{{ weather.wea }} {{ weather.win }} {{ weather.win_speed }}</view>
+				<view>风速 {{ weather.win_meter }}</view>
 			</view>
 		</view>
 		<view class="ms">
@@ -31,13 +35,6 @@
 				<view class="title">党政服务</view>
 			</view>
 		</view>
-		<!-- 		<view class="flex" style="margin-top: 10px;">
-			<view class="f a1"><image @click="tab('/pages/travel/index')" src="../../static/img11.jpg" style="height: 170px;width: 93%;"></image></view>
-			<view class="f a1">
-				<image @click="tab('/pages/shop/hotel/index')" src="../../static/aa2.jpg" style="height: 80px;width: 100%;"></image>
-				<image @click="navigate('/pages/travel/introduction')" src="../../static/aa3.jpg" style="height: 80px;width: 100%;margin-top: 5px;position: relative;"></image>
-			</view>
-		</view> -->
 		<view class="it">
 			<view class="v_title">
 				<image src="../../static/lo.png" class="lo" mode="widthFix"></image>
@@ -85,7 +82,8 @@ export default {
 			scrollTop: 0,
 			hot_list: [],
 			zn_list: [],
-			aboutUs: {}
+			aboutUs: {},
+			weather: { tem: '0', wea: '晴', win: '北风', win_speed: '0级', win_meter: '0km/h' }
 		};
 	},
 	onPageScroll(e) {
@@ -93,7 +91,16 @@ export default {
 	},
 	onLoad(e) {
 		this.getData();
-		//uni.setStorageSync("user",{"searchValue":null,"createBy":null,"createTime":null,"updateBy":null,"updateTime":null,"remark":null,"params":{},"memberId":2,"name":"wx_5259072147","mobile":"13097850972","email":null,"registerTime":"2021-09-30","lastLoginTime":"2021-11-04","lastLoginIp":"127.0.0.1","loginNum":2,"unionid":null,"openid":"oHYRz5QirxH4-tmZWP0D84HDCv1Q","nickName":"西域男孩","avatarUrl":"https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTJCNYUsTpmibmbGAJa6icVT1RZ5uNmusrtibIBgFu112ibe4f0jEvicZlWf0DkeS3l0YlnYkq178W2h8fw/132","gender":"1","province":"广西","city":"玉林","country":"中国","language":"zh_CN","lastLat":null,"lastLng":null,"isShop":2,"apiToken":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyIiwiaWF0IjoxNjM2NjE4Mjc2LCJleHAiOjE2MzcyMjMwNzZ9.c4reK2ce_SfKOaWuaK8CdWv2kLQl4xl92-HLfWuvLySaRNp1oBrW51KToxggbvOcFgRS0bBpl7UCSOMKIkff5A"})
+		//天气接口
+		uni.request({
+			url: this.$http.urls.weather,
+			success: res => {
+				if (!res.data.errcode) {
+					this.weather = res.data;
+				}
+			}
+		});
+		//uni.setStorageSync("user",{"searchValue":null,"createBy":null,"createTime":null,"updateBy":null,"updateTime":null,"remark":null,"params":{},"memberId":27,"name":"wx_1011223213","mobile":"","email":null,"registerTime":"2021-11-23 21:39:27","lastLoginTime":"2021-11-23 21:53:20","lastLoginIp":"127.0.0.1","loginNum":2,"unionid":null,"openid":"ok3qt5FMehpGy6aOtqPd9pnPLC_Q","nickName":"西域男孩","avatarUrl":"https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTLeSLQBtiavUU0ByFbXtND7iaricbNU81HSdaV9bQLTfciaMV604u5TNIdjLiaarL7MIZQXIrWFZfNiaZIQ/132","gender":"0","province":"","city":"","country":"","language":"zh_CN","lastLat":null,"lastLng":null,"isShop":0,"apiToken":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNyIsImlhdCI6MTYzNzY3NTYwMCwiZXhwIjoxNjM4MjgwNDAwfQ.vRPuNnLrUH1T8_qOL6Ti4TT2Akw29Set18kiavbjJynol52cxHXqeRoStyF4afdcsiipELdVW9G8-zh52voOFg"})
 	},
 	methods: {
 		getData() {
@@ -108,7 +115,6 @@ export default {
 			});
 		},
 		tab(url) {
-			console.log('zxx');
 			uni.switchTab({
 				url: url
 			});
@@ -119,6 +125,10 @@ export default {
 		},
 		navigate(url) {
 			uni.navigateTo({ url: url });
+		},
+		//拨打求助电话
+		call() {
+			this.$http.call(this.aboutUs);
 		}
 	},
 	//下拉刷新
@@ -147,8 +157,8 @@ export default {
 	.xs {
 		margin-left: 45px;
 		width: 100%;
-		margin-top: 6px;
 		font-size: 13px;
+		line-height: 20px;
 	}
 }
 .ms {
@@ -171,12 +181,6 @@ export default {
 		box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
 	}
 }
-.a1 {
-	padding: 5px 0px 5px 0px;
-	image {
-		border-radius: 5px;
-	}
-}
 .it {
 	margin-top: 15px;
 }

+ 1 - 6
smart-ui-app/pages/other/feedback.vue

@@ -69,11 +69,7 @@ export default {
 					this.item.pic.push(item.url); //原来的地址
 				}
 			});
-			let rule = [
-				{ name: 'title', checkType: 'notnull', errorMsg: '请输入标题名称' },
-				{ name: 'content', checkType: 'notnull', errorMsg: '请输入投诉内容' },
-				{ name: 'pic', checkType: 'notnull', errorMsg: '请上传营业执照' }
-			];
+			let rule = [{ name: 'title', checkType: 'notnull', errorMsg: '请输入标题名称' }, { name: 'content', checkType: 'notnull', errorMsg: '请输入投诉内容' }];
 			if (!this.$verify.check(this.item, rule)) {
 				uni.showModal({ content: this.$verify.error, showCancel: false });
 				return;
@@ -86,7 +82,6 @@ export default {
 				success: res => {
 					uni.showToast({ title: '提交成功' });
 					setTimeout(() => {
-						uni.$emit('shop');
 						uni.navigateBack();
 					}, 700);
 				}

+ 6 - 14
smart-ui-app/pages/user/info.vue

@@ -9,11 +9,12 @@
 				<view class="lable">微信昵称</view>
 				<view class="gg"><text v-text="item.nickName"></text></view>
 			</view>
-			<view class="form_group hr">
+			<view class="form_group">
 				<view class="lable">注册时间</view>
 				<view class="gg"><text v-text="item.registerTime"></text></view>
 			</view>
 		</view>
+		<button class="btn" @click="exit()">退出登录</button>
 	</view>
 </template>
 
@@ -26,21 +27,12 @@ export default {
 	},
 	onLoad() {
 		this.item = this.$getUser();
-		if (this.item.sex === 0) {
-			this.item.sex = '未知';
-		}
-		if (this.item.sex === 1) {
-			this.item.sex = '男';
-		}
-		if (this.item.sex === 2) {
-			this.item.sex = '女';
-		}
 	},
 	methods: {
 		exit() {
 			uni.showModal({
 				title: '提示',
-				content: '确定注销登录?',
+				content: '确定退出登录?',
 				success: res => {
 					if (res.confirm) {
 						uni.removeStorageSync('user');
@@ -54,11 +46,11 @@ export default {
 </script>
 
 <style>
-page {
-	background-color: $page;
-}
 .item {
 	background-color: white;
+	padding: 10px;
+	border-radius: 5px;
+	box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
 }
 .l {
 	line-height: 56px;

+ 13 - 7
smart-ui-app/pages/user/login.vue

@@ -1,13 +1,13 @@
 <template>
 	<view class="bg">
 		<view class="p"><image src="../../static/profile.jpg" class="pic" mode="widthFix"></image></view>
-		<view class="title">智慧旅游小程序正在使用智慧旅游平台登陆提供的服务,平台登陆将使用:</view>
+		<view class="title">谢通门智慧旅游登录使用:</view>
 		<view class="info">
-			<text v-if="first">您的公开信息(昵称,头像,性别等)</text>
+			<text v-if="first">您的公开信息(昵称,头像等)</text>
 			<text v-else>您的手机号</text>
 		</view>
-		<button class="btn" @click="getUserProfile()" v-if="first">允许使用</button>
-		<button class="btn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" style="background-color: #2196F3" v-else>绑定手机号</button>
+		<button class="btn" @click="getUserProfile()" v-if="first" :disabled="disabled">获取信息</button>
+		<button class="btn" open-type="getPhoneNumber" :disabled="disabled" @getphonenumber="getPhoneNumber" style="background-color: #2196F3" v-else>获取手机号</button>
 		<button class="btn" style="background-color: #9E9E9E;" @click="cancel()">取消</button>
 	</view>
 </template>
@@ -15,11 +15,13 @@
 export default {
 	data() {
 		return {
-			first: true //是否第一次使用,第一次使用需要绑定手机号
+			first: true, //是否第一次使用,第一次使用需要绑定手机号
+			disabled: false //防止重复点击
 		};
 	},
 	methods: {
 		getUserProfile() {
+			this.disabled = true;
 			let code = '';
 			uni.login({
 				provider: 'weixin',
@@ -38,6 +40,7 @@ export default {
 						data: info,
 						method: 'POST',
 						success: res => {
+							this.disabled = false;
 							res.data.data.memberInfo.apiToken = res.data.data.apiToken;
 							uni.setStorageSync('user', res.data.data.memberInfo);
 							//未绑定手机号
@@ -50,7 +53,7 @@ export default {
 					});
 				},
 				fail: res => {
-					this.click = true;
+					this.disabled = false;
 				}
 			});
 		},
@@ -60,6 +63,7 @@ export default {
 			uni.login({
 				provider: 'weixin',
 				success: res => {
+					this.disabled = false;
 					item.code = res.code;
 					item.encryptedData = e.target.encryptedData;
 					item.iv = e.target.iv;
@@ -94,7 +98,7 @@ page {
 			width: 100px;
 			height: 100px;
 			border-radius: 50%;
-			border:1px solid #9E9E9E;
+			border: 1px solid #9e9e9e;
 		}
 	}
 	.title {
@@ -110,6 +114,8 @@ page {
 	}
 	.btn {
 		margin-top: 20px;
+		width: 75%;
+		border-radius: 20px;
 	}
 }
 </style>

+ 21 - 51
smart-ui-app/pages/user/my.vue

@@ -5,7 +5,10 @@
 				<view class="qw"><image :src="user == '' ? '../../static/ls.jpg' : user.avatarUrl" class="head"></image></view>
 				<view class="xs" @click="navigate('/pages/user/info')">
 					<view v-if="user == ''">登录 / 注册</view>
-					<view class="nickName" v-else>{{ user.nickName }}</view>
+					<view class="nickName" v-else>
+						<text>{{ user.nickName }}</text>
+						<view class="icon">&#xe8b7;</view>
+					</view>
 					<view class="nh">{{ user == '' ? '你还未登陆' : ' 你好,欢迎来到智慧旅游' }}</view>
 				</view>
 			</view>
@@ -25,11 +28,6 @@
 				</view>
 			</view>
 			<view class="list" style="margin-top: 13px;">
-				<view class="item hr" @click="navigate('/pages/user/info')">
-					<text class="icon ic" style="background-color:#606266">&#xe626;</text>
-					<text>我的信息</text>
-					<text class="icon arrow">&#xe62d;</text>
-				</view>
 				<view class="item hr" @click="call()">
 					<text class="icon ic" style="background-color:#366092">&#xe634;</text>
 					<text>求助电话</text>
@@ -82,51 +80,18 @@ export default {
 		},
 		//拨打求助电话
 		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.aboutUs.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: this.aboutUs.helpPhone,
-												memberPhone: this.$getUser().mobile
-											},
-											success: r => {
-												uni.makePhoneCall({
-													phoneNumber: this.aboutUs.helpPhone
-												});
-											}
-										});
-									}
-								}
-							});
-						}
-					});
-				},
-				fail(res) {
-					//1.2 拒绝授权
-					console.log(JSON.stringify(res));
-				}
-			});
+			this.$http.call(this.aboutUs);
 		}
+	},
+	onShareAppMessage: function(res) {
+		return {
+			title: '谢通门智慧旅游',
+			path: '/pages/index/index2',
+			imageUrl: '../../static/fx.jpg',
+
+			success: res => {},
+			fail: res => {}
+		};
 	}
 };
 </script>
@@ -138,7 +103,7 @@ export default {
 	color: white;
 	.wd {
 		position: absolute;
-		top: 70px;
+		top: 80px;
 		left: 20px;
 		z-index: 11;
 		.head {
@@ -159,6 +124,11 @@ export default {
 				font-weight: normal;
 				margin-top: 5px;
 			}
+			.icon {
+				float: right;
+				font-size: 25px;
+				margin-right: -17px;
+			}
 		}
 	}
 	image {

binární
smart-ui-app/static/fx.jpg


binární
smart-ui/src/assets/images/app.jpg


+ 13 - 0
smart-ui/src/assets/styles/ruoyi.scss

@@ -274,3 +274,16 @@
   background-color: #f8f8f8;
   padding-top: 20px;
 }
+.abc {
+  margin-left: 10px;
+  background-color: #f8f8f8;
+  border-radius: 5px;
+  padding: 2px 10px 2px 10px;
+}
+.lpic {
+  float: left;
+  width: 100px;
+  height: 100px;
+  margin-left: 10px;
+  border-radius: 5px;
+}

+ 2 - 2
smart-ui/src/views/management/aboutUs/index.vue

@@ -2,8 +2,8 @@
   <div class="app-container">
     <el-form ref="form" :model="form" :rules="rules" label-width="100px">
       <el-form-item label="标题" prop="title"><el-input v-model="form.title" placeholder="请输入标题" /></el-form-item>
-      <el-form-item label="求助电话" prop="helpPhone"><el-input v-model="form.helpPhone" placeholder="请输入求助电话" /></el-form-item>
-      <el-form-item label="首页封面"><imageUpload v-model="form.bgImg1" :limit="1" /></el-form-item>
+      <el-form-item label="求助电话" prop="helpPhone"><el-input v-model="form.helpPhone" placeholder="请输入求助电话"/></el-form-item>
+      <el-form-item label="首页banner"><imageUpload v-model="form.bgImg1" :limit="1" /></el-form-item>
       <!-- <el-form-item label="首页banner"><imageUpload v-model="form.showPictures" :limit="2"/></el-form-item> -->
 <!--      <el-form-item label="背景图片1"><imageUpload v-model="form.bgImg1" :limit="1" /></el-form-item>
       <el-form-item label="背景图片2"><imageUpload v-model="form.bgImg2" :limit="1"/></el-form-item>

+ 34 - 81
smart-ui/src/views/management/feedback/index.vue

@@ -1,18 +1,13 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="投诉标题" prop="title">
-        <el-input v-model="queryParams.title" placeholder="请输入投诉标题" clearable size="small" @keyup.enter.native="handleQuery" />
-      </el-form-item>
-      <el-form-item label="手机号" prop="phone">
-        <el-input v-model="queryParams.phone" placeholder="请输入手机号" clearable size="small" @keyup.enter.native="handleQuery" />
-      </el-form-item>
+      <el-form-item label="投诉标题" prop="title"><el-input v-model="queryParams.title" placeholder="请输入投诉标题" clearable @keyup.enter.native="handleQuery" /></el-form-item>
+      <el-form-item label="手机号" prop="phone"><el-input v-model="queryParams.phone" placeholder="请输入手机号" clearable @keyup.enter.native="handleQuery" /></el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
-
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5"><el-button type="primary" icon="el-icon-edit" :disabled="single" @click="handleUpdate" v-hasPermi="['management:feedback:edit']">查看</el-button></el-col>
       <el-col :span="1.5">
@@ -21,35 +16,38 @@
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="feedbackList" @selection-change="handleSelectionChange">
+    <el-table v-loading="loading" border :data="feedbackList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="id" align="center" prop="id" />
       <el-table-column label="投诉标题" align="center" prop="title" />
-      <el-table-column label="投诉内容" align="center" prop="content" />
-      <el-table-column label="投诉照片" align="center" prop="pic" />
-      <el-table-column label="手机号" align="center" prop="phone" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="投诉时间" align="center" prop="createTime" width="250" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
         <template slot-scope="scope">
           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['management:feedback:edit']">查看</el-button>
           <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['management:feedback:remove']">删除</el-button>
         </template>
       </el-table-column>
     </el-table>
-
     <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
 
-    <!-- 添加或修改建议反馈对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <!-- 查看内容对话框 -->
+    <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="50%" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="投诉标题" prop="title"><el-input v-model="form.title" placeholder="请输入投诉标题" /></el-form-item>
-        <el-form-item label="投诉内容"><editor v-model="form.content" :min-height="192" /></el-form-item>
-        <el-form-item label="投诉照片" prop="pic"><el-input v-model="form.pic" type="textarea" placeholder="请输入内容" /></el-form-item>
-        <el-form-item label="手机号" prop="phone"><el-input v-model="form.phone" placeholder="请输入手机号" /></el-form-item>
+        <el-form-item label="标题" prop="title">
+          <div class="abc">{{ form.title }}</div>
+        </el-form-item>
+        <el-form-item label="内容">
+          <div class="abc">{{ form.content }}</div>
+        </el-form-item>
+        <el-form-item label="照片" v-if="form.pic">
+          <el-image class="lpic" :fit="'contain'" :src="baseUrl + item" :preview-src-list="[baseUrl + item]" v-for="(item, index) in form.pic" :key="index"></el-image>
+        </el-form-item>
+        <el-form-item label="手机号" prop="phone" v-if="form.phone">
+          <div class="abc">{{ form.phone }}</div>
+        </el-form-item>
+        <el-form-item label="时间" prop="createTime">
+          <div class="abc">{{ form.createTime }}</div>
+        </el-form-item>
       </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
     </el-dialog>
   </div>
 </template>
@@ -61,6 +59,7 @@ export default {
   name: 'Feedback',
   data() {
     return {
+      baseUrl: process.env.VUE_APP_BASE_API,
       // 遮罩层
       loading: true,
       // 导出遮罩层
@@ -86,16 +85,14 @@ export default {
         pageNum: 1,
         pageSize: 10,
         title: null,
-        content: null,
-        pic: null,
-        phone: null
+        phone: null,
+        orderByColumn: 'createTime', //排序字段
+        isAsc: 'desc' //排序方式
       },
       // 表单参数
       form: {},
       // 表单校验
-      rules: {
-        createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }]
-      }
+      rules: {}
     };
   },
   created() {
@@ -121,10 +118,7 @@ export default {
       this.form = {
         id: null,
         title: null,
-        content: null,
-        pic: null,
         phone: null,
-        createTime: null
       };
       this.resetForm('form');
     },
@@ -144,40 +138,17 @@ export default {
       this.single = selection.length !== 1;
       this.multiple = !selection.length;
     },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = '添加建议反馈';
-    },
-    /** 修改按钮操作 */
+    /** 查看内容 */
     handleUpdate(row) {
       this.reset();
       const id = row.id || this.ids;
       getFeedback(id).then(response => {
         this.form = response.data;
-        this.open = true;
-        this.title = '修改建议反馈';
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs['form'].validate(valid => {
-        if (valid) {
-          if (this.form.id != null) {
-            updateFeedback(this.form).then(response => {
-              this.msgSuccess('修改成功');
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addFeedback(this.form).then(response => {
-              this.msgSuccess('新增成功');
-              this.open = false;
-              this.getList();
-            });
-          }
+        if (this.form.pic) {
+          this.form.pic = this.form.pic.split(',');
         }
+        this.open = true;
+        this.title = '查看内容';
       });
     },
     /** 删除按钮操作 */
@@ -196,24 +167,6 @@ export default {
           this.msgSuccess('删除成功');
         })
         .catch(() => {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有建议反馈数据项?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportFeedback(queryParams);
-        })
-        .then(response => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
     }
   }
 };

+ 49 - 63
smart-ui/src/views/management/help/index.vue

@@ -1,14 +1,14 @@
 <template>
   <div class="app-container">
-    <!-- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="求助电话" prop="memberPhone"><el-input v-model="queryParams.memberPhone" placeholder="请输入求助电话" clearable @keyup.enter.native="handleQuery" /></el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
-    </el-form> -->
-
+    </el-form>
     <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5"><el-button type="success" icon="el-icon-edit" :disabled="single" @click="handleUpdate" v-hasPermi="['management:help:edit']">修改</el-button></el-col>
+      <el-col :span="1.5"><el-button type="success" icon="el-icon-edit" :disabled="single" @click="handleUpdate" v-hasPermi="['management:help:edit']">查看</el-button></el-col>
       <el-col :span="1.5">
         <el-button type="danger" icon="el-icon-delete" :disabled="multiple" @click="handleDelete" v-hasPermi="['management:help:remove']">删除</el-button>
       </el-col>
@@ -17,14 +17,12 @@
 
     <el-table v-loading="loading" border :data="helpList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="会员名称" align="center" prop="memberName" />
-      <el-table-column label="会员昵称" align="center" prop="nickName" />
-      <el-table-column label="求助电话" align="center" prop="phone" />
-      <el-table-column label="会员电话" align="center" prop="memberPhone" />
+      <el-table-column label="微信昵称" align="center" prop="nickName" />
+      <el-table-column label="求助电话" align="center" prop="memberPhone" />
       <el-table-column label="求助时间" align="center" prop="createTime" width="180"></el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['management:help:edit']">修改</el-button>
+          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['management:help:edit']">查看</el-button>
           <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['management:help:remove']">删除</el-button>
         </template>
       </el-table-column>
@@ -33,17 +31,19 @@
     <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
 
     <!-- 添加或修改求助记录对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="60%" append-to-body @close="close">
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="会员id" prop="memberId"><el-input v-model="form.memberId" placeholder="请输入会员id" /></el-form-item>
-        <el-form-item label="求助电话" prop="phone"><el-input v-model="form.phone" placeholder="请输入求助电话" /></el-form-item>
-        <el-form-item label="坐标lat" prop="lat"><el-input v-model="form.lat" placeholder="请输入坐标lat" /></el-form-item>
-        <el-form-item label="坐标lng" prop="lng"><el-input v-model="form.lng" placeholder="请输入坐标lng" /></el-form-item>
+        <el-form-item label="微信昵称">
+          <div class="abc">{{ form.nickName }} </div>
+        </el-form-item>
+        <el-form-item label="求助电话">
+          <div class="abc">{{ form.memberPhone }}</div>
+        </el-form-item>
+        <el-form-item label="求助时间">
+          <div class="abc">{{ form.createTime }}</div>
+        </el-form-item>
+        <el-form-item label="位置信息"><div ref="containerRef" style="height: 300px;margin-left: 10px;margin-top: 10px;"></div></el-form-item>
       </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
     </el-dialog>
   </div>
 </template>
@@ -75,10 +75,13 @@ export default {
       title: '',
       // 是否显示弹出层
       open: false,
+      tmap: undefined,
+      map: undefined,
       // 查询参数
       queryParams: {
         pageNum: 1,
         pageSize: 10,
+        memberPhone:null,
         orderByColumn: 'createTime', //排序字段
         isAsc: 'desc' //排序方式
       },
@@ -136,11 +139,21 @@ export default {
       this.single = selection.length !== 1;
       this.multiple = !selection.length;
     },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = '添加求助记录';
+    /**初始化地图 */
+    initMap() {
+      this.TMap().then(_tmap => {
+        this.tmap = _tmap;
+        // 初始化地图
+        let center = new _tmap.LatLng(this.form.lat, this.form.lng); // 设置地图中心点坐标
+        this.map = new _tmap.Map(this.$refs.containerRef, {
+          zoom: 15, // 设置地图缩放级别
+          center: center
+        });
+        let marker = new _tmap.MultiMarker({
+          map: this.map,
+          geometries: [{ position: new _tmap.LatLng(this.form.lat, this.form.lng, 134) }]
+        });
+      });
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
@@ -149,27 +162,10 @@ export default {
       getHelp(memberHelpId).then(response => {
         this.form = response.data;
         this.open = true;
-        this.title = '修改求助记录';
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs['form'].validate(valid => {
-        if (valid) {
-          if (this.form.memberHelpId != null) {
-            updateHelp(this.form).then(response => {
-              this.msgSuccess('修改成功');
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addHelp(this.form).then(response => {
-              this.msgSuccess('新增成功');
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
+        this.title = '查看求助人信息';
+        this.$nextTick(() => {
+          this.initMap();
+        }, 500);
       });
     },
     /** 删除按钮操作 */
@@ -189,23 +185,13 @@ export default {
         })
         .catch(() => {});
     },
-    /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有求助记录数据项?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportHelp(queryParams);
-        })
-        .then(response => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    // 关闭弹窗表单重置
+    close() {
+      if (this.map) {
+        console.log('zzzzzz');
+        this.map.destroy();
+        this.map = null;
+      }
     }
   }
 };