Authored by 邱骏

Merge branch 'develop' of http://git.yoho.cn/fe/xianyu-ufo-app-web into develop

@@ -113,8 +113,10 @@ export default { @@ -113,8 +113,10 @@ export default {
113 beforeRouteEnter(to, from, next) { 113 beforeRouteEnter(to, from, next) {
114 next(vm => { 114 next(vm => {
115 // 通过 `vm` 访问组件实例 115 // 通过 `vm` 访问组件实例
116 - vm.query = from.query;  
117 - vm.pageName = from.name; 116 + if (from.name !== "addressEdit") {
  117 + vm.query = from.query;
  118 + vm.pageName = from.name;
  119 + }
118 }); 120 });
119 } 121 }
120 }; 122 };
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <div class="scroll-list-wrap"> 3 <div class="scroll-list-wrap">
4 <template v-if="isShow"> 4 <template v-if="isShow">
5 <div v-for="(item, index) in channelList.list" v-if="item.template_name == 'guessLike'"> 5 <div v-for="(item, index) in channelList.list" v-if="item.template_name == 'guessLike'">
6 - <ScrollNav :list="item.data.list" :current="active"></ScrollNav> 6 + <ScrollNav :list="item.data" :current="active"></ScrollNav>
7 </div> 7 </div>
8 </template> 8 </template>
9 <Scroll 9 <Scroll
@@ -18,12 +18,12 @@ @@ -18,12 +18,12 @@
18 <div class="marginTop"> 18 <div class="marginTop">
19 <div v-for="(item, index) in channelList.list" :key="index" class="space-between"> 19 <div v-for="(item, index) in channelList.list" :key="index" class="space-between">
20 <Swiper :list="item.data" v-if="item.template_name == 'threePicture'"/> 20 <Swiper :list="item.data" v-if="item.template_name == 'threePicture'"/>
21 - <Hot :list="item.data.list" v-if="item.template_name == 'image_list'"/> 21 + <Hot :list="item.data" v-if="item.template_name == 'image_list'"/>
22 <Banner :list="item.data" v-if="item.template_name == 'single_image'"/> 22 <Banner :list="item.data" v-if="item.template_name == 'single_image'"/>
23 <TwoBanner :list="item.data" v-if="item.template_name == 'twoPicture'"/> 23 <TwoBanner :list="item.data" v-if="item.template_name == 'twoPicture'"/>
24 <template v-if="!isShow"> 24 <template v-if="!isShow">
25 <div ref="sss" v-if="item.template_name == 'guessLike'"> 25 <div ref="sss" v-if="item.template_name == 'guessLike'">
26 - <ScrollNav :list="item.data.list" :current="active" @transfer="getIndex"></ScrollNav> 26 + <ScrollNav :list="item.data" :current="active" @transfer="getIndex"></ScrollNav>
27 </div> 27 </div>
28 </template> 28 </template>
29 </div> 29 </div>
@@ -41,6 +41,7 @@ @@ -41,6 +41,7 @@
41 <script> 41 <script>
42 import { Style, Scroll, Sticky } from 'cube-ui'; 42 import { Style, Scroll, Sticky } from 'cube-ui';
43 import { createNamespacedHelpers } from 'vuex'; 43 import { createNamespacedHelpers } from 'vuex';
  44 +import queryString from 'query-string';
44 import Swiper from './components/swiper'; 45 import Swiper from './components/swiper';
45 import Banner from './components/banner'; 46 import Banner from './components/banner';
46 import TwoBanner from './components/twoBanner'; 47 import TwoBanner from './components/twoBanner';
@@ -71,6 +72,9 @@ export default { @@ -71,6 +72,9 @@ export default {
71 total: 0, 72 total: 0,
72 marginTop: 0, 73 marginTop: 0,
73 active: 0, 74 active: 0,
  75 + params: {
  76 + isHome: true,
  77 + }
74 }; 78 };
75 }, 79 },
76 computed: { 80 computed: {
@@ -78,17 +82,22 @@ export default { @@ -78,17 +82,22 @@ export default {
78 ...mapStateList(['productList']), 82 ...mapStateList(['productList']),
79 }, 83 },
80 mounted() { 84 mounted() {
81 - const params = {  
82 - isPage: true,  
83 - isHome: true,  
84 - }  
85 this.fetchChannelList().then((res) => { 85 this.fetchChannelList().then((res) => {
  86 + console.log(res);
86 let windowH = document.documentElement.clientHeight || document.body.clientHeight; 87 let windowH = document.documentElement.clientHeight || document.body.clientHeight;
87 this.navTop = this.$refs.sss[0].offsetTop; 88 this.navTop = this.$refs.sss[0].offsetTop;
88 this.navHeight = this.$refs.sss[0].offsetHeight; 89 this.navHeight = this.$refs.sss[0].offsetHeight;
89 this.total = windowH - this.navHeight; 90 this.total = windowH - this.navHeight;
  91 + res.forEach((item) => {
  92 + if (item.template_name == "guessLike") {
  93 + let url = item.data[0].url.split("?");
  94 + this.params = queryString.parse(url[1]);
  95 + }
  96 + })
  97 + this.fetchProductList(this.params);
90 }); 98 });
91 - this.fetchProductList(params); 99 +
  100 +
92 }, 101 },
93 created() { 102 created() {
94 103
@@ -101,22 +110,15 @@ export default { @@ -101,22 +110,15 @@ export default {
101 let scrollY = Math.abs(parseInt(y)); 110 let scrollY = Math.abs(parseInt(y));
102 if (scrollY >= this.navTop) { 111 if (scrollY >= this.navTop) {
103 this.isShow = true; 112 this.isShow = true;
104 - this.marginTop = 0;  
105 } else { 113 } else {
106 this.isShow = false; 114 this.isShow = false;
107 - this.marginTop = '30px';  
108 } 115 }
109 - // this.scrollY = -y  
110 }, 116 },
111 ...mapActions(['fetchChannelList']), 117 ...mapActions(['fetchChannelList']),
112 ...mapActionsList(['fetchProductList']), 118 ...mapActionsList(['fetchProductList']),
113 async onPullingUp() { 119 async onPullingUp() {
114 - const params = {  
115 - isReset: false,  
116 - isHome: true,  
117 - };  
118 - await this.fetchProductList(params);  
119 - this.$refs.scroll.forceUpdate(); 120 + this.params.isReset = false
  121 + await this.fetchProductList(this.params);
120 } 122 }
121 }, 123 },
122 components: { 124 components: {
@@ -198,6 +200,6 @@ export default { @@ -198,6 +200,6 @@ export default {
198 z-index: 999; 200 z-index: 999;
199 } 201 }
200 .marginTop { 202 .marginTop {
201 - margin-top: 64px; 203 + // margin-top: 64px;
202 } 204 }
203 </style> 205 </style>
1 <template> 1 <template>
2 <div class="banner" v-if="list.length > 0"> 2 <div class="banner" v-if="list.length > 0">
3 <ul> 3 <ul>
4 - <li v-for="(item, index) in list" :key="index" @click="jump(item)">  
5 - <ImageFormat :data-secc="item.src" :lazy="false" :src="item.src" :alt="item.alt" :width="item.width || 750" :height="item.height || 160" /> 4 + <li v-for="(item, index) in list" :key="index">
  5 + <LayoutLink :href="item.url">
  6 + <ImageFormat :data-secc="item.src" :lazy="false" :src="item.src" :alt="item.alt" :width="item.width || 750" :height="item.height || 160" />
  7 + </LayoutLink>
6 </li> 8 </li>
7 </ul> 9 </ul>
8 </div> 10 </div>
@@ -18,11 +20,7 @@ export default { @@ -18,11 +20,7 @@ export default {
18 }, 20 },
19 }, 21 },
20 methods: { 22 methods: {
21 - jump(item) {  
22 - const { src, url } = item;  
23 - console.log(src);  
24 - console.log(url);  
25 - } 23 +
26 } 24 }
27 }; 25 };
28 </script> 26 </script>
1 <template> 1 <template>
2 <div class="ScrollNav" v-if="labels.length > 0"> 2 <div class="ScrollNav" v-if="labels.length > 0">
3 - <ScrollNavBar :current="this.list[current].tab_name" :labels="labels" @change="changeHandler"> 3 + <ScrollNavBar :current="this.list[current].title" :labels="labels" @change="changeHandler">
4 <span slot-scope="props"> 4 <span slot-scope="props">
5 {{props.txt}} 5 {{props.txt}}
6 <span :ref="`getindex${props.txt}`" v-show="false">{{props.index}}</span> 6 <span :ref="`getindex${props.txt}`" v-show="false">{{props.index}}</span>
@@ -13,6 +13,8 @@ @@ -13,6 +13,8 @@
13 import Vue from 'vue' 13 import Vue from 'vue'
14 import { Style, ScrollNavBar } from 'cube-ui'; 14 import { Style, ScrollNavBar } from 'cube-ui';
15 import { createNamespacedHelpers } from 'vuex'; 15 import { createNamespacedHelpers } from 'vuex';
  16 +import queryString from 'query-string';
  17 +
16 // const { mapState, mapActions } = createNamespacedHelpers('list/channel'); 18 // const { mapState, mapActions } = createNamespacedHelpers('list/channel');
17 const {mapState, mapActions} = createNamespacedHelpers('list'); 19 const {mapState, mapActions} = createNamespacedHelpers('list');
18 20
@@ -31,7 +33,7 @@ export default { @@ -31,7 +33,7 @@ export default {
31 data() { 33 data() {
32 return { 34 return {
33 index: 0, 35 index: 0,
34 - // current: this.list[0].tab_name, 36 + // current: this.list[0].title,
35 labels: [], 37 labels: [],
36 } 38 }
37 }, 39 },
@@ -43,7 +45,7 @@ export default { @@ -43,7 +45,7 @@ export default {
43 ...mapState(['productList']), 45 ...mapState(['productList']),
44 }, 46 },
45 mounted() { 47 mounted() {
46 - this.list.map((res) => { this.labels.push(res.tab_name) }); 48 + this.list.map((res) => { this.labels.push(res.title) });
47 }, 49 },
48 created() { 50 created() {
49 51
@@ -52,11 +54,13 @@ export default { @@ -52,11 +54,13 @@ export default {
52 ...mapActions(['fetchProductList']), 54 ...mapActions(['fetchProductList']),
53 changeHandler(cur) { 55 changeHandler(cur) {
54 let index = this.$refs[`getindex${cur}`].innerText; 56 let index = this.$refs[`getindex${cur}`].innerText;
55 - let query = this.list[index].query  
56 - let params = Object.assign({},...query);  
57 - params.isReset = true; delete params.method; 57 + let url = this.list[index].url.split("?");
  58 + let urlParams = queryString.parse(url[1]);
  59 + let params = urlParams;
  60 + params.isReset = true;
58 this.fetchProductList(params); 61 this.fetchProductList(params);
59 this.$emit('transfer',index); 62 this.$emit('transfer',index);
  63 + console.log(params)
60 } 64 }
61 } 65 }
62 }; 66 };
1 <template> 1 <template>
2 <div class="swiper"> 2 <div class="swiper">
3 <div class="swiper-item swiper-item-left"> 3 <div class="swiper-item swiper-item-left">
4 - <a :href="list[0].url"> 4 + <LayoutLink :href="list[0].url">
5 <ImageFormat @click="clickHandler(item, index)" :lazy="false" class="item-imge" :src="list[0].src" :width="310" :height="402"></ImageFormat> 5 <ImageFormat @click="clickHandler(item, index)" :lazy="false" class="item-imge" :src="list[0].src" :width="310" :height="402"></ImageFormat>
6 - </a> 6 + </LayoutLink>
7 </div> 7 </div>
8 <div class="swiper-item swiper-item-right"> 8 <div class="swiper-item swiper-item-right">
9 - <a :href="list[1].url"> 9 + <LayoutLink :href="list[1].url">
10 <ImageFormat @click="clickHandler(item, index)" :lazy="false" class="item-imge" :src="list[1].src" :width="380" :height="196"></ImageFormat> 10 <ImageFormat @click="clickHandler(item, index)" :lazy="false" class="item-imge" :src="list[1].src" :width="380" :height="196"></ImageFormat>
11 - </a>  
12 - <a :href="list[2].url"> 11 + </LayoutLink>
  12 + <LayoutLink :href="list[2].url">
13 <ImageFormat style="margin-top: 4px" @click="clickHandler(item, index)" :lazy="false" class="item-imge" :src="list[2].src" :width="380" :height="196"></ImageFormat> 13 <ImageFormat style="margin-top: 4px" @click="clickHandler(item, index)" :lazy="false" class="item-imge" :src="list[2].src" :width="380" :height="196"></ImageFormat>
14 - </a> 14 + </LayoutLink>
15 </div> 15 </div>
16 </div> 16 </div>
17 </template> 17 </template>
@@ -2,9 +2,9 @@ @@ -2,9 +2,9 @@
2 <div class="twoBanner" v-if="list.length > 0"> 2 <div class="twoBanner" v-if="list.length > 0">
3 <ul> 3 <ul>
4 <li v-for="(item, index) in list" :key="index"> 4 <li v-for="(item, index) in list" :key="index">
5 - <a :href="item.url"> 5 + <LayoutLink :href="item.url">
6 <ImageFormat :lazy="false" :src="item.src" :alt="item.alt" :width="344" :height="160" /> 6 <ImageFormat :lazy="false" :src="item.src" :alt="item.alt" :width="344" :height="160" />
7 - </a> 7 + </LayoutLink>
8 </li> 8 </li>
9 </ul> 9 </ul>
10 </div> 10 </div>
1 <template> 1 <template>
2 - 2 + <LayoutApp>
  3 + <div class="tab">
  4 + <div class="item right-line" :class="type ==='unused' ? 'item-selected' : 'item-default'"
  5 + @click="onChangeList('unused')">未使用{{unused.length && '('+ unused.length + ')'}}
  6 + </div>
  7 + <div class="item right-line" :class="type ==='used' ? 'item-selected' : 'item-default'"
  8 + @click="onChangeList('used')">已使用{{used.length && '('+ used.length + ')'}}
  9 + </div>
  10 + <div class="item" :class="type ==='overtime' ? 'item-selected' : 'item-default'"
  11 + @click="onChangeList('overtime')">已失效{{overtime.length && '('+ overtime.length + ')'}}
  12 + </div>
  13 + </div>
  14 + <Scroll class="coupon-list"
  15 + :options="scrollOptions"
  16 + :data="list"
  17 + @pulling-up="onPullingUp">
  18 + <div class="item" v-for="(item,index) in list">
  19 + <div :class="type === 'unused' ? 'item-bg' : 'item-gray-bg'">
  20 + <div class="item-left">
  21 + <div class="item-price" :class="type !== 'unused' && 'gray'">{{item.coupon_value}}</div>
  22 + <div class="item-rule" v-if="item.use_rule" :class="type !== 'unused' && 'gray'">{{item.use_rule}}</div>
  23 + </div>
  24 + <div class="item-right">
  25 + <div class="item-name" :class="type !== 'unused' && 'gray'">
  26 + <span class="item-type" :class="type !== 'unused' && 'gray'">[{{item.coupon_type_name}}]</span>
  27 + {{item.coupon_name}}
  28 + </div>
  29 + <div class="item-time" :class="type !== 'unused' && 'gray'">{{item.coupon_validity}}</div>
  30 + <div class="item-desc-btn" :class="type !== 'unused' && 'gray'">使用说明</div>
  31 + <div class="time-up" v-if="item.is_expired_soon === 'Y'"></div>
  32 + <div class="item-used-flag" v-if="type === 'used'"></div>
  33 + <div class="item-overtime-flag" v-if="type === 'overtime'"></div>
  34 + </div>
  35 + </div>
  36 + </div>
  37 + </Scroll>
  38 + </LayoutApp>
3 </template> 39 </template>
4 40
5 <script> 41 <script>
6 - export default {  
7 - name: "list"  
8 - } 42 +
  43 +import {Scroll} from 'cube-ui';
  44 +import {createNamespacedHelpers} from 'vuex';
  45 +
  46 +const {mapState, mapActions} = createNamespacedHelpers('home/coupon');
  47 +
  48 +export default {
  49 + name: 'Coupon',
  50 + components: {Scroll},
  51 + activated: function() {
  52 + this.fetchCouponList({type: 'unused', isReset: true}).then(r => {
  53 + this.list = r;
  54 + });
  55 + this.fetchCouponList({type: 'used', isReset: true});
  56 + this.fetchCouponList({type: 'overtime', isReset: true});
  57 + },
  58 + data() {
  59 + return {
  60 + scrollOptions: {
  61 + bounce: {
  62 + top: false
  63 + },
  64 + pullUpLoad: true
  65 + },
  66 + type: 'unused',
  67 + list: []
  68 + };
  69 + },
  70 + methods: {
  71 + ...mapActions(['fetchCouponList']),
  72 +
  73 + onChangeList(type) {
  74 + // 切换tab
  75 + this.type = type;
  76 +
  77 + // 切换list
  78 + this.list = this[type].list;
  79 + },
  80 +
  81 + async onPullingUp() {
  82 + this.list = await this.fetchCouponList({type: this.type});
  83 + },
  84 +
  85 + },
  86 + computed: {
  87 + ...mapState(['unused', 'used', 'overtime']),
  88 + },
  89 +};
9 </script> 90 </script>
10 91
11 -<style scoped> 92 +<style lang="scss" scoped>
  93 + .tab {
  94 + display: flex;
  95 + width: 100%;
  96 + height: 88px;
  97 + padding: 14px 0;
  98 + align-items: center;
  99 +
  100 + .item {
  101 + font-size: 28px;
  102 + flex: 1;
  103 + height: 60px;
  104 + text-align: center;
  105 + line-height: 60px;
  106 + }
  107 +
  108 + .right-line {
  109 + border-left: 1px solid #E0E0E0;
  110 + }
  111 +
  112 + .item-default {
  113 + color: #B0B0B0;
  114 + }
  115 +
  116 + .item-selected {
  117 + color: #444444;
  118 + }
  119 + }
  120 +
  121 + .coupon-list {
  122 + background: #f5f5f5;
  123 +
  124 + .item {
  125 + width: 100%;
  126 + margin-top: 20px;
  127 + }
  128 +
  129 + .item-bg {
  130 + background: url(~statics/image/coupon/bg@3x.png) no-repeat;
  131 + width: 710px;
  132 + height: 200px;
  133 + background-size: cover;
  134 + margin: 0 auto;
  135 + display: flex;
  136 + position: relative;
  137 + }
  138 +
  139 + .item-left {
  140 + width: 230px;
  141 + display: flex;
  142 + flex-direction: column;
  143 + align-items: center;
  144 + justify-content: center;
  145 +
  146 + .item-price {
  147 + font-size: 72px;
  148 + color: #002B47;
  149 + }
  150 +
  151 + .item-rule {
  152 + font-size: 24px;
  153 + margin-top: 4px;
  154 + color: #002B47;
  155 + }
  156 + }
  157 +
  158 + .item-right {
  159 + margin-left: 6px;
  160 +
  161 + .item-name {
  162 + font-size: 24px;
  163 + color: #222;
  164 + margin-top: 22px;
  165 + }
  166 +
  167 + .item-type {
  168 + color: #002B47;
  169 + }
12 170
  171 + .item-time {
  172 + margin-top: 36px;
  173 + font-size: 22px;
  174 + color: #999;
  175 + }
  176 +
  177 + .item-desc-btn{
  178 + margin-top: 26px;
  179 + font-size: 22px;
  180 + color: #999;
  181 + }
  182 +
  183 + .time-up {
  184 + background: url(~statics/image/coupon/time-up@3x.png) no-repeat;
  185 + background-size: cover;
  186 + position: absolute;
  187 + top: 0;
  188 + right: 0;
  189 + width: 80px;
  190 + height: 80px;
  191 + }
  192 +
  193 + .item-used-flag {
  194 + background: url(~statics/image/coupon/used@3x.png) no-repeat;
  195 + background-size: cover;
  196 + position: absolute;
  197 + right: 30px;
  198 + width: 130px;
  199 + height: 130px;
  200 + top: 30px;
  201 + }
  202 +
  203 + .item-overtime-flag {
  204 + background: url(~statics/image/coupon/overtime@3x.png) no-repeat;
  205 + background-size: cover;
  206 + position: absolute;
  207 + right: 30px;
  208 + width: 130px;
  209 + height: 130px;
  210 + top: 30px;
  211 + }
  212 + }
  213 +
  214 + .gray {
  215 + color: #ccc;
  216 + }
  217 +
  218 + .item-gray-bg {
  219 + background: url(~statics/image/coupon/bg-gray@3x.png) no-repeat;
  220 + width: 710px;
  221 + height: 200px;
  222 + background-size: cover;
  223 + margin: 0 auto;
  224 + display: flex;
  225 + position: relative;
  226 + }
  227 + }
13 </style> 228 </style>
@@ -3,6 +3,7 @@ import Trade from './tradeIncome'; @@ -3,6 +3,7 @@ import Trade from './tradeIncome';
3 import Favorite from './favorite'; 3 import Favorite from './favorite';
4 import news from './news'; 4 import news from './news';
5 import Income from './income'; 5 import Income from './income';
  6 +import Coupon from './coupon';
6 7
7 export default [ 8 export default [
8 { 9 {
@@ -83,5 +84,6 @@ export default [ @@ -83,5 +84,6 @@ export default [
83 ...Mine, 84 ...Mine,
84 ...Trade, 85 ...Trade,
85 ...Favorite, 86 ...Favorite,
86 - ...Income 87 + ...Income,
  88 + ...Coupon
87 ]; 89 ];
@@ -33,11 +33,19 @@ export default { @@ -33,11 +33,19 @@ export default {
33 break; 33 break;
34 } 34 }
35 case 2: { 35 case 2: {
36 - this.go('NewsPage'); 36 + this.$yoho.auth().then((res) => {
  37 + if(res) {
  38 + this.go('NewsPage');
  39 + }
  40 + })
37 break; 41 break;
38 } 42 }
39 case 3: { 43 case 3: {
40 - this.go('MinePage'); 44 + this.$yoho.auth().then((res) => {
  45 + if(res) {
  46 + this.go('MinePage');
  47 + }
  48 + })
41 break; 49 break;
42 } 50 }
43 default: { 51 default: {
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 </template> 11 </template>
12 12
13 <script> 13 <script>
14 -export default { 14 +export default {
15 name: 'news', 15 name: 'news',
16 props: { 16 props: {
17 list: { 17 list: {
@@ -33,12 +33,6 @@ export default { @@ -33,12 +33,6 @@ export default {
33 }, 33 },
34 title: '', 34 title: '',
35 type: '', 35 type: '',
36 - list: [  
37 - {"name":"您的商品AIR JORDAN 4 RETRO PURE MONEY 2017已被用户下单,请及时发货","time":"2018.08.08 17:20"},  
38 - {"name":"您的商品AIR JORDAN 4 RETRO PURE MONEY 2017已被用户下单,请及时发货","time":"2018.08.08 17:20"},  
39 - {"name":"您的商品AIR JORDAN 4 RETRO PURE MONEY 2017已被用户下单,请及时发货","time":"2018.08.08 17:20"},  
40 - {"name":"您的商品AIR JORDAN 4 RETRO PURE MONEY 2017已被用户下单,请及时发货","time":"2018.08.08 17:20"}, {"name":"您的商品AIR JORDAN 4 RETRO PURE MONEY 2017已被用户下单,请及时发货","time":"2018.08.08 17:20"},  
41 - ]  
42 } 36 }
43 }, 37 },
44 computed: { 38 computed: {
@@ -63,7 +57,6 @@ export default { @@ -63,7 +57,6 @@ export default {
63 isPage: false 57 isPage: false
64 } 58 }
65 await this.fetchNewsList(params); 59 await this.fetchNewsList(params);
66 - this.$refs.scroll.forceUpdate();  
67 } 60 }
68 }, 61 },
69 components: { 62 components: {
@@ -69,9 +69,7 @@ @@ -69,9 +69,7 @@
69 69
70 <div v-if="actionList.length > 0" class="footer-wrapper"> 70 <div v-if="actionList.length > 0" class="footer-wrapper">
71 <div v-if="statusDetail.status === 0"> 71 <div v-if="statusDetail.status === 0">
72 - <p class="real-pay-price">  
73 - ¥{{ orderDetail.priceInfo.realPayPrice }}  
74 - </p> 72 + <p class="real-pay-price">¥{{ priceInfo.realPayPrice }}</p>
75 <p>实付金额</p> 73 <p>实付金额</p>
76 </div> 74 </div>
77 <order-actions 75 <order-actions
@@ -48,11 +48,11 @@ export default { @@ -48,11 +48,11 @@ export default {
48 } 48 }
49 }, 49 },
50 methods: { 50 methods: {
51 - ...mapMutations(["setOrderStatus", "resetOrderData"]), 51 + ...mapMutations(["setOrderStatus", "resetPartialData"]),
52 ...mapActions(["fetchOrderList"]), 52 ...mapActions(["fetchOrderList"]),
53 onHandleClick(status) { 53 onHandleClick(status) {
54 this.setOrderStatus(status); 54 this.setOrderStatus(status);
55 - this.resetOrderData(); 55 + this.resetPartialData();
56 const { owner } = this.$route.params; 56 const { owner } = this.$route.params;
57 this.fetchOrderList({ owner, status }); 57 this.fetchOrderList({ owner, status });
58 } 58 }
@@ -65,8 +65,6 @@ const { mapActions: orderListMapActions } = createNamespacedHelpers( @@ -65,8 +65,6 @@ const { mapActions: orderListMapActions } = createNamespacedHelpers(
65 "order/orderList" 65 "order/orderList"
66 ); 66 );
67 67
68 -const { mapMutations: orderMapMutations } = createNamespacedHelpers("order");  
69 -  
70 export default { 68 export default {
71 components: { 69 components: {
72 Scroll, 70 Scroll,
@@ -96,14 +94,13 @@ export default { @@ -96,14 +94,13 @@ export default {
96 // store.dispatch("order/orderList/fetchOrderList", { owner, status }); 94 // store.dispatch("order/orderList/fetchOrderList", { owner, status });
97 }, 95 },
98 activated() { 96 activated() {
99 - this.reset("inSaleOrderList"); 97 + this.resetData();
100 this.fetchData(); 98 this.fetchData();
101 }, 99 },
102 methods: { 100 methods: {
103 ...mapActions(["fetchEntryOrderList", "fetchNotEntryOrderList"]), 101 ...mapActions(["fetchEntryOrderList", "fetchNotEntryOrderList"]),
104 ...orderListMapActions(["cancelTradeConfirmInfo", "cancelTrade"]), 102 ...orderListMapActions(["cancelTradeConfirmInfo", "cancelTrade"]),
105 - ...mapMutations(["filterOrderList"]),  
106 - ...orderMapMutations(["reset"]), 103 + ...mapMutations(["filterOrderList", "resetData"]),
107 fetchData() { 104 fetchData() {
108 if (this.isFetchEntryOrder) { 105 if (this.isFetchEntryOrder) {
109 this.fetchEntryOrderList(); 106 this.fetchEntryOrderList();
@@ -172,7 +169,7 @@ export default { @@ -172,7 +169,7 @@ export default {
172 </script> 169 </script>
173 <style lang="scss" scoped> 170 <style lang="scss" scoped>
174 .content-wrapper { 171 .content-wrapper {
175 - height: calc(100vh - 200px); 172 + height: calc(100vh - 100px);
176 overflow-x: hidden; 173 overflow-x: hidden;
177 overflow-y: auto; 174 overflow-y: auto;
178 -webkit-box-orient: vertical; 175 -webkit-box-orient: vertical;
@@ -61,8 +61,6 @@ const { mapActions, mapState, mapMutations } = createNamespacedHelpers( @@ -61,8 +61,6 @@ const { mapActions, mapState, mapMutations } = createNamespacedHelpers(
61 "order/orderList" 61 "order/orderList"
62 ); 62 );
63 63
64 -const { mapMutations: orderMapMutations } = createNamespacedHelpers("order");  
65 -  
66 export default { 64 export default {
67 components: { 65 components: {
68 Scroll, 66 Scroll,
@@ -89,7 +87,7 @@ export default { @@ -89,7 +87,7 @@ export default {
89 // store.dispatch("order/orderList/fetchOrderList", { owner, status }); 87 // store.dispatch("order/orderList/fetchOrderList", { owner, status });
90 }, 88 },
91 activated() { 89 activated() {
92 - this.reset("orderList"); 90 + this.resetData();
93 this.fetchData(); 91 this.fetchData();
94 }, 92 },
95 methods: { 93 methods: {
@@ -99,8 +97,7 @@ export default { @@ -99,8 +97,7 @@ export default {
99 "cancelTrade", 97 "cancelTrade",
100 "deleteOrder" 98 "deleteOrder"
101 ]), 99 ]),
102 - ...mapMutations(["setOrderStatus", "filterOrderList"]),  
103 - ...orderMapMutations(["reset"]), 100 + ...mapMutations(["setOrderStatus", "filterOrderList", "resetData"]),
104 fetchMore() { 101 fetchMore() {
105 this.fetchOrderList(this.$route.params); 102 this.fetchOrderList(this.$route.params);
106 }, 103 },
@@ -160,7 +157,7 @@ export default { @@ -160,7 +157,7 @@ export default {
160 owner 157 owner
161 }); 158 });
162 if (isOk) { 159 if (isOk) {
163 - this.reset("orderList"); 160 + this.resetData();
164 this.fetchData(this.$route.params); 161 this.fetchData(this.$route.params);
165 } 162 }
166 const txt = isOk ? "取消成功" : "取消失败"; 163 const txt = isOk ? "取消成功" : "取消失败";
@@ -187,7 +184,7 @@ export default { @@ -187,7 +184,7 @@ export default {
187 </script> 184 </script>
188 <style lang="scss" scoped> 185 <style lang="scss" scoped>
189 .content-wrapper { 186 .content-wrapper {
190 - height: calc(100vh - 200px); 187 + height: calc(100vh - 100px);
191 overflow-x: hidden; 188 overflow-x: hidden;
192 overflow-y: auto; 189 overflow-y: auto;
193 -webkit-box-orient: vertical; 190 -webkit-box-orient: vertical;
@@ -18,8 +18,7 @@ @@ -18,8 +18,7 @@
18 @select="onSelectSize" 18 @select="onSelectSize"
19 @add="onAdd" /> 19 @add="onAdd" />
20 <transition name="slide-up"> 20 <transition name="slide-up">
21 - <div class="footer" v-if="isAvailable">  
22 - <cube-button v-if="config.type === 'sell'" @click="convertToCash" :class="{active: isMarketable}">变现<span> <i>¥</i>{{cashPrice}}</span></cube-button> 21 + <div class="footer">
23 <cube-button @click="select" :class="{active: isTradable}">{{config.title}}</cube-button> 22 <cube-button @click="select" :class="{active: isTradable}">{{config.title}}</cube-button>
24 </div> 23 </div>
25 </transition> 24 </transition>
@@ -97,25 +96,6 @@ export default { @@ -97,25 +96,6 @@ export default {
97 isTradable() { 96 isTradable() {
98 return this.isAvailable && this.selectedSize.storage_num > 0 && this.selectedSize.least_price !== '-'; 97 return this.isAvailable && this.selectedSize.storage_num > 0 && this.selectedSize.least_price !== '-';
99 }, 98 },
100 -  
101 - /**  
102 - * 变现价格,使用bid_moster_price  
103 - */  
104 - cashPrice() {  
105 - if (this.selectedSize && this.selectedSize.hasOwnProperty('bid_moster_price')) {  
106 - return this.selectedSize.bid_moster_price;  
107 - }  
108 -  
109 - return '-';  
110 - },  
111 -  
112 - /**  
113 - * 可变现  
114 - * 通过bid_moster_price或bid_skup判断  
115 - */  
116 - isMarketable() {  
117 - return this.cashPrice > 0;  
118 - }  
119 }, 99 },
120 mounted() { 100 mounted() {
121 this.$refs.popup.show(); 101 this.$refs.popup.show();
@@ -148,14 +128,6 @@ export default { @@ -148,14 +128,6 @@ export default {
148 bid_skup: this.selectedSize.bid_skup, 128 bid_skup: this.selectedSize.bid_skup,
149 }); 129 });
150 }, 130 },
151 - convertToCash() {  
152 - if (!this.isMarketable) {  
153 - return;  
154 - }  
155 - this.hide();  
156 -  
157 - // TODO: TBD  
158 - },  
159 }, 131 },
160 }; 132 };
161 </script> 133 </script>
@@ -51,12 +51,13 @@ export default function() { @@ -51,12 +51,13 @@ export default function() {
51 }, 51 },
52 async fetchChannelList({ commit }) { 52 async fetchChannelList({ commit }) {
53 const result = await this.$api.get('/api/ufo/channel/channelList', { 53 const result = await this.$api.get('/api/ufo/channel/channelList', {
54 - content_code: 'b4c2aa846b56ad7e51e7255c2ee4c1f9', 54 + content_code: 'f788335b57b67c1711f255648c744dab',
55 // uid: '64668089', 55 // uid: '64668089',
56 uid: '500031170', 56 uid: '500031170',
57 }); 57 });
58 if (result.code === 200) { 58 if (result.code === 200) {
59 commit(Types.FETCH_CHANNEL, { list: result.data }); 59 commit(Types.FETCH_CHANNEL, { list: result.data });
  60 + return result.data;
60 } 61 }
61 } 62 }
62 }, 63 },
@@ -54,7 +54,7 @@ export default function() { @@ -54,7 +54,7 @@ export default function() {
54 let params = { 54 let params = {
55 page: couponData.page, 55 page: couponData.page,
56 limit: couponData.limit, 56 limit: couponData.limit,
57 - type: couponData.limit, 57 + type: couponData.type,
58 }; 58 };
59 59
60 if (param.isReset) { 60 if (param.isReset) {
@@ -63,7 +63,7 @@ export default function() { @@ -63,7 +63,7 @@ export default function() {
63 params.page += 1; 63 params.page += 1;
64 } 64 }
65 params.uid = uid; 65 params.uid = uid;
66 - let result = await this.$api.get('api/ufo/coupon/list', {...params}); 66 + let result = await this.$api.get('/api/ufo/coupon/list', {...params});
67 67
68 if (result.code === 200) { 68 if (result.code === 200) {
69 let data = result.data; 69 let data = result.data;
@@ -82,7 +82,7 @@ export default function() { @@ -82,7 +82,7 @@ export default function() {
82 commit('addList', { data: couponData }); 82 commit('addList', { data: couponData });
83 } 83 }
84 } 84 }
85 - return result.data || []; 85 + return couponData.list || [];
86 }, 86 },
87 }, 87 },
88 }; 88 };
@@ -5,7 +5,7 @@ import moment from 'moment'; @@ -5,7 +5,7 @@ import moment from 'moment';
5 import { sellerOrderStatus, ownType } from '../../../constants/order-constants'; 5 import { sellerOrderStatus, ownType } from '../../../constants/order-constants';
6 6
7 // const uid = '600046428'; 7 // const uid = '600046428';
8 -const uid = '500031424'; 8 +// const uid = '500031424';
9 const MINE_RESOURCE_CODE1 = '11a73219a63b50067d88e75c0fe04d10'; 9 const MINE_RESOURCE_CODE1 = '11a73219a63b50067d88e75c0fe04d10';
10 const MINE_RESOURCE_CODE2 = 'dc2731fbbebcba6329c74a379e9c41ec'; 10 const MINE_RESOURCE_CODE2 = 'dc2731fbbebcba6329c74a379e9c41ec';
11 11
@@ -296,11 +296,9 @@ export default function() { @@ -296,11 +296,9 @@ export default function() {
296 async fetchResource({ commit }) { 296 async fetchResource({ commit }) {
297 const result = await this.$api.get('/api/ufo/mine/resource', { 297 const result = await this.$api.get('/api/ufo/mine/resource', {
298 content_code: MINE_RESOURCE_CODE1, 298 content_code: MINE_RESOURCE_CODE1,
299 - uid,  
300 }); 299 });
301 const result1 = await this.$api.get('/api/ufo/mine/resource', { 300 const result1 = await this.$api.get('/api/ufo/mine/resource', {
302 content_code: MINE_RESOURCE_CODE2, 301 content_code: MINE_RESOURCE_CODE2,
303 - uid,  
304 }); 302 });
305 303
306 if (result.code === 200) { 304 if (result.code === 200) {
@@ -327,7 +325,6 @@ export default function() { @@ -327,7 +325,6 @@ export default function() {
327 async fetchSellerOrder({ commit }) { 325 async fetchSellerOrder({ commit }) {
328 const result = await this.$api.get( 326 const result = await this.$api.get(
329 '/api/ufo/mine/seller/orderSummary', 327 '/api/ufo/mine/seller/orderSummary',
330 - { uid },  
331 ); 328 );
332 329
333 if (result.code === 200) { 330 if (result.code === 200) {
@@ -335,9 +332,7 @@ export default function() { @@ -335,9 +332,7 @@ export default function() {
335 } 332 }
336 }, 333 },
337 async fetchFavoriteNum({ commit }) { 334 async fetchFavoriteNum({ commit }) {
338 - const result = await this.$api.get('/api/ufo/mine/favoriteNum', {  
339 - uid,  
340 - }); 335 + const result = await this.$api.get('/api/ufo/mine/favoriteNum');
341 336
342 if (result.code === 200) { 337 if (result.code === 200) {
343 commit('addFavoriteNum', { 338 commit('addFavoriteNum', {
@@ -346,16 +341,14 @@ export default function() { @@ -346,16 +341,14 @@ export default function() {
346 } 341 }
347 }, 342 },
348 async fetchOrderSummary({ commit }) { 343 async fetchOrderSummary({ commit }) {
349 - const result = await this.$api.get('/api/ufo/mine/order/summary', {  
350 - uid,  
351 - }); 344 + const result = await this.$api.get('/api/ufo/mine/order/summary');
352 345
353 if (result.code === 200) { 346 if (result.code === 200) {
354 commit('addOrderSummary', { data: result.data }); 347 commit('addOrderSummary', { data: result.data });
355 } 348 }
356 }, 349 },
357 async fetchCoupon({commit}) { 350 async fetchCoupon({commit}) {
358 - const result = await this.$api.get('/api/ufo/mine/coupon', {uid}); 351 + const result = await this.$api.get('/api/ufo/mine/coupon');
359 352
360 if (result.code === 200) { 353 if (result.code === 200) {
361 commit('addCouponSummary', { count: result.data}); 354 commit('addCouponSummary', { count: result.data});
@@ -380,7 +373,6 @@ export default function() { @@ -380,7 +373,6 @@ export default function() {
380 const result = await this.$api.get('/api/ufo/mine/assets', { 373 const result = await this.$api.get('/api/ufo/mine/assets', {
381 page, 374 page,
382 limit: pageSize, 375 limit: pageSize,
383 - uid,  
384 }); 376 });
385 377
386 // commit('assetFetching', {isFetching: false}); 378 // commit('assetFetching', {isFetching: false});
@@ -421,7 +413,6 @@ export default function() { @@ -421,7 +413,6 @@ export default function() {
421 const result = await this.$api.get('/api/ufo/mine/wallet', { 413 const result = await this.$api.get('/api/ufo/mine/wallet', {
422 page, 414 page,
423 limit: pageSize, 415 limit: pageSize,
424 - uid,  
425 tradeType, 416 tradeType,
426 startTime, 417 startTime,
427 endTime, 418 endTime,
@@ -441,18 +432,14 @@ export default function() { @@ -441,18 +432,14 @@ export default function() {
441 }, 432 },
442 433
443 async fetchUserWalletInfo({ commit }) { 434 async fetchUserWalletInfo({ commit }) {
444 - const result = await this.$api.get('/api/ufo/mine/userWalletInfo', {  
445 - uid,  
446 - }); 435 + const result = await this.$api.get('/api/ufo/mine/userWalletInfo');
447 436
448 if (result.code === 200) { 437 if (result.code === 200) {
449 commit('addUserWalletInfo', result.data); 438 commit('addUserWalletInfo', result.data);
450 } 439 }
451 }, 440 },
452 async fetchWalletFilter({ commit }) { 441 async fetchWalletFilter({ commit }) {
453 - const result = await this.$api.get('/api/ufo/mine/walletFilter', {  
454 - uid,  
455 - }); 442 + const result = await this.$api.get('/api/ufo/mine/walletFilter');
456 443
457 if (result.code === 200) { 444 if (result.code === 200) {
458 commit('addfilterData', result.data); 445 commit('addfilterData', result.data);
@@ -33,8 +33,6 @@ export default function() { @@ -33,8 +33,6 @@ export default function() {
33 let totalPage = state.newsList.totalPage; 33 let totalPage = state.newsList.totalPage;
34 let type = obj && obj.type; 34 let type = obj && obj.type;
35 let isPage = obj && obj.isPage; 35 let isPage = obj && obj.isPage;
36 - console.log(state.newsList.totalPage);  
37 - console.log('页码2');  
38 36
39 // 页面跳转重置page页码 37 // 页面跳转重置page页码
40 isPage ? page = 1 : state.newsList.page + 1; 38 isPage ? page = 1 : state.newsList.page + 1;
  1 +const initailData = () => ({
  2 + entryOrder: {
  3 + page: 1,
  4 + pageSize: 10,
  5 + pagetotal: 0,
  6 + list: [], // 订单列表
  7 + pullUpload: true,
  8 + },
  9 + notEntryOrder: {
  10 + page: 1,
  11 + pageSize: 10,
  12 + pagetotal: 0,
  13 + list: [], // 订单列表
  14 + pullUpload: true,
  15 + },
  16 + isShowEmpty: false,
  17 +});
  18 +
1 export default function() { 19 export default function() {
2 return { 20 return {
3 namespaced: true, 21 namespaced: true,
4 - state: {  
5 - entryOrder: {  
6 - page: 1,  
7 - pageSize: 10,  
8 - pagetotal: 0,  
9 - list: [], // 订单列表  
10 - pullUpload: true,  
11 - },  
12 - notEntryOrder: {  
13 - page: 1,  
14 - pageSize: 10,  
15 - pagetotal: 0,  
16 - list: [], // 订单列表  
17 - pullUpload: true,  
18 - },  
19 - isShowEmpty: false,  
20 - }, 22 + state: initailData,
21 mutations: { 23 mutations: {
22 setEntryOrder(state, res) { 24 setEntryOrder(state, res) {
23 let { page, pagetotal, data = [] } = res; 25 let { page, pagetotal, data = [] } = res;
@@ -58,6 +60,13 @@ export default function() { @@ -58,6 +60,13 @@ export default function() {
58 state.entryOrder.list.length === 0 && 60 state.entryOrder.list.length === 0 &&
59 state.notEntryOrder.list.length === 0; 61 state.notEntryOrder.list.length === 0;
60 }, 62 },
  63 + resetData(state) {
  64 + const s = initailData();
  65 +
  66 + Object.keys(s).forEach(key => {
  67 + state[key] = s[key];
  68 + });
  69 + },
61 }, 70 },
62 getters: { 71 getters: {
63 // scroll 组件参数,是否触发上拉事件 72 // scroll 组件参数,是否触发上拉事件
@@ -6,16 +6,6 @@ import orderLogistics from './order-logistics'; @@ -6,16 +6,6 @@ import orderLogistics from './order-logistics';
6 import orderDeliver from './order-deliver'; 6 import orderDeliver from './order-deliver';
7 import inSaleOrderList from './in-sale-order-list'; 7 import inSaleOrderList from './in-sale-order-list';
8 8
9 -const initialState = {  
10 - priceChange: priceChange().state,  
11 - orderList: orderList().state,  
12 - orderConfirm: orderConfirm().state,  
13 - orderDetail: orderDetail().state,  
14 - logisticsInfo: orderLogistics().state,  
15 - orderDeliver: orderDeliver().state,  
16 - inSaleOrderList: inSaleOrderList().state,  
17 -};  
18 -  
19 export default function() { 9 export default function() {
20 return { 10 return {
21 namespaced: true, 11 namespaced: true,
@@ -28,27 +18,5 @@ export default function() { @@ -28,27 +18,5 @@ export default function() {
28 orderDeliver: orderDeliver(), 18 orderDeliver: orderDeliver(),
29 inSaleOrderList: inSaleOrderList(), 19 inSaleOrderList: inSaleOrderList(),
30 }, 20 },
31 - state: {  
32 - resetFlag: false,  
33 - },  
34 - mutations: {  
35 - /**  
36 - * reset module state  
37 - * @param {*} state  
38 - * @param { Array | String} moduleNames 模块名  
39 - */  
40 - reset(state, moduleNames = []) {  
41 - if (typeof moduleNames === 'string') {  
42 - moduleNames = [moduleNames];  
43 - }  
44 - console.log('------reset module name------------', moduleNames);  
45 -  
46 - // 修改flag,监听后reload  
47 - state.resetFlag = !state.resetFlag;  
48 - for (const name of moduleNames) {  
49 - Object.assign(state[name], initialState[name]);  
50 - }  
51 - },  
52 - },  
53 }; 21 };
54 } 22 }
  1 +const initailData = () => ({
  2 + page: 1,
  3 + pageSize: 10,
  4 + pagetotal: 0,
  5 + orderList: [], // 订单列表
  6 + // scroll 组件参数,是否触发上拉事件
  7 + pullUpLoad: true,
  8 +
  9 + // 当前查询订单状态
  10 + currentStatus: 1,
  11 + isShowEmpty: false,
  12 +});
  13 +
1 export default function() { 14 export default function() {
2 return { 15 return {
3 namespaced: true, 16 namespaced: true,
4 modules: {}, 17 modules: {},
5 - state: {  
6 - page: 1,  
7 - pageSize: 10,  
8 - pagetotal: 0,  
9 - orderList: [], // 订单列表  
10 - // scroll 组件参数,是否触发上拉事件  
11 - pullUpLoad: true,  
12 -  
13 - // 当前查询订单状态  
14 - currentStatus: 1,  
15 - routerParam: {},  
16 -  
17 - isShowEmpty: false,  
18 - }, 18 + state: initailData,
19 mutations: { 19 mutations: {
20 setOrderList(state, res) { 20 setOrderList(state, res) {
21 let { page, pagetotal, data = [] } = res; 21 let { page, pagetotal, data = [] } = res;
@@ -39,12 +39,19 @@ export default function() { @@ -39,12 +39,19 @@ export default function() {
39 setOrderStatus(state, currentStatus) { 39 setOrderStatus(state, currentStatus) {
40 state.currentStatus = +currentStatus; 40 state.currentStatus = +currentStatus;
41 }, 41 },
42 - resetOrderData(state) { 42 + resetPartialData(state) {
43 state.page = 1; 43 state.page = 1;
44 state.orderList = []; 44 state.orderList = [];
45 state.pagetotal = 0; 45 state.pagetotal = 0;
46 state.pullUpLoad = true; 46 state.pullUpLoad = true;
47 }, 47 },
  48 + resetData(state) {
  49 + const s = initailData();
  50 +
  51 + Object.keys(s).forEach(key => {
  52 + state[key] = s[key];
  53 + });
  54 + },
48 }, 55 },
49 actions: { 56 actions: {
50 /** 57 /**
1 module.exports = { 1 module.exports = {
2 '/api/address/gethidden': { 2 '/api/address/gethidden': {
  3 + auth: true,
3 api: 'app.address.gethidden', 4 api: 'app.address.gethidden',
4 params: {} 5 params: {}
5 }, 6 },
6 '/api/address/getTags': { 7 '/api/address/getTags': {
  8 + auth: true,
7 api: 'app.address.getTags', 9 api: 'app.address.getTags',
8 params: {} 10 params: {}
9 }, 11 },
10 '/api/address/getProvinces': { 12 '/api/address/getProvinces': {
  13 + auth: true,
11 api: 'app.address.provinces', 14 api: 'app.address.provinces',
12 params: {} 15 params: {}
13 }, 16 },
14 '/api/address/addAddress': { 17 '/api/address/addAddress': {
  18 + auth: true,
15 api: 'app.address.add', 19 api: 'app.address.add',
16 params: {} 20 params: {}
17 }, 21 },
18 '/api/address/updateAddress': { 22 '/api/address/updateAddress': {
  23 + auth: true,
19 api: 'app.address.update', 24 api: 'app.address.update',
20 params: {} 25 params: {}
21 }, 26 },
22 '/api/address/delAddress': { 27 '/api/address/delAddress': {
  28 + auth: true,
23 api: 'app.address.del', 29 api: 'app.address.del',
24 params: {} 30 params: {}
25 }, 31 },
26 '/api/address/setDefaultAddress': { 32 '/api/address/setDefaultAddress': {
  33 + auth: true,
27 api: 'app.address.setdefault', 34 api: 'app.address.setdefault',
28 params: {} 35 params: {}
29 }, 36 },
@@ -107,16 +107,15 @@ module.exports = { @@ -107,16 +107,15 @@ module.exports = {
107 uid: { type: Number }, 107 uid: { type: Number },
108 }, 108 },
109 }, 109 },
110 - 'api/ufo/coupon/list': { 110 + '/api/ufo/coupon/list': {
111 ufo: true, 111 ufo: true,
112 -  
113 - // auth: true, 112 + path: '/ufo-gateway/coupon',
114 api: 'ufo.coupons.list', 113 api: 'ufo.coupons.list',
115 param: { 114 param: {
116 - uid: { type: Number },  
117 page: {type: Number}, 115 page: {type: Number},
118 limit: {type: Number}, 116 limit: {type: Number},
119 - type: {type: Number} 117 + type: {type: String},
  118 + uid: { type: Number },
120 } 119 }
121 }, 120 },
122 }; 121 };
@@ -57,6 +57,7 @@ @@ -57,6 +57,7 @@
57 "passport": "^0.4.0", 57 "passport": "^0.4.0",
58 "passport-oauth": "^1.0.0", 58 "passport-oauth": "^1.0.0",
59 "qiniu": "^7.2.1", 59 "qiniu": "^7.2.1",
  60 + "query-string": "^6.8.3",
60 "request": "^2.88.0", 61 "request": "^2.88.0",
61 "request-promise": "^4.2.2", 62 "request-promise": "^4.2.2",
62 "serve-favicon": "^2.5.0", 63 "serve-favicon": "^2.5.0",
@@ -8318,6 +8318,15 @@ qs@^6.4.0: @@ -8318,6 +8318,15 @@ qs@^6.4.0:
8318 resolved "http://npm.yohops.com/qs/-/qs-6.6.0.tgz#a99c0f69a8d26bf7ef012f871cdabb0aee4424c2" 8318 resolved "http://npm.yohops.com/qs/-/qs-6.6.0.tgz#a99c0f69a8d26bf7ef012f871cdabb0aee4424c2"
8319 integrity sha1-qZwPaajSa/fvAS+HHNq7Cu5EJMI= 8319 integrity sha1-qZwPaajSa/fvAS+HHNq7Cu5EJMI=
8320 8320
  8321 +query-string@^6.8.3:
  8322 + version "6.8.3"
  8323 + resolved "http://npm.yohops.com/query-string/-/query-string-6.8.3.tgz#fd9fb7ffb068b79062b43383685611ee47777d4b"
  8324 + integrity sha1-/Z+3/7Bot5BitDODaFYR7kd3fUs=
  8325 + dependencies:
  8326 + decode-uri-component "^0.2.0"
  8327 + split-on-first "^1.0.0"
  8328 + strict-uri-encode "^2.0.0"
  8329 +
8321 querystring-es3@^0.2.0: 8330 querystring-es3@^0.2.0:
8322 version "0.2.1" 8331 version "0.2.1"
8323 resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" 8332 resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73"
@@ -9499,6 +9508,11 @@ specificity@^0.4.1: @@ -9499,6 +9508,11 @@ specificity@^0.4.1:
9499 resolved "http://npm.yohops.com/specificity/-/specificity-0.4.1.tgz#aab5e645012db08ba182e151165738d00887b019" 9508 resolved "http://npm.yohops.com/specificity/-/specificity-0.4.1.tgz#aab5e645012db08ba182e151165738d00887b019"
9500 integrity sha1-qrXmRQEtsIuhguFRFlc40AiHsBk= 9509 integrity sha1-qrXmRQEtsIuhguFRFlc40AiHsBk=
9501 9510
  9511 +split-on-first@^1.0.0:
  9512 + version "1.1.0"
  9513 + resolved "http://npm.yohops.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f"
  9514 + integrity sha1-9hCv7uOxK84dDDBCXnY5i3gkml8=
  9515 +
9502 split-string@^3.0.1, split-string@^3.0.2: 9516 split-string@^3.0.1, split-string@^3.0.2:
9503 version "3.1.0" 9517 version "3.1.0"
9504 resolved "http://npm.yohops.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" 9518 resolved "http://npm.yohops.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"
@@ -9632,6 +9646,11 @@ stream-shift@^1.0.0: @@ -9632,6 +9646,11 @@ stream-shift@^1.0.0:
9632 resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" 9646 resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952"
9633 integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI= 9647 integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=
9634 9648
  9649 +strict-uri-encode@^2.0.0:
  9650 + version "2.0.0"
  9651 + resolved "http://npm.yohops.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546"
  9652 + integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY=
  9653 +
9635 string-length@^2.0.0: 9654 string-length@^2.0.0:
9636 version "2.0.0" 9655 version "2.0.0"
9637 resolved "http://r.cnpmjs.org/string-length/download/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" 9656 resolved "http://r.cnpmjs.org/string-length/download/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed"