Blame view
src/pages/user/user.vue
16.7 KB
0db291810 “-mcomfirmOder页面 |
1 |
<template> |
323398550 若干功能添加 |
2 |
<view class="wrap"> |
daf137d6f 合并冲突 |
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<!-- 弹窗 --> <uni-popup ref="popup" type="center" > <!-- 给一个左边弹窗的样式 --> <!-- 关闭弹窗按钮 --> <view class="closeBtn" @tap="this.$refs.popup.close()" >x</view> <view class="popUpWrap" v-if="whichTap==0" > <text>这是一款眼镜及周边产品的销售平台,我们将帮您进行建立全球销售网络,欢迎入驻。</text> |
31dea37da 新增验光单和修改验光单 |
19 |
|
daf137d6f 合并冲突 |
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
<!-- 左 --> <!-- <image class="glassInfo" src="../../static/img/myOpticsData/glassInfo.png" v-if="whichTap == 0" mode="aspectFit"></image> --> <!-- 右 --> <!-- <image class="dataInfo" src="../../static/img/myOpticsData/dataInfo.png" v-else mode="aspectFit"></image> --> </view> <view class="popUpWrap" v-if="whichTap==1" > <text>本平台欢迎全国各地的眼镜工厂、品牌、眼镜店加入。请联系我们申请注册账号。</text> </view> <view class="popUpWrap" v-if="whichTap==2" > <button @tap="chatOur(1)">客服1</button> <button @tap="chatOur(2)">客服2</button> </view> </uni-popup> |
2cd0b0f44 bug修复 |
39 |
<!-- <scroll-view |
967ce241a 合并冲突 |
40 41 42 43 44 |
enable-flex @scrolltolower="handleScrolltolower" scroll-y style="height: 1000px;" > --> |
2cd0b0f44 bug修复 |
45 46 47 48 |
<view v-if="isAuth" class="content" > |
323398550 若干功能添加 |
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
<view class="userInfo"> <view class="info"> <image :src="headerphoto" mode="aspectFill" ></image> <view class="infoText"> <text class="userName">{{nickName}}</text> </view> </view> <!-- <view class="service"> <image src="../../static/serviceLogo.png" mode="aspectFill"></image> </view> --> </view> <view class="myOpticsData" |
daf137d6f 合并冲突 |
65 |
@tap="toOpticsData" |
323398550 若干功能添加 |
66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
> <view class="left"> <image src="../../static/img/user/dataWrite.png" mode="aspectFit" ></image> <text>验光数据</text> </view> <image src="../../static/right.png" mode="aspectFit" ></image> </view> <view class="myOrder"> |
7c039b6f9 订单详情页规格修改 |
80 81 82 83 |
<view class="orderHeader" @click="toMyOrder('10')" > |
156736a2e 样式修改 |
84 |
<text>我的订单</text> |
eed6c3ca9 订单列表添加支付和取消功能,修改订... |
85 |
<view class="btn"> |
323398550 若干功能添加 |
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
全部 <image src="../../static/right.png" mode="aspectFit" ></image> </view> </view> <view class="orderBody"> <view class="item waitPay" @click="toMyOrder('0')" > <image src="../../static/img/user/waitDeliver.png" mode="aspectFit" ></image> <text>待付款</text> </view> <view class="item waitDeliver" @click="toMyOrder('1')" > <image src="../../static/img/user/waitPay.png" mode="aspectFit" ></image> <text>待收货</text> </view> <view class="item waitReceive" @click="toMyOrder('2')" > <image src="../../static/img/user/waitReceive.png" mode="aspectFit" ></image> <text>已完成</text> </view> <!-- <view class="item service" @click="toMyOrder('3')"> <image src="../../static/img/user/refound.png" mode="aspectFit"></image> <text>已评价</text> </view> --> </view> </view> <view class="someItem"> <!-- <view class="item"> <view class="left"> <image src="../../static/img/user/shouyi.png" mode="aspectFit"></image> <text>推广记录与收益</text> </view> <image src="../../static/right.png" mode="aspectFit"></image> </view> --> |
2cd0b0f44 bug修复 |
138 139 140 141 |
<view @tap="toAddress" class="item" > |
156736a2e 样式修改 |
142 143 144 145 |
<image src="../../static/address-icon.png" mode="aspectFit" ></image> |
323398550 若干功能添加 |
146 |
<view class="left"> |
2cd0b0f44 bug修复 |
147 |
<text>地址管理</text> |
323398550 若干功能添加 |
148 |
<image |
156736a2e 样式修改 |
149 150 |
class="image2" src="../../static/right.png" |
323398550 若干功能添加 |
151 152 |
mode="aspectFit" ></image> |
323398550 若干功能添加 |
153 |
</view> |
156736a2e 样式修改 |
154 155 |
</view> |
2cd0b0f44 bug修复 |
156 157 158 159 |
<view @tap="introduce" class="item" > |
323398550 若干功能添加 |
160 |
<image |
156736a2e 样式修改 |
161 |
src="../../static/img/user/introduce.png" |
323398550 若干功能添加 |
162 163 |
mode="aspectFit" ></image> |
323398550 若干功能添加 |
164 |
<view class="left"> |
2cd0b0f44 bug修复 |
165 |
<text>系统介绍</text> |
323398550 若干功能添加 |
166 |
<image |
156736a2e 样式修改 |
167 |
src="../../static/right.png" |
323398550 若干功能添加 |
168 169 |
mode="aspectFit" ></image> |
323398550 若干功能添加 |
170 |
</view> |
156736a2e 样式修改 |
171 |
</view> |
2cd0b0f44 bug修复 |
172 173 174 175 |
<view @tap="joinUs" class="item" > |
323398550 若干功能添加 |
176 |
<image |
156736a2e 样式修改 |
177 |
src="../../static/img/user/joinUs.png" |
323398550 若干功能添加 |
178 179 |
mode="aspectFit" ></image> |
323398550 若干功能添加 |
180 |
<view class="left"> |
2cd0b0f44 bug修复 |
181 |
<text>加入我们</text> |
323398550 若干功能添加 |
182 |
<image |
156736a2e 样式修改 |
183 |
src="../../static/right.png" |
323398550 若干功能添加 |
184 185 |
mode="aspectFit" ></image> |
323398550 若干功能添加 |
186 |
</view> |
156736a2e 样式修改 |
187 188 |
</view> <view class="item"> |
323398550 若干功能添加 |
189 |
<image |
156736a2e 样式修改 |
190 |
src="../../static/img/user/service.png" |
323398550 若干功能添加 |
191 192 |
mode="aspectFit" ></image> |
156736a2e 样式修改 |
193 |
<view class="left lastLeft"> |
7c039b6f9 订单详情页规格修改 |
194 195 196 197 |
<button class="contact" open-type="contact" >联系客服</button> |
323398550 若干功能添加 |
198 |
<image |
156736a2e 样式修改 |
199 |
src="../../static/right.png" |
323398550 若干功能添加 |
200 201 |
mode="aspectFit" ></image> |
323398550 若干功能添加 |
202 |
</view> |
323398550 若干功能添加 |
203 204 205 206 207 208 209 210 211 212 |
</view> </view> <view class="recommend"> <view class="title"> <view class="line"></view> <view class="text">精选推荐</view> <view class="line"></view> </view> <!-- 商品列表 --> <view class="goods-list"> |
2cd0b0f44 bug修复 |
213 |
<!-- <scroll-view |
323398550 若干功能添加 |
214 215 216 217 |
enable-flex @scrolltolower="handleScrolltolower" scroll-y class="product-list" |
967ce241a 合并冲突 |
218 |
> --> |
2cd0b0f44 bug修复 |
219 |
<view class="product-list"> |
323398550 若干功能添加 |
220 221 222 223 224 |
<view class="product" v-for="(item, index) in userRecommandList" :key="index" > |
2cd0b0f44 bug修复 |
225 226 227 228 229 |
<Card :goods="item" :scrollTop="scrollTop" :viewHeight="viewHeight" ></Card> |
323398550 若干功能添加 |
230 |
</view> |
2cd0b0f44 bug修复 |
231 |
</view> |
967ce241a 合并冲突 |
232 |
<!-- </scroll-view> --> |
323398550 若干功能添加 |
233 234 235 |
<view class="loading-text">{{loadingText}}</view> </view> </view> |
2cd0b0f44 bug修复 |
236 |
</view> |
323398550 若干功能添加 |
237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
<view v-else class="auth" > <view class="icon"></view> <view class="divider"></view> <view class="title">申请获取以下权限</view> <view class="text">获得您的公开信息(昵称、头像等)</view> <button type="primary" open-type="getUserInfo" @getuserinfo="onGotUserInfo" >授权登陆</button> </view> |
2cd0b0f44 bug修复 |
251 |
<!-- </scroll-view> --> |
323398550 若干功能添加 |
252 |
</view> |
0db291810 “-mcomfirmOder页面 |
253 254 255 |
</template> <script> |
323398550 若干功能添加 |
256 257 |
import Card from '@/components/CommodityCard/CommodityCard.vue' import store from '@/store' |
daf137d6f 合并冲突 |
258 |
import UniPopup from '@/components/UniPopup/uni-popup.vue' |
55ddb3f8a 登陆逻辑修改 |
259 |
|
323398550 若干功能添加 |
260 261 |
export default { components: { |
daf137d6f 合并冲突 |
262 |
Card, |
2cd0b0f44 bug修复 |
263 |
UniPopup, |
323398550 若干功能添加 |
264 265 266 267 |
}, data() { return { isAuth: true, // 是否显示授权页面, |
daf137d6f 合并冲突 |
268 |
pagesnum: 1, // 分页请求初始值 |
2cd0b0f44 bug修复 |
269 |
whichTap: 0, // 弹窗渲染选择条件 |
967ce241a 合并冲突 |
270 271 272 |
loadingText: '到底了', scrollTop: 0, viewHeight: uni.getSystemInfoSync().windowHeight, |
323398550 若干功能添加 |
273 274 |
} }, |
2cd0b0f44 bug修复 |
275 |
onPageScroll({ scrollTop }) { |
967ce241a 合并冲突 |
276 |
// 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件 |
2cd0b0f44 bug修复 |
277 |
this.scrollTop = scrollTop |
967ce241a 合并冲突 |
278 |
}, |
323398550 若干功能添加 |
279 |
onLoad() { |
d6200736b 登陆问题修复 |
280 |
const that = this |
323398550 若干功能添加 |
281 282 283 284 285 |
// 判断是否授权 uni.getSetting({ success(res) { console.log('authSetting', res.authSetting) if (res.authSetting['scope.userInfo'] === true) { |
d6200736b 登陆问题修复 |
286 |
that.isAuth = true |
323398550 若干功能添加 |
287 |
} else { |
d6200736b 登陆问题修复 |
288 |
that.isAuth = false |
323398550 若干功能添加 |
289 |
} |
2cd0b0f44 bug修复 |
290 |
}, |
323398550 若干功能添加 |
291 292 |
}) store.dispatch('userRecommand/getRecommandList', { |
d6200736b 登陆问题修复 |
293 294 295 |
uid: that.$store.state.user.userInfo.uid, openid: that.$store.state.user.userInfo.openid, page: that.pagesnum, |
323398550 若干功能添加 |
296 297 |
}) }, |
967ce241a 合并冲突 |
298 299 300 301 302 303 |
onReachBottom() { // console.log('usr-my',this.$store.state.user.userInfo) this.pagesnum++ store.dispatch('userRecommand/getRecommandList', { uid: this.$store.state.user.userInfo.uid, openid: this.$store.state.user.userInfo.openid, |
2cd0b0f44 bug修复 |
304 |
page: this.pagesnum, |
967ce241a 合并冲突 |
305 306 |
}) }, |
323398550 若干功能添加 |
307 308 309 310 311 312 313 314 |
computed: { nickName() { return this.$store.state.user.userInfo.nickName }, headerphoto() { return this.$store.state.user.userInfo.headerphoto }, userRecommandList() { |
2cd0b0f44 bug修复 |
315 |
console.log('userRecommandList=====>', this.$store.state.userRecommand.recommandList) |
323398550 若干功能添加 |
316 |
return this.$store.state.userRecommand.recommandList |
2cd0b0f44 bug修复 |
317 |
}, |
323398550 若干功能添加 |
318 319 |
}, methods: { |
daf137d6f 合并冲突 |
320 321 322 323 324 325 326 327 |
// 弹窗 changeTap(item) { this.whichTap = item this.$refs.popup.open() }, chatOur(item) { if (item === 1) { uni.makePhoneCall({ |
2cd0b0f44 bug修复 |
328 |
phoneNumber: 13376189297, // 客服1 电话 |
daf137d6f 合并冲突 |
329 330 331 |
}) } else { uni.makePhoneCall({ |
2cd0b0f44 bug修复 |
332 |
phoneNumber: 18014995101, // 客服2 电话 |
daf137d6f 合并冲突 |
333 334 335 |
}) } }, |
323398550 若干功能添加 |
336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
// 授权 onGotUserInfo(e) { if (e.detail.errMsg === 'getUserInfo:ok') { const { fromInfo } = this.$store.state.user // 用户授权成功 store.dispatch('user/getUserInfo', fromInfo) this.isAuth = true } }, toAddress() { uni.navigateTo({ url: '../address/addressList', success: res => {}, fail: () => {}, |
2cd0b0f44 bug修复 |
350 |
complete: () => {}, |
323398550 若干功能添加 |
351 352 353 354 355 |
}) }, introduce() { uni.showModal({ content: '这是一款眼镜及周边产品的销售平台,我们将帮您进行建立全球销售网络,欢迎入住。', |
2cd0b0f44 bug修复 |
356 |
showCancel: false, |
323398550 若干功能添加 |
357 358 359 360 361 |
}) }, joinUs() { uni.showModal({ content: '本平台欢迎全国各地的眼镜工厂、品牌、眼镜店加入。请联系我们申请注册账号', |
2cd0b0f44 bug修复 |
362 |
showCancel: false, |
323398550 若干功能添加 |
363 364 365 366 367 368 369 |
}) }, toMyOrder(status) { uni.navigateTo({ url: `../myOrder/myOrder?status=${status}`, success: res => {}, fail: () => {}, |
2cd0b0f44 bug修复 |
370 |
complete: () => {}, |
323398550 若干功能添加 |
371 372 373 374 |
}) }, toOpticsData() { uni.navigateTo({ |
2cd0b0f44 bug修复 |
375 |
url: '../addOpticsData/addOpticsData', |
323398550 若干功能添加 |
376 |
}) |
2cd0b0f44 bug修复 |
377 378 |
}, }, |
323398550 若干功能添加 |
379 |
} |
0db291810 “-mcomfirmOder页面 |
380 381 |
</script> |
fb85b244c user页面 |
382 |
<style lang="scss"> |
7c039b6f9 订单详情页规格修改 |
383 384 385 386 387 388 389 390 391 392 393 394 395 396 |
// 联系客服 .contact { border: 0; padding: 0; font-size: 14px; text-align: left; background-color: #fff; color: #333; margin: 0; padding-right: 450rpx; &::after { border: 0; } } |
323398550 若干功能添加 |
397 398 399 400 401 402 403 404 405 406 407 408 409 |
.warp { font-size: 24rpx; background-color: #f2f2f2; height: 100vh; } .content { display: flex; flex-direction: column; align-items: center; justify-content: center; background-color: #f2f2f2; } .userInfo { |
2cd0b0f44 bug修复 |
410 |
background-image: linear-gradient(270deg, #f79067 0%, #ff5f3b 66%); |
323398550 若干功能添加 |
411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 |
width: 100%; height: 240rpx; color: #ffffff; padding: 60rpx 82rpx 80rpx 44rpx; box-sizing: border-box; display: flex; flex-direction: row; justify-content: space-between; align-items: flex-start; .info { display: flex; flex-direction: row; justify-content: space-between; align-items: center; image { border-radius: 50rpx; height: 100rpx; width: 100rpx; margin-right: 40rpx; } .infoText { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-scetart; .userName { font-size: 18px; color: #ffffff; margin-bottom: 8rpx; } .nickName { font-size: 12px; color: #ffffff; } } } // .service { // margin-top: 20rpx; // image { // height: 36rpx; // width: 36rpx; // } // } } .myOpticsData { width: 670rpx; height: 120rpx; background-color: #ffffff; border-radius: 6px; box-shadow: 1px 1px 7px 0 rgba(133, 107, 107, 0.1); position: relative; bottom: 44rpx; padding: 40rpx; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; .left { font-size: 14px; color: #333333; display: flex; align-items: center; image { margin-right: 32rpx; |
156736a2e 样式修改 |
475 476 |
width: 40rpx; height: 44rpx; |
323398550 若干功能添加 |
477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 |
} } image { height: 16px; width: 8px; } } .myOrder { width: 100%; height: 296rpx; // margin-top: 116rpx; margin-bottom: 20rpx; padding: 0 40rpx; box-sizing: border-box; background: #ffffff; box-shadow: 0 0 4px 0 rgba(133, 107, 107, 0.1); border-radius: 6px; border-radius: 6px; display: flex; flex-direction: column; justify-content: space-around; align-items: center; .orderHeader { width: 100%; height: 100rpx; display: flex; flex-direction: row; justify-content: space-between; align-items: center; |
2cd0b0f44 bug修复 |
506 |
border-bottom: 1px solid #f5f5f5; |
323398550 若干功能添加 |
507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 |
font-weight: bold; font-size: 18px; color: #333333; .btn { font-size: 12px; color: #999999; display: flex; align-items: center; image { margin-left: 20rpx; height: 32rpx; width: 16rpx; } } } .orderBody { width: 100%; display: flex; flex-direction: row; justify-content: space-around; align-items: center; .item { display: flex; flex-direction: column; align-items: center; image { width: 62rpx; height: 46rpx; } text { margin-top: 24rpx; font-size: 12px; color: #333333; } } } } .someItem { width: 100%; height: 336rpx; background: #ffffff; box-shadow: 0 0 4px 0 rgba(133, 107, 107, 0.1); border-radius: 6px; border-radius: 6px; margin-bottom: 18rpx; box-sizing: border-box; padding: 21rpx 48rpx 21rpx 42rpx; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; align-items: center; .item { |
156736a2e 样式修改 |
560 561 |
display: grid; grid-template-columns: 10% 90%; |
323398550 若干功能添加 |
562 563 564 565 566 567 568 569 |
align-items: center; height: 72rpx; width: 100%; .left { font-size: 14px; color: #333333; display: flex; align-items: center; |
156736a2e 样式修改 |
570 571 |
justify-content: space-between; height: 72rpx; |
2cd0b0f44 bug修复 |
572 |
border-bottom: 1px solid #f2f2f2; |
323398550 若干功能添加 |
573 |
image { |
156736a2e 样式修改 |
574 575 576 |
margin-right: 0; height: 16px; width: 8px; |
323398550 若干功能添加 |
577 578 579 |
} } image { |
156736a2e 样式修改 |
580 581 582 |
margin-right: 32rpx; width: 40rpx; height: 44rpx; |
323398550 若干功能添加 |
583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 |
} } } .recommend { background: #ffffff; box-shadow: 0 0 4px 0 rgba(133, 107, 107, 0.1); border-radius: 6px; border-radius: 6px; width: 100%; .title { display: flex; flex-direction: row; align-items: center; justify-content: space-between; padding: 20rpx 40rpx; .line { width: 264rpx; height: 1rpx; border-bottom: 1px solid #eaeaea; } .text { font-family: PingFangSC-Medium; font-size: 14px; color: #333333; letter-spacing: -0.26px; text-align: justify; line-height: 24px; } } .goods-list { .loading-text { width: 100%; display: flex; justify-content: center; align-items: center; height: 30px; color: #979797; font-size: 12px; } .product-list { width: 92%; padding: 0 4% 3vw 4%; display: flex; justify-content: space-between; flex-wrap: wrap; .product { width: 48%; margin: 0 0 20rpx 0; background: #ffffff; border: 1px solid #f2f2f2; } } } } .auth { height: 100vh; display: flex; flex-direction: column; align-items: center; .icon { width: 140rpx; height: 140rpx; border-radius: 50%; margin-top: 100rpx; background-color: grey; } .divider { height: 1rpx; width: 600rpx; margin-top: 80rpx; background-color: #e6e3e3; } .title { width: 600rpx; margin-top: 50rpx; text-align: left; } .text { width: 600rpx; margin-top: 30rpx; text-align: left; color: #e6e3e3; } button { width: 450rpx; height: 80rpx; line-height: 80rpx; margin-top: 80rpx; border-radius: 30rpx; } } |
daf137d6f 合并冲突 |
674 675 676 677 678 679 680 681 |
.closeBtn { height: 28rpx; width: 28rpx; // border: 1px solid red; position: absolute; top: 20rpx; right: 10rpx; } |
9ff2df1bf 文件名称规范 |
682 |
</style> |