Authored by lea guo

Merge branch 'develop' into promotion/order-list

# Conflicts:
#	apps/pages/home/indexPage/components/tabs.vue
#	apps/pages/list/search.vue
#	apps/pages/order/order-detail/buyer-order-detail.vue
#	apps/pages/order/order-detail/seller-order-detail.vue
#	apps/pages/order/order-list/order-list.vue
#	apps/store/home/channel.js
#	config/home-api-map.js
@@ -381,6 +381,12 @@ export default { @@ -381,6 +381,12 @@ export default {
381 }, 381 },
382 382
383 goSearch() { 383 goSearch() {
  384 + this.$store.dispatch('reportYas', {
  385 + params: {
  386 + param: {SEARCH_POS: 1},
  387 + appop: 'XY_UFO_SEARCH_CLICK'
  388 + }
  389 + });
384 this.$router.push({ 390 this.$router.push({
385 name: 'Search', 391 name: 'Search',
386 }); 392 });
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 <script> 12 <script>
13 13
14 import { createNamespacedHelpers } from 'vuex'; 14 import { createNamespacedHelpers } from 'vuex';
15 -const { mapState } = createNamespacedHelpers('home/channel'); 15 +const { mapState, mapActions } = createNamespacedHelpers('home/channel');
16 import Widget from './widget'; 16 import Widget from './widget';
17 17
18 export default { 18 export default {
@@ -36,12 +36,16 @@ export default { @@ -36,12 +36,16 @@ export default {
36 }, 36 },
37 ...mapState(['showMsg']) 37 ...mapState(['showMsg'])
38 }, 38 },
39 - watch: {  
40 - 'showMsg':function(sss) {  
41 - console.log(sss);  
42 - } 39 + activated() {
  40 + this.getAllInboxCatInfo();
43 }, 41 },
  42 + // watch: {
  43 + // 'showMsg':function(sss) {
  44 + // console.log(sss);
  45 + // }
  46 + // },
44 methods: { 47 methods: {
  48 + ...mapActions(['getAllInboxCatInfo']),
45 onClick(index) { 49 onClick(index) {
46 this.$emit('click', index); 50 this.$emit('click', index);
47 } 51 }
@@ -86,6 +86,7 @@ export default { @@ -86,6 +86,7 @@ export default {
86 goSearch: function(parameters, param) { 86 goSearch: function(parameters, param) {
87 let query = parameters.query; 87 let query = parameters.query;
88 88
  89 + this.addLocalWord(query);
89 this.yasInput(param); 90 this.yasInput(param);
90 this.$router.push({ 91 this.$router.push({
91 name: 'List', 92 name: 'List',
@@ -112,18 +113,19 @@ export default { @@ -112,18 +113,19 @@ export default {
112 this.SEARCH_POS = 3; 113 this.SEARCH_POS = 3;
113 } 114 }
114 }, 115 },
115 - addLocalWord: function() {  
116 - if (this.query) { 116 + addLocalWord: function(query) {
  117 + if (this.query || query) {
  118 + let addQuery = query || this.query;
117 let localHistory = localStorage.getItem('@YohoUFOStore:searchHistory'); 119 let localHistory = localStorage.getItem('@YohoUFOStore:searchHistory');
118 120
119 if (localHistory) { 121 if (localHistory) {
120 let localArr = localHistory.split(','); 122 let localArr = localHistory.split(',');
121 123
122 - if (!localArr.includes(this.query)) {  
123 - localStorage.setItem('@YohoUFOStore:searchHistory', this.query + ',' + localHistory); 124 + if (!localArr.includes(addQuery)) {
  125 + localStorage.setItem('@YohoUFOStore:searchHistory', addQuery + ',' + localHistory);
124 } 126 }
125 } else { 127 } else {
126 - localStorage.setItem('@YohoUFOStore:searchHistory', this.query); 128 + localStorage.setItem('@YohoUFOStore:searchHistory', addQuery);
127 } 129 }
128 } 130 }
129 }, 131 },
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 :emulateMask="true" 8 :emulateMask="true"
9 :full="true"> 9 :full="true">
10 <div class="buy-sheet"> 10 <div class="buy-sheet">
11 - <a class="header" @click.prevent="gotoNewPage">求购<i class="cubeic-question"></i></a> 11 + <a class="header" @click.prevent="gotoNewPage">求购<i class="cubeic-question question"></i></a>
12 <div class="title"> 12 <div class="title">
13 <div class="title-thumbnail"> 13 <div class="title-thumbnail">
14 <square-img :src="imageUrl" :width="300" :height="300"/> 14 <square-img :src="imageUrl" :width="300" :height="300"/>
@@ -187,6 +187,11 @@ export default { @@ -187,6 +187,11 @@ export default {
187 text-align: right; 187 text-align: right;
188 } 188 }
189 189
  190 + .question {
  191 + color: #ccc;
  192 + font-size: 28px;
  193 + }
  194 +
190 .title-thumbnail { 195 .title-thumbnail {
191 width: 200px; 196 width: 200px;
192 height: 200px; 197 height: 200px;
@@ -54,11 +54,10 @@ export default function() { @@ -54,11 +54,10 @@ export default function() {
54 Vue.set(state.channelList, 'page', productlist.page); 54 Vue.set(state.channelList, 'page', productlist.page);
55 }, 55 },
56 [Types.FETCH_NEWSACTIVE](state, { list }) { 56 [Types.FETCH_NEWSACTIVE](state, { list }) {
  57 + state.showMsg = false;
57 list && list.map((item) => { 58 list && list.map((item) => {
58 - if (item.id === 6 && item.unReadCount > 0) { 59 + if (item.unReadCount > 0) {
59 state.showMsg = true; 60 state.showMsg = true;
60 - } else {  
61 - state.showMsg = false;  
62 } 61 }
63 }); 62 });
64 }, 63 },
@@ -88,10 +87,10 @@ export default function() { @@ -88,10 +87,10 @@ export default function() {
88 } 87 }
89 }, 88 },
90 async getAllInboxCatInfo({ commit }) { 89 async getAllInboxCatInfo({ commit }) {
91 - const result = await this.$api.get('/api/ufo/home/getAllInboxCatInfo', {}); 90 + const result = await this.$api.get('/api/ufo/home/listInboxTypeInfo', {});
92 91
93 if (result.code === 200) { 92 if (result.code === 200) {
94 - commit(Types.FETCH_NEWSACTIVE, { list: result.data.list }); 93 + commit(Types.FETCH_NEWSACTIVE, { list: result.data || [] });
95 } 94 }
96 } 95 }
97 }, 96 },
@@ -132,10 +132,10 @@ module.exports = { @@ -132,10 +132,10 @@ module.exports = {
132 api: 'ufo.user.getUserAliPayAccountInfo', 132 api: 'ufo.user.getUserAliPayAccountInfo',
133 param: {} 133 param: {}
134 }, 134 },
135 - '/api/ufo/home/getAllInboxCatInfo': {  
136 - // ufo: true, 135 + '/api/ufo/home/listInboxTypeInfo': {
  136 + ufo: true,
137 auth: true, 137 auth: true,
138 - api: 'app.inbox.getAllInboxCatInfo', 138 + api: 'ufo.users.listInboxTypeInfo',
139 param: {} 139 param: {}
140 }, 140 },
141 }; 141 };