浏览代码

修复 页面 和 后端Bug

weiximei 6 年前
父节点
当前提交
6e3023bcba
共有 17 个文件被更改,包括 225 次插入47 次删除
  1. 6
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java
  2. 10
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpMessageMapper.java
  3. 11
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpMessage.java
  4. 3
    3
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTicket.java
  5. 49
    13
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TicketServiceImpl.java
  6. 28
    4
      CODE/smart-community/app-api/src/main/resources/mapper/TpMessageMapper.xml
  7. 1
    1
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/controller/CodeController.java
  8. 1
    1
      CODE/smart-community/operate-api/src/main/resources/mapper/ToBannerMapper.xml
  9. 8
    2
      CODE/smart-community/zuul/src/main/java/com/community/huiju/filter/DomainZuulPostFilter.java
  10. 49
    0
      CODE/smart-community/zuul/src/main/java/com/community/huiju/filter/IgnoreZuulPreFilter.java
  11. 1
    1
      VUECODE/smart-operate-manage/src/components/Wangeditor/index.vue
  12. 3
    2
      VUECODE/smart-operate-manage/src/store/modules/user.js
  13. 10
    1
      VUECODE/smart-operate-manage/src/views/banner/addBanner/index.vue
  14. 10
    1
      VUECODE/smart-operate-manage/src/views/banner/ediBanner/index.vue
  15. 2
    1
      VUECODE/smart-operate-manage/src/views/banner/index.vue
  16. 13
    3
      VUECODE/smart-operate-manage/src/views/banner/infoBanner/index.vue
  17. 20
    13
      VUECODE/smart-operate-manage/src/views/login/index.vue

+ 6
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java 查看文件

81
         }
81
         }
82
 
82
 
83
         TpTicket ticket = iTicketService.getTicketSchedule(String.valueOf(communityId), ticketId);
83
         TpTicket ticket = iTicketService.getTicketSchedule(String.valueOf(communityId), ticketId);
84
-        responseBean.addSuccess(ticket);
84
+        if (null != ticket) {
85
+            responseBean.addSuccess(ticket);
86
+        }else {
87
+            responseBean.addError("没有该工单!");
88
+        }
89
+
85
         return responseBean;
90
         return responseBean;
86
     }
91
     }
87
 
92
 

+ 10
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpMessageMapper.java 查看文件

26
     List<TpMessage> getMessages(@Param(value = "userId") Integer userId,@Param(value = "communityId") Integer communityId, @Param(value = "modelType") Integer modelType);
26
     List<TpMessage> getMessages(@Param(value = "userId") Integer userId,@Param(value = "communityId") Integer communityId, @Param(value = "modelType") Integer modelType);
27
 
27
 
28
     void updateReadStatus(@Param(value = "communityId")Integer communityId, @Param(value = "userId")Integer userId);
28
     void updateReadStatus(@Param(value = "communityId")Integer communityId, @Param(value = "userId")Integer userId);
29
+
30
+    /**
31
+     * 查询工单消息
32
+     *
33
+     *  根据工单ID,模板类型 进行查询
34
+     *
35
+     * @param tpMessage
36
+     * @return
37
+     */
38
+    TpMessage selectTicketMessage(TpMessage tpMessage);
29
 }
39
 }

+ 11
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpMessage.java 查看文件

38
     private Integer updateUser;
38
     private Integer updateUser;
39
 
39
 
40
     private Date updateDate;
40
     private Date updateDate;
41
+
42
+    /** 缴费项ID **/
43
+    private Integer billId;
41
     
44
     
42
     /**
45
     /**
43
      * 工单状态
46
      * 工单状态
257
     public void setMessageIconTitle(String messageIconTitle) {
260
     public void setMessageIconTitle(String messageIconTitle) {
258
         this.messageIconTitle = messageIconTitle;
261
         this.messageIconTitle = messageIconTitle;
259
     }
262
     }
263
+
264
+    public Integer getBillId() {
265
+        return billId;
266
+    }
267
+
268
+    public void setBillId(Integer billId) {
269
+        this.billId = billId;
270
+    }
260
 }
271
 }

+ 3
- 3
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTicket.java 查看文件

39
 
39
 
40
     private Date updateDate;
40
     private Date updateDate;
41
 
41
 
42
-    private List<TdImages> tdImagesList;
42
+    private String [] tdImagesList;
43
 
43
 
44
     private List<TpTicketRecord> ticketRecordList;
44
     private List<TpTicketRecord> ticketRecordList;
45
 
45
 
180
         this.ticketRecordList = ticketRecordList;
180
         this.ticketRecordList = ticketRecordList;
181
     }
181
     }
182
 
182
 
183
-    public List<TdImages> getTdImagesList() {
183
+    public String[] getTdImagesList() {
184
         return tdImagesList;
184
         return tdImagesList;
185
     }
185
     }
186
 
186
 
187
-    public void setTdImagesList(List<TdImages> tdImagesList) {
187
+    public void setTdImagesList(String[] tdImagesList) {
188
         this.tdImagesList = tdImagesList;
188
         this.tdImagesList = tdImagesList;
189
     }
189
     }
190
 }
190
 }

+ 49
- 13
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TicketServiceImpl.java 查看文件

197
      * @return
197
      * @return
198
      */
198
      */
199
     @Override
199
     @Override
200
+    @Transactional(rollbackFor = Exception.class)
200
     public TpTicket getTicketSchedule(String communityId, Integer ticketId) {
201
     public TpTicket getTicketSchedule(String communityId, Integer ticketId) {
201
         //查看工单详情
202
         //查看工单详情
202
         TpTicket ticket = tpTicketMapper.selectByTicketId(communityId, ticketId);
203
         TpTicket ticket = tpTicketMapper.selectByTicketId(communityId, ticketId);
214
             map.put("type","service");
215
             map.put("type","service");
215
             List<TdImages> tdImagesList = tdImagesMapper.getByUUIDAndByType(map);
216
             List<TdImages> tdImagesList = tdImagesMapper.getByUUIDAndByType(map);
216
 
217
 
217
-            ticket.setTdImagesList(tdImagesList);
218
+            // 图片数组
219
+            String [] imgageArr = new String[tdImagesList.size()];
220
+
221
+            for (int i=0;i < tdImagesList.size(); i++) {
222
+                imgageArr[i]=tdImagesList.get(i).getImageUrl();
223
+            }
224
+
225
+            ticket.setTdImagesList(imgageArr);
218
             ticket.setTicketRecordList(ticketRecordList);
226
             ticket.setTicketRecordList(ticketRecordList);
219
 
227
 
228
+            // 把该工单的消息变为 已读
229
+            TpMessage tpMessage = new TpMessage();
230
+            tpMessage.setTicketId(ticket.getId());
231
+            tpMessage.setModelType("1");
232
+
233
+            tpMessage = tpMessageMapper.selectTicketMessage(tpMessage);
234
+            tpMessage.setReadStatus("1");
235
+
236
+            //  变为已读
237
+            tpMessageMapper.updateByPrimaryKeySelective(tpMessage);
238
+
220
         }
239
         }
221
         return ticket;
240
         return ticket;
222
     }
241
     }
283
      * @throws IOException
302
      * @throws IOException
284
      */
303
      */
285
     private void insertTdImage(TpTicket tpTicket, String imageUrl, Integer userId) throws IOException {
304
     private void insertTdImage(TpTicket tpTicket, String imageUrl, Integer userId) throws IOException {
286
-        TdImages tdImages = new TdImages();
287
-        Integer uuId = tpTicket.getId();
288
-        tdImages.setImageUrl(imageUrl);
289
-        tdImages.setType(Constant.SERVICE);
290
-        tdImages.setUuid(uuId);
291
-        tdImages.setCreateUser(userId);
292
-        tdImages.setCreateTime(new Date());
293
-        tdImagesMapper.insertSelective(tdImages);
305
+        String [] imgArr = imageUrl.split(",");
306
+        for (String img : imgArr) {
307
+            TdImages tdImages = new TdImages();
308
+            Integer uuId = tpTicket.getId();
309
+            tdImages.setImageUrl(img);
310
+            tdImages.setType(Constant.SERVICE);
311
+            tdImages.setUuid(uuId);
312
+            tdImages.setCreateUser(userId);
313
+            tdImages.setCreateTime(new Date());
314
+            tdImagesMapper.insertSelective(tdImages);
315
+        }
316
+
294
     }
317
     }
295
 
318
 
319
+
296
     /**
320
     /**
297
      * 回复工单
321
      * 回复工单
298
      * @param tpTicketRecordComment
322
      * @param tpTicketRecordComment
324
         tdImagesMapper.deleteByUuidAndType(map);
348
         tdImagesMapper.deleteByUuidAndType(map);
325
 
349
 
326
         // 获取图片
350
         // 获取图片
327
-        List<TdImages> tdImagesList = tpTicket.getTdImagesList();
328
-        if (null != tdImagesList && tdImagesList.size() > 0) {
329
-            tdImagesList.stream().forEach(e->e.setCreateUser(userId));
351
+        String [] tdImagesArr = tpTicket.getTdImagesList();
352
+        List<TdImages> tdImagesList = Lists.newArrayList();
353
+        if (null != tdImagesArr && tdImagesArr.length > 0) {
354
+            for (String img : tdImagesArr) {
355
+                TdImages tdImages = new TdImages();
356
+                tdImages.setImageUrl(img);
357
+                tdImages.setCreateTime(new Date());
358
+                tdImages.setCreateUser(userId);
359
+                tdImages.setType("service");
360
+                tdImages.setUuid(ticketId);
361
+
362
+                tdImagesList.add(tdImages);
363
+            }
330
             // 插入图片链接
364
             // 插入图片链接
331
             tdImagesMapper.insertBatch(tdImagesList);
365
             tdImagesMapper.insertBatch(tdImagesList);
332
         }
366
         }
333
 
367
 
368
+
334
         TpTicket ticket = tpTicketMapper.selectByPrimaryKey(ticketId);
369
         TpTicket ticket = tpTicketMapper.selectByPrimaryKey(ticketId);
335
         ticket.setTicketTitle(tpTicket.getTicketTitle());
370
         ticket.setTicketTitle(tpTicket.getTicketTitle());
336
         ticket.setTicketContent(tpTicket.getTicketContent());
371
         ticket.setTicketContent(tpTicket.getTicketContent());
378
         TpMessage tpMessage = new TpMessage();
413
         TpMessage tpMessage = new TpMessage();
379
         tpMessage.setCommunityId(tpTicket.getCommunityId());
414
         tpMessage.setCommunityId(tpTicket.getCommunityId());
380
         tpMessage.setTicketId(tpTicket.getId());
415
         tpMessage.setTicketId(tpTicket.getId());
381
-        tpMessage.setMessageType(tpTicket.getType());
416
+        // 消息类型  1:工单类型  2:认证类型  3:管理类型  4: 下载类型
417
+        tpMessage.setMessageType("1");
382
         // 通知方式: APP 内通知
418
         // 通知方式: APP 内通知
383
         tpMessage.setAdviceType("1");
419
         tpMessage.setAdviceType("1");
384
         // 模板类型为 消息模板
420
         // 模板类型为 消息模板

+ 28
- 4
CODE/smart-community/app-api/src/main/resources/mapper/TpMessageMapper.xml 查看文件

26
     <result column="unread_message_icon" property="unreadMessageIcon" jdbcType="VARCHAR" />
26
     <result column="unread_message_icon" property="unreadMessageIcon" jdbcType="VARCHAR" />
27
     <result column="message_detail_url" property="messageDetailUrl" jdbcType="VARCHAR" />
27
     <result column="message_detail_url" property="messageDetailUrl" jdbcType="VARCHAR" />
28
     <result column="message_icon_title" property="messageIconTitle" jdbcType="VARCHAR" />
28
     <result column="message_icon_title" property="messageIconTitle" jdbcType="VARCHAR" />
29
+    <result column="bill_id" property="billId" jdbcType="INTEGER" />
29
   </resultMap>
30
   </resultMap>
30
   <sql id="Base_Column_List" >
31
   <sql id="Base_Column_List" >
31
     id, ticket_id,community_id, message_type, advice_type, model_type, uuid, uuid_type, source,
32
     id, ticket_id,community_id, message_type, advice_type, model_type, uuid, uuid_type, source,
32
     message_content, status, result, meaasge_type_id, read_status, create_user, create_date, 
33
     message_content, status, result, meaasge_type_id, read_status, create_user, create_date, 
33
-    update_user, update_date
34
+    update_user, update_date, bill_id
34
   </sql>
35
   </sql>
35
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
36
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
36
     select 
37
     select 
48
       uuid_type, source, message_content, 
49
       uuid_type, source, message_content, 
49
       status, result, meaasge_type_id, 
50
       status, result, meaasge_type_id, 
50
       read_status, create_user, create_date, 
51
       read_status, create_user, create_date, 
51
-      update_user, update_date)
52
+      update_user, update_date, bill_id)
52
     values (#{id,jdbcType=INTEGER}, #{ticketId,jdbcType=INTEGER},#{communityId,jdbcType=INTEGER}, #{messageType,jdbcType=CHAR},
53
     values (#{id,jdbcType=INTEGER}, #{ticketId,jdbcType=INTEGER},#{communityId,jdbcType=INTEGER}, #{messageType,jdbcType=CHAR},
53
       #{adviceType,jdbcType=CHAR}, #{modelType,jdbcType=CHAR}, #{uuid,jdbcType=INTEGER}, 
54
       #{adviceType,jdbcType=CHAR}, #{modelType,jdbcType=CHAR}, #{uuid,jdbcType=INTEGER}, 
54
       #{uuidType,jdbcType=CHAR}, #{source,jdbcType=CHAR}, #{messageContent,jdbcType=VARCHAR}, 
55
       #{uuidType,jdbcType=CHAR}, #{source,jdbcType=CHAR}, #{messageContent,jdbcType=VARCHAR}, 
55
       #{status,jdbcType=CHAR}, #{result,jdbcType=VARCHAR}, #{meaasgeTypeId,jdbcType=VARCHAR}, 
56
       #{status,jdbcType=CHAR}, #{result,jdbcType=VARCHAR}, #{meaasgeTypeId,jdbcType=VARCHAR}, 
56
       #{readStatus,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, 
57
       #{readStatus,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, 
57
-      #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP})
58
+      #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}, #{billId,jdbcType=INTEGER})
58
   </insert>
59
   </insert>
59
   <insert id="insertSelective" parameterType="com.community.huiju.model.TpMessage" useGeneratedKeys="true" keyProperty="id" >
60
   <insert id="insertSelective" parameterType="com.community.huiju.model.TpMessage" useGeneratedKeys="true" keyProperty="id" >
60
     insert into tp_message
61
     insert into tp_message
113
       <if test="updateDate != null" >
114
       <if test="updateDate != null" >
114
         update_date,
115
         update_date,
115
       </if>
116
       </if>
117
+      <if test="billId != null">
118
+        bill_id,
119
+      </if>
116
     </trim>
120
     </trim>
117
     <trim prefix="values (" suffix=")" suffixOverrides="," >
121
     <trim prefix="values (" suffix=")" suffixOverrides="," >
118
       <if test="id != null" >
122
       <if test="id != null" >
169
       <if test="updateDate != null" >
173
       <if test="updateDate != null" >
170
         #{updateDate,jdbcType=TIMESTAMP},
174
         #{updateDate,jdbcType=TIMESTAMP},
171
       </if>
175
       </if>
176
+      <if test="billId != null">
177
+        #{billId,jdbcType=INTEGER},
178
+      </if>
172
     </trim>
179
     </trim>
173
   </insert>
180
   </insert>
174
   <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpMessage" >
181
   <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpMessage" >
225
       <if test="updateDate != null" >
232
       <if test="updateDate != null" >
226
         update_date = #{updateDate,jdbcType=TIMESTAMP},
233
         update_date = #{updateDate,jdbcType=TIMESTAMP},
227
       </if>
234
       </if>
235
+      <if test="billId != null">
236
+        bill_id = #{billId,jdbcType=INTEGER}
237
+      </if>
228
     </set>
238
     </set>
229
     where id = #{id,jdbcType=INTEGER}
239
     where id = #{id,jdbcType=INTEGER}
230
   </update>
240
   </update>
246
       create_user = #{createUser,jdbcType=INTEGER},
256
       create_user = #{createUser,jdbcType=INTEGER},
247
       create_date = #{createDate,jdbcType=TIMESTAMP},
257
       create_date = #{createDate,jdbcType=TIMESTAMP},
248
       update_user = #{updateUser,jdbcType=INTEGER},
258
       update_user = #{updateUser,jdbcType=INTEGER},
249
-      update_date = #{updateDate,jdbcType=TIMESTAMP}
259
+      update_date = #{updateDate,jdbcType=TIMESTAMP},
260
+      bill_id = #{billId,jdbcType=INTEGER}
250
     where id = #{id,jdbcType=INTEGER}
261
     where id = #{id,jdbcType=INTEGER}
251
   </update>
262
   </update>
252
 
263
 
320
     and uuid = #{userId}
331
     and uuid = #{userId}
321
   </update>
332
   </update>
322
 
333
 
334
+  <select id="selectTicketMessage" resultMap="BaseResultMap" parameterType="com.community.huiju.model.TpMessage">
335
+    select
336
+    <include refid="Base_Column_List"/>
337
+    from tp_message
338
+    where message_type=1
339
+    <if test="ticketId != null and ticketId !=''">
340
+        and ticket_id=#{ticketId}
341
+    </if>
342
+    <if test="modelType != null and modelType !=''">
343
+        and model_type=#{modelType}
344
+    </if>
345
+  </select>
346
+
323
 </mapper>
347
 </mapper>

+ 1
- 1
CODE/smart-community/operate-api/src/main/java/com/community/huiju/controller/CodeController.java 查看文件

41
 
41
 
42
         log.info("{} 手机号校验结果: {}",phone, AccountValidatorUtil.isPhone(phone));
42
         log.info("{} 手机号校验结果: {}",phone, AccountValidatorUtil.isPhone(phone));
43
         if (!AccountValidatorUtil.isPhone(phone)){
43
         if (!AccountValidatorUtil.isPhone(phone)){
44
-            response.addError("请输入正的手机号!");
44
+            response.addError("请输入正的手机号!");
45
             return response;
45
             return response;
46
         }
46
         }
47
 
47
 

+ 1
- 1
CODE/smart-community/operate-api/src/main/resources/mapper/ToBannerMapper.xml 查看文件

12
     <result column="eff_time" property="effTime" jdbcType="TIMESTAMP" />
12
     <result column="eff_time" property="effTime" jdbcType="TIMESTAMP" />
13
     <result column="exp_time" property="expTime" jdbcType="TIMESTAMP" />
13
     <result column="exp_time" property="expTime" jdbcType="TIMESTAMP" />
14
     <result column="banner_type" property="bannerType" jdbcType="CHAR" />
14
     <result column="banner_type" property="bannerType" jdbcType="CHAR" />
15
-    <result column="external_link" property="externalLink" jdbcType="VARCHAR" />
15
+    <result column="external_link" property="externalLink" jdbcType="LONGVARCHAR" />
16
     <result column="banner_title" property="bannerTitle" jdbcType="VARCHAR" />
16
     <result column="banner_title" property="bannerTitle" jdbcType="VARCHAR" />
17
     <result column="create_user" property="createUser" jdbcType="INTEGER" />
17
     <result column="create_user" property="createUser" jdbcType="INTEGER" />
18
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
18
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />

CODE/smart-community/zuul/src/main/java/com/community/huiju/filter/DomainZuulPreFilter.java → CODE/smart-community/zuul/src/main/java/com/community/huiju/filter/DomainZuulPostFilter.java 查看文件

10
 import com.netflix.zuul.context.RequestContext;
10
 import com.netflix.zuul.context.RequestContext;
11
 import com.netflix.zuul.exception.ZuulException;
11
 import com.netflix.zuul.exception.ZuulException;
12
 import org.apache.commons.lang.StringUtils;
12
 import org.apache.commons.lang.StringUtils;
13
+import org.springframework.http.HttpMethod;
13
 import org.springframework.http.MediaType;
14
 import org.springframework.http.MediaType;
14
 import org.springframework.stereotype.Component;
15
 import org.springframework.stereotype.Component;
15
 
16
 
17
 import javax.servlet.http.HttpServletResponse;
18
 import javax.servlet.http.HttpServletResponse;
18
 
19
 
19
 /**
20
 /**
20
- * 跨域
21
+ * 拦截Token
21
  * @author weiximei
22
  * @author weiximei
22
  */
23
  */
23
 //@Component
24
 //@Component
24
-public class DomainZuulPreFilter extends ZuulFilter {
25
+public class DomainZuulPostFilter extends ZuulFilter {
25
 
26
 
26
     @Override
27
     @Override
27
     public String filterType() {
28
     public String filterType() {
35
 
36
 
36
     @Override
37
     @Override
37
     public boolean shouldFilter() {
38
     public boolean shouldFilter() {
39
+        RequestContext ctx = RequestContext.getCurrentContext();
40
+        HttpServletRequest request = ctx.getRequest();
41
+        if (request.getMethod().equals("OPTIONS")) {
42
+            return false;
43
+        }
38
         return true;
44
         return true;
39
     }
45
     }
40
 
46
 

+ 49
- 0
CODE/smart-community/zuul/src/main/java/com/community/huiju/filter/IgnoreZuulPreFilter.java 查看文件

1
+package com.community.huiju.filter;
2
+
3
+import com.alibaba.fastjson.JSONObject;
4
+import com.community.commom.constant.Constant;
5
+import com.community.commom.mode.ResponseBean;
6
+import com.community.commom.session.UserElement;
7
+import com.community.huiju.constant.Header;
8
+import com.netflix.zuul.ZuulFilter;
9
+import com.netflix.zuul.context.RequestContext;
10
+import com.netflix.zuul.exception.ZuulException;
11
+import org.apache.commons.lang.StringUtils;
12
+import org.springframework.stereotype.Component;
13
+
14
+import javax.servlet.http.HttpServletRequest;
15
+import javax.servlet.http.HttpServletResponse;
16
+
17
+/**
18
+ * 忽略拦截
19
+ * @author weiximei
20
+ */
21
+//@Component
22
+public class IgnoreZuulPreFilter extends ZuulFilter {
23
+
24
+    @Override
25
+    public String filterType() {
26
+        return "pre";
27
+    }
28
+
29
+    @Override
30
+    public int filterOrder() {
31
+        return 0;
32
+    }
33
+
34
+    @Override
35
+    public boolean shouldFilter() {
36
+        RequestContext ctx = RequestContext.getCurrentContext();
37
+        HttpServletRequest request = ctx.getRequest();
38
+        System.out.println(request.getMethod());
39
+        if (request.getMethod().equals("OPTIONS") || request.getMethod().equals("PUT")) {
40
+            return false;
41
+        }
42
+        return true;
43
+    }
44
+
45
+    @Override
46
+    public Object run() throws ZuulException {
47
+        return null;
48
+    }
49
+}

+ 1
- 1
VUECODE/smart-operate-manage/src/components/Wangeditor/index.vue 查看文件

9
 import { mapGetters } from 'vuex'
9
 import { mapGetters } from 'vuex'
10
 export default {
10
 export default {
11
   name: 'EditorElem',
11
   name: 'EditorElem',
12
-  props:['content'], // 接收父组件的方法
12
+  props: ['content'], // 接收父组件的方法
13
   data() {
13
   data() {
14
     return {
14
     return {
15
       editorContent: this.content, // 内容
15
       editorContent: this.content, // 内容

+ 3
- 2
VUECODE/smart-operate-manage/src/store/modules/user.js 查看文件

68
     SendCode({ commit, state }, userName) {
68
     SendCode({ commit, state }, userName) {
69
       return new Promise((resolve, reject) => {
69
       return new Promise((resolve, reject) => {
70
         sendCode(userName).then(response => {
70
         sendCode(userName).then(response => {
71
-          const data = response.message
72
-          resolve(data)
71
+          //const data = response.message
72
+          // resolve(data)
73
+          resolve(response)
73
         }).catch(error => {
74
         }).catch(error => {
74
           reject(error)
75
           reject(error)
75
         })
76
         })

+ 10
- 1
VUECODE/smart-operate-manage/src/views/banner/addBanner/index.vue 查看文件

124
       listLoading: true,
124
       listLoading: true,
125
       importanceOptions: [1, 2, 3],
125
       importanceOptions: [1, 2, 3],
126
       calendarTypeOptions,
126
       calendarTypeOptions,
127
+      communityQuery: {
128
+        pageNum: 1,
129
+        pageSize: 300,
130
+        communityId: undefined,
131
+        communityName: undefined,
132
+        provinceId: undefined,
133
+        cityId: undefined,
134
+        districtId: undefined
135
+      },
127
       imageUrl: '', // 图片预览
136
       imageUrl: '', // 图片预览
128
       listQuery: [], // 接收查询参数,在返回给首页
137
       listQuery: [], // 接收查询参数,在返回给首页
129
       addForm: {
138
       addForm: {
228
     },
237
     },
229
     getCommuniryList() {
238
     getCommuniryList() {
230
       this.listLoading = true
239
       this.listLoading = true
231
-      this.FetchCommunityList().then(() => {
240
+      this.FetchCommunityList(this.communityQuery).then(() => {
232
         this.listLoading = false
241
         this.listLoading = false
233
       }).catch(() => {
242
       }).catch(() => {
234
         this.loading = false
243
         this.loading = false

+ 10
- 1
VUECODE/smart-operate-manage/src/views/banner/ediBanner/index.vue 查看文件

127
       imageUrl: '', // 图片预览
127
       imageUrl: '', // 图片预览
128
       importanceOptions: [1, 2, 3],
128
       importanceOptions: [1, 2, 3],
129
       calendarTypeOptions,
129
       calendarTypeOptions,
130
+      communityQuery: {
131
+        pageNum: 1,
132
+        pageSize: 300,
133
+        communityId: undefined,
134
+        communityName: undefined,
135
+        provinceId: undefined,
136
+        cityId: undefined,
137
+        districtId: undefined
138
+      },
130
       listQuery: [],
139
       listQuery: [],
131
       form: {
140
       form: {
132
         id: '',
141
         id: '',
242
     },
251
     },
243
     getCommuniryList() {
252
     getCommuniryList() {
244
       this.listLoading = true
253
       this.listLoading = true
245
-      this.FetchCommunityList().then(() => {
254
+      this.FetchCommunityList(this.communityQuery).then(() => {
246
         this.listLoading = false
255
         this.listLoading = false
247
       }).catch(() => {
256
       }).catch(() => {
248
         this.loading = false
257
         this.loading = false

+ 2
- 1
VUECODE/smart-operate-manage/src/views/banner/index.vue 查看文件

37
       <el-table-column label="标题" align="center" min-width="250px">
37
       <el-table-column label="标题" align="center" min-width="250px">
38
         <template slot-scope="scope">
38
         <template slot-scope="scope">
39
           <!-- <span class="link-type" @click="handleUpdate(scope.row)">{{ scope.row.title }}</span> -->
39
           <!-- <span class="link-type" @click="handleUpdate(scope.row)">{{ scope.row.title }}</span> -->
40
-          <span class="link-type title-span" @click="infoBanner(scope.row.id)">{{ scope.row.title }}</span>
40
+          <!-- style="color: #409EFF;cursor: pointer" -->
41
+          <span class="link-type" style="color: #409EFF;cursor: pointer" @click="infoBanner(scope.row.id)">{{ scope.row.title }}</span>
41
         </template>
42
         </template>
42
       </el-table-column>
43
       </el-table-column>
43
       <el-table-column label="适用社区" align="center">
44
       <el-table-column label="适用社区" align="center">

+ 13
- 3
VUECODE/smart-operate-manage/src/views/banner/infoBanner/index.vue 查看文件

35
         <span v-show="showContentVisible" label="2" @change="showContent">自写文章</span>
35
         <span v-show="showContentVisible" label="2" @change="showContent">自写文章</span>
36
       </el-form-item>
36
       </el-form-item>
37
       <el-form-item v-if="showURLVisible" :label-width="formLabelWidth" label="跳转链接">
37
       <el-form-item v-if="showURLVisible" :label-width="formLabelWidth" label="跳转链接">
38
-        <span><a :href="form.externalLink" target="_blank">{{ form.externalLink }}</a></span>
38
+        <span><a :href="form.externalLink" style="color: #409EFF;cursor: pointer" target="_blank">{{ form.externalLink }}</a></span>
39
       </el-form-item>
39
       </el-form-item>
40
       <div v-if="showContentVisible">
40
       <div v-if="showContentVisible">
41
         <el-form-item :label-width="formLabelWidth" label="内容标题">
41
         <el-form-item :label-width="formLabelWidth" label="内容标题">
44
         <!-- <el-form-item :label-width="formLabelWidth" label="内容详情">
44
         <!-- <el-form-item :label-width="formLabelWidth" label="内容详情">
45
           <el-input v-model="form.bannerContent" placeholder="内容详情"/>
45
           <el-input v-model="form.bannerContent" placeholder="内容详情"/>
46
         </el-form-item> -->
46
         </el-form-item> -->
47
-        <el-form-item :label-width="formLabelWidth" label="内容详情">
47
+        <el-form-item :label-width="formLabelWidth" label="内容详情" id="bannerContent">
48
           <div id="father" v-html="this.form.bannerContent"></div>
48
           <div id="father" v-html="this.form.bannerContent"></div>
49
         </el-form-item>
49
         </el-form-item>
50
       </div>
50
       </div>
99
       imageUrl: '', // 图片预览
99
       imageUrl: '', // 图片预览
100
       importanceOptions: [1, 2, 3],
100
       importanceOptions: [1, 2, 3],
101
       calendarTypeOptions,
101
       calendarTypeOptions,
102
+      communityQuery: {
103
+        pageNum: 1,
104
+        pageSize: 300,
105
+        communityId: undefined,
106
+        communityName: undefined,
107
+        provinceId: undefined,
108
+        cityId: undefined,
109
+        districtId: undefined
110
+      },
102
       listQuery: [],
111
       listQuery: [],
103
       form: {
112
       form: {
104
         id: '',
113
         id: '',
234
     },
243
     },
235
     getCommuniryList() {
244
     getCommuniryList() {
236
       this.listLoading = true
245
       this.listLoading = true
237
-      this.FetchCommunityList().then(() => {
246
+      this.FetchCommunityList(this.communityQuery).then(() => {
238
         this.listLoading = false
247
         this.listLoading = false
239
       }).catch(() => {
248
       }).catch(() => {
240
         this.loading = false
249
         this.loading = false
292
   height: 178px;
301
   height: 178px;
293
   display: block;
302
   display: block;
294
 }
303
 }
304
+
295
 </style>
305
 </style>
296
 
306
 
297
 
307
 

+ 20
- 13
VUECODE/smart-operate-manage/src/views/login/index.vue 查看文件

39
           />
39
           />
40
         </el-form-item>
40
         </el-form-item>
41
         <el-button type="primary" @click="sendCode();" v-if="isCodeNum == false">发送验证码</el-button>
41
         <el-button type="primary" @click="sendCode();" v-if="isCodeNum == false">发送验证码</el-button>
42
-        <el-button type="primary" disabled v-else>{{ codeNum }}</el-button>
42
+        <el-button type="primary" disabled v-else>{{ codeNum + '秒后重新获取' }}</el-button>
43
       </div>
43
       </div>
44
       <el-button
44
       <el-button
45
         :loading="loading"
45
         :loading="loading"
61
   data () {
61
   data () {
62
     const validateUsername = (rule, value, callback) => {
62
     const validateUsername = (rule, value, callback) => {
63
       if (!isvalidUsername(value)) {
63
       if (!isvalidUsername(value)) {
64
-        callback(new Error('该手机号不合法'))
64
+        callback(new Error('请输入正确的手机号'))
65
       } else {
65
       } else {
66
         callback()
66
         callback()
67
       }
67
       }
121
       // this.$router.push({ path: this.redirect || '/index' })
121
       // this.$router.push({ path: this.redirect || '/index' })
122
     },
122
     },
123
     sendCode () {
123
     sendCode () {
124
+      // 默认为1, 1表示不成功
125
+      let resCode = 1;
124
       this.$store.dispatch('SendCode', this.loginForm.username).then((res) => {
126
       this.$store.dispatch('SendCode', this.loginForm.username).then((res) => {
127
+        // 成功则为 0 
128
+        resCode = res.code
129
+        // 为0发送成功
130
+        if (resCode === '0') {
131
+          this.codeNum = 60
132
+          this.isCodeNum = true
133
+          let time = setInterval(()=> {
134
+            if (this.codeNum === 1) {
135
+              clearInterval(time)
136
+              this.isCodeNum = false
137
+            }
138
+            this.codeNum --
139
+          }, 1000)
140
+        }
125
       }).catch(() => {
141
       }).catch(() => {
126
         console.log('error sendcode')
142
         console.log('error sendcode')
127
       })
143
       })
128
 
144
 
129
-      this.codeNum = 60
130
-      this.isCodeNum = true
131
-      let time = setInterval(()=> {
132
-        if (this.codeNum === 1) {
133
-          clearInterval(time)
134
-          this.isCodeNum = false
135
-        }
136
-        this.codeNum --
137
-      }, 1000)
138
-
139
     }
145
     }
140
   }
146
   }
141
 }
147
 }
220
       float: left;
226
       float: left;
221
       .el-form-item {
227
       .el-form-item {
222
         float: left;
228
         float: left;
229
+        width: 158px;
223
         .el-input {
230
         .el-input {
224
           float: left;
231
           float: left;
225
         }
232
         }
226
       }
233
       }
227
       .el-button {
234
       .el-button {
228
-        margin-left: 20px;
235
+        margin-left: 10px;
229
       }
236
       }
230
     }
237
     }
231
   }
238
   }