默认提交
Showing
18 changed files
with
621 additions
and
76 deletions
... | @@ -75,6 +75,7 @@ | ... | @@ -75,6 +75,7 @@ |
75 | "gift-sign-tips-comp": "../../component/gift-sign-tips-comp/gift-sign-tips-comp", | 75 | "gift-sign-tips-comp": "../../component/gift-sign-tips-comp/gift-sign-tips-comp", |
76 | "order-submit-success-tips-comp": "../../component/order-submit-success-tips-comp/order-submit-success-tips-comp", | 76 | "order-submit-success-tips-comp": "../../component/order-submit-success-tips-comp/order-submit-success-tips-comp", |
77 | "empty-tips": "../../component/empty-tips/empty-tips", | 77 | "empty-tips": "../../component/empty-tips/empty-tips", |
78 | "empty-tips-light": "../../component/empty-tips-light/empty-tips-light", | ||
78 | "van-popup": "../../ui/vant-weapp/popup/index" | 79 | "van-popup": "../../ui/vant-weapp/popup/index" |
79 | } | 80 | } |
80 | } | 81 | } | ... | ... |
... | @@ -94,7 +94,7 @@ $contentWidth:690px; | ... | @@ -94,7 +94,7 @@ $contentWidth:690px; |
94 | @font-face { | 94 | @font-face { |
95 | font-family: "iconfont"; | 95 | font-family: "iconfont"; |
96 | // src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAScAAsAAAAACWAAAARQAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDSAqFVIRuATYCJAMYCw4ABCAFhG0HVRshCMgOJSGRwABgYAPDUEoeHvd7PTfJSwFAEah6VmX1dTtS08QKyKgZO6MrzNCI9/9/p93MlJPWQetZqTCDwumbgGcyBbEQPyFlu+svwP9zP59X1mB57dlcIpO6qHBnQOMBDSiiLVJ4Axl/1g9uMj9DgoHJYeziMrYT6LVoIdZxQpoAzBRav0A8lEvLwSymU0oooVtZc6YW8R2MdacP2GUA39zvx3/wCTOSJtOGXj2Ir4SoXzYvA/HW/62KaoC2/ixgZpGxBRTiRa7tEdwPbsH1Sn/ByAnQr1tSftk84z7b8oJ5Gfi/BTGR5gr9eipF0vT4z4sKyfoh7izU8MvGRCj84iIkfm1BaPjDI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KI8Ti8zkmnVyBipdUwdAA==') format('woff2'), | 96 | // src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAScAAsAAAAACWAAAARQAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDSAqFVIRuATYCJAMYCw4ABCAFhG0HVRshCMgOJSGRwABgYAPDUEoeHvd7PTfJSwFAEah6VmX1dTtS08QKyKgZO6MrzNCI9/9/p93MlJPWQetZqTCDwumbgGcyBbEQPyFlu+svwP9zP59X1mB57dlcIpO6qHBnQOMBDSiiLVJ4Axl/1g9uMj9DgoHJYeziMrYT6LVoIdZxQpoAzBRav0A8lEvLwSymU0oooVtZc6YW8R2MdacP2GUA39zvx3/wCTOSJtOGXj2Ir4SoXzYvA/HW/62KaoC2/ixgZpGxBRTiRa7tEdwPbsH1Sn/ByAnQr1tSftk84z7b8oJ5Gfi/BTGR5gr9eipF0vT4z4sKyfoh7izU8MvGRCj84iIkfm1BaPjDIGT+BgpOS1VRlz7cAsQOaPgtstj5d4Rm2sJiwdWa42RrY6ulpEvbeDlLtnAqJzlZk8u4aPEAP3fpSuXt24I7d4R374oNhiJLRB4nmnP7duGSfo5AlMO3tXKFgsnW7QN8sXDxwM42nki8tK3mqIFow/X54sSBO+ECS/w5TujcY2N92Rz53GqTg2ASsDfb2bYDO1l46xNX5PVv4qy63W9wW7KFIH7scBavZFt/chQu3zazYAlvehIBR+Uu3swXr1AmWrKJw5lczhUu3srnL10hZneQz3q7g0dMbgPo8EzXZ6VkJQlEttQOBNR5QVncISGLWroG2VIHRSxo/2/IU1P4BrHLsYrCmEN92IEDGOK+5UARjuM+XO64nNbYV6Wv1xw+6P43+saNYsePY6Nil50laln7B910+c7pbYU5oEojI9iIVbBZ1r9w7vTe3vnzwe/ml+vG+g0bjh3LOf5Fq1W+Hs8G/7d39kaNdr0PNHe39rU+aJrdzQN/k9GLbIudBavigso8bNUCD8vnXpHt2SvHuBru2I2kPb0Ez2yxxi1na+LP1TdyvBG18WcVp2bVxJ3d0jBLpchzG7aoZmJpcMV7ix+w9nlq8tTH3dTXBhoB2tNpCl8EQH6DA7B0MANWH8+SRKFwixEr3/mhfmPufaG81Drsa3dfAbcRm2ZBQT0Z/BVytfm/T0EB2v9GwQqxvhaxvNlBoLpmjPwJvbqLFrpGPe5LNfEewqHbRAhJlwXIui2hCm4LGn12oeq2B702Jc7uM4aGi9KDDV0AwrC9kAz6CdmwK6iCewSNSW+hGg4cenXCfsk+KyEnYmlUzqBKsqKOlEu0GspGhvAyc5C0SlVOR4UuVYRovdxDent4JSOJSIPoPkboq6U+DEORFK1VkwlgN6RSaUkdrVUgCeMhYxhdiKcnlXcjD4lWDYQjNKQcA6lEqlCHJCehpUHZtRlE6vM5EKkqKuXokrISqwhC05M3TvLmwasGKlGmqVV2Lq31qkn5YDAo3ItC01IjJUALotKDWiRdficFRILhQdbCrxPCE1Wi6so8xleor3Id9NLWqZEiR4kmanTpuVMuUe5/U28TiUqrR96mNKI8Ti8zkmnVyBipdUwdAA==') format('woff2'), |
97 | src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAT4AAsAAAAAClgAAASsAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDdAqHBIYEATYCJAMgCxIABCAFhG0HZhv8CMgOJU2RwMBgYANAPDzt1+/cmXn+TXFL0ESrpU2IJ0LDo1hJlIqXQChfS9j//73sBlWmUDqts1JhDgrtTl9G0clkKX7SnP//fqWTxwcsrz0blBF8f6KaKgJoeIAGKGqzqch2QcpxH+AZLkzg3QR6e/SEXc8v1YCzQtgXiOdmY29wdhmVGEZoNXXImUV8g0qb3uNnAXzVvz62ITqcSapMOPL2s7w2yFxzfJVAjLCPcEc1w7vy7LidR8YpoBDfQp0fZDNyCqH/pBb3gBnxLxKsOT73fE4/r3m+7qXyKsFu97WiMnI14TZQKZJaU8s/L2qCcgLpT6INa44yomLNE1FYoxGJtRqFdKp1iGjYUBCZzQTxzCpb9YwZYJroiJcgqM/rypiR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pZ3sWQiHiMf7QgnRkQMKXyTBWKgCGfKEZIki6BxbFpleP1qfknPQU+4aRspcpSooo4m2uh0j3obrHOwNMrRwIk2FOUkI1Z6kc1EmkQeOQ0wC4OQYCQlrq/NAfGSMhAA') format('woff2'), | 97 | src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAacAAsAAAAADLwAAAZPAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCEIAqLFIkkATYCJAMoCxYABCAFhG0HgQMb7QojESaME0P2j4V402Eyc7TfPaKSlPTW5EN42b+ZSdJ0Umy7bn2Stw1O3B6A3SMXJ2D/kdWX8gEkAPx+02rFnXAjTKpce81XT9gPPfCGybaDY6mf1mB53/YuWb1sfhqOBxRdIuMNZAJT2yKeSy8VHOD7aiAAOLJQDaRdh24qZAjAagJ1Y0cVDIHssUBIIBPIeiniSAFkPUTIdAV9CmCd+nnyDeoQGaAQGfCevfzth6OVia8asoAVQH9hQ7A6F4D9cQADUA2AAJD9kZ6dzGSqgYFf/wICJgNwwAYGwYQpmTbTaY4yD5rvfTn1q4aWhf3IuD+BgxwFyBAhgCIeEuIa/ucRCUiTANi52XjABOODDJgSH0TAtPFBAEwnHyhgjpIU0x4ENYpo3wM+xAFfTnWB4SmRguwp0HB0hANAJkBOAzQfGNcNGnLzENDFayZQPAkJmZnJvMWRlmJLqcgT3GnOWa6A34hM8BfUGg268iIHHcNDjl6hzc4R4VXu/Oi2MYWFalGRVlJiFBf3pypdizZNhYX9Iisdqs5vfzjg1NRQ4Mgqt6GFVx0LunQjGpxxs5gXERvp5dBVRc3VRDaHcejDFaowtvecws/Uos+1ki+MYnMABycEoZwDypyk/R41BBo4oqSsOkZYpffc2nvlfsf2wpXFWZGDnB88mm5sU5JXebUth8v1jbjarVKPFGf4gNs4x2A9st/hCG1xauFDbnd0q6GU0EqCR108dBgocYCh7CvpeK8oV4ri1hG3Hq2QtPKwB5yH1NBpT5bf7me4o24FPLht3PmXGTte1b/0Jnvn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ThN/ejPf2EFV7FPO9hZxJDhkunTuh5SKlS5BGjpnUjdDYOJukevS756wRtDCfaE5SwEvS6r6S8vge//ht2S4oQRr4L/4OZXT5jQY8yA/NKsmUbsSms72BmCXIZYL5dM+EQuJJIphBq9WYCWHq5Aqu4woJlMVk3fvC6vbfkvexR8MCeUMCIQkUgkjsgk/hdYhuehSsdlWHN60Kk0TI8MQz+nuTtXMh5Pfr1gtffIVc73xy357XVRDcmv6FJv1NXTffLWydUV') format('woff2'); |
98 | } | 98 | } |
99 | 99 | ||
100 | .iconfont { | 100 | .iconfont { |
... | @@ -105,40 +105,46 @@ $contentWidth:690px; | ... | @@ -105,40 +105,46 @@ $contentWidth:690px; |
105 | -moz-osx-font-smoothing: grayscale; | 105 | -moz-osx-font-smoothing: grayscale; |
106 | } | 106 | } |
107 | 107 | ||
108 | .iconrefresh:before { | ||
109 | content: "\e874"; | ||
110 | } | ||
111 | 108 | ||
112 | .iconempty:before { | 109 | .iconbackicon1:before { |
113 | content: "\e6a6"; | 110 | content: "\e937"; |
114 | } | 111 | } |
115 | 112 | ||
116 | |||
117 | .iconclose1:before { | 113 | .iconclose1:before { |
118 | content: "\e615"; | 114 | content: "\e615"; |
119 | } | 115 | } |
120 | 116 | ||
117 | .iconrefresh:before { | ||
118 | content: "\e874"; | ||
119 | } | ||
120 | |||
121 | .iconhome:before { | 121 | .iconhome:before { |
122 | content: "\e610"; | 122 | content: "\e610"; |
123 | } | 123 | } |
124 | 124 | ||
125 | .iconxinzeng:before { | ||
126 | content: "\e606"; | ||
127 | } | ||
125 | 128 | ||
126 | .iconbackicon1:before { | 129 | .iconempty:before { |
127 | content: "\e937"; | 130 | content: "\e6a6"; |
128 | } | 131 | } |
129 | 132 | ||
130 | .iconplus:before { | 133 | .iconwuliu:before { |
131 | content: "\e653"; | 134 | content: "\e6dc"; |
132 | } | 135 | } |
133 | 136 | ||
134 | .iconplus:before { | 137 | .iconbaseline-close-px:before { |
135 | content: "\e653"; | 138 | content: "\e600"; |
136 | } | 139 | } |
137 | 140 | ||
138 | .iconxinzeng:before { | 141 | .iconlight:before { |
139 | content: "\e606"; | 142 | content: "\e669"; |
140 | } | 143 | } |
141 | 144 | ||
145 | |||
146 | |||
147 | |||
142 | .drop-down-item :last-child { | 148 | .drop-down-item :last-child { |
143 | border-bottom: none; | 149 | border-bottom: none; |
144 | } | 150 | } | ... | ... |
1 | Component({ | ||
2 | options: { | ||
3 | styleIsolation: 'apply-shared' // 接受外部样式 | ||
4 | }, | ||
5 | properties: { | ||
6 | // 这里定义了innerText属性,属性值可以在组件使用时指定 | ||
7 | innerText: { | ||
8 | type: String, | ||
9 | value: '这里空空如也~', | ||
10 | }, | ||
11 | emptyVisible: { | ||
12 | type: Boolean, | ||
13 | value: false | ||
14 | } | ||
15 | }, | ||
16 | data: { | ||
17 | // 这里是一些组件内部数据 | ||
18 | someData: {} | ||
19 | }, | ||
20 | methods: { | ||
21 | // 这里是一个自定义方法 | ||
22 | customMethod() {} | ||
23 | } | ||
24 | }) |
1 | //用的fixed 请确保 内容为空 | ||
2 | .empty-tips { | ||
3 | position: fixed; | ||
4 | text-align: center; | ||
5 | color: #666666; | ||
6 | font-size: 24px; | ||
7 | width: 100%; | ||
8 | height: 100%; | ||
9 | display: flex; | ||
10 | justify-content: center; | ||
11 | top: 20%; | ||
12 | |||
13 | .iconfont { | ||
14 | font-size: 240px; | ||
15 | } | ||
16 | |||
17 | .tips { | ||
18 | padding: 20px; | ||
19 | color: #8f8f8f; | ||
20 | } | ||
21 | } |
1 | import { | 1 | import { |
2 | getBindtapData | 2 | getBindtapData |
3 | } from '../../utils/util'; | 3 | } from '../../utils/util'; |
4 | let Date = require('../../utils/date.js'); | ||
4 | 5 | ||
5 | let app = getApp(); | 6 | let app = getApp(); |
6 | Page({ | 7 | Page({ |
7 | data: {}, | 8 | data: { |
9 | authorizeVisible: false, | ||
10 | userInfo: {}, | ||
11 | total: 0, | ||
12 | page: 1, | ||
13 | size: 20, | ||
14 | dataList: [], | ||
15 | options: {}, | ||
16 | }, | ||
8 | onShareAppMessage() {}, | 17 | onShareAppMessage() {}, |
9 | showAuth() { | 18 | showAuth() { |
10 | this.setData({ | 19 | this.setData({ |
11 | authorizeVisible: true | 20 | authorizeVisible: true |
12 | }) | 21 | }) |
13 | }, | 22 | }, |
14 | onLoad(options) {}, | 23 | onLoad(options) { |
24 | this.setData({ | ||
25 | options | ||
26 | }) | ||
27 | console.log("options:", options) | ||
28 | this.resetPage(); | ||
29 | this.initData(); | ||
30 | }, | ||
31 | initData() { | ||
32 | this.queryAuctionRecordList(); | ||
33 | }, | ||
34 | |||
35 | // 到达底部 | ||
36 | onReachBottom() { | ||
37 | if (this.data.dataList.length < this.data.total) { | ||
38 | this.setData({ | ||
39 | page: this.data.page + 1 | ||
40 | }); | ||
41 | this.queryAuctionRecordList(); | ||
42 | } | ||
43 | }, | ||
44 | |||
45 | // 重置页面列表 点击搜索条件时需要 | ||
46 | resetPage() { | ||
47 | this.setData({ | ||
48 | page: 1, | ||
49 | dataList: [] | ||
50 | }) | ||
51 | }, | ||
52 | |||
53 | queryAuctionRecordList() { | ||
54 | return new Promise((resolve, reject) => { | ||
55 | let code = this.data.options.code; | ||
56 | if (!code) return; | ||
57 | app.post({ | ||
58 | url: app.api.auctionRecordList, | ||
59 | data: { | ||
60 | auctionCode: code, | ||
61 | page: this.data.page, | ||
62 | size: this.data.size, | ||
63 | } | ||
64 | }).then((result) => { | ||
65 | let dataList = result.list; | ||
66 | dataList.forEach(element => { | ||
67 | element.recordTime = new Date(element.recordTime).toString("yyyy.MM.dd hh:mm:ss"); | ||
68 | element.memberPhone = element.memberPhone.substr(0, 3) + '****' + element.memberPhone.substr(7); | ||
69 | }); | ||
70 | dataList = this.data.dataList.concat(dataList); | ||
71 | this.setData({ | ||
72 | dataList: dataList, | ||
73 | total: result.total | ||
74 | }) | ||
75 | resolve(); | ||
76 | }) | ||
77 | }) | ||
78 | }, | ||
79 | |||
15 | // 隐藏蒙层 | 80 | // 隐藏蒙层 |
16 | hideMask() { | 81 | hideMask() { |
17 | this.setData({ | 82 | this.setData({ | ... | ... |
1 | @import '../../assets/scss/mixins'; | 1 | @import '../../assets/scss/mixins'; |
2 | @import '../../assets/scss/utils'; | 2 | @import '../../assets/scss/utils'; |
3 | 3 | ||
4 | $contentWidth:690px; | ||
5 | |||
4 | .page { | 6 | .page { |
5 | .bgc {} | 7 | padding-bottom: $pageBottom; |
6 | 8 | ||
7 | .bg {} | 9 | .bgc { |
10 | // background-color: #f8f8f8; | ||
11 | } | ||
8 | 12 | ||
9 | .main { | 13 | .bg {} |
10 | .top-space { | 14 | |
11 | height: 0px; | 15 | .main { |
12 | } | 16 | .top-space { |
17 | height: 0px; | ||
18 | } | ||
19 | |||
20 | .content { | ||
21 | position: relative; | ||
22 | |||
23 | // 拍卖详情 | ||
24 | .auction { | ||
25 | width: $contentWidth; | ||
26 | margin: 0 auto 0; | ||
27 | font-size: 24px; | ||
28 | |||
29 | &-table { | ||
30 | @extend .bb; | ||
31 | padding: 24px 0 24px 0; | ||
32 | // background-color: #f8f8f8; | ||
33 | border-radius: 8px; | ||
34 | margin-top: 0; | ||
35 | font-size: 22px; | ||
36 | |||
37 | .tab { | ||
38 | &-header { | ||
39 | background-color: #f2f2f2; | ||
40 | margin-bottom: 12px; | ||
41 | } | ||
42 | |||
43 | &-item { | ||
44 | display: flex; | ||
45 | justify-content: space-between; | ||
46 | |||
47 | .item { | ||
48 | text-align: center; | ||
49 | height: 32px; | ||
50 | line-height: 32px; | ||
51 | margin: 12px 0; | ||
52 | // @extend .bb; | ||
53 | padding: 0 6px; | ||
54 | } | ||
13 | 55 | ||
14 | .content { | 56 | .item1 { |
15 | position: relative; | 57 | width: 72px; |
58 | @extend .fcc; | ||
59 | |||
60 | .block { | ||
61 | width: 72px; | ||
62 | height: 32px; | ||
63 | line-height: 32px; | ||
64 | @extend .linear; | ||
65 | color: #ffffff; | ||
66 | border-radius: 4px; | ||
67 | } | ||
68 | } | ||
69 | |||
70 | .item2 { | ||
71 | width: 200px; | ||
72 | } | ||
73 | |||
74 | .item3 { | ||
75 | flex: 1; | ||
76 | } | ||
77 | |||
78 | .item4 { | ||
79 | width: 220px; | ||
80 | } | ||
81 | } | ||
82 | |||
83 | &-item2 { | ||
84 | color: #c9c9c9; | ||
85 | |||
86 | .item1 { | ||
87 | .block { | ||
88 | background: #c9c9c9; | ||
89 | } | ||
90 | } | ||
91 | } | ||
92 | } | ||
93 | |||
94 | .tips { | ||
95 | color: #3680EB; | ||
96 | margin-top: 32px; | ||
97 | } | ||
16 | } | 98 | } |
99 | } | ||
17 | } | 100 | } |
101 | } | ||
102 | } | ||
103 | |||
104 | .disable { | ||
105 | background: #c9c9c9 !important; | ||
18 | } | 106 | } | ... | ... |
... | @@ -4,7 +4,30 @@ | ... | @@ -4,7 +4,30 @@ |
4 | <!-- <view class="app__top-shadow"></view> --> | 4 | <!-- <view class="app__top-shadow"></view> --> |
5 | <view class="app__content main"> | 5 | <view class="app__content main"> |
6 | <view class="top-space"></view> | 6 | <view class="top-space"></view> |
7 | <view class="content">auction-list</view> | 7 | <view class="content"> |
8 | <view class="auction"> | ||
9 | <view class="auction-table"> | ||
10 | <view class="tab"> | ||
11 | <!-- 表头 --> | ||
12 | <view class="tab-item tab-header"> | ||
13 | <view class="item item1">状态</view> | ||
14 | <view class="item item2">竞拍者</view> | ||
15 | <view class="item item3">出价</view> | ||
16 | <view class="item item4">时间</view> | ||
17 | </view> | ||
18 | <!-- 表体 --> | ||
19 | <view wx:for="{{dataList}}" wx:key="index" class="tab-item {{index != 0 ? 'tab-item2':''}}"> | ||
20 | <view class="item item1"> | ||
21 | <view class="block">{{index == 0 ? "领先" : "淘汰"}}</view> | ||
22 | </view> | ||
23 | <view class="item item2">{{item.memberPhone}}</view> | ||
24 | <view class="item item3">¥{{item.priceStr}}</view> | ||
25 | <view class="item item4">{{item.recordTime}}</view> | ||
26 | </view> | ||
27 | </view> | ||
28 | </view> | ||
29 | </view> | ||
30 | </view> | ||
8 | </view> | 31 | </view> |
9 | </view> | 32 | </view> |
10 | <van-popup show="{{ authorizeVisible }}"> | 33 | <van-popup show="{{ authorizeVisible }}"> | ... | ... |
1 | import { | 1 | import { |
2 | getBindtapData | 2 | getBindtapData |
3 | } from '../../utils/util'; | 3 | } from '../../utils/util'; |
4 | let Date = require('../../utils/date.js'); | ||
5 | var timer = require('../../utils/wxTimer.js'); | ||
6 | |||
7 | var wxTimer; | ||
4 | 8 | ||
5 | let app = getApp(); | 9 | let app = getApp(); |
6 | Page({ | 10 | Page({ |
7 | data: { | 11 | data: { |
8 | authorizeVisible: false, | 12 | authorizeVisible: false, |
13 | userInfo: {}, | ||
9 | productInfo: {}, | 14 | productInfo: {}, |
15 | priceInfo: [], | ||
16 | priceTotal: 0, | ||
17 | maxPrice: 0, | ||
10 | navBackTimeout: 0, | 18 | navBackTimeout: 0, |
19 | socketStatus: 'closed', | ||
20 | hasLogin: false, | ||
21 | waitingResponse: false, | ||
22 | loading: false, | ||
23 | options: {}, | ||
24 | wxTimerList: {}, | ||
25 | lastTime: "", | ||
11 | }, | 26 | }, |
12 | onShareAppMessage() {}, | 27 | onShareAppMessage() {}, |
13 | showAuth() { | 28 | showAuth() { |
... | @@ -15,15 +30,104 @@ Page({ | ... | @@ -15,15 +30,104 @@ Page({ |
15 | authorizeVisible: true | 30 | authorizeVisible: true |
16 | }) | 31 | }) |
17 | }, | 32 | }, |
33 | onShow() { | ||
34 | if (wxTimer) { | ||
35 | wxTimer.calibration() | ||
36 | } | ||
37 | }, | ||
18 | onLoad(options) { | 38 | onLoad(options) { |
19 | this.queryAuctionDetail(options.code); | 39 | this.setData({ |
40 | options | ||
41 | }) | ||
42 | this.queryAuctionDetail().then((result) => { | ||
43 | this.refreshTime(); | ||
44 | }) | ||
45 | this.queryAuctionRecordLast(); | ||
46 | this.initData(); | ||
47 | }, | ||
48 | onUnload() { | ||
49 | if (wxTimer) { | ||
50 | wxTimer.stop() | ||
51 | } | ||
52 | clearInterval(this.data.stiIndex); | ||
53 | this.closeSocket() | ||
54 | }, | ||
55 | |||
56 | initData() { | ||
57 | this.queryMember().then((result) => { | ||
58 | // this.openSocket(); | ||
59 | }); | ||
60 | }, | ||
61 | |||
62 | // 开始倒计时 | ||
63 | refreshTime() { | ||
64 | let _this = this; | ||
65 | if (wxTimer) { | ||
66 | wxTimer.stop(); | ||
67 | } | ||
68 | let beginTime = _this.getTimeStr(); | ||
69 | console.log("beginTime:", beginTime); | ||
70 | if (!beginTime) return; | ||
71 | wxTimer = new timer({ | ||
72 | beginTime: beginTime, | ||
73 | complete() { | ||
74 | // console.log("完成了") | ||
75 | }, | ||
76 | interval: 1, | ||
77 | intervalFn() { | ||
78 | // console.log("过去了1秒"); | ||
79 | let lastTime = _this.getTimeStr({ | ||
80 | day: true | ||
81 | }); | ||
82 | _this.setData({ | ||
83 | lastTime | ||
84 | }) | ||
85 | // console.log("lastTime:", lastTime); | ||
86 | } | ||
87 | }) | ||
88 | wxTimer.start(_this); | ||
89 | }, | ||
90 | |||
91 | getTimeStr(initObj) { | ||
92 | initObj = initObj || {}; | ||
93 | let productInfo = this.data.productInfo; | ||
94 | if (!productInfo || !productInfo.endTime) return; | ||
95 | let t = productInfo.endTime - new Date().getTime(); | ||
96 | if (t <= 0) return; | ||
97 | let d = Math.floor(t / 1000 / 60 / 60 / 24); | ||
98 | let h = Math.floor(t / 1000 / 60 / 60 % 24) + (initObj.day ? 0 : 24 * d); // 含日的话,就不用24*d了 | ||
99 | let m = Math.floor(t / 1000 / 60 % 60); | ||
100 | let s = Math.floor(t / 1000 % 60); | ||
101 | if (h < 10) h = "0" + h; | ||
102 | if (m < 10) m = "0" + m; | ||
103 | if (s < 10) s = "0" + s; | ||
104 | let lastTime = h + ":" + m + ":" + s; | ||
105 | // 包含日 | ||
106 | if (initObj.day) { | ||
107 | lastTime = d + "天 " + h + ":" + m + ":" + s; | ||
108 | } | ||
109 | return lastTime; | ||
110 | }, | ||
111 | |||
112 | /** | ||
113 | * 点击显示详情 | ||
114 | */ | ||
115 | onShowAuctionBidDetailHandler() { | ||
116 | app.router.push({ | ||
117 | path: "auctionBidDetail", | ||
118 | query: { | ||
119 | code: this.data.options.code | ||
120 | } | ||
121 | }) | ||
20 | }, | 122 | }, |
21 | onShow() {}, | ||
22 | 123 | ||
23 | /** | 124 | /** |
24 | * 秒杀详情 | 125 | * 秒杀详情 |
25 | */ | 126 | */ |
26 | queryAuctionDetail(code) { | 127 | queryAuctionDetail() { |
128 | let code = this.data.options.code; | ||
129 | // 45ebd46114904467824644b55654c27a | ||
130 | // cf8bc80aef3446b58d17abc6167ad536 | ||
27 | let _this = this; | 131 | let _this = this; |
28 | return new Promise((resolve, reject) => { | 132 | return new Promise((resolve, reject) => { |
29 | app.post({ | 133 | app.post({ |
... | @@ -32,6 +136,7 @@ Page({ | ... | @@ -32,6 +136,7 @@ Page({ |
32 | auctionCode: code | 136 | auctionCode: code |
33 | } | 137 | } |
34 | }).then((result) => { | 138 | }).then((result) => { |
139 | result.delayPeriod = (result.delayPeriod / 60) + "分钟"; | ||
35 | this.setData({ | 140 | this.setData({ |
36 | productInfo: result | 141 | productInfo: result |
37 | }) | 142 | }) |
... | @@ -50,6 +155,129 @@ Page({ | ... | @@ -50,6 +155,129 @@ Page({ |
50 | }) | 155 | }) |
51 | }, | 156 | }, |
52 | 157 | ||
158 | /** | ||
159 | * 获得最高价 和列表 | ||
160 | */ | ||
161 | queryAuctionRecordLast() { | ||
162 | let code = this.data.options.code; | ||
163 | if (code) { | ||
164 | app.post({ | ||
165 | url: app.api.auctionRecordLast, | ||
166 | data: { | ||
167 | auctionCode: code | ||
168 | } | ||
169 | }).then((result) => { | ||
170 | let priceInfo = result.list || []; | ||
171 | priceInfo.forEach(element => { | ||
172 | element.recordTime = new Date(element.recordTime).toString("yyyy.MM.dd hh:mm:ss"); | ||
173 | element.memberPhone = element.memberPhone.substr(0, 3) + '****' + element.memberPhone.substr(7); | ||
174 | }); | ||
175 | this.setData({ | ||
176 | priceInfo: priceInfo, | ||
177 | maxPrice: result.maxPrice || 0, | ||
178 | priceTotal: result.total || 0 | ||
179 | }) | ||
180 | }); | ||
181 | } | ||
182 | }, | ||
183 | |||
184 | /** | ||
185 | * 获取会员信息 | ||
186 | */ | ||
187 | queryMember() { | ||
188 | return new Promise((resolve, reject) => { | ||
189 | app.post({ | ||
190 | url: app.api.member, | ||
191 | data: {} | ||
192 | }).then((result) => { | ||
193 | this.setData({ | ||
194 | userInfo: result | ||
195 | }) | ||
196 | resolve(result); | ||
197 | }) | ||
198 | }); | ||
199 | }, | ||
200 | |||
201 | /** | ||
202 | * 打开websocket | ||
203 | */ | ||
204 | openSocket() { | ||
205 | let memberCode = this.data.userInfo.memberCode; | ||
206 | let auctionCode = this.data.options.code; | ||
207 | let wsUrl = 'wss://ow.go.qudone.com/zlzm/websocket/' + memberCode + auctionCode; | ||
208 | // console.log("wsUrl:", wsUrl); | ||
209 | if (!memberCode || !auctionCode) { | ||
210 | wx.showModal({ | ||
211 | content: "信息丢失,无法同步实时数据", | ||
212 | showCancel: false, | ||
213 | success(res) {} | ||
214 | }) | ||
215 | return; | ||
216 | } | ||
217 | |||
218 | wx.onSocketOpen(() => { | ||
219 | console.log('WebSocket 已连接'); | ||
220 | this.setData({ | ||
221 | socketStatus: 'connected', | ||
222 | waitingResponse: false | ||
223 | }) | ||
224 | }) | ||
225 | |||
226 | wx.onSocketClose(() => { | ||
227 | console.log('WebSocket 已断开') | ||
228 | this.setData({ | ||
229 | socketStatus: 'closed' | ||
230 | }) | ||
231 | this.openSocket(); | ||
232 | }) | ||
233 | |||
234 | wx.onSocketError(error => { | ||
235 | console.error('socket error:', error) | ||
236 | this.setData({ | ||
237 | loading: false | ||
238 | }) | ||
239 | }) | ||
240 | |||
241 | // 监听服务器推送消息 | ||
242 | wx.onSocketMessage(message => { | ||
243 | console.log('socket message:', message) | ||
244 | this.setData({ | ||
245 | loading: false | ||
246 | }) | ||
247 | }) | ||
248 | |||
249 | // 打开信道 | ||
250 | wx.connectSocket({ | ||
251 | // url: 'wss://echo.websocket.org', | ||
252 | url: wsUrl | ||
253 | }) | ||
254 | |||
255 | }, | ||
256 | |||
257 | /** | ||
258 | * 关闭websocket | ||
259 | */ | ||
260 | closeSocket() { | ||
261 | if (this.data.socketStatus === 'connected') { | ||
262 | wx.closeSocket({ | ||
263 | success: () => { | ||
264 | console.log("Socket已断开"); | ||
265 | this.setData({ | ||
266 | socketStatus: 'closed' | ||
267 | }) | ||
268 | } | ||
269 | }) | ||
270 | } | ||
271 | }, | ||
272 | |||
273 | sendMessage(msg) { | ||
274 | if (this.data.socketStatus === 'connected') { | ||
275 | wx.sendSocketMessage({ | ||
276 | data: msg | ||
277 | }) | ||
278 | } | ||
279 | }, | ||
280 | |||
53 | // 隐藏蒙层 | 281 | // 隐藏蒙层 |
54 | hideMask() { | 282 | hideMask() { |
55 | this.setData({ | 283 | this.setData({ | ... | ... |
... | @@ -65,7 +65,7 @@ $contentWidth:690px; | ... | @@ -65,7 +65,7 @@ $contentWidth:690px; |
65 | font-size: 22px; | 65 | font-size: 22px; |
66 | @extend .bb; | 66 | @extend .bb; |
67 | 67 | ||
68 | .prize { | 68 | .price { |
69 | color: #cb3939; | 69 | color: #cb3939; |
70 | font-size: 52px; | 70 | font-size: 52px; |
71 | font-weight: bold; | 71 | font-weight: bold; |
... | @@ -113,6 +113,10 @@ $contentWidth:690px; | ... | @@ -113,6 +113,10 @@ $contentWidth:690px; |
113 | padding: 4px 0; | 113 | padding: 4px 0; |
114 | } | 114 | } |
115 | 115 | ||
116 | .t2 { | ||
117 | font-size: 24px; | ||
118 | } | ||
119 | |||
116 | .date { | 120 | .date { |
117 | // width: 100%; | 121 | // width: 100%; |
118 | font-size: 22px; | 122 | font-size: 22px; |
... | @@ -178,7 +182,7 @@ $contentWidth:690px; | ... | @@ -178,7 +182,7 @@ $contentWidth:690px; |
178 | 182 | ||
179 | &-table { | 183 | &-table { |
180 | @extend .bb; | 184 | @extend .bb; |
181 | padding: 24px 0 24px 40px; | 185 | padding: 24px 0 24px 24px; |
182 | background-color: #f8f8f8; | 186 | background-color: #f8f8f8; |
183 | border-radius: 8px; | 187 | border-radius: 8px; |
184 | margin-top: 24px; | 188 | margin-top: 24px; |
... | @@ -254,3 +258,7 @@ $contentWidth:690px; | ... | @@ -254,3 +258,7 @@ $contentWidth:690px; |
254 | } | 258 | } |
255 | } | 259 | } |
256 | } | 260 | } |
261 | |||
262 | .disable { | ||
263 | background: #c9c9c9 !important; | ||
264 | } | ... | ... |
... | @@ -19,65 +19,53 @@ | ... | @@ -19,65 +19,53 @@ |
19 | <view class="func"> | 19 | <view class="func"> |
20 | <view class="arrow"></view> | 20 | <view class="arrow"></view> |
21 | <view class="func-ele func-left"> | 21 | <view class="func-ele func-left"> |
22 | <text class="prize">¥5</text> | 22 | <text class="price">¥{{maxPrice}}</text> |
23 | <text class="t1">当前价格</text> | 23 | <text class="t1">当前价格</text> |
24 | </view> | 24 | </view> |
25 | <view class="func-ele func-right"> | 25 | <view class="func-ele func-right {{productInfo.status != 1 ? 'disable' : ''}}"> |
26 | <text class="t1">拍卖进行中</text> | 26 | <text wx:if="{{productInfo.status == 0}}" class="t1 t2">拍卖未开始</text> |
27 | <text class="t1 date">时间时间</text> | 27 | <text wx:if="{{productInfo.status == 1}}" class="t1">拍卖进行中</text> |
28 | <text wx:if="{{productInfo.status == 2}}" class="t1 t2">拍卖已结束</text> | ||
29 | <text wx:if="{{productInfo.status == 1}}" class="t1 date">{{lastTime}}</text> | ||
28 | </view> | 30 | </view> |
29 | </view> | 31 | </view> |
30 | <!-- 描述 --> | 32 | <!-- 描述 --> |
31 | <view class="desc"> | 33 | <view class="desc"> |
32 | <view class="refresh-btn">刷新价格</view> | 34 | <view bindtap="queryAuctionRecordLast" class="refresh-btn">刷新价格</view> |
33 | <view class="desc-tit">标题</view> | 35 | <view class="desc-tit">{{productInfo.auctionName}}</view> |
34 | <view class="desc-t1">描述</view> | 36 | <view class="desc-t1">{{productInfo.auctionDescription}}</view> |
35 | <view class="desc-t1">活动区域</view> | 37 | <view class="desc-t1">{{productInfo.district}}</view> |
36 | </view> | 38 | </view> |
37 | <!-- 线 --> | 39 | <!-- 线 --> |
38 | <view class="line"></view> | 40 | <view class="line"></view> |
39 | <!-- 拍卖详情 --> | 41 | <!-- 拍卖详情 --> |
40 | <view class="auction"> | 42 | <view class="auction"> |
41 | <view class="auction-desc"> | 43 | <view class="auction-desc"> |
42 | <view class="t1">产品原价:280元</view> | 44 | <view class="t1">产品原价:{{productInfo.originalPrice}}元</view> |
43 | <view class="t1">起拍价:280元</view> | 45 | <view class="t1">起拍价:{{productInfo.startPrice}}元</view> |
44 | <view class="t1">最小价格幅度:280元</view> | 46 | <view class="t1">最小加价幅度:{{productInfo.minScope}}元</view> |
45 | <view class="t1">延时周期:5分钟</view> | 47 | <view class="t1">延时周期:{{productInfo.delayPeriod}}</view> |
46 | </view> | 48 | </view> |
47 | <view class="auction-table"> | 49 | <view class="auction-table"> |
48 | <view class="tab"> | 50 | <view class="tab"> |
51 | <!-- 表头 --> | ||
49 | <view class="tab-item"> | 52 | <view class="tab-item"> |
50 | <view class="item item1">状态</view> | 53 | <view class="item item1">状态</view> |
51 | <view class="item item2">竞拍者</view> | 54 | <view class="item item2">竞拍者</view> |
52 | <view class="item item3">出价</view> | 55 | <view class="item item3">出价</view> |
53 | <view class="item item4">时间</view> | 56 | <view class="item item4">时间</view> |
54 | </view> | 57 | </view> |
55 | <view class="tab-item"> | 58 | <!-- 表体 --> |
56 | <view class="item item1"> | 59 | <view wx:for="{{priceInfo}}" wx:key="index" class="tab-item {{index != 0 ? 'tab-item2':''}}"> |
57 | <view class="block">领先</view> | ||
58 | </view> | ||
59 | <view class="item item2">xxx123</view> | ||
60 | <view class="item item3">¥150</view> | ||
61 | <view class="item item4">2019.10.02 10:36:12</view> | ||
62 | </view> | ||
63 | <view class="tab-item tab-item2"> | ||
64 | <view class="item item1"> | ||
65 | <view class="block">领先</view> | ||
66 | </view> | ||
67 | <view class="item item2">xxx123</view> | ||
68 | <view class="item item3">¥150</view> | ||
69 | <view class="item item4">2019.10.02 10:36:12</view> | ||
70 | </view> | ||
71 | <view class="tab-item tab-item2"> | ||
72 | <view class="item item1"> | 60 | <view class="item item1"> |
73 | <view class="block">领先</view> | 61 | <view class="block">{{index == 0 ? "领先" : "淘汰"}}</view> |
74 | </view> | 62 | </view> |
75 | <view class="item item2">xxx123</view> | 63 | <view class="item item2">{{item.memberPhone}}</view> |
76 | <view class="item item3">¥150</view> | 64 | <view class="item item3">¥{{item.priceStr}}</view> |
77 | <view class="item item4">2019.10.02 10:36:12</view> | 65 | <view class="item item4">{{item.recordTime}}</view> |
78 | </view> | 66 | </view> |
79 | </view> | 67 | </view> |
80 | <view class="tips">查看所有n次出价></view> | 68 | <view bindtap="onShowAuctionBidDetailHandler" class="tips">查看所有{{priceTotal}}次出价></view> |
81 | </view> | 69 | </view> |
82 | </view> | 70 | </view> |
83 | </view> | 71 | </view> | ... | ... |
... | @@ -48,19 +48,36 @@ Page({ | ... | @@ -48,19 +48,36 @@ Page({ |
48 | }, | 48 | }, |
49 | 49 | ||
50 | /** | 50 | /** |
51 | * 显示我的拍卖页 | ||
52 | */ | ||
53 | onShowAuctionMineHandler() { | ||
54 | app.router.push({ | ||
55 | path: "auctionMine" | ||
56 | }) | ||
57 | }, | ||
58 | |||
59 | /** | ||
51 | * 详情页面 | 60 | * 详情页面 |
52 | */ | 61 | */ |
53 | onDetailHandler(evt) { | 62 | onDetailHandler(evt) { |
54 | let curData = getBindtapData(evt); | 63 | let curData = getBindtapData(evt); |
55 | console.log("curData:", curData); | 64 | console.log("curData:", curData); |
56 | if (curData.status == 0 || curData.status == 1) { | 65 | if (curData.status == 0 || curData.status == 1) { |
57 | app.router.push({ | 66 | if (curData.isCanDetail == 1) { |
58 | path: "auctionDetail", | 67 | app.router.push({ |
59 | query: { | 68 | path: "auctionDetail", |
60 | code: curData.auctionCode, | 69 | query: { |
61 | title: curData.auctionName | 70 | code: curData.auctionCode, |
62 | } | 71 | title: curData.auctionName |
63 | }) | 72 | } |
73 | }) | ||
74 | } else { | ||
75 | wx.showModal({ | ||
76 | content: curData.reason || "您未达到进入条件", | ||
77 | showCancel: false, | ||
78 | success(res) {} | ||
79 | }) | ||
80 | } | ||
64 | } | 81 | } |
65 | }, | 82 | }, |
66 | 83 | ... | ... |
... | @@ -7,7 +7,7 @@ | ... | @@ -7,7 +7,7 @@ |
7 | <view class="content"> | 7 | <view class="content"> |
8 | <!-- 我的拍卖按钮 --> | 8 | <!-- 我的拍卖按钮 --> |
9 | <view class="my-btn"> | 9 | <view class="my-btn"> |
10 | <view class="btn">我的拍卖</view> | 10 | <view bindtap="onShowAuctionMineHandler" class="btn">我的拍卖</view> |
11 | </view> | 11 | </view> |
12 | <view class="list"> | 12 | <view class="list"> |
13 | <view wx:for="{{dataList}}" wx:key="{{index}}" class="border list-item"> | 13 | <view wx:for="{{dataList}}" wx:key="{{index}}" class="border list-item"> |
... | @@ -31,6 +31,7 @@ | ... | @@ -31,6 +31,7 @@ |
31 | </view> | 31 | </view> |
32 | </view> | 32 | </view> |
33 | </view> | 33 | </view> |
34 | <empty-tips-light inner-text="当前未有拍卖活动,敬请期待" wx:if="{{dataList.length <= 0}}"></empty-tips-light> | ||
34 | </view> | 35 | </view> |
35 | </view> | 36 | </view> |
36 | <van-popup show="{{ authorizeVisible }}"> | 37 | <van-popup show="{{ authorizeVisible }}"> | ... | ... |
... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
4 | <!-- <view class="app__top-shadow"></view> --> | 4 | <!-- <view class="app__top-shadow"></view> --> |
5 | <view class="app__content main"> | 5 | <view class="app__content main"> |
6 | <view class="top-space"></view> | 6 | <view class="top-space"></view> |
7 | <view class="content">auction-list</view> | 7 | <view class="content">我的竞拍订单</view> |
8 | </view> | 8 | </view> |
9 | </view> | 9 | </view> |
10 | <van-popup show="{{ authorizeVisible }}"> | 10 | <van-popup show="{{ authorizeVisible }}"> | ... | ... |
src/utils/wxTimer.js
0 → 100644
1 | var wxTimer = function (initObj){ | ||
2 | initObj = initObj || {}; | ||
3 | this.beginTime = initObj.beginTime || "00:00:00"; //开始时间 | ||
4 | this.interval = initObj.interval || 0; //间隔时间 | ||
5 | this.complete = initObj.complete; //结束任务 | ||
6 | this.intervalFn = initObj.intervalFn; //间隔任务 | ||
7 | this.name = initObj.name; //当前计时器在计时器数组对象中的名字 | ||
8 | |||
9 | this.intervarID; //计时ID | ||
10 | this.endTime; //结束时间 | ||
11 | this.endSystemTime; //结束的系统时间 | ||
12 | } | ||
13 | |||
14 | wxTimer.prototype = { | ||
15 | //开始 | ||
16 | start:function(self){ | ||
17 | this.endTime = new Date("1970/01/01 "+this.beginTime).getTime();//1970年1月1日的00:00:00的字符串日期 | ||
18 | this.endSystemTime = new Date(Date.now() + this.endTime); | ||
19 | var that = this; | ||
20 | //开始倒计时 | ||
21 | var count = 0;//这个count在这里应该是表示s数,js中获得时间是ms,所以下面*1000都换成ms | ||
22 | function begin(){ | ||
23 | var tmpTime = new Date(that.endTime - 1000 * count++); | ||
24 | //把2011年1月1日日 00:00:00换成数字型,这样就可以直接1s,1s的减,就变成了倒计时,为了看的更明确,又用new date把字符串换回来了 | ||
25 | var tmpTimeStr = tmpTime.toString().substr(16,8);//去掉前面的年月日就剩时分秒了 | ||
26 | var wxTimerSecond = (tmpTime.getTime() - new Date("1970/01/01 00:00:00").getTime()) / 1000; | ||
27 | var wxTimerList = self.data.wxTimerList; | ||
28 | |||
29 | //更新计时器数组 | ||
30 | wxTimerList[that.name] = { | ||
31 | wxTimer:tmpTimeStr, | ||
32 | wxTimerSecond:wxTimerSecond, | ||
33 | } | ||
34 | |||
35 | self.setData({ | ||
36 | wxTimer:tmpTimeStr, | ||
37 | wxTimerSecond:wxTimerSecond, | ||
38 | wxTimerList:wxTimerList | ||
39 | }); | ||
40 | //时间间隔执行函数 | ||
41 | if( 0 == (count-1) % that.interval && that.intervalFn){ | ||
42 | that.intervalFn(); | ||
43 | } | ||
44 | //结束执行函数 | ||
45 | if(wxTimerSecond <= 0){ | ||
46 | if(that.complete){ | ||
47 | that.complete(); | ||
48 | } | ||
49 | that.stop(); | ||
50 | } | ||
51 | } | ||
52 | begin(); | ||
53 | this.intervarID = setInterval(begin,1000); | ||
54 | }, | ||
55 | //结束 | ||
56 | stop:function(){ | ||
57 | clearInterval(this.intervarID); | ||
58 | }, | ||
59 | //校准 | ||
60 | calibration:function(){ | ||
61 | this.endTime = this.endSystemTime - Date.now(); | ||
62 | } | ||
63 | } | ||
64 | |||
65 | module.exports = wxTimer; |
-
Please register or sign in to post a comment