Bladeren bron

添加菜系相关

lijj 2 jaren geleden
bovenliggende
commit
24d54ad936

+ 6 - 6
miniapp/api/location.js

@@ -7,9 +7,9 @@ import {
   tenantId
 } from '@/common/setting'
 
-const getLocationList = (current, size, vo) => {
+const getSnacksList = (current, size, vo) => {
   return http.request({
-    url: bizConst.basicPrefix + '/famous_location/list',
+    url: bizConst.basicPrefix + '/famous_snacks/list',
     method: 'GET',
     header: {
       'Tenant-Id': tenantId
@@ -22,9 +22,9 @@ const getLocationList = (current, size, vo) => {
   })
 }
 
-const getLocationDetail = (id) => {
+const getSnacksDetail = (id) => {
   return http.request({
-    url: bizConst.basicPrefix + '/famous_location/detail',
+    url: bizConst.basicPrefix + '/famous_snacks/detail',
     method: 'GET',
     header: {
       'Tenant-Id': tenantId
@@ -35,6 +35,6 @@ const getLocationDetail = (id) => {
   })
 }
 export default {
-  getLocationList,
-  getLocationDetail
+  getSnacksList,
+  getSnacksDetail
 }

+ 2 - 2
miniapp/pages.json

@@ -42,13 +42,13 @@
         "enablePullDownRefresh": false
       }
     }, {
-      "path": "pages/yuecai/location/index",
+      "path": "pages/yuecai/snacks/index",
       "style": {
         "navigationBarTitleText": "名点",
         "enablePullDownRefresh": false
       }
     }, {
-      "path": "pages/yuecai/location/detail/index",
+      "path": "pages/yuecai/snacks/detail/index",
       "style": {
         "navigationBarTitleText": "名点详情",
         "enablePullDownRefresh": false

+ 2 - 2
miniapp/pages/yuecai/collection/index.vue

@@ -87,9 +87,9 @@
           uni.navigateTo({
             url: "/pages/yuecai/dish/detail/index?id=" + id,
           })
-        } else if (this.collectionType == 'location') {
+        } else if (this.collectionType == 'snacks') {
           uni.navigateTo({
-            url: "/pages/yuecai/location/detail/index?id=" + id,
+            url: "/pages/yuecai/snacks/detail/index?id=" + id,
           })
         } else if (this.collectionType == 'restaurant') {
           uni.navigateTo({

+ 3 - 3
miniapp/pages/yuecai/location/detail/index.vue

@@ -19,8 +19,8 @@
       }
     },
     methods: {
-      getLocationDetail() {
-        this.$u.api.getLocationDetail().then(res => {
+      getSnacksDetail() {
+        this.$u.api.getSnacksDetail().then(res => {
           if (res.data.content) {
             res.data.content = decodeURIComponent(res.data.content);
           }
@@ -29,7 +29,7 @@
       }
     },
     onLoad(options) {
-      this.getLocationDetail(options.id);
+      this.getSnacksDetail(options.id);
     },
   }
 </script>

+ 5 - 5
miniapp/pages/yuecai/location/index.vue

@@ -51,15 +51,15 @@
       },
       loadmore() {
         this.page.current++;
-        this.getLocationList();
+        this.getSnacksList();
       },
       doRefresh() {
         this.page.current = 1;
         this.page.status = 'loadmore'
         this.list = [];
-        this.getLocationList();
+        this.getSnacksList();
       },
-      getLocationList() {
+      getSnacksList() {
 
         if (this.page.status == 'loading' || this.page.status == 'nomore') {
           // 防止重复下拉
@@ -67,7 +67,7 @@
         }
         this.page.status = 'loading';
         //
-        this.$u.api.getLocationList(this.page.current, this.page.size, {
+        this.$u.api.getSnacksList(this.page.current, this.page.size, {
           name: this.keyword || ''
         }).then(res => {
           if (res.data.records && res.data.records.length > 0) {
@@ -83,7 +83,7 @@
       },
       toDetail(id) {
         uni.navigateTo({
-          url: "/pages/yuecai/location/detail/index?id=" + id,
+          url: "/pages/yuecai/snacks/detail/index?id=" + id,
         })
       }
     },

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

@@ -54,7 +54,7 @@
 					}, {
 						icon: '',
 						text: '名点收藏',
-						url: '/pages/yuecai/collection/index?type=location',
+						url: '/pages/yuecai/collection/index?type=snacks',
 					}, {
 						icon: '',
 						text: '名店收藏',