浏览代码

commit - 首页调整

zhengjinyi 2 年之前
父节点
当前提交
f2950a53d5
共有 6 个文件被更改,包括 14 次插入38 次删除
  1. 2 5
      mixins/jumpMixins.js
  2. 1 1
      pages.json
  3. 0 0
      pages/goods/components/cm-special.vue
  4. 11 16
      pages/goods/good-activity.vue
  5. 0 13
      services/activity.service.js
  6. 0 3
      services/index.js

+ 2 - 5
mixins/jumpMixins.js

@@ -3,10 +3,7 @@
 import Vue from 'vue'
 import Vue from 'vue'
 const jumpMixins = {
 const jumpMixins = {
     computed: {
     computed: {
-        jumpMap:{
-            1:'/pages/goods/product',
-            2:'/pages/goods/product'
-        }
+        
     },
     },
     methods: {
     methods: {
         handleJumpLink(jump) {
         handleJumpLink(jump) {
@@ -15,7 +12,7 @@ const jumpMixins = {
                 this.$api.navigateTo(`/pages/goods/product?id=${jump.jumpProductId}`)
                 this.$api.navigateTo(`/pages/goods/product?id=${jump.jumpProductId}`)
                 break
                 break
 			   case 2://活动列表
 			   case 2://活动列表
-                this.$api.navigateTo(`/pages/goods/product?jumpActiveId=${jump.jumpActiveId}`)
+                this.$api.navigateTo(`/pages/goods/good-activity?jumpActiveId=${jump.jumpActiveId}`)
                 break
                 break
 				
 				
 		   }
 		   }

+ 1 - 1
pages.json

@@ -83,7 +83,7 @@
 						"enablePullDownRefresh": true
 						"enablePullDownRefresh": true
 					}
 					}
 				}, {
 				}, {
-					"path": "commonStoreIndex/index",
+					"path": "good-activity",
 					"style": {
 					"style": {
 						"navigationBarTitleText": "专题活动",
 						"navigationBarTitleText": "专题活动",
 						"enablePullDownRefresh": true
 						"enablePullDownRefresh": true

+ 0 - 0
pages/goods/commonStoreIndex/components/special.vue → pages/goods/components/cm-special.vue


+ 11 - 16
pages/goods/commonStoreIndex/index.vue → pages/goods/good-activity.vue

@@ -19,7 +19,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
-    import SpecialItem from './components/special.vue'
+    import SpecialItem from './components/cm-special.vue'
     export default {
     export default {
         components: {
         components: {
             SpecialItem
             SpecialItem
@@ -33,24 +33,19 @@
         },
         },
         mounted() {},
         mounted() {},
         onLoad(options) {
         onLoad(options) {
-            this.network().SpecialService(options)
+            this.specialInfo(options.jumpActiveId)
         },
         },
         methods: {
         methods: {
             // 网络请求
             // 网络请求
-            network() {
-                return {
-                    SpecialService: async (options) => {
-                        try {
-                            const data = await this.SpecialService.specialInfo(options)
-                            if (data.code === 0) {
-                                this.specialList = data.data
-                                this.skeletonShow = false
-                            }
-                        } catch(e) {
-                        }
-                    }
-                }
-            }
+			async specialInfo(id){
+				try{
+					const res = await this.SpecialService.specialInfo({organizeId:1,id:id})
+					this.specialList = res.data
+					this.skeletonShow = false
+				}catch(error){
+					console.log('error',error)
+				}
+			}
         }
         }
     }
     }
 </script>
 </script>

+ 0 - 13
services/activity.service.js

@@ -1,13 +0,0 @@
-/**
- * 这是活动页相关的业务逻辑的服务
- */
-export default class ActivityService {
-	constructor(AjaxService) {
-		Object.assign(this, { AjaxService })
-		this.name = 'ActivityService'
-	}
-	/* 小程序支付-活动接口 */
-	GetRepeatActivityBrandList (data = {}) {
-		return this.AjaxService.get({ url:'/repeat/activityProduct', data, isLoading: true })
-	}
-}

+ 0 - 3
services/index.js

@@ -5,7 +5,6 @@ import CommonService from './common.service'
 import UserService from './user.service'
 import UserService from './user.service'
 import ProductService from './product.service'
 import ProductService from './product.service'
 import PayService from './pay.service'
 import PayService from './pay.service'
-import ActivityService from './activity.service'
 import OrderService from './order.service'
 import OrderService from './order.service'
 import PublicService from './public.service.js'
 import PublicService from './public.service.js'
 import UploadService from './upload.service.js'
 import UploadService from './upload.service.js'
@@ -15,7 +14,6 @@ let commonService = new CommonService(ajaxService)
 let userService = new UserService(ajaxService)
 let userService = new UserService(ajaxService)
 let productService = new ProductService(ajaxService)
 let productService = new ProductService(ajaxService)
 let payService = new PayService(ajaxService)
 let payService = new PayService(ajaxService)
-let activityService = new ActivityService(ajaxService)
 let orderService = new OrderService(ajaxService)
 let orderService = new OrderService(ajaxService)
 let publicService = new PublicService(ajaxService)
 let publicService = new PublicService(ajaxService)
 let uploadService = new UploadService(ajaxService)
 let uploadService = new UploadService(ajaxService)
@@ -26,7 +24,6 @@ Vue.prototype.CommonService = commonService
 Vue.prototype.UserService = userService
 Vue.prototype.UserService = userService
 Vue.prototype.ProductService = productService
 Vue.prototype.ProductService = productService
 Vue.prototype.PayService = payService
 Vue.prototype.PayService = payService
-Vue.prototype.ActivityService = activityService
 Vue.prototype.OrderService = orderService
 Vue.prototype.OrderService = orderService
 Vue.prototype.PublicService = publicService
 Vue.prototype.PublicService = publicService
 Vue.prototype.UploadService = uploadService
 Vue.prototype.UploadService = uploadService