Authored by yyq

merge

@@ -7,6 +7,10 @@ export default (context, type = 'server') => { @@ -7,6 +7,10 @@ export default (context, type = 'server') => {
7 return (err, vm, info) => { 7 return (err, vm, info) => {
8 logger.error(err, vm, info); 8 logger.error(err, vm, info);
9 9
  10 + if (process.env.NO_APM_REPORT) {
  11 + return;
  12 + }
  13 +
10 if (process.env.NODE_ENV === 'production') { 14 if (process.env.NODE_ENV === 'production') {
11 setImmediate(() => { 15 setImmediate(() => {
12 const reportData = { 16 const reportData = {
@@ -16,21 +16,10 @@ export default { @@ -16,21 +16,10 @@ export default {
16 }, 16 },
17 watch: { 17 watch: {
18 'report': function(newVal) { 18 'report': function(newVal) {
19 - // console.log(newVal);  
20 }, 19 },
21 }, 20 },
22 - // activated() {  
23 - // console.log(this.report);  
24 - // console.log("this.report");  
25 - // },  
26 methods: { 21 methods: {
27 jumpTo() { 22 jumpTo() {
28 - this.$store.dispatch('reportYas', {  
29 - params: {  
30 - appop: this.reportEvent,  
31 - param:this.report  
32 - }  
33 - });  
34 23
35 if (!this.href) { 24 if (!this.href) {
36 return; 25 return;
@@ -39,6 +28,13 @@ export default { @@ -39,6 +28,13 @@ export default {
39 this.$xianyu.goXianyuNewPage({ 28 this.$xianyu.goXianyuNewPage({
40 url: this.href 29 url: this.href
41 }); 30 });
  31 +
  32 + this.$store.dispatch('reportYas', {
  33 + params: {
  34 + appop: this.reportEvent,
  35 + param:this.report
  36 + }
  37 + });
42 } 38 }
43 } 39 }
44 }; 40 };
@@ -154,7 +154,7 @@ export default { @@ -154,7 +154,7 @@ export default {
154 } 154 }
155 } 155 }
156 }); 156 });
157 - this.reportYas(); 157 + this.reportYas(0);
158 } 158 }
159 }, 159 },
160 goProductList(item, index, itemSub) { 160 goProductList(item, index, itemSub) {
@@ -175,33 +175,6 @@ export default { @@ -175,33 +175,6 @@ export default {
175 } 175 }
176 }); 176 });
177 }, 177 },
178 - reportPaser(subList) {  
179 - // console.log('reportPaser')  
180 - // console.log(...subList);  
181 - if(subList && subList.length > 0){  
182 - let reportSub = [];  
183 - subList.forEach((val, index) => {  
184 - val.su  
185 -  
186 - let reportItem = {  
187 - CATE_ID: this.sortItem.id || '',  
188 - CATE_NM: this.sortItem.name || '',  
189 - CATE_INDEX: this.sortItem.index || '',  
190 - F_ID: index,  
191 - F_NAME: val.name,  
192 - F_INDEX: index,  
193 - I_INDEX: index,  
194 - TO_TYPE: 'brand',  
195 - TO_ID: val.id,  
196 - }  
197 -  
198 - reportSub.push(subItem);  
199 -  
200 - });  
201 - }  
202 -  
203 -  
204 - }  
205 }, 178 },
206 computed: { 179 computed: {
207 ...mapState(['categoryParent', 'categorySubList']), 180 ...mapState(['categoryParent', 'categorySubList']),
1 <template> 1 <template>
2 <LayoutApp :show-back="true" title="绑定支付宝"> 2 <LayoutApp :show-back="true" title="绑定支付宝">
3 <div class="body" ref="body"> 3 <div class="body" ref="body">
4 - <Scroll class="scroll-content">  
5 <div class="account-form"> 4 <div class="account-form">
6 <p class="form-title">账号</p> 5 <p class="form-title">账号</p>
7 <div class="form-input-block"> 6 <div class="form-input-block">
@@ -15,7 +14,6 @@ @@ -15,7 +14,6 @@
15 <div class="account-footer"> 14 <div class="account-footer">
16 <CubeButton class="submit-btn" :disabled="canSubmit" @click="submitBind">提交</CubeButton> 15 <CubeButton class="submit-btn" :disabled="canSubmit" @click="submitBind">提交</CubeButton>
17 </div> 16 </div>
18 - </Scroll>  
19 </div> 17 </div>
20 <myDialog :isShow="dialogShow" :data="{name,account}" @cancel-click="cancel" @confirm-click="confirm"></myDialog> 18 <myDialog :isShow="dialogShow" :data="{name,account}" @cancel-click="cancel" @confirm-click="confirm"></myDialog>
21 </LayoutApp> 19 </LayoutApp>
@@ -24,7 +22,7 @@ @@ -24,7 +22,7 @@
24 <script> 22 <script>
25 23
26 import { createNamespacedHelpers } from 'vuex'; 24 import { createNamespacedHelpers } from 'vuex';
27 -import {Input, Button, Scroll, Style} from 'cube-ui'; 25 +import {Input, Button, Style} from 'cube-ui';
28 import myDialog from './components/bindModel'; 26 import myDialog from './components/bindModel';
29 const {mapState, mapActions} = createNamespacedHelpers('home/bindAccount'); 27 const {mapState, mapActions} = createNamespacedHelpers('home/bindAccount');
30 export default { 28 export default {
@@ -72,7 +70,6 @@ export default { @@ -72,7 +70,6 @@ export default {
72 }, 70 },
73 components: { 71 components: {
74 Style, 72 Style,
75 - Scroll,  
76 CubeInput: Input, 73 CubeInput: Input,
77 CubeButton: Button, 74 CubeButton: Button,
78 myDialog 75 myDialog
@@ -88,9 +85,6 @@ export default { @@ -88,9 +85,6 @@ export default {
88 background-color: white; 85 background-color: white;
89 padding: 0 40px; 86 padding: 0 40px;
90 } 87 }
91 -/deep/ .cube-scroll-content {  
92 - height: 100%;  
93 -}  
94 .account-form { 88 .account-form {
95 margin-top: 40px; 89 margin-top: 40px;
96 } 90 }
@@ -128,6 +128,11 @@ export default { @@ -128,6 +128,11 @@ export default {
128 activated() { 128 activated() {
129 this.$refs.scroll && this.scrollY && this.$refs.scroll.scrollTo(this.scrollY); 129 this.$refs.scroll && this.scrollY && this.$refs.scroll.scrollTo(this.scrollY);
130 130
  131 + if (!this.channelList.list || !this.channelList.list.length) {
  132 + this.fetchChannelList();
  133 + }
  134 + this.init();
  135 +
131 this.PAGE_URL = window.location.href; 136 this.PAGE_URL = window.location.href;
132 // 首页进入上报 137 // 首页进入上报
133 this.$store.dispatch('reportYas', { 138 this.$store.dispatch('reportYas', {
@@ -136,10 +141,6 @@ export default { @@ -136,10 +141,6 @@ export default {
136 appop: 'XY_UFO_MAIN_START' 141 appop: 'XY_UFO_MAIN_START'
137 } 142 }
138 }); 143 });
139 - if (!this.channelList.list || !this.channelList.list.length) {  
140 - this.fetchChannelList();  
141 - }  
142 - this.init();  
143 }, 144 },
144 async serverPrefetch() { 145 async serverPrefetch() {
145 return this.fetchChannelList(); 146 return this.fetchChannelList();
@@ -170,8 +171,8 @@ export default { @@ -170,8 +171,8 @@ export default {
170 eleHeight = this.$refs[index][0].$el.offsetHeight; 171 eleHeight = this.$refs[index][0].$el.offsetHeight;
171 eleTop = this.$refs[index][0].$el.offsetTop; 172 eleTop = this.$refs[index][0].$el.offsetTop;
172 } else { 173 } else {
173 - eleHeight = this.$refs.scrollNav.offsetHeight;  
174 - eleTop = this.$refs.scrollNav.offsetTop; 174 + eleHeight = this.navHeight;
  175 + eleTop = this.navTop;
175 } 176 }
176 if(scrollY) { // 滚动时 177 if(scrollY) { // 滚动时
177 if(scrollHeight + scrollY > eleTop && item.template_name === 'guessLike') { 178 if(scrollHeight + scrollY > eleTop && item.template_name === 'guessLike') {
@@ -202,7 +203,7 @@ export default { @@ -202,7 +203,7 @@ export default {
202 }, 203 },
203 reportYas(scrollY) { 204 reportYas(scrollY) {
204 this.getReportEle(scrollY) 205 this.getReportEle(scrollY)
205 - console.log(this.homeYasParams) 206 + // console.log(this.homeYasParams)
206 this.$store.dispatch('reportYas', { 207 this.$store.dispatch('reportYas', {
207 params: { 208 params: {
208 param: this.homeYasParams, 209 param: this.homeYasParams,
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <p class='assets-record-code-txt'>{{data.goodsName}}</p> 8 <p class='assets-record-code-txt'>{{data.goodsName}}</p>
9 <p class='assets-record-time-txt'>{{data.time}}</p> 9 <p class='assets-record-time-txt'>{{data.time}}</p>
10 </div> 10 </div>
11 - 11 +
12 <div class='assets-record-right-view'> 12 <div class='assets-record-right-view'>
13 <p class='assets-record-income-txt'>{{data.tradeType === 5 ? '-': '+'}}{{data.amount}}</p> 13 <p class='assets-record-income-txt'>{{data.tradeType === 5 ? '-': '+'}}{{data.amount}}</p>
14 </div> 14 </div>
@@ -36,13 +36,14 @@ export default { @@ -36,13 +36,14 @@ export default {
36 }, 36 },
37 data() { 37 data() {
38 return { 38 return {
39 - 39 +
40 }; 40 };
41 }, 41 },
42 }; 42 };
43 </script> 43 </script>
44 44
45 <style lang="scss" scoped> 45 <style lang="scss" scoped>
  46 +@import "../../../../statics/scss/variable";
46 .assets-record-container { 47 .assets-record-container {
47 display: flex; 48 display: flex;
48 margin: 0 40px; 49 margin: 0 40px;
@@ -93,10 +94,10 @@ export default { @@ -93,10 +94,10 @@ export default {
93 margin-top: 12px; 94 margin-top: 12px;
94 } 95 }
95 .assets-record-income-txt { 96 .assets-record-income-txt {
96 - font-family: SFProText-Medium;  
97 font-weight: bold; 97 font-weight: bold;
98 font-size: 28px; 98 font-size: 28px;
99 color: black; 99 color: black;
  100 + @include num
100 } 101 }
101 .assets-record-income-tip-txt { 102 .assets-record-income-tip-txt {
102 font-family: PingFang-SC-Regular; 103 font-family: PingFang-SC-Regular;
@@ -43,6 +43,8 @@ export default { @@ -43,6 +43,8 @@ export default {
43 </script> 43 </script>
44 44
45 <style lang="scss" scoped> 45 <style lang="scss" scoped>
  46 +@import "../../../../statics/scss/variable";
  47 +
46 .orders { 48 .orders {
47 display: flex; 49 display: flex;
48 height: 100px; 50 height: 100px;
@@ -70,9 +72,9 @@ export default { @@ -70,9 +72,9 @@ export default {
70 } 72 }
71 73
72 .order-num { 74 .order-num {
73 - font-family: "Alte DIN 1451 Mittelschrift";  
74 font-size: 32px; 75 font-size: 32px;
75 text-align: center; 76 text-align: center;
  77 + @include num
76 } 78 }
77 79
78 .order-text { 80 .order-text {
@@ -87,6 +87,8 @@ export default { @@ -87,6 +87,8 @@ export default {
87 </script> 87 </script>
88 88
89 <style lang="scss" scoped> 89 <style lang="scss" scoped>
  90 +@import "../../../../statics/scss/variable";
  91 +
90 .tab-item { 92 .tab-item {
91 display: flex; 93 display: flex;
92 height: 120px; 94 height: 120px;
@@ -105,7 +107,7 @@ export default { @@ -105,7 +107,7 @@ export default {
105 } 107 }
106 .grey { 108 .grey {
107 background-color: #F2F2F2; 109 background-color: #F2F2F2;
108 - // margin: 0 -40px; 110 + margin: 0 -40px;
109 padding: 0 40px; 111 padding: 0 40px;
110 } 112 }
111 113
@@ -125,10 +127,10 @@ export default { @@ -125,10 +127,10 @@ export default {
125 } 127 }
126 128
127 .text { 129 .text {
128 - font-family: "Alte DIN 1451 Mittelschrift";  
129 color: black; 130 color: black;
130 text-align: right; 131 text-align: right;
131 font-size: 32px; 132 font-size: 32px;
  133 + @include num
132 } 134 }
133 135
134 .cubeic-arrow { 136 .cubeic-arrow {
1 <template> 1 <template>
2 <LayoutApp :show-back="true" title="我的" :hideHeader="hideHeader"> 2 <LayoutApp :show-back="true" title="我的" :hideHeader="hideHeader">
3 <div class="body" ref="body"> 3 <div class="body" ref="body">
4 - <Scroll>  
5 <div v-for="(value, key) in getMineList" :key="key"> 4 <div v-for="(value, key) in getMineList" :key="key">
6 <tab-item v-if="key === 'board'" :data="value" noLine icon="cubeic-notification" small grey> 5 <tab-item v-if="key === 'board'" :data="value" noLine icon="cubeic-notification" small grey>
7 <noticeScroll></noticeScroll> 6 <noticeScroll></noticeScroll>
8 </tab-item> 7 </tab-item>
9 <template v-else-if="key === 'resource1' || key === 'resource2'"> 8 <template v-else-if="key === 'resource1' || key === 'resource2'">
10 - <div v-if="value.data.template_name ==='single_image'" class="marg"> 9 + <div v-if="value.data.template_name ==='single_image'">
11 <singleImage :data="value.data.data[0]"></singleImage> 10 <singleImage :data="value.data.data[0]"></singleImage>
12 </div> 11 </div>
13 </template> 12 </template>
14 - <div v-else-if="key === 'order'" class="bg-bottom marg"> 13 + <div v-else-if="key === 'order'" class="bg-bottom">
15 <order></order> 14 <order></order>
16 </div> 15 </div>
17 - <div v-else-if="key === 'sale'" class="bg-top marg"> 16 + <div v-else-if="key === 'sale'" class="bg-top">
18 <tab-item :data="value" noLine titleBold titleSmall></tab-item> 17 <tab-item :data="value" noLine titleBold titleSmall></tab-item>
19 </div> 18 </div>
20 - <bind class="marg" v-else-if="key === 'bindAccount'" :data="value"></bind>  
21 - <tab-item class="marg" v-else :data="value"></tab-item> 19 + <bind v-else-if="key === 'bindAccount'" :data="value"></bind>
  20 + <tab-item v-else :data="value"></tab-item>
22 </div> 21 </div>
23 - </Scroll>  
24 </div> 22 </div>
25 </LayoutApp> 23 </LayoutApp>
26 </template> 24 </template>
@@ -31,7 +29,6 @@ import order from './components/order'; @@ -31,7 +29,6 @@ import order from './components/order';
31 import scroll from './components/scroll'; 29 import scroll from './components/scroll';
32 import singleImage from './components/singleImage'; 30 import singleImage from './components/singleImage';
33 import bind from './components/bind'; 31 import bind from './components/bind';
34 -import {Style, Scroll} from 'cube-ui';  
35 import { createNamespacedHelpers } from 'vuex'; 32 import { createNamespacedHelpers } from 'vuex';
36 33
37 const { mapGetters, mapActions } = createNamespacedHelpers('home/mine'); 34 const { mapGetters, mapActions } = createNamespacedHelpers('home/mine');
@@ -73,9 +70,6 @@ export default { @@ -73,9 +70,6 @@ export default {
73 noticeScroll: scroll, 70 noticeScroll: scroll,
74 singleImage, 71 singleImage,
75 bind, 72 bind,
76 - Style,  
77 - Scroll  
78 -  
79 } 73 }
80 }; 74 };
81 </script> 75 </script>
@@ -83,12 +77,9 @@ export default { @@ -83,12 +77,9 @@ export default {
83 <style lang="scss" scoped> 77 <style lang="scss" scoped>
84 .body { 78 .body {
85 height: 100%; 79 height: 100%;
86 - // overflow-y: auto; 80 + overflow-y: auto;
87 background-color: white; 81 background-color: white;
88 - // padding: 0 40px;  
89 -}  
90 -.marg {  
91 - margin: 0 40px; 82 + padding: 0 40px;
92 } 83 }
93 84
94 .bg-top, 85 .bg-top,
@@ -39,6 +39,7 @@ export default { @@ -39,6 +39,7 @@ export default {
39 </script> 39 </script>
40 40
41 <style lang="scss" scoped> 41 <style lang="scss" scoped>
  42 +@import "../../../../statics/scss/variable";
42 .income-header-wrapper { 43 .income-header-wrapper {
43 position: relative; 44 position: relative;
44 } 45 }
@@ -50,6 +51,7 @@ export default { @@ -50,6 +51,7 @@ export default {
50 font-size: 40px; 51 font-size: 40px;
51 font-weight: bold; 52 font-weight: bold;
52 margin-bottom: 44px; 53 margin-bottom: 44px;
  54 + @include num
53 } 55 }
54 .income { 56 .income {
55 margin-bottom: 20px; 57 margin-bottom: 20px;
@@ -4,8 +4,8 @@ @@ -4,8 +4,8 @@
4 <div class="filter"> 4 <div class="filter">
5 <div class="filter-tab"> 5 <div class="filter-tab">
6 <div class="tab-item" :class="selectedType === 2 && 'selected-tab'" @click="pressType(2)">人气</div> 6 <div class="tab-item" :class="selectedType === 2 && 'selected-tab'" @click="pressType(2)">人气</div>
7 - <div class="tab-item middle" :class="selectedType === 1 && 'selected-tab'" @click="pressType(1)">  
8 - <span>价格</span> 7 + <div class="tab-item middle" @click="pressType(1)">
  8 + <span :class="selectedType === 1 && 'selected-tab'">价格</span>
9 <div :class="arrowImage"></div> 9 <div :class="arrowImage"></div>
10 </div> 10 </div>
11 <div class="tab-item" :class="selectedType === 3 && 'selected-tab'" @click="pressType(3)">新品</div> 11 <div class="tab-item" :class="selectedType === 3 && 'selected-tab'" @click="pressType(3)">新品</div>
1 <!--买家求购确认页--> 1 <!--买家求购确认页-->
2 <template> 2 <template>
3 <LayoutApp :show-back="true" title="出价求购"> 3 <LayoutApp :show-back="true" title="出价求购">
4 - <cube-scroll :options="options">  
5 <div class="body" ref="body"> 4 <div class="body" ref="body">
6 5
7 <div class="topContainer"> 6 <div class="topContainer">
@@ -77,7 +76,6 @@ @@ -77,7 +76,6 @@
77 </div> 76 </div>
78 77
79 </div> 78 </div>
80 - </cube-scroll>  
81 <div class="bottomContainer"> 79 <div class="bottomContainer">
82 <OrderAgree :value="isAgreeTerms" @input="isAgreeTerms = !isAgreeTerms" class="agree-wrapper" :desc="agreeDesc" :url="url"></OrderAgree> 80 <OrderAgree :value="isAgreeTerms" @input="isAgreeTerms = !isAgreeTerms" class="agree-wrapper" :desc="agreeDesc" :url="url"></OrderAgree>
83 <div class="btn-wrapper"> 81 <div class="btn-wrapper">
@@ -216,7 +214,8 @@ export default { @@ -216,7 +214,8 @@ export default {
216 // if (this.originProductData.least_price && this.originProductData.skup && this.originProductData.least_price <= this.inputPrice) { 214 // if (this.originProductData.least_price && this.originProductData.skup && this.originProductData.least_price <= this.inputPrice) {
217 // this.showBuyDialog(); 215 // this.showBuyDialog();
218 // } else { 216 // } else {
219 - this.computePrice(); 217 + this.computePrice();
  218 +
220 // } 219 // }
221 }, 500, {leading: false, trailing: true}), 220 }, 500, {leading: false, trailing: true}),
222 221
@@ -335,19 +334,6 @@ export default { @@ -335,19 +334,6 @@ export default {
335 payOrder() { 334 payOrder() {
336 let vm = this; 335 let vm = this;
337 336
338 - this.$store.dispatch('reportYas', {  
339 - params: {  
340 - appop: 'UFO_WTBUY_ORD',  
341 - param: {  
342 - ORDER_NUM: get(this.publishresult, 'orderCode', ''),  
343 - PRD_STORAGEID: this.storageId,  
344 - PRD_SIZE: get(this.originProductData, 'sizeName', ''),  
345 - PRICE: this.inputPrice,  
346 - FORNT_AMOUNT: get(this.publishresult, 'depositAmount', '')  
347 - }  
348 - }  
349 - });  
350 -  
351 this.$createOrderPayType({ 337 this.$createOrderPayType({
352 price: get(this.publishresult, 'depositAmount', ''), 338 price: get(this.publishresult, 'depositAmount', ''),
353 desc: '定金', 339 desc: '定金',
@@ -374,6 +360,20 @@ export default { @@ -374,6 +360,20 @@ export default {
374 vm.onClose(get(vm.publishresult, 'orderCode', '')); 360 vm.onClose(get(vm.publishresult, 'orderCode', ''));
375 } 361 }
376 }).show(); 362 }).show();
  363 +
  364 + this.$store.dispatch('reportYas', {
  365 + params: {
  366 + appop: 'UFO_WTBUY_ORD',
  367 + param: {
  368 + ORDER_NUM: get(this.publishresult, 'orderCode', ''),
  369 + PRD_STORAGEID: this.storageId,
  370 + PRD_SIZE: get(this.originProductData, 'sizeName', ''),
  371 + PRICE: this.inputPrice,
  372 + FORNT_AMOUNT: get(this.publishresult, 'depositAmount', '')
  373 + }
  374 + }
  375 + });
  376 +
377 }, 377 },
378 showPicker() { 378 showPicker() {
379 379
@@ -36,6 +36,8 @@ export default { @@ -36,6 +36,8 @@ export default {
36 </script> 36 </script>
37 37
38 <style lang="scss" scoped> 38 <style lang="scss" scoped>
  39 +@import "../../../../statics/scss/variable";
  40 +
39 .price-item { 41 .price-item {
40 display: flex; 42 display: flex;
41 font-size: 28px; 43 font-size: 28px;
@@ -50,5 +52,6 @@ export default { @@ -50,5 +52,6 @@ export default {
50 font-size: 36px; 52 font-size: 36px;
51 color: #d0021b; 53 color: #d0021b;
52 font-weight: bold; 54 font-weight: bold;
  55 + @include num
53 } 56 }
54 </style> 57 </style>
@@ -25,6 +25,8 @@ export default { @@ -25,6 +25,8 @@ export default {
25 </script> 25 </script>
26 26
27 <style lang="scss" scoped> 27 <style lang="scss" scoped>
  28 +@import "../../../../statics/scss/variable";
  29 +
28 .product-wrapper { 30 .product-wrapper {
29 height: 180px; 31 height: 180px;
30 } 32 }
@@ -60,6 +62,7 @@ export default { @@ -60,6 +62,7 @@ export default {
60 font-size: 28px; 62 font-size: 28px;
61 margin-bottom: 12px; 63 margin-bottom: 12px;
62 font-weight: bold; 64 font-weight: bold;
  65 + @include num
63 } 66 }
64 67
65 </style> 68 </style>
@@ -67,6 +67,8 @@ export default { @@ -67,6 +67,8 @@ export default {
67 </script> 67 </script>
68 68
69 <style lang="scss" scoped> 69 <style lang="scss" scoped>
  70 +@import "../../../statics/scss/variable";
  71 +
70 .count-down-wrapper { 72 .count-down-wrapper {
71 display: flex; 73 display: flex;
72 font-size: 32px; 74 font-size: 32px;
@@ -84,6 +86,7 @@ export default { @@ -84,6 +86,7 @@ export default {
84 86
85 & > span { 87 & > span {
86 padding: 0 9px; 88 padding: 0 9px;
  89 + @include num
87 } 90 }
88 } 91 }
89 -</style>  
  92 +</style>
1 <!--卖家求购变现--> 1 <!--卖家求购变现-->
2 <template> 2 <template>
3 <LayoutApp :show-back="true" title="变现"> 3 <LayoutApp :show-back="true" title="变现">
4 - <cube-scroll :options="options">  
5 <div class="body"> 4 <div class="body">
6 <!--<TitleComp txt="变现"></TitleComp>--> 5 <!--<TitleComp txt="变现"></TitleComp>-->
7 6
@@ -17,7 +16,6 @@ @@ -17,7 +16,6 @@
17 <AddressInfo :data="addressInfo" class="order-item"></AddressInfo> 16 <AddressInfo :data="addressInfo" class="order-item"></AddressInfo>
18 17
19 </div> 18 </div>
20 - </cube-scroll>  
21 <div class="footer"> 19 <div class="footer">
22 <OrderAgree :value="isAgreeTerms" @input="isAgreeTerms = !isAgreeTerms" class="agree-wrapper" :desc="agreeDesc" :url="url"></OrderAgree> 20 <OrderAgree :value="isAgreeTerms" @input="isAgreeTerms = !isAgreeTerms" class="agree-wrapper" :desc="agreeDesc" :url="url"></OrderAgree>
23 <div class="btn-wrapper"> 21 <div class="btn-wrapper">
@@ -69,6 +69,7 @@ export default { @@ -69,6 +69,7 @@ export default {
69 } 69 }
70 }, 70 },
71 hide() { 71 hide() {
  72 + this.$emit('hide');
72 this.isVisible = false; 73 this.isVisible = false;
73 }, 74 },
74 maskClick() { 75 maskClick() {
1 <template> 1 <template>
2 - <action-sheet @hidden="onHidden" ref="popup"> 2 + <action-sheet @hidden="onHidden" @hide="onHide" ref="popup">
3 <div class="activity-sheet"> 3 <div class="activity-sheet">
4 <h3>活动详情</h3> 4 <h3>活动详情</h3>
5 <div class="list" > 5 <div class="list" >
6 <cube-scroll ref="activityListScroll" :data="list"> 6 <cube-scroll ref="activityListScroll" :data="list">
7 <ul> 7 <ul>
8 <li v-for="(item, idx) in list" :key="idx"> 8 <li v-for="(item, idx) in list" :key="idx">
9 - <div class="activityName"><span>{{item.promotionTypeStr}}</span> {{item.activityName}}</div> 9 + <div class="activity-name"><span>{{item.promotionTypeStr}}</span> {{item.activityName}}</div>
10 <div class="sub">{{item.startTimeStr}}-{{item.endTimeStr}}</div> 10 <div class="sub">{{item.startTimeStr}}-{{item.endTimeStr}}</div>
11 </li> 11 </li>
12 </ul> 12 </ul>
@@ -41,6 +41,9 @@ export default { @@ -41,6 +41,9 @@ export default {
41 onHidden() { 41 onHidden() {
42 this.$emit('hidden'); 42 this.$emit('hidden');
43 }, 43 },
  44 + onHide() {
  45 + this.$emit('hide');
  46 + },
44 } 47 }
45 }; 48 };
46 </script> 49 </script>
@@ -89,7 +92,7 @@ export default { @@ -89,7 +92,7 @@ export default {
89 border-bottom: 1px solid #ccc; 92 border-bottom: 1px solid #ccc;
90 } 93 }
91 94
92 - .activityName { 95 + .activity-name {
93 font-size: 28px; 96 font-size: 28px;
94 font-weight: bold; 97 font-weight: bold;
95 } 98 }
1 <template> 1 <template>
2 <action-sheet position="right" ref="popup" 2 <action-sheet position="right" ref="popup"
3 @hidden="onHidden" 3 @hidden="onHidden"
  4 + @hide="onHide"
4 @shown="onShown" 5 @shown="onShown"
5 :panelStyle="{background: 'transparent', paddingLeft: '20%'}" 6 :panelStyle="{background: 'transparent', paddingLeft: '20%'}"
6 :hasBorderRadius="false" 7 :hasBorderRadius="false"
@@ -71,6 +72,7 @@ export default { @@ -71,6 +72,7 @@ export default {
71 size_id: info.size_id, 72 size_id: info.size_id,
72 name: name[0], 73 name: name[0],
73 subName: name[1], 74 subName: name[1],
  75 + size_name: info.size_name,
74 price, 76 price,
75 storage_id: info.storage_id, 77 storage_id: info.storage_id,
76 available: info.storage_num > 0 && price !== '-', 78 available: info.storage_num > 0 && price !== '-',
@@ -98,6 +100,9 @@ export default { @@ -98,6 +100,9 @@ export default {
98 onHidden() { 100 onHidden() {
99 this.$emit('hidden'); 101 this.$emit('hidden');
100 }, 102 },
  103 + onHide() {
  104 + this.$emit('hide');
  105 + },
101 onShown() { 106 onShown() {
102 // refresh list 107 // refresh list
103 if (this.$refs.scroll) { 108 if (this.$refs.scroll) {
@@ -124,7 +129,7 @@ export default { @@ -124,7 +129,7 @@ export default {
124 this.$store.commit('order/buyerAskOrder/BUYER_ASK_SET_PRODUCTINFO', { 129 this.$store.commit('order/buyerAskOrder/BUYER_ASK_SET_PRODUCTINFO', {
125 bid_moster_price: get(product, 'bid_moster_price', ''), 130 bid_moster_price: get(product, 'bid_moster_price', ''),
126 least_price: get(product, 'least_price', ''), 131 least_price: get(product, 'least_price', ''),
127 - sizeName: product.name, 132 + sizeName: product.size_name,
128 sizeId: get(data, 'sizeId', ''), 133 sizeId: get(data, 'sizeId', ''),
129 colorName: get(this.productDetail, 'goods_list[0].color_name', ''), 134 colorName: get(this.productDetail, 'goods_list[0].color_name', ''),
130 product_name: this.goodsName, 135 product_name: this.goodsName,
1 <template> 1 <template>
2 - <action-sheet @hidden="onHidden" @shown="onShown" position="right" ref="popup" :full="true"> 2 + <action-sheet @hidden="onHidden" @hide="onHide" @shown="onShown" position="right" ref="popup" :full="true">
3 <div class="buy-sheet"> 3 <div class="buy-sheet">
4 <div class="header"> 4 <div class="header">
5 <div class="back-wrapper flex" @touchend="onBack"> 5 <div class="back-wrapper flex" @touchend="onBack">
@@ -77,6 +77,9 @@ export default { @@ -77,6 +77,9 @@ export default {
77 onHidden() { 77 onHidden() {
78 this.$emit('hidden'); 78 this.$emit('hidden');
79 }, 79 },
  80 + onHide() {
  81 + this.$emit('hide');
  82 + },
80 onShown() { 83 onShown() {
81 if (this.$refs.sizeList) { 84 if (this.$refs.sizeList) {
82 this.$refs.sizeList.refreshScroll(); 85 this.$refs.sizeList.refreshScroll();
1 <template> 1 <template>
2 - <action-sheet @hidden="onHidden" @shown="onShown" ref="popup"> 2 + <action-sheet @hidden="onHidden" @hide="onHide" @shown="onShown" ref="popup">
3 <div class="size-select-sheet"> 3 <div class="size-select-sheet">
4 <div class="select-size"> 4 <div class="select-size">
5 <div class="title" @click="hide">{{config.title}}<i class="cubeic-close"></i></div> 5 <div class="title" @click="hide">{{config.title}}<i class="cubeic-close"></i></div>
@@ -148,6 +148,9 @@ export default { @@ -148,6 +148,9 @@ export default {
148 onHidden() { 148 onHidden() {
149 this.$emit('hidden'); 149 this.$emit('hidden');
150 }, 150 },
  151 + onHide() {
  152 + this.$emit('hide');
  153 + },
151 onShown() { 154 onShown() {
152 if (this.$refs.sizeList) { 155 if (this.$refs.sizeList) {
153 this.$refs.sizeList.refreshScroll(); 156 this.$refs.sizeList.refreshScroll();
@@ -218,6 +221,7 @@ export default { @@ -218,6 +221,7 @@ export default {
218 221
219 <style lang="scss" scoped> 222 <style lang="scss" scoped>
220 @import "../product-detail"; 223 @import "../product-detail";
  224 + @import "../../../statics/scss/variable";
221 225
222 .title { 226 .title {
223 font-size: 40px; 227 font-size: 40px;
@@ -257,6 +261,7 @@ export default { @@ -257,6 +261,7 @@ export default {
257 padding-top: 30px; 261 padding-top: 30px;
258 font-size: 32px; 262 font-size: 32px;
259 color: #000; 263 color: #000;
  264 + @include num
260 } 265 }
261 } 266 }
262 } 267 }
@@ -355,6 +360,7 @@ export default { @@ -355,6 +360,7 @@ export default {
355 i { 360 i {
356 font-size: 20px; 361 font-size: 20px;
357 font-style: normal; 362 font-style: normal;
  363 + @include num
358 } 364 }
359 } 365 }
360 } 366 }
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <div class="layout"> 2 <div class="layout">
3 <LayoutHeader class="layout-header" :show-back="true" :title="'\u200E'"></LayoutHeader> 3 <LayoutHeader class="layout-header" :show-back="true" :title="'\u200E'"></LayoutHeader>
4 <div class="layout-context fixscroll"> 4 <div class="layout-context fixscroll">
5 - <cube-scroll :data="imageList" ref="pageScroll"> 5 + <div class="cube-scroll-wrapper" ref="pageScroll">
6 <div class="slide"> 6 <div class="slide">
7 <cube-slide ref="slide" :data="imageList"> 7 <cube-slide ref="slide" :data="imageList">
8 <cube-slide-item v-for="(item, index) in imageList" :key="index"> 8 <cube-slide-item v-for="(item, index) in imageList" :key="index">
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 </cube-slide-item> 12 </cube-slide-item>
13 <template slot="dots" slot-scope="props"> 13 <template slot="dots" slot-scope="props">
14 <div class="dot-wrap"> 14 <div class="dot-wrap">
15 - <span class="dot" :class="{active: props.current === index}" v-for="(item, index) in props.dots">&bull;</span> 15 + <span class="cube-dot" :class="{active: props.current === index}" v-for="(item, index) in props.dots">&bull;</span>
16 </div> 16 </div>
17 </template> 17 </template>
18 </cube-slide> 18 </cube-slide>
@@ -31,14 +31,14 @@ @@ -31,14 +31,14 @@
31 </a> 31 </a>
32 <div class="info"> 32 <div class="info">
33 <transition-group name="info-list" tag="div" class="info-list"> 33 <transition-group name="info-list" tag="div" class="info-list">
34 - <div class="info-list-item" transtion="fade" v-if="activity && activity.length !== 0" @click="showActivity" key="promotion"> 34 + <div class="info-list-item" transtion="fade" v-if="activity && activity.length !== 0" @click="showActivity" key="促销">
35 <div class="info-list-name">促销</div> 35 <div class="info-list-name">促销</div>
36 <div class="info-list-value info-promote"> 36 <div class="info-list-value info-promote">
37 <span>{{activity[0].promotionTypeStr}}</span> 37 <span>{{activity[0].promotionTypeStr}}</span>
38 <i class="cubeic-arrow"></i> 38 <i class="cubeic-arrow"></i>
39 </div> 39 </div>
40 </div> 40 </div>
41 - <div class="info-list-item" v-for="(desc, index) in productDec" :key="index"> 41 + <div class="info-list-item" v-for="desc in productDec" :key="desc.text">
42 <div class="info-list-name">{{desc.text}}</div> 42 <div class="info-list-name">{{desc.text}}</div>
43 <div class="info-list-value">{{desc.value}}</div> 43 <div class="info-list-value">{{desc.value}}</div>
44 </div> 44 </div>
@@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@
52 <div class="recommend" v-if="recommend"><h2>相关推荐</h2> 52 <div class="recommend" v-if="recommend"><h2>相关推荐</h2>
53 <product-list :list="recommend" priceKey="price"/> 53 <product-list :list="recommend" priceKey="price"/>
54 </div> 54 </div>
55 - </cube-scroll> 55 + </div>
56 <div class="footer"> 56 <div class="footer">
57 <div class="heart"> 57 <div class="heart">
58 <div class="icon-fav" v-if="isFav" @click="_toggleFav(false)"> 58 <div class="icon-fav" v-if="isFav" @click="_toggleFav(false)">
@@ -80,23 +80,23 @@ @@ -80,23 +80,23 @@
80 <cube-button class="sell" @click="sell">出售</cube-button> 80 <cube-button class="sell" @click="sell">出售</cube-button>
81 <cube-button class="buy active" @click="buy">购买</cube-button> 81 <cube-button class="buy active" @click="buy">购买</cube-button>
82 </div> 82 </div>
83 - <buy-sheet v-if="showBidSheet" @hidden="onBidSheet" :productId="productId"/>  
84 - <size-request-sheet v-if="showSizeRequestSheet" @hidden="onSizeRequestHidden" :productId="productId"/> 83 + <buy-sheet v-if="showBidSheet" @hide="onBidSheetHide" :productId="productId"/>
  84 + <size-request-sheet v-if="showSizeRequestSheet" @hide="onSizeRequestHide" :productId="productId"/>
85 </div> 85 </div>
86 - <activity-list-sheet v-if="showActivitySheet" :list="activity" @hidden="onActivitySheetHidden"/> 86 + <activity-list-sheet v-if="showActivitySheet" :list="activity" @hide="onActivitySheetHide"/>
87 <size-select-sheet v-if="showSizeSelectSheet" 87 <size-select-sheet v-if="showSizeSelectSheet"
88 :list="sizeList" 88 :list="sizeList"
89 :product="productDetail" 89 :product="productDetail"
90 :image-list="imageList" 90 :image-list="imageList"
91 :config="selectSizeConfig" 91 :config="selectSizeConfig"
92 - @hidden="onSizeSelectSheetHidden" 92 + @hide="onSizeSelectSheetHide"
93 @select="onSelectTradeProduct" 93 @select="onSelectTradeProduct"
94 @add="onRequestSize"/> 94 @add="onRequestSize"/>
95 </div> 95 </div>
96 </template> 96 </template>
97 97
98 <script> 98 <script>
99 -import { Button, Slide, Scroll, Popup } from 'cube-ui'; 99 +import { Button, Slide, Popup } from 'cube-ui';
100 import { get } from 'lodash'; 100 import { get } from 'lodash';
101 import { createNamespacedHelpers, mapGetters } from 'vuex'; 101 import { createNamespacedHelpers, mapGetters } from 'vuex';
102 102
@@ -131,7 +131,6 @@ export default { @@ -131,7 +131,6 @@ export default {
131 'cube-button': Button, 131 'cube-button': Button,
132 'cube-slide': Slide, 132 'cube-slide': Slide,
133 'cube-slide-item': Slide.Item, 133 'cube-slide-item': Slide.Item,
134 - 'cube-scroll': Scroll,  
135 'cube-popup': Popup, 134 'cube-popup': Popup,
136 }, 135 },
137 props: { 136 props: {
@@ -194,15 +193,28 @@ export default { @@ -194,15 +193,28 @@ export default {
194 193
195 // 在action-sheet显示控制与对应关闭方法 194 // 在action-sheet显示控制与对应关闭方法
196 this.actionSheetCloseMap = { 195 this.actionSheetCloseMap = {
197 - showActivitySheet: 'onActivitySheetHidden',  
198 - showBidSheet: 'onBidSheet',  
199 - showSizeSelectSheet: 'onSizeSelectSheetHidden',  
200 - showSizeRequestSheet: 'onSizeRequestHidden', 196 + showActivitySheet: 'onActivitySheetHide',
  197 + showBidSheet: 'onBidSheetHide',
  198 + showSizeSelectSheet: 'onSizeSelectSheetHide',
  199 + showSizeRequestSheet: 'onSizeRequestHide',
201 }; 200 };
202 }, 201 },
  202 + asyncData({store, router}) {
  203 + const productId = parseInt(router.params.productId, 10);
  204 +
  205 + if (isNaN(productId)) {
  206 + throw new Error('无效的商品ID');
  207 + }
  208 +
  209 + return store.dispatch('product/fetchProductInfo', {productId});
  210 + },
203 activated() { 211 activated() {
204 - this.$refs.pageScroll && this.$refs.pageScroll.scrollTo(0, 0, 0); 212 + if (this.$refs.pageScroll) {
  213 + this.$refs.pageScroll.scrollTop = 0;
  214 + }
  215 +
205 this.loadData(this.productId); 216 this.loadData(this.productId);
  217 + this.refresh();
206 }, 218 },
207 beforeRouteUpdate(to, from ,next) { 219 beforeRouteUpdate(to, from ,next) {
208 if (this.historyBackGuard() === false) { 220 if (this.historyBackGuard() === false) {
@@ -231,7 +243,7 @@ export default { @@ -231,7 +243,7 @@ export default {
231 return true; 243 return true;
232 }, 244 },
233 refresh() { 245 refresh() {
234 - this.$refs.slide.refresh(); 246 + this.$refs.slide && this.$refs.slide.refresh && this.$refs.slide.refresh();
235 }, 247 },
236 sizeImg(src, width = 360, height = 72) { 248 sizeImg(src, width = 360, height = 72) {
237 if (src) { 249 if (src) {
@@ -240,20 +252,9 @@ export default { @@ -240,20 +252,9 @@ export default {
240 }, 252 },
241 253
242 // 加载商品详情数据 254 // 加载商品详情数据
243 - loadData(productId = this.productId, loading) {  
244 - loading && loading.show();  
245 - 255 + loadData(productId = this.productId) {
246 this.fetchBrandTop({productId}); 256 this.fetchBrandTop({productId});
247 this.fetchFav({productId}); 257 this.fetchFav({productId});
248 -  
249 - return this.fetchProductInfo({productId}).then(() => {  
250 - loading && loading.hide();  
251 - setTimeout(() => {  
252 - this.refresh();  
253 - }, 200);  
254 - }).catch(() => {  
255 - loading && loading.hide();  
256 - });  
257 }, 258 },
258 259
259 /** 260 /**
@@ -318,12 +319,12 @@ export default { @@ -318,12 +319,12 @@ export default {
318 }, 319 },
319 320
320 // 关闭活动列表 321 // 关闭活动列表
321 - onActivitySheetHidden() { 322 + onActivitySheetHide() {
322 this.showActivitySheet = false; 323 this.showActivitySheet = false;
323 }, 324 },
324 325
325 // 选择尺寸 326 // 选择尺寸
326 - onSizeSelectSheetHidden() { 327 + onSizeSelectSheetHide() {
327 this.showSizeSelectSheet = false; 328 this.showSizeSelectSheet = false;
328 }, 329 },
329 330
@@ -430,7 +431,7 @@ export default { @@ -430,7 +431,7 @@ export default {
430 }, 431 },
431 432
432 // 添加尺寸关闭 433 // 添加尺寸关闭
433 - onSizeRequestHidden() { 434 + onSizeRequestHide() {
434 this.showSizeRequestSheet = false; 435 this.showSizeRequestSheet = false;
435 }, 436 },
436 437
@@ -440,7 +441,7 @@ export default { @@ -440,7 +441,7 @@ export default {
440 }, 441 },
441 442
442 // 购买 443 // 购买
443 - onBidSheet() { 444 + onBidSheetHide() {
444 this.showBidSheet = false; 445 this.showBidSheet = false;
445 }, 446 },
446 }, 447 },
@@ -485,20 +486,17 @@ export default { @@ -485,20 +486,17 @@ export default {
485 padding-bottom: 10px; 486 padding-bottom: 10px;
486 } 487 }
487 488
488 - .dot { 489 + .cube-dot {
489 display: inline-block; 490 display: inline-block;
490 - width: 8px;  
491 - height: 8px; 491 + width: 6px;
  492 + height: 6px;
492 margin: 0 10px; 493 margin: 0 10px;
493 - background: radial-gradient(8px 8px at 50% 50%, rgba(0, 0, 0, 0.15) 50%, transparent 50%) no-repeat;  
494 - 494 + background: rgba(0, 0, 0, 0.15);
  495 + border-radius: 50%;
495 &.active { 496 &.active {
496 - /*margin: 2px 10px 0;*/  
497 - /*width: 12px;*/  
498 - /*height: 12px;*/  
499 transform-origin: 50% 50%; 497 transform-origin: 50% 50%;
500 - transform: scale(1.5);  
501 - background: radial-gradient(8px 8px at 50% 50%, rgba(0, 0, 0, 1) 50%, transparent 50%) no-repeat; 498 + transform: scale(1.3333);
  499 + background: rgba(0, 0, 0, 1);
502 } 500 }
503 } 501 }
504 502
@@ -585,7 +583,7 @@ export default { @@ -585,7 +583,7 @@ export default {
585 flex-direction: column; 583 flex-direction: column;
586 justify-content: center; 584 justify-content: center;
587 align-items: center; 585 align-items: center;
588 - overflow: hidden; 586 + overflow: Hide;
589 587
590 div { 588 div {
591 font-size: 28px; 589 font-size: 28px;
@@ -658,16 +656,8 @@ export default { @@ -658,16 +656,8 @@ export default {
658 } 656 }
659 657
660 .cube-scroll-wrapper { 658 .cube-scroll-wrapper {
661 - height: auto;  
662 flex: 1 0 0; 659 flex: 1 0 0;
663 -  
664 - // 当前页面上面白色背景,底部recommend的f2f2f2, scroll的moment功能会使用cube-scroll-wrapper的顶部及底部做空内容填充  
665 - background: linear-gradient(to bottom, #fff 0, #f2f2f2 100%);  
666 -  
667 - // 这里覆盖cube-scroll-wrapper渐变背景  
668 - /deep/ .cube-scroll-content {  
669 - background: #fff;  
670 - } 660 + overflow: scroll;
671 } 661 }
672 662
673 .footer { 663 .footer {
1 $xianyu-theme-red: #d0021b; 1 $xianyu-theme-red: #d0021b;
  2 +
  3 +@mixin num {
  4 + font-family: "DINAlternate-Bold", "sans-serif-condensed", "sans-serif";
  5 +}
@@ -44,7 +44,7 @@ export default function() { @@ -44,7 +44,7 @@ export default function() {
44 let params = new URLSearchParams(); 44 let params = new URLSearchParams();
45 45
46 params.append('pagename', 'productList'); 46 params.append('pagename', 'productList');
47 - params.append('title', item.linkType); 47 + params.append('title', item.name);
48 params.append(`${item.linkType}`, item.link); 48 params.append(`${item.linkType}`, item.link);
49 49
50 item.isShow = false; 50 item.isShow = false;
@@ -63,7 +63,7 @@ export default function() { @@ -63,7 +63,7 @@ export default function() {
63 let params = new URLSearchParams(); 63 let params = new URLSearchParams();
64 64
65 params.append('pagename', 'productList'); 65 params.append('pagename', 'productList');
66 - params.append('title', item.linkType); 66 + params.append('title', item.name);
67 params.append(`${item.linkType}`, item.link); 67 params.append(`${item.linkType}`, item.link);
68 68
69 return `${hostUrl}?${params}` 69 return `${hostUrl}?${params}`
@@ -90,7 +90,7 @@ export default function() { @@ -90,7 +90,7 @@ export default function() {
90 }, 90 },
91 getMineList(state) { 91 getMineList(state) {
92 let tabList = { 92 let tabList = {
93 - board: { title: '', page: 'noticeList' }, 93 + // board: { title: '', page: 'noticeList' },
94 sale: { 94 sale: {
95 title: '出售中', 95 title: '出售中',
96 num: state.sellerNum, 96 num: state.sellerNum,