Ver Fonte

新增投诉建议

xiaoshushu há 3 anos atrás
pai
commit
fa29aab5ca

+ 9 - 1
smart-admin/src/main/java/com/huijy/web/controller/api/ApiIndexController.java

@@ -72,7 +72,8 @@ public class ApiIndexController extends ApiAbstractController {
     @Autowired
     private IShopRoomOrderService orderService;
 
-    private static WxMaProperties wxMaProperties;
+    @Autowired
+    private IFeedbackService feedbackService;
 
     //绑定手机号
     @PostMapping("/bindMobile")
@@ -397,6 +398,13 @@ public class ApiIndexController extends ApiAbstractController {
         return AjaxResult.success(orderService.insertShopRoomOrder(order));
     }
 
+    //投诉建议
+    @PostMapping("/feedback")
+    @ApiOperation("投诉建议")
+    public AjaxResult hotelBook(@RequestBody Feedback feedback) {
+        return AjaxResult.success(feedbackService.insertFeedback(feedback));
+    }
+
     @GetMapping("/order")
     @ApiOperation("酒店预订订单")
     public TableDataInfo order(@LoginMember Member member, ShopRoomOrder order) {

+ 0 - 6
smart-admin/src/main/java/com/huijy/web/controller/api/ApiLoginController.java

@@ -1,14 +1,11 @@
 package com.huijy.web.controller.api;
 
-import cn.binarywang.wx.miniapp.api.WxMaService;
 import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
 import cn.hutool.core.util.RandomUtil;
-import com.alibaba.fastjson.JSONObject;
 import com.huijy.common.annotation.LoginMember;
 import com.huijy.common.annotation.UnLogin;
 import com.huijy.common.core.domain.AjaxResult;
 import com.huijy.common.exception.ServiceException;
-import com.huijy.common.exception.base.BaseException;
 import com.huijy.common.utils.JwtUtils;
 import com.huijy.management.domain.Member;
 import com.huijy.management.service.IMemberService;
@@ -17,12 +14,9 @@ import com.huijy.management.vo.WxUserInfo;
 import com.huijy.weixin.config.WxMaConfiguration;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import lombok.val;
 import me.chanjar.weixin.common.error.WxErrorException;
 import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import springfox.documentation.annotations.ApiIgnore;

+ 97 - 0
smart-admin/src/main/java/com/huijy/web/controller/management/FeedbackController.java

@@ -0,0 +1,97 @@
+package com.huijy.web.controller.management;
+
+import java.util.List;
+
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.huijy.common.annotation.Log;
+import com.huijy.common.core.controller.BaseController;
+import com.huijy.common.core.domain.AjaxResult;
+import com.huijy.common.enums.BusinessType;
+import com.huijy.management.domain.Feedback;
+import com.huijy.management.service.IFeedbackService;
+import com.huijy.common.utils.poi.ExcelUtil;
+import com.huijy.common.core.page.TableDataInfo;
+
+/**
+ * 建议反馈Controller
+ *
+ * @author lishuwen
+ * @date 2021-11-23
+ */
+@RestController
+@RequestMapping("/management/feedback")
+public class FeedbackController extends BaseController {
+    @Autowired
+    private IFeedbackService feedbackService;
+
+    /**
+     * 查询建议反馈列表
+     */
+    @PreAuthorize("@ss.hasPermi('management:feedback:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(Feedback feedback) {
+        startPage();
+        List<Feedback> list = feedbackService.selectFeedbackList(feedback);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出建议反馈列表
+     */
+    @PreAuthorize("@ss.hasPermi('management:feedback:export')")
+    @Log(title = "建议反馈", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(Feedback feedback) {
+        List<Feedback> list = feedbackService.selectFeedbackList(feedback);
+        ExcelUtil<Feedback> util = new ExcelUtil<Feedback>(Feedback.class);
+        return util.exportExcel(list, "建议反馈数据");
+    }
+
+    /**
+     * 获取建议反馈详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('management:feedback:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return AjaxResult.success(feedbackService.selectFeedbackById(id));
+    }
+
+    /**
+     * 新增建议反馈
+     */
+    @PreAuthorize("@ss.hasPermi('management:feedback:add')")
+    @Log(title = "建议反馈", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody Feedback feedback) {
+        return toAjax(feedbackService.insertFeedback(feedback));
+    }
+
+    /**
+     * 修改建议反馈
+     */
+    @PreAuthorize("@ss.hasPermi('management:feedback:edit')")
+    @Log(title = "建议反馈", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody Feedback feedback) {
+        return toAjax(feedbackService.updateFeedback(feedback));
+    }
+
+    /**
+     * 删除建议反馈
+     */
+    @PreAuthorize("@ss.hasPermi('management:feedback:remove')")
+    @Log(title = "建议反馈", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(feedbackService.deleteFeedbackByIds(ids));
+    }
+}

+ 2 - 2
smart-admin/src/main/resources/application.yml

@@ -136,8 +136,8 @@ wx:
   # 小程序配置
   ma:
     configs:
-      - appId: wx01e139c8c2cd0fa4
-        secret: 9c268c8690582261491304beab903412
+      - appId: wx966b8f26dc595d45
+        secret: 772662b0f219071c5b32a103558b940f
         # 微信支付商户号,请去微信支付平台申请
         mchId: 1588227511
         # 微信支付商户密钥,请去微信支付平台申请

+ 97 - 0
smart-system/src/main/java/com/huijy/management/domain/Feedback.java

@@ -0,0 +1,97 @@
+package com.huijy.management.domain;
+
+import com.huijy.common.annotation.Excel;
+import com.huijy.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 建议反馈对象 tb_feedback
+ *
+ * @author lishuwen
+ * @date 2021-11-23
+ */
+public class Feedback extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private Long id;
+
+    /**
+     * 投诉标题
+     */
+    @Excel(name = "投诉标题")
+    private String title;
+
+    /**
+     * 投诉内容
+     */
+    @Excel(name = "投诉内容")
+    private String content;
+
+    /**
+     * 投诉照片
+     */
+    @Excel(name = "投诉照片")
+    private String pic;
+
+    /**
+     * 手机号
+     */
+    @Excel(name = "手机号")
+    private String phone;
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setPic(String pic) {
+        this.pic = pic;
+    }
+
+    public String getPic() {
+        return pic;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("title", getTitle())
+                .append("content", getContent())
+                .append("pic", getPic())
+                .append("phone", getPhone())
+                .append("createTime", getCreateTime())
+                .toString();
+    }
+}

+ 61 - 0
smart-system/src/main/java/com/huijy/management/mapper/FeedbackMapper.java

@@ -0,0 +1,61 @@
+package com.huijy.management.mapper;
+
+import java.util.List;
+
+import com.huijy.management.domain.Feedback;
+
+/**
+ * 建议反馈Mapper接口
+ *
+ * @author lishuwen
+ * @date 2021-11-23
+ */
+public interface FeedbackMapper {
+    /**
+     * 查询建议反馈
+     *
+     * @param id 建议反馈主键
+     * @return 建议反馈
+     */
+    public Feedback selectFeedbackById(Long id);
+
+    /**
+     * 查询建议反馈列表
+     *
+     * @param feedback 建议反馈
+     * @return 建议反馈集合
+     */
+    public List<Feedback> selectFeedbackList(Feedback feedback);
+
+    /**
+     * 新增建议反馈
+     *
+     * @param feedback 建议反馈
+     * @return 结果
+     */
+    public int insertFeedback(Feedback feedback);
+
+    /**
+     * 修改建议反馈
+     *
+     * @param feedback 建议反馈
+     * @return 结果
+     */
+    public int updateFeedback(Feedback feedback);
+
+    /**
+     * 删除建议反馈
+     *
+     * @param id 建议反馈主键
+     * @return 结果
+     */
+    public int deleteFeedbackById(Long id);
+
+    /**
+     * 批量删除建议反馈
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteFeedbackByIds(Long[] ids);
+}

+ 61 - 0
smart-system/src/main/java/com/huijy/management/service/IFeedbackService.java

@@ -0,0 +1,61 @@
+package com.huijy.management.service;
+
+import java.util.List;
+
+import com.huijy.management.domain.Feedback;
+
+/**
+ * 建议反馈Service接口
+ *
+ * @author lishuwen
+ * @date 2021-11-23
+ */
+public interface IFeedbackService {
+    /**
+     * 查询建议反馈
+     *
+     * @param id 建议反馈主键
+     * @return 建议反馈
+     */
+    public Feedback selectFeedbackById(Long id);
+
+    /**
+     * 查询建议反馈列表
+     *
+     * @param feedback 建议反馈
+     * @return 建议反馈集合
+     */
+    public List<Feedback> selectFeedbackList(Feedback feedback);
+
+    /**
+     * 新增建议反馈
+     *
+     * @param feedback 建议反馈
+     * @return 结果
+     */
+    public int insertFeedback(Feedback feedback);
+
+    /**
+     * 修改建议反馈
+     *
+     * @param feedback 建议反馈
+     * @return 结果
+     */
+    public int updateFeedback(Feedback feedback);
+
+    /**
+     * 批量删除建议反馈
+     *
+     * @param ids 需要删除的建议反馈主键集合
+     * @return 结果
+     */
+    public int deleteFeedbackByIds(Long[] ids);
+
+    /**
+     * 删除建议反馈信息
+     *
+     * @param id 建议反馈主键
+     * @return 结果
+     */
+    public int deleteFeedbackById(Long id);
+}

+ 89 - 0
smart-system/src/main/java/com/huijy/management/service/impl/FeedbackServiceImpl.java

@@ -0,0 +1,89 @@
+package com.huijy.management.service.impl;
+
+import java.util.List;
+
+import com.huijy.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.huijy.management.mapper.FeedbackMapper;
+import com.huijy.management.domain.Feedback;
+import com.huijy.management.service.IFeedbackService;
+
+/**
+ * 建议反馈Service业务层处理
+ *
+ * @author lishuwen
+ * @date 2021-11-23
+ */
+@Service
+public class FeedbackServiceImpl implements IFeedbackService {
+    @Autowired
+    private FeedbackMapper feedbackMapper;
+
+    /**
+     * 查询建议反馈
+     *
+     * @param id 建议反馈主键
+     * @return 建议反馈
+     */
+    @Override
+    public Feedback selectFeedbackById(Long id) {
+        return feedbackMapper.selectFeedbackById(id);
+    }
+
+    /**
+     * 查询建议反馈列表
+     *
+     * @param feedback 建议反馈
+     * @return 建议反馈
+     */
+    @Override
+    public List<Feedback> selectFeedbackList(Feedback feedback) {
+        return feedbackMapper.selectFeedbackList(feedback);
+    }
+
+    /**
+     * 新增建议反馈
+     *
+     * @param feedback 建议反馈
+     * @return 结果
+     */
+    @Override
+    public int insertFeedback(Feedback feedback) {
+        feedback.setCreateTime(DateUtils.getNowDate());
+        return feedbackMapper.insertFeedback(feedback);
+    }
+
+    /**
+     * 修改建议反馈
+     *
+     * @param feedback 建议反馈
+     * @return 结果
+     */
+    @Override
+    public int updateFeedback(Feedback feedback) {
+        return feedbackMapper.updateFeedback(feedback);
+    }
+
+    /**
+     * 批量删除建议反馈
+     *
+     * @param ids 需要删除的建议反馈主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFeedbackByIds(Long[] ids) {
+        return feedbackMapper.deleteFeedbackByIds(ids);
+    }
+
+    /**
+     * 删除建议反馈信息
+     *
+     * @param id 建议反馈主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFeedbackById(Long id) {
+        return feedbackMapper.deleteFeedbackById(id);
+    }
+}

+ 75 - 0
smart-system/src/main/resources/mapper/management/FeedbackMapper.xml

@@ -0,0 +1,75 @@
+<?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">
+<mapper namespace="com.huijy.management.mapper.FeedbackMapper">
+
+    <resultMap type="Feedback" id="FeedbackResult">
+        <result property="id" column="id"/>
+        <result property="title" column="title"/>
+        <result property="content" column="content"/>
+        <result property="pic" column="pic"/>
+        <result property="phone" column="phone"/>
+        <result property="createTime" column="create_time"/>
+    </resultMap>
+
+    <sql id="selectFeedbackVo">
+        select id, title, content, pic, phone, create_time from tb_feedback
+    </sql>
+
+    <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="phone != null  and phone != ''">and phone = #{phone}</if>
+        </where>
+    </select>
+
+    <select id="selectFeedbackById" parameterType="Long" resultMap="FeedbackResult">
+        <include refid="selectFeedbackVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertFeedback" parameterType="Feedback" useGeneratedKeys="true" keyProperty="id">
+        insert into tb_feedback
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="title != null">title,</if>
+            <if test="content != null">content,</if>
+            <if test="pic != null">pic,</if>
+            <if test="phone != null">phone,</if>
+            <if test="createTime != null">create_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="title != null">#{title},</if>
+            <if test="content != null">#{content},</if>
+            <if test="pic != null">#{pic},</if>
+            <if test="phone != null">#{phone},</if>
+            <if test="createTime != null">#{createTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateFeedback" parameterType="Feedback">
+        update tb_feedback
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="title != null">title = #{title},</if>
+            <if test="content != null">content = #{content},</if>
+            <if test="pic != null">pic = #{pic},</if>
+            <if test="phone != null">phone = #{phone},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteFeedbackById" parameterType="Long">
+        delete from tb_feedback where id = #{id}
+    </delete>
+
+    <delete id="deleteFeedbackByIds" parameterType="String">
+        delete from tb_feedback where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

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

@@ -8,6 +8,7 @@ const ip = 'https://xdmly.qiyiiot.com/prod-api';
 const urls = {
 	ip: ip,
 	home: ip + '/api/index/home', //首页数据
+	feedback: ip + '/api/index/feedback', //投诉建议
 	wxLogin: ip + '/api/login/wxLogin/', //游客微信小程序登录
 	bindWxMobile: ip + '/api/index/bindWxMobile', //绑定会员微信手机号
 	getPageContent: ip + '/api/index/getPageContent', //分页获取主要内容信息

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

@@ -1,88 +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,
-		"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": ""
-				}
-			}
-		}
-	}
+    "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" : "wx966b8f26dc595d45",
+        "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" : ""
+                }
+            }
+        }
+    }
 }

+ 12 - 3
smart-ui-app/pages.json

@@ -7,7 +7,8 @@
 			"path": "pages/index/index2",
 			"style": {
 				"navigationBarTitleText": "",
-				"enablePullDownRefresh": false,
+				"enablePullDownRefresh": true,
+				"backgroundTextStyle": "dark",
 				"navigationStyle": "custom"
 			}
 
@@ -39,6 +40,14 @@
 
 		},
 		{
+			"path": "pages/other/feedback",
+			"style": {
+				"navigationBarTitleText": "投诉建议",
+				"enablePullDownRefresh": false
+			}
+
+		},
+		{
 			"path": "pages/shop/apply",
 			"style": {
 				"navigationBarTitleText": "店铺开通申请",
@@ -215,7 +224,7 @@
 		"navigationBarTitleText": "",
 		"navigationBarBackgroundColor": "#c74547",
 		"backgroundColor": "#F8F8F8",
-		"pageOrientation":"portrait"
-		
+		"pageOrientation": "portrait"
+
 	}
 }

+ 11 - 4
smart-ui-app/pages/index/index2.vue

@@ -12,7 +12,7 @@
 			<text>谢通门县欢迎您</text>
 			<navigator url="/pages/index/index" class="jb">旧版首页</navigator>
 		</view>
-		<view class="top"><image :src="aboutUs.bgImg1 ? ip + aboutUs.bgImg1 : '../../static/bjt.jpg'"></image></view>
+		<view class="top"><image :src="aboutUs.bgImg1 ? ip + aboutUs.bgImg1 : '../../static/bj.jpg'"></image></view>
 		<view class="flex menu">
 			<view class="f" @click="tab('/pages/travel/index')">
 				<view class="icon" style="background-color: #0f0b51;">&#xe605;</view>
@@ -31,7 +31,7 @@
 				<view class="title">党政服务</view>
 			</view>
 		</view>
-<!-- 		<view class="flex" style="margin-top: 10px;">
+		<!-- 		<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>
@@ -92,11 +92,11 @@ export default {
 		this.scrollTop = e.scrollTop;
 	},
 	onLoad(e) {
-		this.init();
+		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"})
 	},
 	methods: {
-		init() {
+		getData() {
 			this.$http.request({
 				url: this.$http.urls.home,
 				success: res => {
@@ -120,6 +120,13 @@ export default {
 		navigate(url) {
 			uni.navigateTo({ url: url });
 		}
+	},
+	//下拉刷新
+	onPullDownRefresh() {
+		setTimeout(() => {
+			uni.stopPullDownRefresh();
+			this.getData();
+		}, 1000);
 	}
 };
 </script>

+ 142 - 0
smart-ui-app/pages/other/feedback.vue

@@ -0,0 +1,142 @@
+<template>
+	<view>
+		<view class="cn">
+			<view class="info">
+				<view class="form_group hr">
+					<view class="lable">标题名称</view>
+					<input type="text" placeholder="请输入标题名称" v-model="item.title" />
+				</view>
+				<view class="form_group"><view class="lable">投诉内容</view></view>
+				<textarea placeholder="请输入投诉内容(500字以内)" v-model="item.content" maxlength="500" style="height: 150px;" />
+				<view class="form_group">
+					<view class="lable">投诉图片</view>
+					<view class="text">最多上传5张图片</view>
+				</view>
+				<view class="pl5">
+					<u-upload
+						:ip="ip"
+						:action="upload.action"
+						:header="upload.header"
+						:size-type="upload.size"
+						:max-count="upload.count"
+						:name="upload.name"
+						:file-list="item.showPictures"
+						:deletable="item.auditFlag != 1"
+						:show-progress="item.auditFlag != 1"
+						:custom-btn="item.auditFlag == 1"
+						ref="uUpload"
+						width="140"
+						height="140"
+					></u-upload>
+				</view>
+				<view class="form_group">
+					<view class="lable">手机号码</view>
+					<input type="text" placeholder="(选填),以便将处理结果反馈给你" v-model="item.phone" />
+				</view>
+			</view>
+			<button class="btn" @click="up()">提交投诉</button>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			ip: this.$http.urls.ip,
+			item: { pic: [] },
+			upload: {
+				header: { apiToken: this.$getUser().apiToken },
+				name: 'img',
+				action: this.$http.urls.uploadImg,
+				size_type: 'compressed ',
+				count: 5
+			}
+		};
+	},
+	onLoad(e) {},
+	methods: {
+		up() {
+			this.item.pic = [];
+			let files = this.$refs.uUpload.lists.filter(val => {
+				return val.progress == 100;
+			});
+			//投诉图片
+			files.forEach(item => {
+				if (item.response) {
+					this.item.pic.push(item.response.fileName); //获取上传成功的网络地址
+				} else {
+					this.item.pic.push(item.url); //原来的地址
+				}
+			});
+			let rule = [
+				{ name: 'title', checkType: 'notnull', errorMsg: '请输入标题名称' },
+				{ name: 'content', checkType: 'notnull', errorMsg: '请输入投诉内容' },
+				{ name: 'pic', checkType: 'notnull', errorMsg: '请上传营业执照' }
+			];
+			if (!this.$verify.check(this.item, rule)) {
+				uni.showModal({ content: this.$verify.error, showCancel: false });
+				return;
+			}
+			this.item.pic = this.item.pic.toString();
+			this.$http.request({
+				method: 'POST',
+				url: this.$http.urls.feedback,
+				data: this.item,
+				success: res => {
+					uni.showToast({ title: '提交成功' });
+					setTimeout(() => {
+						uni.$emit('shop');
+						uni.navigateBack();
+					}, 700);
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.steps {
+	text-align: center;
+	margin-top: 20px;
+}
+.u-subsection {
+	margin-top: 20px;
+}
+.cn {
+	padding: 15px;
+	.info {
+		background-color: white;
+		border-radius: 5px;
+		margin-top: 10px;
+		padding-bottom: 10px;
+		box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+		.dw {
+			top: 11px;
+			font-size: 19px;
+			right: 9px;
+			position: absolute;
+		}
+	}
+	textarea {
+		margin-left: 17px;
+		font-size: 14px;
+		padding: 10px;
+		width: 85%;
+		height: 85px;
+		border: 1px solid #f1f1f1;
+		border-radius: 5px;
+	}
+	.btn {
+		margin-top: 25px;
+	}
+}
+.text {
+	font-size: 11px;
+	font-weight: normal;
+	color: $dar;
+	flex: 0.8;
+	text-align: right;
+}
+</style>

+ 2 - 2
smart-ui-app/pages/shop/manage.vue

@@ -43,7 +43,7 @@
 		<view class="hotel_item" v-if="item.shopType == 2">
 			<view class="enable">
 				<text>是否开启酒店预订</text>
-				<u-switch v-model="item.enableFlag" @change="change" active-color="#67c23a" active-value="0" inactive-value="1"></u-switch>
+				<view class="u-switch"><u-switch v-model="item.enableFlag" @change="change" active-color="#67c23a" active-value="0" inactive-value="1"></u-switch></view>
 			</view>
 		</view>
 		<view class="hotel_item">
@@ -147,7 +147,7 @@ export default {
 	padding: 10px;
 	font-size: 16px;
 	.u-switch {
-		margin-top: -5px;
+		margin-top: -2px;
 		float: right;
 	}
 	.del {

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

@@ -34,14 +34,12 @@
 					<text class="icon ic" style="background-color:#366092">&#xe634;</text>
 					<text>求助电话</text>
 					<text class="icon arrow">&#xe62d;</text>
-				</view>				
-<!-- 				<view class="item hr">
-					<button open-type="feedback">
-						<text class="icon ic" style="background-color:#FF554B">&#xe610;</text>
-						<text>投诉建议</text>
-						<text class="icon arrow">&#xe62d;</text>
-					</button>
-				</view> -->
+				</view>
+				<view class="item hr" @click="navigate('/pages/other/feedback')">
+					<text class="icon ic" style="background-color:#FF554B">&#xe610;</text>
+					<text>投诉建议</text>
+					<text class="icon arrow">&#xe62d;</text>
+				</view>
 				<view class="item hr">
 					<button open-type="share">
 						<text class="icon ic" style="background-color:#18B566">&#xe607;</text>

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


+ 53 - 0
smart-ui/src/api/management/feedback.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询建议反馈列表
+export function listFeedback(query) {
+  return request({
+    url: '/management/feedback/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询建议反馈详细
+export function getFeedback(id) {
+  return request({
+    url: '/management/feedback/' + id,
+    method: 'get'
+  })
+}
+
+// 新增建议反馈
+export function addFeedback(data) {
+  return request({
+    url: '/management/feedback',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改建议反馈
+export function updateFeedback(data) {
+  return request({
+    url: '/management/feedback',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除建议反馈
+export function delFeedback(id) {
+  return request({
+    url: '/management/feedback/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出建议反馈
+export function exportFeedback(query) {
+  return request({
+    url: '/management/feedback/export',
+    method: 'get',
+    params: query
+  })
+}

+ 220 - 0
smart-ui/src/views/management/feedback/index.vue

@@ -0,0 +1,220 @@
+<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>
+        <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-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">
+        <el-button type="danger" icon="el-icon-delete" :disabled="multiple" @click="handleDelete" v-hasPermi="['management:feedback:remove']">删除</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :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">
+        <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-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>
+      <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>
+
+<script>
+import { listFeedback, getFeedback, delFeedback, addFeedback, updateFeedback, exportFeedback } from '@/api/management/feedback';
+
+export default {
+  name: 'Feedback',
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 建议反馈表格数据
+      feedbackList: [],
+      // 弹出层标题
+      title: '',
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        title: null,
+        content: null,
+        pic: null,
+        phone: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }]
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询建议反馈列表 */
+    getList() {
+      this.loading = true;
+      listFeedback(this.queryParams).then(response => {
+        this.feedbackList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        title: null,
+        content: null,
+        pic: null,
+        phone: null,
+        createTime: null
+      };
+      this.resetForm('form');
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm('queryForm');
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id);
+      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();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除建议反馈编号为"' + ids + '"的数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(function() {
+          return delFeedback(ids);
+        })
+        .then(() => {
+          this.getList();
+          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(() => {});
+    }
+  }
+};
+</script>