瀏覽代碼

1、api添加绑定会员电话
2、api求助记录添加会员电话
2、后台界面调整

luobo 3 年之前
父節點
當前提交
5e11c5f921

+ 62 - 2
smart-admin/src/main/java/com/huijy/web/controller/api/ApiIndexController.java

@@ -1,17 +1,23 @@
 package com.huijy.web.controller.api;
 
+import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
+import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo;
 import com.huijy.common.annotation.UnLogin;
 import com.huijy.common.core.domain.AjaxResult;
 import com.huijy.common.core.domain.entity.SysDictData;
 import com.huijy.common.core.page.TableDataInfo;
+import com.huijy.common.exception.ServiceException;
 import com.huijy.common.utils.StringUtils;
 import com.huijy.management.domain.*;
 import com.huijy.management.service.*;
+import com.huijy.management.vo.WxPhoneFrom;
 import com.huijy.system.service.ISysDictDataService;
+import com.huijy.weixin.config.WxMaConfiguration;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
+import me.chanjar.weixin.common.error.WxErrorException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import springfox.documentation.annotations.ApiIgnore;
@@ -46,6 +52,56 @@ public class ApiIndexController extends ApiAbstractController {
     @Autowired
     private IMemberHelpService memberHelpService;
 
+
+    //绑定手机号
+    @PostMapping("/bindMobile")
+    @ApiOperation("绑定会员手机号")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "phone", value = "会员手机号", paramType = "body")
+    })
+    public AjaxResult bindMobile(@ApiIgnore Member member, @RequestBody Map params) {
+
+        String phone = (String) params.get("phone");
+        member.setMobile(phone);
+        memberService.updateMember(member);
+        return AjaxResult.success();
+    }
+
+    //绑定微信手机号
+    @PostMapping("/bindWxMobile")
+    @ApiOperation("绑定会员微信手机号")
+    public AjaxResult bindWxMobile(@ApiIgnore Member member, @RequestBody WxPhoneFrom wxPhoneFrom) {
+
+        if (null == wxPhoneFrom) {
+            return AjaxResult.error("无加密信息");
+        }
+        //验证code
+        if (StringUtils.isEmpty(wxPhoneFrom.getCode())) {
+            return AjaxResult.error("code不能为空");
+        }
+        //获取sessionKey
+        String token, sessionKey, openId, unionId;
+        try {
+            WxMaJscode2SessionResult result = WxMaConfiguration.getMaService().getUserService().getSessionInfo(wxPhoneFrom.getCode());
+            unionId = result.getUnionid();
+            sessionKey = result.getSessionKey();
+            openId = result.getOpenid();
+        } catch (WxErrorException e) {
+            e.printStackTrace();
+            throw new ServiceException("sessionKey获取失败");
+        }
+
+        //解密码
+        WxMaPhoneNumberInfo phoneNumberInfo = WxMaConfiguration.getMaService().getUserService().getPhoneNoInfo(sessionKey, wxPhoneFrom.getEncryptedData(), wxPhoneFrom.getIv());
+        if (phoneNumberInfo == null) {
+            return AjaxResult.error("获取手机号码失败");
+        }
+        member.setMobile(phoneNumberInfo.getPhoneNumber());
+        memberService.updateMember(member);
+        return AjaxResult.success();
+    }
+
+
     @PostMapping("/pushLatLng")
     @ApiOperation("上传会员坐标")
     @ApiImplicitParams({
@@ -77,10 +133,14 @@ public class ApiIndexController extends ApiAbstractController {
     @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 = "phone", value = "求助电话", dataType = "String", paramType = "body"),
+            @ApiImplicitParam(name = "memberPhone", value = "会员电话", dataType = "String", paramType = "body"),
     })
     public AjaxResult pushHelp(@ApiIgnore Member member, @RequestBody MemberHelp help) {
-
+        help.setMemberId(member.getMemberId());
+        if (StringUtils.isEmpty(help.getMemberPhone())) {
+            help.setMemberPhone(member.getMobile());
+        }
         memberHelpService.insertMemberHelp(help);
         return AjaxResult.success();
     }

+ 3 - 0
smart-admin/src/main/resources/application-druid.yml

@@ -9,6 +9,9 @@ spring:
                 url: jdbc:mysql://106.55.241.82:3306/smart-tourism?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                 username: root
                 password: Gogs_2021
+#                url: jdbc:mysql://127.0.0.1:3306/smart_tourism?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+#                username: root
+#                password: 123456
             # 从库数据源
             slave:
                 # 从数据源开关/默认关闭

+ 13 - 0
smart-common/src/main/java/com/huijy/common/core/domain/entity/SysMenu.java

@@ -38,6 +38,10 @@ public class SysMenu extends BaseEntity
     /** 组件路径 */
     private String component;
 
+    /** 路由参数 */
+    private String query;
+
+
     /** 是否为外链(0是 1否) */
     private String isFrame;
 
@@ -219,6 +223,14 @@ public class SysMenu extends BaseEntity
         this.children = children;
     }
 
+    public String getQuery() {
+        return query;
+    }
+
+    public void setQuery(String query) {
+        this.query = query;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -228,6 +240,7 @@ public class SysMenu extends BaseEntity
             .append("orderNum", getOrderNum())
             .append("path", getPath())
             .append("component", getComponent())
+            .append("query", getQuery())
             .append("isFrame", getIsFrame())
             .append("IsCache", getIsCache())
             .append("menuType", getMenuType())

+ 33 - 0
smart-system/src/main/java/com/huijy/management/domain/MemberHelp.java

@@ -21,6 +21,12 @@ public class MemberHelp extends BaseEntity
     /** 会员id */
     private Long memberId;
 
+    private String memberName;
+
+    private String nickName;
+
+    private String memberPhone;
+
     /** 求助电话 */
     private String phone;
 
@@ -76,6 +82,30 @@ public class MemberHelp extends BaseEntity
         return lng;
     }
 
+    public String getMemberName() {
+        return memberName;
+    }
+
+    public void setMemberName(String memberName) {
+        this.memberName = memberName;
+    }
+
+    public String getNickName() {
+        return nickName;
+    }
+
+    public void setNickName(String nickName) {
+        this.nickName = nickName;
+    }
+
+    public String getMemberPhone() {
+        return memberPhone;
+    }
+
+    public void setMemberPhone(String memberPhone) {
+        this.memberPhone = memberPhone;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -85,6 +115,9 @@ public class MemberHelp extends BaseEntity
             .append("createTime", getCreateTime())
             .append("lat", getLat())
             .append("lng", getLng())
+            .append("memberName", getMemberName())
+            .append("nickName", getNickName())
+            .append("memberPhone", getMemberPhone())
             .toString();
     }
 }

+ 13 - 0
smart-system/src/main/java/com/huijy/management/domain/ShopSalesRecord.java

@@ -25,6 +25,10 @@ public class ShopSalesRecord extends BaseEntity
     /** 店铺id */
     @Excel(name = "店铺id")
     private Long shopId;
+    /**
+     * 店铺名称
+     */
+    private String shopName;
 
     /** 销售时间 */
     @JsonFormat(pattern = "yyyy-MM-dd")
@@ -124,6 +128,14 @@ public class ShopSalesRecord extends BaseEntity
         return salesAmount;
     }
 
+    public String getShopName() {
+        return shopName;
+    }
+
+    public void setShopName(String shopName) {
+        this.shopName = shopName;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -136,6 +148,7 @@ public class ShopSalesRecord extends BaseEntity
             .append("groupReception", getGroupReception())
             .append("salesAmount", getSalesAmount())
             .append("createTime", getCreateTime())
+            .append("shopName", getShopName())
             .toString();
     }
 }

+ 19 - 0
smart-system/src/main/java/com/huijy/management/vo/WxPhoneFrom.java

@@ -0,0 +1,19 @@
+package com.huijy.management.vo;
+
+import lombok.Data;
+
+@Data
+public class WxPhoneFrom {
+    /**
+     * 微信login返回的code
+     */
+    private String code;
+    /**
+     * 包括敏感数据在内的完整用户信息的加密数据
+     */
+    private String encryptedData;
+    /**
+     * 加密算法的初始向量
+     */
+    private String iv;
+}

+ 13 - 0
smart-system/src/main/java/com/huijy/system/domain/vo/RouterVo.java

@@ -37,6 +37,11 @@ public class RouterVo
     private String component;
 
     /**
+     * 路由参数:如 {"id": 1, "name": "ry"}
+     */
+    private String query;
+
+    /**
      * 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面
      */
     private Boolean alwaysShow;
@@ -130,4 +135,12 @@ public class RouterVo
     {
         this.children = children;
     }
+
+    public String getQuery() {
+        return query;
+    }
+
+    public void setQuery(String query) {
+        this.query = query;
+    }
 }

+ 1 - 0
smart-system/src/main/java/com/huijy/system/service/impl/SysMenuServiceImpl.java

@@ -151,6 +151,7 @@ public class SysMenuServiceImpl implements ISysMenuService
             router.setName(getRouteName(menu));
             router.setPath(getRouterPath(menu));
             router.setComponent(getComponent(menu));
+            router.setQuery(menu.getQuery());
             router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath()));
             List<SysMenu> cMenus = menu.getChildren();
             if (!cMenus.isEmpty() && cMenus.size() > 0 && UserConstants.TYPE_DIR.equals(menu.getMenuType()))

+ 1 - 0
smart-system/src/main/resources/mapper/management/ContentMapper.xml

@@ -42,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="auditFlag != null  and auditFlag != ''"> and audit_flag = #{auditFlag}</if>
             <if test="releaseFlag != null  and releaseFlag != ''"> and release_flag = #{releaseFlag}</if>
         </where>
+        order by audit_flag,release_flag desc ,release_time desc
     </select>
 
     <select id="selectContentByContentId" parameterType="Long" resultMap="ContentResult">

+ 16 - 7
smart-system/src/main/resources/mapper/management/MemberHelpMapper.xml

@@ -3,10 +3,13 @@
 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"    />
@@ -14,20 +17,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectMemberHelpVo">
-        select member_help_id, member_id, phone, create_time, lat, lng from t_member_help
+        select member_help_id, member_id, 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"/>
-        <where>  
+        <where>
         </where>
     </select>
-    
+
     <select id="selectMemberHelpByMemberHelpId" parameterType="Long" resultMap="MemberHelpResult">
         <include refid="selectMemberHelpVo"/>
         where member_help_id = #{memberHelpId}
     </select>
-        
+
     <insert id="insertMemberHelp" parameterType="MemberHelp" useGeneratedKeys="true" keyProperty="memberHelpId">
         insert into t_member_help
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -36,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_time,</if>
             <if test="lat != null">lat,</if>
             <if test="lng != null">lng,</if>
+            <if test="memberPhone != null">member_phone,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="memberId != null">#{memberId},</if>
@@ -43,6 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">#{createTime},</if>
             <if test="lat != null">#{lat},</if>
             <if test="lng != null">#{lng},</if>
+            <if test="memberPhone != null">#{memberPhone},</if>
          </trim>
     </insert>
 
@@ -54,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="lat != null">lat = #{lat},</if>
             <if test="lng != null">lng = #{lng},</if>
+            <if test="memberPhone != null">member_phone = #{memberPhone},</if>
         </trim>
         where member_help_id = #{memberHelpId}
     </update>
@@ -63,9 +72,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteMemberHelpByMemberHelpIds" parameterType="String">
-        delete from t_member_help where member_help_id in 
+        delete from t_member_help where member_help_id in
         <foreach item="memberHelpId" collection="array" open="(" separator="," close=")">
             #{memberHelpId}
         </foreach>
     </delete>
-</mapper>
+</mapper>

+ 10 - 7
smart-system/src/main/resources/mapper/management/ShopSalesRecordMapper.xml

@@ -3,10 +3,11 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.huijy.management.mapper.ShopSalesRecordMapper">
-    
+
     <resultMap type="ShopSalesRecord" id="ShopSalesRecordResult">
         <result property="shopSalesRecordId"    column="shop_sales_record_id"    />
         <result property="shopId"    column="shop_id"    />
+        <result property="shopName"    column="shop_name"    />
         <result property="salesTime"    column="sales_time"    />
         <result property="scatteredAppointment"    column="scattered_appointment"    />
         <result property="scatteredReception"    column="scattered_reception"    />
@@ -17,20 +18,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectShopSalesRecordVo">
-        select shop_sales_record_id, shop_id, sales_time, scattered_appointment, scattered_reception, group_appointment, group_reception, sales_amount, create_time from t_shop_sales_record
+        select shop_sales_record_id, shop_id, sales_time, scattered_appointment, scattered_reception, group_appointment, group_reception, sales_amount, create_time,
+         (select name from t_shop where t_shop.shop_id = t_shop_sales_record.shop_id) shop_name
+         from t_shop_sales_record
     </sql>
 
     <select id="selectShopSalesRecordList" parameterType="ShopSalesRecord" resultMap="ShopSalesRecordResult">
         <include refid="selectShopSalesRecordVo"/>
-        <where>  
+        <where>
         </where>
     </select>
-    
+
     <select id="selectShopSalesRecordByShopSalesRecordId" parameterType="Long" resultMap="ShopSalesRecordResult">
         <include refid="selectShopSalesRecordVo"/>
         where shop_sales_record_id = #{shopSalesRecordId}
     </select>
-        
+
     <insert id="insertShopSalesRecord" parameterType="ShopSalesRecord" useGeneratedKeys="true" keyProperty="shopSalesRecordId">
         insert into t_shop_sales_record
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -75,9 +78,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteShopSalesRecordByShopSalesRecordIds" parameterType="String">
-        delete from t_shop_sales_record where shop_sales_record_id in 
+        delete from t_shop_sales_record where shop_sales_record_id in
         <foreach item="shopSalesRecordId" collection="array" open="(" separator="," close=")">
             #{shopSalesRecordId}
         </foreach>
     </delete>
-</mapper>
+</mapper>

+ 8 - 4
smart-system/src/main/resources/mapper/system/SysMenuMapper.xml

@@ -12,6 +12,7 @@
 		<result property="orderNum"       column="order_num"      />
 		<result property="path"           column="path"           />
 		<result property="component"      column="component"      />
+		<result property="query"          column="query"          />
 		<result property="isFrame"        column="is_frame"       />
 		<result property="isCache"        column="is_cache"       />
 		<result property="menuType"       column="menu_type"      />
@@ -27,7 +28,7 @@
 	</resultMap>
 
 	<sql id="selectMenuVo">
-        select menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time
+        select menu_id, menu_name, parent_id, order_num, path, component,query, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time
 		from sys_menu
     </sql>
 
@@ -48,13 +49,13 @@
 	</select>
 
 	<select id="selectMenuTreeAll" resultMap="SysMenuResult">
-		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
+		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component,m.query, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
 		from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
 		order by m.parent_id, m.order_num
 	</select>
 
 	<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
-		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
+		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component,m.query, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
 		from sys_menu m
 		left join sys_role_menu rm on m.menu_id = rm.menu_id
 		left join sys_user_role ur on rm.role_id = ur.role_id
@@ -73,7 +74,7 @@
 	</select>
 
     <select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
-		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
+		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component,m.query, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
 		from sys_menu m
 			 left join sys_role_menu rm on m.menu_id = rm.menu_id
 			 left join sys_user_role ur on rm.role_id = ur.role_id
@@ -132,6 +133,7 @@
 			<if test="orderNum != null and orderNum != ''">order_num = #{orderNum},</if>
 			<if test="path != null and path != ''">path = #{path},</if>
 			<if test="component != null">component = #{component},</if>
+			<if test="query != null">query = #{query},</if>
 			<if test="isFrame != null and isFrame != ''">is_frame = #{isFrame},</if>
 			<if test="isCache != null and isCache != ''">is_cache = #{isCache},</if>
 			<if test="menuType != null and menuType != ''">menu_type = #{menuType},</if>
@@ -154,6 +156,7 @@
 		<if test="orderNum != null and orderNum != ''">order_num,</if>
 		<if test="path != null and path != ''">path,</if>
 		<if test="component != null and component != ''">component,</if>
+		<if test="query != null and query != ''">query,</if>
 		<if test="isFrame != null and isFrame != ''">is_frame,</if>
 		<if test="isCache != null and isCache != ''">is_cache,</if>
 		<if test="menuType != null and menuType != ''">menu_type,</if>
@@ -171,6 +174,7 @@
 		<if test="orderNum != null and orderNum != ''">#{orderNum},</if>
 		<if test="path != null and path != ''">#{path},</if>
 		<if test="component != null and component != ''">#{component},</if>
+		<if test="query != null and query != ''">#{query},</if>
 		<if test="isFrame != null and isFrame != ''">#{isFrame},</if>
 		<if test="isCache != null and isCache != ''">#{isCache},</if>
 		<if test="menuType != null and menuType != ''">#{menuType},</if>

+ 1 - 1
smart-ui/src/layout/components/Sidebar/Link.vue

@@ -10,7 +10,7 @@ import { isExternal } from '@/utils/validate'
 export default {
   props: {
     to: {
-      type: String,
+      type: [String, Object],
       required: true
     }
   },

+ 6 - 2
smart-ui/src/layout/components/Sidebar/SidebarItem.vue

@@ -1,7 +1,7 @@
 <template>
   <div v-if="!item.hidden">
     <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
-      <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
+      <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
         <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
           <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
         </el-menu-item>
@@ -82,13 +82,17 @@ export default {
 
       return false
     },
-    resolvePath(routePath) {
+    resolvePath(routePath,routeQuery) {
       if (isExternal(routePath)) {
         return routePath
       }
       if (isExternal(this.basePath)) {
         return this.basePath
       }
+      if (routeQuery) {
+        let query = JSON.parse(routeQuery);
+        return { path: path.resolve(this.basePath, routePath), query: query }
+      }
       return path.resolve(this.basePath, routePath)
     }
   }

+ 1 - 0
smart-ui/src/router/index.js

@@ -16,6 +16,7 @@ import Layout from '@/layout'
  *                                // 你可以设置 alwaysShow: true,这样它就会忽略之前定义的规则,一直显示根路由
  * redirect: noRedirect           // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
  * name:'router-name'             // 设定路由的名字,一定要填写不然使用<keep-alive>时会出现各种问题
+ * query:'{"id": 1,"name": "ry"}' // 访问路由的默认传递参数
  * meta : {
     noCache: true                // 如果设置为true,则不会被 <keep-alive> 缓存(默认 false)
     title: 'title'               // 设置该路由在侧边栏和面包屑中展示的名字

+ 20 - 9
smart-ui/src/views/management/content/index.vue

@@ -7,7 +7,7 @@
       v-show="showSearch"
       label-width="68px"
     >
-      <el-form-item label="信息类型" prop="serviceInfo">
+      <!-- <el-form-item label="信息类型" prop="serviceInfo">
         <el-select
           v-model="queryParams.serviceInfo"
           placeholder="请选择信息类型"
@@ -21,7 +21,7 @@
             :value="dict.dictValue"
           />
         </el-select>
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item label="审核状态" prop="auditFlag">
         <el-select
           v-model="queryParams.auditFlag"
@@ -126,16 +126,17 @@
       @selection-change="handleSelectionChange"
     >
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="内容管理id" align="center" prop="contentId" />
+      <!-- <el-table-column label="内容管理id" align="center" prop="contentId" /> -->
       <el-table-column
         label="信息类型"
         align="center"
         prop="serviceInfo"
+         width="80"
         :formatter="serviceInfoFormat"
       />
-      <el-table-column label="标题" align="center" prop="title" />
-      <el-table-column label="作者" align="center" prop="author" />
-      <el-table-column label="展示图片" align="center" prop="showPictures">
+      <el-table-column label="标题" align="center" prop="title"/>
+      <el-table-column label="作者" align="center" prop="author"  width="80"/>
+      <el-table-column label="展示图片" align="center" prop="showPictures"  width="80">
           <template slot-scope="scope">
           <img
             v-if="scope.row.showPictures"
@@ -149,6 +150,7 @@
         label="审核状态"
         align="center"
         prop="auditFlag"
+         width="80"
         :formatter="auditFlagFormat"
       />
       <!-- <el-table-column label="初审人" align="center" prop="auditAt" /> -->
@@ -178,13 +180,14 @@
         label="发布标志"
         align="center"
         prop="releaseFlag"
+         width="80"
         :formatter="releaseFlagFormat"
       />
       <el-table-column
         label="点击量"
         align="center"
         prop="browseNum"
-        width="100"
+        width="80"
       />
       <!-- <el-table-column label="发布人" align="center" prop="releaseAt" /> -->
       <!-- <el-table-column label="发布人" align="center" prop="releaseAt" /> -->
@@ -193,6 +196,7 @@
         label="操作"
         align="center"
         class-name="small-padding fixed-width"
+         width="180"
       >
         <template slot-scope="scope">
           <el-button
@@ -286,7 +290,7 @@
     <el-dialog :title="title" :visible.sync="open" width="80%" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="信息类型" prop="serviceInfo">
-          <el-select v-model="form.serviceInfo" placeholder="请选择信息类型">
+          <el-select v-model="form.serviceInfo" disabled placeholder="请选择信息类型">
             <el-option
               v-for="dict in serviceInfoOptions"
               :key="dict.dictValue"
@@ -462,6 +466,8 @@ export default {
       title: "",
       // 是否显示弹出层
       open: false,
+      //默认信息类型
+      serviceInfo:0,
       // 信息类型字典
       serviceInfoOptions: [],
       // 审核状态字典
@@ -488,6 +494,9 @@ export default {
     };
   },
   created () {
+    var query=this.$route.query;
+    this.queryParams.serviceInfo = query.serviceInfo;
+    this.serviceInfo = query.serviceInfo;
     this.getList();
     this.getDicts("service_info").then(response => {
       this.serviceInfoOptions = response.data;
@@ -532,7 +541,7 @@ export default {
     reset () {
       this.form = {
         contentId: null,
-        serviceInfo: null,
+        serviceInfo: this.serviceInfo,
         title: null,
         author: null,
         showPictures: null,
@@ -556,11 +565,13 @@ export default {
     /** 搜索按钮操作 */
     handleQuery () {
       this.queryParams.pageNum = 1;
+      this.queryParams.serviceInfo = this.serviceInfo;
       this.getList();
     },
     /** 重置按钮操作 */
     resetQuery () {
       this.resetForm("queryForm");
+    
       this.handleQuery();
     },
     // 多选框选中数据

+ 7 - 4
smart-ui/src/views/management/help/index.vue

@@ -57,12 +57,15 @@
     <el-table v-loading="loading" :data="helpList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="求助记录Id" align="center" prop="memberHelpId" />
-      <el-table-column label="会员id" align="center" prop="memberId" />
+      <!-- <el-table-column label="会员id" align="center" prop="memberId" /> -->
+       <el-table-column label="会员名称" align="center" prop="memberName" />
+       <el-table-column label="会员昵称" align="center" prop="nickName" />
+       <el-table-column label="会员电话" align="center" prop="memberPhone" />
       <el-table-column label="求助电话" align="center" prop="phone" />
       <el-table-column label="求助时间" align="center" prop="createTime" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
-        </template>
+        <!-- <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {H}:{m}:') }}</span>
+        </template> -->
       </el-table-column>
       <el-table-column label="坐标lat" align="center" prop="lat" />
       <el-table-column label="坐标lng" align="center" prop="lng" />

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

@@ -57,7 +57,8 @@
     <el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="店铺销售记录id" align="center" prop="shopSalesRecordId" />
-      <el-table-column label="店铺id" align="center" prop="shopId" />
+      <!-- <el-table-column label="店铺id" align="center" prop="shopId" /> -->
+      <el-table-column label="店铺名称" align="center" prop="shopName" />
       <el-table-column label="销售时间" align="center" prop="salesTime" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.salesTime, '{y}-{m}-{d}') }}</span>

+ 11 - 0
smart-ui/src/views/system/menu/index.vue

@@ -226,6 +226,17 @@
           </el-col>
           <el-col :span="12">
             <el-form-item v-if="form.menuType == 'C'">
+              <el-input v-model="form.query" placeholder="请输入路由参数" maxlength="255" />
+              <span slot="label">
+                <el-tooltip content='访问路由的默认传递参数,如:`{"id": 1, "name": "ry"}`' placement="top">
+                <i class="el-icon-question"></i>
+                </el-tooltip>
+                路由参数
+              </span>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item v-if="form.menuType == 'C'">
               <span slot="label">
                 <el-tooltip content="选择是则会被`keep-alive`缓存,需要匹配组件的`name`和地址保持一致" placement="top">
                 <i class="el-icon-question"></i>