Browse Source

H5-点单

panyong 3 years ago
parent
commit
0eb7d16a2f

+ 1 - 1
htmldev/dashboard/src/router/index.js

@@ -113,7 +113,7 @@ const routes = [
   {
     path: '/orderDetail',
     name: 'OrderDetail',
-    component: _import('views/orderDetail/index'),
+    component: _import('views/ordrDetail/index'),
     meta: {
       title: '订单已支付',
       isUseCache: false,

+ 8 - 18
htmldev/dashboard/src/views/sell/goods/index.vue

@@ -54,20 +54,16 @@ import food from '../food/food'
 
 const ERR_OK = 0
 const debug = process.env.NODE_ENV !== 'production'
-const goods = require('../../../mock/data.json')
+const mockDataJson = require('../../../mock/data.json')
 
 export default {
-  props: {
-    seller: {
-      type: Object
-    }
-  },
   data () {
     return {
       goods: [],
       listHeight: [],
       scrollY: 0,
-      selectedFood: {}
+      selectedFood: {},
+      seller: {}
     }
   },
   computed: {
@@ -96,17 +92,11 @@ export default {
   },
   created () {
     this.classMap = ['decrease', 'discount', 'special', 'invoice', 'guarantee']
-
-    const url = 'http://ustbhuangyi.com/sell/api/goods'
-    this.$http.get(url).then((response) => {
-      response = response.body
-      if (response.errno === ERR_OK) {
-        this.goods = response.data
-        this.$nextTick(() => {
-          this._initScroll()
-          this._calculateHeight()
-        })
-      }
+    this.seller = mockDataJson.seller
+    this.goods = mockDataJson.goods
+    this.$nextTick(() => {
+      this._initScroll()
+      this._calculateHeight()
     })
   },
   methods: {