This commit is contained in:
Gao xiaosong
2020-03-16 01:40:52 +08:00
parent 397082cdaf
commit e215701560
216 changed files with 11659 additions and 13905 deletions

View File

@ -100,17 +100,6 @@ var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
if (!_vm._isMounted) {
_vm.e0 = function($event) {
return _vm.$yrouter.push({
path: "/pages/shop/GoodsList/index",
query: {
id: _vm.child.id,
title: _vm.child.cateName
}
})
}
}
}
var recyclableRender = false
var staticRenderFns = []
@ -244,10 +233,16 @@ var _utils = __webpack_require__(/*! @/utils */ 18);function _interopRequireDefa
//
//
var _default = { name: "GoodsClass", components: {}, props: {}, data: function data() {return { category: [], navActive: 0, search: "", lock: false };}, watch: { "$yroute.query.id": function $yrouteQueryId(n) {if (n) {this.activeCateId(n);}} }, mounted: function mounted() {// document.addEventListener("scroll", this.onScroll, false);
this.loadCategoryData();}, methods: { activeCateId: function activeCateId(n) {var index = 0;n = parseInt(n);if (!n) return;this.category.forEach(function (cate, i) {if (cate.id === n) index = i;});if (index !== this.navActive) {this.asideTap(index);}}, loadCategoryData: function loadCategoryData() {var _this = this;(0, _store.getCategory)().then(function (res) {_this.category = res.data;_this.$nextTick(function () {if (_this.$yroute.query.id) {_this.activeCateId(_this.$yroute.query.id);}});});}, submitForm: function submitForm() {var _this2 = this;var val = (0, _utils.trim)(this.search);
this.loadCategoryData();}, methods: { goGoodsList: function goGoodsList(child) {this.$yrouter.push({ path: "/pages/shop/GoodsList/index", query: { id: child.id, title: child.cateName } });}, activeCateId: function activeCateId(n) {var index = 0;n = parseInt(n);if (!n) return;this.category.forEach(function (cate, i) {if (cate.id === n) index = i;});if (index !== this.navActive) {this.asideTap(index);}}, loadCategoryData: function loadCategoryData() {var _this = this;(0, _store.getCategory)().then(function (res) {_this.category = res.data;_this.$nextTick(function () {if (_this.$yroute.query.id) {_this.activeCateId(_this.$yroute.query.id);
}
});
});
},
submitForm: function submitForm() {var _this2 = this;
var val = (0, _utils.trim)(this.search);
if (val) {
this.$yrouter.push({
path: "/pages/shop/GoodsList/main",
path: "/pages/shop/GoodsList/index",
query: { s: val } });
setTimeout(function () {return _this2.search = "";}, 500);

View File

@ -1 +1 @@
<view class="productSort _div"><form data-event-opts="{{[['submit',[['submitForm',['$event']]]]]}}" bindsubmit="__e"><view data-ref="header" class="header acea-row row-center-wrapper _div vue-ref"><view class="acea-row row-between-wrapper input _div"><label class="iconfont icon-sousuo _span"></label><input type="text" placeholder="搜索商品信息" data-event-opts="{{[['input',[['__set_model',['','search','$event',[]]]]]]}}" value="{{search}}" bindinput="__e"/></view></view></form><view class="aside _div"><block wx:for="{{category}}" wx:for-item="item" wx:for-index="categoryDivindex" wx:key="categoryDivindex"><view data-event-opts="{{[['tap',[['asideTap',[categoryDivindex]]]]]}}" class="{{['item acea-row row-center-wrapper _div',categoryDivindex===navActive?'on':'']}}" bindtap="__e"><label class="_span">{{item.cateName}}</label></view></block></view><view class="conter _div"><block wx:for="{{category}}" wx:for-item="item" wx:for-index="eq" wx:key="eq"><view class="listw _div"><block wx:if="{{eq===navActive}}"><view class="_div"><view data-ref="title" class="title acea-row row-center-wrapper _div vue-ref-in-for"><view class="line _div"></view><view class="name _div">{{item.cateName}}</view><view class="line _div"></view></view><view class="list acea-row _div"><block wx:for="{{item.children}}" wx:for-item="child" wx:for-index="categoryIndex" wx:key="categoryIndex"><view data-event-opts="{{[['tap',[['e0',['$event']]]]]}}" class="item acea-row row-column row-middle _div" bindtap="__e"><view class="picture _div"><image src="{{child.pic}}" class="_img"></image></view><view class="name line1 _div">{{child.cateName}}</view></view></block></view></view></block></view></block></view><view style="height:100rpx;" class="_div"></view></view>
<view class="productSort _div"><form data-event-opts="{{[['submit',[['submitForm',['$event']]]]]}}" bindsubmit="__e"><view data-ref="header" class="header acea-row row-center-wrapper _div vue-ref"><view class="acea-row row-between-wrapper input _div"><label class="iconfont icon-sousuo _span"></label><input type="text" placeholder="搜索商品信息" data-event-opts="{{[['input',[['__set_model',['','search','$event',[]]]]]]}}" value="{{search}}" bindinput="__e"/></view></view></form><view class="aside _div"><block wx:for="{{category}}" wx:for-item="item" wx:for-index="categoryDivindex" wx:key="categoryDivindex"><view data-event-opts="{{[['tap',[['asideTap',[categoryDivindex]]]]]}}" class="{{['item acea-row row-center-wrapper _div',categoryDivindex===navActive?'on':'']}}" bindtap="__e"><label class="_span">{{item.cateName}}</label></view></block></view><view class="conter _div"><block wx:for="{{category}}" wx:for-item="item" wx:for-index="eq" wx:key="eq"><view class="listw _div"><block wx:if="{{eq===navActive}}"><view class="_div"><view data-ref="title" class="title acea-row row-center-wrapper _div vue-ref-in-for"><view class="line _div"></view><view class="name _div">{{item.cateName}}</view><view class="line _div"></view></view><view class="list acea-row _div"><block wx:for="{{item.children}}" wx:for-item="child" wx:for-index="categoryIndex" wx:key="categoryIndex"><view data-event-opts="{{[['tap',[['goGoodsList',['$0'],[[['category','',eq],['children','',categoryIndex]]]]]]]}}" class="item acea-row row-column row-middle _div" bindtap="__e"><view class="picture _div"><image src="{{child.pic}}" class="_img"></image></view><view class="name line1 _div">{{child.cateName}}</view></view></block></view></view></block></view></block></view><view style="height:100rpx;" class="_div"></view></view>

View File

@ -1,5 +1,5 @@
.productSort{
height:100%
}
.productSort {
height: 100%;
}