Browse Source

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

master
gaoxs 5 years ago
parent
commit
95845779db
  1. 7
      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. 76
      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. 40
      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. 200
      pages/activity/GroupRule/index.vue
  46. 16
      pages/activity/Poster/index.vue
  47. 79
      pages/activity/SeckillDetails/index.vue
  48. 91
      pages/authorization/index.vue
  49. 198
      pages/home/index.vue
  50. 20
      pages/launch/index.vue
  51. 117
      pages/order/GoodsReturn/index.vue
  52. 315
      pages/order/Logistics/index.vue
  53. 172
      pages/order/MyOrder/index.vue
  54. 607
      pages/order/OrderDetails/index.vue
  55. 550
      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. 190
      pages/orderAdmin/AdminOrderList/index.vue
  60. 86
      pages/orderAdmin/GoodsDeliver/index.vue
  61. 112
      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. 154
      pages/shop/GoodsEvaluate/index.vue
  70. 92
      pages/shop/GoodsList/index.vue
  71. 44
      pages/shop/GoodsPromotion/index.vue
  72. 26
      pages/shop/HotNewGoods/index.vue
  73. 318
      pages/shop/ShoppingCart/index.vue
  74. 28
      pages/shop/news/NewsDetail/index.vue
  75. 36
      pages/shop/news/NewsList/index.vue
  76. 39
      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. 161
      pages/user/PersonalData/index.vue
  81. 149
      pages/user/Recharge/index.vue
  82. 58
      pages/user/Register/index.vue
  83. 87
      pages/user/RetrievePassword/index.vue
  84. 262
      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. 163
      pages/user/promotion/PromoterList/index.vue
  97. 97
      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

7
App.vue

@ -13,6 +13,11 @@
}
</script>
<style>
<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>

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 {
padding: 0.2*3.125rem;
padding: 0.2*100rpx;
}
/* pad20 */
.pad20 {
padding: 0 0.2*3.125rem;
padding: 0 0.2*100rpx;
}
/* padding30 */
.padding30 {
padding: 0.3*3.125rem;
padding: 0.3*100rpx;
}
/*pad30 */
.pad30 {
padding: 0 0.3*3.125rem;
padding: 0 0.3*100rpx;
}
/* layout */
.acea-row {
@ -96,35 +96,35 @@
.slider-banner .swiper-container {
height: 100%;
}
.slider-banner img {
.slider-banner image{
display: block;
width: 100%;
height: 100%;
}
.start {
width: 1.22*3.125rem;
height: 0.3*3.125rem;
width: 1.22*100rpx;
height: 0.3*100rpx;
background-image: url("https://h5.dayouqiantu.cn/static/images/start.png");
background-repeat: no-repeat;
background-size: 1.22*3.125rem auto;
background-size: 1.22*100rpx auto;
}
.start.star5 {
background-position: 0 0.03*3.125rem;
background-position: 0 0.03*100rpx;
}
.start.star4 {
background-position: 0 -0.3*3.125rem;
background-position: 0 -0.3*100rpx;
}
.start.star3 {
background-position: 0 -0.7*3.125rem;
background-position: 0 -0.7*100rpx;
}
.start.star2 {
background-position: 0 -1.05*3.125rem;
background-position: 0 -1.05*100rpx;
}
.start.star1 {
background-position: 0 -1.4*3.125rem;
background-position: 0 -1.4*100rpx;
}
.start.star0 {
background-position: 0 -1.75*3.125rem;
background-position: 0 -1.75*100rpx;
}
/* 单选框和多选框 */
.checkbox-wrapper {
@ -148,20 +148,20 @@
background-color: #e93323;
border-color: #e93323;
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-position: center center;
}
.Loads {
height: 0.8*3.125rem;
font-size: 0.25*3.125rem;
height: 0.8*100rpx;
font-size: 0.25*100rpx;
color: #000;
}
.Loads .iconfont {
font-size: 0.3*3.125rem;
margin-right: 0.1*3.125rem;
height: 0.32*3.125rem;
line-height: 0.32*3.125rem;
font-size: 0.3*100rpx;
margin-right: 0.1*100rpx;
height: 0.32*100rpx;
line-height: 0.32*100rpx;
}
/*加载动画*/
@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;
}
.iconfont{
font-size: .36*3.125rem;
font-size: .36*100rpx;
}
/* 一像素边框 */
@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>
<div>
<div class="address-window" :class="value === true ? 'on' : ''">
<div class="title">
<view>
<view class="address-window" :class="value === true ? 'on' : ''">
<view class="title">
选择地址
<span class="iconfont icon-guanbi" @click="closeAddress"></span>
</div>
<div class="list" v-if="addressList.length">
<div
<text class="iconfont icon-guanbi" @click="closeAddress"></text>
</view>
<view class="list" v-if="addressList.length">
<view
class="item acea-row row-between-wrapper"
:class="item.id === checked ? 'font-color-red' : ''"
v-for="(item, addressIndex) in addressList"
@click="tapAddress(addressIndex)"
:key="addressIndex"
>
<span class="iconfont icon-ditu" :class="item.id === checked ? 'font-color-red' : ''"></span>
<div class="addressTxt">
<div class="name" :class="item.id === checked ? 'font-color-red' : ''">
<text class="iconfont icon-ditu" :class="item.id === checked ? 'font-color-red' : ''"></text>
<view class="addressTxt">
<view class="name" :class="item.id === checked ? 'font-color-red' : ''">
{{ item.realName }}
<span class="phone">{{ item.phone }}</span>
</div>
<div class="line1">
<text class="phone">{{ item.phone }}</text>
</view>
<view class="line1">
{{ item.province }}{{ item.city }}{{ item.district
}}{{ item.detail }}
</div>
</div>
<span class="iconfont icon-complete" :class="item.id === checked ? 'font-color-red' : ''"></span>
</div>
</div>
<div class="pictrue" v-if="addressList.length < 1">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noAddress.png'" class="image" />
</div>
<div class="addressBnt bg-color-red" @click="goAddressPages">新加地址</div>
</div>
<div class="mask" @touchmove.prevent :hidden="value === false" @click="closeAddress"></div>
</div>
</view>
</view>
<text class="iconfont icon-complete" :class="item.id === checked ? 'font-color-red' : ''"></text>
</view>
</view>
<view class="pictrue" v-if="addressList.length < 1">
<image :src="$VUE_APP_RESOURCES_URL+'/images/noAddress.png'" class="image" />
</view>
<view class="addressBnt bg-color-red" @click="goAddressPages">新加地址</view>
</view>
<view class="mask" @touchmove.prevent :hidden="value === false" @click="closeAddress"></view>
</view>
</template>
<script>
import { getAddressList } from "@/api/user";

20
components/CountDown.vue

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

68
components/CouponListWindow.vue

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

71
components/CouponPop.vue

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

76
components/CouponWindow.vue

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

2
components/DataFormat.vue

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

2
components/DataFormatT.vue

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

22
components/Footer.vue

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

46
components/GoodList.vue

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

14
components/Home.vue

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

8
components/Loading.vue

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

42
components/OrderGoods.vue

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

100
components/Payment.vue

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

94
components/PriceChange.vue

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

10
components/ProductConSwiper.vue

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

72
components/ProductWindow.vue

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

34
components/PromotionGood.vue

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

32
components/Recommend.vue

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

12
components/ShareInfo.vue

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

28
components/ShareRedPackets.vue

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

56
components/StorePoster.vue

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

67
components/SwitchWindow.vue

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

46
components/UserEvaluation.vue

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

24
components/WriteOff.vue

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

14
main.js

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

6
manifest.json

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

6
pages/Loading/index.vue

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

40
pages/NotDefined/index.vue

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

56
pages/activity/BargainRecord/index.vue

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

266
pages/activity/DargainDetails/index.vue

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

60
pages/activity/GoodsBargain/index.vue

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

70
pages/activity/GoodsGroup/index.vue

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

80
pages/activity/GoodsSeckill/index.vue

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

199
pages/activity/GroupDetails/index.vue

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

200
pages/activity/GroupRule/index.vue

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

16
pages/activity/Poster/index.vue

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

79
pages/activity/SeckillDetails/index.vue

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

91
pages/authorization/index.vue

@ -1,26 +1,36 @@
<template>
<div class="container">
<div v-if="!isAuthorization">
<div class="getUserInfo">
<p>您还未允许微信登录授权请点击下方按钮允许微信授权登录</p>
<view class="container">
<view v-if="!isAuthorization">
<view class="getUserInfo">
<view>您还未允许微信登录授权请点击下方按钮允许微信授权登录</text>
<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>
</div>
</div>
</div>
</view>
</view>
</view>
</view>
</template>
<script>
import { mapState, mapMutations, mapActions } from "vuex";
//
// import request from "@//api/request";
import { wxappAuth, getUser } from "@/api/user";
import dayjs from "dayjs";
import cookie from "@/utils/store/cookie";
import { login } from "@/utils";
export default {
import {
mapState,
mapMutations,
mapActions
} from "vuex";
//
// import request from "@//api/request";
import {
wxappAuth,
getUser
} from "@/api/user";
import dayjs from "dayjs";
import cookie from "@/utils/store/cookie";
import {
login
} from "@/utils";
export default {
data() {
return {};
},
@ -53,7 +63,9 @@ export default {
this.CHANGE_TABTAR(0);
this.$yrouter.replace({
path: "/pages/home/index",
query: { type: 0 }
query: {
type: 0
}
});
},
getUserInfo(data) {
@ -65,14 +77,15 @@ export default {
},
onUnload() {},
mounted() {}
};
};
</script>
<style lang="less">
.sp-cell {
.sp-cell {
height: 20rpx;
}
.getUserInfo {
}
.getUserInfo {
display: flex;
align-items: center;
flex-direction: column;
@ -81,16 +94,17 @@ export default {
p {
margin-bottom: 20px;
}
}
.container {
}
.container {
flex: 1;
display: flex;
flex-direction: column;
justify-content: flex-start;
position: relative;
}
}
.tab-bar {
.tab-bar {
font-size: 0;
display: flex;
align-items: center;
@ -146,8 +160,7 @@ export default {
}
}
.tab-bar-pic-active {
}
.tab-bar-pic-active {}
text {
font-size: 10px;
@ -155,23 +168,23 @@ export default {
line-height: 10px;
margin-top: 5px;
}
}
}
.tab-bar-bg {
.tab-bar-bg {
padding-top: 46px;
width: 100%;
}
}
.view-item {
.view-item {
display: none;
width: 100%;
}
}
.view-item-active {
.view-item-active {
display: block;
}
}
.getUserInfo {
.getUserInfo {
display: flex;
align-items: center;
flex-direction: column;
@ -180,9 +193,9 @@ export default {
p {
margin-bottom: 20px;
}
}
}
._van-dialog {
._van-dialog {
z-index: 99999999999;
}
}
</style>

198
pages/home/index.vue

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

20
pages/launch/index.vue

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

117
pages/order/GoodsReturn/index.vue

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

315
pages/order/Logistics/index.vue

@ -1,105 +1,102 @@
<template>
<div class="logistics">
<div class="header acea-row row-between row-top" v-for="cart in cartInfo" :key="cart.id">
<div class="pictrue">
<img :src="cart.productInfo.image" />
</div>
<div class="text acea-row row-between">
<div class="name line2">{{ cart.productInfo.store_name }}</div>
<div class="money">
<div>{{ cart.truePrice }}</div>
<div>x{{ cart.cart_num }}</div>
</div>
</div>
</div>
<div class="logisticsCon" style="margin-bottom: 5px">
<div class="company acea-row row-between-wrapper">
<div class="picTxt acea-row row-between-wrapper">
<div class="iconfont icon-wuliu"></div>
<div class="text">
<div>
<span class="name line1">物流公司</span>
<view class="logistics">
<view class="header acea-row row-between row-top" v-for="cart in cartInfo" :key="cart.id">
<view class="pictrue">
<image :src="cart.productInfo.image" />
</view>
<view class="text acea-row row-between">
<view class="name line2">{{ cart.productInfo.store_name }}</view>
<view class="money">
<view>{{ cart.truePrice }}</view>
<view>x{{ cart.cart_num }}</view>
</view>
</view>
</view>
<view class="logisticsCon" style="margin-bottom: 5px">
<view class="company acea-row row-between-wrapper">
<view class="picTxt acea-row row-between-wrapper">
<view class="iconfont icon-wuliu"></view>
<view class="text">
<view>
<text class="name line1">物流公司</text>
{{ orderInfo.deliveryName }}
</div>
<div class="express line1">
<span class="name">快递单号</span>
</view>
<view class="express line1">
<text class="name">快递单号</text>
{{ orderInfo.deliveryId }}
</div>
</div>
</div>
<div
class="copy acea-row row-center-wrapper copy-data"
@click="copyClipboard(orderInfo.deliveryId)"
>复制单号</div>
</div>
<div class="item" v-for="(express, expressListIndex) in expressList" :key="expressListIndex">
<div class="circular" :class="expressListIndex === 0 ? 'on' : ''"></div>
<div class="text">
<div :class="expressListIndex === 0 ? 'font-color-red' : ''">{{ express.status }}</div>
<div class="data">{{ express.time }}</div>
</div>
</div>
</div>
</view>
</view>
</view>
<view class="copy acea-row row-center-wrapper copy-data" @click="copyClipboard(orderInfo.deliveryId)">复制单号</view>
</view>
<view class="item" v-for="(express, expressListIndex) in expressList" :key="expressListIndex">
<view class="circular" :class="expressListIndex === 0 ? 'on' : ''"></view>
<view class="text">
<view :class="expressListIndex === 0 ? 'font-color-red' : ''">{{ express.status }}</view>
<view class="data">{{ express.time }}</view>
</view>
</view>
</view>
<!-- 物流进度条 -->
<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;">
<div
class="bg-white"
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 style="margin-bottom:5px;">
<view class="bg-white" style="width: 92%; margin-left: 4%;margin: auto;padding-left: 15px;padding-right: 15px;padding-top: 10px">
<view style="font-size: .26rem;color: #111111; margin: 5px 0">
物流跟踪
<!--物流跟踪-->
</div>
<div>
<div class="track-rcol">
<div class="track-list">
<ul>
<div v-for="(item,logisticsListindex) in logisticsList" :key="logisticsListindex">
<li class="active" v-if="logisticsListindex===0">
<div></div>
</view>
<view>
<view class="track-rcol">
<view class="track-list">
<view>
<view v-for="(item,logisticsListindex) in logisticsList" :key="logisticsListindex">
<view class="active" v-if="logisticsListindex===0">
<view></view>
<i class="node-icon"></i>
<span class="txt">{{item.acceptStation}}</span>
<span class="time">{{item.acceptTime}}</span>
</li>
<li
v-if="logisticsListindex > 0 && logisticsListindex !== logisticsList.length-1"
>
<text class="txt">{{item.acceptStation}}</text>
<text class="time">{{item.acceptTime}}</text>
</view>
<view v-if="logisticsListindex > 0 && logisticsListindex !== logisticsList.length-1">
<i class="node-icon"></i>
<span class="txt">{{item.acceptStation}}</span>
<span class="time">{{item.acceptTime}}</span>
</li>
<li v-if="logisticsListindex === logisticsList.length-1" class="finall">
<text class="txt">{{item.acceptStation}}</text>
<text class="time">{{item.acceptTime}}</text>
</view>
<view v-if="logisticsListindex === logisticsList.length-1" class="finall">
<i class="div-spilander"></i>
<i class="node-icon"></i>
<span class="txt">{{item.acceptStation}}</span>
<span class="time">{{item.acceptTime}}</span>
</li>
</div>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<text class="txt">{{item.acceptStation}}</text>
<text class="time">{{item.acceptTime}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<div class="no-express" v-if="loaded && !expressList.length">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noExpress.png'" />
</div>
<view class="no-express" v-if="loaded && !expressList.length">
<image :src="$VUE_APP_RESOURCES_URL+'/images/noExpress.png'" />
</view>
<Recommend></Recommend>
</div>
</view>
</template>
<script>
import Recommend from "@/components/Recommend";
import { express, orderDetail } from "@/api/order";
import { copyClipboard } from "@/utils";
import Recommend from "@/components/Recommend";
import {
express,
orderDetail
} from "@/api/order";
import {
copyClipboard
} from "@/utils";
const NAME = "Logistics";
const NAME = "Logistics";
export default {
export default {
name: NAME,
components: {
Recommend
@ -111,12 +108,10 @@ export default {
orderInfo: {},
expressList: [],
loaded: false,
logisticsList: [
{
logisticsList: [{
message: "暂无数据",
messageDate: ""
}
]
}]
};
},
watch: {
@ -144,11 +139,22 @@ export default {
this.logisticsList = res.data.traces.reverse();
})
.catch(err => {
this.$dialog.error(err.response.data.msg || "加载失败");
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
});
},
getExpress() {
if (!this.id) return this.$dialog.error("订单不存在");
if (!this.id) {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
return
}
this.loaded = false;
orderDetail(this.id)
.then(res => {
@ -165,24 +171,29 @@ export default {
})
.catch(err => {
this.$dialog.error(err.response.data.msg || "加载失败");
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
});
}
}
};
};
</script>
<style scoped>
.no-express {
.no-express {
margin: 1.5rem 0;
}
}
.no-express img {
.no-express image {
width: 6rem;
margin: 0 auto;
display: block;
}
.message-text {
}
.message-text {
font-family: MicrosoftYaHei;
font-size: 1rem;
font-weight: normal;
@ -191,16 +202,19 @@ export default {
letter-spacing: 0rem;
color: #333333;
width: 50%;
}
.fontblack {
}
.fontblack {
color: #999999;
}
.img2 {
}
.img2 {
width: 0.81rem;
height: 0.8rem;
float: right;
}
.addressshow2 {
}
.addressshow2 {
height: auto;
overflow: hidden;
text-overflow: ellipsis;
@ -212,8 +226,9 @@ export default {
word-wrap: break-word;
word-break: break-all;
font-size: 1rem;
}
.addressshow1 {
}
.addressshow1 {
height: auto;
overflow: hidden;
text-overflow: ellipsis;
@ -225,8 +240,9 @@ export default {
word-wrap: break-word;
word-break: break-all;
font-size: 1rem;
}
.orderTitle {
}
.orderTitle {
font-size: 1rem;
color: #333333;
height: auto;
@ -239,18 +255,21 @@ export default {
word-wrap: break-word;
word-break: break-all;
height: 2.5rem;
}
.orderDetail {
}
.orderDetail {
font-size: 0.26rem;
color: #666666;
text-align: left;
}
.border-ceter {
}
.border-ceter {
width: 92%;
padding-left: 15px;
padding-right: 15px;
}
.pay-button {
}
.pay-button {
width: 88%;
height: 2.6rem;
position: relative;
@ -258,33 +277,38 @@ export default {
color: white;
margin-left: 6%;
}
ul li {
}
ul view {
list-style: none;
font-size: 0.24rem;
}
ul {
}
.track-rcol {
}
.track-list {
}
ul {}
.track-rcol {}
.track-list {
position: relative;
}
.track-list li {
}
.track-list view {
position: relative;
padding: 0 0 0.5rem 5px;
line-height: 0.3rem;
border-left: 1px solid #d9d9d9;
color: #999;
}
.track-list li.first {
}
.track-list view.first {
color: red;
padding-top: 0;
width: 100%;
text-align: left;
border-left: 1px solid #d9d9d9;
}
.track-list li .node-icon {
}
.track-list view.node-icon {
position: absolute;
left: -6.5px;
border-radius: 50%;
@ -292,8 +316,9 @@ ul {
height: 0.2rem;
top: 4px;
background-color: #b2b2b2;
}
.track-list li.active .node-icon {
}
.track-list view.active .node-icon {
background-position: 0-72px;
background-color: #ea7c0a;
width: 0.3rem;
@ -303,8 +328,9 @@ ul {
left: -0.19rem;
top: 0;
border-radius: 50%;
}
.track-list li .time {
}
.track-list view.time {
margin-right: 20px;
position: relative;
top: 4px;
@ -313,38 +339,43 @@ ul {
color: #999;
width: 100%;
text-align: left;
}
.track-list li .txt {
}
.track-list view.txt {
position: relative;
display: inline-block;
vertical-align: top;
color: #999;
left: 0.2rem;
top: 0.04rem;
}
.track-list li.first .time {
}
.track-list view.first .time {
text-align: left;
width: 94%;
color: red;
}
.track-list li.first .txt {
}
.track-list view.first .txt {
color: red;
text-align: left;
width: 94%;
}
.track-list li.finall {
}
.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 li.finall .div-spilander {
}
.track-list view.finall .div-spilander {
width: 1px;
position: absolute;
left: -1.5px;
height: 0.5rem;
background-color: #d9d9d9;
}
}
</style>

172
pages/order/MyOrder/index.vue

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

607
pages/order/OrderDetails/index.vue

@ -1,387 +1,357 @@
<template>
<div class="order-details">
<view class="order-details">
<!-- 给header上与data上加on为退款订单-->
<div class="header bg-color-red acea-row row-middle" :class="refundOrder ? 'on' : ''">
<div class="data" :class="refundOrder ? 'on' : ''">
<div class="state">{{ orderInfo._status._msg }}</div>
<div>
<view class="header bg-color-red acea-row row-middle" :class="refundOrder ? 'on' : ''">
<view class="data" :class="refundOrder ? 'on' : ''">
<view class="state">{{ orderInfo._status._msg }}</view>
<view>
<data-format :data="orderInfo.addTime"></data-format>
</div>
</div>
</div>
</view>
</view>
</view>
<template v-if="!refundOrder">
<div class="nav">
<div class="navCon acea-row row-between-wrapper">
<div :class="{ on: status.type === 0 || status.type === 9 }">待付款</div>
<div :class="{ on: status.type === 1 }" v-if="orderInfo.shippingType === 2">待核销</div>
<div :class="{ on: status.type === 1 }" v-else>待发货</div>
<div :class="{ on: status.type === 2 }" v-if="orderInfo.shippingType === 1">待收货</div>
<div :class="{ on: status.type === 3 }">待评价</div>
<div :class="{ on: status.type === 4 }">已完成</div>
</div>
<div class="progress acea-row row-between-wrapper">
<div
class="iconfont"
:class="[
<view class="nav">
<view class="navCon acea-row row-between-wrapper">
<view :class="{ on: status.type === 0 || status.type === 9 }">待付款</view>
<view :class="{ on: status.type === 1 }" v-if="orderInfo.shippingType === 2">待核销</view>
<view :class="{ on: status.type === 1 }" v-else>待发货</view>
<view :class="{ on: status.type === 2 }" v-if="orderInfo.shippingType === 1">待收货</view>
<view :class="{ on: status.type === 3 }">待评价</view>
<view :class="{ on: status.type === 4 }">已完成</view>
</view>
<view class="progress acea-row row-between-wrapper">
<view class="iconfont" :class="[
status.type === 0 || status.type === 9
? 'icon-webicon318'
: 'icon-yuandianxiao',
status.type >= 0 ? 'font-color-red' : ''
]"
></div>
<div class="line" :class="{ 'bg-color-red': status.type > 0 && status.type != 9 }"></div>
<div
class="iconfont"
:class="[
]"></view>
<view class="line" :class="{ 'bg-color-red': status.type > 0 && status.type != 9 }"></view>
<view class="iconfont" :class="[
status.type === 1 ? 'icon-webicon318' : 'icon-yuandianxiao',
status.type >= 1 && status.type != 6 && status.type != 9
? 'font-color-red'
: ''
]"
></div>
<div
class="line"
:class="{
]"></view>
<view class="line" :class="{
'bg-color-red':
status.type > 1 && status.type != 6 && status.type != 9
}"
v-if="orderInfo.shipping_type === 1"
></div>
<div
class="iconfont"
:class="[
v-if="orderInfo.shipping_type === 1"></view>
<view class="iconfont" :class="[
status.type === 2 ? 'icon-webicon318' : 'icon-yuandianxiao',
status.type >= 2 && status.type != 6 && status.type != 9
? 'font-color-red'
: ''
]"
v-if="orderInfo.shippingType === 1"
></div>
<div
class="line"
:class="{
v-if="orderInfo.shippingType === 1"></view>
<view class="line" :class="{
'bg-color-red':
status.type > 2 && status.type != 6 && status.type != 9
}"
></div>
<div
class="iconfont"
:class="[
}"></view>
<view class="iconfont" :class="[
status.type === 3 ? 'icon-webicon318' : 'icon-yuandianxiao',
status.type >= 3 && status.type != 6 && status.type != 9
? 'font-color-red'
: ''
]"
></div>
<div
class="line"
:class="{
]"></view>
<view class="line" :class="{
'bg-color-red':
status.type > 3 && status.type != 6 && status.type != 9
}"
></div>
<div
class="iconfont"
:class="[
}"></view>
<view class="iconfont" :class="[
status.type == 4 ? 'icon-webicon318' : 'icon-yuandianxiao',
status.type >= 4 && status.type != 6 && status.type != 9
? 'font-color-red'
: ''
]"
></div>
</div>
</div>
<!--<div-->
]"></view>
</view>
</view>
<!--<view-->
<!--class="writeOff"-->
<!--v-if="orderInfo.shipping_type === 2 && orderInfo.paid === 1"-->
<!--&gt;-->
<!--<div class="title">核销信息</div>-->
<!--<div class="grayBg">-->
<!--<div class="pictrue"><img :src="orderInfo.code" /></div>-->
<!--</div>-->
<!--<div class="gear"><img :src="$VUE_APP_RESOURCES_URL+'/images/writeOff.jpg'" /></div>-->
<!--<div class="num">{{ orderInfo._verify_code }}</div>-->
<!--<!--<!--<!--<span class="rules">-->
<!--<!--<!--<span class="item">-->
<!--<!--<span class="rulesTitle acea-row row-middle">-->
<!--<span class="iconfont icon-shijian"></span>核销时间-->
<!--</!--<span>-->
<!--<div class="info">-->
<!--<view class="title">核销信息</view>-->
<!--<view class="grayBg">-->
<!--<view class="pictrue"><image :src="orderInfo.code" /></view>-->
<!--</view>-->
<!--<view class="gear"><image :src="$VUE_APP_RESOURCES_URL+'/images/writeOff.jpg'" /></view>-->
<!--<view class="num">{{ orderInfo._verify_code }}</view>-->
<!--<!--<!--<!--<text class="rules">-->
<!--<!--<!--<text class="item">-->
<!--<!--<text class="rulesTitle acea-row row-middle">-->
<!--<text class="iconfont icon-shijian"></text>核销时间-->
<!--</!--<text>-->
<!--<view class="info">-->
<!--{{ system_store._valid_time-->
<!--}}<span class="time">{{ system_store.day_time }}</span>-->
<!--</div>-->
<!--</!--<!--<span>-->
<!--<div class="item">-->
<!--<div class="rulesTitle acea-row row-middle">-->
<!--<span class="iconfont icon-shuoming1"></span>使用说明-->
<!--</div>-->
<!--<div class="info">可将二维码出示给店员扫描或提供数字核销码</div>-->
<!--</div>-->
<!--</!--<!--<!--<span>-->
<!--</!--<!--<!--<!--<span>-->
<!--<div-->
<!--}}<text class="time">{{ system_store.day_time }}</text>-->
<!--</view>-->
<!--</!--<!--<text>-->
<!--<view class="item">-->
<!--<view class="rulesTitle acea-row row-middle">-->
<!--<text class="iconfont icon-shuoming1"></text>使用说明-->
<!--</view>-->
<!--<view class="info">可将二维码出示给店员扫描或提供数字核销码</view>-->
<!--</view>-->
<!--</!--<!--<!--<text>-->
<!--</!--<!--<!--<!--<text>-->
<!--<view-->
<!--class="map acea-row row-between-wrapper"-->
<!--v-if="orderInfo.shipping_type === 2 && orderInfo.paid === 1"-->
<!--&gt;-->
<!--<div>自提地址信息</div>-->
<!--<div-->
<!--<view>自提地址信息</view>-->
<!--<view-->
<!--class="place cart-color acea-row row-center-wrapper"-->
<!--@click="showChang"-->
<!--&gt;-->
<!--<span class="iconfont icon-weizhi"></span>查看位置-->
<!--</div>-->
<!--</div>-->
<div class="address" v-if="orderInfo.shippingType === 1">
<div class="name">
<!--<text class="iconfont icon-weizhi"></text>查看位置-->
<!--</view>-->
<!--</view>-->
<view class="address" v-if="orderInfo.shippingType === 1">
<view class="name">
{{ orderInfo.realName
}}
<span class="phone">{{ orderInfo.userPhone }}</span>
<span class="iconfont icon-tonghua font-color-red"></span>
</div>
<div>{{ orderInfo.userAddress }}</div>
</div>
<!--<div class="address" v-else>-->
<!--<div class="name">-->
<text class="phone">{{ orderInfo.userPhone }}</text>
<text class="iconfont icon-tonghua font-color-red"></text>
</view>
<view>{{ orderInfo.userAddress }}</view>
</view>
<!--<view class="address" v-else>-->
<!--<view class="name">-->
<!--{{ system_store.name-->
<!--}}<span class="phone">{{ system_store.phone }}</span>-->
<!--}}<text class="phone">{{ system_store.phone }}</text>-->
<!--<a-->
<!--class="iconfont icon-tonghua font-color-red"-->
<!--:href="'tel:' + system_store.phone"-->
<!--&gt;</a>-->
<!--</div>-->
<!--<div>{{ system_store._detailed_address }}</div>-->
<!--</div>-->
<div class="line" v-if="orderInfo.shippingType === 1">
<img :src="$VUE_APP_RESOURCES_URL+'/images/line.jpg'" />
</div>
<!--</view>-->
<!--<view>{{ system_store._detailed_address }}</view>-->
<!--</view>-->
<view class="line" v-if="orderInfo.shippingType === 1">
<image :src="$VUE_APP_RESOURCES_URL+'/images/line.jpg'" />
</view>
</template>
<OrderGoods :evaluate="status.type || 0" :cartInfo="orderInfo.cartInfo || []"></OrderGoods>
<div class="wrapper">
<div class="item acea-row row-between">
<div>订单编号</div>
<div class="conter acea-row row-middle row-right">
<view class="wrapper">
<view class="item acea-row row-between">
<view>订单编号</view>
<view class="conter acea-row row-middle row-right">
{{ orderInfo.orderId
}}
<span
class="copy copy-data"
@click="copyClipboard(orderInfo.orderId)"
>复制</span>
</div>
</div>
<div class="item acea-row row-between">
<div>下单时间</div>
<div class="conter">
<text class="copy copy-data" @click="copyClipboard(orderInfo.orderId)">复制</text>
</view>
</view>
<view class="item acea-row row-between">
<view>下单时间</view>
<view class="conter">
<data-format :data="orderInfo.addTime"></data-format>
</div>
</div>
<div class="item acea-row row-between">
<div>订单类型</div>
<div class="conter">{{ orderTypeName }}</div>
</div>
<div class="item acea-row row-between">
<div>支付状态</div>
<div class="conter">{{ orderInfo.paid ? "已支付" : "未支付" }}</div>
</div>
<div class="item acea-row row-between">
<div>支付方式</div>
<div class="conter">{{ orderInfo._status._payType }}</div>
</div>
<div class="item acea-row row-between" v-if="orderInfo.mark">
<div>买家留言</div>
<div class="conter">{{ orderInfo.mark }}</div>
</div>
</div>
</view>
</view>
<view class="item acea-row row-between">
<view>订单类型</view>
<view class="conter">{{ orderTypeName }}</view>
</view>
<view class="item acea-row row-between">
<view>支付状态</view>
<view class="conter">{{ orderInfo.paid ? "已支付" : "未支付" }}</view>
</view>
<view class="item acea-row row-between">
<view>支付方式</view>
<view class="conter">{{ orderInfo._status._payType }}</view>
</view>
<view class="item acea-row row-between" v-if="orderInfo.mark">
<view>买家留言</view>
<view class="conter">{{ orderInfo.mark }}</view>
</view>
</view>
<div v-if="orderInfo.status != 0">
<div class="wrapper" v-if="orderInfo.deliveryType === 'express'">
<div class="item acea-row row-between">
<div>配送方式</div>
<div class="conter">发货</div>
</div>
<div class="item acea-row row-between">
<div>快递公司</div>
<div class="conter">{{ orderInfo.deliveryName || "" }}</div>
</div>
<div class="item acea-row row-between">
<div>快递号</div>
<div class="conter">{{ orderInfo.deliveryId || "" }}</div>
</div>
</div>
<view v-if="orderInfo.status != 0">
<view class="wrapper" v-if="orderInfo.deliveryType === 'express'">
<view class="item acea-row row-between">
<view>配送方式</view>
<view class="conter">发货</view>
</view>
<view class="item acea-row row-between">
<view>快递公司</view>
<view class="conter">{{ orderInfo.deliveryName || "" }}</view>
</view>
<view class="item acea-row row-between">
<view>快递号</view>
<view class="conter">{{ orderInfo.deliveryId || "" }}</view>
</view>
</view>
<div class="wrapper" v-else>
<div class="item acea-row row-between">
<div>配送方式</div>
<div class="conter">送货</div>
</div>
<div class="item acea-row row-between">
<div>配送人</div>
<div class="conter">{{ orderInfo.deliveryName || "" }}</div>
</div>
<div class="item acea-row row-between">
<div>配送电话</div>
<div class="conter acea-row row-middle row-right">
<view class="wrapper" v-else>
<view class="item acea-row row-between">
<view>配送方式</view>
<view class="conter">送货</view>
</view>
<view class="item acea-row row-between">
<view>配送人</view>
<view class="conter">{{ orderInfo.deliveryName || "" }}</view>
</view>
<view class="item acea-row row-between">
<view>配送电话</view>
<view class="conter acea-row row-middle row-right">
{{ orderInfo.deliveryId || "" }}
<span class="copy">拨打</span>
</div>
</div>
</div>
</div>
<text class="copy">拨打</text>
</view>
</view>
</view>
</view>
<!-- 退款订单详情 -->
<div class="wrapper" v-if="refundOrder">
<div class="item acea-row row-between">
<div>收货人</div>
<div class="conter">{{ orderInfo.realName }}</div>
</div>
<div class="item acea-row row-between">
<div>联系电话</div>
<div class="conter">{{ orderInfo.userPhone }}</div>
</div>
<div class="item acea-row row-between">
<div>收货地址</div>
<div class="conter">{{ orderInfo.userAddress }}</div>
</div>
</div>
<div class="wrapper">
<div class="item acea-row row-between">
<div>支付金额</div>
<div class="conter">{{ orderInfo.totalPrice }}</div>
</div>
<div class="item acea-row row-between" v-if="orderInfo.couponPrice > 0">
<div>优惠券抵扣</div>
<div class="conter">-{{ orderInfo.couponPrice }}</div>
</div>
<div class="item acea-row row-between" v-if="orderInfo.useIntegral > 0">
<div>积分抵扣</div>
<div class="conter">-{{ orderInfo.deductionPrice }}</div>
</div>
<div class="item acea-row row-between" v-if="orderInfo.payPostage > 0">
<div>运费</div>
<div class="conter">{{ orderInfo.payPostage }}</div>
</div>
<div class="actualPay acea-row row-right">
<view class="wrapper" v-if="refundOrder">
<view class="item acea-row row-between">
<view>收货人</view>
<view class="conter">{{ orderInfo.realName }}</view>
</view>
<view class="item acea-row row-between">
<view>联系电话</view>
<view class="conter">{{ orderInfo.userPhone }}</view>
</view>
<view class="item acea-row row-between">
<view>收货地址</view>
<view class="conter">{{ orderInfo.userAddress }}</view>
</view>
</view>
<view class="wrapper">
<view class="item acea-row row-between">
<view>支付金额</view>
<view class="conter">{{ orderInfo.totalPrice }}</view>
</view>
<view class="item acea-row row-between" v-if="orderInfo.couponPrice > 0">
<view>优惠券抵扣</view>
<view class="conter">-{{ orderInfo.couponPrice }}</view>
</view>
<view class="item acea-row row-between" v-if="orderInfo.useIntegral > 0">
<view>积分抵扣</view>
<view class="conter">-{{ orderInfo.deductionPrice }}</view>
</view>
<view class="item acea-row row-between" v-if="orderInfo.payPostage > 0">
<view>运费</view>
<view class="conter">{{ orderInfo.payPostage }}</view>
</view>
<view class="actualPay acea-row row-right">
实付款
<span class="money font-color-red">{{ orderInfo.payPrice }}</span>
</div>
</div>
<div style="height:100rpx;" v-if="!refundOrder && offlineStatus"></div>
<div class="footer acea-row row-right row-middle" v-if="!refundOrder && offlineStatus">
<text class="money font-color-red">{{ orderInfo.payPrice }}</text>
</view>
</view>
<view style="height:100rpx;" v-if="!refundOrder && offlineStatus"></view>
<view class="footer acea-row row-right row-middle" v-if="!refundOrder && offlineStatus">
<template v-if="status.type == 0">
<div class="bnt cancel" @click="cancelOrder">取消订单</div>
<div class="bnt bg-color-red" @click="pay = true">立即付款</div>
<view class="bnt cancel" @click="cancelOrder">取消订单</view>
<view class="bnt bg-color-red" @click="pay = true">立即付款</view>
</template>
<template v-if="status.type == 1">
<div class="bnt cancel" @click="goGoodsReturn(orderInfo)">申请退款</div>
<view class="bnt cancel" @click="goGoodsReturn(orderInfo)">申请退款</view>
</template>
<template v-if="status.type == 2">
<div
class="bnt default"
@click="
<view class="bnt default" @click="
$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})
"
>查看物流</div>
<div class="bnt bg-color-red" @click="takeOrder">确认收货</div>
">查看物流</view>
<view class="bnt bg-color-red" @click="takeOrder">确认收货</view>
</template>
<template v-if="status.type == 3 && orderInfo.deliveryType == 'express'">
<div
class="bnt default"
@click="
<view class="bnt default" @click="
$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})
"
>查看物流</div>
">查看物流</view>
</template>
<template v-if="status.type == 4">
<div class="bnt cancel" @click="delOrder">删除订单</div>
<div
class="bnt default"
@click="
<view class="bnt cancel" @click="delOrder">删除订单</view>
<view class="bnt default" @click="
$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})
"
>查看物流</div>
">查看物流</view>
</template>
<template v-if="status.type == 6">
<div class="bnt bg-color-red" @click="goGroupRule(orderInfo)">查看拼团</div>
<view class="bnt bg-color-red" @click="goGroupRule(orderInfo)">查看拼团</view>
</template>
</div>
</view>
<Payment v-model="pay" :types="payType" @checked="toPay" :balance="userInfo.nowMoney"></Payment>
<div class="geoPage" v-if="mapShow">
<iframe
width="100%"
height="100%"
frameborder="0"
scrolling="no"
:src="'https://apis.map.qq.com/uri/v1/geocoder?coord=' + system_store.latitude + ',' +system_store.longitude +'&referer=' +mapKey"
></iframe>
</div>
</div>
<view class="geoPage" v-if="mapShow">
<iframe width="100%" height="100%" frameborder="0" scrolling="no" :src="'https://apis.map.qq.com/uri/v1/geocoder?coord=' + system_store.latitude + ',' +system_store.longitude +'&referer=' +mapKey"></iframe>
</view>
</view>
</template>
<script>
export default {
export default {
methods: {
goGoodsReturn(orderInfo) {
this.$yrouter.push({
path: "/pages/order/GoodsReturn/index",
query: { id: orderInfo.orderId }
query: {
id: orderInfo.orderId
}
});
},
goGroupRule(orderInfo) {
this.$yrouter.push({
path: "/pages/activity/GroupRule/index",
query: { id: orderInfo.pinkId }
query: {
id: orderInfo.pinkId
}
});
}
}
};
};
</script>
<style scoped>
.geoPage {
.geoPage {
position: fixed;
width: 100%;
height: 100%;
top: 0;
z-index: 10000;
}
.order-details .writeOff {
}
.order-details .writeOff {
background-color: #fff;
margin-top: 0.13rem;
padding-bottom: 0.3rem;
}
.order-details .writeOff .title {
}
.order-details .writeOff .title {
font-size: 0.3rem;
color: #282828;
height: 0.87rem;
border-bottom: 1px solid #f0f0f0;
padding: 0 0.3rem;
line-height: 0.87rem;
}
.order-details .writeOff .grayBg {
}
.order-details .writeOff .grayBg {
background-color: #f2f5f7;
width: 5.9rem;
height: 3.84rem;
border-radius: 0.2rem 0.2rem 0 0;
margin: 0.5rem auto 0 auto;
padding-top: 0.55rem;
}
.order-details .writeOff .grayBg .pictrue {
}
.order-details .writeOff .grayBg .pictrue {
width: 2.9rem;
height: 2.9rem;
margin: 0 auto;
}
.order-details .writeOff .grayBg .pictrue img {
}
.order-details .writeOff .grayBg .pictrue image {
width: 100%;
height: 100%;
display: block;
}
.order-details .writeOff .gear {
}
.order-details .writeOff .gear {
width: 5.9rem;
height: 0.3rem;
margin: 0 auto;
}
.order-details .writeOff .gear img {
}
.order-details .writeOff .gear image {
width: 100%;
height: 100%;
display: block;
}
.order-details .writeOff .num {
}
.order-details .writeOff .num {
background-color: #f0c34c;
width: 5.9rem;
height: 0.84rem;
@ -391,34 +361,41 @@ export default {
border-radius: 0 0 0.2rem 0.2rem;
text-align: center;
padding-top: 0.04rem;
}
.order-details .writeOff .rules {
}
.order-details .writeOff .rules {
margin: 0.46rem 0.3rem 0 0.3rem;
border-top: 0.01rem solid #f0f0f0;
padding-top: 0.1rem;
}
.order-details .writeOff .rules .item {
}
.order-details .writeOff .rules .item {
margin-top: 0.15rem;
}
.order-details .writeOff .rules .item .rulesTitle {
}
.order-details .writeOff .rules .item .rulesTitle {
font-size: 0.28rem;
color: #282828;
}
.order-details .writeOff .rules .item .rulesTitle .iconfont {
}
.order-details .writeOff .rules .item .rulesTitle .iconfont {
font-size: 0.3rem;
color: #333;
margin-right: 0.08rem;
margin-top: 0.05rem;
}
.order-details .writeOff .rules .item .info {
}
.order-details .writeOff .rules .item .info {
font-size: 0.28rem;
color: #999;
margin-top: 0.05rem;
}
.order-details .writeOff .rules .item .info .time {
}
.order-details .writeOff .rules .item .info .time {
margin-left: 0.2rem;
}
.order-details .map {
}
.order-details .map {
height: 0.86rem;
font-size: 0.3rem;
color: #282828;
@ -427,44 +404,54 @@ export default {
margin-top: 0.13rem;
background-color: #fff;
padding: 0 0.3rem;
}
.order-details .map .place {
}
.order-details .map .place {
font-size: 0.26rem;
width: 1.76rem;
height: 0.5rem;
border-radius: 0.25rem;
line-height: 0.5rem;
text-align: center;
}
.order-details .map .place .iconfont {
}
.order-details .map .place .iconfont {
font-size: 0.27rem;
height: 0.27rem;
line-height: 0.27rem;
margin: 0.02rem 0.03rem 0 0;
}
.order-details .address .name .iconfont {
}
.order-details .address .name .iconfont {
font-size: 0.34rem;
margin-left: 0.1rem;
}
}
</style>
<script>
import OrderGoods from "@/components/OrderGoods";
import { orderDetail } from "@/api/order";
import Payment from "@/components/Payment";
import DataFormat from "@/components/DataFormat";
import { isWeixin, copyClipboard } from "@/utils";
import { mapGetters } from "vuex";
import {
import OrderGoods from "@/components/OrderGoods";
import {
orderDetail
} from "@/api/order";
import Payment from "@/components/Payment";
import DataFormat from "@/components/DataFormat";
import {
isWeixin,
copyClipboard
} from "@/utils";
import {
mapGetters
} from "vuex";
import {
cancelOrderHandle,
takeOrderHandle,
delOrderHandle,
payOrderHandle
} from "@/libs/order";
// import { wechatEvevt } from "@/libs/wechat";
} from "@/libs/order";
// import { wechatEvevt } from "@/libs/wechat";
const NAME = "OrderDetails";
const NAME = "OrderDetails";
export default {
export default {
name: NAME,
components: {
OrderGoods,
@ -526,9 +513,12 @@ export default {
// });
} else {
if (!this.mapKey)
return this.$dialog.error(
"暂无法使用查看地图,请配置您的腾讯地图key"
);
uni.showToast({
title: "暂无法使用查看地图,请配置您的腾讯地图key",
icon: 'none',
duration: 2000
});
return
this.mapShow = true;
}
},
@ -536,7 +526,9 @@ export default {
const history = this.app.history,
last = history[history.length - 1] || {};
if (last.name === "MyOrder") return this.$yrouter.back();
else return this.$yrouter.replace({ path: "/order/list/" });
else return this.$yrouter.replace({
path: "/order/list/"
});
},
cancelOrder() {
cancelOrderHandle(this.orderInfo.orderId)
@ -566,15 +558,17 @@ export default {
},
getOrderStatus: function() {
let orderInfo = this.orderInfo || {},
_status = orderInfo._status || { _type: 0 },
_status = orderInfo._status || {
_type: 0
},
status = {};
let type = parseInt(_status._type),
delivery_type = orderInfo.deliveryType,
seckill_id = orderInfo.seckillId ? parseInt(orderInfo.seckillId) : 0,
bargain_id = orderInfo.bargainId ? parseInt(orderInfo.bargainId) : 0,
combination_id = orderInfo.combinationId
? parseInt(orderInfo.combinationId)
: 0;
combination_id = orderInfo.combinationId ?
parseInt(orderInfo.combinationId) :
0;
status = {
type: type,
class_status: 0
@ -602,7 +596,14 @@ export default {
},
getDetail() {
const id = this.id;
if (!id) return this.$dialog.error("订单不存在");
if (!id) {
uni.showToast({
title: "订单不存在",
icon: 'none',
duration: 2000
});
return
}
orderDetail(id)
.then(res => {
this.orderInfo = res.data;
@ -635,5 +636,5 @@ export default {
that.getDetail();
}
}
};
};
</script>

550
pages/order/OrderSubmission/index.vue

@ -1,295 +1,281 @@
<template>
<div class="order-submission">
<div class="allAddress">
<div class="nav acea-row">
<div
class="item font-color-red"
:class="shipping_type === 0 ? 'on' : 'on2'"
@click="addressType(0)"
></div>
<div
class="item font-color-red"
:class="shipping_type === 1 ? 'on' : 'on2'"
@click="addressType(1)"
v-if="storeSelfMention"
></div>
</div>
<div
class="address acea-row row-between-wrapper"
v-if="shipping_type === 0"
@click="addressTap"
>
<div class="addressCon" v-if="addressInfo.realName">
<div class="name">
<view class="order-submission">
<view class="allAddress">
<view class="nav acea-row">
<view class="item font-color-red" :class="shipping_type === 0 ? 'on' : 'on2'" @click="addressType(0)"></view>
<view class="item font-color-red" :class="shipping_type === 1 ? 'on' : 'on2'" @click="addressType(1)" v-if="storeSelfMention"></view>
</view>
<view class="address acea-row row-between-wrapper" v-if="shipping_type === 0" @click="addressTap">
<view class="addressCon" v-if="addressInfo.realName">
<view class="name">
{{ addressInfo.realName }}
<span class="phone">{{ addressInfo.phone }}</span>
</div>
<div>
<span class="default font-color-red" v-if="addressInfo.isDefault">[默认]</span>
<text class="phone">{{ addressInfo.phone }}</text>
</view>
<view>
<text class="default font-color-red" v-if="addressInfo.isDefault">[默认]</text>
{{ addressInfo.province }}{{ addressInfo.city
}}{{ addressInfo.district }}{{ addressInfo.detail }}
</div>
</div>
<div class="addressCon" v-else>
<div class="setaddress">设置收货地址</div>
</div>
<div class="iconfont icon-jiantou"></div>
</div>
<!--<div class="address acea-row row-between-wrapper" v-else>-->
<!--<div class="addressCon">-->
<!--<div class="name">-->
</view>
</view>
<view class="addressCon" v-else>
<view class="setaddress">设置收货地址</view>
</view>
<view class="iconfont icon-jiantou"></view>
</view>
<!--<view class="address acea-row row-between-wrapper" v-else>-->
<!--<view class="addressCon">-->
<!--<view class="name">-->
<!--{{ systemStore.name }}-->
<!--<span class="phone">{{ systemStore.phone }}</span>-->
<!--</div>-->
<!--<div>-->
<!--<text class="phone">{{ systemStore.phone }}</text>-->
<!--</view>-->
<!--<view>-->
<!--{{ systemStore._detailed_address }}-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div class="line">
<img :src="$VUE_APP_RESOURCES_URL+'/images/line.jpg'" />
</div>
</div>
<!--</view>-->
<!--</view>-->
<!--</view>-->
<view class="line">
<image :src="$VUE_APP_RESOURCES_URL+'/images/line.jpg'" />
</view>
</view>
<OrderGoods :evaluate="0" :cartInfo="orderGroupInfo.cartInfo"></OrderGoods>
<div class="wrapper">
<div class="item acea-row row-between-wrapper" @click="couponTap" v-if="deduction === false">
<div>优惠券</div>
<div class="discount">
<view class="wrapper">
<view class="item acea-row row-between-wrapper" @click="couponTap" v-if="deduction === false">
<view>优惠券</view>
<view class="discount">
{{ usableCoupon.couponTitle || "请选择" }}
<span class="iconfont icon-jiantou"></span>
</div>
</div>
<div class="item acea-row row-between-wrapper" v-if="deduction === false">
<div>积分抵扣</div>
<div class="discount">
<div class="select-btn">
<div class="checkbox-wrapper">
<text class="iconfont icon-jiantou"></text>
</view>
</view>
<view class="item acea-row row-between-wrapper" v-if="deduction === false">
<view>积分抵扣</view>
<view class="discount">
<view class="select-btn">
<view class="checkbox-wrapper">
<!-- <input type="checkbox" v-model="useIntegral" @click="changeUseIntegral"/> -->
<checkbox-group @change="changeUseIntegral">
<label class="well-check">
<span class="integral">
<text class="integral">
当前积分
<span class="num font-color-red">{{ userInfo.integral || 0 }}</span>
</span>
<text class="num font-color-red">{{ userInfo.integral || 0 }}</text>
</text>
<checkbox value :checked="useIntegral ? true : false"></checkbox>
</label>
</checkbox-group>
</div>
</div>
</div>
</div>
<div class="item acea-row row-between-wrapper" v-if="shipping_type === 0">
<div>快递费用</div>
<div class="discount">
</view>
</view>
</view>
</view>
<view class="item acea-row row-between-wrapper" v-if="shipping_type === 0">
<view>快递费用</view>
<view class="discount">
{{
orderGroupInfo.priceGroup.storePostage > 0
? orderGroupInfo.priceGroup.storePostage
: "免运费"
}}
</div>
</div>
<div v-else>
<div class="item acea-row row-between-wrapper">
<div>联系人</div>
<div class="discount">
</view>
</view>
<view v-else>
<view class="item acea-row row-between-wrapper">
<view>联系人</view>
<view class="discount">
<input type="text" placeholder="请填写您的联系姓名" v-model="contacts" />
</div>
</div>
<div class="item acea-row row-between-wrapper">
<div>联系电话</div>
<div class="discount">
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view>联系电话</view>
<view class="discount">
<input type="text" placeholder="请填写您的联系电话" v-model="contactsTel" />
</div>
</div>
</div>
<div class="item">
<div>备注信息</div>
</view>
</view>
</view>
<view class="item">
<view>备注信息</view>
<textarea placeholder="请添加备注(150字以内)" v-model="mark"></textarea>
</div>
</div>
<div class="wrapper">
<div class="item">
<div>支付方式</div>
<div class="list">
<div
class="payItem acea-row row-middle"
:class="active === 'weixin' ? 'on' : ''"
@click="payItem('weixin')"
v-show="isWeixin"
>
<div class="name acea-row row-center-wrapper">
<div class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></div>微信支付
</div>
<div class="tip">微信快捷支付</div>
</div>
<div
class="payItem acea-row row-middle"
:class="active === 'weixin' ? 'on' : ''"
@click="payItem('weixin')"
v-show="!isWeixin"
>
<div class="name acea-row row-center-wrapper">
<div class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></div>微信支付
</div>
<div class="tip">微信快捷支付</div>
</div>
<div
class="payItem acea-row row-middle"
:class="active === 'yue' ? 'on' : ''"
@click="payItem('yue')"
>
<div class="name acea-row row-center-wrapper">
<div class="iconfont icon-icon-test" :class="active === 'yue' ? 'bounceIn' : ''"></div>余额支付
</div>
<div class="tip">可用余额{{ userInfo.nowMoney || 0 }}</div>
</div>
</div>
</div>
</div>
<div class="moneyList">
<div class="item acea-row row-between-wrapper" v-if="orderPrice.totalPrice !== undefined">
<div>商品总价</div>
<div class="money">{{ orderPrice.totalPrice }}</div>
</div>
<div class="item acea-row row-between-wrapper" v-if="orderPrice.payPostage > 0">
<div>运费</div>
<div class="money">{{ orderPrice.payPostage }}</div>
</div>
<div class="item acea-row row-between-wrapper" v-if="orderPrice.couponPrice > 0">
<div>优惠券抵扣</div>
<div class="money">-{{ orderPrice.couponPrice }}</div>
</div>
<div class="item acea-row row-between-wrapper" v-if="orderPrice.deductionPrice > 0">
<div>积分抵扣</div>
<div class="money">-{{ orderPrice.deductionPrice }}</div>
</div>
</div>
<div style="height:120rpx"></div>
<div class="footer acea-row row-between-wrapper">
<div>
</view>
</view>
<view class="wrapper">
<view class="item">
<view>支付方式</view>
<view class="list">
<view class="payItem acea-row row-middle" :class="active === 'weixin' ? 'on' : ''" @click="payItem('weixin')"
v-show="isWeixin">
<view class="name acea-row row-center-wrapper">
<view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>微信支付
</view>
<view class="tip">微信快捷支付</view>
</view>
<view class="payItem acea-row row-middle" :class="active === 'weixin' ? 'on' : ''" @click="payItem('weixin')"
v-show="!isWeixin">
<view class="name acea-row row-center-wrapper">
<view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>微信支付
</view>
<view class="tip">微信快捷支付</view>
</view>
<view class="payItem acea-row row-middle" :class="active === 'yue' ? 'on' : ''" @click="payItem('yue')">
<view class="name acea-row row-center-wrapper">
<view class="iconfont icon-icon-test" :class="active === 'yue' ? 'bounceIn' : ''"></view>余额支付
</view>
<view class="tip">可用余额{{ userInfo.nowMoney || 0 }}</view>
</view>
</view>
</view>
</view>
<view class="moneyList">
<view class="item acea-row row-between-wrapper" v-if="orderPrice.totalPrice !== undefined">
<view>商品总价</view>
<view class="money">{{ orderPrice.totalPrice }}</view>
</view>
<view class="item acea-row row-between-wrapper" v-if="orderPrice.payPostage > 0">
<view>运费</view>
<view class="money">{{ orderPrice.payPostage }}</view>
</view>
<view class="item acea-row row-between-wrapper" v-if="orderPrice.couponPrice > 0">
<view>优惠券抵扣</view>
<view class="money">-{{ orderPrice.couponPrice }}</view>
</view>
<view class="item acea-row row-between-wrapper" v-if="orderPrice.deductionPrice > 0">
<view>积分抵扣</view>
<view class="money">-{{ orderPrice.deductionPrice }}</view>
</view>
</view>
<view style="height:120rpx"></view>
<view class="footer acea-row row-between-wrapper">
<view>
合计:
<span class="font-color-red">{{ orderPrice.payPrice }}</span>
</div>
<div class="settlement" @click="createOrder">立即结算</div>
</div>
<CouponListWindow
v-on:couponchange="changecoupon($event)"
v-model="showCoupon"
:price="orderPrice.totalPrice"
:checked="usableCoupon.id"
@checked="changeCoupon"
></CouponListWindow>
<AddressWindow
@checked="changeAddress"
@redirect="addressRedirect"
v-model="showAddress"
:checked="addressInfo.id"
ref="mychild"
></AddressWindow>
</div>
<text class="font-color-red">{{ orderPrice.payPrice }}</text>
</view>
<view class="settlement" @click="createOrder">立即结算</view>
</view>
<CouponListWindow v-on:couponchange="changecoupon($event)" v-model="showCoupon" :price="orderPrice.totalPrice"
:checked="usableCoupon.id" @checked="changeCoupon"></CouponListWindow>
<AddressWindow @checked="changeAddress" @redirect="addressRedirect" v-model="showAddress" :checked="addressInfo.id"
ref="mychild"></AddressWindow>
</view>
</template>
<style scoped>
.order-submission .wrapper .shipping select {
.order-submission .wrapper .shipping select {
color: #999;
padding-right: 0.15rem;
}
.order-submission .wrapper .shipping .iconfont {
font-size: 0.3rem;
padding-right: 0.15*100rpx;
}
.order-submission .wrapper .shipping .iconfont {
font-size: 0.3*100rpx;
color: #515151;
}
.order-submission .allAddress {
}
.order-submission .allAddress {
width: 100%;
background-image: linear-gradient(to bottom, #e93323 0%, #f5f5f5 100%);
background-image: -webkit-linear-gradient(
to bottom,
background-image: -webkit-linear-gradient(to bottom,
#e93323 0%,
#f5f5f5 100%
);
#f5f5f5 100%);
background-image: -moz-linear-gradient(to bottom, #e93323 0%, #f5f5f5 100%);
padding-top: 0.2rem;
}
.order-submission .allAddress .nav {
width: 7.1rem;
padding-top: 0.2*100rpx;
}
.order-submission .allAddress .nav {
width: 7.1*100rpx;
margin: 0 auto;
}
.order-submission .allAddress .nav .item {
width: 3.55rem;
}
.order-submission .allAddress .nav .item.on {
}
.order-submission .allAddress .nav .item {
width: 3.55*100rpx;
}
.order-submission .allAddress .nav .item.on {
position: relative;
width: 2.5rem;
}
.order-submission .allAddress .nav .item.on:before {
width: 2.5*100rpx;
}
.order-submission .allAddress .nav .item.on:before {
position: absolute;
bottom: 0;
/*content: "快递配送";*/
font-size: 0.28rem;
font-size: 0.28*100rpx;
display: block;
height: 0;
width: 3.55rem;
border-width: 0 0.2rem 0.8rem 0;
width: 3.55*100rpx;
border-width: 0 0.2*100rpx 0.8*100rpx 0;
border-style: none solid solid;
border-color: transparent transparent #fff;
z-index: 9;
border-radius: 0.07rem 0.3rem 0 0;
border-radius: 0.07*100rpx 0.3*100rpx 0 0;
text-align: center;
line-height: 0.8rem;
}
.order-submission .allAddress .nav .item:nth-of-type(2).on:before {
line-height: 0.8*100rpx;
}
.order-submission .allAddress .nav .item:nth-of-type(2).on:before {
content: "到店自提";
border-width: 0 0 0.8rem 0.2rem;
border-radius: 0.3rem 0.07rem 0 0;
}
.order-submission .allAddress .nav .item.on2 {
border-width: 0 0 0.8*100rpx 0.2*100rpx;
border-radius: 0.3*100rpx 0.07*100rpx 0 0;
}
.order-submission .allAddress .nav .item.on2 {
position: relative;
}
.order-submission .allAddress .nav .item.on2:before {
}
.order-submission .allAddress .nav .item.on2:before {
position: absolute;
bottom: 0;
content: "到店自提";
font-size: 0.28rem;
font-size: 0.28*100rpx;
display: block;
height: 0;
width: 4.6rem;
border-width: 0 0 0.6rem 0.6rem;
width: 4.6*100rpx;
border-width: 0 0 0.6*100rpx 0.6*100rpx;
border-style: none solid solid;
border-color: transparent transparent #f7c1bd;
border-radius: 0.4rem 0.06rem 0 0;
border-radius: 0.4*100rpx 0.06*100rpx 0 0;
text-align: center;
line-height: 0.6rem;
}
.order-submission .allAddress .nav .item:nth-of-type(1).on2:before {
line-height: 0.6*100rpx;
}
.order-submission .allAddress .nav .item:nth-of-type(1).on2:before {
content: "快递配送";
border-width: 0 0.6rem 0.6rem 0;
border-radius: 0.06rem 0.4rem 0 0;
}
.order-submission .allAddress .address {
border-width: 0 0.6*100rpx 0.6*100rpx 0;
border-radius: 0.06*100rpx 0.4*100rpx 0 0;
}
.order-submission .allAddress .address {
box-sizing: border-box;
width: 100%;
height: 1.5rem;
height: 1.5*100rpx;
margin: 0 auto;
}
.order-submission .allAddress .line {
}
.order-submission .allAddress .line {
box-sizing: border-box;
width: 100%;
margin: 0 auto;
}
.order-submission .wrapper .item .discount input::placeholder {
}
.order-submission .wrapper .item .discount input::placeholder {
color: #ccc;
}
}
</style>
<script>
import OrderGoods from "@/components/OrderGoods";
import CouponListWindow from "@/components/CouponListWindow";
import AddressWindow from "@/components/AddressWindow";
import { postOrderConfirm, postOrderComputed, createOrder } from "@/api/order";
import { mapGetters } from "vuex";
import { weappPay } from "@/libs/wechat";
import { isWeixin } from "@/utils";
import OrderGoods from "@/components/OrderGoods";
import CouponListWindow from "@/components/CouponListWindow";
import AddressWindow from "@/components/AddressWindow";
import {
postOrderConfirm,
postOrderComputed,
createOrder
} from "@/api/order";
import {
mapGetters
} from "vuex";
import {
weappPay
} from "@/libs/wechat";
import {
isWeixin
} from "@/utils";
const NAME = "OrderSubmission",
const NAME = "OrderSubmission",
_isWeixin = isWeixin();
export default {
export default {
name: NAME,
components: {
OrderGoods,
@ -347,8 +333,14 @@ export default {
},
methods: {
addressType: function(index) {
if (index && !this.system_store.id)
return this.$dialog.error("暂无门店信息,您无法选择到店自提!");
if (index && !this.system_store.id) {
uni.showToast({
title: "暂无门店信息,您无法选择到店自提!",
icon: 'none',
duration: 2000
});
return
}
this.shipping_type = index;
},
changeUseIntegral: function(e) {
@ -367,7 +359,9 @@ export default {
if (data.status === "EXTEND_ORDER") {
this.$yrouter.replace({
path: "/pages/order/OrderDetails/index",
query: { id: data.result.orderId }
query: {
id: data.result.orderId
}
});
} else {
this.orderPrice = data.result;
@ -377,7 +371,11 @@ export default {
getCartInfo() {
const cartIds = this.$yroute.query.id;
if (!cartIds) {
this.$dialog.error("参数有误");
uni.showToast({
title: "参数有误",
icon: 'none',
duration: 2000
});
return this.$yrouter.back();
}
postOrderConfirm(cartIds)
@ -392,7 +390,11 @@ export default {
this.computedPrice();
})
.catch(() => {
this.$dialog.error("加载订单数据失败");
uni.showToast({
title: "加载订单数据失败",
icon: 'none',
duration: 2000
});
});
},
addressTap: function() {
@ -411,7 +413,10 @@ export default {
},
changeCoupon: function(coupon) {
if (!coupon) {
this.usableCoupon = { couponTitle: "不使用优惠券", id: 0 };
this.usableCoupon = {
couponTitle: "不使用优惠券",
id: 0
};
} else {
this.usableCoupon = coupon;
}
@ -425,24 +430,57 @@ export default {
},
createOrder() {
let shipping_type = this.shipping_type;
if (!this.active) return this.$dialog.toast({ mes: "请选择支付方式" });
if (!this.addressInfo.id && !this.shipping_type)
return this.$dialog.toast({ mes: "请选择收货地址" });
if (!this.active) {
uni.showToast({
title: "请选择支付方式",
icon: 'none',
duration: 2000
});
return
}
if (!this.addressInfo.id && !this.shipping_type) {
uni.showToast({
title: "请选择收货地址",
icon: 'none',
duration: 2000
});
return
}
if (this.shipping_type) {
if (
(this.contacts === "" || this.contactsTel === "") &&
this.shipping_type
)
return this.$dialog.toast({ mes: "请填写联系人或联系人电话" });
) {
uni.showToast({
title: "请填写联系人或联系人电话",
icon: 'none',
duration: 2000
});
return
}
if (!/^1(3|4|5|7|8|9|6)\d{9}$/.test(this.contactsTel)) {
return this.$dialog.toast({ mes: "请填写正确的手机号" });
uni.showToast({
title: "请填写正确的手机号",
icon: 'none',
duration: 2000
});
return
}
if (!/^[\u4e00-\u9fa5\w]{2,16}$/.test(this.contacts)) {
return this.$dialog.toast({ mes: "请填写您的真实姓名" });
uni.showToast({
title: "请填写您的真实姓名",
icon: 'none',
duration: 2000
});
return
}
}
uni.showLoading({ title: "生成订单中" });
uni.showLoading({
title: "生成订单中"
});
createOrder(this.orderGroupInfo.orderKey, {
realName: this.contacts,
phone: this.contactsTel,
@ -466,10 +504,16 @@ export default {
case "EXTEND_ORDER":
case "PAY_DEFICIENCY":
case "PAY_ERROR":
this.$dialog.toast({ mes: res.msg });
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
this.$yrouter.replace({
path: "/pages/order/OrderDetails/index",
query: { id: data.result.orderId }
query: {
id: data.result.orderId
}
});
break;
case "SUCCESS":
@ -480,13 +524,17 @@ export default {
});
this.$yrouter.replace({
path: "/pages/order/OrderDetails/index",
query: { id: data.result.orderId }
query: {
id: data.result.orderId
}
});
break;
case "WECHAT_H5_PAY":
this.$yrouter.replace({
path: "/pages/order/OrderDetails/index",
query: { id: data.result.orderId }
query: {
id: data.result.orderId
}
});
setTimeout(() => {
// location.href = data.result.jsConfig.mweb_url;
@ -496,7 +544,9 @@ export default {
weappPay(data.result.jsConfig).then(res => {
this.$yrouter.replace({
path: "/pages/order/OrderDetails/index",
query: { id: data.result.orderId }
query: {
id: data.result.orderId
}
});
});
@ -510,9 +560,13 @@ export default {
})
.catch(err => {
uni.hideLoading();
this.$dialog.error(err.response.data.msg || "创建订单失败");
uni.showToast({
title: err.response.data.msg || "创建订单失败",
icon: 'none',
duration: 2000
});
});
}
}
};
};
</script>

56
pages/order/PaymentStatus/index.vue

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

62
pages/order/ReturnList/index.vue

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

222
pages/orderAdmin/AdminOrder/index.vue

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

190
pages/orderAdmin/AdminOrderList/index.vue

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

86
pages/orderAdmin/GoodsDeliver/index.vue

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

112
pages/orderAdmin/OrderCancellation/index.vue

@ -1,45 +1,49 @@
<template>
<div class="OrderCancellation">
<div class="header"></div>
<div class="whiteBg">
<div class="input">
<view class="OrderCancellation">
<view class="header"></view>
<view class="whiteBg">
<view class="input">
<input type="number" placeholder="0" v-model="verify_code" />
</div>
<div class="bnt" @click="storeCancellation">立即核销</div>
</div>
<div class="scan" v-if="iswechat">
<img :src="$VUE_APP_RESOURCES_URL+'/images/scan.gif'" @click="openQRCode" />
</div>
</view>
<view class="bnt" @click="storeCancellation">立即核销</view>
</view>
<view class="scan" v-if="iswechat">
<image :src="$VUE_APP_RESOURCES_URL+'/images/scan.gif'" @click="openQRCode" />
</view>
<WriteOff :iShidden="iShidden" :orderInfo="orderInfo" @cancel="cancel" @confirm="confirm"></WriteOff>
</div>
</view>
</template>
<style scoped>
.OrderCancellation .header {
.OrderCancellation .header {
background: url("https://h5.dayouqiantu.cn/static/images/writeOffBg.jpg") no-repeat;
width: 100%;
height: 3rem;
background-size: 100% 100%;
}
.OrderCancellation .whiteBg {
}
.OrderCancellation .whiteBg {
width: 6.9rem;
background-color: #fff;
margin: -0.93rem auto 0 auto;
padding-top: 0.8rem;
border-radius: 0.06rem 0.06rem 0 0;
}
.OrderCancellation .whiteBg .input {
}
.OrderCancellation .whiteBg .input {
width: 5.8rem;
margin: 0 auto;
border-bottom: 0.01rem solid #eee;
}
.OrderCancellation .whiteBg .input input {
}
.OrderCancellation .whiteBg .input input {
padding-bottom: 0.25rem;
font-size: 0.6rem;
color: #282828;
width: 100%;
text-align: center;
}
.OrderCancellation .whiteBg .bnt {
}
.OrderCancellation .whiteBg .bnt {
font-size: 0.32rem;
color: #fff;
width: 5.8rem;
@ -51,26 +55,32 @@
text-align: center;
line-height: 0.86rem;
margin: 0.55rem auto 0 auto;
}
.OrderCancellation .scan {
}
.OrderCancellation .scan {
width: 3rem;
height: 3rem;
margin: 1.1rem auto 0 auto;
}
.OrderCancellation .scan img {
}
.OrderCancellation .scan image {
width: 100%;
height: 100%;
display: block;
}
}
</style>
<script>
import WriteOff from "@/components/WriteOff";
import { isWeixin } from "@/utils";
// import { wechatEvevt } from "@/libs/wechat";
import { orderVerific } from "@/api/order";
const NAME = "OrderCancellation";
import WriteOff from "@/components/WriteOff";
import {
isWeixin
} from "@/utils";
// import { wechatEvevt } from "@/libs/wechat";
import {
orderVerific
} from "@/api/order";
const NAME = "OrderCancellation";
export default {
export default {
name: NAME,
components: {
WriteOff
@ -94,18 +104,42 @@ export default {
.then(res => {
this.iShidden = true;
this.verify_code = "";
this.$uni.showToast({ title: res.msg, icon: 'none', duration: 2000 });
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
})
.catch(res => {
this.$dialog.error(res.msg);
.catch(err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
});
},
storeCancellation: function() {
let ref = /[0-9]{12}/;
if (!this.verify_code) return this.$dialog.error("请输入核销码");
if (!ref.test(this.verify_code))
return this.$dialog.error("请输入正确的核销码");
uni.showLoading({ title: "查询中" });
if (!this.verify_code) {
uni.showToast({
title: "请输入核销码",
icon: 'none',
duration: 2000
});
return
}
if (!ref.test(this.verify_code)) {
uni.showToast({
title: "请输入正确的核销码",
icon: 'none',
duration: 2000
});
return
}
uni.showLoading({
title: "查询中"
});
orderVerific(this.verify_code, 0)
.then(res => {
uni.hideLoading();
@ -157,5 +191,5 @@ export default {
// });
}
}
};
};
</script>

158
pages/orderAdmin/OrderIndex/index.vue

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

86
pages/orderAdmin/Statistics/index.vue

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

42
pages/shop/EvaluateList/index.vue

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

46
pages/shop/GoodSearch/index.vue

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

64
pages/shop/GoodsClass/index.vue

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

50
pages/shop/GoodsCollection/index.vue

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

345
pages/shop/GoodsCon/index.vue

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

154
pages/shop/GoodsEvaluate/index.vue

@ -1,57 +1,41 @@
<template>
<div class="evaluate-con">
<div class="goodsStyle acea-row row-between" v-if="orderCon.productInfo">
<div class="pictrue">
<img :src="orderCon.productInfo.image" class="image" />
</div>
<div class="text acea-row row-between">
<div class="name line2">{{ orderCon.productInfo.storeName }}</div>
<div class="money">
<div>{{ orderCon.productInfo.price }}</div>
<div class="num">x{{ orderCon.cartNum }}</div>
</div>
</div>
</div>
<div class="score">
<div
class="item acea-row row-middle"
v-for="(item, scoreListIndexw) in scoreList"
:key="scoreListIndexw"
>
<div>{{ item.name }}</div>
<div class="starsList">
<span
@click="stars(starsIndexn, scoreListIndexw)"
v-for="(itemn, starsIndexn) in item.stars"
:key="starsIndexn"
class="iconfont"
:class="
<view class="evaluate-con">
<view class="goodsStyle acea-row row-between" v-if="orderCon.productInfo">
<view class="pictrue">
<image :src="orderCon.productInfo.image" class="image" />
</view>
<view class="text acea-row row-between">
<view class="name line2">{{ orderCon.productInfo.storeName }}</view>
<view class="money">
<view>{{ orderCon.productInfo.price }}</view>
<view class="num">x{{ orderCon.cartNum }}</view>
</view>
</view>
</view>
<view class="score">
<view class="item acea-row row-middle" v-for="(item, scoreListIndexw) in scoreList" :key="scoreListIndexw">
<view>{{ item.name }}</view>
<view class="starsList">
<text @click="stars(starsIndexn, scoreListIndexw)" v-for="(itemn, starsIndexn) in item.stars" :key="starsIndexn"
class="iconfont" :class="
item.index >= starsIndexn
? 'icon-shitixing font-color-red'
: 'icon-kongxinxing'
"
></span>
</div>
<span class="evaluate">
"></text>
</view>
<text class="evaluate">
{{
item.index === -1 ? "" : item.index + 1 + "分"
}}
</span>
</div>
<div class="textarea">
</text>
</view>
<view class="textarea">
<textarea placeholder="商品满足你的期待么?说说你的想法,分享给想买的他们吧~" v-model="expect"></textarea>
<div class="list acea-row row-middle">
<div
class="pictrue"
v-for="(item, uploadPicturesIndex) in uploadPictures"
:key="uploadPicturesIndex"
>
<img :src="item" />
<span
class="iconfont icon-guanbi1 font-color-red"
@click="uploadPictures.splice(uploadPicturesIndex, 1)"
></span>
</div>
<view class="list acea-row row-middle">
<view class="pictrue" v-for="(item, uploadPicturesIndex) in uploadPictures" :key="uploadPicturesIndex">
<image :src="item" />
<text class="iconfont icon-guanbi1 font-color-red" @click="uploadPictures.splice(uploadPicturesIndex, 1)"></text>
</view>
<!-- <VueCoreImageUpload
class="btn btn-primary"
:crop="false"
@ -65,34 +49,45 @@
:url="url"
v-if="uploadPictures.length < 8"
>
<div
<view
class="pictrue uploadBnt acea-row row-center-wrapper row-column"
>
<span class="iconfont icon-icon25201"></span>
<div>上传图片</div>
</div>
<text class="iconfont icon-icon25201"></text>
<view>上传图片</view>
</view>
</VueCoreImageUpload>-->
</div>
</div>
<div class="evaluateBnt bg-color-red" @click="submit">立即评价</div>
</div>
</div>
</view>
</view>
<view class="evaluateBnt bg-color-red" @click="submit">立即评价</view>
</view>
</view>
</template>
<style scoped>
.evaluate-con .score .textarea .list .pictrue.uploadBnt {
.evaluate-con .score .textarea .list .pictrue.uploadBnt {
border: 1px solid #ddd;
}
}
</style>
<script>
import { postOrderProduct, postOrderComment } from "@/api/store";
import { trim } from "@/utils";
import { VUE_APP_API_URL } from "@/config";
import { required } from "@/utils/validate";
import { validatorDefaultCatch } from "@/utils/dialog";
import {
postOrderProduct,
postOrderComment
} from "@/api/store";
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,
components: {
// VueCoreImageUpload
@ -105,8 +100,7 @@ export default {
productInfo: {}
}
},
scoreList: [
{
scoreList: [{
name: "商品质量",
stars: ["", "", "", "", ""],
index: -1
@ -154,7 +148,14 @@ export default {
this.scoreList[indexw].index = indexn;
},
imageuploaded(res) {
if (res.errno !== 0) return this.$dialog.error(res.msg || "上传图片失败");
if (res.errno !== 0) {
uni.showToast({
title: res.msg || "上传图片失败",
icon: 'none',
duration: 2000
});
return
}
this.uploadPictures.push(res.data[0]);
},
async submit() {
@ -175,7 +176,10 @@ export default {
type: "number"
})
]
}).validate({ product_score, service_score });
}).validate({
product_score,
service_score
});
} catch (e) {
return validatorDefaultCatch(e);
}
@ -194,13 +198,19 @@ export default {
});
this.$yrouter.push({
path: "/pages/order/OrderDetails/index",
query: { id: this.orderCon.orderId }
query: {
id: this.orderCon.orderId
}
});
})
.catch(res => {
this.$dialog.error(res.msg);
.catch(err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
});
}
}
};
};
</script>

92
pages/shop/GoodsList/index.vue

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

44
pages/shop/GoodsPromotion/index.vue

@ -1,30 +1,32 @@
<template>
<div class="quality-recommend">
<div class="slider-banner swiper">
<view class="quality-recommend">
<view class="slider-banner swiper">
<swiper indicatorDots="true" v-if="banner.length > 0">
<block v-for="(item, imgUrlsIndex) in imgUrls" :key="imgUrlsIndex">
<swiper-item>
<img :src="item.img" class="slide-image" />
<image :src="item.img" class="slide-image" />
</swiper-item>
</block>
</swiper>
</div>
<div class="title acea-row row-center-wrapper">
<div class="line"></div>
<div class="name">
<span class="iconfont icon-cuxiaoguanli"></span>促销单品
</div>
<div class="line"></div>
</div>
</view>
<view class="title acea-row row-center-wrapper">
<view class="line"></view>
<view class="name">
<text class="iconfont icon-cuxiaoguanli"></text>促销单品
</view>
<view class="line"></view>
</view>
<Promotion-good :benefit="goodsList"></Promotion-good>
</div>
</view>
</template>
<script>
// import { swiper, swiperSlide } from "vue-awesome-swiper";
// import { swiper, swiperSlide } from "vue-awesome-swiper";
import PromotionGood from "@/components/PromotionGood";
import { getGroomList } from "@/api/store";
export default {
import PromotionGood from "@/components/PromotionGood";
import {
getGroomList
} from "@/api/store";
export default {
name: "GoodsPromotion",
components: {
// swiper,
@ -63,10 +65,14 @@ export default {
that.imgUrls = res.data.banner;
that.goodsList = res.data.list;
})
.catch(function(res) {
this.$dialog.toast({ mes: res.msg });
.catch((err) => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
});
}
}
};
};
</script>

26
pages/shop/HotNewGoods/index.vue

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

318
pages/shop/ShoppingCart/index.vue

@ -1,142 +1,97 @@
<template>
<div class="shoppingCart">
<div class="labelNav acea-row row-around row-middle">
<div class="item">
<span class="iconfont icon-xuanzhong"></span>100%正品保证
</div>
<div class="item">
<span class="iconfont icon-xuanzhong"></span>所有商品精挑细选
</div>
<div class="item">
<span class="iconfont icon-xuanzhong"></span>售后无忧
</div>
</div>
<div class="nav acea-row row-between-wrapper">
<div>
<view class="shoppingCart">
<view class="labelNav acea-row row-around row-middle">
<view class="item">
<text class="iconfont icon-xuanzhong"></text>100%正品保证
</view>
<view class="item">
<text class="iconfont icon-xuanzhong"></text>所有商品精挑细选
</view>
<view class="item">
<text class="iconfont icon-xuanzhong"></text>售后无忧
</view>
</view>
<view class="nav acea-row row-between-wrapper">
<view>
购物数量
<span class="num font-color-red">{{ count }}</span>
</div>
<div
v-if="cartList.valid.length > 0"
class="administrate acea-row row-center-wrapper"
@click="manage"
>{{ footerswitch ? "取消" : "管理" }}</div>
</div>
<div v-if="validList.length > 0 || cartList.invalid.length > 0">
<div class="list">
<div
class="item acea-row row-between-wrapper"
v-for="(item, cartListValidIndex) in validList"
:key="cartListValidIndex"
>
<div class="select-btn">
<div class="checkbox-wrapper">
<text class="num font-color-red">{{ count }}</text>
</view>
<view v-if="cartList.valid.length > 0" class="administrate acea-row row-center-wrapper" @click="manage">{{ footerswitch ? "取消" : "管理" }}</view>
</view>
<view v-if="validList.length > 0 || cartList.invalid.length > 0">
<view class="list">
<view class="item acea-row row-between-wrapper" v-for="(item, cartListValidIndex) in validList" :key="cartListValidIndex">
<view class="select-btn">
<view class="checkbox-wrapper">
<checkbox-group @change="switchSelect(cartListValidIndex)">
<label class="well-check">
<checkbox value :checked="item.checked"></checkbox>
</label>
</checkbox-group>
</div>
</div>
<div class="picTxt acea-row row-between-wrapper">
<div class="pictrue" @click="goGoodsCon(item)">
<img :src="item.productInfo.attrInfo.image" v-if="item.productInfo.attrInfo" />
<img :src="item.productInfo.image" v-else />
</div>
<div class="text">
<div class="line1">{{ item.productInfo.storeName }}</div>
<div
class="infor line1"
v-if="item.productInfo.attrInfo"
>属性{{ item.productInfo.attrInfo.suk }}</div>
<div class="money">{{ item.truePrice }}</div>
</div>
<div class="carnum acea-row row-center-wrapper">
<div
class="reduce"
:class="validList[cartListValidIndex].cartNum <= 1 ? 'on' : ''"
@click.prevent="reduce(cartListValidIndex)"
>-</div>
<div class="num">{{ item.cartNum }}</div>
<div
class="plus"
v-if="validList[cartListValidIndex].attrInfo"
:class="
validList[cartListValidIndex].cartNum >=
validList[cartListValidIndex].attrInfo.stock
? 'on'
: ''
"
@click.prevent="plus(cartListValidIndex)"
>+</div>
<div
class="plus"
v-else
:class="
validList[cartListValidIndex].cartNum >= validList[cartListValidIndex].stock
? 'on'
: ''
"
@click.prevent="plus(cartListValidIndex)"
>+</div>
</div>
</div>
</div>
</div>
<div class="invalidGoods" v-if="cartList.invalid.length > 0">
<div class="goodsNav acea-row row-between-wrapper">
<div @click="goodsOpen">
<span
class="iconfont"
:class="goodsHidden === true ? 'icon-xiangyou' : 'icon-xiangxia'"
></span>失效商品
</div>
<div class="del" @click="delInvalidGoods">
<span class="iconfont icon-shanchu1"></span>清空
</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>
</view>
</view>
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue" @click="goGoodsCon(item)">
<image :src="item.productInfo.attrInfo.image" v-if="item.productInfo.attrInfo" />
<image :src="item.productInfo.image" v-else />
</view>
<view class="text">
<view class="line1">{{ item.productInfo.storeName }}</view>
<view class="infor line1" v-if="item.productInfo.attrInfo">属性{{ item.productInfo.attrInfo.suk }}</view>
<view class="money">{{ item.truePrice }}</view>
</view>
<view class="carnum acea-row row-center-wrapper">
<view class="reduce" :class="validList[cartListValidIndex].cartNum <= 1 ? 'on' : ''" @click.prevent="reduce(cartListValidIndex)">-</view>
<view class="num">{{ item.cartNum }}</view>
<view class="plus" v-if="validList[cartListValidIndex].attrInfo" :class="validList[cartListValidIndex].cartNum >=validList[cartListValidIndex].attrInfo.stock? 'on': ''"
@click.prevent="plus(cartListValidIndex)">+</view>
<view class="plus" v-else :class="validList[cartListValidIndex].cartNum >= validList[cartListValidIndex].stock? 'on': ''"
@click.prevent="plus(cartListValidIndex)">+</view>
</view>
</view>
</view>
</view>
<view class="invalidGoods" v-if="cartList.invalid.length > 0">
<view class="goodsNav acea-row row-between-wrapper">
<view @click="goodsOpen">
<text class="iconfont" :class="goodsHidden === true ? 'icon-xiangyou' : 'icon-xiangxia'"></text>失效商品
</view>
<view class="del" @click="delInvalidGoods">
<text class="iconfont icon-shanchu1"></text>清空
</view>
</view>
<view class="goodsList" :hidden="goodsHidden">
<view v-for="(item, cartListinvalidIndex) in cartList.invalid" :key="cartListinvalidIndex">
<view @click="goGoodsCon(item)" class="item acea-row row-between-wrapper" v-if="item.productInfo">
<view class="invalid acea-row row-center-wrapper">失效</view>
<view class="pictrue">
<image :src="item.productInfo.attrInfo.image" v-if="item.productInfo.attrInfo" />
<image :src="item.productInfo.image" v-else />
</view>
<view class="text acea-row row-column-between">
<view class="line1">{{ item.productInfo.storeName }}</view>
<view class="infor line1" v-if="item.productInfo.attrInfo">属性{{ item.productInfo.attrInfo.suk }}</view>
<view class="acea-row row-between-wrapper">
<view class="end">该商品已下架</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!--购物车暂无商品-->
<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>
<view class="noCart" v-if="cartList.valid.length === 0 && cartList.invalid.length === 0">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/noCart.png'" />
</view>
<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">
</view>
<view style="height:2.1rem"></view>
<view :class="['footer acea-row row-between-wrapper']" v-if="cartList.valid.length > 0">
<view>
<view class="select-btn">
<view class="checkbox-wrapper">
<!-- <label class="well-check">
<input
type="checkbox"
@ -146,45 +101,50 @@
@click="allChecked"
/>
<i class="icon"></i>
<span class="checkAll">全选 ({{ cartCount }})</span>
<text class="checkAll">全选 ({{ cartCount }})</text>
</label>-->
<checkbox-group @change="allChecked">
<label class="well-check">
<checkbox value :checked="isAllSelect && cartCount > 0"></checkbox>
<span class="checkAll">全选 ({{ cartCount }})</span>
<text class="checkAll">全选 ({{ cartCount }})</text>
</label>
</checkbox-group>
</div>
</div>
</div>
<div class="money acea-row row-middle" v-if="footerswitch === false">
<span class="font-color-red">{{ countmoney }}</span>
<div class="placeOrder bg-color-red" @click="placeOrder">立即下单</div>
</div>
<div class="button acea-row row-middle" v-else>
<div class="bnt cart-color" @click="collectAll">收藏</div>
<div class="bnt" @click="delgoods">删除</div>
</div>
</div>
</div>
</view>
</view>
</view>
<view class="money acea-row row-middle" v-if="footerswitch === false">
<text class="font-color-red">{{ countmoney }}</text>
<view class="placeOrder bg-color-red" @click="placeOrder">立即下单</view>
</view>
<view class="button acea-row row-middle" v-else>
<view class="bnt cart-color" @click="collectAll">收藏</view>
<view class="bnt" @click="delgoods">删除</view>
</view>
</view>
</view>
</template>
<script>
import Recommend from "@/components/Recommend";
import {
import Recommend from "@/components/Recommend";
import {
getCartList,
postCartDel,
changeCartNum,
getCartCount
} from "@/api/store";
import { postCollectAll } from "@/api/user";
import { mul, add } from "@/utils/bc";
import cookie from "@/utils/store/cookie";
import debounce from "lodash.debounce";
} from "@/api/store";
import {
postCollectAll
} from "@/api/user";
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",
components: {
Recommend
@ -193,7 +153,10 @@ export default {
data: function() {
return {
isIpx: false,
cartList: { invalid: [], valid: [] },
cartList: {
invalid: [],
valid: []
},
validList: [],
isAllSelect: false,
cartCount: 0,
@ -240,7 +203,9 @@ export default {
goGoodsCon(item) {
this.$yrouter.push({
path: "/pages/shop/GoodsCon/index",
query: { id: item.productId }
query: {
id: item.productId
}
});
},
getCartList: function() {
@ -273,7 +238,11 @@ export default {
}
});
if (id.length === 0) {
that.$dialog.toast({ mes: "请选择产品" });
uni.showToast({
title: "请选择产品",
icon: "none",
duration: 2000
});
return;
}
postCartDel(id).then(function() {
@ -312,7 +281,10 @@ export default {
//;
collectAll: function() {
let that = this,
data = { id: [], category: "" },
data = {
id: [],
category: ""
},
list = that.cartList.valid;
list.forEach(function(val) {
if (val.checked === true) {
@ -321,11 +293,19 @@ export default {
}
});
if (data.id.length === 0) {
that.$dialog.toast({ mes: "请选择产品" });
uni.showToast({
title: "请选择产品",
icon: "none",
duration: 2000
});
return;
}
postCollectAll(data).then(function() {
that.$dialog.toast({ mes: "收藏成功!" });
uni.showToast({
title: "收藏成功!",
icon: "none",
duration: 2000
});
});
},
//
@ -339,13 +319,19 @@ export default {
}
});
if (id.length === 0) {
that.$dialog.toast({ mes: "请选择产品" });
uni.showToast({
title: "请选择产品",
icon: "none",
duration: 2000
});
return;
}
console.log(id);
this.$yrouter.push({
path: "/pages/order/OrderSubmission/index",
query: { id: id.join(",") }
query: {
id: id.join(",")
}
});
},
manage: function() {
@ -379,7 +365,11 @@ export default {
let that = this;
let list = that.cartList.valid[index];
if (list.cartNum <= 1) {
that.$dialog.toast({ mes: "已经是底线啦!" });
uni.showToast({
title: "已经是底线啦!",
icon: "none",
duration: 2000
});
return;
}
list.cartNum--;
@ -484,5 +474,5 @@ export default {
that.countmoney = carmoney;
}
}
};
};
</script>

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

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

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

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

39
pages/user/BindingPhone/index.vue

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

26
pages/user/ChangePassword/index.vue

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

18
pages/user/CustomerList/index.vue

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

264
pages/user/Login/index.vue

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

161
pages/user/PersonalData/index.vue

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

149
pages/user/Recharge/index.vue

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

58
pages/user/Register/index.vue

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

87
pages/user/RetrievePassword/index.vue

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

262
pages/user/User/index.vue

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

84
pages/user/UserAccount/index.vue

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

54
pages/user/UserBill/index.vue

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

140
pages/user/UserVip/index.vue

@ -1,82 +1,78 @@
<template>
<div class="member-center">
<div class="header">
<div class="slider-banner banner">
<view class="member-center">
<view class="header">
<view class="slider-banner banner">
<swiper indicatorDots="true" @change="swiperChange">
<block v-for="(item, vipListIndex) in vipList" :key="vipListIndex">
<swiper-item>
<div class="swiper-slide" :style="{ backgroundImage: 'url(' + item.image + ')' }">
<!-- <img :src="item.icon" />-->
<div class="name">{{ item.name }}</div>
<div class="discount">
<view class="swiper-slide" :style="{ backgroundImage: 'url(' + item.image + ')' }">
<!-- <image :src="item.icon" />-->
<view class="name">{{ item.name }}</view>
<view class="discount">
可享受商品折扣: {{ item.discount / 10 }}
<span class="iconfont icon-zhekou"></span>
</div>
<div class="nav acea-row" v-if="item.grade == grade">
<div class="item" v-for="(val, indexn) in vipComplete" :key="indexn">
<div class="num">{{ val.newNumber }}</div>
<div>{{ val.realName }}</div>
</div>
</div>
<div class="lock" v-if="item.grade > grade">
<span class="iconfont icon-quanxianguanlisuozi"></span>该会员等级尚未解锁
</div>
<div class="lock" v-if="item.grade < grade">
<span class="iconfont icon-xuanzhong1"></span>已解锁更高等级
</div>
</div>
<text class="iconfont icon-zhekou"></text>
</view>
<view class="nav acea-row" v-if="item.grade == grade">
<view class="item" v-for="(val, indexn) in vipComplete" :key="indexn">
<view class="num">{{ val.newNumber }}</view>
<view>{{ val.realName }}</view>
</view>
</view>
<view class="lock" v-if="item.grade > grade">
<text class="iconfont icon-quanxianguanlisuozi"></text>该会员等级尚未解锁
</view>
<view class="lock" v-if="item.grade < grade">
<text class="iconfont icon-xuanzhong1"></text>已解锁更高等级
</view>
</view>
</swiper-item>
</block>
</swiper>
</div>
</div>
<div class="wrapper">
<div class="title acea-row row-between-wrapper">
<div>
<span class="iconfont icon-jingyanzhi"></span>会员升级要求
</div>
<div class="num">
<span class="current">{{ taskCount }}</span>
</view>
</view>
<view class="wrapper">
<view class="title acea-row row-between-wrapper">
<view>
<text class="iconfont icon-jingyanzhi"></text>会员升级要求
</view>
<view class="num">
<text class="current">{{ taskCount }}</text>
/{{ vipRequire.length }}
</div>
</div>
<div class="list">
<div class="item" v-for="(item, vipCompleteIndex) in vipComplete" :key="vipCompleteIndex">
<div class="top acea-row row-between-wrapper">
<div class="name">
</view>
</view>
<view class="list">
<view class="item" v-for="(item, vipCompleteIndex) in vipComplete" :key="vipCompleteIndex">
<view class="top acea-row row-between-wrapper">
<view class="name">
{{ item.name
}}
<span
class="iconfont icon-wenti"
v-if="item.illustrate"
@click="showGrow(item)"
></span>
</div>
<div>{{ item.finish ? "已满足条件" : "未满足条件" }}</div>
</div>
<div class="cu-progress">
<div class="bg-red" :style="{ width: item.speed + '%' }"></div>
</div>
<div class="experience acea-row row-between-wrapper">
<div>{{ item.taskTypeTitle }}</div>
<div>
<span class="num">{{ item.newNumber }}</span>
<text class="iconfont icon-wenti" v-if="item.illustrate" @click="showGrow(item)"></text>
</view>
<view>{{ item.finish ? "已满足条件" : "未满足条件" }}</view>
</view>
<view class="cu-progress">
<view class="bg-red" :style="{ width: item.speed + '%' }"></view>
</view>
<view class="experience acea-row row-between-wrapper">
<view>{{ item.taskTypeTitle }}</view>
<view>
<text class="num">{{ item.newNumber }}</text>
/{{ item.number }}
</div>
</div>
</div>
</div>
</div>
</view>
</view>
</view>
</view>
</view>
<Recommend></Recommend>
<div class="growthValue" :class="growthValue === false ? 'on' : ''">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/value.jpg'" />
<span class="iconfont icon-guanbi3" @click="growthTap"></span>
</div>
<div class="conter">{{ illustrate }}</div>
</div>
<div class="mask" :hidden="growthValue" @click="growthTap"></div>
</div>
<view class="growthValue" :class="growthValue === false ? 'on' : ''">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/value.jpg'" />
<text class="iconfont icon-guanbi3" @click="growthTap"></text>
</view>
<view class="conter">{{ illustrate }}</view>
</view>
<view class="mask" :hidden="growthValue" @click="growthTap"></view>
</view>
</template>
<script>
// import { swiper, swiperSlide } from "vue-awesome-swiper";
@ -168,7 +164,11 @@ export default {
that.taskCount = res.data.task.reachCount;
},
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;
},
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>
<div class="addAddress absolute">
<div class="list">
<div class="item acea-row row-between-wrapper">
<div class="name">姓名</div>
<view class="addAddress absolute">
<view class="list">
<view class="item acea-row row-between-wrapper">
<view class="name">姓名</view>
<input type="text" placeholder="请输入姓名" v-model="userAddress.realName" required />
</div>
<div class="item acea-row row-between-wrapper">
<div class="name">联系电话</div>
</view>
<view class="item acea-row row-between-wrapper">
<view class="name">联系电话</view>
<input type="text" placeholder="请输入联系电话" v-model="userAddress.phone" required />
</div>
<div class="item acea-row row-between-wrapper">
<div class="name">所在地区</div>
<div class="picker acea-row row-between-wrapper select-value form-control">
<div class="address">
<div slot="right" @click.stop="show2 = true">{{ model2 || "请选择收货地址" }}</div>
</view>
<view class="item acea-row row-between-wrapper">
<view class="name">所在地区</view>
<view class="picker acea-row row-between-wrapper select-value form-control">
<view class="address">
<view slot="right" @click.stop="show2 = true">{{ model2 || "请选择收货地址" }}</view>
<vant-popup :show="show2" position="bottom" @close="closeaArea">
<vant-area
:area-list="district"
@ -23,31 +23,31 @@
@confirm="result2"
/>
</vant-popup>
</div>
<div class="iconfont icon-dizhi font-color-red"></div>
</div>
</div>
<div class="item acea-row row-between-wrapper">
<div class="name">详细地址</div>
</view>
<view class="iconfont icon-dizhi font-color-red"></view>
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view class="name">详细地址</view>
<input type="text" placeholder="请填写具体地址" v-model="userAddress.detail" required />
</div>
</div>
<div class="default acea-row row-middle">
<div class="select-btn">
<div class="checkbox-wrapper">
</view>
</view>
<view class="default acea-row row-middle">
<view class="select-btn">
<view class="checkbox-wrapper">
<checkbox-group @change="ChangeIsDefault">
<label class="well-check">
<checkbox value :checked="userAddress.isDefault ? true : false"></checkbox>
<span class="def">设置为默认地址</span>
<text class="def">设置为默认地址</text>
</label>
</checkbox-group>
</div>
</div>
</div>
<div></div>
<div class="keepBnt bg-color-red" @click="submit">立即保存</div>
<div class="wechatAddress" v-if="isWechat && !id" @click="getAddress">导入微信地址</div>
</div>
</view>
</view>
</view>
<view></view>
<view class="keepBnt bg-color-red" @click="submit">立即保存</view>
<view class="wechatAddress" v-if="isWechat && !id" @click="getAddress">导入微信地址</view>
</view>
</template>
<script type="text/babel">
// import { CitySelect } from "vue-ydui/dist/lib.rem/cityselect";
@ -130,12 +130,30 @@ export default {
post_code: ""
};
postAddress(data).then(function() {
if (that.id) that.$dialog.toast({ mes: "修改成功" });
else that.$dialog.toast({ mes: "添加成功" });
if (that.id) {
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);
});
} catch (e) {
this.$dialog.error(e.msg);
} catch (err) {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
}
},
ChangeIsDefault: function() {

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

@ -1,30 +1,30 @@
<template>
<div
<view
class="address-management"
:class="addressList.length < 1 && page > 1 ? 'on' : ''"
ref="container"
>
<div class="line" v-if="addressList.length > 0">
<img :src="$VUE_APP_RESOURCES_URL+'/images/line.jpg'" />
</div>
<div class="item" v-for="(item, addressListIndex) in addressList" :key="addressListIndex">
<div class="address">
<div class="consignee">
<view class="line" v-if="addressList.length > 0">
<image :src="$VUE_APP_RESOURCES_URL+'/images/line.jpg'" />
</view>
<view class="item" v-for="(item, addressListIndex) in addressList" :key="addressListIndex">
<view class="address">
<view class="consignee">
收货人{{ item.realName }}
<span class="phone">{{ item.phone }}</span>
</div>
<div>
<text class="phone">{{ item.phone }}</text>
</view>
<view>
收货地址{{ item.province }}{{ item.city }}{{ item.district
}}{{ item.detail }}
</div>
</div>
<div class="operation acea-row row-between-wrapper">
<div class="select-btn">
<div class="checkbox-wrapper">
</view>
</view>
<view class="operation acea-row row-between-wrapper">
<view class="select-btn">
<view class="checkbox-wrapper">
<checkbox-group @change="radioChange(item.id)">
<label class="well-check">
<checkbox value :checked="item.isDefault||item.isDefault=='1' ? true : false"></checkbox>
<span class="default">设为默认</span>
<text class="default">设为默认</text>
</label>
</checkbox-group>
<!-- <label class="well-check">
@ -36,39 +36,39 @@
@click="radioChange(addressListIndex)"
/>
<i class="icon"></i>
<span class="default">设为默认</span>
<text class="default">设为默认</text>
</label>-->
</div>
</div>
<div class="acea-row row-middle">
<div @click="editAddress(addressListIndex)">
<span class="iconfont icon-bianji"></span>编辑
</div>
<div @click="delAddress(addressListIndex)">
<span class="iconfont icon-shanchu"></span>删除
</div>
</div>
</div>
</div>
</view>
</view>
<view class="acea-row row-middle">
<view @click="editAddress(addressListIndex)">
<text class="iconfont icon-bianji"></text>编辑
</view>
<view @click="delAddress(addressListIndex)">
<text class="iconfont icon-shanchu"></text>删除
</view>
</view>
</view>
</view>
<Loading :loaded="loadend" :loading="loading"></Loading>
<div class="noCommodity" v-if="addressList.length < 1 && page > 1">
<div class="noPictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noAddress.png'" class="image" />
</div>
</div>
<div style="height:100rpx;"></div>
<div class="footer acea-row row-between-wrapper">
<div class="addressBnt bg-color-red" v-if="isWechat" @click="addAddress">
<span class="iconfont icon-tianjiadizhi"></span>添加新地址
</div>
<div class="addressBnt on bg-color-red" v-else @click="addAddress">
<span class="iconfont icon-tianjiadizhi"></span>添加新地址
</div>
<!--<div class="addressBnt wxbnt" v-if="isWechat" @click="getAddress">-->
<!--<span class="iconfont icon-weixin2"></span>导入微信地址-->
<!--</div>-->
</div>
</div>
<view class="noCommodity" v-if="addressList.length < 1 && page > 1">
<view class="noPictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/noAddress.png'" class="image" />
</view>
</view>
<view style="height:100rpx;"></view>
<view class="footer acea-row row-between-wrapper">
<view class="addressBnt bg-color-red" v-if="isWechat" @click="addAddress">
<text class="iconfont icon-tianjiadizhi"></text>添加新地址
</view>
<view class="addressBnt on bg-color-red" v-else @click="addAddress">
<text class="iconfont icon-tianjiadizhi"></text>添加新地址
</view>
<!--<view class="addressBnt wxbnt" v-if="isWechat" @click="getAddress">-->
<!--<text class="iconfont icon-weixin2"></text>导入微信地址-->
<!--</view>-->
</view>
</view>
</template>
<style scoped>
.address-management.on {
@ -108,7 +108,7 @@ export default {
onReachBottom() {
!this.loading && this.AddressList();
},
onShow:function(){
onShow: function() {
this.refresh();
},
methods: {
@ -152,9 +152,11 @@ export default {
let address = this.addressList[index];
let id = address.id;
getAddressRemove(id).then(function() {
that.$dialog.toast({
mes: "删除成功!",
callback: () => {
uni.showToast({
title: "删除成功!",
icon:"success",
duration: 2000,
complete: () => {
that.addressList.splice(index, 1);
that.$set(that, "addressList", that.addressList);
}
@ -200,11 +202,19 @@ export default {
// this.addressList = [];
// this.AddressList();
// uni.hideLoading();
// this.$dialog.toast({ mes: "" });
// uni.showToast({
// title: "",
// icon: 'success',
// duration: 2000
// });
// })
// .catch(err => {
// 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>
<div ref="container">
<div class="coupon-list" v-if="couponsList.length > 0">
<div
<view ref="container">
<view class="coupon-list" v-if="couponsList.length > 0">
<view
class="item acea-row row-center-wrapper"
v-for="(item, couponsListIndex) in couponsList"
:key="couponsListIndex"
>
<div class="money" :class="item.isUse ? 'moneyGray' : ''">
<view class="money" :class="item.isUse ? 'moneyGray' : ''">
<span class="num">{{ item.couponPrice }}</span>
</div>
<div class="text">
<div class="condition line1">购物满{{ item.useMinPrice }}元可用</div>
<div class="data acea-row row-between-wrapper">
<div v-if="item.endTime !== 0">
<text class="num">{{ item.couponPrice }}</text>
</view>
<view class="text">
<view class="condition line1">购物满{{ item.useMinPrice }}元可用</view>
<view class="data acea-row row-between-wrapper">
<view v-if="item.endTime !== 0">
<data-format-t :data="item.startTime"></data-format-t>-
<data-format-t :data="item.endTime"></data-format-t>
</div>
<div v-else>不限时</div>
<div class="bnt gray" v-if="item.isUse === true">已领取</div>
<div class="bnt gray" v-else-if="item.isUse === 2">已领完</div>
<div class="bnt bg-color-red" v-else @click="getCoupon(item.id, couponsListIndex)">立即领取</div>
</div>
</div>
</div>
</div>
</view>
<view v-else>不限时</view>
<view class="bnt gray" v-if="item.isUse === true">已领取</view>
<view class="bnt gray" v-else-if="item.isUse === 2">已领完</view>
<view class="bnt bg-color-red" v-else @click="getCoupon(item.id, couponsListIndex)">立即领取</view>
</view>
</view>
</view>
</view>
<Loading :loaded="loadend" :loading="loading"></Loading>
<!--暂无优惠券-->
<div class="noCommodity" v-if="couponsList.length === 0 && page > 1">
<div class="noPictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noCoupon.png'" class="image" />
</div>
</div>
</div>
<view class="noCommodity" v-if="couponsList.length === 0 && page > 1">
<view class="noPictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/noCoupon.png'" class="image" />
</view>
</view>
</view>
</template>
<script>
import { getCoupon, getCouponReceive } from "@/api/user";
@ -68,10 +68,18 @@ export default {
getCouponReceive(id)
.then(function(res) {
list[index].isUse = true;
that.$dialog.toast({ mes: "领取成功" });
uni.showToast({
title: "领取成功",
icon: "success",
duration: 2000
});
})
.catch(function(res) {
that.$dialog.toast({ mes: res.response.data.msg });
.catch(function(err) {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
});
},
getUseCoupons: function() {

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

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

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

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

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

@ -1,37 +1,36 @@
<template>
<div class="commission-details" ref="container">
<div class="promoterHeader bg-color-red">
<div class="headerCon acea-row row-between-wrapper">
<div>
<div class="name">提现记录</div>
<div class="money">
<span class="num">{{ commission }}</span>
</div>
</div>
<div class="iconfont icon-jinbi1"></div>
</div>
</div>
<div class="sign-record" ref="content">
<div class="list">
<div class="item" v-for="(item, infoIndex) in info" :key="infoIndex">
<div class="data">{{ item.time }}</div>
<div class="listn" v-for="(val, indexn) in item.list" :key="indexn">
<div class="itemn acea-row row-between-wrapper">
<div>
<div class="name line1">{{ val.title }}</div>
<div>{{ val.addTime }}</div>
</div>
<div class="num" v-if="val.pm == 1">+{{ val.number }}</div>
<div class="num font-color-red" v-if="val.pm == 0">
-{{ val.number }}
</div>
</div>
</div>
</div>
</div>
</div>
<view class="commission-details" ref="container">
<view class="promoterHeader bg-color-red">
<view class="headerCon acea-row row-between-wrapper">
<view>
<view class="name">提现记录</view>
<view class="money">
<text class="num">{{ commission }}</text>
</view>
</view>
<view class="iconfont icon-jinbi1"></view>
</view>
</view>
<view class="sign-record" ref="content">
<view class="list">
<view class="item" v-for="(item, infoIndex) in info" :key="infoIndex">
<view class="data">{{ item.time }}</view>
<view class="listn" v-for="(val, indexn) in item.list" :key="indexn">
<view class="itemn acea-row row-between-wrapper">
<view>
<view class="name line1">{{ val.title }}</view>
<view>{{ val.addTime }}</view>
</view>
<view class="num" v-if="val.pm == 1">+{{ val.number }}</view>
<view class="num font-color-red" v-if="val.pm == 0">-{{ val.number }}</view>
</view>
</view>
</view>
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</div>
</view>
</template>
<script>
import { getCommissionInfo, getSpreadInfo } from "@/api/user";
@ -75,8 +74,12 @@ export default {
that.where.page = that.where.page + 1;
that.info.push.apply(that.info, res.data);
},
error => {
that.$dialog.message(error.msg);
err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
}
);
},
@ -86,8 +89,12 @@ export default {
res => {
that.commission = res.data.commissionCount;
},
error => {
this.$dialog.message(error.msg);
err => {
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>
<div class="commission-details" ref="container">
<div class="promoterHeader bg-color-red">
<div class="headerCon acea-row row-between-wrapper">
<div>
<div class="name">佣金明细</div>
<div class="money">
<span class="num">{{ commission }}</span>
</div>
</div>
</div>
</div>
<div class="sign-record" ref="content">
<div class="list">
<div class="item" v-for="(item, infoIndex) in info" :key="infoIndex">
<div class="data">{{ item.time }}</div>
<div class="listn" v-for="(val, indexn) in item.list" :key="indexn">
<div class="itemn acea-row row-between-wrapper">
<div>
<div class="name line1">{{ val.title }}</div>
<div>{{ val.addTime }}</div>
</div>
<div class="num" v-if="val.pm == 1">+{{ val.number }}</div>
<div class="num font-color-red" v-if="val.pm == 0">
<view class="commission-details" ref="container">
<view class="promoterHeader bg-color-red">
<view class="headerCon acea-row row-between-wrapper">
<view>
<view class="name">佣金明细</view>
<view class="money">
<text class="num">{{ commission }}</text>
</view>
</view>
</view>
</view>
<view class="sign-record" ref="content">
<view class="list">
<view class="item" v-for="(item, infoIndex) in info" :key="infoIndex">
<view class="data">{{ item.time }}</view>
<view class="listn" v-for="(val, indexn) in item.list" :key="indexn">
<view class="itemn acea-row row-between-wrapper">
<view>
<view class="name line1">{{ val.title }}</view>
<view>{{ val.addTime }}</view>
</view>
<view class="num" v-if="val.pm == 1">+{{ val.number }}</view>
<view class="num font-color-red" v-if="val.pm == 0">
-{{ val.number }}
</div>
</div>
</div>
</div>
</div>
</div>
</view>
</view>
</view>
</view>
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</div>
</view>
</template>
<script>
import { getCommissionInfo, getSpreadInfo } from "@/api/user";
@ -75,8 +75,12 @@ export default {
that.where.page = that.where.page + 1;
that.info.push.apply(that.info, res.data);
},
error => {
that.$dialog.message(error.msg);
err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
}
);
},
@ -86,8 +90,12 @@ export default {
res => {
that.commission = res.data.commissionCount;
},
error => {
this.$dialog.message(error.msg);
err => {
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>
<div class="distribution-posters">
<div class="slider-banner banner">
<view class="distribution-posters">
<view class="slider-banner banner">
<swiper indicatorDots="true">
<block v-for="(item, infoIndex) in info" :key="infoIndex">
<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>
</block>
</swiper>
</div>
<div class="keep bg-color-red" @click="saveImg">保存海报</div>
</div>
</view>
<view class="keep bg-color-red" @click="saveImg">保存海报</view>
</view>
</template>
<script>
// import { swiper, swiperSlide } from "vue-awesome-swiper";
@ -64,7 +64,11 @@ export default {
that.info = res.data;
},
err => {
that.$dialog.message(err.msg);
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
}
);
},

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

@ -1,97 +1,86 @@
<template>
<div class="promoter-list" ref="container">
<div class="header">
<div class="promoterHeader bg-color-red">
<div class="headerCon acea-row row-between-wrapper">
<div>
<div class="name">推广人数</div>
<div>
<span class="num">{{ first + second }}</span
>
</div>
</div>
</div>
</div>
<div class="nav acea-row row-around">
<div
class="item"
:class="screen.grade == 0 ? 'on' : ''"
@click="checkGrade(0)"
>
<view class="promoter-list" ref="container">
<view class="header">
<view class="promoterHeader bg-color-red">
<view class="headerCon acea-row row-between-wrapper">
<view>
<view class="name">推广人数</view>
<view>
<text class="num">{{ first + second }}</text>
<text></text>
</view>
</view>
</view>
</view>
<view class="nav acea-row row-around">
<view class="item" :class="screen.grade == 0 ? 'on' : ''" @click="checkGrade(0)">
一级({{ first }})
</div>
<div
class="item"
:class="screen.grade == 1 ? 'on' : ''"
@click="checkGrade(1)"
>
</view>
<view class="item" :class="screen.grade == 1 ? 'on' : ''" @click="checkGrade(1)">
二级({{ second }})
</div>
</div>
<div class="search acea-row row-between-wrapper">
</view>
</view>
<view class="search acea-row row-between-wrapper">
<form @submit.prevent="submitForm">
<div class="input">
<view class="input">
<input placeholder="点击搜索会员名称" v-model="screen.keyword" />
<span class="iconfont icon-guanbi"></span>
</div>
<text class="iconfont icon-guanbi"></text>
</view>
</form>
<div class="iconfont icon-sousuo2"></div>
</div>
</div>
<div class="list">
<div
class="sortNav acea-row row-middle"
:class="fixedState === true ? 'on' : ''"
>
<div class="sortItem" @click="sort('childCount')">
<view class="iconfont icon-sousuo2"></view>
</view>
</view>
<view class="list">
<view class="sortNav acea-row row-middle" :class="fixedState === true ? 'on' : ''">
<view class="sortItem" @click="sort('childCount')">
团队排序
<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" />
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort3.png'" v-if="childCount == 3" />
</div>
<div class="sortItem" @click="sort('numberCount')">
<image :src="$VUE_APP_RESOURCES_URL+'/images/sort1.png'" v-if="childCount == 1" />
<image :src="$VUE_APP_RESOURCES_URL+'/images/sort2.png'" v-if="childCount == 2" />
<image :src="$VUE_APP_RESOURCES_URL+'/images/sort3.png'" v-if="childCount == 3" />
</view>
<view class="sortItem" @click="sort('numberCount')">
金额排序
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort1.png'" v-if="numberCount == 1" />
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort2.png'" v-if="numberCount == 2" />
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort3.png'" v-if="numberCount == 3" />
</div>
<div class="sortItem" @click="sort('orderCount')">
<image :src="$VUE_APP_RESOURCES_URL+'/images/sort1.png'" v-if="numberCount == 1" />
<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" />
</view>
<view class="sortItem" @click="sort('orderCount')">
订单排序
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort1.png'" v-if="orderCount == 1" />
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort2.png'" v-if="orderCount == 2" />
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort3.png'" v-if="orderCount == 3" />
</div>
</div>
<div :class="fixedState === true ? 'sortList' : ''">
<div
class="item acea-row row-between-wrapper"
v-for="(val, spreadListIndex) in spreadList"
:key="spreadListIndex"
>
<div class="picTxt acea-row row-between-wrapper">
<div class="pictrue"><img :src="val.avatar" /></div>
<div class="text">
<div class="name line1">{{ val.nickname }}</div>
<div>加入时间: {{ val.time }}</div>
</div>
</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>
<image :src="$VUE_APP_RESOURCES_URL+'/images/sort1.png'" v-if="orderCount == 1" />
<image :src="$VUE_APP_RESOURCES_URL+'/images/sort2.png'" v-if="orderCount == 2" />
<image :src="$VUE_APP_RESOURCES_URL+'/images/sort3.png'" v-if="orderCount == 3" />
</view>
</view>
<view :class="fixedState === true ? 'sortList' : ''">
<view class="item acea-row row-between-wrapper" v-for="(val, spreadListIndex) in spreadList" :key="spreadListIndex">
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="val.avatar" />
</view>
<view class="text">
<view class="name line1">{{ val.nickname }}</view>
<view>加入时间: {{ val.time }}</view>
</view>
</view>
<view class="right">
<view>
<text class="font-color-red">{{ val.childCount }}</text>
</view>
<view>{{ val.orderCount }} </view>
<view>{{ val.numberCount ? val.numberCount : 0 }} </view>
</view>
</view>
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</div>
</view>
</template>
<script>
import { getSpreadUser } from "@/api/user";
import Loading from "@/components/Loading";
export default {
import {
getSpreadUser
} from "@/api/user";
import Loading from "@/components/Loading";
export default {
name: "PromoterList",
components: {
Loading
@ -166,8 +155,12 @@ export default {
that.first = res.data.total;
that.second = res.data.totalLevel;
},
error => {
that.$dialog.message(error.msg);
err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
},
300
);
@ -245,5 +238,5 @@ export default {
}
}
}
};
};
</script>

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

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

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

@ -1,73 +1,58 @@
<template>
<div class="cash-withdrawal">
<div class="nav acea-row">
<div
<view class="cash-withdrawal">
<view class="nav acea-row">
<view
v-for="(item, navListIndex) in navList"
class="item font-color-red"
@click="swichNav(navListIndex, item)"
:key="navListIndex"
>
<div
class="line bg-color-red"
:class="currentTab === navListIndex ? 'on' : ''"
></div>
<div
class="iconfont"
:class="item.icon + ' ' + (currentTab === navListIndex ? 'on' : '')"
></div>
<div>{{ item.name }}</div>
</div>
</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">
<view class="line bg-color-red" :class="currentTab === navListIndex ? 'on' : ''"></view>
<view class="iconfont" :class="item.icon + ' ' + (currentTab === navListIndex ? 'on' : '')"></view>
<view>{{ item.name }}</view>
</view>
</view>
<view class="wrapper">
<view :hidden="currentTab !== 0" class="list">
<view class="item acea-row row-between-wrapper">
<view class="name">微信号</view>
<view class="input">
<input placeholder="请输入微信号" v-model="post.weixin" />
</div>
</div>
<div class="item acea-row row-between-wrapper">
<div class="name">提现</div>
<div class="input">
<input
:placeholder="'最低提现金额' + minPrice"
v-model="post.money"
/>
</div>
</div>
<div class="tip">当前可提现金额: {{ commissionCount }}</div>
<div class="bnt bg-color-red" @click="submitted">提现</div>
</div>
<div :hidden="currentTab !== 1" class="list">
<div class="item acea-row row-between-wrapper">
<div class="name">用户名</div>
<div class="input">
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view class="name">提现</view>
<view class="input">
<input :placeholder="'最低提现金额' + minPrice" v-model="post.money" />
</view>
</view>
<view class="tip">当前可提现金额: {{ commissionCount }}</view>
<view class="bnt bg-color-red" @click="submitted">提现</view>
</view>
<view :hidden="currentTab !== 1" class="list">
<view class="item acea-row row-between-wrapper">
<view class="name">用户名</view>
<view class="input">
<input placeholder="请填写您的支付宝用户名" v-model="post.name" />
</div>
</div>
<div class="item acea-row row-between-wrapper">
<div class="name">账号</div>
<div class="input">
<input
placeholder="请填写您的支付宝账号"
v-model="post.alipay_code"
/>
</div>
</div>
<div class="item acea-row row-between-wrapper">
<div class="name">提现</div>
<div class="input">
<input
:placeholder="'最低提现金额' + minPrice"
v-model="post.money"
/>
</div>
</div>
<div class="tip">当前可提现金额: {{ commissionCount }}</div>
<div class="bnt bg-color-red" @click="submitted">提现</div>
</div>
</div>
</div>
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view class="name">账号</view>
<view class="input">
<input placeholder="请填写您的支付宝账号" v-model="post.alipay_code" />
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view class="name">提现</view>
<view class="input">
<input :placeholder="'最低提现金额' + minPrice" v-model="post.money" />
</view>
</view>
<view class="tip">当前可提现金额: {{ commissionCount }}</view>
<view class="bnt bg-color-red" @click="submitted">提现</view>
</view>
</view>
</view>
</template>
<script>
import { getBank, postCashInfo } from "@/api/user";
@ -116,7 +101,11 @@ export default {
that.commissionCount = res.data.commissionCount;
},
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 (
parseFloat(money) > parseFloat(that.commissionCount) ||
parseFloat(that.commissionCount) == 0
)
return that.$dialog.message("余额不足");
if (parseFloat(money) < parseFloat(that.minPrice))
return that.$dialog.message("最低提现金额" + that.minPrice);
) {
uni.showToast({
title: "余额不足",
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) {
case "alipay":
try {
@ -175,11 +176,19 @@ export default {
save: function(info) {
postCashInfo(info).then(
res => {
this.$dialog.message(res.msg);
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
this.router.push({ path: "/user/audit" });
},
error => {
this.$dialog.message(error.msg);
err => {
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>
<div class="my-promotion">
<div class="header">
<div class="name acea-row row-center-wrapper">
<div>当前佣金</div>
<div class="record" @click="goCashRecord()">
<view class="my-promotion">
<view class="header">
<view class="name acea-row row-center-wrapper">
<view>当前佣金</view>
<view class="record" @click="goCashRecord()">
提现记录
<span class="iconfont icon-xiangyou"></span>
</div>
</div>
<div class="num">{{ Info.commissionCount }}</div>
<div class="profit acea-row row-between-wrapper">
<div class="item">
<div>昨日收益</div>
<div class="money">{{ Info.lastDayCount }}</div>
</div>
<div class="item">
<div>累积已提</div>
<div class="money">{{ Info.extractCount }}</div>
</div>
</div>
</div>
<div class="bnt bg-color-red" @click="toCash">立即提现</div>
<div class="list acea-row row-between-wrapper">
<div class="item acea-row row-center-wrapper row-column" @click="goPoster()">
<span class="iconfont icon-erweima"></span>
<div>推广名片</div>
</div>
<div class="item acea-row row-center-wrapper row-column" @click="goPromoterList()">
<span class="iconfont icon-tongji"></span>
<div>推广人统计</div>
</div>
<div class="item acea-row row-center-wrapper row-column" @click="goCommissionDetails()">
<span class="iconfont icon-qiandai"></span>
<div>佣金明细</div>
</div>
<div class="item acea-row row-center-wrapper row-column" @click="goPromoterOrder()">
<span class="iconfont icon-dingdan"></span>
<div>推广人订单</div>
</div>
</div>
</div>
<text class="iconfont icon-xiangyou"></text>
</view>
</view>
<view class="num">{{ Info.commissionCount }}</view>
<view class="profit acea-row row-between-wrapper">
<view class="item">
<view>昨日收益</view>
<view class="money">{{ Info.lastDayCount }}</view>
</view>
<view class="item">
<view>累积已提</view>
<view class="money">{{ Info.extractCount }}</view>
</view>
</view>
</view>
<view class="bnt bg-color-red" @click="toCash">立即提现</view>
<view class="list acea-row row-between-wrapper">
<view class="item acea-row row-center-wrapper row-column" @click="goPoster()">
<text class="iconfont icon-erweima"></text>
<view>推广名片</view>
</view>
<view class="item acea-row row-center-wrapper row-column" @click="goPromoterList()">
<text class="iconfont icon-tongji"></text>
<view>推广人统计</view>
</view>
<view class="item acea-row row-center-wrapper row-column" @click="goCommissionDetails()">
<text class="iconfont icon-qiandai"></text>
<view>佣金明细</view>
</view>
<view class="item acea-row row-center-wrapper row-column" @click="goPromoterOrder()">
<text class="iconfont icon-dingdan"></text>
<view>推广人订单</view>
</view>
</view>
</view>
</template>
<script>
import { getSpreadInfo } from "@/api/user";
@ -83,7 +83,11 @@ export default {
that.Info = res.data;
},
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>
<div class="integral-details" ref="container">
<div class="header">
<div class="currentScore">当前积分</div>
<div>{{ info.integral }}</div>
<div class="line"></div>
<!--<div class="nav acea-row">-->
<!--<div class="item">-->
<!--<div class="num">{{ info.sum_integral }}</div>-->
<!--<div>累计积分</div>-->
<!--</div>-->
<!--<div class="item">-->
<!--<div class="num">{{ info.deduction_integral }}</div>-->
<!--<div>累计消费</div>-->
<!--</div>-->
<!--<div class="item">-->
<!--<div class="num">{{ info.today_integral }}</div>-->
<!--<div>今日获得</div>-->
<!--</div>-->
<!--</div>-->
</div>
<div class="wrapper">
<div class="nav acea-row">
<div
<view class="integral-details" ref="container">
<view class="header">
<view class="currentScore">当前积分</view>
<view>{{ info.integral }}</view>
<view class="line"></view>
<!--<view class="nav acea-row">-->
<!--<view class="item">-->
<!--<view class="num">{{ info.sum_integral }}</view>-->
<!--<view>累计积分</view>-->
<!--</view>-->
<!--<view class="item">-->
<!--<view class="num">{{ info.deduction_integral }}</view>-->
<!--<view>累计消费</view>-->
<!--</view>-->
<!--<view class="item">-->
<!--<view class="num">{{ info.today_integral }}</view>-->
<!--<view>今日获得</view>-->
<!--</view>-->
<!--</view>-->
</view>
<view class="wrapper">
<view class="nav acea-row">
<view
class="item acea-row row-center-wrapper"
:class="current === navListIndex ? 'on' : ''"
v-for="(item, navListIndex) in navList"
:key="navListIndex"
@click="nav(navListIndex)"
>
<span class="iconfont" :class="item.icon"></span>
<text class="iconfont" :class="item.icon"></text>
{{ item.name }}
</div>
</div>
<div class="list" :hidden="current !== 0">
<!--<div class="tip acea-row row-middle">-->
<!--<span class="iconfont icon-shuoming"></span-->
</view>
</view>
<view class="list" :hidden="current !== 0">
<!--<view class="tip acea-row row-middle">-->
<!--<text class="iconfont icon-shuoming"><text-->
<!--&gt;提示积分数值的高低会直接影响您的会员等级-->
<!--</div>-->
<div
<!--</view>-->
<view
class="item acea-row row-between-wrapper"
v-for="(item, listIndex) in list"
:key="listIndex"
>
<div>
<div class="state">{{ item.title }}</div>
<div>
<view>
<view class="state">{{ item.title }}</view>
<view>
<data-format :data="item.addTime"></data-format>
</div>
</div>
<div class="num" v-if="item.pm == 1">+{{ item.number }}</div>
<div class="num font-color-red" v-if="item.pm == 0">-{{ item.number }}</div>
</div>
</div>
<!--<div class="list2" :hidden="current !== 1">-->
<!--<div class="item acea-row row-between-wrapper" @click="goHome()">-->
<!--<div class="pictrue"><img :src="$VUE_APP_RESOURCES_URL+'/images/score.png'" /></div>-->
<!--<div class="name">购买商品可获得积分奖励</div>-->
<!--<div class="earn">赚积分</div>-->
<!--</div>-->
<!--<div-->
</view>
</view>
<view class="num" v-if="item.pm == 1">+{{ item.number }}</view>
<view class="num font-color-red" v-if="item.pm == 0">-{{ item.number }}</view>
</view>
</view>
<!--<view class="list2" :hidden="current !== 1">-->
<!--<view class="item acea-row row-between-wrapper" @click="goHome()">-->
<!--<view class="pictrue"><image :src="$VUE_APP_RESOURCES_URL+'/images/score.png'" /></view>-->
<!--<view class="name">购买商品可获得积分奖励</view>-->
<!--<view class="earn">赚积分</view>-->
<!--</view>-->
<!--<view-->
<!--class="item acea-row row-between-wrapper"-->
<!--@click="goSignIn()"-->
<!--&gt;-->
<!--<div class="pictrue"><img :src="$VUE_APP_RESOURCES_URL+'/images/score.png'" /></div>-->
<!--<div class="name">每日签到可获得积分奖励</div>-->
<!--<div class="earn">赚积分</div>-->
<!--</div>-->
<!--</div>-->
</div>
<!--<view class="pictrue"><image :src="$VUE_APP_RESOURCES_URL+'/images/score.png'" /></view>-->
<!--<view class="name">每日签到可获得积分奖励</view>-->
<!--<view class="earn">赚积分</view>-->
<!--</view>-->
<!--</view>-->
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</div>
</view>
</template>
<script>
import { getIntegralList, postSignUser } from "@/api/user";
@ -134,7 +134,11 @@ export default {
that.list.push.apply(that.list, res.data);
},
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;
},
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