Procházet zdrojové kódy

Merge branch 'master' of http://git.ketter.cn/farwalker/ycwh

# Conflicts:
#	miniapp/pages/yuecai/home/index.vue
huitong před 2 roky
rodič
revize
a8c57febae
33 změnil soubory, kde provedl 406 přidání a 103 odebrání
  1. 1 1
      admin/src/main/java/org/springblade/modules/ycwh/controller/pc/InformationInfoController.java
  2. 4 13
      admin/src/main/java/org/springblade/modules/ycwh/controller/wx/WXFamousDishController.java
  3. 74 0
      admin/src/main/java/org/springblade/modules/ycwh/controller/wx/WXFeedbackController.java
  4. 1 1
      admin/src/main/java/org/springblade/modules/ycwh/controller/wx/WXInformationController.java
  5. 6 6
      admin/src/main/java/org/springblade/modules/ycwh/entity/FeedbackEntity.java
  6. 1 0
      admin/src/main/java/org/springblade/modules/ycwh/vo/FeedbackVO.java
  7. 9 1
      admin/src/main/java/org/springblade/modules/ycwh/wrapper/FeedbackWrapper.java
  8. 11 1
      admin/src/main/java/org/springblade/modules/ycwh/wrapper/InformationInfoWrapper.java
  9. 11 1
      admin/src/main/java/org/springblade/modules/ycwh/wrapper/ProfessionalStyleWrapper.java
  10. 1 1
      admin_ui/src/axios.js
  11. 7 3
      admin_ui/src/option/ycwh/feedback.js
  12. 18 13
      admin_ui/src/views/ycwh/common/constants.js
  13. 2 2
      admin_ui/src/views/ycwh/documentInfo.vue
  14. 2 2
      admin_ui/src/views/ycwh/famousDish.vue
  15. 2 2
      admin_ui/src/views/ycwh/famousSnacks.vue
  16. 2 2
      admin_ui/src/views/ycwh/famousStore.vue
  17. 2 2
      admin_ui/src/views/ycwh/informationInfo.vue
  18. 2 2
      admin_ui/src/views/ycwh/professionalStyle.vue
  19. 27 0
      miniapp/api/feedback.js
  20. 9 1
      miniapp/pages.json
  21. 14 4
      miniapp/pages/yuecai/collection/index.vue
  22. 1 1
      miniapp/pages/yuecai/dish/detail/index.vue
  23. 1 4
      miniapp/pages/yuecai/dish/index.vue
  24. 42 5
      miniapp/pages/yuecai/home/index.vue
  25. 4 4
      miniapp/pages/yuecai/information/detail/index.vue
  26. 1 1
      miniapp/pages/yuecai/professional_style/detail/index.vue
  27. 1 1
      miniapp/pages/yuecai/restaurant/detail/index.vue
  28. 1 1
      miniapp/pages/yuecai/snacks/detail/index.vue
  29. 1 1
      miniapp/pages/yuecai/usercenter/aboutus/index.vue
  30. 107 0
      miniapp/pages/yuecai/usercenter/feedback/index.vue
  31. 39 25
      miniapp/pages/yuecai/usercenter/index.vue
  32. 1 1
      miniapp/pages/yuecai/usercenter/privacy/index.vue
  33. 1 1
      miniapp/pages/yuecai/usercenter/protocol/index.vue

+ 1 - 1
admin/src/main/java/org/springblade/modules/ycwh/controller/pc/InformationInfoController.java

@@ -82,7 +82,7 @@ public class InformationInfoController extends BladeController {
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "分页", notes = "传入informationInfo")
 	public R<IPage<InformationInfoVO>> list(@ApiIgnore @RequestParam Map<String, Object> informationInfo, Query query) {
-		IPage<InformationInfoEntity> pages = informationInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(informationInfo, InformationInfoEntity.class));
+		IPage<InformationInfoEntity> pages = informationInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(informationInfo, InformationInfoEntity.class).orderByAsc("sort"));
 		return R.data(InformationInfoWrapper.build().pageVO(pages));
 	}
 

+ 4 - 13
admin/src/main/java/org/springblade/modules/ycwh/controller/wx/WXFamousDishController.java

@@ -16,39 +16,30 @@
  */
 package org.springblade.modules.ycwh.controller.wx;
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
 import lombok.AllArgsConstructor;
 import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.excel.util.ExcelUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.BladeUser;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.constant.BladeConstant;
-import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.modules.ycwh.entity.FamousDishEntity;
 import org.springblade.modules.ycwh.enums.ArticleTypeEnum;
-import org.springblade.modules.ycwh.excel.FamousDishExcel;
 import org.springblade.modules.ycwh.service.ICollectInfoService;
 import org.springblade.modules.ycwh.service.IFamousDishService;
 import org.springblade.modules.ycwh.service.ILikeInfoService;
 import org.springblade.modules.ycwh.vo.FamousDishVO;
-import org.springblade.modules.ycwh.vo.InformationInfoVO;
 import org.springblade.modules.ycwh.wrapper.FamousDishWrapper;
-import org.springblade.modules.ycwh.wrapper.InformationInfoWrapper;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 import springfox.documentation.annotations.ApiIgnore;
 
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
-import java.util.List;
 import java.util.Map;
 
 /**

+ 74 - 0
admin/src/main/java/org/springblade/modules/ycwh/controller/wx/WXFeedbackController.java

@@ -0,0 +1,74 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.ycwh.controller.wx;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.ycwh.entity.FamousStoreEntity;
+import org.springblade.modules.ycwh.entity.FeedbackEntity;
+import org.springblade.modules.ycwh.enums.ArticleTypeEnum;
+import org.springblade.modules.ycwh.service.ICollectInfoService;
+import org.springblade.modules.ycwh.service.IFamousStoreService;
+import org.springblade.modules.ycwh.service.IFeedbackService;
+import org.springblade.modules.ycwh.service.ILikeInfoService;
+import org.springblade.modules.ycwh.vo.FamousStoreVO;
+import org.springblade.modules.ycwh.wrapper.FamousStoreWrapper;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.validation.Valid;
+import java.util.Map;
+
+/**
+ * 名店 控制器
+ *
+ * @author BladeX
+ * @since 2023-08-29
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("yuecai-wx/feedback")
+@Api(value = "名店", tags = "名店接口")
+public class WXFeedbackController extends BladeController {
+	private final IFeedbackService feedbackService;
+
+	/**
+	 * 反馈信息 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入feedback")
+	public R submit(@Valid @RequestBody FeedbackEntity feedback) {
+		BladeUser user = AuthUtil.getUser();
+		if (Func.isEmpty(user)) {
+			return R.fail("未登录");
+		}
+		feedback.setMemberId(user.getUserId());
+		return R.status(feedbackService.saveOrUpdate(feedback));
+	}
+
+}

+ 1 - 1
admin/src/main/java/org/springblade/modules/ycwh/controller/wx/WXInformationController.java

@@ -86,7 +86,7 @@ public class WXInformationController extends BladeController {
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "分页", notes = "传入informationInfo")
 	public R<IPage<InformationInfoVO>> list(@ApiIgnore @RequestParam Map<String, Object> informationInfo, Query query) {
-		IPage<InformationInfoEntity> pages = informationInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(informationInfo, InformationInfoEntity.class));
+		IPage<InformationInfoEntity> pages = informationInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(informationInfo, InformationInfoEntity.class).orderByAsc("sort"));
 		/** 列表置空content */
 		pages.getRecords().stream().forEach(e -> e.setContent(null));
 		return R.data(InformationInfoWrapper.build().pageVO(pages));

+ 6 - 6
admin/src/main/java/org/springblade/modules/ycwh/entity/FeedbackEntity.java

@@ -54,12 +54,12 @@ public class FeedbackEntity extends BaseEntity {
 	 * 来源类型(名菜、名点、名店)
 	 */
 	@ApiModelProperty(value = "来源类型(名菜、名点、名店)")
-	private Long sourceType;
-	/**
-	 * 来源ID
-	 */
-	@ApiModelProperty(value = "来源ID")
-	private Long sourceId;
+	private String sourceType;
+//	/**
+//	 * 来源ID
+//	 */
+//	@ApiModelProperty(value = "来源ID")
+//	private Long sourceId;
 	/**
 	 * 反馈内容
 	 */

+ 1 - 0
admin/src/main/java/org/springblade/modules/ycwh/vo/FeedbackVO.java

@@ -31,4 +31,5 @@ import org.springblade.modules.ycwh.entity.FeedbackEntity;
 public class FeedbackVO extends FeedbackEntity {
 	private static final long serialVersionUID = 1L;
 
+	private String memberName;
 }

+ 9 - 1
admin/src/main/java/org/springblade/modules/ycwh/wrapper/FeedbackWrapper.java

@@ -18,6 +18,9 @@ package org.springblade.modules.ycwh.wrapper;
 
 import org.springblade.core.mp.support.BaseEntityWrapper;
 import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.SpringUtil;
+import org.springblade.modules.member.entity.MemberEntity;
+import org.springblade.modules.member.service.IMemberInfoService;
 import org.springblade.modules.ycwh.entity.FeedbackEntity;
 import org.springblade.modules.ycwh.vo.FeedbackVO;
 
@@ -31,6 +34,10 @@ import java.util.Objects;
  */
 public class FeedbackWrapper extends BaseEntityWrapper<FeedbackEntity, FeedbackVO>  {
 
+	private static IMemberInfoService memberInfoService;
+	static {
+		 memberInfoService = SpringUtil.getBean(IMemberInfoService.class);
+	}
 	public static FeedbackWrapper build() {
 		return new FeedbackWrapper();
  	}
@@ -43,7 +50,8 @@ public class FeedbackWrapper extends BaseEntityWrapper<FeedbackEntity, FeedbackV
 		//User updateUser = UserCache.getUser(feedback.getUpdateUser());
 		//feedbackVO.setCreateUserName(createUser.getName());
 		//feedbackVO.setUpdateUserName(updateUser.getName());
-
+		MemberEntity member = memberInfoService.getById(feedback.getMemberId());
+		feedbackVO.setMemberName(member.getNickName());
 		return feedbackVO;
 	}
 

+ 11 - 1
admin/src/main/java/org/springblade/modules/ycwh/wrapper/InformationInfoWrapper.java

@@ -18,7 +18,11 @@ package org.springblade.modules.ycwh.wrapper;
 
 import org.springblade.core.mp.support.BaseEntityWrapper;
 import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.SpringUtil;
 import org.springblade.modules.ycwh.entity.InformationInfoEntity;
+import org.springblade.modules.ycwh.enums.ArticleTypeEnum;
+import org.springblade.modules.ycwh.service.ICollectInfoService;
+import org.springblade.modules.ycwh.service.ILikeInfoService;
 import org.springblade.modules.ycwh.vo.InformationInfoVO;
 
 import java.util.Objects;
@@ -30,7 +34,12 @@ import java.util.Objects;
  * @since 2023-08-29
  */
 public class InformationInfoWrapper extends BaseEntityWrapper<InformationInfoEntity, InformationInfoVO>  {
-
+	private static ICollectInfoService collectInfoService;
+	private static ILikeInfoService likeInfoService;
+	static  {
+		collectInfoService = SpringUtil.getBean(ICollectInfoService.class);
+		likeInfoService = SpringUtil.getBean(ILikeInfoService.class);
+	}
 	public static InformationInfoWrapper build() {
 		return new InformationInfoWrapper();
  	}
@@ -43,6 +52,7 @@ public class InformationInfoWrapper extends BaseEntityWrapper<InformationInfoEnt
 		//User updateUser = UserCache.getUser(informationInfo.getUpdateUser());
 		//informationInfoVO.setCreateUserName(createUser.getName());
 		//informationInfoVO.setUpdateUserName(updateUser.getName());
+		informationInfoVO.setLikeNum(likeInfoService.countLikeNum(ArticleTypeEnum.INFORMATION, informationInfo.getId()));
 
 		return informationInfoVO;
 	}

+ 11 - 1
admin/src/main/java/org/springblade/modules/ycwh/wrapper/ProfessionalStyleWrapper.java

@@ -18,7 +18,11 @@ package org.springblade.modules.ycwh.wrapper;
 
 import org.springblade.core.mp.support.BaseEntityWrapper;
 import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.SpringUtil;
 import org.springblade.modules.ycwh.entity.ProfessionalStyleEntity;
+import org.springblade.modules.ycwh.enums.ArticleTypeEnum;
+import org.springblade.modules.ycwh.service.ICollectInfoService;
+import org.springblade.modules.ycwh.service.ILikeInfoService;
 import org.springblade.modules.ycwh.vo.ProfessionalStyleVO;
 
 import java.util.Objects;
@@ -30,7 +34,12 @@ import java.util.Objects;
  * @since 2023-08-29
  */
 public class ProfessionalStyleWrapper extends BaseEntityWrapper<ProfessionalStyleEntity, ProfessionalStyleVO>  {
-
+	private static ICollectInfoService collectInfoService;
+	private static ILikeInfoService likeInfoService;
+	static  {
+		collectInfoService = SpringUtil.getBean(ICollectInfoService.class);
+		likeInfoService = SpringUtil.getBean(ILikeInfoService.class);
+	}
 	public static ProfessionalStyleWrapper build() {
 		return new ProfessionalStyleWrapper();
  	}
@@ -43,6 +52,7 @@ public class ProfessionalStyleWrapper extends BaseEntityWrapper<ProfessionalStyl
 		//User updateUser = UserCache.getUser(professionalStyle.getUpdateUser());
 		//professionalStyleVO.setCreateUserName(createUser.getName());
 		//professionalStyleVO.setUpdateUserName(updateUser.getName());
+		professionalStyleVO.setLikeNum(likeInfoService.countLikeNum(ArticleTypeEnum.PROFESSIONAL_STYLE, professionalStyle.getId()));
 
 		return professionalStyleVO;
 	}

+ 1 - 1
admin_ui/src/axios.js

@@ -19,7 +19,7 @@ import { Base64 } from 'js-base64';
 import { baseUrl } from '@/config/env';
 import crypto from '@/utils/crypto';
 
-axios.defaults.timeout = 10000;
+axios.defaults.timeout = 30000;
 //返回其他状态吗
 axios.defaults.validateStatus = function (status) {
   return status >= 200 && status <= 500; // 默认的

+ 7 - 3
admin_ui/src/option/ycwh/feedback.js

@@ -21,15 +21,19 @@ export default {
       viewDisplay: false,
       hide: true,
     },
-
+//  {
+//    label: "用户",
+//    prop: "memberId",
+//    type: "input",
+//  },
     {
       label: "用户",
-      prop: "memberId",
+      prop: "memberName",
       type: "input",
     },
     {
       //    (名菜、名点、名店)
-      label: "来源类型",
+      label: "反馈类型",
       prop: "sourceType",
       type: "select",
       dicData: informationTypeOptions,

+ 18 - 13
admin_ui/src/views/ycwh/common/constants.js

@@ -5,19 +5,24 @@ export const startPickTime = (new Date(todayStr)).getTime();
 // 发布时间可选择的结束日期
 export const endPickTime = startPickTime + 8 * 8.64e7 - 1;
 
-export const informationTypeOptions = [{
-  value: 'famous_dish',
-  label: '名菜'
-}, {
-  value: 'famous_location',
-  label: '名点'
-}, {
-  value: 'famous_store',
-  label: '名店'
-}, {
-  value: 'famous_store',
-  label: '专业风采'
-}]
+export const informationTypeOptions = [
+  {
+    value: 'information',
+    label: '资讯'
+  }, {
+    value: 'professional_style',
+    label: '专业风采'
+  }, {
+    value: 'dish',
+    label: '名菜'
+  }, {
+    value: 'snacks',
+    label: '名点'
+  }, {
+    value: 'restaurant',
+    label: '名店'
+  }
+]
 
 export const professionalStyleOptions = [{
   value: 'professional_teacher',

+ 2 - 2
admin_ui/src/views/ycwh/documentInfo.vue

@@ -214,10 +214,10 @@
       // 新增文章相关
       toEdit(row) {
         if(row && row.id) {
-          this.dialogTitle += '编辑';
+          this.dialogTitle = '编辑';
           this.currentArticle = row;
         } else {
-          this.dialogTitle += '新增'
+          this.dialogTitle = '新增'
           this.currentArticle = null
         }
         this.dialogVisible = true;

+ 2 - 2
admin_ui/src/views/ycwh/famousDish.vue

@@ -214,10 +214,10 @@
       // 新增文章相关
       toEdit(row) {
         if(row && row.id) {
-          this.dialogTitle += '编辑';
+          this.dialogTitle = '编辑';
           this.currentArticle = row;
         } else {
-          this.dialogTitle += '新增'
+          this.dialogTitle = '新增'
           this.currentArticle = null
         }
         this.dialogVisible = true;

+ 2 - 2
admin_ui/src/views/ycwh/famousSnacks.vue

@@ -214,10 +214,10 @@
       // 新增文章相关
       toEdit(row) {
         if(row && row.id) {
-          this.dialogTitle += '编辑';
+          this.dialogTitle = '编辑';
           this.currentArticle = row;
         } else {
-          this.dialogTitle += '新增'
+          this.dialogTitle = '新增'
           this.currentArticle = null
         }
         this.dialogVisible = true;

+ 2 - 2
admin_ui/src/views/ycwh/famousStore.vue

@@ -214,10 +214,10 @@
       // 新增文章相关
       toEdit(row) {
         if(row && row.id) {
-          this.dialogTitle += '编辑';
+          this.dialogTitle = '编辑';
           this.currentArticle = row;
         } else {
-          this.dialogTitle += '新增'
+          this.dialogTitle = '新增'
           this.currentArticle = null
         }
         this.dialogVisible = true;

+ 2 - 2
admin_ui/src/views/ycwh/informationInfo.vue

@@ -214,10 +214,10 @@
       // 新增文章相关
       toEdit(row) {
         if(row && row.id) {
-          this.dialogTitle += '编辑';
+          this.dialogTitle = '编辑';
           this.currentArticle = row;
         } else {
-          this.dialogTitle += '新增'
+          this.dialogTitle = '新增'
           this.currentArticle = null
         }
         this.dialogVisible = true;

+ 2 - 2
admin_ui/src/views/ycwh/professionalStyle.vue

@@ -214,10 +214,10 @@
       // 新增文章相关
       toEdit(row) {
         if(row && row.id) {
-          this.dialogTitle += '编辑';
+          this.dialogTitle = '编辑';
           this.currentArticle = row;
         } else {
-          this.dialogTitle += '新增'
+          this.dialogTitle = '新增'
           this.currentArticle = null
         }
         this.dialogVisible = true;

+ 27 - 0
miniapp/api/feedback.js

@@ -0,0 +1,27 @@
+import http from '@/http/api.js'
+import {
+  bizConst
+} from './biz/biz.js'
+import {
+  clientId,
+  tenantId
+} from '@/common/setting'
+
+const submitFeedback = (sourceType, content) => {
+  return http.request({
+    url: bizConst.basicPrefix + '/feedback/submit',
+    method: 'POST',
+    header: {
+      'Tenant-Id': tenantId
+    },
+    data: {
+      sourceType,
+      content
+    },
+  })
+}
+
+
+export default {
+  submitFeedback
+}

+ 9 - 1
miniapp/pages.json

@@ -83,7 +83,15 @@
         "navigationBarTitleText": "资讯",
         "enablePullDownRefresh": false
       }
-    }, {
+    }, 
+    {
+      "path": "pages/yuecai/usercenter/feedback/index",
+      "style": {
+        "navigationBarTitleText": "反馈",
+        "enablePullDownRefresh": false
+      }
+    },
+    {
       "path": "pages/yuecai/usercenter/aboutus/index",
       "style": {
         "navigationBarTitleText": "关于我们",

+ 14 - 4
miniapp/pages/yuecai/collection/index.vue

@@ -39,6 +39,10 @@
         keyword: '',
         list: [],
         tabList: [{
+          name: '资讯'
+        }, {
+          name: '专业风采'
+        }, {
           name: '名店'
         }, {
           name: '名菜',
@@ -49,17 +53,23 @@
       }
     },
     onLoad(options) {
-      this.collectionType = options.type || 'restaurant'
+      this.collectionType = options.type || 'information'
       switch (options.type) {
-        case 'restaurant':
+        case 'information':
           this.currentTab = 0;
           break;
-        case 'dish':
+        case 'professional_style':
           this.currentTab = 1;
           break;
-        case 'snacks':
+        case 'restaurant':
           this.currentTab = 2;
           break;
+        case 'dish':
+          this.currentTab = 3;
+          break;
+        case 'snacks':
+          this.currentTab = 4;
+          break;
         default:
           this.currentTab = 0;
           break;

+ 1 - 1
miniapp/pages/yuecai/dish/detail/index.vue

@@ -6,7 +6,7 @@
       <video class="width-100" :src="detailVO.videos"></video>
     </view>
     <view class="col-info-d t-c m-b-30">
-      <u-parse :content="detailVO.content"></u-parse>
+      <u-parse style="text-align: left;" :content="detailVO.content"></u-parse>
     </view>
     <detailBottom type="dish" :articleId.sync="detailVO.id" :liked.sync="detailVO.liked" :collected.sync="detailVO.collected"
       :views.sync="detailVO.views" :likeNum.sync="detailVO.likeNum" :collectNum.sync="detailVO.collectNum"

+ 1 - 4
miniapp/pages/yuecai/dish/index.vue

@@ -81,10 +81,6 @@
               code: "4404",
               name: "珠海市"
             },
-            {
-              code: "4405",
-              name: "汕头市"
-            },
             {
               code: "4406",
               name: "佛山市"
@@ -378,5 +374,6 @@
   .search-result {
     width: calc(100% - 70px);
     height: 100%;
+    background-color: #f4f4f4;
   }
 </style>

+ 42 - 5
miniapp/pages/yuecai/home/index.vue

@@ -23,33 +23,51 @@
         </view>
         <view class="nav-btn" @click="navTo('guagnfu')">
           <view class="nav-btn-icon icon-circle">
+<<<<<<< HEAD
             <u-image width="28px" height="28px" mode="aspectFit" src="@/static/images/home/le.png"></u-image>
+=======
+            <view style="width: 30px;font-size: 28px;font-weight: 28px;">广</view>
+            <!-- <u-image width="28px" height="28px" mode="aspectFit" src="@/static/images/home/restaurant.png"></u-image> -->
+>>>>>>> 171013703e243ba672ce7006208b94d075f2c913
           </view>
           <view class="nav-btn-text">广府菜</view>
         </view>
         <view class="nav-btn" @click="navTo('chaozhou')">
           <view class="nav-btn-icon icon-circle">
+<<<<<<< HEAD
             <u-image width="28px" height="28px" mode="aspectFit" src="@/static/images/home/xin.png"></u-image>
+=======
+            <view style="width: 30px;font-size: 28px;font-weight: 28px;">潮</view>
+            <!-- <u-image width="28px" height="28px" mode="aspectFit" src="@/static/images/home/dish.png"></u-image> -->
+>>>>>>> 171013703e243ba672ce7006208b94d075f2c913
           </view>
           <view class="nav-btn-text">潮州菜</view>
         </view>
         <view class="nav-btn" @click="navTo('kejia')">
           <view class="nav-btn-icon icon-circle">
+<<<<<<< HEAD
             <u-image width="28px" height="28px" mode="aspectFit" src="@/static/images/home/xi.png"></u-image>
+=======
+            <view style="width: 30px;font-size: 28px;font-weight: 28px;">客</view>
+            <!-- <u-image width="28px" height="28px" mode="aspectFit" src="@/static/images/home/snacks.png"></u-image> -->
+>>>>>>> 171013703e243ba672ce7006208b94d075f2c913
           </view>
           <view class="nav-btn-text">客家菜</view>
         </view>
 
       </view>
       <view class="info-list">
-        <view class="dis-flex flex-x-between info-item" v-for="(item, index) in list" :key="index"  @click="goDetail(item.id)">
+        <view class="dis-flex flex-x-between info-item" v-for="(item, index) in list" :key="index"
+          @click="goDetail(item.id)">
           <view class="info-pic">
             <u-image width="96px" height="96px" mode="aspectFill" :src="item.cover"></u-image>
           </view>
           <view class="info-view">
             <view class="info-title">
-              {{item.subTitle}}
+              {{item.title}}
             </view>
+            <!-- <view class="info-subTitle" v-html="item.subTitle"></view> -->
+            <text class="info-subTitle">{{item.subTitle}}</text>
             <view class="dis-flex info-bottom">
               <view style="margin-right: 20rpx;">{{item.createTime?item.createTime.substring(0,10):''}}</view>
               <u-icon name="thumb-up" color="#7f7f7f" size="18"></u-icon>
@@ -204,6 +222,7 @@
   .icon-circle {
     border-radius: 50%;
     border: 4rpx solid #65371b;
+    color: #65371b;
     display: flex;
     justify-content: center;
     align-items: center;
@@ -246,13 +265,13 @@
       .info-view {
         width: calc(100% - 105px);
 
-        .info-title {
-          height: 75px;
+        .info-subTitle {
+          height: 50px;
           word-break: break-all;
           color: #65371b;
           font-size: 24rpx;
           font-weight: 300;
-          line-height: 47rpx;
+          line-height: 34rpx;
           word-spacing: 2rpx;
           overflow: hidden;
           text-overflow: -o-ellipsis-lastline;
@@ -264,6 +283,24 @@
           -webkit-box-orient: vertical;
         }
 
+        .info-title {
+          height: 50rpx;
+          word-break: break-all;
+          color: #65371b;
+          font-size: 24rpx;
+          font-weight: bold;
+          line-height: 50rpx;
+          word-spacing: 2rpx;
+          overflow: hidden;
+          text-overflow: -o-ellipsis-lastline;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          display: -webkit-box;
+          -webkit-line-clamp: 1;
+          line-clamp: 1;
+          -webkit-box-orient: vertical;
+        }
+
         .info-bottom {
           color: #7f7f7f;
           font-size: 24rpx;

+ 4 - 4
miniapp/pages/yuecai/information/detail/index.vue

@@ -6,11 +6,11 @@
       <video class="width-100" :src="detailVO.videos"></video>
     </view>
     <view class="col-info-d t-c m-b-30">
-      <u-parse :content="detailVO.content"></u-parse>
+      <u-parse style="text-align: left;" :content="detailVO.content"></u-parse>
     </view>
-    <detailBottom type="information" :articleId.sync="detailVO.id" :liked.sync="detailVO.liked" :collected.sync="detailVO.collected"
-      :views.sync="detailVO.views" :likeNum.sync="detailVO.likeNum" :collectNum.sync="detailVO.collectNum"
-      @doRefresh="getDetail"></detailBottom>
+    <detailBottom type="information" :articleId.sync="detailVO.id" :liked.sync="detailVO.liked"
+      :collected.sync="detailVO.collected" :views.sync="detailVO.views" :likeNum.sync="detailVO.likeNum"
+      :collectNum.sync="detailVO.collectNum" @doRefresh="getDetail"></detailBottom>
   </view>
 </template>
 

+ 1 - 1
miniapp/pages/yuecai/professional_style/detail/index.vue

@@ -6,7 +6,7 @@
       <video class="width-100" :src="detailVO.videos"></video>
     </view>
     <view class="col-info-d t-c m-b-30">
-      <u-parse :content="detailVO.content"></u-parse>
+      <u-parse style="text-align: left;"  :content="detailVO.content"></u-parse>
     </view>
     <detailBottom type="professional_style" :articleId.sync="detailVO.id" :liked.sync="detailVO.liked" :collected.sync="detailVO.collected"
       :views.sync="detailVO.views" :likeNum.sync="detailVO.likeNum" :collectNum.sync="detailVO.collectNum"

+ 1 - 1
miniapp/pages/yuecai/restaurant/detail/index.vue

@@ -6,7 +6,7 @@
       <video class="width-100" :src="detailVO.videos"></video>
     </view>
     <view class="col-info-d t-c m-b-30">
-      <u-parse :content="detailVO.content"></u-parse>
+      <u-parse style="text-align: left;"  :content="detailVO.content"></u-parse>
     </view>
     <view v-if="detailVO && detailVO.id && detailVO.latitude && detailVO.longitude" class="width-100 m-b-10"
       style="height: 250px;">

+ 1 - 1
miniapp/pages/yuecai/snacks/detail/index.vue

@@ -6,7 +6,7 @@
       <video class="width-100" :src="detailVO.videos"></video>
     </view>
     <view class="col-info-d t-c m-b-30">
-      <u-parse :content="detailVO.content"></u-parse>
+      <u-parse style="text-align: left;"  :content="detailVO.content"></u-parse>
     </view>
     <detailBottom type="snacks" :articleId.sync="detailVO.id" :liked.sync="detailVO.liked" :collected.sync="detailVO.collected"
       :views.sync="detailVO.views" :likeNum.sync="detailVO.likeNum" :collectNum.sync="detailVO.collectNum"

+ 1 - 1
miniapp/pages/yuecai/usercenter/aboutus/index.vue

@@ -1,6 +1,6 @@
 <template>
 <view class="p-l-r-30 p-b-t-40 k-parse">
-	<u-parse :content="content" @linkTap="clickLink"/>
+	<u-parse style="text-align: left;"  :content="content" @linkTap="clickLink"/>
 	<bt-timer ref="timer"/><!-- 一定要加ref=timer,mixins里会用到 -->
 </view>
 </template>

+ 107 - 0
miniapp/pages/yuecai/usercenter/feedback/index.vue

@@ -0,0 +1,107 @@
+<template>
+  <view class="p-l-r-30 p-b-t-40 k-parse height-100 width-100" style="box-sizing: border-box;">
+    <u-button @click="show = true">{{feedbackTitle?feedbackTitle:'请选择反馈类型'}}</u-button>
+    <u-picker :show="show" :columns="columns" @confirm="confirm"></u-picker>
+    <textarea class="feedback-content" v-model="feedback" auto-focus maxlength="500"
+      placeholder="请输入您需要反馈的内容"></textarea>
+    <view class="submit-btn" @click="submit">提交反馈</view>
+  </view>
+</template>
+
+<script>
+  export default {
+    mixins: [],
+    data() {
+      return {
+        show: false,
+        columns: [
+          ['资讯', '专业风采', '名店', '名点', '名菜']
+        ],
+        feedbackTitle: '',
+        feedbackType: '',
+        feedback: '',
+        submitting: false,
+      }
+    },
+    computed: {},
+    methods: {
+      confirm(e) {
+        // INFORMATION("information", "资讯"),
+        // PROFESSIONAL_STYLE("professional_style", "风采"),
+        // DISH("dish", "名菜"),
+        // SNACKS("snacks", "名点"),
+        // RESTAURANT("restaurant", "名店");
+        switch (e.indexs[0]) {
+          case 0:
+            this.feedbackType = 'information';
+            break;
+          case 1:
+            this.feedbackType = 'professional_style';
+            break;
+          case 2:
+            this.feedbackType = 'famous_restaurant';
+            break;
+          case 3:
+            this.feedbackType = 'famous_dish';
+            break;
+          case 4:
+            this.feedbackType = 'famous_snacks';
+            break;
+          case 0:
+            this.feedbackType = e.indexs[0];
+            break;
+        }
+
+        //
+        this.feedbackTitle = '反馈类型:' + e.value[0]
+        this.show = false
+      },
+      submit() {
+        if (!this.feedbackType || !this.feedback) {
+          uni.showToast({
+            icon: "none",
+            title: "请完善反馈内容后再试"
+          })
+          return;
+        }
+        if (this.submitting) {
+          return;
+        }
+        this.submitting = true;
+        wx.showLoading();
+
+        this.$u.api.submitFeedback(this.feedbackType, this.feedback).then(res => {
+          uni.showToast({
+            icon: "none",
+            title: "反馈成功"
+          })
+          uni.navigateBack({
+            delta: -1
+          })
+        }).catch(e=> {
+          wx.hideLoading();
+          this.submitting = false;
+        })
+      }
+    },
+  }
+</script>
+
+<style scoped>
+  .feedback-content {
+    border: 1px solid #999999;
+    padding: 10px;
+    width: 100%;
+    height: calc(100% - 100px);
+    box-sizing: border-box;
+  }
+
+  .submit-btn {
+    text-align: center;
+    width: 80%;
+    line-height: 40px;
+    color: white;
+    background-color: #65371b;
+    margin: 10px auto auto auto;
+  }
+</style>

+ 39 - 25
miniapp/pages/yuecai/usercenter/index.vue

@@ -50,31 +50,45 @@
         version: version,
         allCells: [
           [{
-            icon: '',
-            text: '名店收藏',
-            url: '/pages/yuecai/collection/index?type=restaurant',
-          }, {
-            icon: '',
-            text: '名菜收藏',
-            url: '/pages/yuecai/collection/index?type=dish',
-          }, {
-            icon: '',
-            text: '名点收藏',
-            url: '/pages/yuecai/collection/index?type=snacks',
-          },
-          {
-            icon: '',
-            text: '用户协议',
-            url: '/pages/yuecai/usercenter/protocol/index',
-          }, {
-            icon: '',
-            text: '了解隐私保护政策',
-            url: '/pages/yuecai/usercenter/privacy/index',
-          }, {
-            icon: '',
-            text: '关于我们',
-            url: '/pages/yuecai/usercenter/aboutus/index',
-          }],
+              icon: '',
+              text: '资讯收藏',
+              url: '/pages/yuecai/collection/index?type=information',
+            }, {
+              icon: '',
+              text: '专业风采收藏',
+              url: '/pages/yuecai/collection/index?type=professional_style',
+            }, {
+              icon: '',
+              text: '名店收藏',
+              url: '/pages/yuecai/collection/index?type=restaurant',
+            }, {
+              icon: '',
+              text: '名菜收藏',
+              url: '/pages/yuecai/collection/index?type=dish',
+            }, {
+              icon: '',
+              text: '名点收藏',
+              url: '/pages/yuecai/collection/index?type=snacks',
+            },
+            {
+              icon: '',
+              text: '反馈',
+              url: '/pages/yuecai/usercenter/feedback/index',
+            },
+            {
+              icon: '',
+              text: '用户协议',
+              url: '/pages/yuecai/usercenter/protocol/index',
+            }, {
+              icon: '',
+              text: '了解隐私保护政策',
+              url: '/pages/yuecai/usercenter/privacy/index',
+            }, {
+              icon: '',
+              text: '关于我们',
+              url: '/pages/yuecai/usercenter/aboutus/index',
+            }
+          ],
         ],
       }
     },

+ 1 - 1
miniapp/pages/yuecai/usercenter/privacy/index.vue

@@ -1,6 +1,6 @@
 <template>
 <view class="p-l-r-30 p-b-t-40 k-parse">
-	<u-parse :content="content" @linkTap="clickLink"/>
+	<u-parse style="text-align: left;"  :content="content" @linkTap="clickLink"/>
 	<bt-timer ref="timer"/><!-- 一定要加ref=timer,mixins里会用到 -->
 </view>
 </template>

+ 1 - 1
miniapp/pages/yuecai/usercenter/protocol/index.vue

@@ -1,6 +1,6 @@
 <template>
 <view class="p-l-r-30 p-b-t-40 k-parse">
-	<u-parse :content="content" @linkTap="clickLink"/>
+	<u-parse style="text-align: left;"  :content="content" @linkTap="clickLink"/>
 	<bt-timer ref="timer"/><!-- 一定要加ref=timer,mixins里会用到 -->
 </view>
 </template>