Explorar el Código

添加各模块页面

lijj hace 2 años
padre
commit
10303875aa

+ 6 - 11
admin/pom.xml

@@ -292,9 +292,9 @@
             </snapshots>
         </repository>
         <repository>
-            <id>bladex</id>
-            <name>BladeX Release Repository</name>
-            <url>https://center.javablade.com/api/packages/blade/maven</url>
+            <id>ketu-release</id>
+            <name>Ketu Release Repository</name>
+            <url>http://nexus.ketter.cn/repository/maven-releases/</url>
         </repository>
     </repositories>
     <pluginRepositories>
@@ -310,15 +310,10 @@
 
     <distributionManagement>
         <repository>
-            <id>bladex</id>
-            <name>BladeX Release Repository</name>
-            <url>https://center.javablade.com/api/packages/blade/maven</url>
+            <id>ketu-release</id>
+            <name>Ketu Release Repository</name>
+            <url>http://nexus.ketter.cn/repository/maven-releases/</url>
         </repository>
-        <snapshotRepository>
-            <id>bladex</id>
-            <name>BladeX Snapshot Repository</name>
-            <url>https://center.javablade.com/api/packages/blade/maven</url>
-        </snapshotRepository>
     </distributionManagement>
 
 </project>

+ 73 - 0
admin/src/main/java/org/springblade/modules/ycwh/controller/wx/WXFamousLocationController.java

@@ -0,0 +1,73 @@
+/*
+ *      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.tool.api.R;
+import org.springblade.modules.ycwh.entity.FamousLocationEntity;
+import org.springblade.modules.ycwh.service.IFamousLocationService;
+import org.springblade.modules.ycwh.vo.FamousLocationVO;
+import org.springblade.modules.ycwh.wrapper.FamousLocationWrapper;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import java.util.Map;
+
+/**
+ * 名点 控制器
+ *
+ * @author BladeX
+ * @since 2023-08-29
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("yuecai-wx/famous_location")
+@Api(value = "名点", tags = "名点接口")
+public class WXFamousLocationController extends BladeController {
+
+	private final IFamousLocationService famousLocationService;
+
+	/**
+	 * 名点 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入famousLocation")
+	public R<FamousLocationVO> detail(FamousLocationEntity famousLocation) {
+		FamousLocationEntity detail = famousLocationService.getOne(Condition.getQueryWrapper(famousLocation));
+		return R.data(FamousLocationWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 名点 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入famousLocation")
+	public R<IPage<FamousLocationVO>> list(@ApiIgnore @RequestParam Map<String, Object> famousLocation, Query query) {
+		IPage<FamousLocationEntity> pages = famousLocationService.page(Condition.getPage(query), Condition.getQueryWrapper(famousLocation, FamousLocationEntity.class));
+		return R.data(FamousLocationWrapper.build().pageVO(pages));
+	}
+
+}

+ 83 - 0
admin/src/main/java/org/springblade/modules/ycwh/controller/wx/WXFamousStoreController.java

@@ -0,0 +1,83 @@
+/*
+ *      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.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.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.FamousStoreEntity;
+import org.springblade.modules.ycwh.excel.FamousStoreExcel;
+import org.springblade.modules.ycwh.service.IFamousStoreService;
+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.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 名店 控制器
+ *
+ * @author BladeX
+ * @since 2023-08-29
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("yuecai-wx/famous_store")
+@Api(value = "名店", tags = "名店接口")
+public class WXFamousStoreController extends BladeController {
+
+	private final IFamousStoreService famousStoreService;
+
+	/**
+	 * 名店 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入famousStore")
+	public R<FamousStoreVO> detail(FamousStoreEntity famousStore) {
+		FamousStoreEntity detail = famousStoreService.getOne(Condition.getQueryWrapper(famousStore));
+		return R.data(FamousStoreWrapper.build().entityVO(detail));
+	}
+	/**
+	 * 名店 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入famousStore")
+	public R<IPage<FamousStoreVO>> list(@ApiIgnore @RequestParam Map<String, Object> famousStore, Query query) {
+		IPage<FamousStoreEntity> pages = famousStoreService.page(Condition.getPage(query), Condition.getQueryWrapper(famousStore, FamousStoreEntity.class));
+		return R.data(FamousStoreWrapper.build().pageVO(pages));
+	}
+
+}

+ 61 - 0
admin/src/main/java/org/springblade/modules/ycwh/controller/wx/WXMemberController.java

@@ -0,0 +1,61 @@
+/*
+ *      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.tool.api.R;
+import org.springblade.modules.ycwh.entity.FamousDishEntity;
+import org.springblade.modules.ycwh.service.IFamousDishService;
+import org.springblade.modules.ycwh.vo.FamousDishVO;
+import org.springblade.modules.ycwh.wrapper.FamousDishWrapper;
+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 java.util.Map;
+
+/**
+ * 名菜
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("yuecai-wx/member")
+@Api(value = "用户信息接口", tags = "用户信息接口")
+public class WXMemberController extends BladeController {
+
+	private final IFamousDishService famousDishService;
+
+	/**
+	 * 用户信息
+	 */
+	@GetMapping("/info")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入famousDish")
+	public R<FamousDishVO> getInfo(FamousDishEntity famousDish) {
+		return R.data(null);
+	}
+
+}

+ 84 - 0
admin/src/main/java/org/springblade/modules/ycwh/controller/wx/WXProfessionalStyleController.java

@@ -0,0 +1,84 @@
+/*
+ *      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.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.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.ProfessionalStyleEntity;
+import org.springblade.modules.ycwh.excel.ProfessionalStyleExcel;
+import org.springblade.modules.ycwh.service.IProfessionalStyleService;
+import org.springblade.modules.ycwh.vo.ProfessionalStyleVO;
+import org.springblade.modules.ycwh.wrapper.ProfessionalStyleWrapper;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 烹饪专业风采 控制器
+ *
+ * @author BladeX
+ * @since 2023-08-29
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("yuecai-wx/professional_style")
+@Api(value = "烹饪专业风采", tags = "烹饪专业风采接口")
+public class WXProfessionalStyleController extends BladeController {
+
+	private final IProfessionalStyleService professionalStyleService;
+
+	/**
+	 * 烹饪专业风采 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入professionalStyle")
+	public R<ProfessionalStyleVO> detail(ProfessionalStyleEntity professionalStyle) {
+		ProfessionalStyleEntity detail = professionalStyleService.getOne(Condition.getQueryWrapper(professionalStyle));
+		return R.data(ProfessionalStyleWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 烹饪专业风采 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入professionalStyle")
+	public R<IPage<ProfessionalStyleVO>> list(@ApiIgnore @RequestParam Map<String, Object> professionalStyle, Query query) {
+		IPage<ProfessionalStyleEntity> pages = professionalStyleService.page(Condition.getPage(query), Condition.getQueryWrapper(professionalStyle, ProfessionalStyleEntity.class));
+		return R.data(ProfessionalStyleWrapper.build().pageVO(pages));
+	}
+
+}

+ 1 - 0
miniapp/api/dish.js

@@ -4,6 +4,7 @@ import {clientId,tenantId} from '@/common/setting'
 
 // 获取token
 const getDishList = () => {
+  debugger
 	return http.request({
 		url: bizConst.basicPrefix + '/famous_dish/list',
 		method: 'GET',

+ 19 - 0
miniapp/api/location.js

@@ -0,0 +1,19 @@
+import http from '@/http/api.js'
+import {bizConst} from './biz/biz.js'
+import {clientId,tenantId} from '@/common/setting'
+
+// 获取token
+const getLocationList = () => {
+	return http.request({
+		url: bizConst.basicPrefix + '/famous_location/list',
+		method: 'GET',
+		header: {
+			'Tenant-Id': tenantId
+		},
+		params: {},
+	})
+} 
+
+export default {
+	getLocationList
+}

+ 6 - 53
miniapp/api/member.js

@@ -3,64 +3,17 @@ import {bizConst} from './biz/biz.js'
 import {clientId,tenantId} from '@/common/setting'
 
 // 获取token
-const wxUserLogin = (code) => {
+const getUserInfo = () => {
 	return http.request({
-		url: bizConst.memberPrefix + '/login/miniapp',//?clientCode=' + clientId + '&code=' + code,
-		method: 'POST',
+		url: bizConst.basicPrefix + '/member/info',
+		method: 'GET',
 		header: {
 			'Tenant-Id': tenantId
 		},
-		params: {
-			clientCode: clientId,
-			code,
-		},
-	})
-}
-
-//刷新token
-const refreshToken = (refreshToken) => {
-	return http.request({
-		url: bizConst.memberPrefix + '/login/refresh',
-		method: 'POST',
-		params: {
-			refreshToken,
-		},
-	})
-}
-
-//获取随机名称
-const getRandomName = () => {
-	return http.request({
-		url: bizConst.memberPrefix + '/member/info/random/name',
-		method: 'GET',
+		params: {},
 	})
-}
-
-//获取随机头像
-const getRandomAvatar = () => {
-	return http.request({
-		url: bizConst.memberPrefix + '/member/info/random/avatar',
-		method: 'GET',
-	})
-}
-
-//保存昵称和头像
-const saveNicknameAndAvatar = (name, avatar) => {
-	return http.request({
-		url: bizConst.memberPrefix + '/member/info/random/save',
-		method: 'POST',
-		params: {
-			name,
-			avatar,
-		},
-	})
-}
- 
+} 
 
 export default {
-	wxUserLogin,
-	refreshToken,
-	getRandomName,
-	getRandomAvatar,
-	saveNicknameAndAvatar
+	getUserInfo
 }

+ 19 - 0
miniapp/api/professional_style.js

@@ -0,0 +1,19 @@
+import http from '@/http/api.js'
+import {bizConst} from './biz/biz.js'
+import {clientId,tenantId} from '@/common/setting'
+
+// 获取token
+const getProfessionalStyleList = () => {
+	return http.request({
+		url: bizConst.basicPrefix + '/professional_style/list',
+		method: 'GET',
+		header: {
+			'Tenant-Id': tenantId
+		},
+		params: {},
+	})
+} 
+
+export default {
+	getProfessionalStyleList
+}

+ 19 - 0
miniapp/api/restaurant.js

@@ -0,0 +1,19 @@
+import http from '@/http/api.js'
+import {bizConst} from './biz/biz.js'
+import {clientId,tenantId} from '@/common/setting'
+
+// 获取token
+const getRestaurantList = () => {
+	return http.request({
+		url: bizConst.basicPrefix + '/famous_store/list',
+		method: 'GET',
+		header: {
+			'Tenant-Id': tenantId
+		},
+		params: {},
+	})
+} 
+
+export default {
+	getRestaurantList
+}

+ 1 - 1
miniapp/common/setting.js

@@ -9,7 +9,7 @@ module.exports = {
 	// 版本号
 	version: '0.1.0',
 	// 开发环境接口Url
-	devUrl: 'http://localhost:8210',//因为是微服务架构,所以开发环境也全部调服务器,需要调本地服务的配置到biz.js里
+	devUrl: 'http://localhost:9232',//因为是微服务架构,所以开发环境也全部调服务器,需要调本地服务的配置到biz.js里
 	// 线上环境接口Url
 	prodUrl: 'http://ycwh.pj.farwalker.cn/api',
 	// 后端数据的接收方式application/json;charset=UTF-8或者application/x-www-form-urlencoded;charset=UTF-8

+ 39 - 6
miniapp/pages.json

@@ -8,13 +8,31 @@
    {
         "path": "pages/yuecai/home/index",
         "style": {
-          "navigationBarTitleText": "首页",
+          "navigationBarTitleText": "专业风采",
           "enablePullDownRefresh": false
         }
     },{
-      "path": "pages/yuecai/dish/detail",
+      "path": "pages/yuecai/dish/index",
       "style": {
-        "navigationBarTitleText": "菜品详情",
+        "navigationBarTitleText": "名菜",
+        "enablePullDownRefresh": false
+      }
+    },{
+      "path": "pages/yuecai/location/index",
+      "style": {
+        "navigationBarTitleText": "名点",
+        "enablePullDownRefresh": false
+      }
+    },{
+      "path": "pages/yuecai/restaurant/index",
+      "style": {
+        "navigationBarTitleText": "名店",
+        "enablePullDownRefresh": false
+      }
+    },{
+      "path": "pages/yuecai/usercenter/index",
+      "style": {
+        "navigationBarTitleText": "我的",
         "enablePullDownRefresh": false
       }
     },
@@ -43,13 +61,28 @@
     "list": [{
       "iconPath": "@iconPath1",
       "selectedIconPath": "@selectedIconPath1",
-      "text": "首页",
+      "text": "专业风采",
       "pagePath": "pages/yuecai/home/index"
     },{
       "iconPath": "@iconPath2",
       "selectedIconPath": "@selectedIconPath2",
-      "text": "菜品详情2",
-      "pagePath": "pages/yuecai/dish/detail"
+      "text": "名菜",
+      "pagePath": "pages/yuecai/dish/index"
+    },{
+      "iconPath": "@iconPath2",
+      "selectedIconPath": "@selectedIconPath2",
+      "text": "名点",
+      "pagePath": "pages/yuecai/location/index"
+    },{
+      "iconPath": "@iconPath2",
+      "selectedIconPath": "@selectedIconPath2",
+      "text": "名店",
+      "pagePath": "pages/yuecai/restaurant/index"
+    },{
+      "iconPath": "@iconPath2",
+      "selectedIconPath": "@selectedIconPath2",
+      "text": "我的",
+      "pagePath": "pages/yuecai/usercenter/index"
     }]
   },
   "darkmode": true,

+ 57 - 0
miniapp/pages/components/btcell.vue

@@ -0,0 +1,57 @@
+<template>
+<view class="c-g-white border-round-10 p-l-r-30">
+	<view v-for="(item,i) in cells" :key="i" class="flex-dir-row flex-x-between flex-y-center p-b-t-30" 
+		@click="nav(item)" :class="i > 0 ? 'k-cell' : ''">
+		<button v-if="item.openType" :open-type="item.openType" class="btcell-btn">
+			<view class="flex-dir-row flex-y-center">
+				<u--image v-if="item.img" :src="'/static/images/icon/' + item.img" width="20px" height="20px"/>
+				<u-icon v-if="item.icon" :name="item.icon" size="20"/>
+				<view class="f-28 lh-28 m-l-20">{{item.text}}</view>
+			</view>
+			<u-icon name="arrow-right" size="20" :color="$u.color['info']"/>
+		</button>
+		<block v-else>
+			<view class="flex-dir-row flex-y-center">
+				<u--image v-if="item.img" :src="'/static/images/icon/' + item.img" width="20px" height="20px"/>
+				<u-icon v-if="item.icon" :name="item.icon" size="20"/>
+				<view class="f-28 lh-28 m-l-20">{{item.text}}</view>
+			</view>
+			<u-icon name="arrow-right" size="20" :color="$u.color['info']"/>
+		</block>
+	</view>
+</view>
+</template>
+
+<script>
+export default {
+	props: {
+		cells: Array,
+	},
+	data() {
+		return {
+		}
+	},
+	methods: {
+		nav(item) {
+			uni.navigateTo({
+				url: item.url,
+			})
+		},
+	},
+}
+</script>
+
+<style scoped lang="scss">
+.k-cell {
+	border-top: 1px solid #f4f4f5;
+}
+.btcell-btn {
+    display: flex;
+    width: 100%;
+    padding: 0;
+    background-color: inherit;
+    justify-content: space-between;
+    align-items: center;
+	color: inherit;
+}
+</style>

+ 43 - 0
miniapp/pages/yuecai/dish/index.vue

@@ -0,0 +1,43 @@
+<template>
+  <page-theme :theme="theme">
+    <template>
+      <view class="f-30 p-40 flex-dir-column flex-x-center">
+        <view class="f-30 p-40 flex-dir-column flex-x-center">
+          <u-swiper :list="list1" @click="click"></u-swiper>
+          <view class="col-info-d t-c m-b-30">其他内容展示</view>
+        </view>
+        <view class="col-info-d t-c m-b-30">搜索框</view>
+        <view class="col-info-d t-c m-b-30">名菜列表</view>
+      </view>
+    </template>
+  </page-theme>
+</template>
+
+<script>
+  import themeMixins from '@/pages/yuecai/mixins/themeMixins.js';
+  export default {
+    mixins: [themeMixins],
+    data() {
+      return {
+        list1: [
+          'https://cdn.uviewui.com/uview/swiper/swiper1.png',
+          'https://cdn.uviewui.com/uview/swiper/swiper2.png',
+          'https://cdn.uviewui.com/uview/swiper/swiper3.png',
+        ]
+      }
+    },
+    methods: {
+      getDishList() {
+        this.$u.api.getDishList().then(res => {
+          //res.data.records
+        })
+      }
+    },
+    onLoad(options) {
+      this.getDishList();
+    },
+  }
+</script>
+
+<style scoped lang="scss">
+</style>

+ 9 - 2
miniapp/pages/yuecai/home/index.vue

@@ -2,7 +2,8 @@
   <page-theme :theme="theme">
     <template>
       <view class="f-30 p-40 flex-dir-column flex-x-center">
-        <view class="col-info-d t-c m-b-30">首页</view>
+        <u-swiper :list="list1" @click="click"></u-swiper>
+        <view class="col-info-d t-c m-b-30">其他内容展示</view>
       </view>
     </template>
   </page-theme>
@@ -13,7 +14,13 @@
   export default {
     mixins: [themeMixins],
     data() {
-      return {}
+      return {
+        list1: [
+          'https://cdn.uviewui.com/uview/swiper/swiper1.png',
+          'https://cdn.uviewui.com/uview/swiper/swiper2.png',
+          'https://cdn.uviewui.com/uview/swiper/swiper3.png',
+        ]
+      }
     },
     methods: {},
     onLoad(options) {},

+ 4 - 11
miniapp/pages/yuecai/dish/detail.vue

@@ -2,7 +2,8 @@
   <page-theme :theme="theme">
     <template>
       <view class="f-30 p-40 flex-dir-column flex-x-center">
-        <view class="col-info-d t-c m-b-30">详情</view>
+        <view class="col-info-d t-c m-b-30">搜索框</view>
+        <view class="col-info-d t-c m-b-30">名点列表</view>
       </view>
     </template>
   </page-theme>
@@ -15,16 +16,8 @@
     data() {
       return {}
     },
-    methods: {
-      getDishList() {
-        this.$u.api.getDishList().then(res=> {
-          //res.data.records
-        })
-      }
-    },
-    onLoad(options) {
-      this.getDishList();
-    },
+    methods: {},
+    onLoad(options) {},
   }
 </script>
 

+ 25 - 0
miniapp/pages/yuecai/restaurant/index.vue

@@ -0,0 +1,25 @@
+<template>
+  <page-theme :theme="theme">
+    <template>
+      <view class="f-30 p-40 flex-dir-column flex-x-center">
+        <view class="col-info-d t-c m-b-30">搜索框</view>
+        <view class="col-info-d t-c m-b-30">名店列表</view>
+      </view>
+    </template>
+  </page-theme>
+</template>
+
+<script>
+  import themeMixins from '@/pages/yuecai/mixins/themeMixins.js';
+  export default {
+    mixins: [themeMixins],
+    data() {
+      return {}
+    },
+    methods: {},
+    onLoad(options) {},
+  }
+</script>
+
+<style scoped lang="scss">
+</style>

+ 125 - 0
miniapp/pages/yuecai/usercenter/index.vue

@@ -0,0 +1,125 @@
+<template>
+	<page-theme :theme="theme">
+		<template>
+			<view class="p-30">
+				<view class="flex-dir-row flex-y-center m-b-20">
+					<u-avatar :src="face" size="60" />
+					<view class="m-l-30">
+						<view class="f-34 t-bold m-b-10">{{nickName}}</view>
+						<u-icon name="arrow-right" size="15" :color="$u.color['info']" @click="toProfile" label="更新个人信息"
+							labelPos="left" labelSize="15" :labelColor="$u.color['info']" />
+					</view>
+				</view>
+				<view v-for="(item,i) in allCells" :key="i" class="m-t-20">
+					<bt-cell :cells="item" />
+				</view>
+				<view class="flex-dir-row flex-x-between m-t-20 f-28">
+					<view class="flex-dir-row flex-x-center flex-y-center p-b-t-20 border-round-10 c-g-white width-100"
+						@click="toLogout">
+						<u--image src="/static/images/logout.png" width="20px" height="20px" />
+						<view class="m-l-10 col-info">退出登录</view>
+					</view>
+				</view>
+				<view class="f-24 col-info-m t-c width-100 m-t-40" @click.stop="clickVersion">当前版本:{{version}}</view>
+			</view>
+		</template>
+	</page-theme>
+</template>
+
+<script>
+	import btCell from '@/pages/components/btcell.vue'
+	import {
+		version
+	} from '@/common/setting'
+	import {
+		clickEvent
+	} from '@/utils/util.js'
+
+	import themeMixins from '../mixins/themeMixins.js';
+	export default {
+		mixins: [themeMixins],
+		components: {
+			btCell 
+		},
+		data() {
+			return {
+				face: '',
+				nickName: '',
+				version: version,
+				allCells: [
+					[{
+						icon: '',
+						text: '名菜收藏',
+						url: '',
+					}, {
+						icon: '',
+						text: '名点收藏',
+						url: '',
+					}, {
+						icon: '',
+						text: '名店收藏',
+						url: '',
+					}],
+					[{
+						icon: '',
+						text: '用户协议',
+						url: './protocol',
+					}, {
+						icon: '',
+						text: '了解隐私保护政策',
+						url: './privacy',
+					}, {
+						icon: '',
+						text: '关于我们',
+						url: './aboutus',
+					}],
+				],
+			}
+		},
+		methods: {
+			toProfile() { //个人信息
+				uni.navigateTo({
+					url: './profile',
+				})
+			},
+			toQuestion() {
+
+			},
+			toService() {
+
+			},
+			toLogout() {
+				this.$u.func.logout()
+			},
+			clickVersion(e) { //点击版本号
+				if (this.userInfo.nick_name == '嘉曦') { //满足条件就支持双击
+					clickEvent(e, null, this.showMeTheMoney)
+				}
+			},
+			showMeTheMoney() { //作弊
+				if (!this.userInfo.isVIP) { //不是VIP,就作弊
+					this.$u.vuex('userInfo.isVIP', true) //给予VIP
+					uni.reLaunch({ //跳回登录页,但是不登出,让tab页重新加载
+						url: '../../index',
+					})
+				}
+			},
+			refresh(face, nickName) {
+				this.face = face
+				this.nickName = nickName
+			},
+		},
+		onLoad() {
+			this.face = this.userInfo.avatar || '/static/images/face.png'
+			this.nickName = this.userInfo.nick_name || '小机灵鬼'
+		},
+		onUnload() {
+		},
+	}
+</script>
+
+<style scoped lang="scss">
+	.k-pink {
+		background-color: #FDEAD2;
+	}
+</style>