|
58 | 58 | :time="item.dateEndInt" format="剩余: HH时mm分ss秒"></u-count-down> |
59 | 59 | <view class="miaosha-price-btn"> |
60 | 60 | <view class="price">¥{{item.minPrice}} <text>¥{{item.originalPrice}}</text></view> |
61 | | - <u-button v-if="item.dateStartInt > 0" type="warning" size="mini" plain disabled text="即将开始" @click="goDetail(item)"> |
| 61 | + <u-button v-if="item.dateStartInt > 0" type="warning" size="mini" plain disabled text="即将开始" |
| 62 | + @click="goDetail(item)"> |
62 | 63 | </u-button> |
63 | | - <u-button v-else-if="item.dateEndInt <= 0" type="info" size="mini" plain disabled text="已结束" @click="goDetail(item)"> |
| 64 | + <u-button v-else-if="item.dateEndInt <= 0" type="info" size="mini" plain disabled text="已结束" |
| 65 | + @click="goDetail(item)"> |
64 | 66 | </u-button> |
65 | | - <u-button v-else-if="item.stores <= 0" type="info" size="mini" plain disabled text="已抢完" @click="goDetail(item)"> |
| 67 | + <u-button v-else-if="item.stores <= 0" type="info" size="mini" plain disabled text="已抢完" |
| 68 | + @click="goDetail(item)"> |
66 | 69 | </u-button> |
67 | 70 | <u-button v-else type="error" size="mini" plain text="立即抢购" @click="goDetail(item)"></u-button> |
68 | 71 | </view> |
|
81 | 84 | <view class="goods-container"> |
82 | 85 | <view v-for="(item, index) in goodsRecommend" :key="index" class="goods-box" bindtap="toDetailsTap"> |
83 | 86 | <view class="img-box"> |
84 | | - <image :src="item.pic" class="image" mode="aspectFill" lazy-load="true" @click="goDetail(item)" /> |
| 87 | + <image :src="item.pic" class="image" mode="aspectFill" lazy-load="true" |
| 88 | + @click="goDetail(item)" /> |
85 | 89 | </view> |
86 | 90 | <view class="goods-title u-line-3 pt16" @click="goDetail(item)"> |
87 | | - <u-tag v-if="item.supplyType == 'vop_jd' || item.supplyType == 'jdJoycityPoints'" text="京东自营" bgColor="#e64340" borderColor="#e64340" size="mini" class="goods-title-tag"></u-tag> |
| 91 | + <u-tag v-if="item.supplyType == 'vop_jd' || item.supplyType == 'jdJoycityPoints'" text="京东自营" |
| 92 | + bgColor="#e64340" borderColor="#e64340" size="mini" class="goods-title-tag"></u-tag> |
88 | 93 | <text class="goods-title">{{ item.name }}</text> |
89 | 94 | </view> |
90 | 95 | <u--text v-if="item.characteristic" class="goods-title" :text="item.characteristic" size="28rpx" |
91 | 96 | color="#c95060"></u--text> |
92 | 97 | <view class="price-score"> |
93 | 98 | <view v-if="item.minPrice" class="item"><text>¥</text>{{item.minPrice}}</view> |
94 | | - <view v-if="item.minScore" class="item"><text><image class="score-icon" src="/static/images/score.png"></image></text>{{item.minScore}}</view> |
| 99 | + <view v-if="item.minScore" class="item"><text> |
| 100 | + <image class="score-icon" src="/static/images/score.png"></image> |
| 101 | + </text>{{item.minScore}}</view> |
95 | 102 | </view> |
96 | 103 | </view> |
97 | 104 | </view> |
|
153 | 160 | <view class="goods-container"> |
154 | 161 | <view v-for="(item, index) in goods" :key="index" class="goods-box" bindtap="toDetailsTap"> |
155 | 162 | <view class="img-box"> |
156 | | - <image :src="item.pic" class="image" mode="aspectFill" lazy-load="true" @click="goDetail(item)" /> |
| 163 | + <image :src="item.pic" class="image" mode="aspectFill" lazy-load="true" |
| 164 | + @click="goDetail(item)" /> |
157 | 165 | </view> |
158 | 166 | <view class="goods-title u-line-3 pt16" @click="goDetail(item)"> |
159 | | - <u-tag v-if="item.supplyType == 'vop_jd' || item.supplyType == 'jdJoycityPoints'" text="京东自营" bgColor="#e64340" borderColor="#e64340" size="mini" class="goods-title-tag"></u-tag> |
| 167 | + <u-tag v-if="item.supplyType == 'vop_jd' || item.supplyType == 'jdJoycityPoints'" text="京东自营" |
| 168 | + bgColor="#e64340" borderColor="#e64340" size="mini" class="goods-title-tag"></u-tag> |
160 | 169 | <text class="goods-title">{{ item.name }}</text> |
161 | 170 | </view> |
162 | 171 | <u--text v-if="item.characteristic" class="goods-title" :text="item.characteristic" size="28rpx" |
163 | 172 | color="#c95060"></u--text> |
164 | 173 | <view class="price-score"> |
165 | 174 | <view v-if="item.minPrice" class="item"><text>¥</text>{{item.minPrice}}</view> |
166 | | - <view v-if="item.minScore" class="item"><text><image class="score-icon" src="/static/images/score.png"></image></text>{{item.minScore}}</view> |
| 175 | + <view v-if="item.minScore" class="item"><text> |
| 176 | + <image class="score-icon" src="/static/images/score.png"></image> |
| 177 | + </text>{{item.minScore}}</view> |
167 | 178 | </view> |
168 | 179 | </view> |
169 | 180 | </view> |
|
192 | 203 | if (ua.match(/MicroMessenger/i) == 'micromessenger') { |
193 | 204 | const jweixin = require('jweixin-module') |
194 | 205 | jweixin.ready(() => { // 需在用户可能点击分享按钮前就先调用 |
195 | | - jweixin.updateAppMessageShareData({ |
196 | | - title: '京栖无限企福平台', // 分享标题 |
197 | | - desc: '京栖无限企福平台', // 分享描述 |
198 | | - link: 'https://flpt.jxsupplier.com', // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 |
199 | | - imgUrl: 'https://dcdn.it120.cc/2022/01/26/02235d13-1ea8-4cd1-af00-1b219b5b07f9.jpeg', // 分享图标 |
200 | | - success: function() { |
201 | | - // 设置成功 |
202 | | - } |
203 | | - }) |
204 | | - jweixin.updateTimelineShareData({ |
205 | | - title: '京栖无限企福平台', // 分享标题 |
206 | | - desc: '京栖无限企福平台', // 分享描述 |
207 | | - link: 'https://flpt.jxsupplier.com', // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 |
208 | | - imgUrl: 'https://dcdn.it120.cc/2022/01/26/02235d13-1ea8-4cd1-af00-1b219b5b07f9.jpeg', // 分享图标 |
209 | | - success: function() { |
210 | | - // 设置成功 |
211 | | - } |
212 | | - }) |
| 206 | + jweixin.updateAppMessageShareData({ |
| 207 | + title: '京栖无限企福平台', // 分享标题 |
| 208 | + desc: '京栖无限企福平台', // 分享描述 |
| 209 | + link: 'https://flpt.jxsupplier.com', // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 |
| 210 | + imgUrl: 'https://dcdn.it120.cc/2022/01/26/02235d13-1ea8-4cd1-af00-1b219b5b07f9.jpeg', // 分享图标 |
| 211 | + success: function() { |
| 212 | + // 设置成功 |
| 213 | + } |
| 214 | + }) |
| 215 | + jweixin.updateTimelineShareData({ |
| 216 | + title: '京栖无限企福平台', // 分享标题 |
| 217 | + desc: '京栖无限企福平台', // 分享描述 |
| 218 | + link: 'https://flpt.jxsupplier.com', // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 |
| 219 | + imgUrl: 'https://dcdn.it120.cc/2022/01/26/02235d13-1ea8-4cd1-af00-1b219b5b07f9.jpeg', // 分享图标 |
| 220 | + success: function() { |
| 221 | + // 设置成功 |
| 222 | + } |
| 223 | + }) |
213 | 224 | }) |
214 | 225 | } |
215 | 226 | // #endif |
|
266 | 277 | this._kanjiaList() |
267 | 278 | this._pingtuanList() |
268 | 279 | this._goods() |
269 | | - this.jssdkSign() |
| 280 | + // #ifdef H5 |
| 281 | + const ua = window.navigator.userAgent.toLowerCase() |
| 282 | + if (ua.match(/MicroMessenger/i) == 'micromessenger') { |
| 283 | + this.jssdkSign() |
| 284 | + } |
| 285 | + // #endif |
270 | 286 | }, |
271 | 287 | onShow() { |
272 | 288 | this.shopInfo = uni.getStorageSync('shopInfo') |
|
304 | 320 | }, |
305 | 321 | methods: { |
306 | 322 | async jssdkSign() { |
307 | | - const res = await this.$wxapi.jssdkSign(window.location.href) |
308 | | - if (res.code === 0) { |
309 | | - jweixin.config({ |
310 | | - debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 |
311 | | - appId: res.data.appid, // 必填,公众号的唯一标识 |
312 | | - timestamp: res.data.timestamp, // 必填,生成签名的时间戳 |
313 | | - nonceStr: res.data.noncestr, // 必填,生成签名的随机串 |
314 | | - signature: res.data.sign, // 必填,签名 |
315 | | - jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData'] // 必填,需要使用的JS接口列表 |
316 | | - }) |
317 | | - } |
318 | | - }, |
| 323 | + const res = await this.$wxapi.jssdkSign(window.location.href) |
| 324 | + if (res.code === 0) { |
| 325 | + jweixin.config({ |
| 326 | + debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 |
| 327 | + appId: res.data.appid, // 必填,公众号的唯一标识 |
| 328 | + timestamp: res.data.timestamp, // 必填,生成签名的时间戳 |
| 329 | + nonceStr: res.data.noncestr, // 必填,生成签名的随机串 |
| 330 | + signature: res.data.sign, // 必填,签名 |
| 331 | + jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData'] // 必填,需要使用的JS接口列表 |
| 332 | + }) |
| 333 | + } |
| 334 | + }, |
319 | 335 | goSearch() { |
320 | 336 | uni.navigateTo({ |
321 | 337 | url: '/pages/search/index' |
|
505 | 521 | width: 100%; |
506 | 522 | height: var(--status-bar-height); |
507 | 523 | } |
| 524 | +
|
508 | 525 | .index { |
509 | 526 | .top-box { |
510 | 527 | padding: 16rpx 8rpx; |
|
779 | 796 | margin-top: 32rpx; |
780 | 797 | } |
781 | 798 | } |
| 799 | +
|
782 | 800 | .blank { |
783 | 801 | height: 32rpx; |
784 | 802 | } |
|
0 commit comments