huanggang 7 years ago
parent
commit
16fb92319b

+ 3 - 0
src/components/blocks/block_list.vue

@@ -162,6 +162,9 @@
                         backgroundColor: "#f9f9f9"
                     }
                 }, [loadMore]);
+                if(_self.proxy.specialList[0] == null) {
+                    return <div style={{background:'#F7F7F7'}}><LoadMore showLoading = {false} tip="暂无数据" backgroundColor="#F7F7F7"></LoadMore></div>
+                }
                 _self.proxy.specialList.map(function (special) {
                     let comp = BlockUtil.createBlockComp(createElement, special, _self.proxy);
                     if (comp) {

+ 10 - 16
src/components/blocks/util/blockUtil.js

@@ -20,9 +20,9 @@ import HomeGrid from '../HomeGrid.vue'
 import Brand from '../brand.vue'
 import FCode from '../fcode.vue'
 import GoodsTop from '../goods_top.vue'
-import {LoadMore} from 'vux'
 class BlockUtil {
     static createBlockComp(createElement, special, proxy) {
+        console.log(special);
         let comp;
         let params = {
             props: {
@@ -62,16 +62,12 @@ class BlockUtil {
                 case "home_grid":
                     comp = createElement(HomeGrid, params);
                     break;
+                default:
+                    comp = createElement('div', '类型:'+special['item_type']+'找不到');
+                    break;
             }
         } catch (e) {
-            // comp = createElement('div', '<p>创建失败</p>');
-            comp = createElement(LoadMore, {
-                props: {
-                    showLoading:false,
-                    tip: "暂无数据",
-                    backgroundColor: "#F7F7F7"
-                }
-            });
+            comp = createElement('div', '创建失败:'+e);
         }
         return comp;
     }
@@ -117,16 +113,14 @@ class BlockUtil {
                     break;
                 case "goods_top":
                     comp = createElement(GoodsTop,params);
+                    break;
+                default:
+                    comp = createElement('div', '类型:'+special['item_type']+'找不到');
+                    break;
             }
         } catch (e) {
             // comp = createElement('div', '<p>创建失败</p>');
-            comp = createElement(LoadMore, {
-                props: {
-                    showLoading:false,
-                    tip: "暂无数据",
-                    backgroundColor: "#F7F7F7"
-                }
-            });
+            comp = createElement('div', '创建失败:'+e);
         }
         return comp;
     }

+ 3 - 3
src/components/order/list/OrderList.vue

@@ -28,7 +28,7 @@
                 let _self = this;
                 this.$store.commit('updateLoadingStatus', {isLoading: true});
                 this.$http.jsonp(Api.orderList() + '&curpage=' + this.curpage, {params: {state_type: _self.getParamState(_self.page.state)}}, {_timeout: 5000}).then(function (res) {
-                    this.$store.commit('updateLoadingStatus', {isLoading: false});
+                    _self.$store.commit('updateLoadingStatus', {isLoading: false});
                     if (res.body.code != 200) {
                         this.$vux.toast.show({
                             type: 'text',
@@ -150,7 +150,7 @@
                             return;
                         }
                         _self.$store.commit("updateOrderState", {action: res.body.datas, action_id: new Date()});
-                        this.$store.commit('updateLoadingStatus', {isLoading: false});
+                        _self.$store.commit('updateLoadingStatus', {isLoading: false});
                     }, (err) => {
                         this.$vux.toast.show({
                             type: 'text',
@@ -179,7 +179,7 @@
                             return;
                         }
                         _self.$store.commit("updateOrderState", {action: res.body.datas, action_id: new Date()});
-                        this.$store.commit('updateLoadingStatus', {isLoading: false});
+                        _self.$store.commit('updateLoadingStatus', {isLoading: false});
                     }, (err) => {
                         this.$vux.toast.show({
                             type: 'text',

+ 1 - 0
src/components/order/list/OrderTabs.vue

@@ -64,4 +64,5 @@
         background: #f9f9f9;
     }
 
+
 </style>

+ 10 - 1
src/components/other/search.vue

@@ -79,6 +79,10 @@
                     results: this.results
                 },
 
+                'class':{
+                    'searchLabel':true
+                },
+
                 on: {
                     'on-change': this.change,
                     "on-result-click": this.go,
@@ -99,4 +103,9 @@
         }
 
     }
-</script>
+</script>
+<style>
+    .searchLabel .weui-search-bar__label {
+        top: 6px;
+    }
+</style>