422 changed files with 33728 additions and 32334 deletions
@ -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 */ |
@ -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]} |
@ -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 */ |
@ -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]} |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,80 +1,88 @@
|
||||
<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"> |
||||
购物买{{ item.use_min_price }}减{{ item.coupon_price }} |
||||
</div> |
||||
<div 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 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 }} |
||||
</view> |
||||
<view v-if="item.end_time"> |
||||
{{ item.start_time }}-{{ item.end_time }} |
||||
</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 { |
||||
name: "CouponWindow", |
||||
props: { |
||||
couponList: { |
||||
type: Array, |
||||
default: () => [] |
||||
} |
||||
}, |
||||
computed: mapGetters(["isLogin"]), |
||||
data: function() { |
||||
return { |
||||
value: true |
||||
}; |
||||
}, |
||||
mounted: function() {}, |
||||
methods: { |
||||
checked() { |
||||
const isLogin = this.isLogin; |
||||
if (!isLogin) return toLogin(); |
||||
export default { |
||||
name: "CouponWindow", |
||||
props: { |
||||
couponList: { |
||||
type: Array, |
||||
default: () => [] |
||||
} |
||||
}, |
||||
computed: mapGetters(["isLogin"]), |
||||
data: function() { |
||||
return { |
||||
value: true |
||||
}; |
||||
}, |
||||
mounted: function() {}, |
||||
methods: { |
||||
checked() { |
||||
const isLogin = this.isLogin; |
||||
if (!isLogin) return toLogin(); |
||||
|
||||
const ids = this.couponList.reduce((initial, coupon) => { |
||||
initial.push(coupon.id); |
||||
return initial; |
||||
}, []); |
||||
couponReceiveBatch(ids) |
||||
.then(() => { |
||||
this.$emit("success"); |
||||
this.$dialog.toast({ mes: "领取成功" }); |
||||
}) |
||||
.catch(() => { |
||||
this.$dialog.toast({ mes: "已领取" }); |
||||
}); |
||||
if (isLogin) { |
||||
this.value = false; |
||||
this.$emit("checked"); |
||||
} |
||||
}, |
||||
close: function() { |
||||
this.value = false; |
||||
this.$emit("close"); |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
const ids = this.couponList.reduce((initial, coupon) => { |
||||
initial.push(coupon.id); |
||||
return initial; |
||||
}, []); |
||||
couponReceiveBatch(ids) |
||||
.then(() => { |
||||
this.$emit("success"); |
||||
uni.showToast({ |
||||
title: '领取成功', |
||||
icon: 'success', |
||||
duration: 2000 |
||||
}); |
||||
}) |
||||
.catch(() => { |
||||
uni.showToast({ |
||||
title: '已领取', |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}); |
||||
}); |
||||
if (isLogin) { |
||||
this.value = false; |
||||
this.$emit("checked"); |
||||
} |
||||
}, |
||||
close: function() { |
||||
this.value = false; |
||||
this.$emit("close"); |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
|
@ -1,59 +1,55 @@
|
||||
<template> |
||||
<div class="not-defined"> |
||||
<img :src="$VUE_APP_RESOURCES_URL+'/images/404.png'" /> |
||||
|
||||
<div class="content"> |
||||
<h3 class="title">页面未找到</h3> |
||||
<span |
||||
>抱歉!您访问的页面不存在,请返回上一级或点击下方按钮返回首页...</span |
||||
> |
||||
</div> |
||||
|
||||
<div class="btn" @click="homeGo()"> |
||||
返回首页 |
||||
</div> |
||||
</div> |
||||
<view class="not-defined"> |
||||
<image :src="$VUE_APP_RESOURCES_URL+'/images/404.png'" /> |
||||
<view class="content"> |
||||
<h3 class="title">页面未找到</h3> |
||||
<text>抱歉!您访问的页面不存在,请返回上一级或点击下方按钮返回首页...</text> |
||||
</view> |
||||
<view class="btn" @click="homeGo()"> |
||||
返回首页 |
||||
</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
name: "NotDefined", |
||||
methods: { |
||||
homeGo() { |
||||
this.$yrouter.switchTab('/pages/home/index'); |
||||
export default { |
||||
name: "NotDefined", |
||||
methods: { |
||||
homeGo() { |
||||
this.$yrouter.switchTab('/pages/home/index'); |
||||
}, |
||||
}, |
||||
}, |
||||
}; |
||||
}; |
||||
</script> |
||||
|
||||
<style scoped> |
||||
.not-defined img { |
||||
width: 100%; |
||||
margin-top: 18%; |
||||
} |
||||
.not-defined image{ |
||||
width: 100%; |
||||
margin-top: 18%; |
||||
} |
||||
|
||||
.content { |
||||
padding: 0 1rem; |
||||
text-align: center; |
||||
color: #44405e; |
||||
font-size: 15px; |
||||
} |
||||
.content { |
||||
padding: 0 1rem; |
||||
text-align: center; |
||||
color: #44405e; |
||||
font-size: 15px; |
||||
} |
||||
|
||||
.title { |
||||
margin-bottom: 0.6rem; |
||||
color: #302c48; |
||||
font-size: 20px; |
||||
} |
||||
.title { |
||||
margin-bottom: 0.6rem; |
||||
color: #302c48; |
||||
font-size: 20px; |
||||
} |
||||
|
||||
.btn { |
||||
color: #fff; |
||||
background-color: #ef4c4c; |
||||
font-size: 16px; |
||||
padding: 0.16rem; |
||||
border-radius: 25px; |
||||
text-align: center; |
||||
width: 2.4rem; |
||||
margin: 0 auto; |
||||
margin-top: 1rem; |
||||
} |
||||
.btn { |
||||
color: #fff; |
||||
background-color: #ef4c4c; |
||||
font-size: 16px; |
||||
padding: 0.16rem; |
||||
border-radius: 25px; |
||||
text-align: center; |
||||
width: 2.4rem; |
||||
margin: 0 auto; |
||||
margin-top: 1rem; |
||||
} |
||||
</style> |
||||
|
@ -1,224 +1,220 @@
|
||||
<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" |
||||
> |
||||
{{ 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> |
||||
<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 ? "收起" : "查看全部" }} |
||||
<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 { |
||||
name: NAME, |
||||
components: { |
||||
CountDown |
||||
}, |
||||
props: {}, |
||||
data: function() { |
||||
return { |
||||
currentPinkOrder: "", //当前拼团订单 |
||||
isOk: 0, //判断拼团是否完成 |
||||
pinkBool: 0, //判断拼团是否成功|0=失败,1=成功 |
||||
userBool: 0, //判断当前用户是否在团内|0=未在,1=在 |
||||
pinkAll: [], //团员 |
||||
pinkT: [], //团长信息 |
||||
storeCombination: [], //拼团产品 |
||||
pinkId: 0, |
||||
count: 0, //拼团剩余人数 |
||||
iShidden: false |
||||
}; |
||||
}, |
||||
watch: { |
||||
$yroute(n) { |
||||
var that = this; |
||||
if (n.name === NAME) { |
||||
that.pinkId = that.$yroute.query.id; |
||||
that.getCombinationPink(); |
||||
} |
||||
} |
||||
}, |
||||
mounted: function() { |
||||
var that = this; |
||||
let url = handleQrCode(); |
||||
if (url) { |
||||
that.pinkId = url.pinkId; |
||||
} else { |
||||
that.pinkId = that.$yroute.query.id; |
||||
} |
||||
that.getCombinationPink(); |
||||
}, |
||||
methods: { |
||||
pay: function() { |
||||
var that = this; |
||||
var data = {}; |
||||
data.productId = that.storeCombination.productId; |
||||
data.cartNum = that.pinkT.totalNum; |
||||
data.uniqueId = ""; |
||||
data.combinationId = that.storeCombination.id; |
||||
data.new = 1; |
||||
postCartAdd(data) |
||||
.then(res => { |
||||
that.$yrouter.push({ |
||||
path: "/pages/order/OrderSubmission/index", |
||||
query: { id: res.data.cartId, pinkid: that.pinkId } |
||||
}); |
||||
}) |
||||
.catch(err => { |
||||
this.$dialog.error(err.msg||err.response.data.msg); |
||||
}); |
||||
}, |
||||
goPoster: function() { |
||||
var that = this; |
||||
this.$yrouter.push({ |
||||
path: "/pages/activity/Poster/index", |
||||
query: { id: that.pinkId, type: 1 } |
||||
}); |
||||
}, |
||||
goOrder: function() { |
||||
var that = this; |
||||
this.$yrouter.push({ |
||||
path: "/pages/order/OrderDetails/index", |
||||
query: { id: that.currentPinkOrder } |
||||
}); |
||||
}, |
||||
//拼团列表 |
||||
goList: function() { |
||||
this.$yrouter.push({ |
||||
path: "/pages/activity/GoodsGroup/index" |
||||
}); |
||||
}, |
||||
//拼团详情 |
||||
goDetail: function(id) { |
||||
this.$yrouter.push({ |
||||
path: "/pages/activity/GroupDetails/index", |
||||
query: { id } |
||||
}); |
||||
}, |
||||
//拼团信息 |
||||
getCombinationPink: function() { |
||||
var that = this; |
||||
getCombinationPink(that.pinkId).then(res => { |
||||
that.$set(that, "storeCombination", res.data.storeCombination); |
||||
that.$set(that, "pinkT", res.data.pinkT); |
||||
that.$set(that, "pinkAll", res.data.pinkAll); |
||||
that.$set(that, "count", res.data.count); |
||||
that.$set(that, "userBool", res.data.userBool); |
||||
that.$set(that, "pinkBool", res.data.pinkBool); |
||||
that.$set(that, "isOk", res.data.isOk); |
||||
that.$set(that, "currentPinkOrder", res.data.currentPinkOrder); |
||||
}); |
||||
}, |
||||
//拼团取消 |
||||
getCombinationRemove: function() { |
||||
var that = this; |
||||
getCombinationRemove({ id: that.pinkId, cid: that.storeCombination.id }) |
||||
.then(res => { |
||||
uni.showToast({ |
||||
title: res.msg, |
||||
icon: "none", |
||||
duration: 2000 |
||||
}); |
||||
}) |
||||
.catch(res => { |
||||
uni.showToast({ |
||||
title: res.msg, |
||||
icon: "none", |
||||
duration: 2000 |
||||
}); |
||||
}); |
||||
}, |
||||
lookAll: function() { |
||||
this.iShidden = !this.iShidden; |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
const NAME = "GroupRule"; |
||||
export default { |
||||
name: NAME, |
||||
components: { |
||||
CountDown |
||||
}, |
||||
props: {}, |
||||
data: function() { |
||||
return { |
||||
currentPinkOrder: "", //当前拼团订单 |
||||
isOk: 0, //判断拼团是否完成 |
||||
pinkBool: 0, //判断拼团是否成功|0=失败,1=成功 |
||||
userBool: 0, //判断当前用户是否在团内|0=未在,1=在 |
||||
pinkAll: [], //团员 |
||||
pinkT: [], //团长信息 |
||||
storeCombination: [], //拼团产品 |
||||
pinkId: 0, |
||||
count: 0, //拼团剩余人数 |
||||
iShidden: false |
||||
}; |
||||
}, |
||||
watch: { |
||||
$yroute(n) { |
||||
var that = this; |
||||
if (n.name === NAME) { |
||||
that.pinkId = that.$yroute.query.id; |
||||
that.getCombinationPink(); |
||||
} |
||||
} |
||||
}, |
||||
mounted: function() { |
||||
var that = this; |
||||
let url = handleQrCode(); |
||||
if (url) { |
||||
that.pinkId = url.pinkId; |
||||
} else { |
||||
that.pinkId = that.$yroute.query.id; |
||||
} |
||||
that.getCombinationPink(); |
||||
}, |
||||
methods: { |
||||
pay: function() { |
||||
var that = this; |
||||
var data = {}; |
||||
data.productId = that.storeCombination.productId; |
||||
data.cartNum = that.pinkT.totalNum; |
||||
data.uniqueId = ""; |
||||
data.combinationId = that.storeCombination.id; |
||||
data.new = 1; |
||||
postCartAdd(data) |
||||
.then(res => { |
||||
that.$yrouter.push({ |
||||
path: "/pages/order/OrderSubmission/index", |
||||
query: { |
||||
id: res.data.cartId, |
||||
pinkid: that.pinkId |
||||
} |
||||
}); |
||||
}) |
||||
.catch(err => { |
||||
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 |
||||
} |
||||
}); |
||||
}, |
||||
goOrder: function() { |
||||
var that = this; |
||||
this.$yrouter.push({ |
||||
path: "/pages/order/OrderDetails/index", |
||||
query: { |
||||
id: that.currentPinkOrder |
||||
} |
||||
}); |
||||
}, |
||||
//拼团列表 |
||||
goList: function() { |
||||
this.$yrouter.push({ |
||||
path: "/pages/activity/GoodsGroup/index" |
||||
}); |
||||
}, |
||||
//拼团详情 |
||||
goDetail: function(id) { |
||||
this.$yrouter.push({ |
||||
path: "/pages/activity/GroupDetails/index", |
||||
query: { |
||||
id |
||||
} |
||||
}); |
||||
}, |
||||
//拼团信息 |
||||
getCombinationPink: function() { |
||||
var that = this; |
||||
getCombinationPink(that.pinkId).then(res => { |
||||
that.$set(that, "storeCombination", res.data.storeCombination); |
||||
that.$set(that, "pinkT", res.data.pinkT); |
||||
that.$set(that, "pinkAll", res.data.pinkAll); |
||||
that.$set(that, "count", res.data.count); |
||||
that.$set(that, "userBool", res.data.userBool); |
||||
that.$set(that, "pinkBool", res.data.pinkBool); |
||||
that.$set(that, "isOk", res.data.isOk); |
||||
that.$set(that, "currentPinkOrder", res.data.currentPinkOrder); |
||||
}); |
||||
}, |
||||
//拼团取消 |
||||
getCombinationRemove: function() { |
||||
var that = this; |
||||
getCombinationRemove({ |
||||
id: that.pinkId, |
||||
cid: that.storeCombination.id |
||||
}) |
||||
.then(res => { |
||||
uni.showToast({ |
||||
title: res.msg, |
||||
icon: "none", |
||||
duration: 2000 |
||||
}); |
||||
}) |
||||
.catch(res => { |
||||
uni.showToast({ |
||||
title: res.msg, |
||||
icon: "none", |
||||
duration: 2000 |
||||
}); |
||||
}); |
||||
}, |
||||
lookAll: function() { |
||||
this.iShidden = !this.iShidden; |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
|
@ -1,188 +1,201 @@
|
||||
<template> |
||||
<div class="container"> |
||||
<div v-if="!isAuthorization"> |
||||
<div class="getUserInfo"> |
||||
<p>您还未允许微信登录授权,请点击下方按钮允许微信授权登录。</p> |
||||
<vant-button type="primary" open-type="getUserInfo" @getuserinfo="getUserInfo">允许微信登录授权</vant-button> |
||||
<div class="sp-cell"></div> |
||||
<vant-button type="default" @click="back">取消微信登录授权</vant-button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</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 { |
||||
data() { |
||||
return {}; |
||||
}, |
||||
computed: { |
||||
...mapState(["isAuthorization"]) |
||||
}, |
||||
onShow() { |
||||
this.UPDATE_AUTHORIZATIONPAGE(false); |
||||
}, |
||||
onHide() { |
||||
this.changeAuthorization(false); |
||||
}, |
||||
onUnload() { |
||||
this.changeAuthorization(false); |
||||
}, |
||||
methods: { |
||||
...mapActions(["changeAuthorization", "changeUserInfo"]), |
||||
...mapMutations(["UPDATE_AUTHORIZATIONPAGE", "CHANGE_TABTAR"]), |
||||
back() { |
||||
// if (this.$yroute.query.redirect) { |
||||
// this.$yrouter.replace({ |
||||
// path: this.$yroute.query.redirect |
||||
// }); |
||||
// } else { |
||||
// this.$yrouter.replace({ |
||||
// path: "/pages/launch/index", |
||||
// query: { type: 0 } |
||||
// }); |
||||
// } |
||||
this.CHANGE_TABTAR(0); |
||||
this.$yrouter.replace({ |
||||
path: "/pages/home/index", |
||||
query: { type: 0 } |
||||
}); |
||||
}, |
||||
getUserInfo(data) { |
||||
uni.showLoading({ |
||||
title: "登录中" |
||||
}); |
||||
login(); |
||||
} |
||||
}, |
||||
onUnload() {}, |
||||
mounted() {} |
||||
}; |
||||
</script> |
||||
|
||||
<style lang="less"> |
||||
.sp-cell { |
||||
height: 20rpx; |
||||
} |
||||
.getUserInfo { |
||||
display: flex; |
||||
align-items: center; |
||||
flex-direction: column; |
||||
padding: 30px; |
||||
|
||||
p { |
||||
margin-bottom: 20px; |
||||
} |
||||
} |
||||
.container { |
||||
flex: 1; |
||||
display: flex; |
||||
flex-direction: column; |
||||
justify-content: flex-start; |
||||
position: relative; |
||||
} |
||||
|
||||
.tab-bar { |
||||
font-size: 0; |
||||
display: flex; |
||||
align-items: center; |
||||
background: rgba(255, 255, 255, 0.9); |
||||
position: fixed; |
||||
bottom: 0; |
||||
left: 0; |
||||
right: 0; |
||||
z-index: 99; |
||||
border-top: 1px solid rgba(248, 248, 248, 1); |
||||
|
||||
.tab-bar-item { |
||||
flex: 1; |
||||
height: 49px; |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
flex-direction: column; |
||||
|
||||
&.active { |
||||
text { |
||||
color: #ee7559; |
||||
} |
||||
|
||||
.tab-bar-pic { |
||||
display: none; |
||||
background: #f9f9f9; |
||||
|
||||
&.active { |
||||
display: block; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.tab-bar-pic { |
||||
display: block; |
||||
background: #f9f9f9; |
||||
|
||||
&.active { |
||||
display: none; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.tab-bar-pic { |
||||
width: 25px; |
||||
height: 25px; |
||||
background: #f9f9f9; |
||||
|
||||
image { |
||||
width: 25px; |
||||
height: 25px; |
||||
} |
||||
} |
||||
|
||||
.tab-bar-pic-active { |
||||
} |
||||
|
||||
text { |
||||
font-size: 10px; |
||||
color: rgb(160, 160, 160); |
||||
line-height: 10px; |
||||
margin-top: 5px; |
||||
} |
||||
} |
||||
|
||||
.tab-bar-bg { |
||||
padding-top: 46px; |
||||
width: 100%; |
||||
} |
||||
|
||||
.view-item { |
||||
display: none; |
||||
width: 100%; |
||||
} |
||||
|
||||
.view-item-active { |
||||
display: block; |
||||
} |
||||
|
||||
.getUserInfo { |
||||
display: flex; |
||||
align-items: center; |
||||
flex-direction: column; |
||||
padding: 30px; |
||||
|
||||
p { |
||||
margin-bottom: 20px; |
||||
} |
||||
} |
||||
|
||||
._van-dialog { |
||||
z-index: 99999999999; |
||||
} |
||||
<template> |
||||
<view class="container"> |
||||
<view v-if="!isAuthorization"> |
||||
<view class="getUserInfo"> |
||||
<view>您还未允许微信登录授权,请点击下方按钮允许微信授权登录。</text> |
||||
<vant-button type="primary" open-type="getUserInfo" @getuserinfo="getUserInfo">允许微信登录授权</vant-button> |
||||
<view class="sp-cell"></view> |
||||
<vant-button type="default" @click="back">取消微信登录授权</vant-button> |
||||
</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 { |
||||
data() { |
||||
return {}; |
||||
}, |
||||
computed: { |
||||
...mapState(["isAuthorization"]) |
||||
}, |
||||
onShow() { |
||||
this.UPDATE_AUTHORIZATIONPAGE(false); |
||||
}, |
||||
onHide() { |
||||
this.changeAuthorization(false); |
||||
}, |
||||
onUnload() { |
||||
this.changeAuthorization(false); |
||||
}, |
||||
methods: { |
||||
...mapActions(["changeAuthorization", "changeUserInfo"]), |
||||
...mapMutations(["UPDATE_AUTHORIZATIONPAGE", "CHANGE_TABTAR"]), |
||||
back() { |
||||
// if (this.$yroute.query.redirect) { |
||||
// this.$yrouter.replace({ |
||||
// path: this.$yroute.query.redirect |
||||
// }); |
||||
// } else { |
||||
// this.$yrouter.replace({ |
||||
// path: "/pages/launch/index", |
||||
// query: { type: 0 } |
||||
// }); |
||||
// } |
||||
this.CHANGE_TABTAR(0); |
||||
this.$yrouter.replace({ |
||||
path: "/pages/home/index", |
||||
query: { |
||||
type: 0 |
||||
} |
||||
}); |
||||
}, |
||||
getUserInfo(data) { |
||||
uni.showLoading({ |
||||
title: "登录中" |
||||
}); |
||||
login(); |
||||
} |
||||
}, |
||||
onUnload() {}, |
||||
mounted() {} |
||||
}; |
||||
</script> |
||||
|
||||
<style lang="less"> |
||||
.sp-cell { |
||||
height: 20rpx; |
||||
} |
||||
|
||||
.getUserInfo { |
||||
display: flex; |
||||
align-items: center; |
||||
flex-direction: column; |
||||
padding: 30px; |
||||
|
||||
p { |
||||
margin-bottom: 20px; |
||||
} |
||||
} |
||||
|
||||
.container { |
||||
flex: 1; |
||||
display: flex; |
||||
flex-direction: column; |
||||
justify-content: flex-start; |
||||
position: relative; |
||||
} |
||||
|
||||
.tab-bar { |
||||
font-size: 0; |
||||
display: flex; |
||||
align-items: center; |
||||
background: rgba(255, 255, 255, 0.9); |
||||
position: fixed; |
||||
bottom: 0; |
||||
left: 0; |
||||
right: 0; |
||||
z-index: 99; |
||||
border-top: 1px solid rgba(248, 248, 248, 1); |
||||
|
||||
.tab-bar-item { |
||||
flex: 1; |
||||
height: 49px; |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
flex-direction: column; |
||||
|
||||
&.active { |
||||
text { |
||||
color: #ee7559; |
||||
} |
||||
|
||||
.tab-bar-pic { |
||||
display: none; |
||||
background: #f9f9f9; |
||||
|
||||
&.active { |
||||
display: block; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.tab-bar-pic { |
||||
display: block; |
||||
background: #f9f9f9; |
||||
|
||||
&.active { |
||||
display: none; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.tab-bar-pic { |
||||
width: 25px; |
||||
height: 25px; |
||||
background: #f9f9f9; |
||||
|
||||
image { |
||||
width: 25px; |
||||
height: 25px; |
||||
} |
||||
} |
||||
|
||||
.tab-bar-pic-active {} |
||||
|
||||
text { |
||||
font-size: 10px; |
||||
color: rgb(160, 160, 160); |
||||
line-height: 10px; |
||||
margin-top: 5px; |
||||
} |
||||
} |
||||
|
||||
.tab-bar-bg { |
||||
padding-top: 46px; |
||||
width: 100%; |
||||
} |
||||
|
||||
.view-item { |
||||
display: none; |
||||
width: 100%; |
||||
} |
||||
|
||||
.view-item-active { |
||||
display: block; |
||||
} |
||||
|
||||
.getUserInfo { |
||||
display: flex; |
||||
align-items: center; |
||||
flex-direction: column; |
||||
padding: 30px; |
||||
|
||||
p { |
||||
margin-bottom: 20px; |
||||
} |
||||
} |
||||
|
||||
._van-dialog { |
||||
z-index: 99999999999; |
||||
} |
||||
</style> |
||||
|
@ -1,124 +1,153 @@
|
||||
<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> |
||||
<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> |
||||
</picker> |
||||
<div class="item textarea acea-row row-between"> |
||||
<div>备注说明</div> |
||||
<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 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"> |
||||
<view class="item acea-row row-between-wrapper"> |
||||
<view>退款原因</view> |
||||
<view class="num">{{reason}}</view> |
||||
<text class="iconfont icon-jiantou"></text> |
||||
</view> |
||||
</picker> |
||||
<view class="item textarea acea-row row-between"> |
||||
<view>备注说明</view> |
||||
<textarea placeholder="填写备注信息,100字以内" class="num" v-model="refund_reason_wap_explain"></textarea> |
||||
</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 { |
||||
name: "goodsReturn", |
||||
components: { |
||||
// VueCoreImageUpload |
||||
}, |
||||
data() { |
||||
return { |
||||
url: `${VUE_APP_API_URL}/upload/image`, |
||||
headers: { |
||||
Authorization: "Bearer " + this.$store.state.token |
||||
}, |
||||
id: 0, |
||||
orderInfo: {}, |
||||
reasonList: [], |
||||
reason: "", |
||||
refund_reason_wap_explain: "", |
||||
refund_reason_wap_img: [] |
||||
}; |
||||
}, |
||||
methods: { |
||||
changeReason(e) { |
||||
this.reason = this.reasonList[e.mp.detail.value]; |
||||
}, |
||||
imageuploaded(res) { |
||||
if (res.status !== 200) |
||||
return this.$dialog.error(res.msg || "上传图片失败"); |
||||
this.refund_reason_wap_img.push(res.data.url); |
||||
}, |
||||
getOrderDetail() { |
||||
orderDetail(this.id) |
||||
.then(res => { |
||||
this.orderInfo = res.data; |
||||
}) |
||||
.catch(err => { |
||||
this.$dialog.error(err.response.data.msg || "获取订单失败"); |
||||
}); |
||||
}, |
||||
getRefundReason() { |
||||
getRefundReason().then(res => { |
||||
this.reasonList = res.data; |
||||
}); |
||||
}, |
||||
submit() { |
||||
const refund_reason_wap_explain = trim(this.refund_reason_wap_explain), |
||||
text = this.reason; |
||||
if (!text) return this.$dialog.toast({ mes: "请选择退款原因" }); |
||||
postOrderRefund({ |
||||
text, |
||||
uni: this.orderInfo.orderId, |
||||
refund_reason_wap_img: this.refund_reason_wap_img.join(","), |
||||
refund_reason_wap_explain |
||||
}) |
||||
.then(res => { |
||||
uni.showToast({ |
||||
title: res.msg, |
||||
icon: "success", |
||||
duration: 2000 |
||||
}); |
||||
setTimeout(() => { |
||||
this.$yrouter.back(); |
||||
}, 1500); |
||||
}) |
||||
.catch(err => { |
||||
this.$dialog.error(err.msg||err.response.data.msg); |
||||
}); |
||||
} |
||||
}, |
||||
mounted() { |
||||
this.id = this.$yroute.query.id || 0; |
||||
this.getOrderDetail(); |
||||
this.getRefundReason(); |
||||
} |
||||
}; |
||||
</script> |
||||
export default { |
||||
name: "goodsReturn", |
||||
components: { |
||||
// VueCoreImageUpload |
||||
}, |
||||
data() { |
||||
return { |
||||
url: `${VUE_APP_API_URL}/upload/image`, |
||||
headers: { |
||||
Authorization: "Bearer " + this.$store.state.token |
||||
}, |
||||
id: 0, |
||||
orderInfo: {}, |
||||
reasonList: [], |
||||
reason: "", |
||||
refund_reason_wap_explain: "", |
||||
refund_reason_wap_img: [] |
||||
}; |
||||
}, |
||||
methods: { |
||||
changeReason(e) { |
||||
this.reason = this.reasonList[e.mp.detail.value]; |
||||
}, |
||||
imageuploaded(res) { |
||||
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() { |
||||
orderDetail(this.id) |
||||
.then(res => { |
||||
this.orderInfo = res.data; |
||||
}) |
||||
.catch(err => { |
||||
uni.showToast({ |
||||
title: err.msg || err.response.data.msg, |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}); |
||||
}); |
||||
}, |
||||
getRefundReason() { |
||||
getRefundReason().then(res => { |
||||
this.reasonList = res.data; |
||||
}); |
||||
}, |
||||
submit() { |
||||
const refund_reason_wap_explain = trim(this.refund_reason_wap_explain), |
||||
text = this.reason; |
||||
if (!text) { |
||||
uni.showToast({ |
||||
title: "请选择退款原因", |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}); |
||||
return |
||||
} |
||||
postOrderRefund({ |
||||
text, |
||||
uni: this.orderInfo.orderId, |
||||
refund_reason_wap_img: this.refund_reason_wap_img.join(","), |
||||
refund_reason_wap_explain |
||||
}) |
||||
.then(res => { |
||||
uni.showToast({ |
||||
title: res.msg, |
||||
icon: "success", |
||||
duration: 2000 |
||||
}); |
||||
setTimeout(() => { |
||||
this.$yrouter.back(); |
||||
}, 1500); |
||||
}) |
||||
.catch(err => { |
||||
uni.showToast({ |
||||
title: err.msg || err.response.data.msg, |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}); |
||||
}); |
||||
} |
||||
}, |
||||
mounted() { |
||||
this.id = this.$yroute.query.id || 0; |
||||
this.getOrderDetail(); |
||||
this.getRefundReason(); |
||||
} |
||||
}; |
||||
</script> |
||||
|
@ -1,350 +1,381 @@
|
||||
<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> |
||||
{{ orderInfo.deliveryName }} |
||||
</div> |
||||
<div class="express line1"> |
||||
<span class="name">快递单号:</span> |
||||
{{ 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 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 }} |
||||
</view> |
||||
<view class="express line1"> |
||||
<text class="name">快递单号:</text> |
||||
{{ orderInfo.deliveryId }} |
||||
</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;"> |
||||
<!--物流跟踪--> |
||||
<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"> |
||||
物流跟踪 |
||||
<!--物流跟踪--> |
||||
</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> |
||||
<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" |
||||
> |
||||
<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"> |
||||
<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> |
||||
<!-- 物流进度条 --> |
||||
<view class="div-bg bg-white" style="font-size:12px; background:#fff;"> |
||||
<!--物流跟踪--> |
||||
<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"> |
||||
物流跟踪 |
||||
<!--物流跟踪--> |
||||
</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> |
||||
<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> |
||||
<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> |
||||
<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> |
||||
<Recommend></Recommend> |
||||
</div> |
||||
<view class="no-express" v-if="loaded && !expressList.length"> |
||||
<image :src="$VUE_APP_RESOURCES_URL+'/images/noExpress.png'" /> |
||||
</view> |
||||
<Recommend></Recommend> |
||||
</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 { |
||||
name: NAME, |
||||
components: { |
||||
Recommend |
||||
}, |
||||
data: function() { |
||||
return { |
||||
id: "", |
||||
cartInfo: [], |
||||
orderInfo: {}, |
||||
expressList: [], |
||||
loaded: false, |
||||
logisticsList: [ |
||||
{ |
||||
message: "暂无数据", |
||||
messageDate: "" |
||||
} |
||||
] |
||||
}; |
||||
}, |
||||
watch: { |
||||
$yroute(n) { |
||||
if (n.name === NAME && this.$yroute.query.id !== this.id) { |
||||
this.id = this.$yroute.query.id; |
||||
this.getExpress(); |
||||
} |
||||
} |
||||
}, |
||||
mounted: function() { |
||||
this.id = this.$yroute.query.id; |
||||
this.getExpress(); |
||||
}, |
||||
methods: { |
||||
copyClipboard, |
||||
getExpressInfo() { |
||||
let params = { |
||||
orderCode: this.id, |
||||
shipperCode: this.orderInfo.deliverySn, |
||||
logisticCode: this.orderInfo.deliveryId |
||||
}; |
||||
express(params) |
||||
.then(res => { |
||||
this.logisticsList = res.data.traces.reverse(); |
||||
}) |
||||
.catch(err => { |
||||
this.$dialog.error(err.response.data.msg || "加载失败"); |
||||
}); |
||||
}, |
||||
getExpress() { |
||||
if (!this.id) return this.$dialog.error("订单不存在"); |
||||
this.loaded = false; |
||||
orderDetail(this.id) |
||||
.then(res => { |
||||
this.orderInfo = { |
||||
deliveryId: res.data.deliveryId, |
||||
deliveryName: res.data.deliveryName, |
||||
deliverySn: res.data.deliverySn |
||||
}; |
||||
this.getExpressInfo(); |
||||
// const result = res.data.express.result || {}; |
||||
// this.cartInfo = res.data.order.cartInfo; |
||||
// this.expressList = result.list || []; |
||||
// this.loaded = true; |
||||
|
||||
}) |
||||
.catch(err => { |
||||
this.$dialog.error(err.response.data.msg || "加载失败"); |
||||
}); |
||||
} |
||||
} |
||||
}; |
||||
export default { |
||||
name: NAME, |
||||
components: { |
||||
Recommend |
||||
}, |
||||
data: function() { |
||||
return { |
||||
id: "", |
||||
cartInfo: [], |
||||
orderInfo: {}, |
||||
expressList: [], |
||||
loaded: false, |
||||
logisticsList: [{ |
||||
message: "暂无数据", |
||||
messageDate: "" |
||||
}] |
||||
}; |
||||
}, |
||||
watch: { |
||||
$yroute(n) { |
||||
if (n.name === NAME && this.$yroute.query.id !== this.id) { |
||||
this.id = this.$yroute.query.id; |
||||
this.getExpress(); |
||||
} |
||||
} |
||||
}, |
||||
mounted: function() { |
||||
this.id = this.$yroute.query.id; |
||||
this.getExpress(); |
||||
}, |
||||
methods: { |
||||
copyClipboard, |
||||
getExpressInfo() { |
||||
let params = { |
||||
orderCode: this.id, |
||||
shipperCode: this.orderInfo.deliverySn, |
||||
logisticCode: this.orderInfo.deliveryId |
||||
}; |
||||
express(params) |
||||
.then(res => { |
||||
this.logisticsList = res.data.traces.reverse(); |
||||
}) |
||||
.catch(err => { |
||||
uni.showToast({ |
||||
title: err.msg || err.response.data.msg, |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}); |
||||
}); |
||||
}, |
||||
getExpress() { |
||||
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 => { |
||||
this.orderInfo = { |
||||
deliveryId: res.data.deliveryId, |
||||
deliveryName: res.data.deliveryName, |
||||
deliverySn: res.data.deliverySn |
||||
}; |
||||
this.getExpressInfo(); |
||||
// const result = res.data.express.result || {}; |
||||
// this.cartInfo = res.data.order.cartInfo; |
||||
// this.expressList = result.list || []; |
||||
// this.loaded = true; |
||||
|
||||
}) |
||||
.catch(err => { |
||||
uni.showToast({ |
||||
title: err.msg || err.response.data.msg, |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}); |
||||
}); |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
|
||||
<style scoped> |
||||
.no-express { |
||||
margin: 1.5rem 0; |
||||
} |
||||
.no-express { |
||||
margin: 1.5rem 0; |
||||
} |
||||
|
||||
.no-express image { |
||||
width: 6rem; |
||||
margin: 0 auto; |
||||
display: block; |
||||
} |
||||
|
||||
.message-text { |
||||
font-family: MicrosoftYaHei; |
||||
font-size: 1rem; |
||||
font-weight: normal; |
||||
font-stretch: normal; |
||||
line-height: 3rem; |
||||
letter-spacing: 0rem; |
||||
color: #333333; |
||||
width: 50%; |
||||
} |
||||
|
||||
.fontblack { |
||||
color: #999999; |
||||
} |
||||
|
||||
.img2 { |
||||
width: 0.81rem; |
||||
height: 0.8rem; |
||||
float: right; |
||||
} |
||||
|
||||
.addressshow2 { |
||||
height: auto; |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
display: -webkit-box; |
||||
width: 75%; |
||||
-webkit-line-clamp: 2; |
||||
-webkit-box-orient: vertical; |
||||
white-space: normal; |
||||
word-wrap: break-word; |
||||
word-break: break-all; |
||||
font-size: 1rem; |
||||
} |
||||
|
||||
.addressshow1 { |
||||
height: auto; |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
display: -webkit-box; |
||||
width: 75%; |
||||
-webkit-line-clamp: 1; |
||||
-webkit-box-orient: vertical; |
||||
white-space: normal; |
||||
word-wrap: break-word; |
||||
word-break: break-all; |
||||
font-size: 1rem; |
||||
} |
||||
|
||||
.orderTitle { |
||||
font-size: 1rem; |
||||
color: #333333; |
||||
height: auto; |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
display: -webkit-box; |
||||
-webkit-line-clamp: 2; |
||||
-webkit-box-orient: vertical; |
||||
white-space: normal; |
||||
word-wrap: break-word; |
||||
word-break: break-all; |
||||
height: 2.5rem; |
||||
} |
||||
|
||||
.orderDetail { |
||||
font-size: 0.26rem; |
||||
color: #666666; |
||||
text-align: left; |
||||
} |
||||
|
||||
.border-ceter { |
||||
width: 92%; |
||||
padding-left: 15px; |
||||
padding-right: 15px; |
||||
} |
||||
|
||||
.pay-button { |
||||
width: 88%; |
||||
height: 2.6rem; |
||||
position: relative; |
||||
background-color: red; |
||||
color: white; |
||||
|
||||
margin-left: 6%; |
||||
} |
||||
|
||||
ul view { |
||||
list-style: none; |
||||
font-size: 0.24rem; |
||||
} |
||||
|
||||
ul {} |
||||
|
||||
.track-rcol {} |
||||
|
||||
.track-list { |
||||
position: relative; |
||||
} |
||||
|
||||
.track-list view { |
||||
position: relative; |
||||
padding: 0 0 0.5rem 5px; |
||||
line-height: 0.3rem; |
||||
border-left: 1px solid #d9d9d9; |
||||
color: #999; |
||||
} |
||||
|
||||
.track-list view.first { |
||||
color: red; |
||||
padding-top: 0; |
||||
width: 100%; |
||||
text-align: left; |
||||
border-left: 1px solid #d9d9d9; |
||||
} |
||||
|
||||
.track-list view.node-icon { |
||||
position: absolute; |
||||
left: -6.5px; |
||||
border-radius: 50%; |
||||
width: 0.2rem; |
||||
height: 0.2rem; |
||||
top: 4px; |
||||
background-color: #b2b2b2; |
||||
} |
||||
|
||||
.track-list view.active .node-icon { |
||||
background-position: 0-72px; |
||||
background-color: #ea7c0a; |
||||
width: 0.3rem; |
||||
z-index: 2; |
||||
height: 0.3rem; |
||||
position: absolute; |
||||
left: -0.19rem; |
||||
top: 0; |
||||
border-radius: 50%; |
||||
} |
||||
|
||||
.track-list view.time { |
||||
margin-right: 20px; |
||||
position: relative; |
||||
top: 4px; |
||||
display: inline-block; |
||||
vertical-align: middle; |
||||
color: #999; |
||||
width: 100%; |
||||
text-align: left; |
||||
} |
||||
|
||||
.track-list view.txt { |
||||
position: relative; |
||||
display: inline-block; |
||||
vertical-align: top; |
||||
color: #999; |
||||
left: 0.2rem; |
||||
top: 0.04rem; |
||||
} |
||||
|
||||
.track-list view.first .time { |
||||
text-align: left; |
||||
width: 94%; |
||||
color: red; |
||||
} |
||||
|
||||
.track-list view.first .txt { |
||||
color: red; |
||||
text-align: left; |
||||
width: 94%; |
||||
} |
||||
|
||||
.no-express img { |
||||
width: 6rem; |
||||
margin: 0 auto; |
||||
display: block; |
||||
} |
||||
.message-text { |
||||
font-family: MicrosoftYaHei; |
||||
font-size: 1rem; |
||||
font-weight: normal; |
||||
font-stretch: normal; |
||||
line-height: 3rem; |
||||
letter-spacing: 0rem; |
||||
color: #333333; |
||||
width: 50%; |
||||
} |
||||
.fontblack { |
||||
color: #999999; |
||||
} |
||||
.img2 { |
||||
width: 0.81rem; |
||||
height: 0.8rem; |
||||
float: right; |
||||
} |
||||
.addressshow2 { |
||||
height: auto; |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
display: -webkit-box; |
||||
width: 75%; |
||||
-webkit-line-clamp: 2; |
||||
-webkit-box-orient: vertical; |
||||
white-space: normal; |
||||
word-wrap: break-word; |
||||
word-break: break-all; |
||||
font-size: 1rem; |
||||
} |
||||
.addressshow1 { |
||||
height: auto; |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
display: -webkit-box; |
||||
width: 75%; |
||||
-webkit-line-clamp: 1; |
||||
-webkit-box-orient: vertical; |
||||
white-space: normal; |
||||
word-wrap: break-word; |
||||
word-break: break-all; |
||||
font-size: 1rem; |
||||
} |
||||
.orderTitle { |
||||
font-size: 1rem; |
||||
color: #333333; |
||||
height: auto; |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
display: -webkit-box; |
||||
-webkit-line-clamp: 2; |
||||
-webkit-box-orient: vertical; |
||||
white-space: normal; |
||||
word-wrap: break-word; |
||||
word-break: break-all; |
||||
height: 2.5rem; |
||||
} |
||||
.orderDetail { |
||||
font-size: 0.26rem; |
||||
color: #666666; |
||||
text-align: left; |
||||
} |
||||
.border-ceter { |
||||
width: 92%; |
||||
padding-left: 15px; |
||||
padding-right: 15px; |
||||
} |
||||
.pay-button { |
||||
width: 88%; |
||||
height: 2.6rem; |
||||
position: relative; |
||||
background-color: red; |
||||
color: white; |
||||
.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; |
||||
} |
||||
|
||||
margin-left: 6%; |
||||
} |
||||
ul li { |
||||
list-style: none; |
||||
font-size: 0.24rem; |
||||
} |
||||
ul { |
||||
} |
||||
.track-rcol { |
||||
} |
||||
.track-list { |
||||
position: relative; |
||||
} |
||||
.track-list li { |
||||
position: relative; |
||||
padding: 0 0 0.5rem 5px; |
||||
line-height: 0.3rem; |
||||
border-left: 1px solid #d9d9d9; |
||||
color: #999; |
||||
} |
||||
.track-list li.first { |
||||
color: red; |
||||
padding-top: 0; |
||||
width: 100%; |
||||
text-align: left; |
||||
border-left: 1px solid #d9d9d9; |
||||
} |
||||
.track-list li .node-icon { |
||||
position: absolute; |
||||
left: -6.5px; |
||||
border-radius: 50%; |
||||
width: 0.2rem; |
||||
height: 0.2rem; |
||||
top: 4px; |
||||
background-color: #b2b2b2; |
||||
} |
||||
.track-list li.active .node-icon { |
||||
background-position: 0-72px; |
||||
background-color: #ea7c0a; |
||||
width: 0.3rem; |
||||
z-index: 2; |
||||
height: 0.3rem; |
||||
position: absolute; |
||||
left: -0.19rem; |
||||
top: 0; |
||||
border-radius: 50%; |
||||
} |
||||
.track-list li .time { |
||||
margin-right: 20px; |
||||
position: relative; |
||||
top: 4px; |
||||
display: inline-block; |
||||
vertical-align: middle; |
||||
color: #999; |
||||
width: 100%; |
||||
text-align: left; |
||||
} |
||||
.track-list li .txt { |
||||
position: relative; |
||||
display: inline-block; |
||||
vertical-align: top; |
||||
color: #999; |
||||
left: 0.2rem; |
||||
top: 0.04rem; |
||||
} |
||||
.track-list li.first .time { |
||||
text-align: left; |
||||
width: 94%; |
||||
color: red; |
||||
} |
||||
.track-list li.first .txt { |
||||
color: red; |
||||
text-align: left; |
||||
width: 94%; |
||||
} |
||||
.track-list li.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 { |
||||
width: 1px; |
||||
position: absolute; |
||||
left: -1.5px; |
||||
height: 0.5rem; |
||||
background-color: #d9d9d9; |
||||
} |
||||
</style> |
||||
.track-list view.finall .div-spilander { |
||||
width: 1px; |
||||
position: absolute; |
||||
left: -1.5px; |
||||
height: 0.5rem; |
||||
background-color: #d9d9d9; |
||||
} |
||||
</style> |
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -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> |
||||
|
@ -1,318 +1,330 @@
|
||||
<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> |
||||
<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"> |
||||
共{{ item.totalNum }}件商品,应支付 |
||||
<span class="money">¥{{ item.payPrice }}</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> |
||||
</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 }}件商品,应支付 |
||||
<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">--> |
||||
<!-- {{ 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> |
||||
<Loading :loaded="loaded" :loading="loading"></Loading> |
||||
<PriceChange |
||||
:change="change" |
||||
:orderInfo="orderInfo" |
||||
v-on:closechange="changeclose($event)" |
||||
v-on:savePrice="savePrice" |
||||
:status="status" |
||||
></PriceChange> |
||||
</div> |
||||
) |
||||
</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 ? "删除" : "取消" }}订单--> |
||||
<!-- </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> |
||||
</view> |
||||
</template> |
||||
<script> |
||||
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 { |
||||
name: "AdminOrderList", |
||||
components: { |
||||
PriceChange, |
||||
Loading, |
||||
DataFormat |
||||
}, |
||||
props: {}, |
||||
data: function() { |
||||
return { |
||||
current: "", |
||||
change: false, |
||||
types: 0, |
||||
where: { |
||||
page: 1, |
||||
limit: 5, |
||||
status: 0 |
||||
}, |
||||
list: [], |
||||
loaded: false, |
||||
loading: false, |
||||
orderInfo: {}, |
||||
status: "" |
||||
}; |
||||
}, |
||||
watch: { |
||||
"$yroute.query.types": function(newVal) { |
||||
let that = this; |
||||
if (newVal != undefined) { |
||||
that.where.status = newVal; |
||||
that.init(); |
||||
} |
||||
}, |
||||
types: function() { |
||||
this.getIndex(); |
||||
} |
||||
}, |
||||
mounted: function() { |
||||
let that = this; |
||||
that.where.status = that.$yroute.query.types; |
||||
that.current = ""; |
||||
that.getIndex(); |
||||
}, |
||||
onReachBottom() { |
||||
!that.loading && that.getIndex(); |
||||
}, |
||||
methods: { |
||||
goGoodsDeliver(item) { |
||||
this.$yrouter.push({ |
||||
path: "/pages/orderAdmin/GoodsDeliver/index", |
||||
query: { id: item.orderId } |
||||
}); |
||||
}, |
||||
more: function(index) { |
||||
if (this.current === index) this.current = ""; |
||||
else this.current = index; |
||||
}, |
||||
modify: function(item, status) { |
||||
this.change = true; |
||||
this.orderInfo = item; |
||||
this.status = status; |
||||
}, |
||||
changeclose: function(msg) { |
||||
this.change = msg; |
||||
}, |
||||
async savePrice(opt) { |
||||
let that = this, |
||||
data = {}, |
||||
price = opt.price.toString(), |
||||
refund_price = opt.refund_price.toString(), |
||||
refund_status = that.orderInfo.refundStatus, |
||||
remark = opt.remark; |
||||
data.orderId = that.orderInfo.orderId; |
||||
if (that.status == 0 && refund_status === 0) { |
||||
try { |
||||
await this.$validator({ |
||||
price: [ |
||||
required(required.message("金额")), |
||||
num(num.message("金额")) |
||||
] |
||||
}).validate({ price }); |
||||
} catch (e) { |
||||
return validatorDefaultCatch(e); |
||||
} |
||||
data.price = price; |
||||
setAdminOrderPrice(data).then( |
||||
function() { |
||||
that.change = false; |
||||
uni.showToast({ |
||||
title: "改价成功", |
||||
icon: "success", |
||||
duration: 2000 |
||||
}); |
||||
that.init(); |
||||
}, |
||||
function() { |
||||
that.change = false; |
||||
uni.showToast({ |
||||
title: "改价失败", |
||||
icon: "none", |
||||
duration: 2000 |
||||
}); |
||||
} |
||||
); |
||||
} else if (that.status == 0 && refund_status === 1) { |
||||
try { |
||||
await this.$validator({ |
||||
refund_price: [ |
||||
required(required.message("金额")), |
||||
num(num.message("金额")) |
||||
] |
||||
}).validate({ refund_price }); |
||||
} catch (e) { |
||||
return validatorDefaultCatch(e); |
||||
} |
||||
data.price = refund_price; |
||||
data.type = opt.type; |
||||
setOrderRefund(data).then( |
||||
res => { |
||||
that.change = false; |
||||
uni.showToast({ |
||||
title: res.msg, |
||||
icon: "none", |
||||
duration: 2000 |
||||
}); |
||||
that.init(); |
||||
}, |
||||
err => { |
||||
that.change = false; |
||||
uni.showToast({ |
||||
title: res.msg, |
||||
icon: "none", |
||||
duration: 2000 |
||||
}); |
||||
} |
||||
); |
||||
} else { |
||||
try { |
||||
await this.$validator({ |
||||
remark: [required(required.message("备注"))] |
||||
}).validate({ remark }); |
||||
} catch (e) { |
||||
return validatorDefaultCatch(e); |
||||
} |
||||
data.remark = remark; |
||||
setAdminOrderRemark(data).then( |
||||
res => { |
||||
that.change = false; |
||||
uni.showToast({ |
||||
title: res.msg, |
||||
icon: "none", |
||||
duration: 2000 |
||||
}); |
||||
that.init(); |
||||
}, |
||||
err => { |
||||
that.change = false; |
||||
uni.showToast({ |
||||
title: res.msg, |
||||
icon: "none", |
||||
duration: 2000 |
||||
}); |
||||
} |
||||
); |
||||
} |
||||
}, |
||||
init: function() { |
||||
this.list = []; |
||||
this.where.page = 1; |
||||
this.loaded = false; |
||||
this.loading = false; |
||||
this.getIndex(); |
||||
this.current = ""; |
||||
}, |
||||
getIndex: function() { |
||||
let that = this; |
||||
if (that.loading || that.loaded) return; |
||||
that.loading = true; |
||||
getAdminOrderList(that.where).then( |
||||
res => { |
||||
that.loading = false; |
||||
that.loaded = res.data.length < that.where.limit; |
||||
that.list.push.apply(that.list, res.data); |
||||
that.where.page = that.where.page + 1; |
||||
}, |
||||
err => { |
||||
uni.showToast({ |
||||
title: res.msg, |
||||
icon: "none", |
||||
duration: 2000 |
||||
}); |
||||
} |
||||
); |
||||
}, |
||||
changeStatus: function(val) { |
||||
if (this.where.status != val) { |
||||
this.where.status = val; |
||||
this.init(); |
||||
} |
||||
}, |
||||
toDetail: function(item) { |
||||
this.$yrouter.push({ |
||||
path: "/pages/orderAdmin/AdminOrder/index", |
||||
query: { oid: item.orderId } |
||||
}); |
||||
}, |
||||
offlinePay: function(item) { |
||||
setOfflinePay({ order_id: item.order_id }).then( |
||||
res => { |
||||
this.$uni.showToast({ title: res.msg, icon: "none", duration: 2000 }); |
||||
this.init(); |
||||
}, |
||||
error => { |
||||
this.$dialog.error(error.msg); |
||||
} |
||||
); |
||||
} |
||||
} |
||||
}; |
||||
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 { |
||||
name: "AdminOrderList", |
||||
components: { |
||||
PriceChange, |
||||
Loading, |
||||
DataFormat |
||||
}, |
||||
props: {}, |
||||
data: function() { |
||||
return { |
||||
current: "", |
||||
change: false, |
||||
types: 0, |
||||
where: { |
||||
page: 1, |
||||
limit: 5, |
||||
status: 0 |
||||
}, |
||||
list: [], |
||||
loaded: false, |
||||
loading: false, |
||||
orderInfo: {}, |
||||
status: "" |
||||
}; |
||||
}, |
||||
watch: { |
||||
"$yroute.query.types": function(newVal) { |
||||
let that = this; |
||||
if (newVal != undefined) { |
||||
that.where.status = newVal; |
||||
that.init(); |
||||
} |
||||
}, |
||||
types: function() { |
||||
this.getIndex(); |
||||
} |
||||
}, |
||||
mounted: function() { |
||||
let that = this; |
||||
that.where.status = that.$yroute.query.types; |
||||
that.current = ""; |
||||
that.getIndex(); |
||||
}, |
||||
onReachBottom() { |
||||
!that.loading && that.getIndex(); |
||||
}, |
||||
methods: { |
||||
goGoodsDeliver(item) { |
||||
this.$yrouter.push({ |
||||
path: "/pages/orderAdmin/GoodsDeliver/index", |
||||
query: { |
||||
id: item.orderId |
||||
} |
||||
}); |
||||
}, |
||||
more: function(index) { |
||||
if (this.current === index) this.current = ""; |
||||
else this.current = index; |
||||
}, |
||||
modify: function(item, status) { |
||||
this.change = true; |
||||
this.orderInfo = item; |
||||
this.status = status; |
||||
}, |
||||
changeclose: function(msg) { |
||||
this.change = msg; |
||||
}, |
||||
async savePrice(opt) { |
||||
let that = this, |
||||
data = {}, |
||||
price = opt.price.toString(), |
||||
refund_price = opt.refund_price.toString(), |
||||
refund_status = that.orderInfo.refundStatus, |
||||
remark = opt.remark; |
||||
data.orderId = that.orderInfo.orderId; |
||||
if (that.status == 0 && refund_status === 0) { |
||||
try { |
||||
await this.$validator({ |
||||
price: [ |
||||
required(required.message("金额")), |
||||
num(num.message("金额")) |
||||
] |
||||
}).validate({ |
||||
price |
||||
}); |
||||
} catch (e) { |
||||
return validatorDefaultCatch(e); |
||||
} |
||||
data.price = price; |
||||
setAdminOrderPrice(data).then( |
||||
function() { |
||||
that.change = false; |
||||
uni.showToast({ |
||||
title: "改价成功", |
||||
icon: "success", |
||||
duration: 2000 |
||||
}); |
||||
that.init(); |
||||
}, |
||||
function() { |
||||
that.change = false; |
||||
uni.showToast({ |
||||
title: "改价失败", |
||||
icon: "none", |
||||
duration: 2000 |
||||
}); |
||||
} |
||||
); |
||||
} else if (that.status == 0 && refund_status === 1) { |
||||
try { |
||||
await this.$validator({ |
||||
refund_price: [ |
||||
required(required.message("金额")), |
||||
num(num.message("金额")) |
||||
] |
||||
}).validate({ |
||||
refund_price |
||||
}); |
||||
} catch (e) { |
||||
return validatorDefaultCatch(e); |
||||
} |
||||
data.price = refund_price; |
||||
data.type = opt.type; |
||||
setOrderRefund(data).then( |
||||
res => { |
||||
that.change = false; |
||||
uni.showToast({ |
||||
title: res.msg, |
||||
icon: "none", |
||||
duration: 2000 |
||||
}); |
||||
that.init(); |
||||
}, |
||||
err => { |
||||
that.change = false; |
||||
uni.showToast({ |
||||
title: res.msg, |
||||
icon: "none", |
||||
duration: 2000 |
||||
}); |
||||
} |
||||
); |
||||
} else { |
||||
try { |
||||
await this.$validator({ |
||||
remark: [required(required.message("备注"))] |
||||
}).validate({ |
||||
remark |
||||
}); |
||||
} catch (e) { |
||||
return validatorDefaultCatch(e); |
||||
} |
||||
data.remark = remark; |
||||
setAdminOrderRemark(data).then( |
||||
res => { |
||||
that.change = false; |
||||
uni.showToast({ |
||||
title: res.msg, |
||||
icon: "none", |
||||
duration: 2000 |
||||
}); |
||||
that.init(); |
||||
}, |
||||
err => { |
||||
that.change = false; |
||||
uni.showToast({ |
||||
title: res.msg, |
||||
icon: "none", |
||||
duration: 2000 |
||||
}); |
||||
} |
||||
); |
||||
} |
||||
}, |
||||
init: function() { |
||||
this.list = []; |
||||
this.where.page = 1; |
||||
this.loaded = false; |
||||
this.loading = false; |
||||
this.getIndex(); |
||||
this.current = ""; |
||||
}, |
||||
getIndex: function() { |
||||
let that = this; |
||||
if (that.loading || that.loaded) return; |
||||
that.loading = true; |
||||
getAdminOrderList(that.where).then( |
||||
res => { |
||||
that.loading = false; |
||||
that.loaded = res.data.length < that.where.limit; |
||||
that.list.push.apply(that.list, res.data); |
||||
that.where.page = that.where.page + 1; |
||||
}, |
||||
err => { |
||||
uni.showToast({ |
||||
title: res.msg, |
||||
icon: "none", |
||||
duration: 2000 |
||||
}); |
||||
} |
||||
); |
||||
}, |
||||
changeStatus: function(val) { |
||||
if (this.where.status != val) { |
||||
this.where.status = val; |
||||
this.init(); |
||||
} |
||||
}, |
||||
toDetail: function(item) { |
||||
this.$yrouter.push({ |
||||
path: "/pages/orderAdmin/AdminOrder/index", |
||||
query: { |
||||
oid: item.orderId |
||||
} |
||||
}); |
||||
}, |
||||
offlinePay: function(item) { |
||||
setOfflinePay({ |
||||
order_id: item.order_id |
||||
}).then( |
||||
res => { |
||||
uni.showToast({ |
||||
title: res.msg, |
||||
icon: "none", |
||||
duration: 2000 |
||||
}); |
||||
this.init(); |
||||
}, |
||||
error => { |
||||
uni.showToast({ |
||||
title: error.msg, |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}); |
||||
} |
||||
); |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
|
||||
<style> |
||||
</style> |
||||
</style> |
||||
|
@ -1,161 +1,195 @@
|
||||
<template> |
||||
<div class="OrderCancellation"> |
||||
<div class="header"></div> |
||||
<div class="whiteBg"> |
||||
<div 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> |
||||
<WriteOff :iShidden="iShidden" :orderInfo="orderInfo" @cancel="cancel" @confirm="confirm"></WriteOff> |
||||
</div> |
||||
<view class="OrderCancellation"> |
||||
<view class="header"></view> |
||||
<view class="whiteBg"> |
||||
<view class="input"> |
||||
<input type="number" placeholder="0" v-model="verify_code" /> |
||||
</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> |
||||
</view> |
||||
</template> |
||||
<style scoped> |
||||
.OrderCancellation .header { |
||||
background: url("https://h5.dayouqiantu.cn/static/images/writeOffBg.jpg") no-repeat; |
||||
width: 100%; |
||||
height: 3rem; |
||||
background-size: 100% 100%; |
||||
} |
||||
.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 { |
||||
width: 5.8rem; |
||||
margin: 0 auto; |
||||
border-bottom: 0.01rem solid #eee; |
||||
} |
||||
.OrderCancellation .whiteBg .input input { |
||||
padding-bottom: 0.25rem; |
||||
font-size: 0.6rem; |
||||
color: #282828; |
||||
width: 100%; |
||||
text-align: center; |
||||
} |
||||
.OrderCancellation .whiteBg .bnt { |
||||
font-size: 0.32rem; |
||||
color: #fff; |
||||
width: 5.8rem; |
||||
height: 0.86rem; |
||||
border-radius: 0.43rem; |
||||
background-image: linear-gradient(to right, #f67a38 0%, #f11b09 100%); |
||||
background-image: -webkit-linear-gradient(to right, #f67a38 0%, #f11b09 100%); |
||||
background-image: -moz-linear-gradient(to right, #f67a38 0%, #f11b09 100%); |
||||
text-align: center; |
||||
line-height: 0.86rem; |
||||
margin: 0.55rem auto 0 auto; |
||||
} |
||||
.OrderCancellation .scan { |
||||
width: 3rem; |
||||
height: 3rem; |
||||
margin: 1.1rem auto 0 auto; |
||||
} |
||||
.OrderCancellation .scan img { |
||||
width: 100%; |
||||
height: 100%; |
||||
display: block; |
||||
} |
||||
.OrderCancellation .header { |
||||
background: url("https://h5.dayouqiantu.cn/static/images/writeOffBg.jpg") no-repeat; |
||||
width: 100%; |
||||
height: 3rem; |
||||
background-size: 100% 100%; |
||||
} |
||||
|
||||
.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 { |
||||
width: 5.8rem; |
||||
margin: 0 auto; |
||||
border-bottom: 0.01rem solid #eee; |
||||
} |
||||
|
||||
.OrderCancellation .whiteBg .input input { |
||||
padding-bottom: 0.25rem; |
||||
font-size: 0.6rem; |
||||
color: #282828; |
||||
width: 100%; |
||||
text-align: center; |
||||
} |
||||
|
||||
.OrderCancellation .whiteBg .bnt { |
||||
font-size: 0.32rem; |
||||
color: #fff; |
||||
width: 5.8rem; |
||||
height: 0.86rem; |
||||
border-radius: 0.43rem; |
||||
background-image: linear-gradient(to right, #f67a38 0%, #f11b09 100%); |
||||
background-image: -webkit-linear-gradient(to right, #f67a38 0%, #f11b09 100%); |
||||
background-image: -moz-linear-gradient(to right, #f67a38 0%, #f11b09 100%); |
||||
text-align: center; |
||||
line-height: 0.86rem; |
||||
margin: 0.55rem auto 0 auto; |
||||
} |
||||
|
||||
.OrderCancellation .scan { |
||||
width: 3rem; |
||||
height: 3rem; |
||||
margin: 1.1rem auto 0 auto; |
||||
} |
||||
|
||||
.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 { |
||||
name: NAME, |
||||
components: { |
||||
WriteOff |
||||
}, |
||||
props: {}, |
||||
data: function() { |
||||
return { |
||||
iShidden: true, |
||||
iswechat: isWeixin(), |
||||
orderInfo: {}, |
||||
verify_code: "" |
||||
}; |
||||
}, |
||||
mounted: function() {}, |
||||
methods: { |
||||
cancel: function(res) { |
||||
this.iShidden = res; |
||||
}, |
||||
confirm: function() { |
||||
orderVerific(this.verify_code, 1) |
||||
.then(res => { |
||||
this.iShidden = true; |
||||
this.verify_code = ""; |
||||
uni.showToast({ |
||||
title: res.msg, |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}); |
||||
}) |
||||
.catch(err => { |
||||
uni.showToast({ |
||||
title: err.msg || err.response.data.msg, |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}); |
||||
|
||||
export default { |
||||
name: NAME, |
||||
components: { |
||||
WriteOff |
||||
}, |
||||
props: {}, |
||||
data: function() { |
||||
return { |
||||
iShidden: true, |
||||
iswechat: isWeixin(), |
||||
orderInfo: {}, |
||||
verify_code: "" |
||||
}; |
||||
}, |
||||
mounted: function() {}, |
||||
methods: { |
||||
cancel: function(res) { |
||||
this.iShidden = res; |
||||
}, |
||||
confirm: function() { |
||||
orderVerific(this.verify_code, 1) |
||||
.then(res => { |
||||
this.iShidden = true; |
||||
this.verify_code = ""; |
||||
this.$uni.showToast({ title: res.msg, icon: 'none', duration: 2000 }); |
||||
}) |
||||
.catch(res => { |
||||
this.$dialog.error(res.msg); |
||||
}); |
||||
}, |
||||
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: "查询中" }); |
||||
orderVerific(this.verify_code, 0) |
||||
.then(res => { |
||||
uni.hideLoading(); |
||||
this.orderInfo = res.data; |
||||
this.iShidden = false; |
||||
}) |
||||
.catch(() => { |
||||
uni.hideLoading(); |
||||
}); |
||||
}, |
||||
openQRCode: function() { |
||||
let that = this; |
||||
// wechatEvevt("scanQRCode", { |
||||
// needResult: 1, |
||||
// scanType: ["qrCode", "barCode"] |
||||
// }) |
||||
// .then(res => { |
||||
// if (res.resultStr) { |
||||
// that.verify_code = res.resultStr; |
||||
// that.storeCancellation(); |
||||
// } else { |
||||
// uni.showToast({ |
||||
// title: '没有扫描到什么!', |
||||
// icon: "none", |
||||
// duration: 2000 |
||||
// }); |
||||
// } |
||||
// }) |
||||
// .catch(res => { |
||||
// if (res.is_ready) { |
||||
// res.wx.scanQRCode({ |
||||
// needResult: 1, |
||||
// scanType: ["qrCode", "barCode"], |
||||
// success: function(res) { |
||||
// that.verify_code = res.resultStr; |
||||
// that.storeCancellation(); |
||||
// }, |
||||
// fail: function(res) { |
||||
// if (res.errMsg == "scanQRCode:permission denied") { |
||||
// uni.showToast({ |
||||
// title: '没有权限', |
||||
// icon: "none", |
||||
// duration: 2000 |
||||
// }); |
||||
// } |
||||
// } |
||||
// }); |
||||
// } |
||||
// }); |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
}); |
||||
}, |
||||
storeCancellation: function() { |
||||
let ref = /[0-9]{12}/; |
||||
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(); |
||||
this.orderInfo = res.data; |
||||
this.iShidden = false; |
||||
}) |
||||
.catch(() => { |
||||
uni.hideLoading(); |
||||
}); |
||||
}, |
||||
openQRCode: function() { |
||||
let that = this; |
||||
// wechatEvevt("scanQRCode", { |
||||
// needResult: 1, |
||||
// scanType: ["qrCode", "barCode"] |
||||
// }) |
||||
// .then(res => { |
||||
// if (res.resultStr) { |
||||
// that.verify_code = res.resultStr; |
||||
// that.storeCancellation(); |
||||
// } else { |
||||
// uni.showToast({ |
||||
// title: '没有扫描到什么!', |
||||
// icon: "none", |
||||
// duration: 2000 |
||||
// }); |
||||
// } |
||||
// }) |
||||
// .catch(res => { |
||||
// if (res.is_ready) { |
||||
// res.wx.scanQRCode({ |
||||
// needResult: 1, |
||||
// scanType: ["qrCode", "barCode"], |
||||
// success: function(res) { |
||||
// that.verify_code = res.resultStr; |
||||
// that.storeCancellation(); |
||||
// }, |
||||
// fail: function(res) { |
||||
// if (res.errMsg == "scanQRCode:permission denied") { |
||||
// uni.showToast({ |
||||
// title: '没有权限', |
||||
// icon: "none", |
||||
// duration: 2000 |
||||
// }); |
||||
// } |
||||
// } |
||||
// }); |
||||
// } |
||||
// }); |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
|
@ -1,72 +1,78 @@
|
||||
<template> |
||||
<div class="quality-recommend"> |
||||
<div 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" /> |
||||
</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> |
||||
<Promotion-good :benefit="goodsList"></Promotion-good> |
||||
</div> |
||||
<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> |
||||
<image :src="item.img" class="slide-image" /> |
||||
</swiper-item> |
||||
</block> |
||||
</swiper> |
||||
</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> |
||||
</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 { |
||||
name: "GoodsPromotion", |
||||
components: { |
||||
// swiper, |
||||
// swiperSlide, |
||||
PromotionGood |
||||
}, |
||||
props: {}, |
||||
data: function() { |
||||
return { |
||||
imgUrls: [], |
||||
goodsList: [], |
||||
RecommendSwiper: { |
||||
pagination: { |
||||
el: ".swiper-pagination", |
||||
clickable: true |
||||
}, |
||||
autoplay: { |
||||
disableOnInteraction: false, |
||||
delay: 2000 |
||||
}, |
||||
loop: true, |
||||
speed: 1000, |
||||
observer: true, |
||||
observeParents: true |
||||
} |
||||
}; |
||||
}, |
||||
mounted: function() { |
||||
this.getIndexGroomList(); |
||||
}, |
||||
methods: { |
||||
getIndexGroomList: function() { |
||||
let that = this; |
||||
getGroomList(4) |
||||
.then(res => { |
||||
that.imgUrls = res.data.banner; |
||||
that.goodsList = res.data.list; |
||||
}) |
||||
.catch(function(res) { |
||||
this.$dialog.toast({ mes: res.msg }); |
||||
}); |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
import PromotionGood from "@/components/PromotionGood"; |
||||
import { |
||||
getGroomList |
||||
} from "@/api/store"; |
||||
export default { |
||||
name: "GoodsPromotion", |
||||
components: { |
||||
// swiper, |
||||
// swiperSlide, |
||||
PromotionGood |
||||
}, |
||||
props: {}, |
||||
data: function() { |
||||
return { |
||||
imgUrls: [], |
||||
goodsList: [], |
||||
RecommendSwiper: { |
||||
pagination: { |
||||
el: ".swiper-pagination", |
||||
clickable: true |
||||
}, |
||||
autoplay: { |
||||
disableOnInteraction: false, |
||||
delay: 2000 |
||||
}, |
||||
loop: true, |
||||
speed: 1000, |
||||
observer: true, |
||||
observeParents: true |
||||
} |
||||
}; |
||||
}, |
||||
mounted: function() { |
||||
this.getIndexGroomList(); |
||||
}, |
||||
methods: { |
||||
getIndexGroomList: function() { |
||||
let that = this; |
||||
getGroomList(4) |
||||
.then(res => { |
||||
that.imgUrls = res.data.banner; |
||||
that.goodsList = res.data.list; |
||||
}) |
||||
.catch((err) => { |
||||
uni.showToast({ |
||||
title: err.msg || err.response.data.msg, |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}); |
||||
}); |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
|
@ -1,249 +1,242 @@
|
||||
<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)" |
||||
> |
||||
一级({{ first }}) |
||||
</div> |
||||
<div |
||||
class="item" |
||||
:class="screen.grade == 1 ? 'on' : ''" |
||||
@click="checkGrade(1)" |
||||
> |
||||
二级({{ second }}) |
||||
</div> |
||||
</div> |
||||
<div class="search acea-row row-between-wrapper"> |
||||
<form @submit.prevent="submitForm"> |
||||
<div class="input"> |
||||
<input placeholder="点击搜索会员名称" v-model="screen.keyword" /> |
||||
<span class="iconfont icon-guanbi"></span> |
||||
</div> |
||||
</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')"> |
||||
团队排序 |
||||
<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')"> |
||||
金额排序 |
||||
<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')"> |
||||
订单排序 |
||||
<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> |
||||
<Loading :loaded="loaded" :loading="loading"></Loading> |
||||
</div> |
||||
<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 }}) |
||||
</view> |
||||
<view class="item" :class="screen.grade == 1 ? 'on' : ''" @click="checkGrade(1)"> |
||||
二级({{ second }}) |
||||
</view> |
||||
</view> |
||||
<view class="search acea-row row-between-wrapper"> |
||||
<form @submit.prevent="submitForm"> |
||||
<view class="input"> |
||||
<input placeholder="点击搜索会员名称" v-model="screen.keyword" /> |
||||
<text class="iconfont icon-guanbi"></text> |
||||
</view> |
||||
</form> |
||||
<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')"> |
||||
团队排序 |
||||
<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')"> |
||||
金额排序 |
||||
<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')"> |
||||
订单排序 |
||||
<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> |
||||
</view> |
||||
</template> |
||||
<script> |
||||
import { getSpreadUser } from "@/api/user"; |
||||
import Loading from "@/components/Loading"; |
||||
export default { |
||||
name: "PromoterList", |
||||
components: { |
||||
Loading |
||||
}, |
||||
props: {}, |
||||
data: function() { |
||||
return { |
||||
fixedState: false, |
||||
screen: { |
||||
page: 1, |
||||
limit: 15, |
||||
grade: 0, |
||||
keyword: "", |
||||
sort: "" |
||||
}, |
||||
childCount: 2, |
||||
numberCount: 2, |
||||
orderCount: 2, |
||||
loaded: false, |
||||
loading: false, |
||||
spreadList: [], |
||||
loadTitle: "", |
||||
first: "", |
||||
second: "" |
||||
}; |
||||
}, |
||||
mounted: function() { |
||||
this.getSpreadUsers(); |
||||
}, |
||||
onReachBottom() { |
||||
!this.loading && this.getSpreadUsers(); |
||||
}, |
||||
watch: { |
||||
"screen.sort": function() { |
||||
this.screen.page = 0; |
||||
this.loaded = false; |
||||
this.loading = false; |
||||
this.spreadList = []; |
||||
this.getSpreadUsers(); |
||||
} |
||||
}, |
||||
methods: { |
||||
handleScroll: function() { |
||||
// var scrollTop = |
||||
// document.documentElement.scrollTop || document.body.scrollTop; |
||||
// var offsetTop = document.querySelector(".header").clientHeight; |
||||
// if (scrollTop >= offsetTop) { |
||||
// this.fixedState = true; |
||||
// } else { |
||||
// this.fixedState = false; |
||||
// } |
||||
}, |
||||
submitForm: function() { |
||||
this.screen.page = 0; |
||||
this.loaded = false; |
||||
this.loading = false; |
||||
this.spreadList = []; |
||||
this.getSpreadUsers(); |
||||
}, |
||||
getSpreadUsers: function() { |
||||
let that = this, |
||||
screen = that.screen; |
||||
if (that.loaded || that.loading) return; |
||||
that.loading = true; |
||||
getSpreadUser(screen).then( |
||||
res => { |
||||
that.loading = false; |
||||
that.spreadList.push.apply(that.spreadList, res.data.list); |
||||
that.loaded = res.data.list.length < that.screen.limit; //判断所有数据是否加载完成; |
||||
that.loadTitle = that.loaded ? "人家是有底线的" : "上拉加载更多"; |
||||
that.screen.page = that.screen.page + 1; |
||||
that.first = res.data.total; |
||||
that.second = res.data.totalLevel; |
||||
}, |
||||
error => { |
||||
that.$dialog.message(error.msg); |
||||
}, |
||||
300 |
||||
); |
||||
}, |
||||
checkGrade: function(val) { |
||||
if (val == this.screen.grade) return; |
||||
else { |
||||
this.screen.page = 1; |
||||
this.screen.grade = val; |
||||
this.loading = false; |
||||
this.loaded = false; |
||||
this.spreadList = []; |
||||
this.getSpreadUsers(); |
||||
} |
||||
}, |
||||
sort: function(types) { |
||||
let that = this; |
||||
switch (types) { |
||||
case "childCount": |
||||
if (that.childCount == 2) { |
||||
that.childCount = 1; |
||||
that.orderCount = 2; |
||||
that.numberCount = 2; |
||||
that.screen.sort = "childCount DESC"; |
||||
} else if (that.childCount == 1) { |
||||
that.childCount = 3; |
||||
that.orderCount = 2; |
||||
that.numberCount = 2; |
||||
that.screen.sort = "childCount ASC"; |
||||
} else if (that.childCount == 3) { |
||||
that.childCount = 2; |
||||
that.orderCount = 2; |
||||
that.numberCount = 2; |
||||
that.screen.sort = ""; |
||||
} |
||||
break; |
||||
case "numberCount": |
||||
if (that.numberCount == 2) { |
||||
that.numberCount = 1; |
||||
that.orderCount = 2; |
||||
that.childCount = 2; |
||||
that.screen.sort = "numberCount DESC"; |
||||
} else if (that.numberCount == 1) { |
||||
that.numberCount = 3; |
||||
that.orderCount = 2; |
||||
that.childCount = 2; |
||||
that.screen.sort = "numberCount ASC"; |
||||
} else if (that.numberCount == 3) { |
||||
that.numberCount = 2; |
||||
that.orderCount = 2; |
||||
that.childCount = 2; |
||||
that.screen.sort = ""; |
||||
} |
||||
break; |
||||
case "orderCount": |
||||
if (that.orderCount == 2) { |
||||
that.orderCount = 1; |
||||
that.numberCount = 2; |
||||
that.childCount = 2; |
||||
that.screen.sort = "orderCount DESC"; |
||||
} else if (that.orderCount == 1) { |
||||
that.orderCount = 3; |
||||
that.numberCount = 2; |
||||
that.childCount = 2; |
||||
that.screen.sort = "orderCount ASC"; |
||||
} else if (that.orderCount == 3) { |
||||
that.orderCount = 2; |
||||
that.numberCount = 2; |
||||
that.childCount = 2; |
||||
that.screen.sort = ""; |
||||
} |
||||
break; |
||||
default: |
||||
that.screen.sort = ""; |
||||
} |
||||
} |
||||
} |
||||
}; |
||||
import { |
||||
getSpreadUser |
||||
} from "@/api/user"; |
||||
import Loading from "@/components/Loading"; |
||||
export default { |
||||
name: "PromoterList", |
||||
components: { |
||||
Loading |
||||
}, |
||||
props: {}, |
||||
data: function() { |
||||
return { |
||||
fixedState: false, |
||||
screen: { |
||||
page: 1, |
||||
limit: 15, |
||||
grade: 0, |
||||
keyword: "", |
||||
sort: "" |
||||
}, |
||||
childCount: 2, |
||||
numberCount: 2, |
||||
orderCount: 2, |
||||
loaded: false, |
||||
loading: false, |
||||
spreadList: [], |
||||
loadTitle: "", |
||||
first: "", |
||||
second: "" |
||||
}; |
||||
}, |
||||
mounted: function() { |
||||
this.getSpreadUsers(); |
||||
}, |
||||
onReachBottom() { |
||||
!this.loading && this.getSpreadUsers(); |
||||
}, |
||||
watch: { |
||||
"screen.sort": function() { |
||||
this.screen.page = 0; |
||||
this.loaded = false; |
||||
this.loading = false; |
||||
this.spreadList = []; |
||||
this.getSpreadUsers(); |
||||
} |
||||
}, |
||||
methods: { |
||||
handleScroll: function() { |
||||
// var scrollTop = |
||||
// document.documentElement.scrollTop || document.body.scrollTop; |
||||
// var offsetTop = document.querySelector(".header").clientHeight; |
||||
// if (scrollTop >= offsetTop) { |
||||
// this.fixedState = true; |
||||
// } else { |
||||
// this.fixedState = false; |
||||
// } |
||||
}, |
||||
submitForm: function() { |
||||
this.screen.page = 0; |
||||
this.loaded = false; |
||||
this.loading = false; |
||||
this.spreadList = []; |
||||
this.getSpreadUsers(); |
||||
}, |
||||
getSpreadUsers: function() { |
||||
let that = this, |
||||
screen = that.screen; |
||||
if (that.loaded || that.loading) return; |
||||
that.loading = true; |
||||
getSpreadUser(screen).then( |
||||
res => { |
||||
that.loading = false; |
||||
that.spreadList.push.apply(that.spreadList, res.data.list); |
||||
that.loaded = res.data.list.length < that.screen.limit; //判断所有数据是否加载完成; |
||||
that.loadTitle = that.loaded ? "人家是有底线的" : "上拉加载更多"; |
||||
that.screen.page = that.screen.page + 1; |
||||
that.first = res.data.total; |
||||
that.second = res.data.totalLevel; |
||||
}, |
||||
err => { |
||||
uni.showToast({ |
||||
title: err.msg || err.response.data.msg, |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}); |
||||
}, |
||||
300 |
||||
); |
||||
}, |
||||
checkGrade: function(val) { |
||||
if (val == this.screen.grade) return; |
||||
else { |
||||
this.screen.page = 1; |
||||
this.screen.grade = val; |
||||
this.loading = false; |
||||
this.loaded = false; |
||||
this.spreadList = []; |
||||
this.getSpreadUsers(); |
||||
} |
||||
}, |
||||
sort: function(types) { |
||||
let that = this; |
||||
switch (types) { |
||||
case "childCount": |
||||
if (that.childCount == 2) { |
||||
that.childCount = 1; |
||||
that.orderCount = 2; |
||||
that.numberCount = 2; |
||||
that.screen.sort = "childCount DESC"; |
||||
} else if (that.childCount == 1) { |
||||
that.childCount = 3; |
||||
that.orderCount = 2; |
||||
that.numberCount = 2; |
||||
that.screen.sort = "childCount ASC"; |
||||
} else if (that.childCount == 3) { |
||||
that.childCount = 2; |
||||
that.orderCount = 2; |
||||
that.numberCount = 2; |
||||
that.screen.sort = ""; |
||||
} |
||||
break; |
||||
case "numberCount": |
||||
if (that.numberCount == 2) { |
||||
that.numberCount = 1; |
||||
that.orderCount = 2; |
||||
that.childCount = 2; |
||||
that.screen.sort = "numberCount DESC"; |
||||
} else if (that.numberCount == 1) { |
||||
that.numberCount = 3; |
||||
that.orderCount = 2; |
||||
that.childCount = 2; |
||||
that.screen.sort = "numberCount ASC"; |
||||
} else if (that.numberCount == 3) { |
||||
that.numberCount = 2; |
||||
that.orderCount = 2; |
||||
that.childCount = 2; |
||||
that.screen.sort = ""; |
||||
} |
||||
break; |
||||
case "orderCount": |
||||
if (that.orderCount == 2) { |
||||
that.orderCount = 1; |
||||
that.numberCount = 2; |
||||
that.childCount = 2; |
||||
that.screen.sort = "orderCount DESC"; |
||||
} else if (that.orderCount == 1) { |
||||
that.orderCount = 3; |
||||
that.numberCount = 2; |
||||
that.childCount = 2; |
||||
that.screen.sort = "orderCount ASC"; |
||||
} else if (that.orderCount == 3) { |
||||
that.orderCount = 2; |
||||
that.numberCount = 2; |
||||
that.childCount = 2; |
||||
that.screen.sort = ""; |
||||
} |
||||
break; |
||||
default: |
||||
that.screen.sort = ""; |
||||
} |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue