Browse Source

修改html标签为uni标签,修改rem单位为rpx,修改提示及确认为uniapi,修改登录模块为uni接口,修改css入口为APP.vue,增加app端样式支持

master
gaoxs 5 years ago
parent
commit
95845779db
  1. 9
      App.vue
  2. 2
      assets/css/base.css
  3. 1
      assets/css/base.css.map
  4. 42
      assets/css/base.less
  5. 2
      assets/css/reset.css
  6. 1
      assets/css/reset.css.map
  7. 2
      assets/css/reset.less
  8. 2
      assets/css/style.css
  9. 1
      assets/css/style.css.map
  10. 4860
      assets/css/style.less
  11. 50
      components/AddressWindow.vue
  12. 20
      components/CountDown.vue
  13. 68
      components/CouponListWindow.vue
  14. 71
      components/CouponPop.vue
  15. 156
      components/CouponWindow.vue
  16. 2
      components/DataFormat.vue
  17. 2
      components/DataFormatT.vue
  18. 22
      components/Footer.vue
  19. 46
      components/GoodList.vue
  20. 14
      components/Home.vue
  21. 8
      components/Loading.vue
  22. 42
      components/OrderGoods.vue
  23. 100
      components/Payment.vue
  24. 94
      components/PriceChange.vue
  25. 10
      components/ProductConSwiper.vue
  26. 72
      components/ProductWindow.vue
  27. 34
      components/PromotionGood.vue
  28. 32
      components/Recommend.vue
  29. 12
      components/ShareInfo.vue
  30. 28
      components/ShareRedPackets.vue
  31. 56
      components/StorePoster.vue
  32. 67
      components/SwitchWindow.vue
  33. 46
      components/UserEvaluation.vue
  34. 24
      components/WriteOff.vue
  35. 14
      main.js
  36. 6
      manifest.json
  37. 6
      pages/Loading/index.vue
  38. 90
      pages/NotDefined/index.vue
  39. 56
      pages/activity/BargainRecord/index.vue
  40. 266
      pages/activity/DargainDetails/index.vue
  41. 60
      pages/activity/GoodsBargain/index.vue
  42. 70
      pages/activity/GoodsGroup/index.vue
  43. 80
      pages/activity/GoodsSeckill/index.vue
  44. 199
      pages/activity/GroupDetails/index.vue
  45. 434
      pages/activity/GroupRule/index.vue
  46. 16
      pages/activity/Poster/index.vue
  47. 79
      pages/activity/SeckillDetails/index.vue
  48. 373
      pages/authorization/index.vue
  49. 198
      pages/home/index.vue
  50. 20
      pages/launch/index.vue
  51. 257
      pages/order/GoodsReturn/index.vue
  52. 703
      pages/order/Logistics/index.vue
  53. 172
      pages/order/MyOrder/index.vue
  54. 1189
      pages/order/OrderDetails/index.vue
  55. 1062
      pages/order/OrderSubmission/index.vue
  56. 56
      pages/order/PaymentStatus/index.vue
  57. 62
      pages/order/ReturnList/index.vue
  58. 222
      pages/orderAdmin/AdminOrder/index.vue
  59. 630
      pages/orderAdmin/AdminOrderList/index.vue
  60. 86
      pages/orderAdmin/GoodsDeliver/index.vue
  61. 342
      pages/orderAdmin/OrderCancellation/index.vue
  62. 158
      pages/orderAdmin/OrderIndex/index.vue
  63. 86
      pages/orderAdmin/Statistics/index.vue
  64. 42
      pages/shop/EvaluateList/index.vue
  65. 46
      pages/shop/GoodSearch/index.vue
  66. 64
      pages/shop/GoodsClass/index.vue
  67. 50
      pages/shop/GoodsCollection/index.vue
  68. 345
      pages/shop/GoodsCon/index.vue
  69. 366
      pages/shop/GoodsEvaluate/index.vue
  70. 92
      pages/shop/GoodsList/index.vue
  71. 140
      pages/shop/GoodsPromotion/index.vue
  72. 26
      pages/shop/HotNewGoods/index.vue
  73. 926
      pages/shop/ShoppingCart/index.vue
  74. 28
      pages/shop/news/NewsDetail/index.vue
  75. 36
      pages/shop/news/NewsList/index.vue
  76. 101
      pages/user/BindingPhone/index.vue
  77. 26
      pages/user/ChangePassword/index.vue
  78. 18
      pages/user/CustomerList/index.vue
  79. 264
      pages/user/Login/index.vue
  80. 175
      pages/user/PersonalData/index.vue
  81. 189
      pages/user/Recharge/index.vue
  82. 58
      pages/user/Register/index.vue
  83. 89
      pages/user/RetrievePassword/index.vue
  84. 270
      pages/user/User/index.vue
  85. 84
      pages/user/UserAccount/index.vue
  86. 54
      pages/user/UserBill/index.vue
  87. 140
      pages/user/UserVip/index.vue
  88. 90
      pages/user/address/AddAddress/index.vue
  89. 116
      pages/user/address/AddressManagement/index.vue
  90. 64
      pages/user/coupon/GetCoupon/index.vue
  91. 46
      pages/user/coupon/UserCoupon/index.vue
  92. 16
      pages/user/promotion/CashAudit/index.vue
  93. 79
      pages/user/promotion/CashRecord/index.vue
  94. 76
      pages/user/promotion/CommissionDetails/index.vue
  95. 18
      pages/user/promotion/Poster/index.vue
  96. 483
      pages/user/promotion/PromoterList/index.vue
  97. 99
      pages/user/promotion/PromoterOrder/index.vue
  98. 149
      pages/user/promotion/UserCash/index.vue
  99. 86
      pages/user/promotion/UserPromotion/index.vue
  100. 120
      pages/user/signIn/Integral/index.vue
  101. Some files were not shown because too many files have changed in this diff Show More

9
App.vue

@ -13,6 +13,11 @@
} }
</script> </script>
<style>
/*每个页面公共css */ <style lang="less">
/*每个页面公共css */
@import "./assets/iconfont/iconfont.css";
@import "./assets/css/base.less";
@import "./assets/css/reset.less";
@import "./assets/css/style.less";
</style> </style>

2
assets/css/base.css

@ -0,0 +1,2 @@
@charset "UTF-8";.font-color-red{color:#73CBB6 !important}.bg-color-red{background-color:#73CBB6 !important}.icon-color{color:#73CBB6}.cart-color{color:#73CBB6 !important;border:1px solid #73CBB6 !important}.padding20{padding:20rpx}.pad20{padding:0 20rpx}.padding30{padding:30rpx}.pad30{padding:0 30rpx}.acea-row{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.acea-row.row-middle{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.acea-row.row-top{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}.acea-row.row-bottom{-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end}.acea-row.row-center{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.acea-row.row-right{-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}.acea-row.row-left{-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}.acea-row.row-between{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.acea-row.row-around{-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around}.acea-row.row-column-around{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around}.acea-row.row-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.acea-row.row-column-between{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.acea-row.row-center-wrapper{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.acea-row.row-between-wrapper{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.slider-banner{position:relative;width:100%;overflow:hidden}.slider-banner .swiper-container{height:100%}.slider-banner image{display:block;width:100%;height:100%}.start{width:122rpx;height:30rpx;background-image:url("https://h5.dayouqiantu.cn/static/images/start.png");background-repeat:no-repeat;-webkit-background-size:122rpx auto;background-size:122rpx auto}.start.star5{background-position:0 3rpx}.start.star4{background-position:0 -30rpx}.start.star3{background-position:0 -70rpx}.start.star2{background-position:0 -105rpx}.start.star1{background-position:0 -140rpx}.start.star0{background-position:0 -175rpx}.checkbox-wrapper{position:relative}.checkbox-wrapper input{display:none}.checkbox-wrapper .icon{position:absolute;left:0;top:50%;display:inline-block;width:18px;height:18px;border:1px solid #cccccc;-webkit-border-radius:50%;border-radius:50%;-webkit-transform:translate(0, -50%);-ms-transform:translate(0, -50%);transform:translate(0, -50%)}.checkbox-wrapper input:checked+.icon{background-color:#e93323;border-color:#e93323;background-image:url("https://h5.dayouqiantu.cn/static/images/enter.png");-webkit-background-size:21rpx 15rpx;background-size:21rpx 15rpx;background-repeat:no-repeat;background-position:center center}.Loads{height:80rpx;font-size:25rpx;color:#000}.Loads .iconfont{font-size:30rpx;margin-right:10rpx;height:32rpx;line-height:32rpx}@-webkit-keyframes load{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.loadingpic{-webkit-animation:load 3s linear 1s infinite;animation:load 3s linear 1s infinite}.loading{-webkit-animation:load linear 1s infinite;animation:load linear 1s infinite}
/*# sourceMappingURL=./base.css.map */

1
assets/css/base.css.map

@ -0,0 +1 @@
{"version":3,"sources":["base.less"],"names":[],"mappings":"AAAA,iBAIA,gBACE,wBAAA,CAEF,cACE,mCAAA,CAEF,YACE,aAAA,CAEF,YACE,yBACA,mCAAA,CAGF,WACE,aAAA,CAGF,OACE,eAAA,CAGF,WACE,aAAA,CAGF,OACE,eAAA,CAGF,UACE,oBACA,AADA,qBACA,AADA,oBACA,AADA,aACA,uBAAA,mBAAA,cAAA,CAGF,qBACE,yBAAA,2BAAA,sBAAA,kBAAA,CAEF,kBACE,wBAAA,+BAAA,qBAAA,sBAAA,CAEF,qBACE,sBAAA,6BAAA,mBAAA,oBAAA,CAEF,qBACE,wBAAA,+BAAA,qBAAA,sBAAA,CAEF,oBACE,qBAAA,iCAAA,kBAAA,wBAAA,CAEF,mBACE,uBAAA,mCAAA,oBAAA,0BAAA,CAEF,sBACE,yBAAA,sCAAA,sBAAA,6BAAA,CAEF,qBACE,qCAAA,yBAAA,4BAAA,CAEF,4BACE,4BACA,AADA,6BACA,AADA,8BACA,AADA,0BACA,AADA,sBACA,qCAAA,yBAAA,4BAAA,CAEF,qBACE,4BAAA,6BAAA,8BAAA,0BAAA,qBAAA,CAEF,6BACE,4BACA,AADA,6BACA,AADA,8BACA,AADA,0BACA,AADA,sBACA,yBAAA,sCAAA,sBAAA,6BAAA,CAGF,6BACE,yBACA,AADA,2BACA,AADA,sBACA,AADA,mBACA,wBAAA,+BAAA,qBAAA,sBAAA,CAGF,8BACE,yBACA,AADA,2BACA,AADA,sBACA,AADA,mBACA,yBAAA,sCAAA,sBAAA,6BAAA,CAIF,eACE,kBACA,WAEA,eAAA,CAKF,iCACE,WAAA,CAEF,qBACE,cACA,WACA,WAAA,CAEF,OACE,aACA,aACA,0EACA,4BACA,oCAAA,2BAAA,CAEF,aACE,0BAAA,CAEF,aACE,4BAAA,CAEF,aACE,4BAAA,CAEF,aACE,6BAAA,CAEF,aACE,6BAAA,CAEF,aACE,6BAAA,CAGF,kBACE,iBAAA,CAEF,wBACE,YAAA,CAEF,wBACE,kBACA,OACA,QACA,qBACA,WACA,YACA,yBACA,0BACA,AADA,kBACA,qCAAW,AAAX,iCAAW,AAAX,4BAAW,CAEb,sCACE,yBACA,qBACA,0EACA,oCACA,AADA,4BACA,4BACA,iCAAA,CAEF,OACE,aACA,gBACA,UAAA,CAEF,iBACE,gBACA,mBACA,aACA,iBAAA,CAGF,wBACE,KACE,+BAAW,AAAX,sBAAW,CAEb,GACE,iCAAW,AAAX,wBAAW,CAAA,CAGf,AARA,gBACE,KACE,+BAAW,AAAX,sBAAW,CAEb,GACE,iCAAW,AAAX,wBAAW,CAAA,CAGf,YACE,6CAAA,oCAAA,CAEF,SACE,0CAAA,iCAAA,CAAA","file":"to.css","sourcesContent":[null]}

42
assets/css/base.less

@ -17,19 +17,19 @@
} }
/* padding20 */ /* padding20 */
.padding20 { .padding20 {
padding: 0.2*3.125rem; padding: 0.2*100rpx;
} }
/* pad20 */ /* pad20 */
.pad20 { .pad20 {
padding: 0 0.2*3.125rem; padding: 0 0.2*100rpx;
} }
/* padding30 */ /* padding30 */
.padding30 { .padding30 {
padding: 0.3*3.125rem; padding: 0.3*100rpx;
} }
/*pad30 */ /*pad30 */
.pad30 { .pad30 {
padding: 0 0.3*3.125rem; padding: 0 0.3*100rpx;
} }
/* layout */ /* layout */
.acea-row { .acea-row {
@ -96,35 +96,35 @@
.slider-banner .swiper-container { .slider-banner .swiper-container {
height: 100%; height: 100%;
} }
.slider-banner img { .slider-banner image{
display: block; display: block;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.start { .start {
width: 1.22*3.125rem; width: 1.22*100rpx;
height: 0.3*3.125rem; height: 0.3*100rpx;
background-image: url("https://h5.dayouqiantu.cn/static/images/start.png"); background-image: url("https://h5.dayouqiantu.cn/static/images/start.png");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 1.22*3.125rem auto; background-size: 1.22*100rpx auto;
} }
.start.star5 { .start.star5 {
background-position: 0 0.03*3.125rem; background-position: 0 0.03*100rpx;
} }
.start.star4 { .start.star4 {
background-position: 0 -0.3*3.125rem; background-position: 0 -0.3*100rpx;
} }
.start.star3 { .start.star3 {
background-position: 0 -0.7*3.125rem; background-position: 0 -0.7*100rpx;
} }
.start.star2 { .start.star2 {
background-position: 0 -1.05*3.125rem; background-position: 0 -1.05*100rpx;
} }
.start.star1 { .start.star1 {
background-position: 0 -1.4*3.125rem; background-position: 0 -1.4*100rpx;
} }
.start.star0 { .start.star0 {
background-position: 0 -1.75*3.125rem; background-position: 0 -1.75*100rpx;
} }
/* 单选框和多选框 */ /* 单选框和多选框 */
.checkbox-wrapper { .checkbox-wrapper {
@ -148,20 +148,20 @@
background-color: #e93323; background-color: #e93323;
border-color: #e93323; border-color: #e93323;
background-image: url("https://h5.dayouqiantu.cn/static/images/enter.png"); background-image: url("https://h5.dayouqiantu.cn/static/images/enter.png");
background-size: 0.21*3.125rem 0.15*3.125rem; background-size: 0.21*100rpx 0.15*100rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center center; background-position: center center;
} }
.Loads { .Loads {
height: 0.8*3.125rem; height: 0.8*100rpx;
font-size: 0.25*3.125rem; font-size: 0.25*100rpx;
color: #000; color: #000;
} }
.Loads .iconfont { .Loads .iconfont {
font-size: 0.3*3.125rem; font-size: 0.3*100rpx;
margin-right: 0.1*3.125rem; margin-right: 0.1*100rpx;
height: 0.32*3.125rem; height: 0.32*100rpx;
line-height: 0.32*3.125rem; line-height: 0.32*100rpx;
} }
/*加载动画*/ /*加载动画*/
@keyframes load { @keyframes load {

2
assets/css/reset.css

@ -0,0 +1,2 @@
input{line-height:normal;-webkit-box-sizing:border-box;box-sizing:border-box}@font-face{font-family:'GuildfordProBook 5';src:url('https://h5.dayouqiantu.cn/static/iconfont/GuildfordProBook5.otf')}[v-cloak]{display:none}.iconfont{font-size:36rpx}@media (-webkit-min-device-pixel-ratio:1.5),(min-device-pixel-ratio:1.5){.border-1px::after{-webkit-transform:scaleY(.7);-ms-transform:scaleY(.7);transform:scaleY(.7)}.border-1px::before{-webkit-transform:scaleY(.7);-ms-transform:scaleY(.7);transform:scaleY(.7)}}@media (-webkit-min-device-pixel-ratio:2),(min-device-pixel-ratio:2){.border-1px::after{-webkit-transform:scaleY(.5);-ms-transform:scaleY(.5);transform:scaleY(.5)}.border-1px::before{-webkit-transform:scaleY(.5);-ms-transform:scaleY(.5);transform:scaleY(.5)}}@media (-webkit-min-device-pixel-ratio:3),(min-device-pixel-ratio:3){.border-1px::after{-webkit-transform:scaleY(.33);-ms-transform:scaleY(.33);transform:scaleY(.33)}.border-1px::before{-webkit-transform:scaleY(.33);-ms-transform:scaleY(.33);transform:scaleY(.33)}}.line1{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;width:100%}.line2{word-break:break-all;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.mask{position:fixed;top:0;left:0;right:0;bottom:0;z-index:55;background-color:rgba(0,0,0,0.5)}
/*# sourceMappingURL=./reset.css.map */

1
assets/css/reset.css.map

@ -0,0 +1 @@
{"version":3,"sources":["reset.less"],"names":[],"mappings":"AAAA,MAAM,mBAAqB,8BAAA,qBAAA,CAC3B,WACE,iCACA,0EAAS,CAEX,UACE,YAAA,CAEF,UACE,eAAA,CAGF,yEACE,mBACE,6BAAW,AAAX,yBAAW,AAAX,oBAAW,CAEb,oBACE,6BAAW,AAAX,yBAAW,AAAX,oBAAW,CAAA,CAGf,qEACE,mBACE,6BAAW,AAAX,yBAAW,AAAX,oBAAW,CAEb,oBACE,6BAAW,AAAX,yBAAW,AAAX,oBAAW,CAAA,CAGf,qEACE,mBACE,8BAAW,AAAX,0BAAW,AAAX,qBAAW,CAEb,oBACE,8BAAW,AAAX,0BAAW,AAAX,qBAAW,CAAA,CAGf,OAAO,gBAAgB,0BAAuB,AAAvB,uBAAuB,mBAAmB,UAAA,CACjE,OAAO,qBAAqB,oBAAoB,qBAAqB,4BAA4B,eAAA,CACjG,MAAM,eAAe,MAAM,OAAO,QAAQ,SAAS,WAAW,gCAAA,CAAA","file":"to.css","sourcesContent":[null]}

2
assets/css/reset.less

@ -7,7 +7,7 @@ input{line-height: normal; box-sizing:border-box;}
display: none; display: none;
} }
.iconfont{ .iconfont{
font-size: .36*3.125rem; font-size: .36*100rpx;
} }
/* 一像素边框 */ /* 一像素边框 */
@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5) { @media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5) {

2
assets/css/style.css

File diff suppressed because one or more lines are too long

1
assets/css/style.css.map

File diff suppressed because one or more lines are too long

4860
assets/css/style.less

File diff suppressed because it is too large Load Diff

50
components/AddressWindow.vue

@ -1,39 +1,39 @@
<template> <template>
<div> <view>
<div class="address-window" :class="value === true ? 'on' : ''"> <view class="address-window" :class="value === true ? 'on' : ''">
<div class="title"> <view class="title">
选择地址 选择地址
<span class="iconfont icon-guanbi" @click="closeAddress"></span> <text class="iconfont icon-guanbi" @click="closeAddress"></text>
</div> </view>
<div class="list" v-if="addressList.length"> <view class="list" v-if="addressList.length">
<div <view
class="item acea-row row-between-wrapper" class="item acea-row row-between-wrapper"
:class="item.id === checked ? 'font-color-red' : ''" :class="item.id === checked ? 'font-color-red' : ''"
v-for="(item, addressIndex) in addressList" v-for="(item, addressIndex) in addressList"
@click="tapAddress(addressIndex)" @click="tapAddress(addressIndex)"
:key="addressIndex" :key="addressIndex"
> >
<span class="iconfont icon-ditu" :class="item.id === checked ? 'font-color-red' : ''"></span> <text class="iconfont icon-ditu" :class="item.id === checked ? 'font-color-red' : ''"></text>
<div class="addressTxt"> <view class="addressTxt">
<div class="name" :class="item.id === checked ? 'font-color-red' : ''"> <view class="name" :class="item.id === checked ? 'font-color-red' : ''">
{{ item.realName }} {{ item.realName }}
<span class="phone">{{ item.phone }}</span> <text class="phone">{{ item.phone }}</text>
</div> </view>
<div class="line1"> <view class="line1">
{{ item.province }}{{ item.city }}{{ item.district {{ item.province }}{{ item.city }}{{ item.district
}}{{ item.detail }} }}{{ item.detail }}
</div> </view>
</div> </view>
<span class="iconfont icon-complete" :class="item.id === checked ? 'font-color-red' : ''"></span> <text class="iconfont icon-complete" :class="item.id === checked ? 'font-color-red' : ''"></text>
</div> </view>
</div> </view>
<div class="pictrue" v-if="addressList.length < 1"> <view class="pictrue" v-if="addressList.length < 1">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noAddress.png'" class="image" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/noAddress.png'" class="image" />
</div> </view>
<div class="addressBnt bg-color-red" @click="goAddressPages">新加地址</div> <view class="addressBnt bg-color-red" @click="goAddressPages">新加地址</view>
</div> </view>
<div class="mask" @touchmove.prevent :hidden="value === false" @click="closeAddress"></div> <view class="mask" @touchmove.prevent :hidden="value === false" @click="closeAddress"></view>
</div> </view>
</template> </template>
<script> <script>
import { getAddressList } from "@/api/user"; import { getAddressList } from "@/api/user";

20
components/CountDown.vue

@ -1,15 +1,15 @@
<template> <template>
<div class="time"> <view class="time">
{{ tipText }} {{ tipText }}
<span class="styleAll" v-if="isDay === true">{{ day }}</span> <text class="styleAll" v-if="isDay === true">{{ day }}</text>
<span class="timeTxt">{{ dayText }}</span> <text class="timeTxt">{{ dayText }}</text>
<span class="styleAll">{{ hour }}</span> <text class="styleAll">{{ hour }}</text>
<span class="timeTxt">{{ hourText }}</span> <text class="timeTxt">{{ hourText }}</text>
<span class="styleAll">{{ minute }}</span> <text class="styleAll">{{ minute }}</text>
<span class="timeTxt">{{ minuteText }}</span> <text class="timeTxt">{{ minuteText }}</text>
<span class="styleAll">{{ second }}</span> <text class="styleAll">{{ second }}</text>
<span class="timeTxt">{{ secondText }}</span> <text class="timeTxt">{{ secondText }}</text>
</div> </view>
</template> </template>
<script> <script>
export default { export default {

68
components/CouponListWindow.vue

@ -1,51 +1,51 @@
<template> <template>
<div> <view>
<div class="coupon-list-window" :class="value === true ? 'on' : ''"> <view class="coupon-list-window" :class="value === true ? 'on' : ''">
<div class="title"> <view class="title">
优惠券 优惠券
<span class="iconfont icon-guanbi" @click="close"></span> <text class="iconfont icon-guanbi" @click="close"></text>
</div> </view>
<div v-if="couponList.length > 0"> <view v-if="couponList.length > 0">
<div class="coupon-list"> <view class="coupon-list">
<div <view
class="item acea-row row-center-wrapper" class="item acea-row row-center-wrapper"
v-for="coupon in couponList" v-for="coupon in couponList"
:key="coupon.id" :key="coupon.id"
@click="click(coupon)" @click="click(coupon)"
> >
<div class="money"> <view class="money">
<span class="num">{{ coupon.couponPrice }}</span> <text class="num">{{ coupon.couponPrice }}</text>
</div> </view>
<div class="text"> <view class="text">
<div class="condition line1">{{ coupon.couponTitle }}</div> <view class="condition line1">{{ coupon.couponTitle }}</view>
<div class="data acea-row row-between-wrapper"> <view class="data acea-row row-between-wrapper">
<div v-if="coupon.endTime === 0">不限时</div> <view v-if="coupon.endTime === 0">不限时</view>
<div v-else><data-format-t :data="coupon.addTime"></data-format-t> - <data-format-t :data="coupon.endTime"></data-format-t></div> <view v-else><data-format-t :data="coupon.addTime"></data-format-t> - <data-format-t :data="coupon.endTime"></data-format-t></view>
<div <view
class="iconfont icon-xuanzhong1 font-color-red" class="iconfont icon-xuanzhong1 font-color-red"
v-if="checked === coupon.id" v-if="checked === coupon.id"
></div> ></view>
<div class="iconfont icon-weixuanzhong" v-else></div> <view class="iconfont icon-weixuanzhong" v-else></view>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<div class="couponNo bg-color-red" @click="couponNo">不使用优惠券</div> <view class="couponNo bg-color-red" @click="couponNo">不使用优惠券</view>
</div> </view>
<div v-if="!couponList.length && loaded"> <view v-if="!couponList.length && loaded">
<div class="pictrue"> <view class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noCoupon.png'" class="image" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/noCoupon.png'" class="image" />
</div> </view>
</div> </view>
</div> </view>
<div <view
class="mask" class="mask"
@touchmove.prevent @touchmove.prevent
:hidden="value === false" :hidden="value === false"
@click="close" @click="close"
></div> ></view>
</div> </view>
</template> </template>
<style scoped> <style scoped>
.coupon-list-window .iconfont { .coupon-list-window .iconfont {

71
components/CouponPop.vue

@ -1,48 +1,41 @@
<template> <template>
<div> <view>
<div class="coupon-list-window" :class="coupon.coupon === true ? 'on' : ''"> <view class="coupon-list-window" :class="coupon.coupon === true ? 'on' : ''">
<div class="title"> <view class="title">
优惠券<span class="iconfont icon-guanbi" @click="close"></span> 优惠券
</div> <text class="iconfont icon-guanbi" @click="close"></text>
<div class="coupon-list" v-if="coupon.list.length > 0"> </view>
<div <view class="coupon-list" v-if="coupon.list.length > 0">
<view
class="item acea-row row-center-wrapper" class="item acea-row row-center-wrapper"
v-for="(item, couponpopIndex) in coupon.list" v-for="(item, couponpopIndex) in coupon.list"
:key="couponpopIndex" :key="couponpopIndex"
@click="getCouponUser(couponpopIndex, item.id)" @click="getCouponUser(couponpopIndex, item.id)"
> >
<div class="money"> <view class="money">
<span class="num">{{ item.coupon_price }}</span>
</div> <text class="num">{{ item.coupon_price }}</text>
<div class="text"> </view>
<div class="condition line1"> <view class="text">
购物满{{ item.use_min_price }}元可用 <view class="condition line1">购物满{{ item.use_min_price }}元可用</view>
</div> <view class="data acea-row row-between-wrapper">
<div class="data acea-row row-between-wrapper"> <view v-if="item.end_time === 0">不限时</view>
<div v-if="item.end_time === 0">不限时</div> <view v-else>{{ item.start_time }}-{{ item.end_time }}</view>
<div v-else>{{ item.start_time }}-{{ item.end_time }}</div> <view
<div
class="bnt acea-row row-center-wrapper" class="bnt acea-row row-center-wrapper"
:class="!item.is_use ? 'bg-color-red' : 'gray'" :class="!item.is_use ? 'bg-color-red' : 'gray'"
> >{{ !item.is_use ? "立即领取" : "已领取" }}</view>
{{ !item.is_use ? "立即领取" : "已领取" }} </view>
</div> </view>
</div> </view>
</div> </view>
</div>
</div>
<!--无优惠券--> <!--无优惠券-->
<div class="pictrue" v-else> <view class="pictrue" v-else>
<img :src="$VUE_APP_RESOURCES_URL+'/images/noCoupon.png'" class="image" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/noCoupon.png'" class="image" />
</div> </view>
</div> </view>
<div <view class="mask" @touchmove.prevent :hidden="coupon.coupon === false" @click="close"></view>
class="mask" </view>
@touchmove.prevent
:hidden="coupon.coupon === false"
@click="close"
></div>
</div>
</template> </template>
<script> <script>
import { getCouponReceive } from "@/api/user"; import { getCouponReceive } from "@/api/user";
@ -67,7 +60,11 @@ export default {
list = that.coupon.list; list = that.coupon.list;
if (list[index].is_use === true) return; if (list[index].is_use === true) return;
getCouponReceive(id).then(function() { getCouponReceive(id).then(function() {
that.$dialog.toast({ mes: "已领取" }); uni.showToast({
title: "已领取",
icon: "none",
duration: 2000
});
that.$set(list[index], "is_use", true); that.$set(list[index], "is_use", true);
that.$emit("changefun", { action: "currentcoupon", value: index }); that.$emit("changefun", { action: "currentcoupon", value: index });
that.$emit("changeFun", { action: "changecoupon", value: false }); that.$emit("changeFun", { action: "changecoupon", value: false });

156
components/CouponWindow.vue

@ -1,80 +1,88 @@
<template> <template>
<div v-if="couponList.length > 0"> <view v-if="couponList.length > 0">
<div class="coupon-window" :class="value ? 'on' : ''"> <view class="coupon-window" :class="value ? 'on' : ''">
<div class="couponWinList"> <view class="couponWinList">
<div <view class="item acea-row row-between-wrapper" v-for="(item, couponwindiwIndex) in couponList" :key="couponwindiwIndex">
class="item acea-row row-between-wrapper" <view class="money font-color-red">
v-for="(item, couponwindiwIndex) in couponList" <text class="num">{{ item.coupon_price }}</text>
:key="couponwindiwIndex" </view>
> <view class="text">
<div class="money font-color-red"> <view class="name">
<span class="num">{{ item.coupon_price }}</span> 购物买{{ item.use_min_price }}{{ item.coupon_price }}
</div> </view>
<div class="text"> <view v-if="item.end_time">
<div class="name"> {{ item.start_time }}-{{ item.end_time }}
购物买{{ item.use_min_price }}{{ item.coupon_price }} </view>
</div> </view>
<div v-if="item.end_time"> </view>
{{ item.start_time }}-{{ item.end_time }} <view style="height:1.2rem"></view>
</div> </view>
</div> <view class="lid">
</div> <view class="bnt font-color-red" @click="checked">立即领取</view>
<div style="height:1.2rem"></div> <view class="iconfont icon-guanbi3" @click="close"></view>
</div> </view>
<div class="lid"> </view>
<div class="bnt font-color-red" @click="checked">立即领取</div> <view class="mask" @touchmove.prevent :hidden="!value"></view>
<div class="iconfont icon-guanbi3" @click="close"></div> </view>
</div>
</div>
<div class="mask" @touchmove.prevent :hidden="!value"></div>
</div>
</template> </template>
<script> <script>
import { mapGetters } from "vuex"; import {
import toLogin from "@/libs/login"; mapGetters
import { couponReceiveBatch } from "@/api/user"; } from "vuex";
import toLogin from "@/libs/login";
import {
couponReceiveBatch
} from "@/api/user";
export default { export default {
name: "CouponWindow", name: "CouponWindow",
props: { props: {
couponList: { couponList: {
type: Array, type: Array,
default: () => [] default: () => []
} }
}, },
computed: mapGetters(["isLogin"]), computed: mapGetters(["isLogin"]),
data: function() { data: function() {
return { return {
value: true value: true
}; };
}, },
mounted: function() {}, mounted: function() {},
methods: { methods: {
checked() { checked() {
const isLogin = this.isLogin; const isLogin = this.isLogin;
if (!isLogin) return toLogin(); if (!isLogin) return toLogin();
const ids = this.couponList.reduce((initial, coupon) => { const ids = this.couponList.reduce((initial, coupon) => {
initial.push(coupon.id); initial.push(coupon.id);
return initial; return initial;
}, []); }, []);
couponReceiveBatch(ids) couponReceiveBatch(ids)
.then(() => { .then(() => {
this.$emit("success"); this.$emit("success");
this.$dialog.toast({ mes: "领取成功" }); uni.showToast({
}) title: '领取成功',
.catch(() => { icon: 'success',
this.$dialog.toast({ mes: "已领取" }); duration: 2000
}); });
if (isLogin) { })
this.value = false; .catch(() => {
this.$emit("checked"); uni.showToast({
} title: '已领取',
}, icon: 'none',
close: function() { duration: 2000
this.value = false; });
this.$emit("close"); });
} if (isLogin) {
} this.value = false;
}; this.$emit("checked");
}
},
close: function() {
this.value = false;
this.$emit("close");
}
}
};
</script> </script>

2
components/DataFormat.vue

@ -1,5 +1,5 @@
<template> <template>
<span>{{time}}</span> <text>{{time}}</text>
</template> </template>
<script> <script>
import { dataFormat } from "@/utils"; import { dataFormat } from "@/utils";

2
components/DataFormatT.vue

@ -1,5 +1,5 @@
<template> <template>
<span>{{time}}</span> <text>{{time}}</text>
</template> </template>
<script> <script>
import { dataFormatT } from "@/utils"; import { dataFormatT } from "@/utils";

22
components/Footer.vue

@ -1,23 +1,23 @@
<template> <template>
<div> <view>
<div v-if="isIpx" class="iphonex-footer-bg"></div> <view v-if="isIpx" class="iphonex-footer-bg"></view>
<div v-else class="footer-bg"></div> <view v-else class="footer-bg"></view>
<div id="footer" :class="[isIpx ? 'iphonex-footer' : '', 'acea-row row-middle'] "> <view id="footer" :class="[isIpx ? 'iphonex-footer' : '', 'acea-row row-middle'] ">
<div <view
@click="changeTabtar(footerIndex)" @click="changeTabtar(footerIndex)"
class="item" class="item"
:class="{ on: footerIndex == tabtarIndex }" :class="{ on: footerIndex == tabtarIndex }"
v-for="(item, footerIndex) in footerList" v-for="(item, footerIndex) in footerList"
:key="footerIndex" :key="footerIndex"
> >
<div <view
class="iconfont" class="iconfont"
:class="item.icon1 + ' ' + (footerIndex == tabtarIndex ? item.icon2 : '')" :class="item.icon1 + ' ' + (footerIndex == tabtarIndex ? item.icon2 : '')"
></div> ></view>
<div>{{ item.name }}</div> <view>{{ item.name }}</view>
</div> </view>
</div> </view>
</div> </view>
</template> </template>
<script> <script>
import { mapState, mapMutations, mapActions } from "vuex"; import { mapState, mapMutations, mapActions } from "vuex";

46
components/GoodList.vue

@ -1,28 +1,28 @@
<template> <template>
<div class="goodList"> <view class="goodList">
<div @click="routerGo(item)" class="item acea-row row-between-wrapper" v-for="(item, goodlistIndex) in goodList" :key="goodlistIndex"> <view @click="routerGo(item)" class="item acea-row row-between-wrapper" v-for="(item, goodlistIndex) in goodList" :key="goodlistIndex">
<div class="pictrue"> <view class="pictrue">
<img :src="item.image" class="image" /> <image :src="item.image" class="image" />
<img :src="$VUE_APP_RESOURCES_URL + '/images/one.png'" class="numPic" v-if="isSort === true && index === 0" /> <image :src="$VUE_APP_RESOURCES_URL + '/images/one.png'" class="numPic" v-if="isSort === true && index === 0" />
<img :src="$VUE_APP_RESOURCES_URL + '/images/two.png'" class="numPic" v-if="isSort === true && index === 1" /> <image :src="$VUE_APP_RESOURCES_URL + '/images/two.png'" class="numPic" v-if="isSort === true && index === 1" />
<img :src="$VUE_APP_RESOURCES_URL + '/images/three.png'" class="numPic" v-if="isSort === true && index === 2" /> <image :src="$VUE_APP_RESOURCES_URL + '/images/three.png'" class="numPic" v-if="isSort === true && index === 2" />
</div> </view>
<div class="underline"> <view class="underline">
<div class="text"> <view class="text">
<div class="line1">{{ item.storeName }}</div> <view class="line1">{{ item.storeName }}</view>
<div class="money font-color-red"> <view class="money font-color-red">
<span class="num">{{ item.price }}</span> <text class="num">{{ item.price }}</text>
</div> </view>
<div class="vip-money acea-row row-middle"> <view class="vip-money acea-row row-middle">
<div class="vip">{{ item.otPrice || 0 }}</div> <view class="vip">{{ item.otPrice || 0 }}</view>
<span class="num">已售{{ item.sales }}{{ item.unitName }}</span> <text class="num">已售{{ item.sales }}{{ item.unitName }}</text>
</div> </view>
</div> </view>
</div> </view>
<div class="iconfont icon-gouwuche cart-color acea-row row-center-wrapper"></div> <view class="iconfont icon-gouwuche cart-color acea-row row-center-wrapper"></view>
</div> </view>
</div> </view>
</template> </template>
<script> <script>
export default { export default {

14
components/Home.vue

@ -1,11 +1,11 @@
<template> <template>
<div class="home" :style="{ top: top + 'px' }" style="position:fixed;" id="right-nav" @touchmove="touchmove($event)"> <view class="home" :style="{ top: top + 'px' }" style="position:fixed;" id="right-nav" @touchmove="touchmove($event)">
<div class="homeCon bg-color-red1" :class="homeActive === true ? 'on' : ''"> <view class="homeCon bg-color-red1" :class="homeActive === true ? 'on' : ''">
<div @click="homeGo()" class="iconfont icon-shouye-xianxing " style="color: green;"></div> <view @click="homeGo()" class="iconfont icon-shouye-xianxing " style="color: green;"></view>
<div @click="shoppingCartGo()" class="iconfont icon-caigou-xianxing" style="color: green;"></div> <view @click="shoppingCartGo()" class="iconfont icon-caigou-xianxing" style="color: green;"></view>
<!--<div @click="userGo()" class="iconfont icon-yonghu1"></div>--> <!--<view @click="userGo()" class="iconfont icon-yonghu1"></view>-->
</div> </view>
</div> </view>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';

8
components/Loading.vue

@ -1,19 +1,19 @@
<template> <template>
<div <view
class="Loads acea-row row-center-wrapper" class="Loads acea-row row-center-wrapper"
v-if="loading || !loaded" v-if="loading || !loaded"
style="margin-top: .2rem;" style="margin-top: .2rem;"
> >
<template v-if="loading"> <template v-if="loading">
<div <view
class="iconfont icon-jiazai loading acea-row row-center-wrapper" class="iconfont icon-jiazai loading acea-row row-center-wrapper"
></div> ></view>
正在加载中 正在加载中
</template> </template>
<template v-else> <template v-else>
上拉加载更多 上拉加载更多
</template> </template>
</div> </view>
</template> </template>
<script> <script>

42
components/OrderGoods.vue

@ -1,30 +1,30 @@
<template> <template>
<div class="orderGoods"> <view class="orderGoods">
<div class="total">{{ cartInfo.length }}件商品</div> <view class="total">{{ cartInfo.length }}件商品</view>
<div class="goodWrapper"> <view class="goodWrapper">
<div class="item acea-row row-between-wrapper" v-for="cart in cartInfo" :key="cart.id"> <view class="item acea-row row-between-wrapper" v-for="cart in cartInfo" :key="cart.id">
<div class="pictrue"> <view class="pictrue">
<img :src="cart.productInfo.image" class="image" /> <image :src="cart.productInfo.image" class="image" />
</div> </view>
<div class="text"> <view class="text">
<div class="acea-row row-between-wrapper"> <view class="acea-row row-between-wrapper">
<div class="name line1">{{ cart.productInfo.storeName }}</div> <view class="name line1">{{ cart.productInfo.storeName }}</view>
<div class="num">x {{ cart.cartNum }}</div> <view class="num">x {{ cart.cartNum }}</view>
</div> </view>
<div <view
class="attr line1" class="attr line1"
v-if="cart.productInfo.attrInfo" v-if="cart.productInfo.attrInfo"
>{{ cart.productInfo.attrInfo.suk }}</div> >{{ cart.productInfo.attrInfo.suk }}</view>
<div class="money font-color-red">{{ cart.truePrice }}</div> <view class="money font-color-red">{{ cart.truePrice }}</view>
<div <view
class="evaluate" class="evaluate"
v-if="evaluate == 3" v-if="evaluate == 3"
@click="routerGo(cart)" @click="routerGo(cart)"
>评价</div> >评价</view>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
</template> </template>
<script> <script>
export default { export default {

100
components/Payment.vue

@ -1,70 +1,70 @@
<template> <template>
<div> <view>
<div class="payment" :class="value === true ? 'on' : ''"> <view class="payment" :class="value === true ? 'on' : ''">
<div class="title acea-row row-center-wrapper"> <view class="title acea-row row-center-wrapper">
选择付款方式<span class="iconfont icon-guanbi" @click="close"></span> 选择付款方式<text class="iconfont icon-guanbi" @click="close"></text>
</div> </view>
<div <view
class="item acea-row row-between-wrapper" class="item acea-row row-between-wrapper"
v-if="types.indexOf('weixin') !== -1" v-if="types.indexOf('weixin') !== -1"
@click="checked('weixin')" @click="checked('weixin')"
> >
<div class="left acea-row row-between-wrapper"> <view class="left acea-row row-between-wrapper">
<div class="iconfont icon-weixinzhifu"></div> <view class="iconfont icon-weixinzhifu"></view>
<div class="text"> <view class="text">
<div class="name">微信支付</div> <view class="name">微信支付</view>
<div class="info">使用微信快捷支付</div> <view class="info">使用微信快捷支付</view>
</div> </view>
</div> </view>
<div class="iconfont icon-xiangyou"></div> <view class="iconfont icon-xiangyou"></view>
</div> </view>
<!-- <div <!-- <view
class="item acea-row row-between-wrapper" class="item acea-row row-between-wrapper"
v-if="types.indexOf('alipay') !== -1" v-if="types.indexOf('alipay') !== -1"
@click="checked('alipay')" @click="checked('alipay')"
> >
<div class="left acea-row row-between-wrapper"> <view class="left acea-row row-between-wrapper">
<div class="iconfont icon-zhifubao"></div> <view class="iconfont icon-zhifubao"></view>
<div class="text"> <view class="text">
<div class="name">支付宝支付</div> <view class="name">支付宝支付</view>
<div class="info">使用线上支付宝支付</div> <view class="info">使用线上支付宝支付</view>
</div> </view>
</div> </view>
<div class="iconfont icon-xiangyou"></div> <view class="iconfont icon-xiangyou"></view>
</div> --> </view> -->
<div <view
class="item acea-row row-between-wrapper" class="item acea-row row-between-wrapper"
v-if="types.indexOf('yue') !== -1" v-if="types.indexOf('yue') !== -1"
@click="checked('yue')" @click="checked('yue')"
> >
<div class="left acea-row row-between-wrapper"> <view class="left acea-row row-between-wrapper">
<div class="iconfont icon-yuezhifu"></div> <view class="iconfont icon-yuezhifu"></view>
<div class="text"> <view class="text">
<div class="name">余额支付</div> <view class="name">余额支付</view>
<div class="info"> <view class="info">
当前可用余额<span class="money">{{ balance }}</span> 当前可用余额<text class="money">{{ balance }}</text>
</div> </view>
</div> </view>
</div> </view>
<div class="iconfont icon-xiangyou"></div> <view class="iconfont icon-xiangyou"></view>
</div> </view>
<!-- <div <!-- <view
class="item acea-row row-between-wrapper" class="item acea-row row-between-wrapper"
v-if="types.indexOf('offline') !== -1" v-if="types.indexOf('offline') !== -1"
@click="checked('offline')" @click="checked('offline')"
> >
<div class="left acea-row row-between-wrapper"> <view class="left acea-row row-between-wrapper">
<div class="iconfont icon-yuezhifu1"></div> <view class="iconfont icon-yuezhifu1"></view>
<div class="text"> <view class="text">
<div class="name">线下支付</div> <view class="name">线下支付</view>
<div class="info">选择线下付款方式</div> <view class="info">选择线下付款方式</view>
</div> </view>
</div> </view>
<div class="iconfont icon-xiangyou"></div> <view class="iconfont icon-xiangyou"></view>
</div> --> </view> -->
</div> </view>
<div class="mask" v-show="value" @click="close"></div> <view class="mask" v-show="value" @click="close"></view>
</div> </view>
</template> </template>
<script> <script>
export default { export default {

94
components/PriceChange.vue

@ -1,70 +1,70 @@
<template> <template>
<div> <view>
<div class="priceChange" :class="change === true ? 'on' : ''"> <view class="priceChange" :class="change === true ? 'on' : ''">
<div class="priceTitle"> <view class="priceTitle">
<span v-if="status==0"> <text v-if="status==0">
<span v-if="orderInfo.refundStatus == 1">立即退款</span> <text v-if="orderInfo.refundStatus == 1">立即退款</text>
<span v-if="orderInfo.refundStatus != 1">一键改价</span> <text v-if="orderInfo.refundStatus != 1">一键改价</text>
</span> </text>
<span v-if="status!=0">订单备注</span> <text v-if="status!=0">订单备注</text>
<span class="iconfont icon-guanbi" @click="close"></span> <text class="iconfont icon-guanbi" @click="close"></text>
</div> </view>
<div class="listChange" v-if="status == 0"> <view class="listChange" v-if="status == 0">
<div class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 0"> <view class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 0">
<div>商品总价(¥)</div> <view>商品总价(¥)</view>
<div class="money"> <view class="money">
{{ orderInfo.totalPrice }} {{ orderInfo.totalPrice }}
<span class="iconfont icon-suozi"></span> <text class="iconfont icon-suozi"></text>
</div> </view>
</div> </view>
<div class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 0"> <view class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 0">
<div>原始邮费(¥)</div> <view>原始邮费(¥)</view>
<div class="money"> <view class="money">
{{ orderInfo.payPostage }} {{ orderInfo.payPostage }}
<span class="iconfont icon-suozi"></span> <text class="iconfont icon-suozi"></text>
</div> </view>
</div> </view>
<div class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 0"> <view class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 0">
<div>实际支付(¥)</div> <view>实际支付(¥)</view>
<div class="money"> <view class="money">
<input <input
type="text" type="text"
v-model="price" v-model="price"
:class="focus === true ? 'on' : ''" :class="focus === true ? 'on' : ''"
@focus="priceChange" @focus="priceChange"
/> />
</div> </view>
</div> </view>
<div class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 1"> <view class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 1">
<div>实际支付(¥)</div> <view>实际支付(¥)</view>
<div class="money"> <view class="money">
{{ orderInfo.payPrice }} {{ orderInfo.payPrice }}
<span class="iconfont icon-suozi"></span> <text class="iconfont icon-suozi"></text>
</div> </view>
</div> </view>
<div class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 1"> <view class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 1">
<div>退款金额(¥)</div> <view>退款金额(¥)</view>
<div class="money"> <view class="money">
<input <input
type="text" type="text"
v-model="refund_price" v-model="refund_price"
:class="focus === true ? 'on' : ''" :class="focus === true ? 'on' : ''"
@focus="priceChange" @focus="priceChange"
/> />
</div> </view>
</div> </view>
</div> </view>
<div class="listChange" v-else> <view class="listChange" v-else>
<textarea <textarea
:placeholder="'请填写备注信息...'" :placeholder="'请填写备注信息...'"
v-model="remark" v-model="remark"
></textarea> ></textarea>
</div> </view>
<div class="modify" @click="save">{{ orderInfo.refundStatus === 0 ? "立即修改" : "确认退款" }}</div> <view class="modify" @click="save">{{ orderInfo.refundStatus === 0 ? "立即修改" : "确认退款" }}</view>
<div class="modify1" @click="refuse" v-if="orderInfo.refundStatus === 1">拒绝退款</div> <view class="modify1" @click="refuse" v-if="orderInfo.refundStatus === 1">拒绝退款</view>
</div> </view>
<div class="mask" @touchmove.prevent v-show="change === true"></div> <view class="mask" @touchmove.prevent v-show="change === true"></view>
</div> </view>
</template> </template>
<style scoped> <style scoped>
.priceChange .listChange textarea { .priceChange .listChange textarea {

10
components/ProductConSwiper.vue

@ -1,19 +1,19 @@
<template> <template>
<div class="slider-banner product-bg"> <view class="slider-banner product-bg">
<swiper class="swiper-wrapper" @change="handleChange" v-if="imgUrls.length > 0"> <swiper class="swiper-wrapper" @change="handleChange" v-if="imgUrls.length > 0">
<block v-for="(item, imgUrlsIndex) in imgUrls" :key="imgUrlsIndex"> <block v-for="(item, imgUrlsIndex) in imgUrls" :key="imgUrlsIndex">
<swiper-item> <swiper-item>
<img :src="item" class="slide-image" /> <image :src="item" class="slide-image" />
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
<!-- <swiper class="swiper-wrapper" :options="ProductConSwiper" v-if="imgUrls.length > 0"> <!-- <swiper class="swiper-wrapper" :options="ProductConSwiper" v-if="imgUrls.length > 0">
<swiperSlide class="swiper-slide" v-for="item in imgUrls" :key="item" ref="goodSwiper"> <swiperSlide class="swiper-slide" v-for="item in imgUrls" :key="item" ref="goodSwiper">
<img :src="item" class="slide-image" /> <image :src="item" class="slide-image" />
</swiperSlide> </swiperSlide>
</swiper>--> </swiper>-->
<div class="pages">{{ currents || 1 }}/{{ imgUrls.length || 1 }}</div> <view class="pages">{{ currents || 1 }}/{{ imgUrls.length || 1 }}</view>
</div> </view>
</template> </template>
<script> <script>
// import { swiper, swiperSlide } from "vue-awesome-swiper"; // import { swiper, swiperSlide } from "vue-awesome-swiper";

72
components/ProductWindow.vue

@ -1,40 +1,40 @@
<template> <template>
<div> <view>
<div class="product-window" :class="attr.cartAttr === true ? 'on' : ''"> <view class="product-window" :class="attr.cartAttr === true ? 'on' : ''">
<div class="textpic acea-row row-between-wrapper"> <view class="textpic acea-row row-between-wrapper">
<div class="pictrue"> <view class="pictrue">
<img :src="attr.productSelect.image" class="image" /> <image :src="attr.productSelect.image" class="image" />
</div> </view>
<div class="text"> <view class="text">
<div class="line1">{{ attr.productSelect.store_name }}</div> <view class="line1">{{ attr.productSelect.store_name }}</view>
<div class="money font-color-red"> <view class="money font-color-red">
<span class="num">{{ attr.productSelect.price }}</span> <text class="num">{{ attr.productSelect.price }}</text>
<span class="stock">库存: {{ attr.productSelect.stock }}</span> <text class="stock">库存: {{ attr.productSelect.stock }}</text>
</div> </view>
</div> </view>
<div class="iconfont icon-guanbi" @click="closeAttr"></div> <view class="iconfont icon-guanbi" @click="closeAttr"></view>
</div> </view>
<div class="productWinList"> <view class="productWinList">
<div class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw"> <view class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
<div class="title">{{ item.attrName }}</div> <view class="title">{{ item.attrName }}</view>
<div class="listn acea-row row-middle"> <view class="listn acea-row row-middle">
<div <view
class="itemn" class="itemn"
:class="item.index == indexn ? 'on' : ''" :class="item.index == indexn ? 'on' : ''"
v-for="(itemn, indexn) in item.attrValue" v-for="(itemn, indexn) in item.attrValue"
@click="tapAttr(indexw, indexn)" @click="tapAttr(indexw, indexn)"
:key="indexn" :key="indexn"
>{{ itemn.attr }}</div> >{{ itemn.attr }}</view>
</div> </view>
</div> </view>
</div> </view>
<div class="cart"> <view class="cart">
<div class="title">数量</div> <view class="title">数量</view>
<div class="carnum acea-row row-left"> <view class="carnum acea-row row-left">
<div class="item reduce" :class="cartNum <= 1 ? 'on' : ''" @click="CartNumDes">-</div> <view class="item reduce" :class="cartNum <= 1 ? 'on' : ''" @click="CartNumDes">-</view>
<div class="item num">{{ cartNum }}</div> <view class="item num">{{ cartNum }}</view>
<div <view
class="item plus" class="item plus"
:class=" :class="
cartNum >= attr.productSelect.stock cartNum >= attr.productSelect.stock
@ -42,12 +42,12 @@
: '' : ''
" "
@click="CartNumAdd" @click="CartNumAdd"
>+</div> >+</view>
</div> </view>
</div> </view>
</div> </view>
<div class="mask" @touchmove.prevent :hidden="attr.cartAttr === false" @click="closeAttr"></div> <view class="mask" @touchmove.prevent :hidden="attr.cartAttr === false" @click="closeAttr"></view>
</div> </view>
</template> </template>
<script> <script>
export default { export default {

34
components/PromotionGood.vue

@ -1,22 +1,22 @@
<template> <template>
<div class="promotionGood" v-if="benefit.length > 0"> <view class="promotionGood" v-if="benefit.length > 0">
<div class="item acea-row row-between-wrapper" v-for="(item, promotionGoodIndex) in benefit" :key="promotionGoodIndex" @click="routerGo(item)"> <view class="item acea-row row-between-wrapper" v-for="(item, promotionGoodIndex) in benefit" :key="promotionGoodIndex" @click="routerGo(item)">
<div class="pictrue"><img :src="item.image" class="image" /></div> <view class="pictrue"><image :src="item.image" class="image" /></view>
<div class="text"> <view class="text">
<div class="name line1">{{ item.storeName }}</div> <view class="name line1">{{ item.storeName }}</view>
<div class="sp-money acea-row"> <view class="sp-money acea-row">
<div class="moneyCon"> <view class="moneyCon">
促销价: 促销价:
<span class="num">{{ item.price }}</span> <text class="num">{{ item.price }}</text>
</div> </view>
</div> </view>
<div class="acea-row row-between-wrapper"> <view class="acea-row row-between-wrapper">
<div class="money">日常价{{ item.otPrice }}</div> <view class="money">日常价{{ item.otPrice }}</view>
<div>仅剩{{ item.stock }}{{ item.unitName }}</div> <view>仅剩{{ item.stock }}{{ item.unitName }}</view>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
</template> </template>
<script> <script>
export default { export default {

32
components/Recommend.vue

@ -1,27 +1,27 @@
<template> <template>
<div class="recommend" ref="container"> <view class="recommend" ref="container">
<div class="title acea-row row-center-wrapper"> <view class="title acea-row row-center-wrapper">
<span class="iconfont icon-zhuangshixian"></span> <text class="iconfont icon-zhuangshixian"></text>
<span class="name">为你推荐</span> <text class="name">为你推荐</text>
<span class="iconfont icon-zhuangshixian lefticon"></span> <text class="iconfont icon-zhuangshixian lefticon"></text>
</div> </view>
<div class="recommendList acea-row row-between-wrapper"> <view class="recommendList acea-row row-between-wrapper">
<div <view
@click="routerGo(item)" @click="routerGo(item)"
class="item" class="item"
v-for="(item, recommendIndex) in hostProduct" v-for="(item, recommendIndex) in hostProduct"
:key="recommendIndex" :key="recommendIndex"
> >
<div class="pictrue"><img :src="item.image" class="image" /></div> <view class="pictrue"><image :src="item.image" class="image" /></view>
<div class="name line1">{{ item.storeName }}</div> <view class="name line1">{{ item.storeName }}</view>
<div class="money font-color-red"> <view class="money font-color-red">
<span class="num">{{ item.price }}</span> <text class="num">{{ item.price }}</text>
</div> </view>
</div> </view>
</div> </view>
<Loading :loaded="loadend" :loading="loading"></Loading> <Loading :loaded="loadend" :loading="loading"></Loading>
</div> </view>
</template> </template>
<script> <script>
import { getHostProducts } from '@/api/store'; import { getHostProducts } from '@/api/store';

12
components/ShareInfo.vue

@ -1,9 +1,9 @@
<template> <template>
<div v-if="shareInfoStatus" class="poster-first"> <view v-if="shareInfoStatus" class="poster-first">
<div class="mask-share"> <view class="mask-share">
<img :src="$VUE_APP_RESOURCES_URL+'/images/share-info.png'" @click="shareInfoClose" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/share-info.png'" @click="shareInfoClose" />
</div> </view>
</div> </view>
</template> </template>
<style scoped> <style scoped>
.poster-first { .poster-first {
@ -17,7 +17,7 @@
bottom: 0; bottom: 0;
z-index: 999; z-index: 999;
} }
.mask-share img { .mask-share image{
width: 100%; width: 100%;
} }
</style> </style>

28
components/ShareRedPackets.vue

@ -1,20 +1,20 @@
<template> <template>
<div class="sharing-packets" :class="state === true ? 'on' : ''"> <view class="sharing-packets" :class="state === true ? 'on' : ''">
<div <view
class="iconfont icon-guanbi acea-row row-center-wrapper" class="iconfont icon-guanbi acea-row row-center-wrapper"
@click="closeShare" @click="closeShare"
></div> ></view>
<div class="line"></div> <view class="line"></view>
<div class="sharing-con" @click="goShare"> <view class="sharing-con" @click="goShare">
<img :src="$VUE_APP_RESOURCES_URL+'/images/red-packets.png'" class="image" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/red-packets.png'" class="image" />
<div class="text font-color-red"> <view class="text font-color-red">
<div>会员分享返</div> <view>会员分享返</view>
<div class="money"><span class="label"></span>{{ priceName }}</div> <view class="money"><text class="label"></text>{{ priceName }}</view>
<div class="tip">下单即返佣金</div> <view class="tip">下单即返佣金</view>
<div class="shareBut">立即分享</div> <view class="shareBut">立即分享</view>
</div> </view>
</div> </view>
</div> </view>
</template> </template>
<script> <script>
export default { export default {

56
components/StorePoster.vue

@ -1,43 +1,43 @@
<template> <template>
<div v-if="posterImageStatus" class="poster-first"> <view v-if="posterImageStatus" class="poster-first">
<canvas style="width:747px;height:1326px" canvas-id="myCanvas"></canvas> <canvas style="width:747px;height:1326px" canvas-id="myCanvas"></canvas>
<!-- <div class="poster-pop" v-show="!canvasStatus"> <!-- <view class="poster-pop" v-show="!canvasStatus">
<img <img
:src="$VUE_APP_RESOURCES_URL+'/images/poster-close.png'" :src="$VUE_APP_RESOURCES_URL+'/images/poster-close.png'"
class="close" class="close"
@click="posterImageClose" @click="posterImageClose"
/> />
<div class="canvas" ref="poster"> <view class="canvas" ref="poster">
<img class="image" :src="posterData.image" alt="商品图片" /> <image class="image" :src="posterData.image" alt="商品图片" />
<div class="text black"> <view class="text black">
<span v-text="posterData.title"></span> <text v-text="posterData.title"></text>
</div> </view>
<div class="text rad"> <view class="text rad">
<span v-text="'¥' + posterData.price"></span> <text v-text="'¥' + posterData.price"></text>
</div> </view>
<div class="code"> <view class="code">
<div class="code-img"> <view class="code-img">
<img :src="posterData.code" show-menu-by-longpress mode="widthFix" alt="二维码" /> <image :src="posterData.code" show-menu-by-longpress mode="widthFix" alt="二维码" />
</div> </view>
<div class="code-text"> <view class="code-text">
<span>长按识别二维码 立即购买</span> <text>长按识别二维码 立即购买</text>
</div> </view>
</div> </view>
</div> </view>
<div class="save-poster" @click="savePosterPath">生成图片</div> <view class="save-poster" @click="savePosterPath">生成图片</view>
</div> --> </view> -->
<div class="poster-pop" v-show="canvasStatus"> <view class="poster-pop" v-show="canvasStatus">
<img <img
:src="$VUE_APP_RESOURCES_URL+'/images/poster-close.png'" :src="$VUE_APP_RESOURCES_URL+'/images/poster-close.png'"
class="close" class="close"
@click="posterImageClose" @click="posterImageClose"
mode="widthFix" mode="widthFix"
/> />
<img :src="posterImage" alt="tp" class="poster-image" show-menu-by-longpress mode="widthFix" /> <image :src="posterImage" alt="tp" class="poster-image" show-menu-by-longpress mode="widthFix" />
<div class="keep">长按图片可以保存到手机</div> <view class="keep">长按图片可以保存到手机</view>
</div> </view>
<div class="mask"></div> <view class="mask"></view>
</div> </view>
</template> </template>
<style scoped> <style scoped>
.poster-first { .poster-first {
@ -85,7 +85,7 @@
width: 33%; width: 33%;
padding: 0.06rem; padding: 0.06rem;
} }
.poster-pop .canvas .code .code-img img { .poster-pop .canvas .code .code-img image{
width: 100%; width: 100%;
} }
.poster-pop .canvas .code .code-text { .poster-pop .canvas .code .code-text {

67
components/SwitchWindow.vue

@ -1,28 +1,27 @@
<template> <template>
<div> <view>
<div class="switchWindow" :class="switchActive === true ? 'on' : ''"> <view class="switchWindow" :class="switchActive === true ? 'on' : ''">
<!-- @/assets/images/public.png --> <!-- @/assets/images/public.png -->
<div class="pictrue"> <view class="pictrue">
<img v-if="login_type === 'h5'" :src="$VUE_APP_RESOURCES_URL+'/images/h5.png'" /> <image v-if="login_type === 'h5'" :src="$VUE_APP_RESOURCES_URL+'/images/h5.png'" />
<img :src="$VUE_APP_RESOURCES_URL+'/images/h5.png'" alt="" v-else /> <image :src="$VUE_APP_RESOURCES_URL+'/images/h5.png'" alt v-else />
</div> </view>
<!-- 是否选择切换到小程序账户 --> <!-- 是否选择切换到小程序账户 -->
<div class="info"> <view class="info">
是否选择切换到<span class="font-color" v-if="login_type === 'h5'" <text>是否选择切换到</text>
>微信账号</span <text class="font-color" v-if="login_type === 'h5'">微信账号</text>
> <text class="font-color" v-else>手机用户</text>
<span class="font-color" v-else>手机用户</span> <text></text>
</div> </view>
<div class="switchBnt" @click="switchH5">切换</div> <view class="switchBnt" @click="switchH5">
<div class="switchBnt cancelBnt" @click="switchClose">取消</div> <text>切换</text>
</div> </view>
<div <view class="switchBnt cancelBnt" @click="switchClose">
class="mask" <text>取消</text>
@touchmove.prevent </view>
v-show="switchActive === true" </view>
@click="switchClose" <view class="mask" @touchmove.prevent v-show="switchActive === true" @click="switchClose"></view>
></div> </view>
</div>
</template> </template>
<style> <style>
.switchWindow { .switchWindow {
@ -47,6 +46,7 @@
opacity: 0; opacity: 0;
transform: scale(0); transform: scale(0);
} }
.switchWindow.on { .switchWindow.on {
opacity: 1; opacity: 1;
transform: scale(1); transform: scale(1);
@ -55,22 +55,26 @@
-moz-transform: scale(1); -moz-transform: scale(1);
-o-transform: scale(1); -o-transform: scale(1);
} }
.switchWindow .pictrue { .switchWindow .pictrue {
width: 2.36rem; width: 2.36rem;
height: 2.36rem; height: 2.36rem;
margin: 0 auto; margin: 0 auto;
} }
.switchWindow .pictrue img {
.switchWindow .pictrue image {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: block; display: block;
} }
.switchWindow .info { .switchWindow .info {
font-size: 0.32rem; font-size: 0.32rem;
color: #282828; color: #282828;
margin-top: 0.44rem; margin-top: 0.44rem;
font-weight: bold; font-weight: bold;
} }
.switchWindow .switchBnt { .switchWindow .switchBnt {
font-size: 0.32rem; font-size: 0.32rem;
color: #fff; color: #fff;
@ -84,6 +88,7 @@
background-image: -webkit-linear-gradient(to right, #f67a38 0%, #f11b09 100%); background-image: -webkit-linear-gradient(to right, #f67a38 0%, #f11b09 100%);
background-image: -moz-linear-gradient(to right, #f67a38 0%, #f11b09 100%); background-image: -moz-linear-gradient(to right, #f67a38 0%, #f11b09 100%);
} }
.switchWindow .switchBnt.cancelBnt { .switchWindow .switchBnt.cancelBnt {
background-color: #fff; background-color: #fff;
color: #999; color: #999;
@ -119,25 +124,31 @@ export default {
}, },
switchH5() { switchH5() {
let that = this; let that = this;
uni.showLoading({title: '正在切换中'}) uni.showLoading({
title: "正在切换中"
});
if (that.login_type === "h5") { if (that.login_type === "h5") {
cookie.set("loginType", "wechat", 60); cookie.set("loginType", "wechat", 60);
uni.hideLoading() uni.hideLoading();
this.$store.commit("LOGOUT"); this.$store.commit("LOGOUT");
this.$emit("changeswitch", false); this.$emit("changeswitch", false);
location.reload(); location.reload();
} else { } else {
switchH5Login() switchH5Login()
.then(({ data }) => { .then(({ data }) => {
uni.hideLoading() uni.hideLoading();
const expires_time = dayjs(data.expires_time); const expires_time = dayjs(data.expires_time);
store.commit("LOGIN", data.token, expires_time); store.commit("LOGIN", data.token, expires_time);
this.$emit("changeswitch", false); this.$emit("changeswitch", false);
location.reload(); location.reload();
}) })
.catch(err => { .catch(err => {
uni.hideLoading() uni.hideLoading();
return that.$dialog.toast({ mes: err }); uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
}); });
} }
} }

46
components/UserEvaluation.vue

@ -1,29 +1,29 @@
<template> <template>
<div class="evaluateWtapper"> <view class="evaluateWtapper">
<div class="evaluateItem" v-for="(item, evaluateWtapperIndex) in reply" :key="evaluateWtapperIndex"> <view class="evaluateItem" v-for="(item, evaluateWtapperIndex) in reply" :key="evaluateWtapperIndex">
<div class="pic-text acea-row row-middle"> <view class="pic-text acea-row row-middle">
<div class="pictrue"> <view class="pictrue">
<img :src="item.avatar" class="image" /> <image :src="item.avatar" class="image" />
</div> </view>
<div class="acea-row row-middle"> <view class="acea-row row-middle">
<div class="name line1">{{ item.nickname }}</div> <view class="name line1">{{ item.nickname }}</view>
<div class="start" :class="'star' + item.star"></div> <view class="start" :class="'star' + item.star"></view>
</div> </view>
</div> </view>
<div class="time">{{ item.add_time }} {{ item.suk }}</div> <view class="time">{{ item.add_time }} {{ item.suk }}</view>
<div class="evaluate-infor">{{ item.comment }}</div> <view class="evaluate-infor">{{ item.comment }}</view>
<div class="imgList acea-row"> <view class="imgList acea-row">
<div class="pictrue" v-for="(itemn, eq) in item.picturesArr" :key="eq"> <view class="pictrue" v-for="(itemn, eq) in item.picturesArr" :key="eq">
<img :src="itemn" class="image" /> <image :src="itemn" class="image" />
</div> </view>
</div> </view>
<!--<div class="reply" v-if="item.merchant_reply_content">--> <!--<view class="reply" v-if="item.merchant_reply_content">-->
<!--<span class="font-color-red">店小二</span>{{--> <!--<text class="font-color-red">店小二</text>{{-->
<!--item.merchant_reply_content--> <!--item.merchant_reply_content-->
<!--}}--> <!--}}-->
<!--</div>--> <!--</view>-->
</div> </view>
</div> </view>
</template> </template>
<script> <script>
export default { export default {

24
components/WriteOff.vue

@ -1,16 +1,16 @@
<template> <template>
<div v-show="iShidden === false"> <view v-show="iShidden === false">
<div class="WriteOff"> <view class="WriteOff">
<div class="pictrue"><img :src="orderInfo.image" /></div> <view class="pictrue"><image :src="orderInfo.image" /></view>
<div class="num acea-row row-center-wrapper"> <view class="num acea-row row-center-wrapper">
{{ orderInfo.order_id }} {{ orderInfo.order_id }}
</div> </view>
<div class="tip">确定要核销此订单吗</div> <view class="tip">确定要核销此订单吗</view>
<div class="sure" @click="confirm">确定核销</div> <view class="sure" @click="confirm">确定核销</view>
<div class="sure cancel" @click="cancel">取消</div> <view class="sure cancel" @click="cancel">取消</view>
</div> </view>
<div class="mask" @touchmove.prevent></div> <view class="mask" @touchmove.prevent></view>
</div> </view>
</template> </template>
<style scoped> <style scoped>
.WriteOff { .WriteOff {
@ -31,7 +31,7 @@
height: 3.4rem; height: 3.4rem;
margin: 0 auto; margin: 0 auto;
} }
.WriteOff .pictrue img { .WriteOff .pictrue image{
width: 100%; width: 100%;
height: 100%; height: 100%;
display: block; display: block;

14
main.js

@ -8,13 +8,13 @@ import schema from "async-validator";
import dialog from "./utils/dialog"; import dialog from "./utils/dialog";
import cookie from "@/utils/store/cookie"; import cookie from "@/utils/store/cookie";
// import "@/assets/iconfont/iconfont"; // // import "@/assets/iconfont/iconfont";
import "@/assets/iconfont/iconfont.css"; // import "@/assets/iconfont/iconfont.css";
// import "@/assets/js/media_750"; // // import "@/assets/js/media_750";
// import "vue-ydui/dist/ydui.base.css"; // // import "vue-ydui/dist/ydui.base.css";
import "@/assets/css/base.less"; // import "@/assets/css/base.less";
import "@/assets/css/reset.less"; // import "@/assets/css/reset.less";
import "@/assets/css/style.less"; // import "@/assets/css/style.less";
import { import {
parseRoute, parseRoute,

6
manifest.json

@ -17,7 +17,11 @@
"delay" : 0 "delay" : 0
}, },
/* */ /* */
"modules" : {}, "modules" : {
"OAuth" : {},
"Payment" : {},
"Share" : {}
},
/* */ /* */
"distribute" : { "distribute" : {
/* android */ /* android */

6
pages/Loading/index.vue

@ -1,7 +1,7 @@
<template> <template>
<div class="lottie-bg"> <view class="lottie-bg">
<div id="lottie"><img src="../../assets/images/live-logo.gif" rel="preload" style="width: 100%;" /></div> <view id="lottie"><image src="../../static/images/live-logo.gif" rel="preload" mode="widthFix" style="width: 100%;" /></view>
</div> </view>
</template> </template>
<script> <script>

90
pages/NotDefined/index.vue

@ -1,59 +1,55 @@
<template> <template>
<div class="not-defined"> <view class="not-defined">
<img :src="$VUE_APP_RESOURCES_URL+'/images/404.png'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/404.png'" />
<view class="content">
<div class="content"> <h3 class="title">页面未找到</h3>
<h3 class="title">页面未找到</h3> <text>抱歉您访问的页面不存在请返回上一级或点击下方按钮返回首页...</text>
<span </view>
>抱歉您访问的页面不存在请返回上一级或点击下方按钮返回首页...</span <view class="btn" @click="homeGo()">
> 返回首页
</div> </view>
</view>
<div class="btn" @click="homeGo()">
返回首页
</div>
</div>
</template> </template>
<script> <script>
export default { export default {
name: "NotDefined", name: "NotDefined",
methods: { methods: {
homeGo() { homeGo() {
this.$yrouter.switchTab('/pages/home/index'); this.$yrouter.switchTab('/pages/home/index');
},
}, },
}, };
};
</script> </script>
<style scoped> <style scoped>
.not-defined img { .not-defined image{
width: 100%; width: 100%;
margin-top: 18%; margin-top: 18%;
} }
.content { .content {
padding: 0 1rem; padding: 0 1rem;
text-align: center; text-align: center;
color: #44405e; color: #44405e;
font-size: 15px; font-size: 15px;
} }
.title { .title {
margin-bottom: 0.6rem; margin-bottom: 0.6rem;
color: #302c48; color: #302c48;
font-size: 20px; font-size: 20px;
} }
.btn { .btn {
color: #fff; color: #fff;
background-color: #ef4c4c; background-color: #ef4c4c;
font-size: 16px; font-size: 16px;
padding: 0.16rem; padding: 0.16rem;
border-radius: 25px; border-radius: 25px;
text-align: center; text-align: center;
width: 2.4rem; width: 2.4rem;
margin: 0 auto; margin: 0 auto;
margin-top: 1rem; margin-top: 1rem;
} }
</style> </style>

56
pages/activity/BargainRecord/index.vue

@ -1,12 +1,12 @@
<template> <template>
<div class="bargain-record" ref="container"> <view class="bargain-record" ref="container">
<div class="item" v-for="(item, bargainrecordIndex) in bargain" :key="bargainrecordIndex"> <view class="item" v-for="(item, bargainrecordIndex) in bargain" :key="bargainrecordIndex">
<div class="picTxt acea-row row-between-wrapper"> <view class="picTxt acea-row row-between-wrapper">
<div class="pictrue"> <view class="pictrue">
<img :src="item.image" /> <image :src="item.image" />
</div> </view>
<div class="text acea-row row-column-around"> <view class="text acea-row row-column-around">
<div class="line1">{{ item.title }}</div> <view class="line1">{{ item.title }}</view>
<count-down <count-down
:is-day="true" :is-day="true"
:tip-text="'倒计时 '" :tip-text="'倒计时 '"
@ -16,34 +16,34 @@
:second-text="' 秒'" :second-text="' 秒'"
:datatime="item.datatime" :datatime="item.datatime"
></count-down> ></count-down>
<div class="money font-color-red"> <view class="money font-color-red">
已砍至 已砍至
<span class="symbol"></span> <text class="symbol"></text>
<span class="num">{{ item.residuePrice }}</span> <text class="num">{{ item.residuePrice }}</text>
</div> </view>
</div> </view>
</div> </view>
<div class="bottom acea-row row-between-wrapper"> <view class="bottom acea-row row-between-wrapper">
<div class="purple" v-if="item.status === 1">活动进行中</div> <view class="purple" v-if="item.status === 1">活动进行中</view>
<div class="success" v-else-if="item.status === 3">砍价成功</div> <view class="success" v-else-if="item.status === 3">砍价成功</view>
<div class="end" v-else>活动已结束</div> <view class="end" v-else>活动已结束</view>
<div class="acea-row row-middle row-right"> <view class="acea-row row-middle row-right">
<div <view
class="bnt cancel" class="bnt cancel"
v-if="item.status === 1" v-if="item.status === 1"
@click="getBargainUserCancel(item.bargainId)" @click="getBargainUserCancel(item.bargainId)"
>取消活动</div> >取消活动</view>
<div <view
class="bnt bg-color-red" class="bnt bg-color-red"
v-if="item.status === 1" v-if="item.status === 1"
@click="goDetail(item.bargainId)" @click="goDetail(item.bargainId)"
>继续砍价</div> >继续砍价</view>
<div class="bnt bg-color-red" v-else @click="goList">重开一个</div> <view class="bnt bg-color-red" v-else @click="goList">重开一个</view>
</div> </view>
</div> </view>
</div> </view>
<Loading :loaded="status" :loading="loadingList"></Loading> <Loading :loaded="status" :loading="loadingList"></Loading>
</div> </view>
</template> </template>
<script> <script>
import CountDown from "@/components/CountDown"; import CountDown from "@/components/CountDown";

266
pages/activity/DargainDetails/index.vue

@ -1,18 +1,18 @@
<template> <template>
<div class="bargain"> <view class="bargain">
<!-- 在header上加 on 为请求支援 --> <!-- 在header上加 on 为请求支援 -->
<div :class="[bargainPartake != userInfo.uid ? 'header on' : 'header']"> <view :class="[bargainPartake != userInfo.uid ? 'header on' : 'header']">
<div class="people">{{ lookCount }}人查看 {{ shareCount }}人分享 {{ userCount }}人参与</div> <view class="people">{{ lookCount }}人查看 {{ shareCount }}人分享 {{ userCount }}人参与</view>
<!-- 帮助砍价帮砍成功--> <!-- 帮助砍价帮砍成功-->
<div class="pictxt acea-row row-center-wrapper" v-if="bargainPartake != userInfo.uid"> <view class="pictxt acea-row row-center-wrapper" v-if="bargainPartake != userInfo.uid">
<div class="pictrue"> <view class="pictrue">
<img :src="bargainUserInfo.avatar" /> <image :src="bargainUserInfo.avatar" />
</div> </view>
<div class="text"> <view class="text">
{{ bargainUserInfo.nickname }} {{ bargainUserInfo.nickname }}
<span>邀请您帮忙砍价</span> <text>邀请您帮忙砍价</text>
</div> </view>
</div> </view>
<count-down <count-down
:is-day="true" :is-day="true"
:tip-text="'倒计时 '" :tip-text="'倒计时 '"
@ -22,143 +22,142 @@
:second-text="' 秒'" :second-text="' 秒'"
:datatime="datatime" :datatime="datatime"
></count-down> ></count-down>
</div> </view>
<div class="wrapper"> <view class="wrapper">
<div class="pictxt acea-row row-between-wrapper"> <view class="pictxt acea-row row-between-wrapper">
<div class="pictrue"> <view class="pictrue">
<img :src="bargain.image" /> <image :src="bargain.image" />
</div> </view>
<div class="text acea-row row-column-around"> <view class="text acea-row row-column-around">
<div class="line2" v-text="bargain.title"></div> <view class="line2" v-text="bargain.title"></view>
<div class="money font-color-red"> <view class="money font-color-red">
已砍至: 已砍至:
<span class="num" v-text="price"></span> <text class="num" v-text="price"></text>
</div> </view>
<div class="acea-row row-middle"> <view class="acea-row row-middle">
<div class="successNum" v-text="'原价' + bargain.price"></div> <view class="successNum" v-text="'原价' + bargain.price"></view>
<div class="successNum" v-text="'已有' + bargainSumCount + '人砍价成功'"></div> <view class="successNum" v-text="'已有' + bargainSumCount + '人砍价成功'"></view>
</div> </view>
</div> </view>
</div> </view>
<div class="cu-progress acea-row row-middle round margin-top"> <view class="cu-progress acea-row row-middle round margin-top">
<div <view
class="acea-row row-middle bg-red" class="acea-row row-middle bg-red"
:style="{ width: loading ? pricePercent + '%' : '' }" :style="{ width: loading ? pricePercent + '%' : '' }"
></div> ></view>
</div> </view>
<div class="balance acea-row row-between-wrapper"> <view class="balance acea-row row-between-wrapper">
<div v-text="'已砍' + alreadyPrice + '元'"></div> <view v-text="'已砍' + alreadyPrice + '元'"></view>
<div v-if="surplusPrice === 0">砍价成功</div> <view v-if="surplusPrice === 0">砍价成功</view>
<div v-else v-text="'还剩' + surplusPrice + '元'"></div> <view v-else v-text="'还剩' + surplusPrice + '元'"></view>
</div> </view>
<!-- 帮助砍价帮砍成功--> <!-- 帮助砍价帮砍成功-->
<!--<div class='bargainSuccess'><span class='iconfont icon-xiaolian'></span>已成功帮助好友砍价</div>--> <!--<view class='bargainSuccess'><text class='iconfont icon-xiaolian'></text>已成功帮助好友砍价</view>-->
<div class="bargainBnts"> <view class="bargainBnts">
<div <view
class="bargainBnt" class="bargainBnt"
@click="goPoster" @click="goPoster"
v-if="bargainPartake === userInfo.uid && surplusPrice > 0" v-if="bargainPartake === userInfo.uid && surplusPrice > 0"
>邀请好友帮砍价</div> >邀请好友帮砍价</view>
<div <view
class="bargainBnt" class="bargainBnt"
@click="getBargainHelp" @click="getBargainHelp"
v-else-if="bargainPartake != userInfo.uid" v-else-if="bargainPartake != userInfo.uid"
>帮好友砍一刀</div> >帮好友砍一刀</view>
<div class="bargainBnt" @click="getBargainStart" v-if="bargainPartake != userInfo.uid">开启砍价</div> <view class="bargainBnt" @click="getBargainStart" v-if="bargainPartake != userInfo.uid">开启砍价</view>
<div <view
class="bargainBnt" class="bargainBnt"
@click="goPay" @click="goPay"
v-if="surplusPrice === 0 && bargainPartake === userInfo.uid && userBargainStatus === 1" v-if="surplusPrice === 0 && bargainPartake === userInfo.uid && userBargainStatus === 1"
>立即支付</div> >立即支付</view>
<div class="bargainBnt on" @click="goList">抢更多商品</div> <view class="bargainBnt on" @click="goList">抢更多商品</view>
</div> </view>
<div class="tip"> <view class="tip">
已有 已有
<span class="font-color-red" v-text="helpCount"></span> <text class="font-color-red" v-text="helpCount"></text>位好友成功帮您砍价
位好友成功帮您砍价 </view>
</div> <view class="lock"></view>
<div class="lock"></div> </view>
</div> <view class="bargainGang">
<div class="bargainGang"> <view class="title font-color-red acea-row row-center-wrapper">
<div class="title font-color-red acea-row row-center-wrapper"> <view class="pictrue">
<div class="pictrue"> <image :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
<img :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" /> </view>
</div> <view class="titleCon">砍价帮</view>
<div class="titleCon">砍价帮</div> <view class="pictrue on">
<div class="pictrue on"> <image :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
<img :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" /> </view>
</div> </view>
</div> <view class="list">
<div class="list"> <view
<div
class="item acea-row row-between-wrapper" class="item acea-row row-between-wrapper"
v-for="(item, bargainHelpListIndex) in bargainHelpList" v-for="(item, bargainHelpListIndex) in bargainHelpList"
:key="bargainHelpListIndex" :key="bargainHelpListIndex"
> >
<div class="pictxt acea-row row-between-wrapper"> <view class="pictxt acea-row row-between-wrapper">
<div class="pictrue"> <view class="pictrue">
<img :src="item.avatar" /> <image :src="item.avatar" />
</div> </view>
<div class="text"> <view class="text">
<div class="name line1" v-text="item.nickname"></div> <view class="name line1" v-text="item.nickname"></view>
<div class="line1" v-text="item.add_time"></div> <view class="line1" v-text="item.add_time"></view>
</div> </view>
</div> </view>
<div class="money font-color-red"> <view class="money font-color-red">
<span class="iconfont icon-kanjia"></span> <text class="iconfont icon-kanjia"></text>
砍掉{{ item.price }} 砍掉{{ item.price }}
</div> </view>
</div> </view>
</div> </view>
<div <view
class="load font-color-red" class="load font-color-red"
v-if="!helpListStatus && !helpListLoading" v-if="!helpListStatus && !helpListLoading"
@click="getBargainHelpList" @click="getBargainHelpList"
>点击加载更多</div> >点击加载更多</view>
<div class="lock"></div> <view class="lock"></view>
</div> </view>
<div class="goodsDetails"> <view class="goodsDetails">
<div class="title font-color-red acea-row row-center-wrapper"> <view class="title font-color-red acea-row row-center-wrapper">
<div class="pictrue"> <view class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</div> </view>
<div class="titleCon">商品详情</div> <view class="titleCon">商品详情</view>
<div class="pictrue on"> <view class="pictrue on">
<img :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</div> </view>
</div> </view>
<div class="conter" v-html="bargain.description"></div> <view class="conter" v-html="bargain.description"></view>
<div class="lock"></div> <view class="lock"></view>
</div> </view>
<div class="goodsDetails"> <view class="goodsDetails">
<div class="title font-color-red acea-row row-center-wrapper"> <view class="title font-color-red acea-row row-center-wrapper">
<div class="pictrue"> <view class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</div> </view>
<div class="titleCon">活动规则</div> <view class="titleCon">活动规则</view>
<div class="pictrue on"> <view class="pictrue on">
<img :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</div> </view>
</div> </view>
<div class="conter" v-html="bargain.rule"></div> <view class="conter" v-html="bargain.rule"></view>
</div> </view>
<div class="bargainTip" :class="active === true ? 'on' : ''"> <view class="bargainTip" :class="active === true ? 'on' : ''">
<div class="pictrue"> <view class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/bargainBg.jpg'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/bargainBg.jpg'" />
<div class="iconfont icon-guanbi" @click="close"></div> <view class="iconfont icon-guanbi" @click="close"></view>
</div> </view>
<div class="cutOff" v-if="bargainPartake === userInfo.uid"> <view class="cutOff" v-if="bargainPartake === userInfo.uid">
您已砍掉 您已砍掉
<span class="font-color-red" v-text="bargainHelpPrice"></span>听说分享次数越多砍价成功的机会越大哦 <text class="font-color-red" v-text="bargainHelpPrice"></text>听说分享次数越多砍价成功的机会越大哦
</div> </view>
<div class="cutOff on" v-else> <view class="cutOff on" v-else>
<div class="help font-color-red" v-text="'成功帮砍' + bargainHelpPrice + '元'"></div>您也可以砍价低价拿哦快去挑选心仪的商品吧~ <view class="help font-color-red" v-text="'成功帮砍' + bargainHelpPrice + '元'"></view>您也可以砍价低价拿哦快去挑选心仪的商品吧~
</div> </view>
<div class="tipBnt" @click="goPoster" v-if="bargainPartake === userInfo.uid">邀请好友帮砍价</div> <view class="tipBnt" @click="goPoster" v-if="bargainPartake === userInfo.uid">邀请好友帮砍价</view>
<div class="tipBnt" @click="getBargainStart" v-else>我也要参与</div> <view class="tipBnt" @click="getBargainStart" v-else>我也要参与</view>
</div> </view>
<div class="mask" @touchmove.prevent :hidden="active === false" @click="close"></div> <view class="mask" @touchmove.prevent :hidden="active === false" @click="close"></view>
</div> </view>
</template> </template>
<script> <script>
import CountDown from "@/components/CountDown"; import CountDown from "@/components/CountDown";
@ -279,7 +278,11 @@ export default {
}); });
}) })
.catch(err => { .catch(err => {
this.$dialog.error(err.msg || err.response.data.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
}); });
}, },
goPoster: function() { goPoster: function() {
@ -364,7 +367,12 @@ export default {
res.data.status === "SUCCESSFUL" && res.data.status === "SUCCESSFUL" &&
that.bargainPartake !== that.userInfo.uid that.bargainPartake !== that.userInfo.uid
) { ) {
return that.$dialog.toast({ mes: "您已经砍过了" }); uni.showToast({
title: "您已经砍过了",
icon: "none",
duration: 2000
});
return;
} }
that.helpListStatus = false; that.helpListStatus = false;
that.page = 1; that.page = 1;
@ -492,9 +500,7 @@ export default {
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {
path: `/pages/activity/DargainDetails/index/?id=${ path: `/pages/activity/DargainDetails/index/?id=${this.$yroute.query.id}&partake=${this.userInfo.uid}`
this.$yroute.query.id
}&partake=${this.userInfo.uid}`
}; };
} }
}; };

60
pages/activity/GoodsBargain/index.vue

@ -1,40 +1,40 @@
<template> <template>
<div class="bargain-list"> <view class="bargain-list">
<!-- <div class="header"> <!-- <view class="header">
<img :src="$VUE_APP_RESOURCES_URL+'/images/cut-bg.png'" alt=""> <image :src="$VUE_APP_RESOURCES_URL+'/images/cut-bg.png'" alt="">
</div>--> </view>-->
<div class="list" v-if="bargainLis.length > 0"> <view class="list" v-if="bargainLis.length > 0">
<div <view
class="item acea-row row-between-wrapper" class="item acea-row row-between-wrapper"
v-for="(item, bargainLisIndex) in bargainLis" v-for="(item, bargainLisIndex) in bargainLis"
:key="bargainLisIndex" :key="bargainLisIndex"
> >
<div class="pictrue"> <view class="pictrue">
<img :src="item.image" /> <image :src="item.image" />
</div> </view>
<div class="text acea-row row-column-around"> <view class="text acea-row row-column-around">
<div class="line1" v-text="item.title"></div> <view class="line1" v-text="item.title"></view>
<div class="num"> <view class="num">
<span class="iconfont icon-pintuan"></span> <text class="iconfont icon-pintuan"></text>
{{ item.people }}人正在参与 {{ item.people }}人正在参与
</div> </view>
<div class="money font-color-red"> <view class="money font-color-red">
可砍至: 可砍至:
<span class="price">{{item.minPrice}}</span> <text class="price">{{item.minPrice}}</text>
</div> </view>
</div> </view>
<div class="cutBnt bg-color-red" @click="goDetail(item.id)"> <view class="cutBnt bg-color-red" @click="goDetail(item.id)">
<span class="iconfont icon-kanjia"></span>参与砍价 <text class="iconfont icon-kanjia"></text>参与砍价
</div> </view>
</div> </view>
<div class="load font-color-red" v-if="!status" @click="getBargainList">点击加载更多</div> <view class="load font-color-red" v-if="!status" @click="getBargainList">点击加载更多</view>
</div> </view>
<div class="noCommodity" style="background-color: #fff;" v-if="bargainLis.length === 0"> <view class="noCommodity" style="background-color: #fff;" v-if="bargainLis.length === 0">
<div class="noPictrue"> <view class="noPictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noGood.png'" class="image" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/noGood.png'" class="image" />
</div> </view>
</div> </view>
</div> </view>
</template> </template>
<script> <script>
import { getBargainList } from "@/api/activity"; import { getBargainList } from "@/api/activity";

70
pages/activity/GoodsGroup/index.vue

@ -1,47 +1,47 @@
<template> <template>
<div class="group-list" ref="container"> <view class="group-list" ref="container">
<!-- <div class="header"> <!-- <view class="header">
<img :src="$VUE_APP_RESOURCES_URL+'/images/group.png'" class="image" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/group.png'" class="image" />
</div>--> </view>-->
<div class="list" v-if="combinationList.length>0"> <view class="list" v-if="combinationList.length>0">
<div <view
class="item acea-row row-between-wrapper" class="item acea-row row-between-wrapper"
v-for="(item, combinationListIndex) in combinationList" v-for="(item, combinationListIndex) in combinationList"
:key="combinationListIndex" :key="combinationListIndex"
@click="link(item.id)" @click="link(item.id)"
> >
<div class="pictrue"> <view class="pictrue">
<img :src="item.image" /> <image :src="item.image" />
</div> </view>
<div class="text"> <view class="text">
<div class="line1" v-text="item.title"></div> <view class="line1" v-text="item.title"></view>
<div class="acea-row"> <view class="acea-row">
<div class="team acea-row row-middle cart-color"> <view class="team acea-row row-middle cart-color">
<div class="iconfont icon-pintuan"></div> <view class="iconfont icon-pintuan"></view>
<div class="num" v-text="item.people + '人团'"></div> <view class="num" v-text="item.people + '人团'"></view>
</div> </view>
</div> </view>
<div class="bottom acea-row row-between-wrapper"> <view class="bottom acea-row row-between-wrapper">
<div class="money"> <view class="money">
<span class="num" v-text="item.price"></span> <text class="num" v-text="item.price"></text>
<span class="y-money" v-text="'¥' + item.productPrice"></span> <text class="y-money" v-text="'¥' + item.productPrice"></text>
</div> </view>
<div class="groupBnt bg-color-red"> <view class="groupBnt bg-color-red">
去拼团 去拼团
<span class="iconfont icon-jiantou"></span> <text class="iconfont icon-jiantou"></text>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<Loading :loaded="status" :loading="loadingList"></Loading> <Loading :loaded="status" :loading="loadingList"></Loading>
</div> </view>
<div class="noCommodity" style="background-color: #fff;" v-if="combinationList.length === 0"> <view class="noCommodity" style="background-color: #fff;" v-if="combinationList.length === 0">
<div class="noPictrue"> <view class="noPictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noGood.png'" class="image" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/noGood.png'" class="image" />
</div> </view>
</div> </view>
</div> </view>
</template> </template>
<script> <script>
import { getCombinationList } from "@/api/activity"; import { getCombinationList } from "@/api/activity";

80
pages/activity/GoodsSeckill/index.vue

@ -1,8 +1,8 @@
<template> <template>
<div class="flash-sale" ref="container"> <view class="flash-sale" ref="container">
<div class="header" v-if="headerImg"> <view class="header" v-if="headerImg">
<img :src="headerImg" /> <image :src="headerImg" />
</div> </view>
<vant-tabs <vant-tabs
:active="active" :active="active"
@change="setTime" @change="setTime"
@ -17,12 +17,12 @@
v-for="(item, index) in timeList" v-for="(item, index) in timeList"
:key="index" :key="index"
> >
<div slot="title" class="timeItem"> <view slot="title" class="timeItem">
<div class="time">{{ item.time }}</div> <view class="time">{{ item.time }}</view>
<div class="state">{{ item.state }}</div> <view class="state">{{ item.state }}</view>
</div> </view>
<div class="countDown font-color-red acea-row row-center-wrapper"> <view class="countDown font-color-red acea-row row-center-wrapper">
<div v-if="item.status === 0" class="activity">活动已结束</div> <view v-if="item.status === 0" class="activity">活动已结束</view>
<count-down <count-down
:is-day="false" :is-day="false"
:tip-text="'距结束仅剩 '" :tip-text="'距结束仅剩 '"
@ -33,50 +33,50 @@
:datatime="datatime" :datatime="datatime"
v-if="item.status === 1" v-if="item.status === 1"
></count-down> ></count-down>
<div v-if="item.status === 2" class="activity">活动即将开始</div> <view v-if="item.status === 2" class="activity">活动即将开始</view>
</div> </view>
<div class="list"> <view class="list">
<div <view
class="item acea-row row-between-wrapper" class="item acea-row row-between-wrapper"
v-for="(itemSeckill, indexSeckill) in seckillList" v-for="(itemSeckill, indexSeckill) in seckillList"
:key="indexSeckill" :key="indexSeckill"
> >
<div class="pictrue"> <view class="pictrue">
<img :src="itemSeckill.image" /> <image :src="itemSeckill.image" />
</div> </view>
<div class="text acea-row row-column-around"> <view class="text acea-row row-column-around">
<div class="line1" v-text="itemSeckill.title"></div> <view class="line1" v-text="itemSeckill.title"></view>
<div class="money"> <view class="money">
限时价 限时价
<span class="num font-color-red" v-text="'¥' + itemSeckill.price"></span> <text class="num font-color-red" v-text="'¥' + itemSeckill.price"></text>
</div> </view>
<div class="progress cart-color"> <view class="progress cart-color">
<div class="bg-red" :style="{ width: loading ? itemSeckill.percent + '%' : '' }"></div> <view class="bg-red" :style="{ width: loading ? itemSeckill.percent + '%' : '' }"></view>
<div class="piece font-color-red" v-text="'仅剩' + itemSeckill.stock + '件'"></div> <view class="piece font-color-red" v-text="'仅剩' + itemSeckill.stock + '件'"></view>
</div> </view>
</div> </view>
<div <view
class="grab bg-color-red" class="grab bg-color-red"
v-if="item.status === 1 && itemSeckill.stock > 0" v-if="item.status === 1 && itemSeckill.stock > 0"
@click="goDetail(itemSeckill.id)" @click="goDetail(itemSeckill.id)"
>马上抢</div> >马上抢</view>
<div class="grab" v-if="item.status === 1 && itemSeckill.stock <= 0">已售磬</div> <view class="grab" v-if="item.status === 1 && itemSeckill.stock <= 0">已售磬</view>
<div class="grab bg-color-red" v-if="item.status === 2">即将开始</div> <view class="grab bg-color-red" v-if="item.status === 2">即将开始</view>
<div class="grab bg-color-red" v-if="item.status === 0">已结束</div> <view class="grab bg-color-red" v-if="item.status === 0">已结束</view>
</div> </view>
</div> </view>
<div <view
class="noCommodity" class="noCommodity"
style="background-color: #fff;" style="background-color: #fff;"
v-if="seckillList.length === 0 && page > 1" v-if="seckillList.length === 0 && page > 1"
> >
<div class="noPictrue"> <view class="noPictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noGood.png'" class="image" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/noGood.png'" class="image" />
</div> </view>
</div> </view>
</vant-tab> </vant-tab>
</vant-tabs> </vant-tabs>
</div> </view>
</template> </template>
<script> <script>
import { getSeckillConfig, getSeckillList } from "@/api/activity"; import { getSeckillConfig, getSeckillList } from "@/api/activity";

199
pages/activity/GroupDetails/index.vue

@ -1,53 +1,54 @@
<template> <template>
<div :class="[posterImageStatus ? 'noscroll product-con' : 'product-con']" v-show="domStatus"> <view :class="[posterImageStatus ? 'noscroll product-con' : 'product-con']" v-show="domStatus">
<product-con-swiper :imgUrls="imgUrls"></product-con-swiper> <product-con-swiper :imgUrls="imgUrls"></product-con-swiper>
<div class="wrapper"> <view class="wrapper">
<div class="share acea-row row-between row-bottom"> <view class="share acea-row row-between row-bottom">
<div class="money font-color-red"> <view class="money font-color-red">
<span class="num" v-text="storeInfo.price"></span> <text class="num" v-text="storeInfo.price"></text>
<span class="y-money" v-text="'¥' + storeInfo.productPrice"></span> <text class="y-money" v-text="'¥' + storeInfo.productPrice"></text>
</div> </view>
</div> </view>
<div class="introduce" v-text="storeInfo.title"></div> <view class="introduce" v-text="storeInfo.title"></view>
<div class="label acea-row row-between-wrapper"> <view class="label acea-row row-between-wrapper">
<div v-text="'类型:' + storeInfo.people + '人团'"></div> <view v-text="'类型:' + storeInfo.people + '人团'"></view>
<div v-text="'库存:' + storeInfo.stock + storeInfo.unitName"></div> <view v-text="'库存:' + storeInfo.stock + storeInfo.unitName"></view>
<div v-text="'已拼:' + storeInfo.sales + storeInfo.unitName"></div> <view v-text="'已拼:' + storeInfo.sales + storeInfo.unitName"></view>
</div> </view>
</div> </view>
<div class="notice acea-row row-middle"> <view class="notice acea-row row-middle">
<div class="num font-color-red"> <view class="num font-color-red">
<span class="iconfont icon-laba"></span> <text class="iconfont icon-laba"></text>
已拼{{ storeInfo.sales 已拼{{ storeInfo.sales
}}{{ storeInfo.unitName }} }}{{ storeInfo.unitName }}
<span class="line">|</span> <text class="line">|</text>
</div> </view>
<div class="swiper-no-swiping swiper"> <view class="swiper-no-swiping swiper">
<swiper class="swiper-wrapper" :options="swiperTip" :autoplay="true" :interval="3000"> <swiper class="swiper-wrapper" :options="swiperTip" :autoplay="true" :interval="3000">
<block v-for="(item, itemNewIndex) in itemNew" :key="itemNewIndex"> <block v-for="(item, itemNewIndex) in itemNew" :key="itemNewIndex">
<swiper-item> <swiper-item>
<div class="line1">{{ item }}</div> <view class="line1">{{ item }}</view>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
</div> </view>
</div> </view>
<div class="assemble"> <view class="assemble">
<div v-for="(item, groupListindex) in groupList" :key="groupListindex"> <view v-for="(item, groupListindex) in groupList" :key="groupListindex">
<div class="item acea-row row-between-wrapper" v-if="groupListindex < groupListCount"> <view class="item acea-row row-between-wrapper" v-if="groupListindex < groupListCount">
<div class="pictxt acea-row row-between-wrapper"> <view class="pictxt acea-row row-between-wrapper">
<div class="pictrue"> <view class="pictrue">
<img :src="item.avatar" class="image" /> <image :src="item.avatar" class="image" />
</div> </view>
<div class="text line1" v-text="item.nickname"></div> <view class="text line1" v-text="item.nickname"></view>
</div> </view>
<div class="right acea-row row-middle"> <view class="right acea-row row-middle">
<div> <view>
<div class="lack"> <view class="lack">
还差 <text>还差</text>
<span class="font-color-red" v-text="item.count"></span>人成团 <text class="font-color-red" v-text="item.count"></text>
</div> <text>人成团</text>
</view>
<count-down <count-down
:is-day="false" :is-day="false"
:tip-text="'剩余 '" :tip-text="'剩余 '"
@ -57,69 +58,69 @@
:second-text="''" :second-text="''"
:datatime="item.stopTime" :datatime="item.stopTime"
></count-down> ></count-down>
</div> </view>
<div class="spellBnt" @click="groupRule(item.id)"> <view class="spellBnt" @click="groupRule(item.id)">
去拼单 去拼单
<span class="iconfont icon-jiantou"></span> <text class="iconfont icon-jiantou"></text>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<div class="more" v-if="groupList.length > groupListCount" @click="setGroupListCount"> <view class="more" v-if="groupList.length > groupListCount" @click="setGroupListCount">
查看更多 查看更多
<span class="iconfont icon-xiangxia"></span> <text class="iconfont icon-xiangxia"></text>
</div> </view>
</div> </view>
<div class="playWay"> <view class="playWay">
<div class="title acea-row row-between-wrapper"> <view class="title acea-row row-between-wrapper">
<div>拼团玩法</div> <view>拼团玩法</view>
</div> </view>
<div class="way acea-row row-middle"> <view class="way acea-row row-middle">
<div class="item"> <view class="item">
<span class="num"></span>开团/参团 <text class="num"></text>开团/参团
</div> </view>
<div class="iconfont icon-arrow"></div> <view class="iconfont icon-arrow"></view>
<div class="item"> <view class="item">
<span class="num"></span>邀请好友 <text class="num"></text>邀请好友
</div> </view>
<div class="iconfont icon-arrow"></div> <view class="iconfont icon-arrow"></view>
<div class="item"> <view class="item">
<div> <view>
<span class="num"></span>满员发货 <text class="num"></text>满员发货
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<div class="userEvaluation"> <view class="userEvaluation">
<div class="title acea-row row-between-wrapper"> <view class="title acea-row row-between-wrapper">
<div v-text="'用户评价(' + replyCount + ')'"></div> <view v-text="'用户评价(' + replyCount + ')'"></view>
<div class="praise" @click="goReply"> <view class="praise" @click="goReply">
<span class="font-color-red" v-text="replyChance + '%'"></span>好评率 <text class="font-color-red" v-text="replyChance + '%'"></text>好评率
<span class="iconfont icon-jiantou"></span> <text class="iconfont icon-jiantou"></text>
</div> </view>
</div> </view>
<UserEvaluation :reply="reply"></UserEvaluation> <UserEvaluation :reply="reply"></UserEvaluation>
</div> </view>
<div class="product-intro"> <view class="product-intro">
<div class="title">产品介绍</div> <view class="title">产品介绍</view>
<div class="conter" v-html="storeInfo.description"></div> <view class="conter" v-html="storeInfo.description"></view>
</div> </view>
<div style="height:100rpx;"></div> <view style="height:100rpx;"></view>
<div class="footer-group acea-row row-between-wrapper"> <view class="footer-group acea-row row-between-wrapper">
<div class="customerSer acea-row row-center-wrapper row-column"> <view class="customerSer acea-row row-center-wrapper row-column">
<div class="iconfont icon-kefu"></div> <view class="iconfont icon-kefu"></view>
<div>客服</div> <view>客服</view>
</div> </view>
<div class="bnt bg-color-violet" @click="openAlone">单独购买</div> <view class="bnt bg-color-violet" @click="openAlone">单独购买</view>
<div class="bnt bg-color-red" @click="openTeam">立即开团</div> <view class="bnt bg-color-red" @click="openTeam">立即开团</view>
</div> </view>
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cartNum"></ProductWindow> <ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cartNum"></ProductWindow>
<StorePoster <StorePoster
v-on:setPosterImageStatus="setPosterImageStatus" v-on:setPosterImageStatus="setPosterImageStatus"
:posterImageStatus="posterImageStatus" :posterImageStatus="posterImageStatus"
:posterData="posterData" :posterData="posterData"
></StorePoster> ></StorePoster>
</div> </view>
</template> </template>
<style scoped> <style scoped>
.noscroll { .noscroll {
@ -285,7 +286,11 @@ export default {
var that = this; var that = this;
that.attr.productSelect.cart_num = 1; that.attr.productSelect.cart_num = 1;
that.cartNum = 1; that.cartNum = 1;
that.$dialog.message("每人每次限购1" + that.storeInfo.unitName); uni.showToast({
title: "每人每次限购1" + that.storeInfo.unitName,
icon: "none",
duration: 2000
});
}, },
setProductSelect: function() { setProductSelect: function() {
var that = this; var that = this;
@ -316,7 +321,11 @@ export default {
}); });
}) })
.catch(err => { .catch(err => {
this.$dialog.error(err.msg||err.response.data.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
}); });
} }
} }

434
pages/activity/GroupRule/index.vue

@ -1,224 +1,220 @@
<template> <template>
<div class="group-con"> <view class="group-con">
<div class="header acea-row row-between-wrapper"> <view class="header acea-row row-between-wrapper">
<div class="pictrue"> <view class="pictrue">
<img :src="storeCombination.image" /> <image :src="storeCombination.image" />
</div> </view>
<div class="text"> <view class="text">
<div class="line1" v-text="storeCombination.title"></div> <view class="line1" v-text="storeCombination.title"></view>
<div class="money"> <view class="money">
<text></text>
<span class="num" v-text="storeCombination.price"></span> <text class="num" v-text="storeCombination.price"></text>
<span class="team cart-color" v-text="storeCombination.people + '人拼'"></span> <text class="team cart-color" v-text="storeCombination.people + '人拼'"></text>
</div> </view>
</div> </view>
<div v-if="pinkBool === -1" class="iconfont icon-pintuanshibai"></div> <view v-if="pinkBool === -1" class="iconfont icon-pintuanshibai"></view>
<div v-else-if="pinkBool === 1" class="iconfont icon-pintuanchenggong font-color-red"></div> <view v-else-if="pinkBool === 1" class="iconfont icon-pintuanchenggong font-color-red"></view>
</div> </view>
<div class="wrapper"> <view class="wrapper">
<div class="title acea-row row-center-wrapper"> <view class="title acea-row row-center-wrapper">
<div class="line"></div> <view class="line"></view>
<div class="name acea-row row-center-wrapper"> <view class="name acea-row row-center-wrapper">
剩余 <text>剩余</text>
<count-down <count-down :is-day="false" :tip-text="''" :day-text="''" :hour-text="' : '" :minute-text="' : '" :second-text="''"
:is-day="false" :datatime="pinkT.stopTime"></count-down>
:tip-text="''" <text>结束</text>
:day-text="''" </view>
:hour-text="' : '" <view class="line"></view>
:minute-text="' : '" </view>
:second-text="''" <text class="tips font-color-red" v-if="pinkBool === 1">恭喜您拼团成功</text>
:datatime="pinkT.stopTime" <text class="tips" v-else-if="pinkBool === -1">还差{{ count }}拼团失败</text>
></count-down> <text class="tips font-color-red" v-else-if="pinkBool === 0">拼团中还差{{ count }}人拼团成功</text>
</div> <view class="list acea-row row-middle" :class="[pinkBool === 1 || pinkBool === -1 ? 'result' : '',iShidden ? 'on' : '']">
<div class="line"></div> <view class="pictrue">
</div> <image :src="pinkT.avatar" />
<div class="tips font-color-red" v-if="pinkBool === 1">恭喜您拼团成功</div> </view>
<div class="tips" v-else-if="pinkBool === -1">还差{{ count }}拼团失败</div> <view class="acea-row row-middle" v-if="pinkAll.length > 0">
<div class="tips font-color-red" v-else-if="pinkBool === 0">拼团中还差{{ count }}人拼团成功</div> <view class="pictrue" v-for="(item, pinkAllIndex) in pinkAll" :key="pinkAllIndex">
<div <image :src="item.avatar" />
class="list acea-row row-middle" </view>
:class="[ </view>
pinkBool === 1 || pinkBool === -1 ? 'result' : '', <view class="pictrue" v-for="countIndex in count" :key="countIndex">
iShidden ? 'on' : '' <image class="img-none" :src="$VUE_APP_RESOURCES_URL+'/images/vacancy.png'" />
]" </view>
> </view>
<div class="pictrue"> <view v-if="(pinkBool === 1 || pinkBool === -1) && count > 9" class="lookAll acea-row row-center-wrapper" @click="lookAll">
<img :src="pinkT.avatar" /> {{ iShidden ? "收起" : "查看全部" }}
</div> <text class="iconfont" :class="iShidden ? 'icon-xiangshang' : 'icon-xiangxia'"></text>
<div class="acea-row row-middle" v-if="pinkAll.length > 0"> </view>
<div class="pictrue" v-for="(item, pinkAllIndex) in pinkAll" :key="pinkAllIndex"> <view class="teamBnt bg-color-red" v-if="userBool === 1 && isOk == 0 && pinkBool === 0" @click="goPoster">邀请好友参团</view>
<img :src="item.avatar" /> <view class="teamBnt bg-color-red" v-else-if="userBool === 0 && pinkBool === 0 && count > 0" @click="pay">我要参团</view>
</div> <view class="teamBnt bg-color-red" v-if="pinkBool === 1 || pinkBool === -1" @click="goDetail(storeCombination.id)">再次开团</view>
</div> <view class="cancel" @click="getCombinationRemove" v-if="pinkBool === 0 && userBool === 1">
<div class="pictrue" v-for="countIndex in count" :key="countIndex"> <text class="iconfont icon-guanbi3"></text>
<img class="img-none" :src="$VUE_APP_RESOURCES_URL+'/images/vacancy.png'" /> <text>取消开团</text>
</div> </view>
</div> <view class="lookOrder" v-if="pinkBool === 1" @click="goOrder">
<div <text>查看订单信息</text>
v-if="(pinkBool === 1 || pinkBool === -1) && count > 9" <text class="iconfont icon-xiangyou"></text>
class="lookAll acea-row row-center-wrapper" </view>
@click="lookAll" </view>
> </view>
{{ iShidden ? "收起" : "查看全部" }}
<span
class="iconfont"
:class="iShidden ? 'icon-xiangshang' : 'icon-xiangxia'"
></span>
</div>
<div
class="teamBnt bg-color-red"
v-if="userBool === 1 && isOk == 0 && pinkBool === 0"
@click="goPoster"
>邀请好友参团</div>
<div
class="teamBnt bg-color-red"
v-else-if="userBool === 0 && pinkBool === 0 && count > 0"
@click="pay"
>我要参团</div>
<div
class="teamBnt bg-color-red"
v-if="pinkBool === 1 || pinkBool === -1"
@click="goDetail(storeCombination.id)"
>再次开团</div>
<div class="cancel" @click="getCombinationRemove" v-if="pinkBool === 0 && userBool === 1">
<span class="iconfont icon-guanbi3"></span>取消开团
</div>
<div class="lookOrder" v-if="pinkBool === 1" @click="goOrder">
查看订单信息
<span class="iconfont icon-xiangyou"></span>
</div>
</div>
</div>
</template> </template>
<script> <script>
import CountDown from "@/components/CountDown"; import CountDown from "@/components/CountDown";
import { getCombinationPink, getCombinationRemove } from "@/api/activity"; import {
import { postCartAdd } from "@/api/store"; getCombinationPink,
import { isWeixin, parseQuery, handleQrCode } from "@/utils/index"; getCombinationRemove
} from "@/api/activity";
import {
postCartAdd
} from "@/api/store";
import {
isWeixin,
parseQuery,
handleQrCode
} from "@/utils/index";
const NAME = "GroupRule"; const NAME = "GroupRule";
export default { export default {
name: NAME, name: NAME,
components: { components: {
CountDown CountDown
}, },
props: {}, props: {},
data: function() { data: function() {
return { return {
currentPinkOrder: "", // currentPinkOrder: "", //
isOk: 0, // isOk: 0, //
pinkBool: 0, //|0=,1= pinkBool: 0, //|0=,1=
userBool: 0, //|0=,1= userBool: 0, //|0=,1=
pinkAll: [], // pinkAll: [], //
pinkT: [], // pinkT: [], //
storeCombination: [], // storeCombination: [], //
pinkId: 0, pinkId: 0,
count: 0, // count: 0, //
iShidden: false iShidden: false
}; };
}, },
watch: { watch: {
$yroute(n) { $yroute(n) {
var that = this; var that = this;
if (n.name === NAME) { if (n.name === NAME) {
that.pinkId = that.$yroute.query.id; that.pinkId = that.$yroute.query.id;
that.getCombinationPink(); that.getCombinationPink();
} }
} }
}, },
mounted: function() { mounted: function() {
var that = this; var that = this;
let url = handleQrCode(); let url = handleQrCode();
if (url) { if (url) {
that.pinkId = url.pinkId; that.pinkId = url.pinkId;
} else { } else {
that.pinkId = that.$yroute.query.id; that.pinkId = that.$yroute.query.id;
} }
that.getCombinationPink(); that.getCombinationPink();
}, },
methods: { methods: {
pay: function() { pay: function() {
var that = this; var that = this;
var data = {}; var data = {};
data.productId = that.storeCombination.productId; data.productId = that.storeCombination.productId;
data.cartNum = that.pinkT.totalNum; data.cartNum = that.pinkT.totalNum;
data.uniqueId = ""; data.uniqueId = "";
data.combinationId = that.storeCombination.id; data.combinationId = that.storeCombination.id;
data.new = 1; data.new = 1;
postCartAdd(data) postCartAdd(data)
.then(res => { .then(res => {
that.$yrouter.push({ that.$yrouter.push({
path: "/pages/order/OrderSubmission/index", path: "/pages/order/OrderSubmission/index",
query: { id: res.data.cartId, pinkid: that.pinkId } query: {
}); id: res.data.cartId,
}) pinkid: that.pinkId
.catch(err => { }
this.$dialog.error(err.msg||err.response.data.msg); });
}); })
}, .catch(err => {
goPoster: function() { uni.showToast({
var that = this; title: err.msg || err.response.data.msg,
this.$yrouter.push({ icon: 'none',
path: "/pages/activity/Poster/index", duration: 2000
query: { id: that.pinkId, type: 1 } });
}); });
}, },
goOrder: function() { goPoster: function() {
var that = this; var that = this;
this.$yrouter.push({ this.$yrouter.push({
path: "/pages/order/OrderDetails/index", path: "/pages/activity/Poster/index",
query: { id: that.currentPinkOrder } query: {
}); id: that.pinkId,
}, type: 1
// }
goList: function() { });
this.$yrouter.push({ },
path: "/pages/activity/GoodsGroup/index" goOrder: function() {
}); var that = this;
}, this.$yrouter.push({
// path: "/pages/order/OrderDetails/index",
goDetail: function(id) { query: {
this.$yrouter.push({ id: that.currentPinkOrder
path: "/pages/activity/GroupDetails/index", }
query: { id } });
}); },
}, //
// goList: function() {
getCombinationPink: function() { this.$yrouter.push({
var that = this; path: "/pages/activity/GoodsGroup/index"
getCombinationPink(that.pinkId).then(res => { });
that.$set(that, "storeCombination", res.data.storeCombination); },
that.$set(that, "pinkT", res.data.pinkT); //
that.$set(that, "pinkAll", res.data.pinkAll); goDetail: function(id) {
that.$set(that, "count", res.data.count); this.$yrouter.push({
that.$set(that, "userBool", res.data.userBool); path: "/pages/activity/GroupDetails/index",
that.$set(that, "pinkBool", res.data.pinkBool); query: {
that.$set(that, "isOk", res.data.isOk); id
that.$set(that, "currentPinkOrder", res.data.currentPinkOrder); }
}); });
}, },
// //
getCombinationRemove: function() { getCombinationPink: function() {
var that = this; var that = this;
getCombinationRemove({ id: that.pinkId, cid: that.storeCombination.id }) getCombinationPink(that.pinkId).then(res => {
.then(res => { that.$set(that, "storeCombination", res.data.storeCombination);
uni.showToast({ that.$set(that, "pinkT", res.data.pinkT);
title: res.msg, that.$set(that, "pinkAll", res.data.pinkAll);
icon: "none", that.$set(that, "count", res.data.count);
duration: 2000 that.$set(that, "userBool", res.data.userBool);
}); that.$set(that, "pinkBool", res.data.pinkBool);
}) that.$set(that, "isOk", res.data.isOk);
.catch(res => { that.$set(that, "currentPinkOrder", res.data.currentPinkOrder);
uni.showToast({ });
title: res.msg, },
icon: "none", //
duration: 2000 getCombinationRemove: function() {
}); var that = this;
}); getCombinationRemove({
}, id: that.pinkId,
lookAll: function() { cid: that.storeCombination.id
this.iShidden = !this.iShidden; })
} .then(res => {
} uni.showToast({
}; title: res.msg,
icon: "none",
duration: 2000
});
})
.catch(res => {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
});
},
lookAll: function() {
this.iShidden = !this.iShidden;
}
}
};
</script> </script>

16
pages/activity/Poster/index.vue

@ -1,12 +1,12 @@
<template> <template>
<div class="poster-poster" v-if="status === false"> <view class="poster-poster" v-if="status === false">
<div class="tip"> <view class="tip">
<span class="iconfont icon-shuoming"></span>提示长按图片保存至手机相册 <text class="iconfont icon-shuoming"></text>提示长按图片保存至手机相册
</div> </view>
<div class="poster"> <view class="poster">
<img :src="image" mode="widthFix" show-menu-by-longpress /> <image :src="image" mode="widthFix" show-menu-by-longpress />
</div> </view>
</div> </view>
</template> </template>
<style scoped> <style scoped>
.poster-poster { .poster-poster {

79
pages/activity/SeckillDetails/index.vue

@ -1,15 +1,15 @@
<template> <template>
<div :class="[posterImageStatus ? 'noscroll product-con' : 'product-con']" v-show="domStatus"> <view :class="[posterImageStatus ? 'noscroll product-con' : 'product-con']" v-show="domStatus">
<product-con-swiper :imgUrls="imgUrls"></product-con-swiper> <product-con-swiper :imgUrls="imgUrls"></product-con-swiper>
<div class="nav acea-row row-between-wrapper"> <view class="nav acea-row row-between-wrapper">
<div class="money"> <view class="money">
<span class="num" v-text="storeInfo.price"></span> <text class="num" v-text="storeInfo.price"></text>
<span class="y-money" v-text="'¥' + storeInfo.price"></span> <text class="y-money" v-text="'¥' + storeInfo.price"></text>
</div> </view>
<div class="acea-row row-middle"> <view class="acea-row row-middle">
<div class="times"> <view class="times">
<div>距秒杀结束仅剩</div> <view>距秒杀结束仅剩</view>
<count-down <count-down
:is-day="false" :is-day="false"
:tip-text="''" :tip-text="''"
@ -19,42 +19,42 @@
:second-text="''" :second-text="''"
:datatime="datatime" :datatime="datatime"
></count-down> ></count-down>
</div> </view>
<div class="iconfont icon-jiantou"></div> <view class="iconfont icon-jiantou"></view>
</div> </view>
</div> </view>
<div class="wrapperRush"> <view class="wrapperRush">
<div class="introduce acea-row row-between"> <view class="introduce acea-row row-between">
<div class="infor" v-text="storeInfo.title"></div> <view class="infor" v-text="storeInfo.title"></view>
<div class="iconfont icon-fenxiang" @click="setPosterImageStatus"></div> <view class="iconfont icon-fenxiang" @click="setPosterImageStatus"></view>
</div> </view>
<div class="label acea-row row-middle"> <view class="label acea-row row-middle">
<div class="stock" v-text="'库存:' + storeInfo.stock + '件'"></div> <view class="stock" v-text="'库存:' + storeInfo.stock + '件'"></view>
<div v-text="'销量:' + storeInfo.sales + '件'"></div> <view v-text="'销量:' + storeInfo.sales + '件'"></view>
</div> </view>
</div> </view>
<div class="product-intro"> <view class="product-intro">
<div class="title">产品介绍</div> <view class="title">产品介绍</view>
<div class="conter" v-html="storeInfo.description"></div> <view class="conter" v-html="storeInfo.description"></view>
</div> </view>
<div style="height:100rpx;"></div> <view style="height:100rpx;"></view>
<div class="footerRush acea-row row-between-wrapper"> <view class="footerRush acea-row row-between-wrapper">
<div <view
class="customerSer acea-row row-center-wrapper row-column" class="customerSer acea-row row-center-wrapper row-column"
@click="routerGo()" @click="routerGo()"
> >
<div class="iconfont icon-kefu"></div> <view class="iconfont icon-kefu"></view>
<div>客服</div> <view>客服</view>
</div> </view>
<div class="bnt bg-color-red" @click="tapBuy">立即购买</div> <view class="bnt bg-color-red" @click="tapBuy">立即购买</view>
</div> </view>
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cartNum"></ProductWindow> <ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cartNum"></ProductWindow>
<StorePoster <StorePoster
v-on:setPosterImageStatus="setPosterImageStatus" v-on:setPosterImageStatus="setPosterImageStatus"
:posterImageStatus="posterImageStatus" :posterImageStatus="posterImageStatus"
:posterData="posterData" :posterData="posterData"
></StorePoster> ></StorePoster>
</div> </view>
</template> </template>
<style scoped> <style scoped>
.noscroll { .noscroll {
@ -215,8 +215,11 @@ export default {
}); });
}) })
.catch(err => { .catch(err => {
console.log(err); uni.showToast({
this.$dialog.error(err.msg || err.response.data.msg); title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
}); });
} }
} }

373
pages/authorization/index.vue

@ -1,188 +1,201 @@
<template> <template>
<div class="container"> <view class="container">
<div v-if="!isAuthorization"> <view v-if="!isAuthorization">
<div class="getUserInfo"> <view class="getUserInfo">
<p>您还未允许微信登录授权请点击下方按钮允许微信授权登录</p> <view>您还未允许微信登录授权请点击下方按钮允许微信授权登录</text>
<vant-button type="primary" open-type="getUserInfo" @getuserinfo="getUserInfo">允许微信登录授权</vant-button> <vant-button type="primary" open-type="getUserInfo" @getuserinfo="getUserInfo">允许微信登录授权</vant-button>
<div class="sp-cell"></div> <view class="sp-cell"></view>
<vant-button type="default" @click="back">取消微信登录授权</vant-button> <vant-button type="default" @click="back">取消微信登录授权</vant-button>
</div> </view>
</div> </view>
</div> </view>
</view>
</template> </template>
<script> <script>
import { mapState, mapMutations, mapActions } from "vuex"; import {
// mapState,
// import request from "@//api/request"; mapMutations,
import { wxappAuth, getUser } from "@/api/user"; mapActions
import dayjs from "dayjs"; } from "vuex";
import cookie from "@/utils/store/cookie"; //
import { login } from "@/utils"; // import request from "@//api/request";
import {
export default { wxappAuth,
data() { getUser
return {}; } from "@/api/user";
}, import dayjs from "dayjs";
computed: { import cookie from "@/utils/store/cookie";
...mapState(["isAuthorization"]) import {
}, login
onShow() { } from "@/utils";
this.UPDATE_AUTHORIZATIONPAGE(false);
}, export default {
onHide() { data() {
this.changeAuthorization(false); return {};
}, },
onUnload() { computed: {
this.changeAuthorization(false); ...mapState(["isAuthorization"])
}, },
methods: { onShow() {
...mapActions(["changeAuthorization", "changeUserInfo"]), this.UPDATE_AUTHORIZATIONPAGE(false);
...mapMutations(["UPDATE_AUTHORIZATIONPAGE", "CHANGE_TABTAR"]), },
back() { onHide() {
// if (this.$yroute.query.redirect) { this.changeAuthorization(false);
// this.$yrouter.replace({ },
// path: this.$yroute.query.redirect onUnload() {
// }); this.changeAuthorization(false);
// } else { },
// this.$yrouter.replace({ methods: {
// path: "/pages/launch/index", ...mapActions(["changeAuthorization", "changeUserInfo"]),
// query: { type: 0 } ...mapMutations(["UPDATE_AUTHORIZATIONPAGE", "CHANGE_TABTAR"]),
// }); back() {
// } // if (this.$yroute.query.redirect) {
this.CHANGE_TABTAR(0); // this.$yrouter.replace({
this.$yrouter.replace({ // path: this.$yroute.query.redirect
path: "/pages/home/index", // });
query: { type: 0 } // } else {
}); // this.$yrouter.replace({
}, // path: "/pages/launch/index",
getUserInfo(data) { // query: { type: 0 }
uni.showLoading({ // });
title: "登录中" // }
}); this.CHANGE_TABTAR(0);
login(); this.$yrouter.replace({
} path: "/pages/home/index",
}, query: {
onUnload() {}, type: 0
mounted() {} }
}; });
},
getUserInfo(data) {
uni.showLoading({
title: "登录中"
});
login();
}
},
onUnload() {},
mounted() {}
};
</script> </script>
<style lang="less"> <style lang="less">
.sp-cell { .sp-cell {
height: 20rpx; height: 20rpx;
} }
.getUserInfo {
display: flex; .getUserInfo {
align-items: center; display: flex;
flex-direction: column; align-items: center;
padding: 30px; flex-direction: column;
padding: 30px;
p {
margin-bottom: 20px; p {
} margin-bottom: 20px;
} }
.container { }
flex: 1;
display: flex; .container {
flex-direction: column; flex: 1;
justify-content: flex-start; display: flex;
position: relative; flex-direction: column;
} justify-content: flex-start;
position: relative;
.tab-bar { }
font-size: 0;
display: flex; .tab-bar {
align-items: center; font-size: 0;
background: rgba(255, 255, 255, 0.9); display: flex;
position: fixed; align-items: center;
bottom: 0; background: rgba(255, 255, 255, 0.9);
left: 0; position: fixed;
right: 0; bottom: 0;
z-index: 99; left: 0;
border-top: 1px solid rgba(248, 248, 248, 1); right: 0;
z-index: 99;
.tab-bar-item { border-top: 1px solid rgba(248, 248, 248, 1);
flex: 1;
height: 49px; .tab-bar-item {
display: flex; flex: 1;
justify-content: center; height: 49px;
align-items: center; display: flex;
flex-direction: column; justify-content: center;
align-items: center;
&.active { flex-direction: column;
text {
color: #ee7559; &.active {
} text {
color: #ee7559;
.tab-bar-pic { }
display: none;
background: #f9f9f9; .tab-bar-pic {
display: none;
&.active { background: #f9f9f9;
display: block;
} &.active {
} display: block;
} }
}
.tab-bar-pic { }
display: block;
background: #f9f9f9; .tab-bar-pic {
display: block;
&.active { background: #f9f9f9;
display: none;
} &.active {
} display: none;
} }
}
.tab-bar-pic { }
width: 25px;
height: 25px; .tab-bar-pic {
background: #f9f9f9; width: 25px;
height: 25px;
image { background: #f9f9f9;
width: 25px;
height: 25px; image {
} width: 25px;
} height: 25px;
}
.tab-bar-pic-active { }
}
.tab-bar-pic-active {}
text {
font-size: 10px; text {
color: rgb(160, 160, 160); font-size: 10px;
line-height: 10px; color: rgb(160, 160, 160);
margin-top: 5px; line-height: 10px;
} margin-top: 5px;
} }
}
.tab-bar-bg {
padding-top: 46px; .tab-bar-bg {
width: 100%; padding-top: 46px;
} width: 100%;
}
.view-item {
display: none; .view-item {
width: 100%; display: none;
} width: 100%;
}
.view-item-active {
display: block; .view-item-active {
} display: block;
}
.getUserInfo {
display: flex; .getUserInfo {
align-items: center; display: flex;
flex-direction: column; align-items: center;
padding: 30px; flex-direction: column;
padding: 30px;
p {
margin-bottom: 20px; p {
} margin-bottom: 20px;
} }
}
._van-dialog {
z-index: 99999999999; ._van-dialog {
} z-index: 99999999999;
}
</style> </style>

198
pages/home/index.vue

@ -1,26 +1,26 @@
<template> <template>
<div class="index"> <view class="index">
<div class="header acea-row row-center-wrapper"> <view class="header acea-row row-center-wrapper">
<div @click="goGoodSearch()" class="search acea-row row-middle"> <view @click="goGoodSearch()" class="search acea-row row-middle">
<span class="iconfont icon-xiazai5"></span>搜索商品 <text class="iconfont icon-xiazai5"></text>搜索商品
</div> </view>
</div> </view>
<div class="slider-banner banner"> <view class="slider-banner banner">
<swiper indicatorDots="true" v-if="banner.length > 0"> <swiper indicatorDots="true" v-if="banner.length > 0">
<block v-for="(item, bannerIndex) in banner" :key="bannerIndex"> <block v-for="(item, bannerIndex) in banner" :key="bannerIndex">
<swiper-item> <swiper-item>
<div @click="item.url?$yrouter.push('/'+item.url) : ''" class="swiper-item"> <view @click="item.url?$yrouter.push('/'+item.url) : ''" class="swiper-item">
<img :src="item.pic" /> <image :src="item.pic" />
</div> </view>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
</div> </view>
<div class="news acea-row row-between-wrapper"> <view class="news acea-row row-between-wrapper">
<div class="pictrue" v-if="$VUE_APP_RESOURCES_URL"> <view class="pictrue" v-if="$VUE_APP_RESOURCES_URL">
<img :src="$VUE_APP_RESOURCES_URL+'/images/news.png'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/news.png'" />
</div> </view>
<div class="swiper-no-swiping new-banner"> <view class="swiper-no-swiping new-banner">
<swiper <swiper
class="swiper-wrapper" class="swiper-wrapper"
v-if="roll.length > 0" v-if="roll.length > 0"
@ -31,120 +31,120 @@
> >
<block v-for="(item, rollIndex) in roll" :key="rollIndex"> <block v-for="(item, rollIndex) in roll" :key="rollIndex">
<swiper-item class="swiper-slide"> <swiper-item class="swiper-slide">
<div <view
@click="item.uniapp_url?$yrouter.push(item.uniapp_url) : ''" @click="item.uniapp_url?$yrouter.push(item.uniapp_url) : ''"
class="swiper-item acea-row row-between-wrapper" class="swiper-item acea-row row-between-wrapper"
> >
<div class="text acea-row row-between-wrapper"> <view class="text acea-row row-between-wrapper">
<div class="label" v-if="item.show === '是'">最新</div> <view class="label" v-if="item.show === '是'">最新</view>
<div class="newsTitle line1">{{ item.info }}</div> <view class="newsTitle line1">{{ item.info }}</view>
</div> </view>
<div class="iconfont icon-xiangyou"></div> <view class="iconfont icon-xiangyou"></view>
</div> </view>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
</div> </view>
</div> </view>
<div class="nav acea-row"> <view class="nav acea-row">
<div <view
@click="goWxappUrl(item)" @click="goWxappUrl(item)"
class="item" class="item"
v-for="(item, menusIndex) in menus" v-for="(item, menusIndex) in menus"
:key="menusIndex" :key="menusIndex"
> >
<div class="pictrue"> <view class="pictrue">
<img :src="item.pic" /> <image :src="item.pic" />
</div> </view>
<div>{{ item.name }}</div> <view>{{ item.name }}</view>
</div> </view>
</div> </view>
<div class="wrapper hot" v-if="bastList.length > 0"> <view class="wrapper hot" v-if="bastList.length > 0">
<img class="bg" src="../../assets/images/index-bg.png" mode="widthFix" /> <image class="bg" src="../../static/images/index-bg.png" mode="widthFix" ></image>
<div class="title acea-row row-between-wrapper"> <view class="title acea-row row-between-wrapper">
<div class="text"> <view class="text">
<div class="name line1">热门榜单</div> <view class="name line1">热门榜单</view>
</div> </view>
<div @click="goHotNewGoods()" class="more"> <view @click="goHotNewGoods()" class="more">
更多 更多
<span class="iconfont icon-jiantou"></span> <text class="iconfont icon-jiantou"></text>
</div> </view>
</div> </view>
<div class="newProducts"> <view class="newProducts">
<scroll-view scroll-y="false" scroll-x="true"> <scroll-view scroll-y="false" scroll-x="true">
<div class="newProductsScroll"> <view class="newProductsScroll">
<div <view
@click="goGoodsCon(item)" @click="goGoodsCon(item)"
class="newProductsItem" class="newProductsItem"
v-for="(item, likeInfoIndex) in likeInfo" v-for="(item, likeInfoIndex) in likeInfo"
:key="likeInfoIndex" :key="likeInfoIndex"
> >
<div class="img-box"> <view class="img-box">
<img :src="item.image" /> <image :src="item.image" />
</div> </view>
<div class="pro-info line1">{{ item.storeName }}</div> <view class="pro-info line1">{{ item.storeName }}</view>
<div class="money font-color-red">{{ item.price }}</div> <view class="money font-color-red">{{ item.price }}</view>
</div> </view>
</div> </view>
</scroll-view> </scroll-view>
</div> </view>
</div> </view>
<div class="wrapper" v-if="bastList.length > 0"> <view class="wrapper" v-if="bastList.length > 0">
<div class="title acea-row row-between-wrapper"> <view class="title acea-row row-between-wrapper">
<div class="text"> <view class="text">
<div class="name line1">精品推荐</div> <view class="name line1">精品推荐</view>
</div> </view>
<div @click="goHotNewGoods(1)" class="more"> <view @click="goHotNewGoods(1)" class="more">
更多 更多
<span class="iconfont icon-jiantou"></span> <text class="iconfont icon-jiantou"></text>
</div> </view>
</div> </view>
<Good-list :good-list="bastList" :is-sort="false"></Good-list> <Good-list :good-list="bastList" :is-sort="false"></Good-list>
</div> </view>
<div class="wrapper" v-if="firstList.length > 0"> <view class="wrapper" v-if="firstList.length > 0">
<div class="title acea-row row-between-wrapper"> <view class="title acea-row row-between-wrapper">
<div class="text"> <view class="text">
<div class="name line1"> <view class="name line1">
首发新品 首发新品
<span class="new font-color-red">NEW~</span> <text class="new font-color-red">NEW~</text>
</div> </view>
</div> </view>
<div @click="goHotNewGoods(3)" class="more"> <view @click="goHotNewGoods(3)" class="more">
更多 更多
<span class="iconfont icon-jiantou"></span> <text class="iconfont icon-jiantou"></text>
</div> </view>
</div> </view>
<div class="newProducts"> <view class="newProducts">
<scroll-view scroll-y="false" scroll-x="true"> <scroll-view scroll-y="false" scroll-x="true">
<div class="newProductsScroll"> <view class="newProductsScroll">
<div <view
@click="goGoodsCon(item)" @click="goGoodsCon(item)"
class="newProductsItem" class="newProductsItem"
v-for="(item, firstListIndex) in firstList" v-for="(item, firstListIndex) in firstList"
:key="firstListIndex" :key="firstListIndex"
> >
<div class="img-box"> <view class="img-box">
<img :src="item.image" /> <image :src="item.image" />
</div> </view>
<div class="pro-info line1">{{ item.storeName }}</div> <view class="pro-info line1">{{ item.storeName }}</view>
<div class="money font-color-red">{{ item.price }}</div> <view class="money font-color-red">{{ item.price }}</view>
</div> </view>
</div> </view>
</scroll-view> </scroll-view>
</div> </view>
</div> </view>
<div class="wrapper" v-if="benefit.length > 0"> <view class="wrapper" v-if="benefit.length > 0">
<div class="title acea-row row-between-wrapper"> <view class="title acea-row row-between-wrapper">
<div class="text"> <view class="text">
<div class="name line1">促销单品</div> <view class="name line1">促销单品</view>
</div> </view>
<div @click="goGoodsPromotion()" class="more"> <view @click="goGoodsPromotion()" class="more">
更多 更多
<span class="iconfont icon-jiantou"></span> <text class="iconfont icon-jiantou"></text>
</div> </view>
</div> </view>
</div> </view>
<PromotionGood :benefit="benefit"></PromotionGood> <PromotionGood :benefit="benefit"></PromotionGood>
<Coupon-window <Coupon-window
:coupon-list="couponList" :coupon-list="couponList"
@ -152,7 +152,7 @@
@checked="couponClose" @checked="couponClose"
@close="couponClose" @close="couponClose"
></Coupon-window> ></Coupon-window>
</div> </view>
</template> </template>
<script> <script>
// import { swiper, swiperSlide } from "vue-awesome-swiper"; // import { swiper, swiperSlide } from "vue-awesome-swiper";

20
pages/launch/index.vue

@ -1,19 +1,19 @@
<template> <template>
<div class="page"> <view class="page">
<div :class="tabtarIndex==0?'page':''" v-show="tabtarIndex==0"> <view :class="tabtarIndex==0?'page':''" v-show="tabtarIndex==0">
<home></home> <home></home>
</div> </view>
<div :class="tabtarIndex==1?'page':''" v-show="tabtarIndex==1"> <view :class="tabtarIndex==1?'page':''" v-show="tabtarIndex==1">
<goods-class></goods-class> <goods-class></goods-class>
</div> </view>
<div :class="tabtarIndex==2?'page':''" v-if="tabtarIndex==2"> <view :class="tabtarIndex==2?'page':''" v-if="tabtarIndex==2">
<shopping-cart></shopping-cart> <shopping-cart></shopping-cart>
</div> </view>
<div :class="tabtarIndex==3?'page':''" v-if="tabtarIndex==3"> <view :class="tabtarIndex==3?'page':''" v-if="tabtarIndex==3">
<user></user> <user></user>
</div> </view>
<footer-components></footer-components> <footer-components></footer-components>
</div> </view>
</template> </template>
<script> <script>

257
pages/order/GoodsReturn/index.vue

@ -1,124 +1,153 @@
<template> <template>
<div class="apply-return"> <view class="apply-return">
<div class="goodsStyle acea-row row-between" v-for="cart in orderInfo.cartInfo" :key="cart.id"> <view class="goodsStyle acea-row row-between" v-for="cart in orderInfo.cartInfo" :key="cart.id">
<div class="pictrue"> <view class="pictrue">
<img :src="cart.productInfo.image" class="image" /> <image :src="cart.productInfo.image" class="image" />
</div> </view>
<div class="text acea-row row-between"> <view class="text acea-row row-between">
<div class="name line2">{{ cart.productInfo.storeName }}</div> <view class="name line2">{{ cart.productInfo.storeName }}</view>
<div class="money"> <view class="money">
<div> <view>
{{ {{
cart.productInfo.attrInfo cart.productInfo.attrInfo
? cart.productInfo.attrInfo.price ? cart.productInfo.attrInfo.price
: cart.productInfo.price : cart.productInfo.price
}} }}
</div> </view>
<div class="num">x{{ cart.cartNum }}</div> <view class="num">x{{ cart.cartNum }}</view>
</div> </view>
</div> </view>
</div> </view>
<div class="list"> <view class="list">
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div>退货件数</div> <view>退货件数</view>
<div class="num">{{ orderInfo.totalNum }}</div> <view class="num">{{ orderInfo.totalNum }}</view>
</div> </view>
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div>退款金额</div> <view>退款金额</view>
<div class="num">{{ orderInfo.payPrice }}</div> <view class="num">{{ orderInfo.payPrice }}</view>
</div> </view>
<picker :value="reason" :range="reasonList" @change="changeReason"> <picker :value="reason" :range="reasonList" @change="changeReason">
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div>退款原因</div> <view>退款原因</view>
<div class="num">{{reason}}</div> <view class="num">{{reason}}</view>
<span class="iconfont icon-jiantou"></span> <text class="iconfont icon-jiantou"></text>
</div> </view>
</picker> </picker>
<div class="item textarea acea-row row-between"> <view class="item textarea acea-row row-between">
<div>备注说明</div> <view>备注说明</view>
<textarea placeholder="填写备注信息,100字以内" class="num" v-model="refund_reason_wap_explain"></textarea> <textarea placeholder="填写备注信息,100字以内" class="num" v-model="refund_reason_wap_explain"></textarea>
</div> </view>
</div> </view>
<div class="returnBnt bg-color-red" @click="submit">申请退款</div> <view class="returnBnt bg-color-red" @click="submit">申请退款</view>
</div> </view>
</template> </template>
<script> <script>
import { orderDetail, getRefundReason, postOrderRefund } from "@/api/order"; import {
import { trim } from "@/utils"; orderDetail,
import { VUE_APP_API_URL } from "@/config"; getRefundReason,
postOrderRefund
} from "@/api/order";
import {
trim
} from "@/utils";
import {
VUE_APP_API_URL
} from "@/config";
export default { export default {
name: "goodsReturn", name: "goodsReturn",
components: { components: {
// VueCoreImageUpload // VueCoreImageUpload
}, },
data() { data() {
return { return {
url: `${VUE_APP_API_URL}/upload/image`, url: `${VUE_APP_API_URL}/upload/image`,
headers: { headers: {
Authorization: "Bearer " + this.$store.state.token Authorization: "Bearer " + this.$store.state.token
}, },
id: 0, id: 0,
orderInfo: {}, orderInfo: {},
reasonList: [], reasonList: [],
reason: "", reason: "",
refund_reason_wap_explain: "", refund_reason_wap_explain: "",
refund_reason_wap_img: [] refund_reason_wap_img: []
}; };
}, },
methods: { methods: {
changeReason(e) { changeReason(e) {
this.reason = this.reasonList[e.mp.detail.value]; this.reason = this.reasonList[e.mp.detail.value];
}, },
imageuploaded(res) { imageuploaded(res) {
if (res.status !== 200) if (res.status !== 200) {
return this.$dialog.error(res.msg || "上传图片失败"); uni.showToast({
this.refund_reason_wap_img.push(res.data.url); title: err.msg || err.response.data.msg,
}, icon: 'none',
getOrderDetail() { duration: 2000
orderDetail(this.id) });
.then(res => { return
this.orderInfo = res.data; }
}) this.refund_reason_wap_img.push(res.data.url);
.catch(err => { },
this.$dialog.error(err.response.data.msg || "获取订单失败"); getOrderDetail() {
}); orderDetail(this.id)
}, .then(res => {
getRefundReason() { this.orderInfo = res.data;
getRefundReason().then(res => { })
this.reasonList = res.data; .catch(err => {
}); uni.showToast({
}, title: err.msg || err.response.data.msg,
submit() { icon: 'none',
const refund_reason_wap_explain = trim(this.refund_reason_wap_explain), duration: 2000
text = this.reason; });
if (!text) return this.$dialog.toast({ mes: "请选择退款原因" }); });
postOrderRefund({ },
text, getRefundReason() {
uni: this.orderInfo.orderId, getRefundReason().then(res => {
refund_reason_wap_img: this.refund_reason_wap_img.join(","), this.reasonList = res.data;
refund_reason_wap_explain });
}) },
.then(res => { submit() {
uni.showToast({ const refund_reason_wap_explain = trim(this.refund_reason_wap_explain),
title: res.msg, text = this.reason;
icon: "success", if (!text) {
duration: 2000 uni.showToast({
}); title: "请选择退款原因",
setTimeout(() => { icon: 'none',
this.$yrouter.back(); duration: 2000
}, 1500); });
}) return
.catch(err => { }
this.$dialog.error(err.msg||err.response.data.msg); postOrderRefund({
}); text,
} uni: this.orderInfo.orderId,
}, refund_reason_wap_img: this.refund_reason_wap_img.join(","),
mounted() { refund_reason_wap_explain
this.id = this.$yroute.query.id || 0; })
this.getOrderDetail(); .then(res => {
this.getRefundReason(); uni.showToast({
} title: res.msg,
}; icon: "success",
duration: 2000
});
setTimeout(() => {
this.$yrouter.back();
}, 1500);
})
.catch(err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
});
}
},
mounted() {
this.id = this.$yroute.query.id || 0;
this.getOrderDetail();
this.getRefundReason();
}
};
</script> </script>

703
pages/order/Logistics/index.vue

@ -1,350 +1,381 @@
<template> <template>
<div class="logistics"> <view class="logistics">
<div class="header acea-row row-between row-top" v-for="cart in cartInfo" :key="cart.id"> <view class="header acea-row row-between row-top" v-for="cart in cartInfo" :key="cart.id">
<div class="pictrue"> <view class="pictrue">
<img :src="cart.productInfo.image" /> <image :src="cart.productInfo.image" />
</div> </view>
<div class="text acea-row row-between"> <view class="text acea-row row-between">
<div class="name line2">{{ cart.productInfo.store_name }}</div> <view class="name line2">{{ cart.productInfo.store_name }}</view>
<div class="money"> <view class="money">
<div>{{ cart.truePrice }}</div> <view>{{ cart.truePrice }}</view>
<div>x{{ cart.cart_num }}</div> <view>x{{ cart.cart_num }}</view>
</div> </view>
</div> </view>
</div> </view>
<div class="logisticsCon" style="margin-bottom: 5px"> <view class="logisticsCon" style="margin-bottom: 5px">
<div class="company acea-row row-between-wrapper"> <view class="company acea-row row-between-wrapper">
<div class="picTxt acea-row row-between-wrapper"> <view class="picTxt acea-row row-between-wrapper">
<div class="iconfont icon-wuliu"></div> <view class="iconfont icon-wuliu"></view>
<div class="text"> <view class="text">
<div> <view>
<span class="name line1">物流公司</span> <text class="name line1">物流公司</text>
{{ orderInfo.deliveryName }} {{ orderInfo.deliveryName }}
</div> </view>
<div class="express line1"> <view class="express line1">
<span class="name">快递单号</span> <text class="name">快递单号</text>
{{ orderInfo.deliveryId }} {{ orderInfo.deliveryId }}
</div> </view>
</div> </view>
</div> </view>
<div <view class="copy acea-row row-center-wrapper copy-data" @click="copyClipboard(orderInfo.deliveryId)">复制单号</view>
class="copy acea-row row-center-wrapper copy-data" </view>
@click="copyClipboard(orderInfo.deliveryId)" <view class="item" v-for="(express, expressListIndex) in expressList" :key="expressListIndex">
>复制单号</div> <view class="circular" :class="expressListIndex === 0 ? 'on' : ''"></view>
</div> <view class="text">
<div class="item" v-for="(express, expressListIndex) in expressList" :key="expressListIndex"> <view :class="expressListIndex === 0 ? 'font-color-red' : ''">{{ express.status }}</view>
<div class="circular" :class="expressListIndex === 0 ? 'on' : ''"></div> <view class="data">{{ express.time }}</view>
<div class="text"> </view>
<div :class="expressListIndex === 0 ? 'font-color-red' : ''">{{ express.status }}</div> </view>
<div class="data">{{ express.time }}</div> </view>
</div>
</div>
</div>
<!-- 物流进度条 --> <!-- 物流进度条 -->
<div class="div-bg bg-white" style="font-size:12px; background:#fff;"> <view class="div-bg bg-white" style="font-size:12px; background:#fff;">
<!--物流跟踪--> <!--物流跟踪-->
<div style="margin-bottom:5px;"> <view style="margin-bottom:5px;">
<div <view class="bg-white" style="width: 92%; margin-left: 4%;margin: auto;padding-left: 15px;padding-right: 15px;padding-top: 10px">
class="bg-white" <view style="font-size: .26rem;color: #111111; margin: 5px 0">
style="width: 92%; margin-left: 4%;margin: auto;padding-left: 15px;padding-right: 15px;padding-top: 10px" 物流跟踪
> <!--物流跟踪-->
<div style="font-size: .26rem;color: #111111; margin: 5px 0"> </view>
物流跟踪 <view>
<!--物流跟踪--> <view class="track-rcol">
</div> <view class="track-list">
<div> <view>
<div class="track-rcol"> <view v-for="(item,logisticsListindex) in logisticsList" :key="logisticsListindex">
<div class="track-list"> <view class="active" v-if="logisticsListindex===0">
<ul> <view></view>
<div v-for="(item,logisticsListindex) in logisticsList" :key="logisticsListindex"> <i class="node-icon"></i>
<li class="active" v-if="logisticsListindex===0"> <text class="txt">{{item.acceptStation}}</text>
<div></div> <text class="time">{{item.acceptTime}}</text>
<i class="node-icon"></i> </view>
<span class="txt">{{item.acceptStation}}</span> <view v-if="logisticsListindex > 0 && logisticsListindex !== logisticsList.length-1">
<span class="time">{{item.acceptTime}}</span> <i class="node-icon"></i>
</li> <text class="txt">{{item.acceptStation}}</text>
<li <text class="time">{{item.acceptTime}}</text>
v-if="logisticsListindex > 0 && logisticsListindex !== logisticsList.length-1" </view>
> <view v-if="logisticsListindex === logisticsList.length-1" class="finall">
<i class="node-icon"></i> <i class="div-spilander"></i>
<span class="txt">{{item.acceptStation}}</span> <i class="node-icon"></i>
<span class="time">{{item.acceptTime}}</span> <text class="txt">{{item.acceptStation}}</text>
</li> <text class="time">{{item.acceptTime}}</text>
<li v-if="logisticsListindex === logisticsList.length-1" class="finall"> </view>
<i class="div-spilander"></i> </view>
<i class="node-icon"></i> </view>
<span class="txt">{{item.acceptStation}}</span> </view>
<span class="time">{{item.acceptTime}}</span> </view>
</li> </view>
</div> </view>
</ul> </view>
</div> </view>
</div>
</div>
</div>
</div>
</div>
<div class="no-express" v-if="loaded && !expressList.length"> <view class="no-express" v-if="loaded && !expressList.length">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noExpress.png'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/noExpress.png'" />
</div> </view>
<Recommend></Recommend> <Recommend></Recommend>
</div> </view>
</template> </template>
<script> <script>
import Recommend from "@/components/Recommend"; import Recommend from "@/components/Recommend";
import { express, orderDetail } from "@/api/order"; import {
import { copyClipboard } from "@/utils"; express,
orderDetail
} from "@/api/order";
import {
copyClipboard
} from "@/utils";
const NAME = "Logistics"; const NAME = "Logistics";
export default { export default {
name: NAME, name: NAME,
components: { components: {
Recommend Recommend
}, },
data: function() { data: function() {
return { return {
id: "", id: "",
cartInfo: [], cartInfo: [],
orderInfo: {}, orderInfo: {},
expressList: [], expressList: [],
loaded: false, loaded: false,
logisticsList: [ logisticsList: [{
{ message: "暂无数据",
message: "暂无数据", messageDate: ""
messageDate: "" }]
} };
] },
}; watch: {
}, $yroute(n) {
watch: { if (n.name === NAME && this.$yroute.query.id !== this.id) {
$yroute(n) { this.id = this.$yroute.query.id;
if (n.name === NAME && this.$yroute.query.id !== this.id) { this.getExpress();
this.id = this.$yroute.query.id; }
this.getExpress(); }
} },
} mounted: function() {
}, this.id = this.$yroute.query.id;
mounted: function() { this.getExpress();
this.id = this.$yroute.query.id; },
this.getExpress(); methods: {
}, copyClipboard,
methods: { getExpressInfo() {
copyClipboard, let params = {
getExpressInfo() { orderCode: this.id,
let params = { shipperCode: this.orderInfo.deliverySn,
orderCode: this.id, logisticCode: this.orderInfo.deliveryId
shipperCode: this.orderInfo.deliverySn, };
logisticCode: this.orderInfo.deliveryId express(params)
}; .then(res => {
express(params) this.logisticsList = res.data.traces.reverse();
.then(res => { })
this.logisticsList = res.data.traces.reverse(); .catch(err => {
}) uni.showToast({
.catch(err => { title: err.msg || err.response.data.msg,
this.$dialog.error(err.response.data.msg || "加载失败"); icon: 'none',
}); duration: 2000
}, });
getExpress() { });
if (!this.id) return this.$dialog.error("订单不存在"); },
this.loaded = false; getExpress() {
orderDetail(this.id) if (!this.id) {
.then(res => { uni.showToast({
this.orderInfo = { title: err.msg || err.response.data.msg,
deliveryId: res.data.deliveryId, icon: 'none',
deliveryName: res.data.deliveryName, duration: 2000
deliverySn: res.data.deliverySn });
}; return
this.getExpressInfo(); }
// const result = res.data.express.result || {}; this.loaded = false;
// this.cartInfo = res.data.order.cartInfo; orderDetail(this.id)
// this.expressList = result.list || []; .then(res => {
// this.loaded = true; this.orderInfo = {
deliveryId: res.data.deliveryId,
deliveryName: res.data.deliveryName,
deliverySn: res.data.deliverySn
};
this.getExpressInfo();
// const result = res.data.express.result || {};
// this.cartInfo = res.data.order.cartInfo;
// this.expressList = result.list || [];
// this.loaded = true;
}) })
.catch(err => { .catch(err => {
this.$dialog.error(err.response.data.msg || "加载失败"); uni.showToast({
}); title: err.msg || err.response.data.msg,
} icon: 'none',
} duration: 2000
}; });
});
}
}
};
</script> </script>
<style scoped> <style scoped>
.no-express { .no-express {
margin: 1.5rem 0; margin: 1.5rem 0;
} }
.no-express img { .no-express image {
width: 6rem; width: 6rem;
margin: 0 auto; margin: 0 auto;
display: block; display: block;
} }
.message-text {
font-family: MicrosoftYaHei;
font-size: 1rem;
font-weight: normal;
font-stretch: normal;
line-height: 3rem;
letter-spacing: 0rem;
color: #333333;
width: 50%;
}
.fontblack {
color: #999999;
}
.img2 {
width: 0.81rem;
height: 0.8rem;
float: right;
}
.addressshow2 {
height: auto;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
width: 75%;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
white-space: normal;
word-wrap: break-word;
word-break: break-all;
font-size: 1rem;
}
.addressshow1 {
height: auto;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
width: 75%;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
white-space: normal;
word-wrap: break-word;
word-break: break-all;
font-size: 1rem;
}
.orderTitle {
font-size: 1rem;
color: #333333;
height: auto;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
white-space: normal;
word-wrap: break-word;
word-break: break-all;
height: 2.5rem;
}
.orderDetail {
font-size: 0.26rem;
color: #666666;
text-align: left;
}
.border-ceter {
width: 92%;
padding-left: 15px;
padding-right: 15px;
}
.pay-button {
width: 88%;
height: 2.6rem;
position: relative;
background-color: red;
color: white;
margin-left: 6%; .message-text {
} font-family: MicrosoftYaHei;
ul li { font-size: 1rem;
list-style: none; font-weight: normal;
font-size: 0.24rem; font-stretch: normal;
} line-height: 3rem;
ul { letter-spacing: 0rem;
} color: #333333;
.track-rcol { width: 50%;
} }
.track-list {
position: relative; .fontblack {
} color: #999999;
.track-list li { }
position: relative;
padding: 0 0 0.5rem 5px; .img2 {
line-height: 0.3rem; width: 0.81rem;
border-left: 1px solid #d9d9d9; height: 0.8rem;
color: #999; float: right;
} }
.track-list li.first {
color: red; .addressshow2 {
padding-top: 0; height: auto;
width: 100%; overflow: hidden;
text-align: left; text-overflow: ellipsis;
border-left: 1px solid #d9d9d9; display: -webkit-box;
} width: 75%;
.track-list li .node-icon { -webkit-line-clamp: 2;
position: absolute; -webkit-box-orient: vertical;
left: -6.5px; white-space: normal;
border-radius: 50%; word-wrap: break-word;
width: 0.2rem; word-break: break-all;
height: 0.2rem; font-size: 1rem;
top: 4px; }
background-color: #b2b2b2;
} .addressshow1 {
.track-list li.active .node-icon { height: auto;
background-position: 0-72px; overflow: hidden;
background-color: #ea7c0a; text-overflow: ellipsis;
width: 0.3rem; display: -webkit-box;
z-index: 2; width: 75%;
height: 0.3rem; -webkit-line-clamp: 1;
position: absolute; -webkit-box-orient: vertical;
left: -0.19rem; white-space: normal;
top: 0; word-wrap: break-word;
border-radius: 50%; word-break: break-all;
} font-size: 1rem;
.track-list li .time { }
margin-right: 20px;
position: relative; .orderTitle {
top: 4px; font-size: 1rem;
display: inline-block; color: #333333;
vertical-align: middle; height: auto;
color: #999; overflow: hidden;
width: 100%; text-overflow: ellipsis;
text-align: left; display: -webkit-box;
} -webkit-line-clamp: 2;
.track-list li .txt { -webkit-box-orient: vertical;
position: relative; white-space: normal;
display: inline-block; word-wrap: break-word;
vertical-align: top; word-break: break-all;
color: #999; height: 2.5rem;
left: 0.2rem; }
top: 0.04rem;
} .orderDetail {
.track-list li.first .time { font-size: 0.26rem;
text-align: left; color: #666666;
width: 94%; text-align: left;
color: red; }
}
.track-list li.first .txt { .border-ceter {
color: red; width: 92%;
text-align: left; padding-left: 15px;
width: 94%; padding-right: 15px;
} }
.track-list li.finall {
position: relative; .pay-button {
padding: 0px 0 0.5rem 5px; width: 88%;
line-height: 18px; height: 2.6rem;
border-color: white; position: relative;
border-left: 1px solid #ffffff; background-color: red;
color: #999; color: white;
}
.track-list li.finall .div-spilander { margin-left: 6%;
width: 1px; }
position: absolute;
left: -1.5px; ul view {
height: 0.5rem; list-style: none;
background-color: #d9d9d9; font-size: 0.24rem;
} }
ul {}
.track-rcol {}
.track-list {
position: relative;
}
.track-list view {
position: relative;
padding: 0 0 0.5rem 5px;
line-height: 0.3rem;
border-left: 1px solid #d9d9d9;
color: #999;
}
.track-list view.first {
color: red;
padding-top: 0;
width: 100%;
text-align: left;
border-left: 1px solid #d9d9d9;
}
.track-list view.node-icon {
position: absolute;
left: -6.5px;
border-radius: 50%;
width: 0.2rem;
height: 0.2rem;
top: 4px;
background-color: #b2b2b2;
}
.track-list view.active .node-icon {
background-position: 0-72px;
background-color: #ea7c0a;
width: 0.3rem;
z-index: 2;
height: 0.3rem;
position: absolute;
left: -0.19rem;
top: 0;
border-radius: 50%;
}
.track-list view.time {
margin-right: 20px;
position: relative;
top: 4px;
display: inline-block;
vertical-align: middle;
color: #999;
width: 100%;
text-align: left;
}
.track-list view.txt {
position: relative;
display: inline-block;
vertical-align: top;
color: #999;
left: 0.2rem;
top: 0.04rem;
}
.track-list view.first .time {
text-align: left;
width: 94%;
color: red;
}
.track-list view.first .txt {
color: red;
text-align: left;
width: 94%;
}
.track-list view.finall {
position: relative;
padding: 0px 0 0.5rem 5px;
line-height: 18px;
border-color: white;
border-left: 1px solid #ffffff;
color: #999;
}
.track-list view.finall .div-spilander {
width: 1px;
position: absolute;
left: -1.5px;
height: 0.5rem;
background-color: #d9d9d9;
}
</style> </style>

172
pages/order/MyOrder/index.vue

@ -1,60 +1,60 @@
<template> <template>
<div class="my-order" ref="container"> <view class="my-order" ref="container">
<div class="header bg-color-red"> <view class="header bg-color-red">
<div class="picTxt acea-row row-between-wrapper"> <view class="picTxt acea-row row-between-wrapper">
<div class="text"> <view class="text">
<div class="name">订单信息</div> <view class="name">订单信息</view>
<div> <view>
累计订单{{ orderData.orderCount || 0 }} 总消费{{ 累计订单{{ orderData.orderCount || 0 }} 总消费{{
orderData.sumPrice || 0 orderData.sumPrice || 0
}} }}
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<div class="nav acea-row row-around"> <view class="nav acea-row row-around">
<div class="item" :class="{ on: type === 0 }" @click="changeType(0)"> <view class="item" :class="{ on: type === 0 }" @click="changeType(0)">
<div>待付款</div> <view>待付款</view>
<div class="num">{{ orderData.unpaidCount || 0 }}</div> <view class="num">{{ orderData.unpaidCount || 0 }}</view>
</div> </view>
<div class="item" :class="{ on: type === 1 }" @click="changeType(1)"> <view class="item" :class="{ on: type === 1 }" @click="changeType(1)">
<div>待发货</div> <view>待发货</view>
<div class="num">{{ orderData.unshippedCount || 0 }}</div> <view class="num">{{ orderData.unshippedCount || 0 }}</view>
</div> </view>
<div class="item" :class="{ on: type === 2 }" @click="changeType(2)"> <view class="item" :class="{ on: type === 2 }" @click="changeType(2)">
<div>待收货</div> <view>待收货</view>
<div class="num">{{ orderData.receivedCount || 0 }}</div> <view class="num">{{ orderData.receivedCount || 0 }}</view>
</div> </view>
<div class="item" :class="{ on: type === 3 }" @click="changeType(3)"> <view class="item" :class="{ on: type === 3 }" @click="changeType(3)">
<div>待评价</div> <view>待评价</view>
<div class="num">{{ orderData.evaluatedCount || 0 }}</div> <view class="num">{{ orderData.evaluatedCount || 0 }}</view>
</div> </view>
<div class="item" :class="{ on: type === 4 }" @click="changeType(4)"> <view class="item" :class="{ on: type === 4 }" @click="changeType(4)">
<div>已完成</div> <view>已完成</view>
<div class="num">{{ orderData.completeCount || 0 }}</div> <view class="num">{{ orderData.completeCount || 0 }}</view>
</div> </view>
</div> </view>
<div class="list"> <view class="list">
<div class="item" v-for="(order,orderListIndex) in orderList" :key="orderListIndex"> <view class="item" v-for="(order,orderListIndex) in orderList" :key="orderListIndex">
<div class="title acea-row row-between-wrapper"> <view class="title acea-row row-between-wrapper">
<div class="acea-row row-middle"> <view class="acea-row row-middle">
<span <text
class="sign cart-color acea-row row-center-wrapper" class="sign cart-color acea-row row-center-wrapper"
v-if="order.combinationId > 0" v-if="order.combinationId > 0"
>拼团</span> >拼团</text>
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.seckillId > 0">秒杀</span> <text class="sign cart-color acea-row row-center-wrapper" v-if="order.seckillId > 0">秒杀</text>
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.bargainId > 0">砍价</span> <text class="sign cart-color acea-row row-center-wrapper" v-if="order.bargainId > 0">砍价</text>
<data-format :data="order.addTime"></data-format> <data-format :data="order.addTime"></data-format>
</div> </view>
<div class="font-color-red">{{ getStatus(order) }}</div> <view class="font-color-red">{{ getStatus(order) }}</view>
</div> </view>
<div @click="goOrderDetails(order)"> <view @click="goOrderDetails(order)">
<div <view
class="item-info acea-row row-between row-top" class="item-info acea-row row-between row-top"
v-for="(cart,cartInfoIndex) in order.cartInfo" v-for="(cart,cartInfoIndex) in order.cartInfo"
:key="cartInfoIndex" :key="cartInfoIndex"
> >
<div class="pictrue"> <view class="pictrue">
<img <img
:src="cart.productInfo.image" :src="cart.productInfo.image"
@click.stop=" @click.stop="
@ -89,53 +89,53 @@
" "
v-else-if="cart.seckillId > 0" v-else-if="cart.seckillId > 0"
/> />
</div> </view>
<div class="text acea-row row-between"> <view class="text acea-row row-between">
<div class="name line2">{{ cart.productInfo.storeName }}</div> <view class="name line2">{{ cart.productInfo.storeName }}</view>
<div class="money"> <view class="money">
<div> <view>
{{ {{
cart.productInfo.attrInfo cart.productInfo.attrInfo
? cart.productInfo.attrInfo.price ? cart.productInfo.attrInfo.price
: cart.productInfo.price : cart.productInfo.price
}} }}
</div> </view>
<div>x{{ cart.cartNum }}</div> <view>x{{ cart.cartNum }}</view>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<div class="totalPrice"> <view class="totalPrice">
{{ order.cartInfo.length || 0 }}件商品总金额 {{ order.cartInfo.length || 0 }}件商品总金额
<span <text
class="money font-color-red" class="money font-color-red"
>{{ order.payPrice }}</span> >{{ order.payPrice }}</text>
</div> </view>
<div class="bottom acea-row row-right row-middle"> <view class="bottom acea-row row-right row-middle">
<template v-if="order._status._type == 0"> <template v-if="order._status._type == 0">
<div class="bnt cancelBnt" @click="cancelOrder(order)">取消订单</div> <view class="bnt cancelBnt" @click="cancelOrder(order)">取消订单</view>
<div <view
class="bnt bg-color-red" class="bnt bg-color-red"
@click="goOrderDetails(order)" @click="goOrderDetails(order)"
>立即付款</div> >立即付款</view>
</template> </template>
<template v-if="order._status._type == 1 || order._status._type == 9"> <template v-if="order._status._type == 1 || order._status._type == 9">
<div <view
class="bnt bg-color-red" class="bnt bg-color-red"
@click="goOrderDetails(order)" @click="goOrderDetails(order)"
>查看详情</div> >查看详情</view>
</template> </template>
<template v-if="order._status._type == 2"> <template v-if="order._status._type == 2">
<div <view
class="bnt default" class="bnt default"
@click=" @click="
$yrouter.push({ path: '/pages/order/Logistics/index',query:{id:order.orderId}}) $yrouter.push({ path: '/pages/order/Logistics/index',query:{id:order.orderId}})
" "
>查看物流</div> >查看物流</view>
<div class="bnt bg-color-red" @click="takeOrder(order)">确认收货</div> <view class="bnt bg-color-red" @click="takeOrder(order)">确认收货</view>
</template> </template>
<template v-if="order._status._type == 3"> <template v-if="order._status._type == 3">
<!--<div--> <!--<view-->
<!--class="bnt default"--> <!--class="bnt default"-->
<!--@click="--> <!--@click="-->
<!--$yrouter.push({ path: '/pages/order/Logistics/index',query:{id:order.orderId}})--> <!--$yrouter.push({ path: '/pages/order/Logistics/index',query:{id:order.orderId}})-->
@ -143,29 +143,29 @@
<!--v-if="order.deliveryType == 'express'"--> <!--v-if="order.deliveryType == 'express'"-->
<!--&gt;--> <!--&gt;-->
<!--查看物流--> <!--查看物流-->
<!--</div>--> <!--</view>-->
<div <view
class="bnt bg-color-red" class="bnt bg-color-red"
@click="goOrderDetails(order)" @click="goOrderDetails(order)"
>去评价</div> >去评价</view>
</template> </template>
<template v-if="order._status._type === 4"> <template v-if="order._status._type === 4">
<div <view
class="bnt bg-color-red" class="bnt bg-color-red"
@click="goOrderDetails(order)" @click="goOrderDetails(order)"
>查看订单</div> >查看订单</view>
</template> </template>
</div> </view>
</div> </view>
</div> </view>
<div class="noCart" v-if="orderList.length === 0 && page > 1"> <view class="noCart" v-if="orderList.length === 0 && page > 1">
<div class="pictrue"> <view class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noOrder.png'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/noOrder.png'" />
</div> </view>
</div> </view>
<Loading :loaded="loaded" :loading="loading"></Loading> <Loading :loaded="loaded" :loading="loading"></Loading>
<Payment v-model="pay" :types="payType" @checked="toPay" :balance="userInfo.nowMoney"></Payment> <Payment v-model="pay" :types="payType" @checked="toPay" :balance="userInfo.nowMoney"></Payment>
</div> </view>
</template> </template>
<script> <script>
import { getOrderData, getOrderList } from "@/api/order"; import { getOrderData, getOrderList } from "@/api/order";
@ -344,7 +344,7 @@ export default {
margin: 0.7rem auto 0.5rem auto; margin: 0.7rem auto 0.5rem auto;
} }
.noCart .pictrue img { .noCart .pictrue image{
width: 100%; width: 100%;
height: 100%; height: 100%;
} }

1189
pages/order/OrderDetails/index.vue

File diff suppressed because it is too large Load Diff

1062
pages/order/OrderSubmission/index.vue

File diff suppressed because it is too large Load Diff

56
pages/order/PaymentStatus/index.vue

@ -1,34 +1,34 @@
<template> <template>
<div class="payment-status"> <view class="payment-status">
<!--失败时 用icon-iconfontguanbi fail替换icon-duihao2 bg-color-red--> <!--失败时 用icon-iconfontguanbi fail替换icon-duihao2 bg-color-red-->
<div class="iconfont icon-duihao2 bg-color-red"></div> <view class="iconfont icon-duihao2 bg-color-red"></view>
<!-- 失败时订单支付失败 --> <!-- 失败时订单支付失败 -->
<div class="status">订单支付成功</div> <view class="status">订单支付成功</view>
<div class="wrapper"> <view class="wrapper">
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div>订单编号</div> <view>订单编号</view>
<div class="itemCom">wx3265361456134568</div> <view class="itemCom">wx3265361456134568</view>
</div> </view>
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div>下单时间</div> <view>下单时间</view>
<div class="itemCom">2019-01-09 18:05</div> <view class="itemCom">2019-01-09 18:05</view>
</div> </view>
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div>支付方式</div> <view>支付方式</view>
<div class="itemCom">微信支付</div> <view class="itemCom">微信支付</view>
</div> </view>
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div>支付金额</div> <view>支付金额</view>
<div class="itemCom">2222.00</div> <view class="itemCom">2222.00</view>
</div> </view>
<!--失败时加上这个 --> <!--失败时加上这个 -->
<!--<div class='item acea-row row-between-wrapper'>--> <!--<view class='item acea-row row-between-wrapper'>-->
<!--<div>失败原因</div>--> <!--<view>失败原因</view>-->
<!--<div class='itemCom'>账户余额不足</div>--> <!--<view class='itemCom'>账户余额不足</view>-->
<!--</div>--> <!--</view>-->
</div> </view>
<!--失败时 重新购买 --> <!--失败时 重新购买 -->
<div class="returnBnt bg-color-red">返回查看订单</div> <view class="returnBnt bg-color-red">返回查看订单</view>
<div class="returnBnt cart-color">返回首页</div> <view class="returnBnt cart-color">返回首页</view>
</div> </view>
</template> </template>

62
pages/order/ReturnList/index.vue

@ -1,45 +1,45 @@
<template> <template>
<div class="return-list" ref="container"> <view class="return-list" ref="container">
<div class="goodWrapper" v-for="(order,orderListIndex) in orderList" :key="orderListIndex"> <view class="goodWrapper" v-for="(order,orderListIndex) in orderList" :key="orderListIndex">
<div class="iconfont icon-tuikuanzhong powder" v-if="order._status._type === -1"></div> <view class="iconfont icon-tuikuanzhong powder" v-if="order._status._type === -1"></view>
<div class="iconfont icon-yituikuan" v-if="order._status._type === -2"></div> <view class="iconfont icon-yituikuan" v-if="order._status._type === -2"></view>
<div class="orderNum">订单号{{ order.orderId }}</div> <view class="orderNum">订单号{{ order.orderId }}</view>
<div <view
class="item acea-row row-between-wrapper" class="item acea-row row-between-wrapper"
v-for="(cart,cartInfoIndex) in order.cartInfo" v-for="(cart,cartInfoIndex) in order.cartInfo"
:key="cartInfoIndex" :key="cartInfoIndex"
@click="goOrderDetails(order)" @click="goOrderDetails(order)"
> >
<div class="pictrue"> <view class="pictrue">
<img :src="cart.productInfo.image" class="image" @click.stop="goGoodsCon(cart)" /> <image :src="cart.productInfo.image" class="image" @click.stop="goGoodsCon(cart)" />
</div> </view>
<div class="text"> <view class="text">
<div class="acea-row row-between-wrapper"> <view class="acea-row row-between-wrapper">
<div class="name line1">{{ cart.productInfo.storeName }}</div> <view class="name line1">{{ cart.productInfo.storeName }}</view>
<div class="num">x {{ cart.cartNum }}</div> <view class="num">x {{ cart.cartNum }}</view>
</div> </view>
<div <view
class="attr line1" class="attr line1"
v-if="cart.productInfo.attrInfo" v-if="cart.productInfo.attrInfo"
>{{ cart.productInfo.attrInfo.suk }}</div> >{{ cart.productInfo.attrInfo.suk }}</view>
<div class="attr line1" v-else>{{ cart.productInfo.storeName }}</div> <view class="attr line1" v-else>{{ cart.productInfo.storeName }}</view>
<div class="money">{{ cart.productInfo.price }}</div> <view class="money">{{ cart.productInfo.price }}</view>
</div> </view>
</div> </view>
<div class="totalSum"> <view class="totalSum">
{{ order.cartInfo.length || 0 }}件商品总金额 {{ order.cartInfo.length || 0 }}件商品总金额
<span <text
class="font-color-red price" class="font-color-red price"
>{{ order.payPrice }}</span> >{{ order.payPrice }}</text>
</div> </view>
</div> </view>
<div class="noCart" v-if="orderList.length === 0 && page > 1"> <view class="noCart" v-if="orderList.length === 0 && page > 1">
<div class="pictrue"> <view class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noOrder.png'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/noOrder.png'" />
</div> </view>
</div> </view>
<Loading :loaded="loaded" :loading="loading"></Loading> <Loading :loaded="loaded" :loading="loading"></Loading>
</div> </view>
</template> </template>
<script> <script>

222
pages/orderAdmin/AdminOrder/index.vue

@ -1,141 +1,141 @@
<template> <template>
<div class="order-details pos-order-details"> <view class="order-details pos-order-details">
<div class="header acea-row row-middle"> <view class="header acea-row row-middle">
<div class="state">{{ title }}</div> <view class="state">{{ title }}</view>
<div class="data"> <view class="data">
<div class="order-num">订单{{ orderInfo.orderId }}</div> <view class="order-num">订单{{ orderInfo.orderId }}</view>
<div> <view>
<span class="time"> <text class="time">
<data-format :data="orderInfo.addTime"></data-format> <data-format :data="orderInfo.addTime"></data-format>
</span> </text>
</div> </view>
</div> </view>
</div> </view>
<div class="orderingUser acea-row row-middle">{{ orderInfo.nickname }}</div> <view class="orderingUser acea-row row-middle">{{ orderInfo.nickname }}</view>
<div class="address"> <view class="address">
<div class="name"> <view class="name">
{{ orderInfo.realName}} {{ orderInfo.realName}}
<span class="phone">{{ orderInfo.userPhone }}</span> <text class="phone">{{ orderInfo.userPhone }}</text>
</div> </view>
<div>{{ orderInfo.userAddress }}</div> <view>{{ orderInfo.userAddress }}</view>
</div> </view>
<div class="line"> <view class="line">
<img :src="$VUE_APP_RESOURCES_URL+'/images/line.jpg'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/line.jpg'" />
</div> </view>
<div class="pos-order-goods"> <view class="pos-order-goods">
<div <view
class="goods acea-row row-between-wrapper" class="goods acea-row row-between-wrapper"
v-for="(item, orderInfoIndex) in orderInfo.cartInfo" v-for="(item, orderInfoIndex) in orderInfo.cartInfo"
:key="orderInfoIndex" :key="orderInfoIndex"
> >
<div class="picTxt acea-row row-between-wrapper"> <view class="picTxt acea-row row-between-wrapper">
<div class="pictrue"> <view class="pictrue">
<img :src="item.productInfo.image" /> <image :src="item.productInfo.image" />
</div> </view>
<div class="text acea-row row-between row-column"> <view class="text acea-row row-between row-column">
<div class="info line2">{{ item.productInfo.storeName }}</div> <view class="info line2">{{ item.productInfo.storeName }}</view>
<div class="attr">{{ item.productInfo.suk }}</div> <view class="attr">{{ item.productInfo.suk }}</view>
</div> </view>
</div> </view>
<div class="money"> <view class="money">
<div class="x-money">{{ item.productInfo.price }}</div> <view class="x-money">{{ item.productInfo.price }}</view>
<div class="num">x{{ item.cartNum }}</div> <view class="num">x{{ item.cartNum }}</view>
<div class="y-money">{{ item.productInfo.otPrice ? item.productInfo.otPrice : 0 }}</div> <view class="y-money">{{ item.productInfo.otPrice ? item.productInfo.otPrice : 0 }}</view>
</div> </view>
</div> </view>
</div> </view>
<div class="public-total"> <view class="public-total">
{{ orderInfo.totalNum }}件商品应支付 {{ orderInfo.totalNum }}件商品应支付
<span class="money">{{ orderInfo.payPrice }}</span> <text class="money">{{ orderInfo.payPrice }}</text>
( 邮费 ¥{{ ( 邮费 ¥{{
orderInfo.payPostage orderInfo.payPostage
}} }}
) )
</div> </view>
<div class="wrapper"> <view class="wrapper">
<div class="item acea-row row-between"> <view class="item acea-row row-between">
<div>订单编号</div> <view>订单编号</view>
<div class="conter acea-row row-middle row-right"> <view class="conter acea-row row-middle row-right">
{{ orderInfo.orderId {{ orderInfo.orderId
}} }}
<span <text
class="copy copy-data" class="copy copy-data"
@click="copyClipboard(orderInfo.orderId)" @click="copyClipboard(orderInfo.orderId)"
>复制</span> >复制</text>
</div> </view>
</div> </view>
<div class="item acea-row row-between"> <view class="item acea-row row-between">
<div>下单时间</div> <view>下单时间</view>
<div class="conter"> <view class="conter">
<data-format :data="orderInfo.addTime"></data-format> <data-format :data="orderInfo.addTime"></data-format>
</div> </view>
</div> </view>
<div class="item acea-row row-between"> <view class="item acea-row row-between">
<div>支付状态</div> <view>支付状态</view>
<div class="conter">{{ orderInfo.paid == 1 ? "已支付" : "未支付" }}</div> <view class="conter">{{ orderInfo.paid == 1 ? "已支付" : "未支付" }}</view>
</div> </view>
<div class="item acea-row row-between"> <view class="item acea-row row-between">
<div>支付方式</div> <view>支付方式</view>
<div class="conter">{{ payType }}</div> <view class="conter">{{ payType }}</view>
</div> </view>
<div class="item acea-row row-between"> <view class="item acea-row row-between">
<div>买家留言</div> <view>买家留言</view>
<div class="conter">{{ orderInfo.mark }}</div> <view class="conter">{{ orderInfo.mark }}</view>
</div> </view>
</div> </view>
<div class="wrapper"> <view class="wrapper">
<div class="item acea-row row-between"> <view class="item acea-row row-between">
<div>支付金额</div> <view>支付金额</view>
<div class="conter">{{ orderInfo.totalPrice }}</div> <view class="conter">{{ orderInfo.totalPrice }}</view>
</div> </view>
<div class="item acea-row row-between"> <view class="item acea-row row-between">
<div>优惠券抵扣</div> <view>优惠券抵扣</view>
<div class="conter">-{{ orderInfo.couponPrice }}</div> <view class="conter">-{{ orderInfo.couponPrice }}</view>
</div> </view>
<div class="actualPay acea-row row-right"> <view class="actualPay acea-row row-right">
实付款 实付款
<span class="money font-color-red">{{ orderInfo.payPrice }}</span> <text class="money font-color-red">{{ orderInfo.payPrice }}</text>
</div> </view>
</div> </view>
<div <view
class="wrapper" class="wrapper"
v-if="orderInfo.delivery_type != 'fictitious' && orderInfo._status._type === 2" v-if="orderInfo.delivery_type != 'fictitious' && orderInfo._status._type === 2"
> >
<div class="item acea-row row-between"> <view class="item acea-row row-between">
<div>配送方式</div> <view>配送方式</view>
<div class="conter" v-if="orderInfo.delivery_type === 'express'">快递</div> <view class="conter" v-if="orderInfo.delivery_type === 'express'">快递</view>
<div class="conter" v-if="orderInfo.delivery_type === 'send'">送货</div> <view class="conter" v-if="orderInfo.delivery_type === 'send'">送货</view>
</div> </view>
<div class="item acea-row row-between"> <view class="item acea-row row-between">
<div v-if="orderInfo.delivery_type === 'express'">快递公司</div> <view v-if="orderInfo.delivery_type === 'express'">快递公司</view>
<div v-if="orderInfo.delivery_type === 'send'">送货人</div> <view v-if="orderInfo.delivery_type === 'send'">送货人</view>
<div class="conter">{{ orderInfo.delivery_name }}</div> <view class="conter">{{ orderInfo.delivery_name }}</view>
</div> </view>
<div class="item acea-row row-between"> <view class="item acea-row row-between">
<div v-if="orderInfo.delivery_type === 'express'">快递单号</div> <view v-if="orderInfo.delivery_type === 'express'">快递单号</view>
<div v-if="orderInfo.delivery_type === 'send'">送货人电话</div> <view v-if="orderInfo.delivery_type === 'send'">送货人电话</view>
<div class="conter"> <view class="conter">
{{ orderInfo.delivery_id {{ orderInfo.delivery_id
}} }}
<span <text
class="copy copy-data" class="copy copy-data"
@click="copyClipboard(orderInfo.delivery_id)" @click="copyClipboard(orderInfo.delivery_id)"
>复制</span> >复制</text>
</div> </view>
</div> </view>
</div> </view>
<div style="height:100rpx;"></div> <view style="height:100rpx;"></view>
<div class="footer acea-row row-right row-middle"> <view class="footer acea-row row-right row-middle">
<div class="more"></div> <view class="more"></view>
<div class="bnt cancel" @click="modify(0)" v-if="types == 0">一键改价</div> <view class="bnt cancel" @click="modify(0)" v-if="types == 0">一键改价</view>
<div class="bnt cancel" @click="modify(0)" v-if="types == -1">立即退款</div> <view class="bnt cancel" @click="modify(0)" v-if="types == -1">立即退款</view>
<div <view
class="bnt cancel" class="bnt cancel"
v-if="orderInfo.pay_type === 'offline' && orderInfo.paid === 0" v-if="orderInfo.pay_type === 'offline' && orderInfo.paid === 0"
@click="offlinePay" @click="offlinePay"
>确认付款</div> >确认付款</view>
<div class="bnt delivery" v-if="types == 1" @click="goGoodsDeliver(orderInfo)">去发货</div> <view class="bnt delivery" v-if="types == 1" @click="goGoodsDeliver(orderInfo)">去发货</view>
</div> </view>
<PriceChange <PriceChange
:change="change" :change="change"
:orderInfo="orderInfo" :orderInfo="orderInfo"
@ -143,7 +143,7 @@
v-on:savePrice="savePrice" v-on:savePrice="savePrice"
:status="status" :status="status"
></PriceChange> ></PriceChange>
</div> </view>
</template> </template>
<script> <script>
import PriceChange from "@/components/PriceChange"; import PriceChange from "@/components/PriceChange";

630
pages/orderAdmin/AdminOrderList/index.vue

@ -1,317 +1,329 @@
<template> <template>
<div class="pos-order-list" ref="container"> <view class="pos-order-list" ref="container">
<div class="nav acea-row row-around row-middle"> <view class="nav acea-row row-around row-middle">
<div class="item" :class="where.status == 0 ? 'on' : ''" @click="changeStatus(0)">待付款</div> <view class="item" :class="where.status == 0 ? 'on' : ''" @click="changeStatus(0)">待付款</view>
<div class="item" :class="where.status == 1 ? 'on' : ''" @click="changeStatus(1)">待发货</div> <view class="item" :class="where.status == 1 ? 'on' : ''" @click="changeStatus(1)">待发货</view>
<div class="item" :class="where.status == 2 ? 'on' : ''" @click="changeStatus(2)">待收货</div> <view class="item" :class="where.status == 2 ? 'on' : ''" @click="changeStatus(2)">待收货</view>
<div class="item" :class="where.status == 3 ? 'on' : ''" @click="changeStatus(3)">待评价</div> <view class="item" :class="where.status == 3 ? 'on' : ''" @click="changeStatus(3)">待评价</view>
<div class="item" :class="where.status == 4 ? 'on' : ''" @click="changeStatus(4)">已完成</div> <view class="item" :class="where.status == 4 ? 'on' : ''" @click="changeStatus(4)">已完成</view>
<div class="item" :class="where.status == -3 ? 'on' : ''" @click="changeStatus(-3)">退款</div> <view class="item" :class="where.status == -3 ? 'on' : ''" @click="changeStatus(-3)">退款</view>
</div> </view>
<div class="list"> <view class="list">
<div class="item" v-for="(item, listIndex) in list" :key="listIndex"> <view class="item" v-for="(item, listIndex) in list" :key="listIndex">
<div class="order-num acea-row row-middle" @click="toDetail(item)"> <view class="order-num acea-row row-middle" @click="toDetail(item)">
<span>订单号{{ item.orderId }}</span> <text>订单号{{ item.orderId }}</text>
<span class="time"> <text class="time">
<span>下单时间</span> <text>下单时间</text>
<data-format :data="item.addTime"></data-format> <data-format :data="item.addTime"></data-format>
</span> </text>
</div> </view>
<div class="pos-order-goods" v-for="(val, key) in item.cartInfo" :key="key"> <view class="pos-order-goods" v-for="(val, key) in item.cartInfo" :key="key">
<div class="goods acea-row row-between-wrapper" @click="toDetail(item)"> <view class="goods acea-row row-between-wrapper" @click="toDetail(item)">
<div class="picTxt acea-row row-between-wrapper"> <view class="picTxt acea-row row-between-wrapper">
<div class="pictrue"> <view class="pictrue">
<img :src="val.productInfo.image" /> <image :src="val.productInfo.image" />
</div> </view>
<div class="text acea-row row-between row-column"> <view class="text acea-row row-between row-column">
<div class="info line2">{{ val.productInfo.storeName }}</div> <view class="info line2">{{ val.productInfo.storeName }}</view>
<div class="attr" v-if="val.productInfo.suk">{{ val.productInfo.suk }}</div> <view class="attr" v-if="val.productInfo.suk">{{ val.productInfo.suk }}</view>
</div> </view>
</div> </view>
<div class="money"> <view class="money">
<div class="x-money">{{ val.productInfo.price }}</div> <view class="x-money">{{ val.productInfo.price }}</view>
<div class="num">x{{ val.cartNum }}</div> <view class="num">x{{ val.cartNum }}</view>
<div class="y-money">{{ val.productInfo.otPrice }}</div> <view class="y-money">{{ val.productInfo.otPrice }}</view>
</div> </view>
</div> </view>
</div> </view>
<div class="public-total"> <view class="public-total">
{{ item.totalNum }}件商品应支付 {{ item.totalNum }}件商品应支付
<span class="money">{{ item.payPrice }}</span> <text class="money">{{ item.payPrice }}</text>
( 邮费 ¥{{ ( 邮费 ¥{{
item.totalPostage item.totalPostage
}} }}
) )
</div> </view>
<div class="operation acea-row row-between-wrapper"> <view class="operation acea-row row-between-wrapper">
<div class="more"> <view class="more">
<!-- <div class="iconfont icon-gengduo" @click="more(index)"></div>--> <!-- <view class="iconfont icon-gengduo" @click="more(index)"></view>-->
<!-- <div class="order" v-show="current === index">--> <!-- <view class="order" v-show="current === index">-->
<!-- <div class="items">--> <!-- <view class="items">-->
<!-- {{ where.status > 0 ? "删除" : "取消" }}订单--> <!-- {{ where.status > 0 ? "删除" : "取消" }}订单-->
<!-- </div>--> <!-- </view>-->
<!-- <div class="arrow"></div>--> <!-- <view class="arrow"></view>-->
<!-- </div>--> <!-- </view>-->
</div> </view>
<div class="acea-row row-middle"> <view class="acea-row row-middle">
<div class="bnt" @click="modify(item, 0)" v-if="where.status == 0">一键改价</div> <view class="bnt" @click="modify(item, 0)" v-if="where.status == 0">一键改价</view>
<div <view class="bnt" @click="modify(item, 0)" v-if="where.status == -3 && item.refundStatus === 1">立即退款</view>
class="bnt" <view class="bnt cancel" v-if="item.pay_type === 'offline' && item.paid === 0" @click="offlinePay(item)">确认付款</view>
@click="modify(item, 0)" <view class="bnt" v-if="where.status == 1" @click="goGoodsDeliver(item)">去发货</view>
v-if="where.status == -3 && item.refundStatus === 1" </view>
>立即退款</div> </view>
<div </view>
class="bnt cancel" </view>
v-if="item.pay_type === 'offline' && item.paid === 0" <Loading :loaded="loaded" :loading="loading"></Loading>
@click="offlinePay(item)" <PriceChange :change="change" :orderInfo="orderInfo" v-on:closechange="changeclose($event)" v-on:savePrice="savePrice"
>确认付款</div> :status="status"></PriceChange>
<div class="bnt" v-if="where.status == 1" @click="goGoodsDeliver(item)">去发货</div> </view>
</div>
</div>
</div>
</div>
<Loading :loaded="loaded" :loading="loading"></Loading>
<PriceChange
:change="change"
:orderInfo="orderInfo"
v-on:closechange="changeclose($event)"
v-on:savePrice="savePrice"
:status="status"
></PriceChange>
</div>
</template> </template>
<script> <script>
import PriceChange from "@/components/PriceChange"; import PriceChange from "@/components/PriceChange";
import Loading from "@/components/Loading"; import Loading from "@/components/Loading";
import DataFormat from "@/components/DataFormat"; import DataFormat from "@/components/DataFormat";
import { import {
getAdminOrderList, getAdminOrderList,
setAdminOrderPrice, setAdminOrderPrice,
setAdminOrderRemark, setAdminOrderRemark,
setOfflinePay, setOfflinePay,
setOrderRefund setOrderRefund
} from "@/api/admin"; } from "@/api/admin";
import { required, num } from "@/utils/validate"; import {
import { validatorDefaultCatch } from "@/utils/dialog"; required,
export default { num
name: "AdminOrderList", } from "@/utils/validate";
components: { import {
PriceChange, validatorDefaultCatch
Loading, } from "@/utils/dialog";
DataFormat export default {
}, name: "AdminOrderList",
props: {}, components: {
data: function() { PriceChange,
return { Loading,
current: "", DataFormat
change: false, },
types: 0, props: {},
where: { data: function() {
page: 1, return {
limit: 5, current: "",
status: 0 change: false,
}, types: 0,
list: [], where: {
loaded: false, page: 1,
loading: false, limit: 5,
orderInfo: {}, status: 0
status: "" },
}; list: [],
}, loaded: false,
watch: { loading: false,
"$yroute.query.types": function(newVal) { orderInfo: {},
let that = this; status: ""
if (newVal != undefined) { };
that.where.status = newVal; },
that.init(); watch: {
} "$yroute.query.types": function(newVal) {
}, let that = this;
types: function() { if (newVal != undefined) {
this.getIndex(); that.where.status = newVal;
} that.init();
}, }
mounted: function() { },
let that = this; types: function() {
that.where.status = that.$yroute.query.types; this.getIndex();
that.current = ""; }
that.getIndex(); },
}, mounted: function() {
onReachBottom() { let that = this;
!that.loading && that.getIndex(); that.where.status = that.$yroute.query.types;
}, that.current = "";
methods: { that.getIndex();
goGoodsDeliver(item) { },
this.$yrouter.push({ onReachBottom() {
path: "/pages/orderAdmin/GoodsDeliver/index", !that.loading && that.getIndex();
query: { id: item.orderId } },
}); methods: {
}, goGoodsDeliver(item) {
more: function(index) { this.$yrouter.push({
if (this.current === index) this.current = ""; path: "/pages/orderAdmin/GoodsDeliver/index",
else this.current = index; query: {
}, id: item.orderId
modify: function(item, status) { }
this.change = true; });
this.orderInfo = item; },
this.status = status; more: function(index) {
}, if (this.current === index) this.current = "";
changeclose: function(msg) { else this.current = index;
this.change = msg; },
}, modify: function(item, status) {
async savePrice(opt) { this.change = true;
let that = this, this.orderInfo = item;
data = {}, this.status = status;
price = opt.price.toString(), },
refund_price = opt.refund_price.toString(), changeclose: function(msg) {
refund_status = that.orderInfo.refundStatus, this.change = msg;
remark = opt.remark; },
data.orderId = that.orderInfo.orderId; async savePrice(opt) {
if (that.status == 0 && refund_status === 0) { let that = this,
try { data = {},
await this.$validator({ price = opt.price.toString(),
price: [ refund_price = opt.refund_price.toString(),
required(required.message("金额")), refund_status = that.orderInfo.refundStatus,
num(num.message("金额")) remark = opt.remark;
] data.orderId = that.orderInfo.orderId;
}).validate({ price }); if (that.status == 0 && refund_status === 0) {
} catch (e) { try {
return validatorDefaultCatch(e); await this.$validator({
} price: [
data.price = price; required(required.message("金额")),
setAdminOrderPrice(data).then( num(num.message("金额"))
function() { ]
that.change = false; }).validate({
uni.showToast({ price
title: "改价成功", });
icon: "success", } catch (e) {
duration: 2000 return validatorDefaultCatch(e);
}); }
that.init(); data.price = price;
}, setAdminOrderPrice(data).then(
function() { function() {
that.change = false; that.change = false;
uni.showToast({ uni.showToast({
title: "改价失败", title: "改价成功",
icon: "none", icon: "success",
duration: 2000 duration: 2000
}); });
} that.init();
); },
} else if (that.status == 0 && refund_status === 1) { function() {
try { that.change = false;
await this.$validator({ uni.showToast({
refund_price: [ title: "改价失败",
required(required.message("金额")), icon: "none",
num(num.message("金额")) duration: 2000
] });
}).validate({ refund_price }); }
} catch (e) { );
return validatorDefaultCatch(e); } else if (that.status == 0 && refund_status === 1) {
} try {
data.price = refund_price; await this.$validator({
data.type = opt.type; refund_price: [
setOrderRefund(data).then( required(required.message("金额")),
res => { num(num.message("金额"))
that.change = false; ]
uni.showToast({ }).validate({
title: res.msg, refund_price
icon: "none", });
duration: 2000 } catch (e) {
}); return validatorDefaultCatch(e);
that.init(); }
}, data.price = refund_price;
err => { data.type = opt.type;
that.change = false; setOrderRefund(data).then(
uni.showToast({ res => {
title: res.msg, that.change = false;
icon: "none", uni.showToast({
duration: 2000 title: res.msg,
}); icon: "none",
} duration: 2000
); });
} else { that.init();
try { },
await this.$validator({ err => {
remark: [required(required.message("备注"))] that.change = false;
}).validate({ remark }); uni.showToast({
} catch (e) { title: res.msg,
return validatorDefaultCatch(e); icon: "none",
} duration: 2000
data.remark = remark; });
setAdminOrderRemark(data).then( }
res => { );
that.change = false; } else {
uni.showToast({ try {
title: res.msg, await this.$validator({
icon: "none", remark: [required(required.message("备注"))]
duration: 2000 }).validate({
}); remark
that.init(); });
}, } catch (e) {
err => { return validatorDefaultCatch(e);
that.change = false; }
uni.showToast({ data.remark = remark;
title: res.msg, setAdminOrderRemark(data).then(
icon: "none", res => {
duration: 2000 that.change = false;
}); uni.showToast({
} title: res.msg,
); icon: "none",
} duration: 2000
}, });
init: function() { that.init();
this.list = []; },
this.where.page = 1; err => {
this.loaded = false; that.change = false;
this.loading = false; uni.showToast({
this.getIndex(); title: res.msg,
this.current = ""; icon: "none",
}, duration: 2000
getIndex: function() { });
let that = this; }
if (that.loading || that.loaded) return; );
that.loading = true; }
getAdminOrderList(that.where).then( },
res => { init: function() {
that.loading = false; this.list = [];
that.loaded = res.data.length < that.where.limit; this.where.page = 1;
that.list.push.apply(that.list, res.data); this.loaded = false;
that.where.page = that.where.page + 1; this.loading = false;
}, this.getIndex();
err => { this.current = "";
uni.showToast({ },
title: res.msg, getIndex: function() {
icon: "none", let that = this;
duration: 2000 if (that.loading || that.loaded) return;
}); that.loading = true;
} getAdminOrderList(that.where).then(
); res => {
}, that.loading = false;
changeStatus: function(val) { that.loaded = res.data.length < that.where.limit;
if (this.where.status != val) { that.list.push.apply(that.list, res.data);
this.where.status = val; that.where.page = that.where.page + 1;
this.init(); },
} err => {
}, uni.showToast({
toDetail: function(item) { title: res.msg,
this.$yrouter.push({ icon: "none",
path: "/pages/orderAdmin/AdminOrder/index", duration: 2000
query: { oid: item.orderId } });
}); }
}, );
offlinePay: function(item) { },
setOfflinePay({ order_id: item.order_id }).then( changeStatus: function(val) {
res => { if (this.where.status != val) {
this.$uni.showToast({ title: res.msg, icon: "none", duration: 2000 }); this.where.status = val;
this.init(); this.init();
}, }
error => { },
this.$dialog.error(error.msg); toDetail: function(item) {
} this.$yrouter.push({
); path: "/pages/orderAdmin/AdminOrder/index",
} query: {
} oid: item.orderId
}; }
});
},
offlinePay: function(item) {
setOfflinePay({
order_id: item.order_id
}).then(
res => {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
this.init();
},
error => {
uni.showToast({
title: error.msg,
icon: 'none',
duration: 2000
});
}
);
}
}
};
</script> </script>
<style> <style>

86
pages/orderAdmin/GoodsDeliver/index.vue

@ -1,27 +1,27 @@
<template> <template>
<div class="deliver-goods"> <view class="deliver-goods">
<header> <header>
<div class="order-num acea-row row-between-wrapper"> <view class="order-num acea-row row-between-wrapper">
<div class="num line1">订单号{{ delivery.orderId }}</div> <view class="num line1">订单号{{ delivery.orderId }}</view>
<div class="name line1">{{ delivery.nickname }}</div> <view class="name line1">{{ delivery.nickname }}</view>
</div> </view>
<div class="address"> <view class="address">
<div class="name"> <view class="name">
{{ delivery.realName {{ delivery.realName
}} }}
<span class="phone">{{ delivery.userPhone }}</span> <text class="phone">{{ delivery.userPhone }}</text>
</div> </view>
<div>{{ delivery.userAddress }}</div> <view>{{ delivery.userAddress }}</view>
</div> </view>
<div class="line"> <view class="line">
<img :src="$VUE_APP_RESOURCES_URL+'/images/line.jpg'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/line.jpg'" />
</div> </view>
</header> </header>
<div class="wrapper"> <view class="wrapper">
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div>发货方式</div> <view>发货方式</view>
<div class="mode acea-row row-middle row-right"> <view class="mode acea-row row-middle row-right">
<div <view
class="goods" class="goods"
:class="active === typesIndex ? 'on' : ''" :class="active === typesIndex ? 'on' : ''"
v-for="(item, typesIndex) in types" v-for="(item, typesIndex) in types"
@ -29,34 +29,34 @@
@click="changeType(item, typesIndex)" @click="changeType(item, typesIndex)"
> >
{{ item.title }} {{ item.title }}
<span class="iconfont icon-xuanzhong2"></span> <text class="iconfont icon-xuanzhong2"></text>
</div> </view>
</div> </view>
</div> </view>
<div class="list" v-show="active === 0"> <view class="list" v-show="active === 0">
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div>快递公司</div> <view>快递公司</view>
<input type="text" placeholder="填写快递公司" v-model="delivery_name" class="mode" /> <input type="text" placeholder="填写快递公司" v-model="delivery_name" class="mode" />
</div> </view>
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div>快递单号</div> <view>快递单号</view>
<input type="text" placeholder="填写快递单号" v-model="delivery_id" class="mode" /> <input type="text" placeholder="填写快递单号" v-model="delivery_id" class="mode" />
</div> </view>
</div> </view>
<div class="list" v-show="active === 1"> <view class="list" v-show="active === 1">
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div>送货人</div> <view>送货人</view>
<input type="text" placeholder="填写送货人" v-model="delivery_name" class="mode" /> <input type="text" placeholder="填写送货人" v-model="delivery_name" class="mode" />
</div> </view>
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div>送货电话</div> <view>送货电话</view>
<input type="text" placeholder="填写送货电话" v-model="delivery_id" class="mode" /> <input type="text" placeholder="填写送货电话" v-model="delivery_id" class="mode" />
</div> </view>
</div> </view>
</div> </view>
<div style="height:100rpx;"></div> <view style="height:100rpx;"></view>
<div class="confirm" @click="saveInfo">确认提交</div> <view class="confirm" @click="saveInfo">确认提交</view>
</div> </view>
</template> </template>
<script> <script>
import { getAdminOrderDelivery, setAdminOrderDelivery } from "@/api/admin"; import { getAdminOrderDelivery, setAdminOrderDelivery } from "@/api/admin";

342
pages/orderAdmin/OrderCancellation/index.vue

@ -1,161 +1,195 @@
<template> <template>
<div class="OrderCancellation"> <view class="OrderCancellation">
<div class="header"></div> <view class="header"></view>
<div class="whiteBg"> <view class="whiteBg">
<div class="input"> <view class="input">
<input type="number" placeholder="0" v-model="verify_code" /> <input type="number" placeholder="0" v-model="verify_code" />
</div> </view>
<div class="bnt" @click="storeCancellation">立即核销</div> <view class="bnt" @click="storeCancellation">立即核销</view>
</div> </view>
<div class="scan" v-if="iswechat"> <view class="scan" v-if="iswechat">
<img :src="$VUE_APP_RESOURCES_URL+'/images/scan.gif'" @click="openQRCode" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/scan.gif'" @click="openQRCode" />
</div> </view>
<WriteOff :iShidden="iShidden" :orderInfo="orderInfo" @cancel="cancel" @confirm="confirm"></WriteOff> <WriteOff :iShidden="iShidden" :orderInfo="orderInfo" @cancel="cancel" @confirm="confirm"></WriteOff>
</div> </view>
</template> </template>
<style scoped> <style scoped>
.OrderCancellation .header { .OrderCancellation .header {
background: url("https://h5.dayouqiantu.cn/static/images/writeOffBg.jpg") no-repeat; background: url("https://h5.dayouqiantu.cn/static/images/writeOffBg.jpg") no-repeat;
width: 100%; width: 100%;
height: 3rem; height: 3rem;
background-size: 100% 100%; background-size: 100% 100%;
} }
.OrderCancellation .whiteBg {
width: 6.9rem; .OrderCancellation .whiteBg {
background-color: #fff; width: 6.9rem;
margin: -0.93rem auto 0 auto; background-color: #fff;
padding-top: 0.8rem; margin: -0.93rem auto 0 auto;
border-radius: 0.06rem 0.06rem 0 0; padding-top: 0.8rem;
} border-radius: 0.06rem 0.06rem 0 0;
.OrderCancellation .whiteBg .input { }
width: 5.8rem;
margin: 0 auto; .OrderCancellation .whiteBg .input {
border-bottom: 0.01rem solid #eee; width: 5.8rem;
} margin: 0 auto;
.OrderCancellation .whiteBg .input input { border-bottom: 0.01rem solid #eee;
padding-bottom: 0.25rem; }
font-size: 0.6rem;
color: #282828; .OrderCancellation .whiteBg .input input {
width: 100%; padding-bottom: 0.25rem;
text-align: center; font-size: 0.6rem;
} color: #282828;
.OrderCancellation .whiteBg .bnt { width: 100%;
font-size: 0.32rem; text-align: center;
color: #fff; }
width: 5.8rem;
height: 0.86rem; .OrderCancellation .whiteBg .bnt {
border-radius: 0.43rem; font-size: 0.32rem;
background-image: linear-gradient(to right, #f67a38 0%, #f11b09 100%); color: #fff;
background-image: -webkit-linear-gradient(to right, #f67a38 0%, #f11b09 100%); width: 5.8rem;
background-image: -moz-linear-gradient(to right, #f67a38 0%, #f11b09 100%); height: 0.86rem;
text-align: center; border-radius: 0.43rem;
line-height: 0.86rem; background-image: linear-gradient(to right, #f67a38 0%, #f11b09 100%);
margin: 0.55rem auto 0 auto; background-image: -webkit-linear-gradient(to right, #f67a38 0%, #f11b09 100%);
} background-image: -moz-linear-gradient(to right, #f67a38 0%, #f11b09 100%);
.OrderCancellation .scan { text-align: center;
width: 3rem; line-height: 0.86rem;
height: 3rem; margin: 0.55rem auto 0 auto;
margin: 1.1rem auto 0 auto; }
}
.OrderCancellation .scan img { .OrderCancellation .scan {
width: 100%; width: 3rem;
height: 100%; height: 3rem;
display: block; margin: 1.1rem auto 0 auto;
} }
.OrderCancellation .scan image {
width: 100%;
height: 100%;
display: block;
}
</style> </style>
<script> <script>
import WriteOff from "@/components/WriteOff"; import WriteOff from "@/components/WriteOff";
import { isWeixin } from "@/utils"; import {
// import { wechatEvevt } from "@/libs/wechat"; isWeixin
import { orderVerific } from "@/api/order"; } from "@/utils";
const NAME = "OrderCancellation"; // import { wechatEvevt } from "@/libs/wechat";
import {
orderVerific
} from "@/api/order";
const NAME = "OrderCancellation";
export default {
name: NAME,
components: {
WriteOff
},
props: {},
data: function() {
return {
iShidden: true,
iswechat: isWeixin(),
orderInfo: {},
verify_code: ""
};
},
mounted: function() {},
methods: {
cancel: function(res) {
this.iShidden = res;
},
confirm: function() {
orderVerific(this.verify_code, 1)
.then(res => {
this.iShidden = true;
this.verify_code = "";
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
})
.catch(err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
export default { });
name: NAME, },
components: { storeCancellation: function() {
WriteOff let ref = /[0-9]{12}/;
}, if (!this.verify_code) {
props: {}, uni.showToast({
data: function() { title: "请输入核销码",
return { icon: 'none',
iShidden: true, duration: 2000
iswechat: isWeixin(), });
orderInfo: {}, return
verify_code: "" }
}; if (!ref.test(this.verify_code)) {
}, uni.showToast({
mounted: function() {}, title: "请输入正确的核销码",
methods: { icon: 'none',
cancel: function(res) { duration: 2000
this.iShidden = res; });
}, return
confirm: function() { }
orderVerific(this.verify_code, 1) uni.showLoading({
.then(res => { title: "查询中"
this.iShidden = true; });
this.verify_code = ""; orderVerific(this.verify_code, 0)
this.$uni.showToast({ title: res.msg, icon: 'none', duration: 2000 }); .then(res => {
}) uni.hideLoading();
.catch(res => { this.orderInfo = res.data;
this.$dialog.error(res.msg); this.iShidden = false;
}); })
}, .catch(() => {
storeCancellation: function() { uni.hideLoading();
let ref = /[0-9]{12}/; });
if (!this.verify_code) return this.$dialog.error("请输入核销码"); },
if (!ref.test(this.verify_code)) openQRCode: function() {
return this.$dialog.error("请输入正确的核销码"); let that = this;
uni.showLoading({ title: "查询中" }); // wechatEvevt("scanQRCode", {
orderVerific(this.verify_code, 0) // needResult: 1,
.then(res => { // scanType: ["qrCode", "barCode"]
uni.hideLoading(); // })
this.orderInfo = res.data; // .then(res => {
this.iShidden = false; // if (res.resultStr) {
}) // that.verify_code = res.resultStr;
.catch(() => { // that.storeCancellation();
uni.hideLoading(); // } else {
}); // uni.showToast({
}, // title: '',
openQRCode: function() { // icon: "none",
let that = this; // duration: 2000
// wechatEvevt("scanQRCode", { // });
// needResult: 1, // }
// scanType: ["qrCode", "barCode"] // })
// }) // .catch(res => {
// .then(res => { // if (res.is_ready) {
// if (res.resultStr) { // res.wx.scanQRCode({
// that.verify_code = res.resultStr; // needResult: 1,
// that.storeCancellation(); // scanType: ["qrCode", "barCode"],
// } else { // success: function(res) {
// uni.showToast({ // that.verify_code = res.resultStr;
// title: '', // that.storeCancellation();
// icon: "none", // },
// duration: 2000 // fail: function(res) {
// }); // if (res.errMsg == "scanQRCode:permission denied") {
// } // uni.showToast({
// }) // title: '',
// .catch(res => { // icon: "none",
// if (res.is_ready) { // duration: 2000
// res.wx.scanQRCode({ // });
// needResult: 1, // }
// scanType: ["qrCode", "barCode"], // }
// success: function(res) { // });
// that.verify_code = res.resultStr; // }
// that.storeCancellation(); // });
// }, }
// fail: function(res) { }
// if (res.errMsg == "scanQRCode:permission denied") { };
// uni.showToast({
// title: '',
// icon: "none",
// duration: 2000
// });
// }
// }
// });
// }
// });
}
}
};
</script> </script>

158
pages/orderAdmin/OrderIndex/index.vue

@ -1,81 +1,81 @@
<template> <template>
<div class="order-index" ref="container"> <view class="order-index" ref="container">
<div class="header acea-row"> <view class="header acea-row">
<div class="item" @click="goAdminOrderList(0)"> <view class="item" @click="goAdminOrderList(0)">
<div class="num">{{ census.orderCount.unpaidCount }}</div> <view class="num">{{ census.orderCount.unpaidCount }}</view>
<div>待付款</div> <view>待付款</view>
</div> </view>
<div class="item" @click="goAdminOrderList(1)"> <view class="item" @click="goAdminOrderList(1)">
<div class="num">{{ census.orderCount.unshippedCount }}</div> <view class="num">{{ census.orderCount.unshippedCount }}</view>
<div>待发货</div> <view>待发货</view>
</div> </view>
<div class="item" @click="goAdminOrderList(2)"> <view class="item" @click="goAdminOrderList(2)">
<div class="num">{{ census.orderCount.receivedCount }}</div> <view class="num">{{ census.orderCount.receivedCount }}</view>
<div>待收货</div> <view>待收货</view>
</div> </view>
<div class="item" @click="goAdminOrderList(3)"> <view class="item" @click="goAdminOrderList(3)">
<div class="num">{{ census.orderCount.evaluatedCount }}</div> <view class="num">{{ census.orderCount.evaluatedCount }}</view>
<div>待评价</div> <view>待评价</view>
</div> </view>
<div class="item" @click="goAdminOrderList(3)"> <view class="item" @click="goAdminOrderList(3)">
<div class="num">{{ census.orderCount.refundCount }}</div> <view class="num">{{ census.orderCount.refundCount }}</view>
<div>退款</div> <view>退款</view>
</div> </view>
</div> </view>
<div class="wrapper"> <view class="wrapper">
<div class="title"> <view class="title">
<span class="iconfont icon-shujutongji"></span>数据统计 <text class="iconfont icon-shujutongji"></text>数据统计
</div> </view>
<div class="list acea-row"> <view class="list acea-row">
<div class="item" @click="goStatistics({type:'price',time:'today'})"> <view class="item" @click="goStatistics({type:'price',time:'today'})">
<div class="num">{{ census.orderTimeCount.todayPrice }}</div> <view class="num">{{ census.orderTimeCount.todayPrice }}</view>
<div>今日成交额</div> <view>今日成交额</view>
</div> </view>
<div class="item" @click="goStatistics({type:'price',time:'yesterday'})"> <view class="item" @click="goStatistics({type:'price',time:'yesterday'})">
<div class="num">{{ census.orderTimeCount.proPrice }}</div> <view class="num">{{ census.orderTimeCount.proPrice }}</view>
<div>昨日成交额</div> <view>昨日成交额</view>
</div> </view>
<div class="item" @click="goStatistics({type:'price',time:'month'})"> <view class="item" @click="goStatistics({type:'price',time:'month'})">
<div class="num">{{ census.orderTimeCount.monthPrice }}</div> <view class="num">{{ census.orderTimeCount.monthPrice }}</view>
<div>本月成交额</div> <view>本月成交额</view>
</div> </view>
<div class="item" @click="goStatistics({type:'order',time:'today'})"> <view class="item" @click="goStatistics({type:'order',time:'today'})">
<div class="num">{{ census.orderTimeCount.todayCount }}</div> <view class="num">{{ census.orderTimeCount.todayCount }}</view>
<div>今日订单数</div> <view>今日订单数</view>
</div> </view>
<div class="item" @click="goStatistics({type:'order',time:'yesterday'})"> <view class="item" @click="goStatistics({type:'order',time:'yesterday'})">
<div class="num">{{ census.orderTimeCount.proCount }}</div> <view class="num">{{ census.orderTimeCount.proCount }}</view>
<div>昨日订单数</div> <view>昨日订单数</view>
</div> </view>
<div class="item" @click="goStatistics({type:'order',time:'month'})"> <view class="item" @click="goStatistics({type:'order',time:'month'})">
<div class="num">{{ census.orderTimeCount.monthCount }}</div> <view class="num">{{ census.orderTimeCount.monthCount }}</view>
<div>本月订单数</div> <view>本月订单数</view>
</div> </view>
</div> </view>
</div> </view>
<div class="public-wrapper"> <view class="public-wrapper">
<div class="title"> <view class="title">
<span class="iconfont icon-xiangxishuju"></span>详细数据 <text class="iconfont icon-xiangxishuju"></text>详细数据
</div> </view>
<div class="nav acea-row row-between-wrapper"> <view class="nav acea-row row-between-wrapper">
<div class="data">日期</div> <view class="data">日期</view>
<div class="browse">订单数</div> <view class="browse">订单数</view>
<div class="turnover">成交额</div> <view class="turnover">成交额</view>
</div> </view>
<div class="conter"> <view class="conter">
<div <view
class="item acea-row row-between-wrapper" class="item acea-row row-between-wrapper"
v-for="(item, orderListIndex) in list" v-for="(item, orderListIndex) in list"
:key="orderListIndex" :key="orderListIndex"
> >
<div class="data">{{ item.time }}</div> <view class="data">{{ item.time }}</view>
<div class="browse">{{ item.count }}</div> <view class="browse">{{ item.count }}</view>
<div class="turnover">{{ item.price }}</div> <view class="turnover">{{ item.price }}</view>
</div> </view>
</div> </view>
</div> </view>
<Loading :loaded="loaded" :loading="loading"></Loading> <Loading :loaded="loaded" :loading="loading"></Loading>
</div> </view>
</template> </template>
<script> <script>
import { getStatisticsInfo, getStatisticsMonth } from "@/api/admin"; import { getStatisticsInfo, getStatisticsMonth } from "@/api/admin";
@ -129,7 +129,11 @@ export default {
that.census.unpaidCount = that.census.orderCount.unpaidCount; that.census.unpaidCount = that.census.orderCount.unpaidCount;
}, },
err => { err => {
that.$dialog.message(err.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
} }
); );
}, },
@ -144,8 +148,12 @@ export default {
that.list.push.apply(that.list, res.data); that.list.push.apply(that.list, res.data);
that.where.page = that.where.page + 1; that.where.page = that.where.page + 1;
}, },
error => { err => {
that.$dialog.message(error.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
}, },
300 300
); );

86
pages/orderAdmin/Statistics/index.vue

@ -1,44 +1,44 @@
<template> <template>
<div class="statistical-page" ref="container"> <view class="statistical-page" ref="container">
<div class="navs"> <view class="navs">
<div class="list"> <view class="list">
<div class="item" :class="time == 'today' ? 'on' : ''" @click="setTime('today')">今天</div> <view class="item" :class="time == 'today' ? 'on' : ''" @click="setTime('today')">今天</view>
<div class="item" :class="time == 'yesterday' ? 'on' : ''" @click="setTime('yesterday')">昨天</div> <view class="item" :class="time == 'yesterday' ? 'on' : ''" @click="setTime('yesterday')">昨天</view>
<div class="item" :class="time == 'seven' ? 'on' : ''" @click="setTime('seven')">最近7天</div> <view class="item" :class="time == 'seven' ? 'on' : ''" @click="setTime('seven')">最近7天</view>
<div class="item" :class="time == 'month' ? 'on' : ''" @click="setTime('month')">本月</div> <view class="item" :class="time == 'month' ? 'on' : ''" @click="setTime('month')">本月</view>
</div> </view>
</div> </view>
<div class="wrapper"> <view class="wrapper">
<div class="title">{{ title }}{{ this.where.type == 1 ? "营业额(元)" : "订单量(份)" }}</div> <view class="title">{{ title }}{{ this.where.type == 1 ? "营业额(元)" : "订单量(份)" }}</view>
<div class="money">{{ time_price }}</div> <view class="money">{{ time_price }}</view>
</div> </view>
<!-- <div class="chart"> <!-- <view class="chart">
<div class="company">{{ where.type === 1 ? "单位(元)" : "单位(份)" }}</div> <view class="company">{{ where.type === 1 ? "单位(元)" : "单位(份)" }}</view>
<ECharts :options="polar"></ECharts> <ECharts :options="polar"></ECharts>
</div> --> </view> -->
<div class="public-wrapper"> <view class="public-wrapper">
<div class="title"> <view class="title">
<span class="iconfont icon-xiangxishuju"></span>详细数据 <text class="iconfont icon-xiangxishuju"></text>详细数据
</div> </view>
<div class="nav acea-row row-between-wrapper"> <view class="nav acea-row row-between-wrapper">
<div class="data">日期</div> <view class="data">日期</view>
<div class="browse">订单量</div> <view class="browse">订单量</view>
<div class="turnover">成交额</div> <view class="turnover">成交额</view>
</div> </view>
<div class="conter"> <view class="conter">
<div <view
class="item acea-row row-between-wrapper" class="item acea-row row-between-wrapper"
v-for="(item, statisticalIndex) in list" v-for="(item, statisticalIndex) in list"
:key="statisticalIndex" :key="statisticalIndex"
> >
<div class="data">{{ item.time }}</div> <view class="data">{{ item.time }}</view>
<div class="browse">{{ item.count }}</div> <view class="browse">{{ item.count }}</view>
<div class="turnover">{{ item.price }}</div> <view class="turnover">{{ item.price }}</view>
</div> </view>
</div> </view>
</div> </view>
<!-- <div class="calendar-wrapper" :class="current === true ? 'on' : ''"> <!-- <view class="calendar-wrapper" :class="current === true ? 'on' : ''">
<div class="calendar"> <view class="calendar">
<Calendar <Calendar
:clean="clean" :clean="clean"
:lunar="lunar" :lunar="lunar"
@ -57,11 +57,11 @@
:begin="[1992, 5, 20]" :begin="[1992, 5, 20]"
:end="[2049, 5, 20]" :end="[2049, 5, 20]"
/> />
</div> </view>
</div> --> </view> -->
<div class="mask" @touchmove.prevent v-show="current === true" @click="close"></div> <view class="mask" @touchmove.prevent v-show="current === true" @click="close"></view>
<Loading :loaded="loaded" :loading="loading"></Loading> <Loading :loaded="loaded" :loading="loading"></Loading>
</div> </view>
</template> </template>
<script> <script>
// import ECharts from "vue-echarts"; // import ECharts from "vue-echarts";
@ -398,8 +398,12 @@ export default {
that.list.push.apply(that.list, res.data); that.list.push.apply(that.list, res.data);
that.filter.page = that.filter.page + 1; that.filter.page = that.filter.page + 1;
}, },
error => { err => {
that.$dialog.message(error.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
} }
); );
} }

42
pages/shop/EvaluateList/index.vue

@ -1,36 +1,36 @@
<template> <template>
<div class="evaluate-list" ref="container"> <view class="evaluate-list" ref="container">
<div class="header"> <view class="header">
<div class="generalComment acea-row row-between-wrapper"> <view class="generalComment acea-row row-between-wrapper">
<div class="acea-row row-middle font-color-red"> <view class="acea-row row-middle font-color-red">
<div class="evaluate">评分</div> <text class="evaluate">评分</text>
<div class="start" :class="'star' + replyData.replyStar"></div> <view class="start" :class="'star' + replyData.replyStar"></view>
</div> </view>
<div> <view>
<span class="font-color-red">{{ replyData.replyChance || 0 }}%</span <text class="font-color-red">{{ replyData.replyChance || 0 }}%</text>
>好评率 <text>好评率</text>
</div> </view>
</div> </view>
<div class="nav acea-row row-middle"> <view class="nav acea-row row-middle">
<div <view
class="acea-row row-center-wrapper" class="acea-row row-center-wrapper"
v-for="(item, navListIndex) in navList" v-for="(item, navListIndex) in navList"
:key="navListIndex" :key="navListIndex"
@click="changeType(navListIndex)" @click="changeType(navListIndex)"
> >
<div <view
class="item" class="item"
:class="currentActive === navListIndex ? 'bg-color-red' : ''" :class="currentActive === navListIndex ? 'bg-color-red' : ''"
v-if="item.num" v-if="item.num"
> >
{{ item.evaluate }}({{ item.num }}) <text>{{ item.evaluate }}({{ item.num }})</text>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<UserEvaluation :reply="reply"></UserEvaluation> <UserEvaluation :reply="reply"></UserEvaluation>
<Loading :loaded="loadend" :loading="loading"></Loading> <Loading :loaded="loadend" :loading="loading"></Loading>
</div> </view>
</template> </template>
<script> <script>
import UserEvaluation from "@/components/UserEvaluation"; import UserEvaluation from "@/components/UserEvaluation";

46
pages/shop/GoodSearch/index.vue

@ -1,35 +1,35 @@
<template> <template>
<div> <view>
<div class="searchGood"> <view class="searchGood">
<div class="search acea-row row-between-wrapper"> <view class="search acea-row row-between-wrapper">
<div class="input acea-row row-between-wrapper"> <view class="input acea-row row-between-wrapper">
<span class="iconfont icon-sousuo2"></span> <text class="iconfont icon-sousuo2"></text>
<!-- <form @submit.prevent="submit"></form> --> <!-- <form @submit.prevent="submit"></form> -->
<input type="text" placeholder="点击搜索商品" v-model="search" /> <input type="text" placeholder="点击搜索商品" v-model="search" />
</div> </view>
<div class="bnt" @click="submit">搜索</div> <view class="bnt" @click="submit">搜索</view>
</div> </view>
<div v-if="keywords.length"> <view v-if="keywords.length">
<div class="title">热门搜索</div> <view class="title">热门搜索</view>
<div class="list acea-row"> <view class="list acea-row">
<div <view
class="item" class="item"
v-for="keywordsKey of keywords" v-for="keywordsKey of keywords"
:key="keywordsKey" :key="keywordsKey"
@click="toSearch(keywordsKey)" @click="toSearch(keywordsKey)"
>{{ keywordsKey }}</div> >{{ keywordsKey }}</view>
</div> </view>
</div> </view>
<div class="line"></div> <view class="line"></view>
<!-- <GoodList></GoodList>--> <!-- <GoodList></GoodList>-->
</div> </view>
<!--<div class="noCommodity">--> <!--<view class="noCommodity">-->
<!--<div class="noPictrue">--> <!--<view class="noPictrue">-->
<!--<img :src="$VUE_APP_RESOURCES_URL+'/images/noSearch.png'" class="image" />--> <!--<image :src="$VUE_APP_RESOURCES_URL+'/images/noSearch.png'" class="image" />-->
<!--</div>--> <!--</view>-->
<!--<recommend></recommend>--> <!--<recommend></recommend>-->
<!--</div>--> <!--</view>-->
</div> </view>
</template> </template>
<script> <script>
// import GoodList from "@/components/GoodList"; // import GoodList from "@/components/GoodList";

64
pages/shop/GoodsClass/index.vue

@ -1,50 +1,50 @@
<template> <template>
<div class="productSort"> <view class="productSort">
<form @submit.prevent="submitForm"> <form @submit.prevent="submitForm">
<div class="header acea-row row-center-wrapper" ref="header"> <view class="header acea-row row-center-wrapper" ref="header">
<div class="acea-row row-between-wrapper input"> <view class="acea-row row-between-wrapper input">
<span class="iconfont icon-sousuo"></span> <text class="iconfont icon-sousuo"></text>
<input type="text" placeholder="搜索商品信息" v-model="search" /> <input type="text" placeholder="搜索商品信息" v-model="search" />
</div> </view>
</div> </view>
</form> </form>
<div class="aside"> <view class="aside">
<div <view
class="item acea-row row-center-wrapper" class="item acea-row row-center-wrapper"
:class="categoryDivindex === navActive ? 'on' : ''" :class="categoryDivindex === navActive ? 'on' : ''"
v-for="(item, categoryDivindex) in category" v-for="(item, categoryDivindex) in category"
:key="categoryDivindex" :key="categoryDivindex"
@click="asideTap(categoryDivindex)" @click="asideTap(categoryDivindex)"
> >
<span>{{ item.cateName }}</span> <text>{{ item.cateName }}</text>
</div> </view>
</div> </view>
<div class="conter"> <view class="conter">
<div class="listw" v-for="(item, eq) in category" :key="eq"> <view class="listw" v-for="(item, eq) in category" :key="eq">
<div v-if="eq === navActive"> <view v-if="eq === navActive">
<div class="title acea-row row-center-wrapper" ref="title"> <view class="title acea-row row-center-wrapper" ref="title">
<div class="line"></div> <view class="line"></view>
<div class="name">{{ item.cateName }}</div> <view class="name">{{ item.cateName }}</view>
<div class="line"></div> <view class="line"></view>
</div> </view>
<div class="list acea-row"> <view class="list acea-row">
<div <view
class="item acea-row row-column row-middle" class="item acea-row row-column row-middle"
v-for="(child, categoryIndex) in item.children" v-for="(child, categoryIndex) in item.children"
:key="categoryIndex" :key="categoryIndex"
@click="goGoodsList(child)" @click="goGoodsList(child)"
> >
<div class="picture"> <view class="picture">
<img :src="child.pic" /> <image :src="child.pic" />
</div> </view>
<div class="name line1">{{ child.cateName }}</div> <view class="name line1">{{ child.cateName }}</view>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<div style="height:100rpx;"></div> <view style="height:100rpx;"></view>
</div> </view>
</template> </template>
<script> <script>
import debounce from "lodash.debounce"; import debounce from "lodash.debounce";

50
pages/shop/GoodsCollection/index.vue

@ -1,36 +1,36 @@
<template> <template>
<div ref="container"> <view ref="container">
<div class="collectionGoods" v-if="collectProductList.length > 0"> <view class="collectionGoods" v-if="collectProductList.length > 0">
<div <view
class="item acea-row row-between-wrapper" class="item acea-row row-between-wrapper"
v-for="(item, collectProductListIndex) in collectProductList" v-for="(item, collectProductListIndex) in collectProductList"
:key="collectProductListIndex" :key="collectProductListIndex"
@click="goGoodsCon(item)" @click="goGoodsCon(item)"
> >
<div class="pictrue"> <view class="pictrue">
<img :src="item.image" /> <image :src="item.image" />
</div> </view>
<div class="text acea-row row-column-between"> <view class="text acea-row row-column-between">
<div class="infor line1">{{ item.storeName }}</div> <view class="infor line1">{{ item.storeName }}</view>
<div class="acea-row row-between-wrapper"> <view class="acea-row row-between-wrapper">
<div class="money font-color-red">{{ item.price }}</div> <view class="money font-color-red">{{ item.price }}</view>
<div class="delete" @click.prevent="delCollection(collectProductListIndex)">删除</div> <view class="delete" @click.prevent="delCollection(collectProductListIndex)">删除</view>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<Loading :loaded="loadend" :loading="loading"></Loading> <Loading :loaded="loadend" :loading="loading"></Loading>
<div <view
class="noCommodity" class="noCommodity"
style="background-color:#fff;" style="background-color:#fff;"
v-if="collectProductList.length < 1 && page > 1" v-if="collectProductList.length < 1 && page > 1"
> >
<div class="noPictrue"> <view class="noPictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noCollection.png'" class="image" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/noCollection.png'" class="image" />
</div> </view>
<Recommend></Recommend> <Recommend></Recommend>
</div> </view>
</div> </view>
</template> </template>
<script> <script>
import Recommend from "@/components/Recommend"; import Recommend from "@/components/Recommend";
@ -85,9 +85,11 @@ export default {
id = that.collectProductList[index].pid, id = that.collectProductList[index].pid,
category = that.collectProductList[index].category; category = that.collectProductList[index].category;
getCollectDel(id, category).then(function() { getCollectDel(id, category).then(function() {
that.$dialog.toast({ uni.showToast({
mes: "删除收藏成功!", title: "添加购物车成功",
callback: () => { icon: "success",
duration: 2000,
complete: () => {
that.collectProductList.splice(index, 1); that.collectProductList.splice(index, 1);
that.$set(that, "collectProductList", that.collectProductList); that.$set(that, "collectProductList", that.collectProductList);
} }

345
pages/shop/GoodsCon/index.vue

@ -1,138 +1,134 @@
<template> <template>
<div :class="[posterImageStatus ? 'noscroll product-con' : 'product-con']"> <view :class="[posterImageStatus ? 'noscroll product-con' : 'product-con']">
<product-con-swiper :img-urls="storeInfo.sliderImageArr"></product-con-swiper> <product-con-swiper :img-urls="storeInfo.sliderImageArr"></product-con-swiper>
<div class="wrapper"> <view class="wrapper">
<div class="share acea-row row-between row-bottom"> <view class="share acea-row row-between row-bottom">
<div class="money font-color-red"> <view class="money font-color-red">
<text></text>
<span class="num">{{ storeInfo.price }}</span> <text class="num">{{ storeInfo.price }}</text>
<span <text
class="vip-money" class="vip-money"
v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0"
>{{ storeInfo.vipPrice }}</span> >{{ storeInfo.vipPrice }}</text>
<img <image
:src="$VUE_APP_RESOURCES_URL+'/images/vip.png'" :src="$VUE_APP_RESOURCES_URL+'/images/vip.png'"
class="image" class="image"
v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0"
/> />
</div> </view>
<div class="iconfont icon-fenxiang" @click="listenerActionSheet"></div> <view class="iconfont icon-fenxiang" @click="listenerActionSheet"></view>
</div> </view>
<div class="introduce">{{ storeInfo.storeName }}</div> <view class="introduce">{{ storeInfo.storeName }}</view>
<div class="label acea-row row-between-wrapper"> <view class="label acea-row row-between-wrapper">
<div>原价:{{ storeInfo.otPrice }}</div> <text>原价:{{ storeInfo.otPrice }}</text>
<div>库存:{{ storeInfo.stock }}{{ storeInfo.unitName }}</div> <text>库存:{{ storeInfo.stock }}{{ storeInfo.unitName }}</text>
<div>销量:{{ storeInfo.sales }}{{ storeInfo.unitName }}</div> <text>销量:{{ storeInfo.sales }}{{ storeInfo.unitName }}</text>
</div> </view>
<div class="coupon acea-row row-between-wrapper" @click="couponTap" v-if="couponList.length"> <view class="coupon acea-row row-between-wrapper" @click="couponTap" v-if="couponList.length">
<div class="hide line1 acea-row"> <text class="hide line1 acea-row">
优惠券 <text>优惠券</text>
<div <text
class="activity" class="activity"
v-for="(item, couponListEq) in couponList" v-for="(item, couponListEq) in couponList"
:key="couponListEq" :key="couponListEq"
>{{ item.use_min_price }}{{ item.coupon_price }}</div> >{{ item.use_min_price }}{{ item.coupon_price }}</text>
</div> </text>
<div class="iconfont icon-jiantou"></div> <view class="iconfont icon-jiantou"></view>
</div> </view>
</div> </view>
<div class="attribute acea-row row-between-wrapper" @click="selecAttrTap"> <view class="attribute acea-row row-between-wrapper" @click="selecAttrTap">
<div> <view>
{{ attrTxt }} <text>{{ attrTxt }}</text>
<span class="atterTxt">{{ attrValue }}</span> <text class="atterTxt">{{ attrValue }}</text>
</div> </view>
<div class="iconfont icon-jiantou"></div> <view class="iconfont icon-jiantou"></view>
</div> </view>
<div class="store-info" v-if="system_store.id !== undefined"> <view class="store-info" v-if="system_store.id !== undefined">
<div class="title">门店信息</div> <text class="title">门店信息</text>
<div class="info acea-row row-between-wrapper"> <view class="info acea-row row-between-wrapper">
<div class="picTxt acea-row row-between-wrapper"> <view class="picTxt acea-row row-between-wrapper">
<div class="pictrue"> <view class="pictrue">
<img :src="system_store.image" /> <image :src="system_store.image" />
</div> </view>
<div class="text"> <view class="text">
<div class="name line1">{{ system_store.name }}</div> <view class="name line1">{{ system_store.name }}</view>
<div class="address acea-row row-middle" @click="showChang"> <view class="address acea-row row-middle" @click="showChang">
<span class="addressTxt line1"> <text class="addressTxt line1">{{system_store._detailed_address}}</text>
{{ <text class="iconfont icon-youjian"></text>
system_store._detailed_address </view>
}} </view>
</span> </view>
<span class="iconfont icon-youjian"></span>
</div>
</div>
</div>
<!-- <a class="iconfont icon-dadianhua01 font-color-red" :href="'tel:' + system_store.phone"></a> --> <!-- <a class="iconfont icon-dadianhua01 font-color-red" :href="'tel:' + system_store.phone"></a> -->
</div> </view>
</div> </view>
<div class="userEvaluation" v-if="replyCount"> <view class="userEvaluation" v-if="replyCount">
<div class="title acea-row row-between-wrapper"> <view class="title acea-row row-between-wrapper">
<div>用户评价({{ replyCount }})</div> <view>用户评价({{ replyCount }})</view>
<div @click="goEvaluateList(id)" class="praise"> <text @click="goEvaluateList(id)" class="praise">
<span class="font-color-red">{{ replyChance }}%</span>好评率 <text class="font-color-red">{{ replyChance }}%</text>好评率
<span class="iconfont icon-jiantou"></span> <text class="iconfont icon-jiantou"></text>
</div> </text>
</div> </view>
<user-evaluation :reply="reply"></user-evaluation> <user-evaluation :reply="reply"></user-evaluation>
</div> </view>
<div class="superior"> <view class="superior">
<div class="title acea-row row-center-wrapper"> <view class="title acea-row row-center-wrapper">
<img :src="$VUE_APP_RESOURCES_URL+'/images/ling.png'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/ling.png'" />
<div class="titleTxt">优品推荐</div> <text class="titleTxt">优品推荐</text>
<img :src="$VUE_APP_RESOURCES_URL+'/images/ling.png'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/ling.png'" />
</div> </view>
<template> <template>
<div class="slider-banner banner"> <view class="slider-banner banner">
<swiper :options="swiperRecommend" v-if="goodList.length > 0"> <swiper :options="swiperRecommend" v-if="goodList.length > 0">
<swiper-slide v-for="(item, eq2) in goodList" :key="eq2"> <swiper-slide v-for="(item, eq2) in goodList" :key="eq2">
<div class="list acea-row row-middle"> <view class="list acea-row row-middle">
<div class="item" v-for="val in item.list" :key="val.image"> <view class="item" v-for="val in item.list" :key="val.image">
<div class="pictrue"> <view class="pictrue">
<img :src="val.image" /> <image :src="val.image" />
</div> </view>
<div class="name line1">{{ val.store_name }}}</div> <view class="name line1">{{ val.store_name }}}</view>
<div class="money font-color-red">¥{{ val.price }}</div> <view class="money font-color-red">¥{{ val.price }}</view>
</div> </view>
</div> </view>
</swiper-slide> </swiper-slide>
<div class="swiper-pagination" slot="pagination"></div> <view class="swiper-pagination" slot="pagination"></view>
</swiper> </swiper>
</div> </view>
</template> </template>
</div> </view>
<div class="product-intro"> <view class="product-intro">
<div class="title">产品介绍</div> <text class="title">产品介绍</text>
<div class="conter" v-html="storeInfo.description"></div> <view class="conter" v-html="storeInfo.description"></view>
</div> </view>
<div style="height:100rpx;"></div> <view style="height:100rpx;"></view>
<div class="footer acea-row row-between-wrapper"> <view class="footer acea-row row-between-wrapper">
<!--<div class="item" @click="goCustomerList()">--> <!--<view class="item" @click="goCustomerList()">-->
<!--<div class="iconfont icon-kefu"></div>--> <!--<view class="iconfont icon-kefu"></view>-->
<!--<div>客服</div>--> <!--<view>客服</view>-->
<!--</div>--> <!--</view>-->
<div class="item" @click="setCollect"> <view class="item" @click="setCollect">
<div class="iconfont" :class="storeInfo.userCollect ? 'icon-shoucang1' : 'icon-shoucang'"></div> <view class="iconfont" :class="storeInfo.userCollect ? 'icon-shoucang1' : 'icon-shoucang'"></view>
<div>收藏</div> <text>收藏</text>
</div> </view>
<div <view
@click="goShoppingCart()" @click="goShoppingCart()"
class="item animated" class="item animated"
:class="animated === true ? 'bounceIn' : ''" :class="animated === true ? 'bounceIn' : ''"
> >
<div class="iconfont icon-gouwuche1"> <view class="iconfont icon-gouwuche1">
<span class="num bg-color-red" v-if="CartCount > 0"> <text class="num bg-color-red" v-if="CartCount > 0">{{CartCount}}</text>
{{ </view>
CartCount <text>购物车</text>
}} </view>
</span> <view class="bnt acea-row">
</div> <view class="joinCart" @click="joinCart">
<div>购物车</div> <text>加入购物车</text>
</div> </view>
<div class="bnt acea-row"> <view class="buy" @click="tapBuy">
<div class="joinCart" @click="joinCart">加入购物车</div> <text>立即购买</text>
<div class="buy" @click="tapBuy">立即购买</div> </view>
</div> </view>
</div> </view>
<CouponPop v-on:changeFun="changeFun" :coupon="coupon"></CouponPop> <CouponPop v-on:changeFun="changeFun" :coupon="coupon"></CouponPop>
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cart_num"></ProductWindow> <ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cart_num"></ProductWindow>
<StorePoster <StorePoster
@ -141,18 +137,18 @@
:posterData="posterData" :posterData="posterData"
></StorePoster> ></StorePoster>
<ShareInfo v-on:setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></ShareInfo> <ShareInfo v-on:setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></ShareInfo>
<div class="generate-posters acea-row row-middle" :class="posters ? 'on' : ''"> <view class="generate-posters acea-row row-middle" :class="posters ? 'on' : ''">
<div class="item" v-if="weixinStatus === true" @click="setShareInfoStatus"> <view class="item" v-if="weixinStatus === true" @click="setShareInfoStatus">
<div class="iconfont icon-weixin3"></div> <view class="iconfont icon-weixin3"></view>
<div class>发送给朋友</div> <view class>发送给朋友</view>
</div> </view>
<div class="item" @click="setPosterImageStatus"> <view class="item" @click="setPosterImageStatus">
<div class="iconfont icon-haibao"></div> <view class="iconfont icon-haibao"></view>
<div class>生成海报</div> <view class>生成海报</view>
</div> </view>
</div> </view>
<div class="mask" @touchmove.prevent @click="listenerActionClose" v-show="posters"></div> <view class="mask" @touchmove.prevent @click="listenerActionClose" v-show="posters"></view>
<div class="geoPage" v-if="mapShow"> <view class="geoPage" v-if="mapShow">
<iframe <iframe
width="100%" width="100%"
height="100%" height="100%"
@ -160,8 +156,8 @@
scrolling="no" scrolling="no"
:src="'https://apis.map.qq.com/uri/v1/geocoder?coord=' +system_store.latitude +',' +system_store.longitude +'&referer=' +mapKey" :src="'https://apis.map.qq.com/uri/v1/geocoder?coord=' +system_store.latitude +',' +system_store.longitude +'&referer=' +mapKey"
></iframe> ></iframe>
</div> </view>
</div> </view>
</template> </template>
<script> <script>
@ -272,12 +268,16 @@ export default {
this.$yrouter.switchTab("/pages/shop/ShoppingCart/index"); this.$yrouter.switchTab("/pages/shop/ShoppingCart/index");
}, },
goCustomerList() { goCustomerList() {
this.$yrouter.push({ path: "/pages/user/CustomerList/index" }); this.$yrouter.push({
path: "/pages/user/CustomerList/index"
});
}, },
goEvaluateList(id) { goEvaluateList(id) {
this.$yrouter.push({ this.$yrouter.push({
path: "/pages/shop/EvaluateList/index", path: "/pages/shop/EvaluateList/index",
query: { id } query: {
id
}
}); });
}, },
showChang: function() { showChang: function() {
@ -297,10 +297,14 @@ export default {
// } // }
// }); // });
} else { } else {
if (!this.mapKey) if (!this.mapKey) {
return this.$dialog.error( uni.showToast({
"暂无法使用查看地图,请配置您的腾讯地图key" title: "暂无法使用查看地图,请配置您的腾讯地图key",
); icon: "none",
duration: 2000
});
return;
}
this.mapShow = true; this.mapShow = true;
} }
}, },
@ -350,7 +354,10 @@ export default {
let count = Math.ceil(good_list.length / 6); let count = Math.ceil(good_list.length / 6);
for (let i = 0; i < count; i++) { for (let i = 0; i < count; i++) {
var list = good_list.slice(i * 6, 6); var list = good_list.slice(i * 6, 6);
if (list.length) goodArray.push({ list: list }); if (list.length)
goodArray.push({
list: list
});
} }
that.mapKay = res.data.mapKay; that.mapKay = res.data.mapKay;
that.$set(that, "goodList", goodArray); that.$set(that, "goodList", goodArray);
@ -476,7 +483,10 @@ export default {
// //
coupons: function() { coupons: function() {
let that = this, let that = this,
q = { page: 1, limit: 20 }; q = {
page: 1,
limit: 20
};
getCoupon(q).then(res => { getCoupon(q).then(res => {
that.$set(that, "couponList", res.data || []); that.$set(that, "couponList", res.data || []);
that.$set(that.coupon, "list", res.data); that.$set(that.coupon, "list", res.data);
@ -566,8 +576,14 @@ export default {
that.attr.productAttr.length && that.attr.productAttr.length &&
productSelect === undefined && productSelect === undefined &&
that.isOpen === true that.isOpen === true
) ) {
return that.$dialog.toast({ mes: "产品库存不足,请选择其它" }); uni.showToast({
title: "产品库存不足,请选择其它",
icon: "none",
duration: 2000
});
return;
}
let q = { let q = {
productId: that.id, productId: that.id,
cartNum: that.attr.productSelect.cart_num, cartNum: that.attr.productSelect.cart_num,
@ -584,12 +600,16 @@ export default {
if (news) { if (news) {
that.$yrouter.push({ that.$yrouter.push({
path: "/pages/order/OrderSubmission/index", path: "/pages/order/OrderSubmission/index",
query: { id: res.data.cartId } query: {
id: res.data.cartId
}
}); });
} else { } else {
that.$dialog.toast({ uni.showToast({
mes: "添加购物车成功", title: "添加购物车成功",
callback: () => { icon: "success",
duration: 2000,
complete: () => {
that.getCartCount(true); that.getCartCount(true);
} }
}); });
@ -609,7 +629,9 @@ export default {
let that = this; let that = this;
const isLogin = that.isLogin; const isLogin = that.isLogin;
if (isLogin) { if (isLogin) {
getCartCount({ numType: 0 }).then(res => { getCartCount({
numType: 0
}).then(res => {
that.CartCount = res.data.count; that.CartCount = res.data.count;
// //
if (isAnima) { if (isAnima) {
@ -648,10 +670,12 @@ export default {
top: 0; top: 0;
z-index: 10000; z-index: 10000;
} }
.product-con .store-info { .product-con .store-info {
margin-top: 0.2rem; margin-top: 0.2rem;
background-color: #fff; background-color: #fff;
} }
.product-con .store-info .title { .product-con .store-info .title {
padding: 0 0.3rem; padding: 0 0.3rem;
font-size: 0.28rem; font-size: 0.28rem;
@ -660,56 +684,70 @@ export default {
line-height: 0.8rem; line-height: 0.8rem;
border-bottom: 0.01rem solid #f5f5f5; border-bottom: 0.01rem solid #f5f5f5;
} }
.product-con .store-info .info { .product-con .store-info .info {
padding: 0 0.3rem; padding: 0 0.3rem;
height: 1.26rem; height: 1.26rem;
} }
.product-con .store-info .info .picTxt { .product-con .store-info .info .picTxt {
width: 6.15rem; width: 6.15rem;
} }
.product-con .store-info .info .picTxt .pictrue { .product-con .store-info .info .picTxt .pictrue {
width: 0.76rem; width: 0.76rem;
height: 0.76rem; height: 0.76rem;
} }
.product-con .store-info .info .picTxt .pictrue img {
.product-con .store-info .info .picTxt .pictrue image {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 0.06rem; border-radius: 0.06rem;
} }
.product-con .store-info .info .picTxt .text { .product-con .store-info .info .picTxt .text {
width: 5.22rem; width: 5.22rem;
} }
.product-con .store-info .info .picTxt .text .name { .product-con .store-info .info .picTxt .text .name {
font-size: 0.3rem; font-size: 0.3rem;
color: #282828; color: #282828;
} }
.product-con .store-info .info .picTxt .text .address { .product-con .store-info .info .picTxt .text .address {
font-size: 0.24rem; font-size: 0.24rem;
color: #666; color: #666;
margin-top: 0.03rem; margin-top: 0.03rem;
} }
.product-con .store-info .info .picTxt .text .address .iconfont { .product-con .store-info .info .picTxt .text .address .iconfont {
color: #707070; color: #707070;
font-size: 0.18rem; font-size: 0.18rem;
margin-left: 0.1rem; margin-left: 0.1rem;
} }
.product-con .store-info .info .picTxt .text .address .addressTxt { .product-con .store-info .info .picTxt .text .address .addressTxt {
width: 4.8rem; width: 4.8rem;
} }
.product-con .store-info .info .iconfont { .product-con .store-info .info .iconfont {
font-size: 0.4rem; font-size: 0.4rem;
} }
.product-con .superior { .product-con .superior {
background-color: #fff; background-color: #fff;
margin-top: 0.2rem; margin-top: 0.2rem;
} }
.product-con .superior .title { .product-con .superior .title {
height: 0.98rem; height: 0.98rem;
} }
.product-con .superior .title img {
.product-con .superior .title image {
width: 0.3rem; width: 0.3rem;
height: 0.3rem; height: 0.3rem;
} }
.product-con .superior .title .titleTxt { .product-con .superior .title .titleTxt {
margin: 0 0.2rem; margin: 0 0.2rem;
font-size: 0.3rem; font-size: 0.3rem;
@ -719,39 +757,48 @@ export default {
-webkit-background-clip: text; -webkit-background-clip: text;
-webkit-text-fill-color: transparent; -webkit-text-fill-color: transparent;
} }
.product-con .superior .slider-banner { .product-con .superior .slider-banner {
width: 6.9rem; width: 6.9rem;
margin: 0 auto; margin: 0 auto;
padding-bottom: 0.2rem; padding-bottom: 0.2rem;
} }
.product-con .superior .slider-banner .list { .product-con .superior .slider-banner .list {
width: 100%; width: 100%;
padding-bottom: 0.2rem; padding-bottom: 0.2rem;
} }
.product-con .superior .slider-banner .list .item { .product-con .superior .slider-banner .list .item {
width: 2.15rem; width: 2.15rem;
margin: 0 0.22rem 0.3rem 0; margin: 0 0.22rem 0.3rem 0;
font-size: 0.26rem; font-size: 0.26rem;
} }
.product-con .superior .slider-banner .list .item:nth-of-type(3n) { .product-con .superior .slider-banner .list .item:nth-of-type(3n) {
margin-right: 0; margin-right: 0;
} }
.product-con .superior .slider-banner .list .item .pictrue { .product-con .superior .slider-banner .list .item .pictrue {
width: 100%; width: 100%;
height: 2.15rem; height: 2.15rem;
} }
.product-con .superior .slider-banner .list .item .pictrue img {
.product-con .superior .slider-banner .list .item .pictrue image {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 0.06rem; border-radius: 0.06rem;
} }
.product-con .superior .slider-banner .list .item .name { .product-con .superior .slider-banner .list .item .name {
color: #282828; color: #282828;
margin-top: 0.12rem; margin-top: 0.12rem;
} }
.product-con .superior .slider-banner .swiper-pagination-bullet { .product-con .superior .slider-banner .swiper-pagination-bullet {
background-color: #999; background-color: #999;
} }
.product-con .superior .slider-banner .swiper-pagination-bullet-active { .product-con .superior .slider-banner .swiper-pagination-bullet-active {
background-color: #e93323; background-color: #e93323;
} }
@ -762,12 +809,15 @@ export default {
-ms-filter: blur(2px); -ms-filter: blur(2px);
filter: blur(2px); filter: blur(2px);
} }
.footer .icon-shoucang1 { .footer .icon-shoucang1 {
color: #73cbb6; color: #73cbb6;
} }
.product-con .product-intro .conter div {
.product-con .product-intro .conter view {
width: 100% !important; width: 100% !important;
} }
.generate-posters { .generate-posters {
width: 100%; width: 100%;
height: 1.7rem; height: 1.7rem;
@ -786,6 +836,7 @@ export default {
-moz-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9); -moz-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
-o-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9); -o-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
} }
.generate-posters.on { .generate-posters.on {
transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);
-webkit-transform: translate3d(0, 0, 0); -webkit-transform: translate3d(0, 0, 0);
@ -793,19 +844,23 @@ export default {
-moz-transform: translate3d(0, 0, 0); -moz-transform: translate3d(0, 0, 0);
-o-transform: translate3d(0, 0, 0); -o-transform: translate3d(0, 0, 0);
} }
.generate-posters .item { .generate-posters .item {
flex: 50%; flex: 50%;
-webkit-flex: 50%; -webkit-flex: 50%;
-ms-flex: 50%; -ms-flex: 50%;
text-align: center; text-align: center;
} }
.generate-posters .item .iconfont { .generate-posters .item .iconfont {
font-size: 0.8rem; font-size: 0.8rem;
color: #5eae72; color: #5eae72;
} }
.generate-posters .item .iconfont.icon-haibao { .generate-posters .item .iconfont.icon-haibao {
color: #5391f1; color: #5391f1;
} }
.noscroll { .noscroll {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;

366
pages/shop/GoodsEvaluate/index.vue

@ -1,58 +1,42 @@
<template> <template>
<div class="evaluate-con"> <view class="evaluate-con">
<div class="goodsStyle acea-row row-between" v-if="orderCon.productInfo"> <view class="goodsStyle acea-row row-between" v-if="orderCon.productInfo">
<div class="pictrue"> <view class="pictrue">
<img :src="orderCon.productInfo.image" class="image" /> <image :src="orderCon.productInfo.image" class="image" />
</div> </view>
<div class="text acea-row row-between"> <view class="text acea-row row-between">
<div class="name line2">{{ orderCon.productInfo.storeName }}</div> <view class="name line2">{{ orderCon.productInfo.storeName }}</view>
<div class="money"> <view class="money">
<div>{{ orderCon.productInfo.price }}</div> <view>{{ orderCon.productInfo.price }}</view>
<div class="num">x{{ orderCon.cartNum }}</div> <view class="num">x{{ orderCon.cartNum }}</view>
</div> </view>
</div> </view>
</div> </view>
<div class="score"> <view class="score">
<div <view class="item acea-row row-middle" v-for="(item, scoreListIndexw) in scoreList" :key="scoreListIndexw">
class="item acea-row row-middle" <view>{{ item.name }}</view>
v-for="(item, scoreListIndexw) in scoreList" <view class="starsList">
:key="scoreListIndexw" <text @click="stars(starsIndexn, scoreListIndexw)" v-for="(itemn, starsIndexn) in item.stars" :key="starsIndexn"
> class="iconfont" :class="
<div>{{ item.name }}</div>
<div class="starsList">
<span
@click="stars(starsIndexn, scoreListIndexw)"
v-for="(itemn, starsIndexn) in item.stars"
:key="starsIndexn"
class="iconfont"
:class="
item.index >= starsIndexn item.index >= starsIndexn
? 'icon-shitixing font-color-red' ? 'icon-shitixing font-color-red'
: 'icon-kongxinxing' : 'icon-kongxinxing'
" "></text>
></span> </view>
</div> <text class="evaluate">
<span class="evaluate"> {{
{{
item.index === -1 ? "" : item.index + 1 + "分" item.index === -1 ? "" : item.index + 1 + "分"
}} }}
</span> </text>
</div> </view>
<div class="textarea"> <view class="textarea">
<textarea placeholder="商品满足你的期待么?说说你的想法,分享给想买的他们吧~" v-model="expect"></textarea> <textarea placeholder="商品满足你的期待么?说说你的想法,分享给想买的他们吧~" v-model="expect"></textarea>
<div class="list acea-row row-middle"> <view class="list acea-row row-middle">
<div <view class="pictrue" v-for="(item, uploadPicturesIndex) in uploadPictures" :key="uploadPicturesIndex">
class="pictrue" <image :src="item" />
v-for="(item, uploadPicturesIndex) in uploadPictures" <text class="iconfont icon-guanbi1 font-color-red" @click="uploadPictures.splice(uploadPicturesIndex, 1)"></text>
:key="uploadPicturesIndex" </view>
> <!-- <VueCoreImageUpload
<img :src="item" />
<span
class="iconfont icon-guanbi1 font-color-red"
@click="uploadPictures.splice(uploadPicturesIndex, 1)"
></span>
</div>
<!-- <VueCoreImageUpload
class="btn btn-primary" class="btn btn-primary"
:crop="false" :crop="false"
compress="80" compress="80"
@ -65,142 +49,168 @@
:url="url" :url="url"
v-if="uploadPictures.length < 8" v-if="uploadPictures.length < 8"
> >
<div <view
class="pictrue uploadBnt acea-row row-center-wrapper row-column" class="pictrue uploadBnt acea-row row-center-wrapper row-column"
> >
<span class="iconfont icon-icon25201"></span> <text class="iconfont icon-icon25201"></text>
<div>上传图片</div> <view>上传图片</view>
</div> </view>
</VueCoreImageUpload>--> </VueCoreImageUpload>-->
</div> </view>
</div> </view>
<div class="evaluateBnt bg-color-red" @click="submit">立即评价</div> <view class="evaluateBnt bg-color-red" @click="submit">立即评价</view>
</div> </view>
</div> </view>
</template> </template>
<style scoped> <style scoped>
.evaluate-con .score .textarea .list .pictrue.uploadBnt { .evaluate-con .score .textarea .list .pictrue.uploadBnt {
border: 1px solid #ddd; border: 1px solid #ddd;
} }
</style> </style>
<script> <script>
import { postOrderProduct, postOrderComment } from "@/api/store"; import {
import { trim } from "@/utils"; postOrderProduct,
import { VUE_APP_API_URL } from "@/config"; postOrderComment
import { required } from "@/utils/validate"; } from "@/api/store";
import { validatorDefaultCatch } from "@/utils/dialog"; import {
trim
} from "@/utils";
import {
VUE_APP_API_URL
} from "@/config";
import {
required
} from "@/utils/validate";
import {
validatorDefaultCatch
} from "@/utils/dialog";
const NAME = "GoodsEvaluate"; const NAME = "GoodsEvaluate";
export default { export default {
name: NAME, name: NAME,
components: { components: {
// VueCoreImageUpload // VueCoreImageUpload
}, },
props: {}, props: {},
data: function() { data: function() {
return { return {
orderCon: { orderCon: {
cartProduct: { cartProduct: {
productInfo: {} productInfo: {}
} }
}, },
scoreList: [ scoreList: [{
{ name: "商品质量",
name: "商品质量", stars: ["", "", "", "", ""],
stars: ["", "", "", "", ""], index: -1
index: -1 },
}, {
{ name: "服务态度",
name: "服务态度", stars: ["", "", "", "", ""],
stars: ["", "", "", "", ""], index: -1
index: -1 }
} ],
], url: `${VUE_APP_API_URL}/api/qiNiuContent`,
url: `${VUE_APP_API_URL}/api/qiNiuContent`, headers: {
headers: { Authorization: "Bearer " + this.$store.state.token
Authorization: "Bearer " + this.$store.state.token },
}, uploadPictures: [],
uploadPictures: [], expect: "",
expect: "", unique: ""
unique: "" };
}; },
}, mounted: function() {
mounted: function() { this.unique = this.$yroute.query.id;
this.unique = this.$yroute.query.id; this.getOrderProduct();
this.getOrderProduct(); },
}, watch: {
watch: { $yroute(n) {
$yroute(n) { if (n.name === NAME && this.unique !== n.params.id) {
if (n.name === NAME && this.unique !== n.params.id) { this.unique = n.params.id;
this.unique = n.params.id; this.$set(this.scoreList[0], "index", -1);
this.$set(this.scoreList[0], "index", -1); this.$set(this.scoreList[1], "index", -1);
this.$set(this.scoreList[1], "index", -1); this.expect = "";
this.expect = ""; this.uploadPictures = [];
this.uploadPictures = []; this.getOrderProduct();
this.getOrderProduct(); }
} }
} },
}, methods: {
methods: { getOrderProduct: function() {
getOrderProduct: function() { let that = this,
let that = this, unique = that.unique;
unique = that.unique; postOrderProduct(unique).then(res => {
postOrderProduct(unique).then(res => { that.orderCon = res.data;
that.orderCon = res.data; });
}); },
}, stars: function(indexn, indexw) {
stars: function(indexn, indexw) { this.scoreList[indexw].index = indexn;
this.scoreList[indexw].index = indexn; },
}, imageuploaded(res) {
imageuploaded(res) { if (res.errno !== 0) {
if (res.errno !== 0) return this.$dialog.error(res.msg || "上传图片失败"); uni.showToast({
this.uploadPictures.push(res.data[0]); title: res.msg || "上传图片失败",
}, icon: 'none',
async submit() { duration: 2000
const expect = trim(this.expect), });
product_score = return
this.scoreList[0].index + 1 === 0 ? "" : this.scoreList[0].index + 1, }
service_score = this.uploadPictures.push(res.data[0]);
this.scoreList[1].index + 1 === 0 ? "" : this.scoreList[1].index + 1; },
try { async submit() {
await this.$validator({ const expect = trim(this.expect),
product_score: [ product_score =
required("请选择商品质量分数", { this.scoreList[0].index + 1 === 0 ? "" : this.scoreList[0].index + 1,
type: "number" service_score =
}) this.scoreList[1].index + 1 === 0 ? "" : this.scoreList[1].index + 1;
], try {
service_score: [ await this.$validator({
required("请选择服务态度分数", { product_score: [
type: "number" required("请选择商品质量分数", {
}) type: "number"
] })
}).validate({ product_score, service_score }); ],
} catch (e) { service_score: [
return validatorDefaultCatch(e); required("请选择服务态度分数", {
} type: "number"
postOrderComment({ })
productScore: product_score, ]
serviceScore: service_score, }).validate({
unique: this.unique, product_score,
pics: this.uploadPictures.join(","), service_score
comment: expect });
}) } catch (e) {
.then(() => { return validatorDefaultCatch(e);
uni.showToast({ }
title: "评价成功", postOrderComment({
icon: "success", productScore: product_score,
duration: 2000 serviceScore: service_score,
}); unique: this.unique,
this.$yrouter.push({ pics: this.uploadPictures.join(","),
path: "/pages/order/OrderDetails/index", comment: expect
query: { id: this.orderCon.orderId } })
}); .then(() => {
}) uni.showToast({
.catch(res => { title: "评价成功",
this.$dialog.error(res.msg); icon: "success",
}); duration: 2000
} });
} this.$yrouter.push({
}; path: "/pages/order/OrderDetails/index",
query: {
id: this.orderCon.orderId
}
});
})
.catch(err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
});
}
}
};
</script> </script>

92
pages/shop/GoodsList/index.vue

@ -1,45 +1,45 @@
<template> <template>
<div class="productList" ref="container"> <view class="productList" ref="container">
<form @submit.prevent="submitForm"> <form @submit.prevent="submitForm">
<div class="search bg-color-red acea-row row-between-wrapper"> <view class="search bg-color-red acea-row row-between-wrapper">
<div class="input acea-row row-between-wrapper"> <view class="input acea-row row-between-wrapper">
<span class="iconfont icon-sousuo"></span> <text class="iconfont icon-sousuo"></text>
<input placeholder="搜索商品信息" v-model="where.keyword" /> <input placeholder="搜索商品信息" v-model="where.keyword" />
</div> </view>
<div <view
class="iconfont" class="iconfont"
:class="Switch === true ? 'icon-pailie' : 'icon-tupianpailie'" :class="Switch === true ? 'icon-pailie' : 'icon-tupianpailie'"
@click="switchTap" @click="switchTap"
></div> ></view>
</div> </view>
</form> </form>
<div class="nav acea-row row-middle"> <view class="nav acea-row row-middle">
<div <view
class="item" class="item"
:class="title ? 'font-color-red' : ''" :class="title ? 'font-color-red' : ''"
@click="set_where(0)" @click="set_where(0)"
>{{ title ? title : "默认" }}</div> >{{ title ? title : "默认" }}</view>
<div class="item" @click="set_where(1)"> <view class="item" @click="set_where(1)">
价格 价格
<img :src="$VUE_APP_RESOURCES_URL+'/images/horn.png'" v-if="price === 0" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/horn.png'" v-if="price === 0" />
<img :src="$VUE_APP_RESOURCES_URL+'/images/up.png'" v-if="price === 1" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/up.png'" v-if="price === 1" />
<img :src="$VUE_APP_RESOURCES_URL+'/images/down.png'" v-if="price === 2" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/down.png'" v-if="price === 2" />
</div> </view>
<div class="item" @click="set_where(2)"> <view class="item" @click="set_where(2)">
销量 销量
<img :src="$VUE_APP_RESOURCES_URL+'/images/horn.png'" v-if="stock === 0" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/horn.png'" v-if="stock === 0" />
<img :src="$VUE_APP_RESOURCES_URL+'/images/up.png'" v-if="stock === 1" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/up.png'" v-if="stock === 1" />
<img :src="$VUE_APP_RESOURCES_URL+'/images/down.png'" v-if="stock === 2" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/down.png'" v-if="stock === 2" />
</div> </view>
<!-- down --> <!-- down -->
<div class="item" :class="nows ? 'font-color-red' : ''" @click="set_where(3)">新品</div> <view class="item" :class="nows ? 'font-color-red' : ''" @click="set_where(3)">新品</view>
</div> </view>
<div <view
class="list acea-row row-between-wrapper" class="list acea-row row-between-wrapper"
:class="Switch === true ? '' : 'on'" :class="Switch === true ? '' : 'on'"
ref="container" ref="container"
> >
<div <view
@click="goGoodsCon(item)" @click="goGoodsCon(item)"
class="item" class="item"
:class="Switch === true ? '' : 'on'" :class="Switch === true ? '' : 'on'"
@ -47,34 +47,34 @@
:key="productListIndex" :key="productListIndex"
:title="item.storeName" :title="item.storeName"
> >
<div class="pictrue" :class="Switch === true ? '' : 'on'"> <view class="pictrue" :class="Switch === true ? '' : 'on'">
<img :src="item.image" :class="Switch === true ? '' : 'on'" /> <image :src="item.image" :class="Switch === true ? '' : 'on'" />
</div> </view>
<div class="text" :class="Switch === true ? '' : 'on'"> <view class="text" :class="Switch === true ? '' : 'on'">
<div class="name line1">{{ item.storeName }}</div> <view class="name line1">{{ item.storeName }}</view>
<div class="money font-color-red" :class="Switch === true ? '' : 'on'"> <view class="money font-color-red" :class="Switch === true ? '' : 'on'">
<span class="num">{{ item.price }}</span> <text class="num">{{ item.price }}</text>
</div> </view>
<div class="vip acea-row row-between-wrapper" :class="Switch === true ? '' : 'on'"> <view class="vip acea-row row-between-wrapper" :class="Switch === true ? '' : 'on'">
<div class="vip-money">{{ item.otPrice }}</div> <view class="vip-money">{{ item.otPrice }}</view>
<div>已售{{ item.sales }}</div> <view>已售{{ item.sales }}</view>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<Loading :loaded="loadend" :loading="loading"></Loading> <Loading :loaded="loadend" :loading="loading"></Loading>
<div <view
class="noCommodity" class="noCommodity"
style="background-color: #fff;" style="background-color: #fff;"
v-if="productList.length === 0 && where.page > 1" v-if="productList.length === 0 && where.page > 1"
> >
<div class="noPictrue"> <view class="noPictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noGood.png'" class="image" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/noGood.png'" class="image" />
</div> </view>
</div> </view>
<Recommend v-if="productList.length === 0 && where.page > 1"></Recommend> <Recommend v-if="productList.length === 0 && where.page > 1"></Recommend>
</div> </view>
</template> </template>
<script> <script>
import Recommend from "@/components/Recommend"; import Recommend from "@/components/Recommend";

140
pages/shop/GoodsPromotion/index.vue

@ -1,72 +1,78 @@
<template> <template>
<div class="quality-recommend"> <view class="quality-recommend">
<div class="slider-banner swiper"> <view class="slider-banner swiper">
<swiper indicatorDots="true" v-if="banner.length > 0"> <swiper indicatorDots="true" v-if="banner.length > 0">
<block v-for="(item, imgUrlsIndex) in imgUrls" :key="imgUrlsIndex"> <block v-for="(item, imgUrlsIndex) in imgUrls" :key="imgUrlsIndex">
<swiper-item> <swiper-item>
<img :src="item.img" class="slide-image" /> <image :src="item.img" class="slide-image" />
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
</div> </view>
<div class="title acea-row row-center-wrapper"> <view class="title acea-row row-center-wrapper">
<div class="line"></div> <view class="line"></view>
<div class="name"> <view class="name">
<span class="iconfont icon-cuxiaoguanli"></span>促销单品 <text class="iconfont icon-cuxiaoguanli"></text>促销单品
</div> </view>
<div class="line"></div> <view class="line"></view>
</div> </view>
<Promotion-good :benefit="goodsList"></Promotion-good> <Promotion-good :benefit="goodsList"></Promotion-good>
</div> </view>
</template> </template>
<script> <script>
// import { swiper, swiperSlide } from "vue-awesome-swiper"; // import { swiper, swiperSlide } from "vue-awesome-swiper";
import PromotionGood from "@/components/PromotionGood"; import PromotionGood from "@/components/PromotionGood";
import { getGroomList } from "@/api/store"; import {
export default { getGroomList
name: "GoodsPromotion", } from "@/api/store";
components: { export default {
// swiper, name: "GoodsPromotion",
// swiperSlide, components: {
PromotionGood // swiper,
}, // swiperSlide,
props: {}, PromotionGood
data: function() { },
return { props: {},
imgUrls: [], data: function() {
goodsList: [], return {
RecommendSwiper: { imgUrls: [],
pagination: { goodsList: [],
el: ".swiper-pagination", RecommendSwiper: {
clickable: true pagination: {
}, el: ".swiper-pagination",
autoplay: { clickable: true
disableOnInteraction: false, },
delay: 2000 autoplay: {
}, disableOnInteraction: false,
loop: true, delay: 2000
speed: 1000, },
observer: true, loop: true,
observeParents: true speed: 1000,
} observer: true,
}; observeParents: true
}, }
mounted: function() { };
this.getIndexGroomList(); },
}, mounted: function() {
methods: { this.getIndexGroomList();
getIndexGroomList: function() { },
let that = this; methods: {
getGroomList(4) getIndexGroomList: function() {
.then(res => { let that = this;
that.imgUrls = res.data.banner; getGroomList(4)
that.goodsList = res.data.list; .then(res => {
}) that.imgUrls = res.data.banner;
.catch(function(res) { that.goodsList = res.data.list;
this.$dialog.toast({ mes: res.msg }); })
}); .catch((err) => {
} uni.showToast({
} title: err.msg || err.response.data.msg,
}; icon: 'none',
duration: 2000
});
});
}
}
};
</script> </script>

26
pages/shop/HotNewGoods/index.vue

@ -1,14 +1,14 @@
<template> <template>
<div class="quality-recommend"> <view class="quality-recommend">
<div class="title acea-row row-center-wrapper"> <view class="title acea-row row-center-wrapper">
<div class="line"></div> <view class="line"></view>
<div class="name"> <view class="name">
<span class="iconfont" :class="icon"></span>{{ name }} <text class="iconfont" :class="icon"></text>{{ name }}
</div> </view>
<div class="line"></div> <view class="line"></view>
</div> </view>
<GoodList :good-list="goodsList" :is-sort="false"></GoodList> <GoodList :good-list="goodsList" :is-sort="false"></GoodList>
</div> </view>
</template> </template>
<script> <script>
@ -71,8 +71,12 @@ export default {
that.imgUrls = res.data.banner; that.imgUrls = res.data.banner;
that.goodsList = res.data.list; that.goodsList = res.data.list;
}) })
.catch(function(res) { .catch((err)=> {
this.$dialog.toast({ mes: res.msg }); uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
}); });
} }
} }

926
pages/shop/ShoppingCart/index.vue

@ -1,143 +1,98 @@
<template> <template>
<div class="shoppingCart"> <view class="shoppingCart">
<div class="labelNav acea-row row-around row-middle"> <view class="labelNav acea-row row-around row-middle">
<div class="item"> <view class="item">
<span class="iconfont icon-xuanzhong"></span>100%正品保证 <text class="iconfont icon-xuanzhong"></text>100%正品保证
</div> </view>
<div class="item"> <view class="item">
<span class="iconfont icon-xuanzhong"></span>所有商品精挑细选 <text class="iconfont icon-xuanzhong"></text>所有商品精挑细选
</div> </view>
<div class="item"> <view class="item">
<span class="iconfont icon-xuanzhong"></span>售后无忧 <text class="iconfont icon-xuanzhong"></text>售后无忧
</div> </view>
</div> </view>
<div class="nav acea-row row-between-wrapper"> <view class="nav acea-row row-between-wrapper">
<div> <view>
购物数量 购物数量
<span class="num font-color-red">{{ count }}</span> <text class="num font-color-red">{{ count }}</text>
</div> </view>
<div <view v-if="cartList.valid.length > 0" class="administrate acea-row row-center-wrapper" @click="manage">{{ footerswitch ? "取消" : "管理" }}</view>
v-if="cartList.valid.length > 0" </view>
class="administrate acea-row row-center-wrapper" <view v-if="validList.length > 0 || cartList.invalid.length > 0">
@click="manage" <view class="list">
>{{ footerswitch ? "取消" : "管理" }}</div> <view class="item acea-row row-between-wrapper" v-for="(item, cartListValidIndex) in validList" :key="cartListValidIndex">
</div> <view class="select-btn">
<div v-if="validList.length > 0 || cartList.invalid.length > 0"> <view class="checkbox-wrapper">
<div class="list"> <checkbox-group @change="switchSelect(cartListValidIndex)">
<div <label class="well-check">
class="item acea-row row-between-wrapper" <checkbox value :checked="item.checked"></checkbox>
v-for="(item, cartListValidIndex) in validList" </label>
:key="cartListValidIndex" </checkbox-group>
> </view>
<div class="select-btn"> </view>
<div class="checkbox-wrapper"> <view class="picTxt acea-row row-between-wrapper">
<checkbox-group @change="switchSelect(cartListValidIndex)"> <view class="pictrue" @click="goGoodsCon(item)">
<label class="well-check"> <image :src="item.productInfo.attrInfo.image" v-if="item.productInfo.attrInfo" />
<checkbox value :checked="item.checked"></checkbox> <image :src="item.productInfo.image" v-else />
</label> </view>
</checkbox-group> <view class="text">
</div> <view class="line1">{{ item.productInfo.storeName }}</view>
</div> <view class="infor line1" v-if="item.productInfo.attrInfo">属性{{ item.productInfo.attrInfo.suk }}</view>
<div class="picTxt acea-row row-between-wrapper"> <view class="money">{{ item.truePrice }}</view>
<div class="pictrue" @click="goGoodsCon(item)"> </view>
<img :src="item.productInfo.attrInfo.image" v-if="item.productInfo.attrInfo" /> <view class="carnum acea-row row-center-wrapper">
<img :src="item.productInfo.image" v-else /> <view class="reduce" :class="validList[cartListValidIndex].cartNum <= 1 ? 'on' : ''" @click.prevent="reduce(cartListValidIndex)">-</view>
</div> <view class="num">{{ item.cartNum }}</view>
<div class="text"> <view class="plus" v-if="validList[cartListValidIndex].attrInfo" :class="validList[cartListValidIndex].cartNum >=validList[cartListValidIndex].attrInfo.stock? 'on': ''"
<div class="line1">{{ item.productInfo.storeName }}</div> @click.prevent="plus(cartListValidIndex)">+</view>
<div <view class="plus" v-else :class="validList[cartListValidIndex].cartNum >= validList[cartListValidIndex].stock? 'on': ''"
class="infor line1" @click.prevent="plus(cartListValidIndex)">+</view>
v-if="item.productInfo.attrInfo" </view>
>属性{{ item.productInfo.attrInfo.suk }}</div> </view>
<div class="money">{{ item.truePrice }}</div> </view>
</div> </view>
<div class="carnum acea-row row-center-wrapper"> <view class="invalidGoods" v-if="cartList.invalid.length > 0">
<div <view class="goodsNav acea-row row-between-wrapper">
class="reduce" <view @click="goodsOpen">
:class="validList[cartListValidIndex].cartNum <= 1 ? 'on' : ''" <text class="iconfont" :class="goodsHidden === true ? 'icon-xiangyou' : 'icon-xiangxia'"></text>失效商品
@click.prevent="reduce(cartListValidIndex)" </view>
>-</div> <view class="del" @click="delInvalidGoods">
<div class="num">{{ item.cartNum }}</div> <text class="iconfont icon-shanchu1"></text>清空
<div </view>
class="plus" </view>
v-if="validList[cartListValidIndex].attrInfo" <view class="goodsList" :hidden="goodsHidden">
:class=" <view v-for="(item, cartListinvalidIndex) in cartList.invalid" :key="cartListinvalidIndex">
validList[cartListValidIndex].cartNum >= <view @click="goGoodsCon(item)" class="item acea-row row-between-wrapper" v-if="item.productInfo">
validList[cartListValidIndex].attrInfo.stock <view class="invalid acea-row row-center-wrapper">失效</view>
? 'on' <view class="pictrue">
: '' <image :src="item.productInfo.attrInfo.image" v-if="item.productInfo.attrInfo" />
" <image :src="item.productInfo.image" v-else />
@click.prevent="plus(cartListValidIndex)" </view>
>+</div> <view class="text acea-row row-column-between">
<div <view class="line1">{{ item.productInfo.storeName }}</view>
class="plus" <view class="infor line1" v-if="item.productInfo.attrInfo">属性{{ item.productInfo.attrInfo.suk }}</view>
v-else <view class="acea-row row-between-wrapper">
:class=" <view class="end">该商品已下架</view>
validList[cartListValidIndex].cartNum >= validList[cartListValidIndex].stock </view>
? 'on' </view>
: '' </view>
" </view>
@click.prevent="plus(cartListValidIndex)" </view>
>+</div> </view>
</div> </view>
</div> <!--购物车暂无商品-->
</div> <view class="noCart" v-if="cartList.valid.length === 0 && cartList.invalid.length === 0">
</div> <view class="pictrue">
<div class="invalidGoods" v-if="cartList.invalid.length > 0"> <image :src="$VUE_APP_RESOURCES_URL+'/images/noCart.png'" />
<div class="goodsNav acea-row row-between-wrapper"> </view>
<div @click="goodsOpen"> <Recommend></Recommend>
<span </view>
class="iconfont" <view style="height:2.1rem"></view>
:class="goodsHidden === true ? 'icon-xiangyou' : 'icon-xiangxia'" <view :class="['footer acea-row row-between-wrapper']" v-if="cartList.valid.length > 0">
></span>失效商品 <view>
</div> <view class="select-btn">
<div class="del" @click="delInvalidGoods"> <view class="checkbox-wrapper">
<span class="iconfont icon-shanchu1"></span>清空 <!-- <label class="well-check">
</div>
</div>
<div class="goodsList" :hidden="goodsHidden">
<div v-for="(item, cartListinvalidIndex) in cartList.invalid" :key="cartListinvalidIndex">
<div
@click="goGoodsCon(item)"
class="item acea-row row-between-wrapper"
v-if="item.productInfo"
>
<div class="invalid acea-row row-center-wrapper">失效</div>
<div class="pictrue">
<img :src="item.productInfo.attrInfo.image" v-if="item.productInfo.attrInfo" />
<img :src="item.productInfo.image" v-else />
</div>
<div class="text acea-row row-column-between">
<div class="line1">{{ item.productInfo.storeName }}</div>
<div
class="infor line1"
v-if="item.productInfo.attrInfo"
>属性{{ item.productInfo.attrInfo.suk }}</div>
<div class="acea-row row-between-wrapper">
<div class="end">该商品已下架</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--购物车暂无商品-->
<div class="noCart" v-if="cartList.valid.length === 0 && cartList.invalid.length === 0">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noCart.png'" />
</div>
<Recommend></Recommend>
</div>
<div style="height:2.1rem"></div>
<div
:class="['footer acea-row row-between-wrapper']"
v-if="cartList.valid.length > 0"
>
<div>
<div class="select-btn">
<div class="checkbox-wrapper">
<!-- <label class="well-check">
<input <input
type="checkbox" type="checkbox"
name name
@ -146,343 +101,378 @@
@click="allChecked" @click="allChecked"
/> />
<i class="icon"></i> <i class="icon"></i>
<span class="checkAll">全选 ({{ cartCount }})</span> <text class="checkAll">全选 ({{ cartCount }})</text>
</label>--> </label>-->
<checkbox-group @change="allChecked"> <checkbox-group @change="allChecked">
<label class="well-check"> <label class="well-check">
<checkbox value :checked="isAllSelect && cartCount > 0"></checkbox> <checkbox value :checked="isAllSelect && cartCount > 0"></checkbox>
<span class="checkAll">全选 ({{ cartCount }})</span> <text class="checkAll">全选 ({{ cartCount }})</text>
</label> </label>
</checkbox-group> </checkbox-group>
</div> </view>
</div> </view>
</div> </view>
<div class="money acea-row row-middle" v-if="footerswitch === false"> <view class="money acea-row row-middle" v-if="footerswitch === false">
<span class="font-color-red">{{ countmoney }}</span> <text class="font-color-red">{{ countmoney }}</text>
<div class="placeOrder bg-color-red" @click="placeOrder">立即下单</div> <view class="placeOrder bg-color-red" @click="placeOrder">立即下单</view>
</div> </view>
<div class="button acea-row row-middle" v-else> <view class="button acea-row row-middle" v-else>
<div class="bnt cart-color" @click="collectAll">收藏</div> <view class="bnt cart-color" @click="collectAll">收藏</view>
<div class="bnt" @click="delgoods">删除</div> <view class="bnt" @click="delgoods">删除</view>
</div> </view>
</div> </view>
</div> </view>
</template> </template>
<script> <script>
import Recommend from "@/components/Recommend"; import Recommend from "@/components/Recommend";
import { import {
getCartList, getCartList,
postCartDel, postCartDel,
changeCartNum, changeCartNum,
getCartCount getCartCount
} from "@/api/store"; } from "@/api/store";
import { postCollectAll } from "@/api/user"; import {
import { mul, add } from "@/utils/bc"; postCollectAll
import cookie from "@/utils/store/cookie"; } from "@/api/user";
import debounce from "lodash.debounce"; import {
mul,
add
} from "@/utils/bc";
import cookie from "@/utils/store/cookie";
import debounce from "lodash.debounce";
const CHECKED_IDS = "cart_checked"; const CHECKED_IDS = "cart_checked";
export default { export default {
name: "ShoppingCart", name: "ShoppingCart",
components: { components: {
Recommend Recommend
}, },
props: {}, props: {},
data: function() { data: function() {
return { return {
isIpx: false, isIpx: false,
cartList: { invalid: [], valid: [] }, cartList: {
validList: [], invalid: [],
isAllSelect: false, valid: []
cartCount: 0, },
countmoney: 0, validList: [],
goodsHidden: true, isAllSelect: false,
footerswitch: false, cartCount: 0,
count: 0, countmoney: 0,
checkedIds: [], goodsHidden: true,
loaded: false footerswitch: false,
}; count: 0,
}, checkedIds: [],
watch: { loaded: false
$yroute(n) { };
if (n.name === "ShoppingCart") { },
this.carnum(); watch: {
this.countMoney(); $yroute(n) {
this.getCartList(); if (n.name === "ShoppingCart") {
this.gainCount(); this.carnum();
this.goodsHidden = true; this.countMoney();
this.footerswitch = false; this.getCartList();
} this.gainCount();
}, this.goodsHidden = true;
cartList(list) { this.footerswitch = false;
this.validList = list.valid; }
} },
}, cartList(list) {
mounted: function() { this.validList = list.valid;
let that = this; }
that.carnum(); },
that.countMoney(); mounted: function() {
that.getCartList(); let that = this;
that.gainCount(); that.carnum();
wx.getSystemInfo({ that.countMoney();
success: function(res) { that.getCartList();
console.log(res); that.gainCount();
var name = "iPhone X"; wx.getSystemInfo({
if (res.model.indexOf(name) > -1) { success: function(res) {
that.isIpx = true; console.log(res);
} var name = "iPhone X";
} if (res.model.indexOf(name) > -1) {
}); that.isIpx = true;
}, }
methods: { }
goGoodsCon(item) { });
this.$yrouter.push({ },
path: "/pages/shop/GoodsCon/index", methods: {
query: { id: item.productId } goGoodsCon(item) {
}); this.$yrouter.push({
}, path: "/pages/shop/GoodsCon/index",
getCartList: function() { query: {
let that = this; id: item.productId
getCartList().then(res => { }
that.cartList = res.data; });
let checkedIds = cookie.get(CHECKED_IDS) || []; },
if (!Array.isArray(checkedIds)) checkedIds = []; getCartList: function() {
this.cartList.valid.forEach(cart => { let that = this;
if (checkedIds.indexOf(cart.id) !== -1) cart.checked = true; getCartList().then(res => {
}); that.cartList = res.data;
if (checkedIds.length) { let checkedIds = cookie.get(CHECKED_IDS) || [];
that.checkedIds = checkedIds; if (!Array.isArray(checkedIds)) checkedIds = [];
that.isAllSelect = checkedIds.length === this.cartList.valid.length; this.cartList.valid.forEach(cart => {
that.carnum(); if (checkedIds.indexOf(cart.id) !== -1) cart.checked = true;
that.countMoney(); });
} if (checkedIds.length) {
this.loaded = true; that.checkedIds = checkedIds;
}); that.isAllSelect = checkedIds.length === this.cartList.valid.length;
}, that.carnum();
// that.countMoney();
delgoods: function() { }
let that = this, this.loaded = true;
id = [], });
valid = [], },
list = that.cartList.valid; //
list.forEach(function(val) { delgoods: function() {
if (val.checked === true) { let that = this,
id.push(val.id); id = [],
} valid = [],
}); list = that.cartList.valid;
if (id.length === 0) { list.forEach(function(val) {
that.$dialog.toast({ mes: "请选择产品" }); if (val.checked === true) {
return; id.push(val.id);
} }
postCartDel(id).then(function() { });
list.forEach(function(val, i) { if (id.length === 0) {
if (val.checked === false || val.checked === undefined) uni.showToast({
valid.push(list[i]); title: "请选择产品",
});
that.$set(that.cartList, "valid", valid);
that.carnum();
that.countMoney();
that.gainCount();
that.getCartList();
});
},
// //
gainCount: function() {
let that = this;
getCartCount().then(res => {
that.count = res.data.count;
});
},
//
delInvalidGoods: function() {
let that = this,
id = [],
list = that.cartList.invalid;
list.forEach(function(val) {
id.push(val.id);
});
postCartDel(id).then(function() {
list.splice(0, list.length);
that.gainCount();
that.getCartList();
});
},
//;
collectAll: function() {
let that = this,
data = { id: [], category: "" },
list = that.cartList.valid;
list.forEach(function(val) {
if (val.checked === true) {
data.id.push(val.product_id);
data.category = val.type;
}
});
if (data.id.length === 0) {
that.$dialog.toast({ mes: "请选择产品" });
return;
}
postCollectAll(data).then(function() {
that.$dialog.toast({ mes: "收藏成功!" });
});
},
//
placeOrder: function() {
let that = this,
list = that.cartList.valid,
id = [];
list.forEach(function(val) {
if (val.checked === true) {
id.push(val.id);
}
});
if (id.length === 0) {
that.$dialog.toast({ mes: "请选择产品" });
return;
}
console.log(id);
this.$yrouter.push({
path: "/pages/order/OrderSubmission/index",
query: { id: id.join(",") }
});
},
manage: function() {
let that = this;
that.footerswitch = !that.footerswitch;
},
goodsOpen: function() {
let that = this;
that.goodsHidden = !that.goodsHidden;
},
//
plus: function(index) {
let that = this;
let list = that.cartList.valid[index];
list.cartNum++;
if (list.attrInfo) {
if (list.cartNum >= list.attrInfo.stock) {
that.$set(list, "cart_num", list.attrInfo.stock);
}
} else {
if (list.cartNum >= list.stock) {
that.$set(list, "cart_num", list.stock);
}
}
that.carnum();
that.countMoney();
that.syncCartNum(list);
},
//
reduce: function(index) {
let that = this;
let list = that.cartList.valid[index];
if (list.cartNum <= 1) {
that.$dialog.toast({ mes: "已经是底线啦!" });
return;
}
list.cartNum--;
if (list.cartNum < 1) {
that.$set(list, "cart_num", 1);
}
that.carnum();
that.countMoney();
that.syncCartNum(list);
},
syncCartNum(cart) {
if (!cart.sync) {
changeCartNum(cart.id, Math.max(cart.cartNum, 1) || 1)
.then(res => {
this.getCartList();
})
.catch(error => {
uni.showToast({
title: error.response.data.msg,
icon: "none", icon: "none",
duration: 2000 duration: 2000
}); });
}); return;
} }
}, postCartDel(id).then(function() {
// list.forEach(function(val, i) {
switchSelect: function(index) { if (val.checked === false || val.checked === undefined)
let that = this, valid.push(list[i]);
cart = that.cartList.valid[index], });
i = this.checkedIds.indexOf(cart.id); that.$set(that.cartList, "valid", valid);
cart.checked = !cart.checked; that.carnum();
that.countMoney();
that.gainCount();
that.getCartList();
});
},
// //
gainCount: function() {
let that = this;
getCartCount().then(res => {
that.count = res.data.count;
});
},
//
delInvalidGoods: function() {
let that = this,
id = [],
list = that.cartList.invalid;
list.forEach(function(val) {
id.push(val.id);
});
postCartDel(id).then(function() {
list.splice(0, list.length);
that.gainCount();
that.getCartList();
});
},
//;
collectAll: function() {
let that = this,
data = {
id: [],
category: ""
},
list = that.cartList.valid;
list.forEach(function(val) {
if (val.checked === true) {
data.id.push(val.product_id);
data.category = val.type;
}
});
if (data.id.length === 0) {
uni.showToast({
title: "请选择产品",
icon: "none",
duration: 2000
});
return;
}
postCollectAll(data).then(function() {
uni.showToast({
title: "收藏成功!",
icon: "none",
duration: 2000
});
});
},
//
placeOrder: function() {
let that = this,
list = that.cartList.valid,
id = [];
list.forEach(function(val) {
if (val.checked === true) {
id.push(val.id);
}
});
if (id.length === 0) {
uni.showToast({
title: "请选择产品",
icon: "none",
duration: 2000
});
return;
}
console.log(id);
this.$yrouter.push({
path: "/pages/order/OrderSubmission/index",
query: {
id: id.join(",")
}
});
},
manage: function() {
let that = this;
that.footerswitch = !that.footerswitch;
},
goodsOpen: function() {
let that = this;
that.goodsHidden = !that.goodsHidden;
},
//
plus: function(index) {
let that = this;
let list = that.cartList.valid[index];
list.cartNum++;
if (list.attrInfo) {
if (list.cartNum >= list.attrInfo.stock) {
that.$set(list, "cart_num", list.attrInfo.stock);
}
} else {
if (list.cartNum >= list.stock) {
that.$set(list, "cart_num", list.stock);
}
}
that.carnum();
that.countMoney();
that.syncCartNum(list);
},
//
reduce: function(index) {
let that = this;
let list = that.cartList.valid[index];
if (list.cartNum <= 1) {
uni.showToast({
title: "已经是底线啦!",
icon: "none",
duration: 2000
});
return;
}
list.cartNum--;
if (list.cartNum < 1) {
that.$set(list, "cart_num", 1);
}
that.carnum();
that.countMoney();
that.syncCartNum(list);
},
syncCartNum(cart) {
if (!cart.sync) {
changeCartNum(cart.id, Math.max(cart.cartNum, 1) || 1)
.then(res => {
this.getCartList();
})
.catch(error => {
uni.showToast({
title: error.response.data.msg,
icon: "none",
duration: 2000
});
});
}
},
//
switchSelect: function(index) {
let that = this,
cart = that.cartList.valid[index],
i = this.checkedIds.indexOf(cart.id);
cart.checked = !cart.checked;
if (i !== -1) this.checkedIds.splice(i, 1); if (i !== -1) this.checkedIds.splice(i, 1);
if (cart.checked) { if (cart.checked) {
this.checkedIds.push(cart.id); this.checkedIds.push(cart.id);
} }
let len = that.cartList.valid.length; let len = that.cartList.valid.length;
let selectnum = []; let selectnum = [];
for (let i = 0; i < len; i++) { for (let i = 0; i < len; i++) {
if (that.cartList.valid[i].checked === true) { if (that.cartList.valid[i].checked === true) {
selectnum.push(true); selectnum.push(true);
} }
} }
that.isAllSelect = selectnum.length === len; that.isAllSelect = selectnum.length === len;
that.$set(that, "cartList", that.cartList); that.$set(that, "cartList", that.cartList);
that.$set(that, "isAllSelect", that.isAllSelect); that.$set(that, "isAllSelect", that.isAllSelect);
cookie.set(CHECKED_IDS, that.checkedIds); cookie.set(CHECKED_IDS, that.checkedIds);
that.carnum(); that.carnum();
that.countMoney(); that.countMoney();
}, },
// //
allChecked: function(e) { allChecked: function(e) {
let that = this; let that = this;
let selectAllStatus = e.mp.detail.value[0] ? true : false; let selectAllStatus = e.mp.detail.value[0] ? true : false;
// let selectAllStatus = that.isAllSelect; // let selectAllStatus = that.isAllSelect;
let checkedIds = []; let checkedIds = [];
// for (let i = 0; i < array.length; i++) { // for (let i = 0; i < array.length; i++) {
// array[i].checked = selectAllStatus; // array[i].checked = selectAllStatus;
// checked.push() // checked.push()
// } // }
that.cartList.valid.forEach(cart => { that.cartList.valid.forEach(cart => {
cart.checked = selectAllStatus; cart.checked = selectAllStatus;
if (selectAllStatus) { if (selectAllStatus) {
checkedIds.push(cart.id); checkedIds.push(cart.id);
} }
}); });
let cartList = { let cartList = {
...that.cartList ...that.cartList
}; };
that.cartList = []; that.cartList = [];
that.cartList = cartList; that.cartList = cartList;
this.$set(this, "cartList", this.cartList); this.$set(this, "cartList", this.cartList);
this.$set(this, "isAllSelect", selectAllStatus); this.$set(this, "isAllSelect", selectAllStatus);
this.checkedIds = checkedIds; this.checkedIds = checkedIds;
cookie.set(CHECKED_IDS, checkedIds); cookie.set(CHECKED_IDS, checkedIds);
that.carnum(); that.carnum();
that.countMoney(); that.countMoney();
this.$forceUpdate(); this.$forceUpdate();
}, },
// //
carnum: function() { carnum: function() {
let that = this; let that = this;
var carnum = 0; var carnum = 0;
var array = that.cartList.valid; var array = that.cartList.valid;
for (let i = 0; i < array.length; i++) { for (let i = 0; i < array.length; i++) {
if (array[i].checked === true) { if (array[i].checked === true) {
carnum += parseInt(array[i].cartNum); carnum += parseInt(array[i].cartNum);
} }
} }
that.$set(that, "cartCount", carnum); that.$set(that, "cartCount", carnum);
}, },
// //
countMoney: function() { countMoney: function() {
let that = this; let that = this;
let carmoney = 0; let carmoney = 0;
let array = that.cartList.valid; let array = that.cartList.valid;
for (let i = 0; i < array.length; i++) { for (let i = 0; i < array.length; i++) {
if (array[i].checked === true) { if (array[i].checked === true) {
carmoney = add(carmoney, mul(array[i].cartNum, array[i].truePrice)); carmoney = add(carmoney, mul(array[i].cartNum, array[i].truePrice));
} }
} }
that.countmoney = carmoney; that.countmoney = carmoney;
} }
} }
}; };
</script> </script>

28
pages/shop/news/NewsDetail/index.vue

@ -1,17 +1,17 @@
<template> <template>
<div class="newsDetail"> <view class="newsDetail">
<div class="title">{{ articleInfo.title }}</div> <view class="title">{{ articleInfo.title }}</view>
<div class="list acea-row row-middle"> <view class="list acea-row row-middle">
<div class="label cart-color line1">新闻专区</div> <view class="label cart-color line1">新闻专区</view>
<div class="item"> <view class="item">
<span class="iconfont icon-shenhezhong"></span>{{ articleInfo.addTime }} <text class="iconfont icon-shenhezhong"></text>{{ articleInfo.addTime }}
</div> </view>
<div class="item"> <view class="item">
<span class="iconfont icon-liulan"></span>{{ articleInfo.visit }} <text class="iconfont icon-liulan"></text>{{ articleInfo.visit }}
</div> </view>
</div> </view>
<div class="conter" v-html="articleInfo.content"></div> <view class="conter" v-html="articleInfo.content"></view>
</div> </view>
</template> </template>
<style scoped> <style scoped>
.newsDetail .picTxt { .newsDetail .picTxt {
@ -26,7 +26,7 @@
width: 2rem; width: 2rem;
height: 2rem; height: 2rem;
} }
.newsDetail .picTxt .pictrue img { .newsDetail .picTxt .pictrue image{
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 0.2rem 0 0 0.2rem; border-radius: 0.2rem 0 0 0.2rem;

36
pages/shop/news/NewsList/index.vue

@ -1,26 +1,26 @@
<template> <template>
<div class="newsList" ref="container"> <view class="newsList" ref="container">
<div class="list" v-for="(item, articleListIndex) in articleList" :key="articleListIndex"> <view class="list" v-for="(item, articleListIndex) in articleList" :key="articleListIndex">
<div @click="goNewsDetail(item)" class="item acea-row row-between-wrapper"> <view @click="goNewsDetail(item)" class="item acea-row row-between-wrapper">
<div class="text acea-row row-column-between"> <view class="text acea-row row-column-between">
<div class="name line2">{{ item.title }}</div> <view class="name line2">{{ item.title }}</view>
<div>{{ item.addTime }}</div> <view>{{ item.addTime }}</view>
</div> </view>
<div class="pictrue"> <view class="pictrue">
<img :src="item.imageInput" /> <image :src="item.imageInput" />
</div> </view>
</div> </view>
</div> </view>
<!--暂无新闻--> <!--暂无新闻-->
<div class="noCommodity" v-if="articleList.length === 0 && page > 1"> <view class="noCommodity" v-if="articleList.length === 0 && page > 1">
<div class="noPictrue"> <view class="noPictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noNews.png'" class="image" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/noNews.png'" class="image" />
</div> </view>
</div> </view>
<!--</Tab>--> <!--</Tab>-->
<!--</Tabs>--> <!--</Tabs>-->
</div> </view>
</template> </template>
<script> <script>
import { getArticleList } from "@/api/public"; import { getArticleList } from "@/api/public";

101
pages/user/BindingPhone/index.vue

@ -1,10 +1,10 @@
<template> <template>
<div class="ChangePassword"> <view class="ChangePassword">
<div class="list"> <view class="list">
<div class="item"> <view class="item">
<input type="number" placeholder="填写手机号码" v-model="phone" /> <input type="number" placeholder="填写手机号码" v-model="phone" />
</div> </view>
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" /> <input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
<button <button
class="code font-color-red" class="code font-color-red"
@ -12,10 +12,10 @@
:class="disabled === true ? 'on' : ''" :class="disabled === true ? 'on' : ''"
@click="code" @click="code"
>{{ text }}</button> >{{ text }}</button>
</div> </view>
</div> </view>
<div class="confirmBnt bg-color-red" @click="confirm">确认绑定</div> <view class="confirmBnt bg-color-red" @click="confirm">确认绑定</view>
</div> </view>
</template> </template>
<script> <script>
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
@ -63,55 +63,47 @@ export default {
}) })
.then(res => { .then(res => {
if (res.data !== undefined && res.data.is_bind) { if (res.data !== undefined && res.data.is_bind) {
that.$dialog.confirm({ uni.showModal({
mes: res.msg, title: "提示",
opts: [ content: "确认绑定?",
{ success: function(res) {
txt: "确认绑定", if (res.confirm) {
color: false, bindingPhone({
callback: () => { phone: this.phone,
bindingPhone({ captcha: this.captcha,
phone: this.phone, step: 1
captcha: this.captcha, })
step: 1 .then(res => {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
that.$yrouter.replace({
path: "/pages/user/PersonalData/index"
});
}) })
.then(res => { .catch(res => {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: "none", icon: "none",
duration: 2000 duration: 2000
}); });
that.$yrouter.replace({ that.$yrouter.replace({
path: "/pages/user/PersonalData/index" path: "/pages/user/PersonalData/index"
});
})
.catch(res => {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
that.$yrouter.replace({
path: "/pages/user/PersonalData/index"
});
}); });
}
},
{
txt: "取消",
color: false,
callback: () => {
uni.showToast({
title: "已取消绑定",
icon: "none",
duration: 2000
});
that.$yrouter.replace({
path: "/pages/user/PersonalData/index"
}); });
} } else if (res.cancel) {
uni.showToast({
title: "已取消绑定",
icon: "none",
duration: 2000
});
that.$yrouter.replace({
path: "/pages/user/PersonalData/index"
});
} }
] }
}); });
} else { } else {
uni.showToast({ uni.showToast({
@ -168,5 +160,4 @@ export default {
</script> </script>
<style lang=""> <style lang="">
</style> </style>

26
pages/user/ChangePassword/index.vue

@ -1,17 +1,17 @@
<template> <template>
<div class="ChangePassword"> <view class="ChangePassword">
<div class="phone"> <view class="phone">
当前手机号: 当前手机号:
<input type="text" v-model="phone" disabled /> <input type="text" v-model="phone" disabled />
</div> </view>
<div class="list"> <view class="list">
<div class="item"> <view class="item">
<input type="password" placeholder="设置新密码" v-model="password" /> <input type="password" placeholder="设置新密码" v-model="password" />
</div> </view>
<div class="item"> <view class="item">
<input type="password" placeholder="确认新密码" v-model="password2" /> <input type="password" placeholder="确认新密码" v-model="password2" />
</div> </view>
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" /> <input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
<button <button
class="code font-color-red" class="code font-color-red"
@ -19,10 +19,10 @@
:class="disabled === true ? 'on' : ''" :class="disabled === true ? 'on' : ''"
@click="code" @click="code"
>{{ text }}</button> >{{ text }}</button>
</div> </view>
</div> </view>
<div class="confirmBnt bg-color-red" @click="confirm">确认修改</div> <view class="confirmBnt bg-color-red" @click="confirm">确认修改</view>
</div> </view>
</template> </template>
<style scoped> <style scoped>
.ChangePassword .phone input { .ChangePassword .phone input {

18
pages/user/CustomerList/index.vue

@ -1,17 +1,17 @@
<template> <template>
<div class="CustomerList"> <view class="CustomerList">
<div <view
class="item acea-row row-between-wrapper" class="item acea-row row-between-wrapper"
v-for="item in list" v-for="item in list"
:key="item.id" :key="item.id"
@click="goCustomerService(item)" @click="goCustomerService(item)"
> >
<div class="pictrue"> <view class="pictrue">
<img :src="item.avatar" /> <image :src="item.avatar" />
</div> </view>
<div class="text line1">{{ item.nickname }}</div> <view class="text line1">{{ item.nickname }}</view>
</div> </view>
</div> </view>
</template> </template>
<script> <script>
import { serviceList } from "@/api/user"; import { serviceList } from "@/api/user";
@ -60,7 +60,7 @@ export default {
-webkit-box-shadow: 0 0 0.1rem 0.05rem #f3f3f3; -webkit-box-shadow: 0 0 0.1rem 0.05rem #f3f3f3;
-moz-box-shadow: 0 0 0.1rem 0.05rem #f3f3f3; -moz-box-shadow: 0 0 0.1rem 0.05rem #f3f3f3;
} }
.CustomerList .item .pictrue img { .CustomerList .item .pictrue image{
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 50%; border-radius: 50%;

264
pages/user/Login/index.vue

@ -1,143 +1,113 @@
<template> <template>
<div class="register absolute"> <view class="register absolute">
<div class="shading"> <view class="shading">
<div class="pictrue acea-row row-center-wrapper"> <view class="pictrue acea-row row-center-wrapper">
<img src="@/assets/images/logo.png" /> <image src="@/assets/images/logo.png" />
</div> </view>
</div> </view>
<div class="whiteBg" v-if="formItem === 1"> <view class="whiteBg" v-if="formItem === 1">
<div class="title acea-row row-center-wrapper"> <view class="title acea-row row-center-wrapper">
<div <view
class="item" class="item"
:class="current === index ? 'on' : ''" :class="current === index ? 'on' : ''"
v-for="(item, index) in navList" v-for="(item, index) in navList"
@click="navTap(index)" @click="navTap(index)"
:key="index" :key="index"
> >{{ item }}</view>
{{ item }} </view>
</div> <view class="list" :hidden="current !== 0">
</div>
<div class="list" :hidden="current !== 0">
<form @submit.prevent="submit"> <form @submit.prevent="submit">
<div class="item"> <view class="item">
<div class="acea-row row-between-wrapper"> <view class="acea-row row-between-wrapper">
<svg class="icon" aria-hidden="true"> <svg class="icon" aria-hidden="true">
<use xlink:href="#icon-phone_"></use> <use xlink:href="#icon-phone_" />
</svg> </svg>
<input <input type="text" placeholder="输入手机号码" v-model="account" required />
type="text" </view>
placeholder="输入手机号码" </view>
v-model="account" <view class="item">
required <view class="acea-row row-between-wrapper">
/>
</div>
</div>
<div class="item">
<div class="acea-row row-between-wrapper">
<svg class="icon" aria-hidden="true"> <svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_"></use> <use xlink:href="#icon-code_" />
</svg> </svg>
<input <input type="password" placeholder="填写登录密码" v-model="password" required />
type="password" </view>
placeholder="填写登录密码" </view>
v-model="password"
required
/>
</div>
</div>
</form> </form>
</div> </view>
<div class="list" :hidden="current !== 1"> <view class="list" :hidden="current !== 1">
<div class="item"> <view class="item">
<div class="acea-row row-between-wrapper"> <view class="acea-row row-between-wrapper">
<svg class="icon" aria-hidden="true"> <svg class="icon" aria-hidden="true">
<use xlink:href="#icon-phone_"></use> <use xlink:href="#icon-phone_" />
</svg> </svg>
<input type="text" placeholder="输入手机号码" v-model="account" /> <input type="text" placeholder="输入手机号码" v-model="account" />
</div> </view>
</div> </view>
<div class="item"> <view class="item">
<div class="align-left"> <view class="align-left">
<svg class="icon" aria-hidden="true"> <svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_1"></use> <use xlink:href="#icon-code_1" />
</svg> </svg>
<input <input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
type="text"
placeholder="填写验证码"
class="codeIput"
v-model="captcha"
/>
<button <button
class="code" class="code"
:disabled="disabled" :disabled="disabled"
:class="disabled === true ? 'on' : ''" :class="disabled === true ? 'on' : ''"
@click="code" @click="code"
> >{{ text }}</button>
{{ text }} </view>
</button> </view>
</div> </view>
</div> <view class="logon" @click="loginMobile" :hidden="current !== 1">登录</view>
</div> <view class="logon" @click="submit" :hidden="current === 1">登录</view>
<div class="logon" @click="loginMobile" :hidden="current !== 1">登录</div> <view class="tip">
<div class="logon" @click="submit" :hidden="current === 1">登录</div>
<div class="tip">
没有账号? 没有账号?
<span @click="formItem = 2" class="font-color-red">立即注册</span> <text @click="formItem = 2" class="font-color-red">立即注册</text>
</div> </view>
</div> </view>
<div class="whiteBg" v-else> <view class="whiteBg" v-else>
<div class="title">注册账号</div> <view class="title">注册账号</view>
<div class="list"> <view class="list">
<div class="item"> <view class="item">
<div> <view>
<svg class="icon" aria-hidden="true"> <svg class="icon" aria-hidden="true">
<use xlink:href="#icon-phone_"></use> <use xlink:href="#icon-phone_" />
</svg> </svg>
<input type="text" placeholder="输入手机号码" v-model="account" /> <input type="text" placeholder="输入手机号码" v-model="account" />
</div> </view>
</div> </view>
<div class="item"> <view class="item">
<div class="align-left"> <view class="align-left">
<svg class="icon" aria-hidden="true"> <svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_1"></use> <use xlink:href="#icon-code_1" />
</svg> </svg>
<input <input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
type="text"
placeholder="填写验证码"
class="codeIput"
v-model="captcha"
/>
<button <button
class="code" class="code"
:disabled="disabled" :disabled="disabled"
:class="disabled === true ? 'on' : ''" :class="disabled === true ? 'on' : ''"
@click="code" @click="code"
> >{{ text }}</button>
{{ text }} </view>
</button> </view>
</div> <view class="item">
</div> <view>
<div class="item">
<div>
<svg class="icon" aria-hidden="true"> <svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_"></use> <use xlink:href="#icon-code_" />
</svg> </svg>
<input <input type="password" placeholder="填写您的登录密码" v-model="password" />
type="password" </view>
placeholder="填写您的登录密码" </view>
v-model="password" </view>
/> <view class="logon" @click="register">注册</view>
</div> <view class="tip">
</div>
</div>
<div class="logon" @click="register">注册</div>
<div class="tip">
已有账号? 已有账号?
<span @click="formItem = 1" class="font-color-red">立即登录</span> <text @click="formItem = 1" class="font-color-red">立即登录</text>
</div> </view>
</div> </view>
<div class="bottom"></div> <view class="bottom"></view>
</div> </view>
</template> </template>
<script> <script>
import sendVerifyCode from "@/mixins/SendVerifyCode"; import sendVerifyCode from "@/mixins/SendVerifyCode";
@ -179,7 +149,10 @@ export default {
alpha_num(alpha_num.message("验证码")) alpha_num(alpha_num.message("验证码"))
] ]
}) })
.validate({ account, captcha }); .validate({
account,
captcha
});
} catch (e) { } catch (e) {
return validatorDefaultCatch(e); return validatorDefaultCatch(e);
} }
@ -193,10 +166,16 @@ export default {
that.$store.commit("LOGIN", data.token, dayjs(data.expires_time)); that.$store.commit("LOGIN", data.token, dayjs(data.expires_time));
const backUrl = cookie.get(BACK_URL) || "/"; const backUrl = cookie.get(BACK_URL) || "/";
cookie.remove(BACK_URL); cookie.remove(BACK_URL);
that.$yrouter.replace({ path: backUrl }); that.$yrouter.replace({
path: backUrl
});
}) })
.catch(res => { .catch(err => {
that.$dialog.error(res.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
}); });
}, },
async register() { async register() {
@ -219,7 +198,11 @@ export default {
alpha_num(alpha_num.message("密码")) alpha_num(alpha_num.message("密码"))
] ]
}) })
.validate({ account, captcha, password }); .validate({
account,
captcha,
password
});
} catch (e) { } catch (e) {
return validatorDefaultCatch(e); return validatorDefaultCatch(e);
} }
@ -230,11 +213,19 @@ export default {
spread: cookie.get("spread") spread: cookie.get("spread")
}) })
.then(res => { .then(res => {
that.$dialog.success(res.msg); uni.showToast({
title: res.msg,
icon: "success",
duration: 2000
});
that.formItem = 1; that.formItem = 1;
}) })
.catch(res => { .catch(err => {
that.$dialog.error(res.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
}); });
}, },
async code() { async code() {
@ -248,25 +239,38 @@ export default {
chs_phone(chs_phone.message()) chs_phone(chs_phone.message())
] ]
}) })
.validate({ account }); .validate({
account
});
} catch (e) { } catch (e) {
return validatorDefaultCatch(e); return validatorDefaultCatch(e);
} }
if (that.formItem == 2) that.type = "register"; if (that.formItem == 2) that.type = "register";
await registerVerify({ phone: that.account, type: that.type }) await registerVerify({
phone: that.account,
type: that.type
})
.then(res => { .then(res => {
that.$dialog.success(res.msg); uni.showToast({
title: res.msg,
icon: "success",
duration: 2000
});
that.sendCode(); that.sendCode();
}) })
.catch(res => { .catch(err => {
that.$dialog.error(res.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
}); });
}, },
navTap: function(index) { navTap: function(index) {
this.current = index; this.current = index;
}, },
async submit() { async submit() {
console.log('spread:'+cookie.get("spread") ) console.log("spread:" + cookie.get("spread"));
const { account, password } = this; const { account, password } = this;
try { try {
await this.$validator({ await this.$validator({
@ -280,21 +284,33 @@ export default {
attrs.range([6, 16], attrs.range.message("密码")), attrs.range([6, 16], attrs.range.message("密码")),
alpha_num(alpha_num.message("密码")) alpha_num(alpha_num.message("密码"))
] ]
}).validate({ account, password }); }).validate({
account,
password
});
} catch (e) { } catch (e) {
return validatorDefaultCatch(e); return validatorDefaultCatch(e);
} }
login({
login({ username: account, password, spread: cookie.get("spread") }) username: account,
password,
spread: cookie.get("spread")
})
.then(({ data }) => { .then(({ data }) => {
this.$store.commit("LOGIN", data.token, dayjs(data.expires_time)); this.$store.commit("LOGIN", data.token, dayjs(data.expires_time));
const backUrl = cookie.get(BACK_URL) || "/"; const backUrl = cookie.get(BACK_URL) || "/";
cookie.remove(BACK_URL); cookie.remove(BACK_URL);
this.$yrouter.replace({ path: backUrl }); this.$yrouter.replace({
path: backUrl
});
}) })
.catch(e => { .catch(err => {
this.$dialog.error(e.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
}); });
} }
} }

175
pages/user/PersonalData/index.vue

@ -1,16 +1,16 @@
<template> <template>
<div class="personal-data"> <view class="personal-data">
<div class="wrapper"> <view class="wrapper">
<div class="title">管理我的账号</div> <view class="title">管理我的账号</view>
<div class="wrapList"> <view class="wrapList">
<div <view
class="item acea-row row-between-wrapper" class="item acea-row row-between-wrapper"
:class="item.uid === userInfo.uid ? 'on' : ''" :class="item.uid === userInfo.uid ? 'on' : ''"
v-for="(item, switchUserInfoIndex) in switchUserInfo" v-for="(item, switchUserInfoIndex) in switchUserInfo"
:key="switchUserInfoIndex" :key="switchUserInfoIndex"
> >
<div class="picTxt acea-row row-between-wrapper"> <view class="picTxt acea-row row-between-wrapper">
<div class="pictrue"> <view class="pictrue">
<!-- <VueCoreImageUpload <!-- <VueCoreImageUpload
class="btn btn-primary" class="btn btn-primary"
:crop="false" :crop="false"
@ -25,74 +25,74 @@
ref="upImg" ref="upImg"
v-if="item.uid === userInfo.uid" v-if="item.uid === userInfo.uid"
> >
<div class="pictrue"> <view class="pictrue">
<img :src="item.avatar" /> <image :src="item.avatar" />
</div> </view>
</VueCoreImageUpload>--> </VueCoreImageUpload>-->
<!-- <div class="pictrue" v-else> <!-- <view class="pictrue" v-else>
<img :src="item.avatar" /> <image :src="item.avatar" />
</div>--> </view>-->
<img <img
:src="$VUE_APP_RESOURCES_URL+'/images/alter.png'" :src="$VUE_APP_RESOURCES_URL+'/images/alter.png'"
class="alter" class="alter"
v-if="item.uid === userInfo.uid" v-if="item.uid === userInfo.uid"
/> />
</div> </view>
<div class="text"> <view class="text">
<div class="name line1">{{ item.nickname }}</div> <view class="name line1">{{ item.nickname }}</view>
<div class="phone">绑定手机号{{ item.phone }}</div> <view class="phone">绑定手机号{{ item.phone }}</view>
</div> </view>
</div> </view>
<div <view
class="currentBnt acea-row row-center-wrapper font-color-red" class="currentBnt acea-row row-center-wrapper font-color-red"
v-if="item.uid === userInfo.uid" v-if="item.uid === userInfo.uid"
>当前账号</div> >当前账号</view>
<div <view
class="bnt font-color-red acea-row row-center-wrapper" class="bnt font-color-red acea-row row-center-wrapper"
v-else v-else
@click="switchAccounts(index)" @click="switchAccounts(index)"
>使用账号</div> >使用账号</view>
</div> </view>
</div> </view>
</div> </view>
<div class="list"> <view class="list">
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div>昵称</div> <view>昵称</view>
<div class="input"> <view class="input">
<input type="text" v-model="userInfo.nickname" /> <input type="text" v-model="userInfo.nickname" />
</div> </view>
</div> </view>
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div>ID号</div> <view>ID号</view>
<div class="input acea-row row-between-wrapper"> <view class="input acea-row row-between-wrapper">
<input type="text" :value="userInfo.uid" disabled class="id" /> <input type="text" :value="userInfo.uid" disabled class="id" />
<span class="iconfont icon-suozi"></span> <text class="iconfont icon-suozi"></text>
</div> </view>
</div> </view>
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div>手机号</div> <view>手机号</view>
<div class="input"> <view class="input">
<input type="text" v-if="userInfo.phone" v-model="userInfo.phone" /> <input type="text" v-if="userInfo.phone" v-model="userInfo.phone" />
<input type="text" v-else value="未绑定" disabled class="id" /> <input type="text" v-else value="未绑定" disabled class="id" />
</div> </view>
</div> </view>
<div class="item acea-row row-between-wrapper" @click="goChangePassword()"> <view class="item acea-row row-between-wrapper" @click="goChangePassword()">
<div>密码</div> <view>密码</view>
<div class="input acea-row row-between-wrapper"> <view class="input acea-row row-between-wrapper">
<span>点击修改密码</span> <text>点击修改密码</text>
<span class="iconfont icon-suozi"></span> <text class="iconfont icon-suozi"></text>
</div> </view>
</div> </view>
</div> </view>
<!--<div class="modifyBnt bg-color-red" @click="submit">保存修改</div>--> <!--<view class="modifyBnt bg-color-red" @click="submit">保存修改</view>-->
<!-- <div <!-- <view
class="logOut cart-color acea-row row-center-wrapper" class="logOut cart-color acea-row row-center-wrapper"
@click="logout" @click="logout"
v-if="!isWeixin" v-if="!isWeixin"
> >
退出登录 退出登录
</div>--> </view>-->
</div> </view>
</template> </template>
<script> <script>
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
@ -141,8 +141,14 @@ export default {
this.userIndex = index; this.userIndex = index;
let userInfo = this.switchUserInfo[this.userIndex]; let userInfo = this.switchUserInfo[this.userIndex];
if (this.switchUserInfo.length <= 1) return true; if (this.switchUserInfo.length <= 1) return true;
if (userInfo === undefined) if (userInfo === undefined) {
return this.$dialog.toast({ mes: "切换的账号不存在" }); uni.showToast({
title: "切换的账号不存在",
icon: "none",
duration: 2000
});
return;
}
if (userInfo.user_type === "h5") { if (userInfo.user_type === "h5") {
switchH5Login() switchH5Login()
.then(({ data }) => { .then(({ data }) => {
@ -154,7 +160,11 @@ export default {
}) })
.catch(err => { .catch(err => {
uni.hideLoading(); uni.hideLoading();
return that.$dialog.toast({ mes: err }); uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
}); });
} else { } else {
cookie.set("loginType", "wechat", 60); cookie.set("loginType", "wechat", 60);
@ -180,8 +190,14 @@ export default {
}); });
}, },
imageuploaded(res) { imageuploaded(res) {
if (res.status !== 200) if (res.status !== 200) {
return this.$dialog.error(res.msg || "上传图片失败"); uni.showToast({
title: res.msg || res.response.data.msg,
icon: "none",
duration: 2000
});
return;
}
if (this.switchUserInfo[this.userIndex] === undefined) return; if (this.switchUserInfo[this.userIndex] === undefined) return;
this.$set(this.switchUserInfo[this.userIndex], "avatar", res.data.url); this.$set(this.switchUserInfo[this.userIndex], "avatar", res.data.url);
}, },
@ -194,25 +210,38 @@ export default {
}).then( }).then(
res => { res => {
this.$store.dispatch("USERINFO", true); this.$store.dispatch("USERINFO", true);
this.$uni.showToast({ title: res.msg, icon: "none", duration: 2000 }); this.$uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
this.$yrouter.back(); this.$yrouter.back();
}, },
error => { err => {
this.$dialog.error(error.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
} }
); );
}, },
logout: function() { logout: function() {
this.$dialog.confirm({ uni.showModal({
mes: "确认退出登录?", title: "提示",
opts: () => { content: "确认退出登录?",
getLogout() success: function(res) {
.then(res => { if (res.confirm) {
this.$store.commit("LOGOUT"); getLogout()
clearAuthStatus(); .then(res => {
location.href = location.origin; this.$store.commit("LOGOUT");
}) clearAuthStatus();
.catch(err => {}); location.href = location.origin;
})
.catch(err => {});
} else if (res.cancel) {
console.log("用户点击取消");
}
} }
}); });
} }

189
pages/user/Recharge/index.vue

@ -1,28 +1,28 @@
<template> <template>
<div> <view>
<div class="recharge"> <view class="recharge">
<div class="nav acea-row row-around row-middle"> <view class="nav acea-row row-around row-middle">
<div <view
class="item" class="item"
:class="active === navRechargeIndex ? 'on' : ''" :class="active === navRechargeIndex ? 'on' : ''"
v-for="(item, navRechargeIndex) in navRecharge" v-for="(item, navRechargeIndex) in navRecharge"
:key="navRechargeIndex" :key="navRechargeIndex"
@click="navRecharges(navRechargeIndex)" @click="navRecharges(navRechargeIndex)"
>{{ item }}</div> >{{ item }}</view>
</div> </view>
<div class="info-wrapper"> <view class="info-wrapper">
<div class="money"> <view class="money">
<span></span> <text></text>
<input type="number" placeholder="0.00" v-model="money" /> <input type="number" placeholder="0.00" v-model="money" />
</div> </view>
<div class="tips" v-if="!active"> <view class="tips" v-if="!active">
提示当前余额为 提示当前余额为
<span>{{ now_money || 0 }}</span> <text>{{ now_money || 0 }}</text>
</div> </view>
<div class="pay-btn bg-color-red" @click="recharge">{{ active ? "立即转入" : "立即充值" }}</div> <view class="pay-btn bg-color-red" @click="recharge">{{ active ? "立即转入" : "立即充值" }}</view>
</div> </view>
</div> </view>
</div> </view>
</template> </template>
<script> <script>
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
@ -58,78 +58,97 @@ export default {
price = Number(this.money); price = Number(this.money);
if (that.active) { if (that.active) {
if (price === 0) { if (price === 0) {
return that.$dialog.toast({ mes: "请输入您要转入的金额" }); uni.showToast({
title: "请输入您要转入的金额",
icon: "none",
duration: 2000
});
return
} else if (price < 0.01) { } else if (price < 0.01) {
return that.$dialog.toast({ mes: "转入金额不能低于0.01" }); uni.showToast({
title: "转入金额不能低于0.01",
icon: "none",
duration: 2000
});
return
} }
this.$dialog.confirm({
mes: "转入余额无法在转出,请确认转入", uni.showModal({
title: "转入余额", title: "转入余额",
opts: [ content: "转入余额无法在转出,请确认转入?",
{ success: function(res) {
txt: "确认", if (res.confirm) {
color: false, rechargeWechat({ price: price, from: that.from, type: 1 })
callback: () => { .then(res => {
rechargeWechat({ price: price, from: that.from, type: 1 }) that.now_money = add(
.then(res => { price,
that.now_money = add( parseInt(that.userInfo.now_money)
price, );
parseInt(that.userInfo.now_money) that.userInfo.brokerage_price = sub(
); that.userInfo.brokerage_price,
that.userInfo.brokerage_price = sub( price
that.userInfo.brokerage_price, );
price that.money = "";
); uni.showToast({
that.money = ""; title: res.msg,
return that.$dialog.toast({ mes: res.msg }); icon: "none",
}) duration: 2000
.catch(res => {
that.$dialog.toast({ mes: res.msg });
}); });
} })
}, .catch(err => {
{ uni.showToast({
txt: "取消", title: err.msg || err.response.data.msg,
color: false, icon: "none",
callback: () => { duration: 2000
return that.$dialog.toast({ mes: "已取消" }); });
} });
} else if (res.cancel) {
uni.showToast({
title: "已取消",
icon: "none",
duration: 2000
});
return;
} }
] }
}); });
} else { } else {
if (price === 0) { if (price === 0) {
return that.$dialog.toast({ mes: "请输入您要充值的金额" }); uni.showToast({
title: "请输入您要充值的金额",
icon: "none",
duration: 2000
});
return;
} else if (price < 0.01) { } else if (price < 0.01) {
return that.$dialog.toast({ mes: "充值金额不能低于0.01" }); uni.showToast({
title: "充值金额不能低于0.01",
icon: "none",
duration: 2000
});
return;
} }
rechargeWechat({ price: price, from: that.from }) rechargeWechat({ price: price, from: that.from })
.then(res => { .then(res => {
var data = res.data; var data = res.data;
if (data.type == "weixinh5") { if (data.type == "weixinh5") {
location.replace(data.data.mweb_url); location.replace(data.data.mweb_url);
this.$dialog.confirm({ uni.showModal({
mes: "充值余额", title: "提示",
opts: [ content: "充值余额",
{ confirmText: "已充值",
txt: "已充值", cancelText: "查看余额",
color: false, success: function(res) {
callback: () => { if (res.confirm) {
that.$yrouter.replace({ that.$yrouter.replace({
path: "/user/account" path: "/user/account"
}); });
} } else if (res.cancel) {
}, that.$yrouter.replace({
{ path: "/user/account"
txt: "查看余额", });
color: false,
callback: () => {
that.$yrouter.replace({
path: "/user/account"
});
}
} }
] }
}); });
} else { } else {
weappPay(data.data) weappPay(data.data)
@ -138,15 +157,27 @@ export default {
price, price,
parseInt(that.userInfo.now_money) parseInt(that.userInfo.now_money)
); );
that.$dialog.toast({ mes: "支付成功" }); uni.showToast({
title: "支付成功",
icon: "success",
duration: 2000
});
}) })
.catch(function() { .catch(function() {
that.$dialog.toast({ mes: "支付失败" }); uni.showToast({
title: "支付失败",
icon: "none",
duration: 2000
});
}); });
} }
}) })
.catch(res => { .catch(err => {
that.$dialog.toast({ mes: res.msg }); uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
}); });
} }
} }
@ -185,7 +216,7 @@ export default {
padding-bottom: 0.2rem; padding-bottom: 0.2rem;
border-bottom: 1px dashed #ddd; border-bottom: 1px dashed #ddd;
} }
.recharge .info-wrapper .money span { .recharge .info-wrapper .money text {
font-size: 0.56rem; font-size: 0.56rem;
color: #333; color: #333;
font-weight: bold; font-weight: bold;
@ -221,7 +252,7 @@ export default {
line-height: 1.5; line-height: 1.5;
padding: 0 0.3rem; padding: 0 0.3rem;
} }
.recharge .info-wrapper .tips span { .recharge .info-wrapper .tips text {
color: #ef4a49; color: #ef4a49;
} }
.recharge .info-wrapper .pay-btn { .recharge .info-wrapper .pay-btn {

58
pages/user/Register/index.vue

@ -1,23 +1,23 @@
<template> <template>
<div class="register absolute"> <view class="register absolute">
<div class="shading"> <view class="shading">
<div class="pictrue acea-row row-center-wrapper"> <view class="pictrue acea-row row-center-wrapper">
<img src="@/assets/images/logo.png" /> <image src="@/assets/images/logo.png" />
</div> </view>
</div> </view>
<div class="whiteBg"> <view class="whiteBg">
<div class="title">注册账号</div> <view class="title">注册账号</view>
<div class="list"> <view class="list">
<div class="item"> <view class="item">
<div> <view>
<svg class="icon" aria-hidden="true"> <svg class="icon" aria-hidden="true">
<use xlink:href="#icon-phone_" /> <use xlink:href="#icon-phone_" />
</svg> </svg>
<input type="text" placeholder="输入手机号码" /> <input type="text" placeholder="输入手机号码" />
</div> </view>
</div> </view>
<div class="item"> <view class="item">
<div class="align-left"> <view class="align-left">
<svg class="icon" aria-hidden="true"> <svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_1" /> <use xlink:href="#icon-code_1" />
</svg> </svg>
@ -28,25 +28,25 @@
:class="disabled === true ? 'on' : ''" :class="disabled === true ? 'on' : ''"
@click="code" @click="code"
>{{ text }}</button> >{{ text }}</button>
</div> </view>
</div> </view>
<div class="item"> <view class="item">
<div> <view>
<svg class="icon" aria-hidden="true"> <svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_" /> <use xlink:href="#icon-code_" />
</svg> </svg>
<input type="text" placeholder="填写您的登录密码" /> <input type="text" placeholder="填写您的登录密码" />
</div> </view>
</div> </view>
</div> </view>
<div class="logon">注册</div> <view class="logon">注册</view>
<div class="tip"> <view class="tip">
已有账号? 已有账号?
<span @click="goLogin()" class="font-color-red">立即登录</span> <text @click="goLogin()" class="font-color-red">立即登录</text>
</div> </view>
</div> </view>
<div class="bottom"></div> <view class="bottom"></view>
</div> </view>
</template> </template>
<script> <script>

89
pages/user/RetrievePassword/index.vue

@ -1,23 +1,23 @@
<template> <template>
<div class="register absolute"> <view class="register absolute">
<div class="shading"> <view class="shading">
<div class="pictrue acea-row row-center-wrapper"> <view class="pictrue acea-row row-center-wrapper">
<img src="@/assets/images/logo.png" /> <image src="@/assets/images/logo.png" />
</div> </view>
</div> </view>
<div class="whiteBg"> <view class="whiteBg">
<div class="title">找回密码</div> <view class="title">找回密码</view>
<div class="list"> <view class="list">
<div class="item"> <view class="item">
<div> <view>
<svg class="icon" aria-hidden="true"> <svg class="icon" aria-hidden="true">
<use xlink:href="#icon-phone_" /> <use xlink:href="#icon-phone_" />
</svg> </svg>
<input type="text" placeholder="输入手机号码" v-model="account" /> <input type="text" placeholder="输入手机号码" v-model="account" />
</div> </view>
</div> </view>
<div class="item"> <view class="item">
<div class="align-left"> <view class="align-left">
<svg class="icon" aria-hidden="true"> <svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_1" /> <use xlink:href="#icon-code_1" />
</svg> </svg>
@ -28,24 +28,24 @@
:class="disabled === true ? 'on' : ''" :class="disabled === true ? 'on' : ''"
@click="code" @click="code"
>{{ text }}</button> >{{ text }}</button>
</div> </view>
</div> </view>
<div class="item"> <view class="item">
<div> <view>
<svg class="icon" aria-hidden="true"> <svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_" /> <use xlink:href="#icon-code_" />
</svg> </svg>
<input type="password" placeholder="填写您的登录密码" v-model="password" /> <input type="password" placeholder="填写您的登录密码" v-model="password" />
</div> </view>
</div> </view>
</div> </view>
<div class="logon" @click="registerReset">确认</div> <view class="logon" @click="registerReset">确认</view>
<div class="tip"> <view class="tip">
<span @click="goLogin()" class="font-color-red">立即登录</span> <text @click="goLogin()" class="font-color-red">立即登录</text>
</div> </view>
</div> </view>
<div class="bottom"></div> <view class="bottom"></view>
</div> </view>
</template> </template>
<script> <script>
@ -98,12 +98,21 @@ export default {
password: that.password password: that.password
}) })
.then(res => { .then(res => {
that.$dialog.success(res.msg).then(() => { uni.showToast({
that.$yrouter.push({ name: "Login" }); title: res.msg,
icon: "success",
duration: 2000,
complete: () => {
that.$yrouter.push({ name: "Login" });
}
}); });
}) })
.catch(res => { .catch(err => {
that.$dialog.error(res.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
}); });
}, },
async code() { async code() {
@ -123,11 +132,19 @@ export default {
} }
registerVerify({ phone: that.account }) registerVerify({ phone: that.account })
.then(res => { .then(res => {
that.$dialog.success(res.msg); uni.showToast({
title: res.msg,
icon: "success",
duration: 2000
});
that.sendCode(); that.sendCode();
}) })
.catch(res => { .catch(err => {
that.$dialog.error(res.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
}); });
} }
} }

270
pages/user/User/index.vue

@ -1,148 +1,152 @@
<template> <template>
<div class="user"> <view class="user">
<div class="header bg-color-red acea-row row-between-wrapper"> <view class="header bg-color-red acea-row row-between-wrapper">
<div class="picTxt acea-row row-between-wrapper"> <view class="picTxt acea-row row-between-wrapper">
<div class="pictrue"> <view class="pictrue">
<img :src="userInfo.avatar" /> <image :src="userInfo.avatar" />
</div> </view>
<div class="text"> <view class="text">
<div class="acea-row row-middle"> <view class="acea-row row-middle">
<div class="name line1">{{ userInfo.nickname }}</div> <view class="name line1">{{ userInfo.nickname }}</view>
<div class="member acea-row row-middle" v-if="userInfo.vip"> <view class="member acea-row row-middle" v-if="userInfo.vip">
<img :src="userInfo.vipIcon" /> <image :src="userInfo.vipIcon" />
{{ userInfo.vipName }} <text>{{ userInfo.vipName }}</text>
</div> </view>
</div> </view>
<div @click="goPersonalData()" class="id" v-if="userInfo.phone"> <view @click="goPersonalData()" class="id" v-if="userInfo.phone">
ID{{ userInfo.uid || 0}} <text>ID{{ userInfo.uid || 0}}</text>
<span class="iconfont icon-bianji1"></span> <text class="iconfont icon-bianji1"></text>
</div> </view>
<button <button
open-type="getPhoneNumber" open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber" @getphonenumber="getPhoneNumber"
class="binding" class="binding"
v-else v-else
> >
<span>绑定手机号</span> <text>绑定手机号</text>
</button> </button>
</div> </view>
</div> </view>
<span class="iconfont icon-shezhi" @click="goPersonalData()"></span> <text class="iconfont icon-shezhi" @click="goPersonalData()"></text>
</div> </view>
<div class="wrapper"> <view class="wrapper">
<div class="nav acea-row row-middle"> <view class="nav acea-row row-middle">
<div @click="goUserAccount()" class="item"> <view @click="goUserAccount()" class="item">
<div>我的余额</div> <text>我的余额</text>
<div class="num">{{ userInfo.nowMoney || 0 }}</div> <text class="num">{{ userInfo.nowMoney || 0 }}</text>
</div> </view>
<div <view
@click="goUserPromotion()" @click="goUserPromotion()"
class="item" class="item"
v-if="userInfo.isPromoter === 1 || userInfo.statu === 2" v-if="userInfo.isPromoter === 1 || userInfo.statu === 2"
> >
<div>当前佣金</div> <text>当前佣金</text>
<div class="num">{{ userInfo.brokeragePrice || 0 }}</div> <text class="num">{{ userInfo.brokeragePrice || 0 }}</text>
</div> </view>
<div @click="goIntegral()" class="item" v-else> <view @click="goIntegral()" class="item" v-else>
<div>当前积分</div> <text>当前积分</text>
<div class="num">{{ userInfo.integral || 0 }}</div> <text class="num">{{ userInfo.integral || 0 }}</text>
</div> </view>
<div @click="goUserCoupon()" class="item"> <view @click="goUserCoupon()" class="item">
<div>优惠券</div> <text>优惠券</text>
<div class="num">{{ userInfo.couponCount || 0 }}</div> <text class="num">{{ userInfo.couponCount || 0 }}</text>
</div> </view>
</div> </view>
<div class="myOrder"> <view class="myOrder">
<div class="title acea-row row-between-wrapper"> <view class="title acea-row row-between-wrapper">
<div>我的订单</div> <text>我的订单</text>
<div @click="goMyOrder()" class="allOrder"> <text @click="goMyOrder()" class="allOrder">
全部订单 全部订单
<span class="iconfont icon-jiantou"></span> <text class="iconfont icon-jiantou"></text>
</div> </text>
</div> </view>
<div class="orderState acea-row row-middle"> <view class="orderState acea-row row-middle">
<div @click="goMyOrder(0)" class="item"> <view @click="goMyOrder(0)" class="item">
<div class="pictrue"> <view class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL + '/images/dfk.png'" /> <image :src="$VUE_APP_RESOURCES_URL + '/images/dfk.png'" />
<span <text
class="order-status-num" class="order-status-num"
v-if="orderStatusNum.unpaidCount > 0" v-if="orderStatusNum.unpaidCount > 0"
>{{ orderStatusNum.unpaidCount }}</span> >{{ orderStatusNum.unpaidCount }}</text>
</div> </view>
<div>待付款</div> <view>待付款</view>
</div> </view>
<div @click="goMyOrder(1)" class="item"> <view @click="goMyOrder(1)" class="item">
<div class="pictrue"> <view class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/dfh.png'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/dfh.png'" />
<span <text
class="order-status-num" class="order-status-num"
v-if="orderStatusNum.unshippedCount > 0" v-if="orderStatusNum.unshippedCount > 0"
>{{ orderStatusNum.unshippedCount }}</span> >{{ orderStatusNum.unshippedCount }}</text>
</div> </view>
<div>待发货</div> <view>待发货</view>
</div> </view>
<div @click="goMyOrder(2)" class="item"> <view @click="goMyOrder(2)" class="item">
<div class="pictrue"> <view class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/dsh.png'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/dsh.png'" />
<span <text
class="order-status-num" class="order-status-num"
v-if="orderStatusNum.receivedCount > 0" v-if="orderStatusNum.receivedCount > 0"
>{{ orderStatusNum.receivedCount }}</span> >{{ orderStatusNum.receivedCount }}</text>
</div> </view>
<div>待收货</div> <text>待收货</text>
</div> </view>
<div @click="goMyOrder(3)" class="item"> <view @click="goMyOrder(3)" class="item">
<div class="pictrue"> <view class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/dpj.png'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/dpj.png'" />
<span <text
class="order-status-num" class="order-status-num"
v-if="orderStatusNum.evaluatedCount > 0" v-if="orderStatusNum.evaluatedCount > 0"
>{{ orderStatusNum.evaluatedCount }}</span> >{{ orderStatusNum.evaluatedCount }}</text>
</div> </view>
<div>待评价</div> <text>待评价</text>
</div> </view>
<div @click="goReturnList()" class="item"> <view @click="goReturnList()" class="item">
<div class="pictrue"> <view class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/sh.png'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/sh.png'" />
<span <text
class="order-status-num" class="order-status-num"
v-if="orderStatusNum.refundCount > 0" v-if="orderStatusNum.refundCount > 0"
>{{ orderStatusNum.refundCount }}</span> >{{ orderStatusNum.refundCount }}</text>
</div> </view>
<div>售后/退款</div> <text>售后/退款</text>
</div> </view>
</div> </view>
</div> </view>
<div class="myService"> <view class="myService">
<div class="title acea-row row-middle">我的服务</div> <view class="title acea-row row-middle">
<div class="serviceList acea-row row-middle"> <text>我的服务</text>
</view>
<view class="serviceList acea-row row-middle">
<template v-for="(item, MyMenusIndex) in MyMenus"> <template v-for="(item, MyMenusIndex) in MyMenus">
<div class="item" :key="MyMenusIndex" @click="goPages(MyMenusIndex)" v-if="item.url"> <view class="item" :key="MyMenusIndex" @click="goPages(MyMenusIndex)" v-if="item.url">
<div class="pictrue"> <view class="pictrue">
<img :src="item.pic" /> <image :src="item.pic" />
</div> </view>
<div>{{ item.name }}</div> <view>{{ item.name }}</view>
</div> </view>
</template> </template>
<!--<div--> </view>
<!--class="item"--> </view>
<!--@click="changeswitch(true)"--> <!--<view -->
<!--v-if="userInfo.phone && isWeixin"--> <!--class="item"-->
<!--&gt;--> <!--@click="changeswitch(true)"-->
<!--<div class="pictrue"><img :src="$VUE_APP_RESOURCES_URL+'/images/switch.png'" /></div>--> <!--v-if="userInfo.phone && isWeixin"-->
<!--<div>账号切换</div>--> <!--&gt;-->
<!--</div>--> <!--<view class="pictrue"><image :src="$VUE_APP_RESOURCES_URL+'/images/switch.png'" /></view>-->
</div> <!--<view>账号切换</!--<view>-->
</div> <!--</!--<view>-->
</div> <!-- </view>
<p style="text-align: center;margin-top: 1rem">By@意象</p> </view>-->
<div class="footer-line-height"></div> </view>
<view style="text-align: center;margin-top: 1rem">By@意象</view>
<view class="footer-line-height"></view>
<SwitchWindow <SwitchWindow
v-on:changeswitch="changeswitch" v-on:changeswitch="changeswitch"
:switchActive="switchActive" :switchActive="switchActive"
:login_type="userInfo.login_type" :login_type="userInfo.login_type"
></SwitchWindow> ></SwitchWindow>
</div> </view>
</template> </template>
<script> <script>
import { getUser, getMenuUser, bindingPhone } from "@/api/user"; import { getUser, getMenuUser, bindingPhone } from "@/api/user";
@ -186,7 +190,9 @@ export default {
goMyOrder(type) { goMyOrder(type) {
this.$yrouter.push({ this.$yrouter.push({
path: "/pages/order/MyOrder/index", path: "/pages/order/MyOrder/index",
query: { type } query: {
type
}
}); });
}, },
goUserCoupon() { goUserCoupon() {
@ -199,7 +205,9 @@ export default {
this.$yrouter.push("/pages/user/promotion/UserPromotion/index"); this.$yrouter.push("/pages/user/promotion/UserPromotion/index");
}, },
goUserAccount() { goUserAccount() {
this.$yrouter.push({ path: "/pages/user/UserAccount/index" }); this.$yrouter.push({
path: "/pages/user/UserAccount/index"
});
}, },
goPersonalData() { goPersonalData() {
this.$yrouter.push("/pages/user/PersonalData/index"); this.$yrouter.push("/pages/user/PersonalData/index");
@ -207,7 +215,9 @@ export default {
getPhoneNumber: function(e) { getPhoneNumber: function(e) {
console.log(e.mp.detail); console.log(e.mp.detail);
if (e.mp.detail.errMsg == "getPhoneNumber:ok") { if (e.mp.detail.errMsg == "getPhoneNumber:ok") {
uni.showLoading({ title: "绑定中" }); uni.showLoading({
title: "绑定中"
});
wx.login({ wx.login({
success: loginRes => { success: loginRes => {
bindingPhone({ bindingPhone({
@ -263,18 +273,31 @@ export default {
url === "/pages/user/promotion/UserPromotion/index" && url === "/pages/user/promotion/UserPromotion/index" &&
this.userInfo.statu === 1 this.userInfo.statu === 1
) { ) {
if (!this.userInfo.isPromoter) if (!this.userInfo.isPromoter) {
return this.$dialog.toast({ mes: "您还没有推广权限!!" }); uni.showToast({
title: "您还没有推广权限!!",
icon: "none",
duration: 2000
});
return;
}
} }
if ( if (
url === "/pages/orderAdmin/OrderIndex/index" && url === "/pages/orderAdmin/OrderIndex/index" &&
!this.userInfo.adminid !this.userInfo.adminid
) { ) {
return this.$dialog.toast({ mes: "您还不是管理员!!" }); uni.showToast({
title: "您还不是管理员!!",
icon: "none",
duration: 2000
});
return;
} }
this.$yrouter.push({ path: this.MyMenus[index].uniapp_url }); this.$yrouter.push({
path: this.MyMenus[index].uniapp_url
});
} }
}, },
onShow() { onShow() {
@ -289,6 +312,7 @@ export default {
.footer-line-height { .footer-line-height {
height: 1rem; height: 1rem;
} }
.order-status-num { .order-status-num {
min-width: 0.33rem; min-width: 0.33rem;
background-color: #fff; background-color: #fff;
@ -305,9 +329,11 @@ export default {
.pictrue { .pictrue {
position: relative; position: relative;
} }
.switch-h5 { .switch-h5 {
margin-left: 0.2rem; margin-left: 0.2rem;
} }
.binding { .binding {
margin-top: 0.1rem; margin-top: 0.1rem;
display: inline-block; display: inline-block;

84
pages/user/UserAccount/index.vue

@ -1,40 +1,40 @@
<template> <template>
<div class="my-account"> <view class="my-account">
<div class="wrapper"> <view class="wrapper">
<div class="header"> <view class="header">
<div class="headerCon"> <view class="headerCon">
<div class="account acea-row row-top row-between"> <view class="account acea-row row-top row-between">
<div class="assets"> <view class="assets">
<div>总资产()</div> <view>总资产()</view>
<div class="money">{{ now_money }}</div> <view class="money">{{ now_money }}</view>
</div> </view>
</div> </view>
<div class="cumulative acea-row row-top"> <view class="cumulative acea-row row-top">
<div class="item"> <view class="item">
<div>累计消费()</div> <view>累计消费()</view>
<div class="money">{{ orderStatusSum }}</div> <view class="money">{{ orderStatusSum }}</view>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<div class="nav acea-row row-middle"> <view class="nav acea-row row-middle">
<div class="item" @click="goUserBill(0)"> <view class="item" @click="goUserBill(0)">
<div class="pictrue"> <view class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/record1.png'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/record1.png'" />
</div> </view>
<div>账单记录</div> <view>账单记录</view>
</div> </view>
<div class="item" @click="goUserBill(1)"> <view class="item" @click="goUserBill(1)">
<div class="pictrue"> <view class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/record2.png'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/record2.png'" />
</div> </view>
<div>消费记录</div> <view>消费记录</view>
</div> </view>
</div> </view>
<div class="advert acea-row row-between-wrapper"></div> <view class="advert acea-row row-between-wrapper"></view>
</div> </view>
<Recommend></Recommend> <Recommend></Recommend>
</div> </view>
</template> </template>
<script> <script>
import Recommend from "@/components/Recommend"; import Recommend from "@/components/Recommend";
@ -74,7 +74,11 @@ export default {
that.recharge = res.data.recharge; that.recharge = res.data.recharge;
}, },
err => { err => {
that.$dialog.message(err.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
} }
); );
}, },
@ -86,8 +90,12 @@ export default {
that.activity.is_pink = res.data.is_pink; that.activity.is_pink = res.data.is_pink;
that.activity.is_seckill = res.data.is_seckill; that.activity.is_seckill = res.data.is_seckill;
}, },
error => { err => {
that.$dialog.message(error.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
} }
); );
} }

54
pages/user/UserBill/index.vue

@ -1,30 +1,30 @@
<template> <template>
<div class="bill-details" ref="container"> <view class="bill-details" ref="container">
<div class="nav acea-row"> <view class="nav acea-row">
<div class="item" :class="types == 0 ? 'on' : ''" @click="changeTypes(0)">全部</div> <view class="item" :class="types == 0 ? 'on' : ''" @click="changeTypes(0)">全部</view>
<div class="item" :class="types == 1 ? 'on' : ''" @click="changeTypes(1)">消费</div> <view class="item" :class="types == 1 ? 'on' : ''" @click="changeTypes(1)">消费</view>
</div> </view>
<div class="sign-record"> <view class="sign-record">
<div class="list"> <view class="list">
<div class="item" v-for="(item, listIndex) in list" :key="listIndex"> <view class="item" v-for="(item, listIndex) in list" :key="listIndex">
<div class="data">{{ item.time }}</div> <view class="data">{{ item.time }}</view>
<div class="listn" v-for="(val, key) in item.list" :key="key"> <view class="listn" v-for="(val, key) in item.list" :key="key">
<div class="itemn acea-row row-between-wrapper"> <view class="itemn acea-row row-between-wrapper">
<div> <view>
<div class="name line1">{{ val.title }}</div> <view class="name line1">{{ val.title }}</view>
<div>{{ val.add_time }}</div> <view>{{ val.add_time }}</view>
</div> </view>
<div <view
class="num" class="num"
:class="val.pm == 0 ? 'font-color-red' : ''" :class="val.pm == 0 ? 'font-color-red' : ''"
>{{ val.pm == 0 ? "-" : "+" }}{{ val.number }}</div> >{{ val.pm == 0 ? "-" : "+" }}{{ val.number }}</view>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<Loading :loaded="loaded" :loading="loading"></Loading> <Loading :loaded="loaded" :loading="loading"></Loading>
</div> </view>
</template> </template>
<script> <script>
import { getCommissionInfo } from "@/api/user"; import { getCommissionInfo } from "@/api/user";
@ -95,8 +95,12 @@ export default {
that.where.page = that.where.page + 1; that.where.page = that.where.page + 1;
that.list.push.apply(that.list, res.data); that.list.push.apply(that.list, res.data);
}, },
error => { err => {
that.$dialog.message(error.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
} }
); );
} }

140
pages/user/UserVip/index.vue

@ -1,82 +1,78 @@
<template> <template>
<div class="member-center"> <view class="member-center">
<div class="header"> <view class="header">
<div class="slider-banner banner"> <view class="slider-banner banner">
<swiper indicatorDots="true" @change="swiperChange"> <swiper indicatorDots="true" @change="swiperChange">
<block v-for="(item, vipListIndex) in vipList" :key="vipListIndex"> <block v-for="(item, vipListIndex) in vipList" :key="vipListIndex">
<swiper-item> <swiper-item>
<div class="swiper-slide" :style="{ backgroundImage: 'url(' + item.image + ')' }"> <view class="swiper-slide" :style="{ backgroundImage: 'url(' + item.image + ')' }">
<!-- <img :src="item.icon" />--> <!-- <image :src="item.icon" />-->
<div class="name">{{ item.name }}</div> <view class="name">{{ item.name }}</view>
<div class="discount"> <view class="discount">
可享受商品折扣: {{ item.discount / 10 }} 可享受商品折扣: {{ item.discount / 10 }}
<span class="iconfont icon-zhekou"></span> <text class="iconfont icon-zhekou"></text>
</div> </view>
<div class="nav acea-row" v-if="item.grade == grade"> <view class="nav acea-row" v-if="item.grade == grade">
<div class="item" v-for="(val, indexn) in vipComplete" :key="indexn"> <view class="item" v-for="(val, indexn) in vipComplete" :key="indexn">
<div class="num">{{ val.newNumber }}</div> <view class="num">{{ val.newNumber }}</view>
<div>{{ val.realName }}</div> <view>{{ val.realName }}</view>
</div> </view>
</div> </view>
<div class="lock" v-if="item.grade > grade"> <view class="lock" v-if="item.grade > grade">
<span class="iconfont icon-quanxianguanlisuozi"></span>该会员等级尚未解锁 <text class="iconfont icon-quanxianguanlisuozi"></text>该会员等级尚未解锁
</div> </view>
<div class="lock" v-if="item.grade < grade"> <view class="lock" v-if="item.grade < grade">
<span class="iconfont icon-xuanzhong1"></span>已解锁更高等级 <text class="iconfont icon-xuanzhong1"></text>已解锁更高等级
</div> </view>
</div> </view>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
</div> </view>
</div> </view>
<div class="wrapper"> <view class="wrapper">
<div class="title acea-row row-between-wrapper"> <view class="title acea-row row-between-wrapper">
<div> <view>
<span class="iconfont icon-jingyanzhi"></span>会员升级要求 <text class="iconfont icon-jingyanzhi"></text>会员升级要求
</div> </view>
<div class="num"> <view class="num">
<span class="current">{{ taskCount }}</span> <text class="current">{{ taskCount }}</text>
/{{ vipRequire.length }} /{{ vipRequire.length }}
</div> </view>
</div> </view>
<div class="list"> <view class="list">
<div class="item" v-for="(item, vipCompleteIndex) in vipComplete" :key="vipCompleteIndex"> <view class="item" v-for="(item, vipCompleteIndex) in vipComplete" :key="vipCompleteIndex">
<div class="top acea-row row-between-wrapper"> <view class="top acea-row row-between-wrapper">
<div class="name"> <view class="name">
{{ item.name {{ item.name
}} }}
<span <text class="iconfont icon-wenti" v-if="item.illustrate" @click="showGrow(item)"></text>
class="iconfont icon-wenti" </view>
v-if="item.illustrate" <view>{{ item.finish ? "已满足条件" : "未满足条件" }}</view>
@click="showGrow(item)" </view>
></span> <view class="cu-progress">
</div> <view class="bg-red" :style="{ width: item.speed + '%' }"></view>
<div>{{ item.finish ? "已满足条件" : "未满足条件" }}</div> </view>
</div> <view class="experience acea-row row-between-wrapper">
<div class="cu-progress"> <view>{{ item.taskTypeTitle }}</view>
<div class="bg-red" :style="{ width: item.speed + '%' }"></div> <view>
</div> <text class="num">{{ item.newNumber }}</text>
<div class="experience acea-row row-between-wrapper">
<div>{{ item.taskTypeTitle }}</div>
<div>
<span class="num">{{ item.newNumber }}</span>
/{{ item.number }} /{{ item.number }}
</div> </view>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<Recommend></Recommend> <Recommend></Recommend>
<div class="growthValue" :class="growthValue === false ? 'on' : ''"> <view class="growthValue" :class="growthValue === false ? 'on' : ''">
<div class="pictrue"> <view class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/value.jpg'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/value.jpg'" />
<span class="iconfont icon-guanbi3" @click="growthTap"></span> <text class="iconfont icon-guanbi3" @click="growthTap"></text>
</div> </view>
<div class="conter">{{ illustrate }}</div> <view class="conter">{{ illustrate }}</view>
</div> </view>
<div class="mask" :hidden="growthValue" @click="growthTap"></div> <view class="mask" :hidden="growthValue" @click="growthTap"></view>
</div> </view>
</template> </template>
<script> <script>
// import { swiper, swiperSlide } from "vue-awesome-swiper"; // import { swiper, swiperSlide } from "vue-awesome-swiper";
@ -168,7 +164,11 @@ export default {
that.taskCount = res.data.task.reachCount; that.taskCount = res.data.task.reachCount;
}, },
err => { err => {
that.$dialog.message(err.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
} }
); );
}, },
@ -181,7 +181,11 @@ export default {
that.taskCount = res.data.reach_count; that.taskCount = res.data.reach_count;
}, },
err => { err => {
that.$dialog.message(err.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
} }
); );
}, },

90
pages/user/address/AddAddress/index.vue

@ -1,19 +1,19 @@
<template> <template>
<div class="addAddress absolute"> <view class="addAddress absolute">
<div class="list"> <view class="list">
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div class="name">姓名</div> <view class="name">姓名</view>
<input type="text" placeholder="请输入姓名" v-model="userAddress.realName" required /> <input type="text" placeholder="请输入姓名" v-model="userAddress.realName" required />
</div> </view>
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div class="name">联系电话</div> <view class="name">联系电话</view>
<input type="text" placeholder="请输入联系电话" v-model="userAddress.phone" required /> <input type="text" placeholder="请输入联系电话" v-model="userAddress.phone" required />
</div> </view>
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div class="name">所在地区</div> <view class="name">所在地区</view>
<div class="picker acea-row row-between-wrapper select-value form-control"> <view class="picker acea-row row-between-wrapper select-value form-control">
<div class="address"> <view class="address">
<div slot="right" @click.stop="show2 = true">{{ model2 || "请选择收货地址" }}</div> <view slot="right" @click.stop="show2 = true">{{ model2 || "请选择收货地址" }}</view>
<vant-popup :show="show2" position="bottom" @close="closeaArea"> <vant-popup :show="show2" position="bottom" @close="closeaArea">
<vant-area <vant-area
:area-list="district" :area-list="district"
@ -23,31 +23,31 @@
@confirm="result2" @confirm="result2"
/> />
</vant-popup> </vant-popup>
</div> </view>
<div class="iconfont icon-dizhi font-color-red"></div> <view class="iconfont icon-dizhi font-color-red"></view>
</div> </view>
</div> </view>
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div class="name">详细地址</div> <view class="name">详细地址</view>
<input type="text" placeholder="请填写具体地址" v-model="userAddress.detail" required /> <input type="text" placeholder="请填写具体地址" v-model="userAddress.detail" required />
</div> </view>
</div> </view>
<div class="default acea-row row-middle"> <view class="default acea-row row-middle">
<div class="select-btn"> <view class="select-btn">
<div class="checkbox-wrapper"> <view class="checkbox-wrapper">
<checkbox-group @change="ChangeIsDefault"> <checkbox-group @change="ChangeIsDefault">
<label class="well-check"> <label class="well-check">
<checkbox value :checked="userAddress.isDefault ? true : false"></checkbox> <checkbox value :checked="userAddress.isDefault ? true : false"></checkbox>
<span class="def">设置为默认地址</span> <text class="def">设置为默认地址</text>
</label> </label>
</checkbox-group> </checkbox-group>
</div> </view>
</div> </view>
</div> </view>
<div></div> <view></view>
<div class="keepBnt bg-color-red" @click="submit">立即保存</div> <view class="keepBnt bg-color-red" @click="submit">立即保存</view>
<div class="wechatAddress" v-if="isWechat && !id" @click="getAddress">导入微信地址</div> <view class="wechatAddress" v-if="isWechat && !id" @click="getAddress">导入微信地址</view>
</div> </view>
</template> </template>
<script type="text/babel"> <script type="text/babel">
// import { CitySelect } from "vue-ydui/dist/lib.rem/cityselect"; // import { CitySelect } from "vue-ydui/dist/lib.rem/cityselect";
@ -130,12 +130,30 @@ export default {
post_code: "" post_code: ""
}; };
postAddress(data).then(function() { postAddress(data).then(function() {
if (that.id) that.$dialog.toast({ mes: "修改成功" }); if (that.id) {
else that.$dialog.toast({ mes: "添加成功" }); uni.showToast({
title: "修改成功",
icon: "none",
duration: 2000
});
} else {
uni.showToast({
title: "已取消绑定",
icon: "none",
duration: 2000
});
that.$yrouter.replace({
path: "/pages/user/PersonalData/index"
});
}
that.$yrouter.go(-1); that.$yrouter.go(-1);
}); });
} catch (e) { } catch (err) {
this.$dialog.error(e.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
} }
}, },
ChangeIsDefault: function() { ChangeIsDefault: function() {

116
pages/user/address/AddressManagement/index.vue

@ -1,30 +1,30 @@
<template> <template>
<div <view
class="address-management" class="address-management"
:class="addressList.length < 1 && page > 1 ? 'on' : ''" :class="addressList.length < 1 && page > 1 ? 'on' : ''"
ref="container" ref="container"
> >
<div class="line" v-if="addressList.length > 0"> <view class="line" v-if="addressList.length > 0">
<img :src="$VUE_APP_RESOURCES_URL+'/images/line.jpg'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/line.jpg'" />
</div> </view>
<div class="item" v-for="(item, addressListIndex) in addressList" :key="addressListIndex"> <view class="item" v-for="(item, addressListIndex) in addressList" :key="addressListIndex">
<div class="address"> <view class="address">
<div class="consignee"> <view class="consignee">
收货人{{ item.realName }} 收货人{{ item.realName }}
<span class="phone">{{ item.phone }}</span> <text class="phone">{{ item.phone }}</text>
</div> </view>
<div> <view>
收货地址{{ item.province }}{{ item.city }}{{ item.district 收货地址{{ item.province }}{{ item.city }}{{ item.district
}}{{ item.detail }} }}{{ item.detail }}
</div> </view>
</div> </view>
<div class="operation acea-row row-between-wrapper"> <view class="operation acea-row row-between-wrapper">
<div class="select-btn"> <view class="select-btn">
<div class="checkbox-wrapper"> <view class="checkbox-wrapper">
<checkbox-group @change="radioChange(item.id)"> <checkbox-group @change="radioChange(item.id)">
<label class="well-check"> <label class="well-check">
<checkbox value :checked="item.isDefault||item.isDefault=='1' ? true : false"></checkbox> <checkbox value :checked="item.isDefault||item.isDefault=='1' ? true : false"></checkbox>
<span class="default">设为默认</span> <text class="default">设为默认</text>
</label> </label>
</checkbox-group> </checkbox-group>
<!-- <label class="well-check"> <!-- <label class="well-check">
@ -36,39 +36,39 @@
@click="radioChange(addressListIndex)" @click="radioChange(addressListIndex)"
/> />
<i class="icon"></i> <i class="icon"></i>
<span class="default">设为默认</span> <text class="default">设为默认</text>
</label>--> </label>-->
</div> </view>
</div> </view>
<div class="acea-row row-middle"> <view class="acea-row row-middle">
<div @click="editAddress(addressListIndex)"> <view @click="editAddress(addressListIndex)">
<span class="iconfont icon-bianji"></span>编辑 <text class="iconfont icon-bianji"></text>编辑
</div> </view>
<div @click="delAddress(addressListIndex)"> <view @click="delAddress(addressListIndex)">
<span class="iconfont icon-shanchu"></span>删除 <text class="iconfont icon-shanchu"></text>删除
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<Loading :loaded="loadend" :loading="loading"></Loading> <Loading :loaded="loadend" :loading="loading"></Loading>
<div class="noCommodity" v-if="addressList.length < 1 && page > 1"> <view class="noCommodity" v-if="addressList.length < 1 && page > 1">
<div class="noPictrue"> <view class="noPictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noAddress.png'" class="image" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/noAddress.png'" class="image" />
</div> </view>
</div> </view>
<div style="height:100rpx;"></div> <view style="height:100rpx;"></view>
<div class="footer acea-row row-between-wrapper"> <view class="footer acea-row row-between-wrapper">
<div class="addressBnt bg-color-red" v-if="isWechat" @click="addAddress"> <view class="addressBnt bg-color-red" v-if="isWechat" @click="addAddress">
<span class="iconfont icon-tianjiadizhi"></span>添加新地址 <text class="iconfont icon-tianjiadizhi"></text>添加新地址
</div> </view>
<div class="addressBnt on bg-color-red" v-else @click="addAddress"> <view class="addressBnt on bg-color-red" v-else @click="addAddress">
<span class="iconfont icon-tianjiadizhi"></span>添加新地址 <text class="iconfont icon-tianjiadizhi"></text>添加新地址
</div> </view>
<!--<div class="addressBnt wxbnt" v-if="isWechat" @click="getAddress">--> <!--<view class="addressBnt wxbnt" v-if="isWechat" @click="getAddress">-->
<!--<span class="iconfont icon-weixin2"></span>导入微信地址--> <!--<text class="iconfont icon-weixin2"></text>导入微信地址-->
<!--</div>--> <!--</view>-->
</div> </view>
</div> </view>
</template> </template>
<style scoped> <style scoped>
.address-management.on { .address-management.on {
@ -108,7 +108,7 @@ export default {
onReachBottom() { onReachBottom() {
!this.loading && this.AddressList(); !this.loading && this.AddressList();
}, },
onShow:function(){ onShow: function() {
this.refresh(); this.refresh();
}, },
methods: { methods: {
@ -152,9 +152,11 @@ export default {
let address = this.addressList[index]; let address = this.addressList[index];
let id = address.id; let id = address.id;
getAddressRemove(id).then(function() { getAddressRemove(id).then(function() {
that.$dialog.toast({ uni.showToast({
mes: "删除成功!", title: "删除成功!",
callback: () => { icon:"success",
duration: 2000,
complete: () => {
that.addressList.splice(index, 1); that.addressList.splice(index, 1);
that.$set(that, "addressList", that.addressList); that.$set(that, "addressList", that.addressList);
} }
@ -200,11 +202,19 @@ export default {
// this.addressList = []; // this.addressList = [];
// this.AddressList(); // this.AddressList();
// uni.hideLoading(); // uni.hideLoading();
// this.$dialog.toast({ mes: "" }); // uni.showToast({
// title: "",
// icon: 'success',
// duration: 2000
// });
// }) // })
// .catch(err => { // .catch(err => {
// uni.hideLoading(); // uni.hideLoading();
// this.$dialog.error(err.msg || ""); // uni.showToast({
// title: err.msg || err.response.data.msg,
// icon: 'none',
// duration: 2000
// });
// }); // });
// }); // });
} }

64
pages/user/coupon/GetCoupon/index.vue

@ -1,39 +1,39 @@
<template> <template>
<div ref="container"> <view ref="container">
<div class="coupon-list" v-if="couponsList.length > 0"> <view class="coupon-list" v-if="couponsList.length > 0">
<div <view
class="item acea-row row-center-wrapper" class="item acea-row row-center-wrapper"
v-for="(item, couponsListIndex) in couponsList" v-for="(item, couponsListIndex) in couponsList"
:key="couponsListIndex" :key="couponsListIndex"
> >
<div class="money" :class="item.isUse ? 'moneyGray' : ''"> <view class="money" :class="item.isUse ? 'moneyGray' : ''">
<span class="num">{{ item.couponPrice }}</span> <text class="num">{{ item.couponPrice }}</text>
</div> </view>
<div class="text"> <view class="text">
<div class="condition line1">购物满{{ item.useMinPrice }}元可用</div> <view class="condition line1">购物满{{ item.useMinPrice }}元可用</view>
<div class="data acea-row row-between-wrapper"> <view class="data acea-row row-between-wrapper">
<div v-if="item.endTime !== 0"> <view v-if="item.endTime !== 0">
<data-format-t :data="item.startTime"></data-format-t>- <data-format-t :data="item.startTime"></data-format-t>-
<data-format-t :data="item.endTime"></data-format-t> <data-format-t :data="item.endTime"></data-format-t>
</div> </view>
<div v-else>不限时</div> <view v-else>不限时</view>
<div class="bnt gray" v-if="item.isUse === true">已领取</div> <view class="bnt gray" v-if="item.isUse === true">已领取</view>
<div class="bnt gray" v-else-if="item.isUse === 2">已领完</div> <view class="bnt gray" v-else-if="item.isUse === 2">已领完</view>
<div class="bnt bg-color-red" v-else @click="getCoupon(item.id, couponsListIndex)">立即领取</div> <view class="bnt bg-color-red" v-else @click="getCoupon(item.id, couponsListIndex)">立即领取</view>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<Loading :loaded="loadend" :loading="loading"></Loading> <Loading :loaded="loadend" :loading="loading"></Loading>
<!--暂无优惠券--> <!--暂无优惠券-->
<div class="noCommodity" v-if="couponsList.length === 0 && page > 1"> <view class="noCommodity" v-if="couponsList.length === 0 && page > 1">
<div class="noPictrue"> <view class="noPictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noCoupon.png'" class="image" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/noCoupon.png'" class="image" />
</div> </view>
</div> </view>
</div> </view>
</template> </template>
<script> <script>
import { getCoupon, getCouponReceive } from "@/api/user"; import { getCoupon, getCouponReceive } from "@/api/user";
@ -68,10 +68,18 @@ export default {
getCouponReceive(id) getCouponReceive(id)
.then(function(res) { .then(function(res) {
list[index].isUse = true; list[index].isUse = true;
that.$dialog.toast({ mes: "领取成功" }); uni.showToast({
title: "领取成功",
icon: "success",
duration: 2000
});
}) })
.catch(function(res) { .catch(function(err) {
that.$dialog.toast({ mes: res.response.data.msg }); uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
}); });
}, },
getUseCoupons: function() { getUseCoupons: function() {

46
pages/user/coupon/UserCoupon/index.vue

@ -1,35 +1,35 @@
<template> <template>
<div ref="container"> <view ref="container">
<div class="coupon-list" v-if="couponsList.length > 0"> <view class="coupon-list" v-if="couponsList.length > 0">
<div <view
class="item acea-row row-center-wrapper" class="item acea-row row-center-wrapper"
v-for="(item, couponsListIndex) in couponsList" v-for="(item, couponsListIndex) in couponsList"
:key="couponsListIndex" :key="couponsListIndex"
> >
<div class="money" :class="item._type === 0 ? 'moneyGray' : ''"> <view class="money" :class="item._type === 0 ? 'moneyGray' : ''">
<span class="num">{{ item.couponPrice }}</span> <text class="num">{{ item.couponPrice }}</text>
</div> </view>
<div class="text"> <view class="text">
<div class="condition line1">{{ item.couponTitle }}</div> <view class="condition line1">{{ item.couponTitle }}</view>
<div class="data acea-row row-between-wrapper"> <view class="data acea-row row-between-wrapper">
<div v-if="item.endTime === 0">不限时</div> <view v-if="item.endTime === 0">不限时</view>
<div v-else><data-format-t :data="item.addTime"></data-format-t> - <data-format-t :data="item.endTime"></data-format-t></div> <view v-else><data-format-t :data="item.addTime"></data-format-t> - <data-format-t :data="item.endTime"></data-format-t></view>
<div class="bnt gray" v-if="item._type === 0">{{ item._msg }}</div> <view class="bnt gray" v-if="item._type === 0">{{ item._msg }}</view>
<div class="bnt bg-color-red" v-else>{{ item._msg }}</div> <view class="bnt bg-color-red" v-else>{{ item._msg }}</view>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<!--暂无优惠券--> <!--暂无优惠券-->
<div <view
class="noCommodity" class="noCommodity"
v-if="couponsList.length === 0 && loading === true" v-if="couponsList.length === 0 && loading === true"
> >
<div class="noPictrue"> <view class="noPictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noCoupon.png'" class="image" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/noCoupon.png'" class="image" />
</div> </view>
</div> </view>
</div> </view>
</template> </template>
<script> <script>
import { getCouponsUser } from "@/api/user"; import { getCouponsUser } from "@/api/user";

16
pages/user/promotion/CashAudit/index.vue

@ -1,12 +1,12 @@
<template> <template>
<div class="cash-audit"> <view class="cash-audit">
<div class="pictrue"> <view class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/examine.png'" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/examine.png'" />
</div> </view>
<div class="tip">提现申请已提交等待人工审核</div> <view class="tip">提现申请已提交等待人工审核</view>
<div class="time">{{ time }}</div> <view class="time">{{ time }}</view>
<div class="bnt bg-color-red" @click="goUserPromotion()">好的</div> <view class="bnt bg-color-red" @click="goUserPromotion()">好的</view>
</div> </view>
</template> </template>
<script> <script>
export default { export default {

79
pages/user/promotion/CashRecord/index.vue

@ -1,37 +1,36 @@
<template> <template>
<div class="commission-details" ref="container"> <view class="commission-details" ref="container">
<div class="promoterHeader bg-color-red"> <view class="promoterHeader bg-color-red">
<div class="headerCon acea-row row-between-wrapper"> <view class="headerCon acea-row row-between-wrapper">
<div> <view>
<div class="name">提现记录</div> <view class="name">提现记录</view>
<div class="money"> <view class="money">
<span class="num">{{ commission }}</span>
</div> <text class="num">{{ commission }}</text>
</div> </view>
<div class="iconfont icon-jinbi1"></div> </view>
</div> <view class="iconfont icon-jinbi1"></view>
</div> </view>
<div class="sign-record" ref="content"> </view>
<div class="list"> <view class="sign-record" ref="content">
<div class="item" v-for="(item, infoIndex) in info" :key="infoIndex"> <view class="list">
<div class="data">{{ item.time }}</div> <view class="item" v-for="(item, infoIndex) in info" :key="infoIndex">
<div class="listn" v-for="(val, indexn) in item.list" :key="indexn"> <view class="data">{{ item.time }}</view>
<div class="itemn acea-row row-between-wrapper"> <view class="listn" v-for="(val, indexn) in item.list" :key="indexn">
<div> <view class="itemn acea-row row-between-wrapper">
<div class="name line1">{{ val.title }}</div> <view>
<div>{{ val.addTime }}</div> <view class="name line1">{{ val.title }}</view>
</div> <view>{{ val.addTime }}</view>
<div class="num" v-if="val.pm == 1">+{{ val.number }}</div> </view>
<div class="num font-color-red" v-if="val.pm == 0"> <view class="num" v-if="val.pm == 1">+{{ val.number }}</view>
-{{ val.number }} <view class="num font-color-red" v-if="val.pm == 0">-{{ val.number }}</view>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
</div>
<Loading :loaded="loaded" :loading="loading"></Loading> <Loading :loaded="loaded" :loading="loading"></Loading>
</div> </view>
</template> </template>
<script> <script>
import { getCommissionInfo, getSpreadInfo } from "@/api/user"; import { getCommissionInfo, getSpreadInfo } from "@/api/user";
@ -75,8 +74,12 @@ export default {
that.where.page = that.where.page + 1; that.where.page = that.where.page + 1;
that.info.push.apply(that.info, res.data); that.info.push.apply(that.info, res.data);
}, },
error => { err => {
that.$dialog.message(error.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
} }
); );
}, },
@ -86,8 +89,12 @@ export default {
res => { res => {
that.commission = res.data.commissionCount; that.commission = res.data.commissionCount;
}, },
error => { err => {
this.$dialog.message(error.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
} }
); );
} }

76
pages/user/promotion/CommissionDetails/index.vue

@ -1,36 +1,36 @@
<template> <template>
<div class="commission-details" ref="container"> <view class="commission-details" ref="container">
<div class="promoterHeader bg-color-red"> <view class="promoterHeader bg-color-red">
<div class="headerCon acea-row row-between-wrapper"> <view class="headerCon acea-row row-between-wrapper">
<div> <view>
<div class="name">佣金明细</div> <view class="name">佣金明细</view>
<div class="money"> <view class="money">
<span class="num">{{ commission }}</span> <text class="num">{{ commission }}</text>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<div class="sign-record" ref="content"> <view class="sign-record" ref="content">
<div class="list"> <view class="list">
<div class="item" v-for="(item, infoIndex) in info" :key="infoIndex"> <view class="item" v-for="(item, infoIndex) in info" :key="infoIndex">
<div class="data">{{ item.time }}</div> <view class="data">{{ item.time }}</view>
<div class="listn" v-for="(val, indexn) in item.list" :key="indexn"> <view class="listn" v-for="(val, indexn) in item.list" :key="indexn">
<div class="itemn acea-row row-between-wrapper"> <view class="itemn acea-row row-between-wrapper">
<div> <view>
<div class="name line1">{{ val.title }}</div> <view class="name line1">{{ val.title }}</view>
<div>{{ val.addTime }}</div> <view>{{ val.addTime }}</view>
</div> </view>
<div class="num" v-if="val.pm == 1">+{{ val.number }}</div> <view class="num" v-if="val.pm == 1">+{{ val.number }}</view>
<div class="num font-color-red" v-if="val.pm == 0"> <view class="num font-color-red" v-if="val.pm == 0">
-{{ val.number }} -{{ val.number }}
</div> </view>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<Loading :loaded="loaded" :loading="loading"></Loading> <Loading :loaded="loaded" :loading="loading"></Loading>
</div> </view>
</template> </template>
<script> <script>
import { getCommissionInfo, getSpreadInfo } from "@/api/user"; import { getCommissionInfo, getSpreadInfo } from "@/api/user";
@ -75,8 +75,12 @@ export default {
that.where.page = that.where.page + 1; that.where.page = that.where.page + 1;
that.info.push.apply(that.info, res.data); that.info.push.apply(that.info, res.data);
}, },
error => { err => {
that.$dialog.message(error.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
} }
); );
}, },
@ -86,8 +90,12 @@ export default {
res => { res => {
that.commission = res.data.commissionCount; that.commission = res.data.commissionCount;
}, },
error => { err => {
this.$dialog.message(error.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
} }
); );
} }

18
pages/user/promotion/Poster/index.vue

@ -1,16 +1,16 @@
<template> <template>
<div class="distribution-posters"> <view class="distribution-posters">
<div class="slider-banner banner"> <view class="slider-banner banner">
<swiper indicatorDots="true"> <swiper indicatorDots="true">
<block v-for="(item, infoIndex) in info" :key="infoIndex"> <block v-for="(item, infoIndex) in info" :key="infoIndex">
<swiper-item> <swiper-item>
<img class="slide-image" :src="item.wap_poster" mode="widthFix" show-menu-by-longpress /> <image class="slide-image" :src="item.wap_poster" mode="widthFix" show-menu-by-longpress />
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
</div> </view>
<div class="keep bg-color-red" @click="saveImg">保存海报</div> <view class="keep bg-color-red" @click="saveImg">保存海报</view>
</div> </view>
</template> </template>
<script> <script>
// import { swiper, swiperSlide } from "vue-awesome-swiper"; // import { swiper, swiperSlide } from "vue-awesome-swiper";
@ -64,7 +64,11 @@ export default {
that.info = res.data; that.info = res.data;
}, },
err => { err => {
that.$dialog.message(err.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
} }
); );
}, },

483
pages/user/promotion/PromoterList/index.vue

@ -1,249 +1,242 @@
<template> <template>
<div class="promoter-list" ref="container"> <view class="promoter-list" ref="container">
<div class="header"> <view class="header">
<div class="promoterHeader bg-color-red"> <view class="promoterHeader bg-color-red">
<div class="headerCon acea-row row-between-wrapper"> <view class="headerCon acea-row row-between-wrapper">
<div> <view>
<div class="name">推广人数</div> <view class="name">推广人数</view>
<div> <view>
<span class="num">{{ first + second }}</span <text class="num">{{ first + second }}</text>
> <text></text>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<div class="nav acea-row row-around"> <view class="nav acea-row row-around">
<div <view class="item" :class="screen.grade == 0 ? 'on' : ''" @click="checkGrade(0)">
class="item" 一级({{ first }})
:class="screen.grade == 0 ? 'on' : ''" </view>
@click="checkGrade(0)" <view class="item" :class="screen.grade == 1 ? 'on' : ''" @click="checkGrade(1)">
> 二级({{ second }})
一级({{ first }}) </view>
</div> </view>
<div <view class="search acea-row row-between-wrapper">
class="item" <form @submit.prevent="submitForm">
:class="screen.grade == 1 ? 'on' : ''" <view class="input">
@click="checkGrade(1)" <input placeholder="点击搜索会员名称" v-model="screen.keyword" />
> <text class="iconfont icon-guanbi"></text>
二级({{ second }}) </view>
</div> </form>
</div> <view class="iconfont icon-sousuo2"></view>
<div class="search acea-row row-between-wrapper"> </view>
<form @submit.prevent="submitForm"> </view>
<div class="input"> <view class="list">
<input placeholder="点击搜索会员名称" v-model="screen.keyword" /> <view class="sortNav acea-row row-middle" :class="fixedState === true ? 'on' : ''">
<span class="iconfont icon-guanbi"></span> <view class="sortItem" @click="sort('childCount')">
</div> 团队排序
</form> <image :src="$VUE_APP_RESOURCES_URL+'/images/sort1.png'" v-if="childCount == 1" />
<div class="iconfont icon-sousuo2"></div> <image :src="$VUE_APP_RESOURCES_URL+'/images/sort2.png'" v-if="childCount == 2" />
</div> <image :src="$VUE_APP_RESOURCES_URL+'/images/sort3.png'" v-if="childCount == 3" />
</div> </view>
<div class="list"> <view class="sortItem" @click="sort('numberCount')">
<div 金额排序
class="sortNav acea-row row-middle" <image :src="$VUE_APP_RESOURCES_URL+'/images/sort1.png'" v-if="numberCount == 1" />
:class="fixedState === true ? 'on' : ''" <image :src="$VUE_APP_RESOURCES_URL+'/images/sort2.png'" v-if="numberCount == 2" />
> <image :src="$VUE_APP_RESOURCES_URL+'/images/sort3.png'" v-if="numberCount == 3" />
<div class="sortItem" @click="sort('childCount')"> </view>
团队排序 <view class="sortItem" @click="sort('orderCount')">
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort1.png'" v-if="childCount == 1" /> 订单排序
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort2.png'" v-if="childCount == 2" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/sort1.png'" v-if="orderCount == 1" />
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort3.png'" v-if="childCount == 3" /> <image :src="$VUE_APP_RESOURCES_URL+'/images/sort2.png'" v-if="orderCount == 2" />
</div> <image :src="$VUE_APP_RESOURCES_URL+'/images/sort3.png'" v-if="orderCount == 3" />
<div class="sortItem" @click="sort('numberCount')"> </view>
金额排序 </view>
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort1.png'" v-if="numberCount == 1" /> <view :class="fixedState === true ? 'sortList' : ''">
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort2.png'" v-if="numberCount == 2" /> <view class="item acea-row row-between-wrapper" v-for="(val, spreadListIndex) in spreadList" :key="spreadListIndex">
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort3.png'" v-if="numberCount == 3" /> <view class="picTxt acea-row row-between-wrapper">
</div> <view class="pictrue">
<div class="sortItem" @click="sort('orderCount')"> <image :src="val.avatar" />
订单排序 </view>
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort1.png'" v-if="orderCount == 1" /> <view class="text">
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort2.png'" v-if="orderCount == 2" /> <view class="name line1">{{ val.nickname }}</view>
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort3.png'" v-if="orderCount == 3" /> <view>加入时间: {{ val.time }}</view>
</div> </view>
</div> </view>
<div :class="fixedState === true ? 'sortList' : ''"> <view class="right">
<div <view>
class="item acea-row row-between-wrapper" <text class="font-color-red">{{ val.childCount }}</text>
v-for="(val, spreadListIndex) in spreadList" </view>
:key="spreadListIndex" <view>{{ val.orderCount }} </view>
> <view>{{ val.numberCount ? val.numberCount : 0 }} </view>
<div class="picTxt acea-row row-between-wrapper"> </view>
<div class="pictrue"><img :src="val.avatar" /></div> </view>
<div class="text"> </view>
<div class="name line1">{{ val.nickname }}</div> </view>
<div>加入时间: {{ val.time }}</div> <Loading :loaded="loaded" :loading="loading"></Loading>
</div> </view>
</div>
<div class="right">
<div>
<span class="font-color-red">{{ val.childCount }}</span>
</div>
<div>{{ val.orderCount }} </div>
<div>{{ val.numberCount ? val.numberCount : 0 }} </div>
</div>
</div>
</div>
</div>
<Loading :loaded="loaded" :loading="loading"></Loading>
</div>
</template> </template>
<script> <script>
import { getSpreadUser } from "@/api/user"; import {
import Loading from "@/components/Loading"; getSpreadUser
export default { } from "@/api/user";
name: "PromoterList", import Loading from "@/components/Loading";
components: { export default {
Loading name: "PromoterList",
}, components: {
props: {}, Loading
data: function() { },
return { props: {},
fixedState: false, data: function() {
screen: { return {
page: 1, fixedState: false,
limit: 15, screen: {
grade: 0, page: 1,
keyword: "", limit: 15,
sort: "" grade: 0,
}, keyword: "",
childCount: 2, sort: ""
numberCount: 2, },
orderCount: 2, childCount: 2,
loaded: false, numberCount: 2,
loading: false, orderCount: 2,
spreadList: [], loaded: false,
loadTitle: "", loading: false,
first: "", spreadList: [],
second: "" loadTitle: "",
}; first: "",
}, second: ""
mounted: function() { };
this.getSpreadUsers(); },
}, mounted: function() {
onReachBottom() { this.getSpreadUsers();
!this.loading && this.getSpreadUsers(); },
}, onReachBottom() {
watch: { !this.loading && this.getSpreadUsers();
"screen.sort": function() { },
this.screen.page = 0; watch: {
this.loaded = false; "screen.sort": function() {
this.loading = false; this.screen.page = 0;
this.spreadList = []; this.loaded = false;
this.getSpreadUsers(); this.loading = false;
} this.spreadList = [];
}, this.getSpreadUsers();
methods: { }
handleScroll: function() { },
// var scrollTop = methods: {
// document.documentElement.scrollTop || document.body.scrollTop; handleScroll: function() {
// var offsetTop = document.querySelector(".header").clientHeight; // var scrollTop =
// if (scrollTop >= offsetTop) { // document.documentElement.scrollTop || document.body.scrollTop;
// this.fixedState = true; // var offsetTop = document.querySelector(".header").clientHeight;
// } else { // if (scrollTop >= offsetTop) {
// this.fixedState = false; // this.fixedState = true;
// } // } else {
}, // this.fixedState = false;
submitForm: function() { // }
this.screen.page = 0; },
this.loaded = false; submitForm: function() {
this.loading = false; this.screen.page = 0;
this.spreadList = []; this.loaded = false;
this.getSpreadUsers(); this.loading = false;
}, this.spreadList = [];
getSpreadUsers: function() { this.getSpreadUsers();
let that = this, },
screen = that.screen; getSpreadUsers: function() {
if (that.loaded || that.loading) return; let that = this,
that.loading = true; screen = that.screen;
getSpreadUser(screen).then( if (that.loaded || that.loading) return;
res => { that.loading = true;
that.loading = false; getSpreadUser(screen).then(
that.spreadList.push.apply(that.spreadList, res.data.list); res => {
that.loaded = res.data.list.length < that.screen.limit; // that.loading = false;
that.loadTitle = that.loaded ? "人家是有底线的" : "上拉加载更多"; that.spreadList.push.apply(that.spreadList, res.data.list);
that.screen.page = that.screen.page + 1; that.loaded = res.data.list.length < that.screen.limit; //
that.first = res.data.total; that.loadTitle = that.loaded ? "人家是有底线的" : "上拉加载更多";
that.second = res.data.totalLevel; that.screen.page = that.screen.page + 1;
}, that.first = res.data.total;
error => { that.second = res.data.totalLevel;
that.$dialog.message(error.msg); },
}, err => {
300 uni.showToast({
); title: err.msg || err.response.data.msg,
}, icon: 'none',
checkGrade: function(val) { duration: 2000
if (val == this.screen.grade) return; });
else { },
this.screen.page = 1; 300
this.screen.grade = val; );
this.loading = false; },
this.loaded = false; checkGrade: function(val) {
this.spreadList = []; if (val == this.screen.grade) return;
this.getSpreadUsers(); else {
} this.screen.page = 1;
}, this.screen.grade = val;
sort: function(types) { this.loading = false;
let that = this; this.loaded = false;
switch (types) { this.spreadList = [];
case "childCount": this.getSpreadUsers();
if (that.childCount == 2) { }
that.childCount = 1; },
that.orderCount = 2; sort: function(types) {
that.numberCount = 2; let that = this;
that.screen.sort = "childCount DESC"; switch (types) {
} else if (that.childCount == 1) { case "childCount":
that.childCount = 3; if (that.childCount == 2) {
that.orderCount = 2; that.childCount = 1;
that.numberCount = 2; that.orderCount = 2;
that.screen.sort = "childCount ASC"; that.numberCount = 2;
} else if (that.childCount == 3) { that.screen.sort = "childCount DESC";
that.childCount = 2; } else if (that.childCount == 1) {
that.orderCount = 2; that.childCount = 3;
that.numberCount = 2; that.orderCount = 2;
that.screen.sort = ""; that.numberCount = 2;
} that.screen.sort = "childCount ASC";
break; } else if (that.childCount == 3) {
case "numberCount": that.childCount = 2;
if (that.numberCount == 2) { that.orderCount = 2;
that.numberCount = 1; that.numberCount = 2;
that.orderCount = 2; that.screen.sort = "";
that.childCount = 2; }
that.screen.sort = "numberCount DESC"; break;
} else if (that.numberCount == 1) { case "numberCount":
that.numberCount = 3; if (that.numberCount == 2) {
that.orderCount = 2; that.numberCount = 1;
that.childCount = 2; that.orderCount = 2;
that.screen.sort = "numberCount ASC"; that.childCount = 2;
} else if (that.numberCount == 3) { that.screen.sort = "numberCount DESC";
that.numberCount = 2; } else if (that.numberCount == 1) {
that.orderCount = 2; that.numberCount = 3;
that.childCount = 2; that.orderCount = 2;
that.screen.sort = ""; that.childCount = 2;
} that.screen.sort = "numberCount ASC";
break; } else if (that.numberCount == 3) {
case "orderCount": that.numberCount = 2;
if (that.orderCount == 2) { that.orderCount = 2;
that.orderCount = 1; that.childCount = 2;
that.numberCount = 2; that.screen.sort = "";
that.childCount = 2; }
that.screen.sort = "orderCount DESC"; break;
} else if (that.orderCount == 1) { case "orderCount":
that.orderCount = 3; if (that.orderCount == 2) {
that.numberCount = 2; that.orderCount = 1;
that.childCount = 2; that.numberCount = 2;
that.screen.sort = "orderCount ASC"; that.childCount = 2;
} else if (that.orderCount == 3) { that.screen.sort = "orderCount DESC";
that.orderCount = 2; } else if (that.orderCount == 1) {
that.numberCount = 2; that.orderCount = 3;
that.childCount = 2; that.numberCount = 2;
that.screen.sort = ""; that.childCount = 2;
} that.screen.sort = "orderCount ASC";
break; } else if (that.orderCount == 3) {
default: that.orderCount = 2;
that.screen.sort = ""; that.numberCount = 2;
} that.childCount = 2;
} that.screen.sort = "";
} }
}; break;
default:
that.screen.sort = "";
}
}
}
};
</script> </script>

99
pages/user/promotion/PromoterOrder/index.vue

@ -1,47 +1,52 @@
<template> <template>
<div class="promoter-order" ref="container"> <view class="promoter-order" ref="container">
<div class="promoterHeader bg-color-red"> <view class="promoterHeader bg-color-red">
<div class="headerCon acea-row row-between-wrapper"> <view class="headerCon acea-row row-between-wrapper">
<div> <view>
<div class="name">累计推广订单</div> <text class="name">累计推广订单</text>
<div> <view>
<span class="num">{{ count }}</span <text class="num">{{ count }}</text>
> <text></text>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<div class="list"> <view class="list">
<div class="item" v-for="(item, listIndex) in list" :key="listIndex"> <view class="item" v-for="(item, listIndex) in list" :key="listIndex">
<div class="title acea-row row-column row-center"> <view class="title acea-row row-column row-center">
<div class="data">{{ item.time }}</div> <view class="data">{{ item.time }}</view>
<div>本月累计推广订单{{ item.count ? item.count : 0 }}</div> <text>本月累计推广订单{{ item.count ? item.count : 0 }}</text>
</div> </view>
<div class="listn"> <view class="listn">
<div class="itenm" v-for="(val, indexn) in item.child" :key="indexn"> <view class="itenm" v-for="(val, indexn) in item.child" :key="indexn">
<div class="top acea-row row-between-wrapper"> <view class="top acea-row row-between-wrapper">
<div class="pictxt acea-row row-between-wrapper"> <view class="pictxt acea-row row-between-wrapper">
<div class="pictrue"> <view class="pictrue">
<img :src="val.avatar" /> <image :src="val.avatar" />
</div> </view>
<div class="text line1">{{ val.nickname }}</div> <text class="text line1">{{ val.nickname }}</text>
</div> </view>
<div class="money"> <view class="money">
返佣<span class="font-color-red" <text>返佣</text>
>{{ val.number ? val.number : 0 }}</span <text class="font-color-red">{{ val.number ? val.number : 0 }}</text>
> </view>
</div> </view>
</div> <view class="bottom">
<div class="bottom"> <view>
<div><span class="name">订单号</span>{{ val.orderId }}</div> <text class="name">订单号</text>
<div><span class="name">下单时间</span>{{ val.time }}</div> {{ val.orderId }}
</div> </view>
</div> <view>
</div> <text class="name">下单时间</text>
</div> {{ val.time }}
</div> </view>
</view>
</view>
</view>
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading> <Loading :loaded="loaded" :loading="loading"></Loading>
</div> </view>
</template> </template>
<script> <script>
import { getSpreadOrder } from "@/api/user"; import { getSpreadOrder } from "@/api/user";
@ -68,7 +73,7 @@ export default {
mounted: function() { mounted: function() {
this.getIndex(); this.getIndex();
}, },
onReachBottom() { onReachBottom() {
!this.loading && this.getIndex(); !this.loading && this.getIndex();
}, },
methods: { methods: {
@ -85,8 +90,12 @@ export default {
there.list.push.apply(there.list, res.data.list); there.list.push.apply(there.list, res.data.list);
there.count = res.data.count; there.count = res.data.count;
}, },
error => { err => {
there.$dialog.message(error.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
}, },
300 300
); );

149
pages/user/promotion/UserCash/index.vue

@ -1,73 +1,58 @@
<template> <template>
<div class="cash-withdrawal"> <view class="cash-withdrawal">
<div class="nav acea-row"> <view class="nav acea-row">
<div <view
v-for="(item, navListIndex) in navList" v-for="(item, navListIndex) in navList"
class="item font-color-red" class="item font-color-red"
@click="swichNav(navListIndex, item)" @click="swichNav(navListIndex, item)"
:key="navListIndex" :key="navListIndex"
> >
<div <view class="line bg-color-red" :class="currentTab === navListIndex ? 'on' : ''"></view>
class="line bg-color-red" <view class="iconfont" :class="item.icon + ' ' + (currentTab === navListIndex ? 'on' : '')"></view>
:class="currentTab === navListIndex ? 'on' : ''" <view>{{ item.name }}</view>
></div> </view>
<div </view>
class="iconfont" <view class="wrapper">
:class="item.icon + ' ' + (currentTab === navListIndex ? 'on' : '')" <view :hidden="currentTab !== 0" class="list">
></div> <view class="item acea-row row-between-wrapper">
<div>{{ item.name }}</div> <view class="name">微信号</view>
</div> <view class="input">
</div>
<div class="wrapper">
<div :hidden="currentTab !== 0" class="list">
<div class="item acea-row row-between-wrapper">
<div class="name">微信号</div>
<div class="input">
<input placeholder="请输入微信号" v-model="post.weixin" /> <input placeholder="请输入微信号" v-model="post.weixin" />
</div> </view>
</div> </view>
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div class="name">提现</div> <view class="name">提现</view>
<div class="input"> <view class="input">
<input <input :placeholder="'最低提现金额' + minPrice" v-model="post.money" />
:placeholder="'最低提现金额' + minPrice" </view>
v-model="post.money" </view>
/> <view class="tip">当前可提现金额: {{ commissionCount }}</view>
</div> <view class="bnt bg-color-red" @click="submitted">提现</view>
</div> </view>
<div class="tip">当前可提现金额: {{ commissionCount }}</div> <view :hidden="currentTab !== 1" class="list">
<div class="bnt bg-color-red" @click="submitted">提现</div> <view class="item acea-row row-between-wrapper">
</div> <view class="name">用户名</view>
<div :hidden="currentTab !== 1" class="list"> <view class="input">
<div class="item acea-row row-between-wrapper">
<div class="name">用户名</div>
<div class="input">
<input placeholder="请填写您的支付宝用户名" v-model="post.name" /> <input placeholder="请填写您的支付宝用户名" v-model="post.name" />
</div> </view>
</div> </view>
<div class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<div class="name">账号</div> <view class="name">账号</view>
<div class="input"> <view class="input">
<input <input placeholder="请填写您的支付宝账号" v-model="post.alipay_code" />
placeholder="请填写您的支付宝账号" </view>
v-model="post.alipay_code" </view>
/> <view class="item acea-row row-between-wrapper">
</div> <view class="name">提现</view>
</div> <view class="input">
<div class="item acea-row row-between-wrapper"> <input :placeholder="'最低提现金额' + minPrice" v-model="post.money" />
<div class="name">提现</div> </view>
<div class="input"> </view>
<input <view class="tip">当前可提现金额: {{ commissionCount }}</view>
:placeholder="'最低提现金额' + minPrice" <view class="bnt bg-color-red" @click="submitted">提现</view>
v-model="post.money" </view>
/> </view>
</div> </view>
</div>
<div class="tip">当前可提现金额: {{ commissionCount }}</div>
<div class="bnt bg-color-red" @click="submitted">提现</div>
</div>
</div>
</div>
</template> </template>
<script> <script>
import { getBank, postCashInfo } from "@/api/user"; import { getBank, postCashInfo } from "@/api/user";
@ -116,7 +101,11 @@ export default {
that.commissionCount = res.data.commissionCount; that.commissionCount = res.data.commissionCount;
}, },
function(err) { function(err) {
that.$dialog.message(err.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
} }
); );
}, },
@ -131,10 +120,22 @@ export default {
if ( if (
parseFloat(money) > parseFloat(that.commissionCount) || parseFloat(money) > parseFloat(that.commissionCount) ||
parseFloat(that.commissionCount) == 0 parseFloat(that.commissionCount) == 0
) ) {
return that.$dialog.message("余额不足"); uni.showToast({
if (parseFloat(money) < parseFloat(that.minPrice)) title: "余额不足",
return that.$dialog.message("最低提现金额" + that.minPrice); icon: "none",
duration: 2000
});
return;
}
if (parseFloat(money) < parseFloat(that.minPrice)) {
uni.showToast({
title: "最低提现金额" + that.minPrice,
icon: "none",
duration: 2000
});
return;
}
switch (that.post.extract_type) { switch (that.post.extract_type) {
case "alipay": case "alipay":
try { try {
@ -175,11 +176,19 @@ export default {
save: function(info) { save: function(info) {
postCashInfo(info).then( postCashInfo(info).then(
res => { res => {
this.$dialog.message(res.msg); uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
this.router.push({ path: "/user/audit" }); this.router.push({ path: "/user/audit" });
}, },
error => { err => {
this.$dialog.message(error.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
} }
); );
} }

86
pages/user/promotion/UserPromotion/index.vue

@ -1,45 +1,45 @@
<template> <template>
<div class="my-promotion"> <view class="my-promotion">
<div class="header"> <view class="header">
<div class="name acea-row row-center-wrapper"> <view class="name acea-row row-center-wrapper">
<div>当前佣金</div> <view>当前佣金</view>
<div class="record" @click="goCashRecord()"> <view class="record" @click="goCashRecord()">
提现记录 提现记录
<span class="iconfont icon-xiangyou"></span> <text class="iconfont icon-xiangyou"></text>
</div> </view>
</div> </view>
<div class="num">{{ Info.commissionCount }}</div> <view class="num">{{ Info.commissionCount }}</view>
<div class="profit acea-row row-between-wrapper"> <view class="profit acea-row row-between-wrapper">
<div class="item"> <view class="item">
<div>昨日收益</div> <view>昨日收益</view>
<div class="money">{{ Info.lastDayCount }}</div> <view class="money">{{ Info.lastDayCount }}</view>
</div> </view>
<div class="item"> <view class="item">
<div>累积已提</div> <view>累积已提</view>
<div class="money">{{ Info.extractCount }}</div> <view class="money">{{ Info.extractCount }}</view>
</div> </view>
</div> </view>
</div> </view>
<div class="bnt bg-color-red" @click="toCash">立即提现</div> <view class="bnt bg-color-red" @click="toCash">立即提现</view>
<div class="list acea-row row-between-wrapper"> <view class="list acea-row row-between-wrapper">
<div class="item acea-row row-center-wrapper row-column" @click="goPoster()"> <view class="item acea-row row-center-wrapper row-column" @click="goPoster()">
<span class="iconfont icon-erweima"></span> <text class="iconfont icon-erweima"></text>
<div>推广名片</div> <view>推广名片</view>
</div> </view>
<div class="item acea-row row-center-wrapper row-column" @click="goPromoterList()"> <view class="item acea-row row-center-wrapper row-column" @click="goPromoterList()">
<span class="iconfont icon-tongji"></span> <text class="iconfont icon-tongji"></text>
<div>推广人统计</div> <view>推广人统计</view>
</div> </view>
<div class="item acea-row row-center-wrapper row-column" @click="goCommissionDetails()"> <view class="item acea-row row-center-wrapper row-column" @click="goCommissionDetails()">
<span class="iconfont icon-qiandai"></span> <text class="iconfont icon-qiandai"></text>
<div>佣金明细</div> <view>佣金明细</view>
</div> </view>
<div class="item acea-row row-center-wrapper row-column" @click="goPromoterOrder()"> <view class="item acea-row row-center-wrapper row-column" @click="goPromoterOrder()">
<span class="iconfont icon-dingdan"></span> <text class="iconfont icon-dingdan"></text>
<div>推广人订单</div> <view>推广人订单</view>
</div> </view>
</div> </view>
</div> </view>
</template> </template>
<script> <script>
import { getSpreadInfo } from "@/api/user"; import { getSpreadInfo } from "@/api/user";
@ -83,7 +83,11 @@ export default {
that.Info = res.data; that.Info = res.data;
}, },
function(err) { function(err) {
that.$dialog.message(err.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
} }
); );
}, },

120
pages/user/signIn/Integral/index.vue

@ -1,75 +1,75 @@
<template> <template>
<div class="integral-details" ref="container"> <view class="integral-details" ref="container">
<div class="header"> <view class="header">
<div class="currentScore">当前积分</div> <view class="currentScore">当前积分</view>
<div>{{ info.integral }}</div> <view>{{ info.integral }}</view>
<div class="line"></div> <view class="line"></view>
<!--<div class="nav acea-row">--> <!--<view class="nav acea-row">-->
<!--<div class="item">--> <!--<view class="item">-->
<!--<div class="num">{{ info.sum_integral }}</div>--> <!--<view class="num">{{ info.sum_integral }}</view>-->
<!--<div>累计积分</div>--> <!--<view>累计积分</view>-->
<!--</div>--> <!--</view>-->
<!--<div class="item">--> <!--<view class="item">-->
<!--<div class="num">{{ info.deduction_integral }}</div>--> <!--<view class="num">{{ info.deduction_integral }}</view>-->
<!--<div>累计消费</div>--> <!--<view>累计消费</view>-->
<!--</div>--> <!--</view>-->
<!--<div class="item">--> <!--<view class="item">-->
<!--<div class="num">{{ info.today_integral }}</div>--> <!--<view class="num">{{ info.today_integral }}</view>-->
<!--<div>今日获得</div>--> <!--<view>今日获得</view>-->
<!--</div>--> <!--</view>-->
<!--</div>--> <!--</view>-->
</div> </view>
<div class="wrapper"> <view class="wrapper">
<div class="nav acea-row"> <view class="nav acea-row">
<div <view
class="item acea-row row-center-wrapper" class="item acea-row row-center-wrapper"
:class="current === navListIndex ? 'on' : ''" :class="current === navListIndex ? 'on' : ''"
v-for="(item, navListIndex) in navList" v-for="(item, navListIndex) in navList"
:key="navListIndex" :key="navListIndex"
@click="nav(navListIndex)" @click="nav(navListIndex)"
> >
<span class="iconfont" :class="item.icon"></span> <text class="iconfont" :class="item.icon"></text>
{{ item.name }} {{ item.name }}
</div> </view>
</div> </view>
<div class="list" :hidden="current !== 0"> <view class="list" :hidden="current !== 0">
<!--<div class="tip acea-row row-middle">--> <!--<view class="tip acea-row row-middle">-->
<!--<span class="iconfont icon-shuoming"></span--> <!--<text class="iconfont icon-shuoming"><text-->
<!--&gt;提示积分数值的高低会直接影响您的会员等级--> <!--&gt;提示积分数值的高低会直接影响您的会员等级-->
<!--</div>--> <!--</view>-->
<div <view
class="item acea-row row-between-wrapper" class="item acea-row row-between-wrapper"
v-for="(item, listIndex) in list" v-for="(item, listIndex) in list"
:key="listIndex" :key="listIndex"
> >
<div> <view>
<div class="state">{{ item.title }}</div> <view class="state">{{ item.title }}</view>
<div> <view>
<data-format :data="item.addTime"></data-format> <data-format :data="item.addTime"></data-format>
</div> </view>
</div> </view>
<div class="num" v-if="item.pm == 1">+{{ item.number }}</div> <view class="num" v-if="item.pm == 1">+{{ item.number }}</view>
<div class="num font-color-red" v-if="item.pm == 0">-{{ item.number }}</div> <view class="num font-color-red" v-if="item.pm == 0">-{{ item.number }}</view>
</div> </view>
</div> </view>
<!--<div class="list2" :hidden="current !== 1">--> <!--<view class="list2" :hidden="current !== 1">-->
<!--<div class="item acea-row row-between-wrapper" @click="goHome()">--> <!--<view class="item acea-row row-between-wrapper" @click="goHome()">-->
<!--<div class="pictrue"><img :src="$VUE_APP_RESOURCES_URL+'/images/score.png'" /></div>--> <!--<view class="pictrue"><image :src="$VUE_APP_RESOURCES_URL+'/images/score.png'" /></view>-->
<!--<div class="name">购买商品可获得积分奖励</div>--> <!--<view class="name">购买商品可获得积分奖励</view>-->
<!--<div class="earn">赚积分</div>--> <!--<view class="earn">赚积分</view>-->
<!--</div>--> <!--</view>-->
<!--<div--> <!--<view-->
<!--class="item acea-row row-between-wrapper"--> <!--class="item acea-row row-between-wrapper"-->
<!--@click="goSignIn()"--> <!--@click="goSignIn()"-->
<!--&gt;--> <!--&gt;-->
<!--<div class="pictrue"><img :src="$VUE_APP_RESOURCES_URL+'/images/score.png'" /></div>--> <!--<view class="pictrue"><image :src="$VUE_APP_RESOURCES_URL+'/images/score.png'" /></view>-->
<!--<div class="name">每日签到可获得积分奖励</div>--> <!--<view class="name">每日签到可获得积分奖励</view>-->
<!--<div class="earn">赚积分</div>--> <!--<view class="earn">赚积分</view>-->
<!--</div>--> <!--</view>-->
<!--</div>--> <!--</view>-->
</div> </view>
<Loading :loaded="loaded" :loading="loading"></Loading> <Loading :loaded="loaded" :loading="loading"></Loading>
</div> </view>
</template> </template>
<script> <script>
import { getIntegralList, postSignUser } from "@/api/user"; import { getIntegralList, postSignUser } from "@/api/user";
@ -134,7 +134,11 @@ export default {
that.list.push.apply(that.list, res.data); that.list.push.apply(that.list, res.data);
}, },
err => { err => {
that.$dialog.message(err.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
} }
); );
}, },
@ -145,7 +149,11 @@ export default {
that.info = res.data; that.info = res.data;
}, },
err => { err => {
that.$dialog.message(err.msg); uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
} }
); );
} }

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save