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

This commit is contained in:
gaoxs
2020-03-16 15:51:08 +08:00
parent fa289d66a8
commit 95845779db
422 changed files with 34024 additions and 32630 deletions
+10 -5
View File
@@ -6,13 +6,18 @@
onShow: function() {
console.log('App Show')
},
onHide: function() {
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
<style lang="less">
/*每个页面公共css */
@import "./assets/iconfont/iconfont.css";
@import "./assets/css/base.less";
@import "./assets/css/reset.less";
@import "./assets/css/style.less";
</style>
+2
View File
@@ -0,0 +1,2 @@
@charset "UTF-8";.font-color-red{color:#73CBB6 !important}.bg-color-red{background-color:#73CBB6 !important}.icon-color{color:#73CBB6}.cart-color{color:#73CBB6 !important;border:1px solid #73CBB6 !important}.padding20{padding:20rpx}.pad20{padding:0 20rpx}.padding30{padding:30rpx}.pad30{padding:0 30rpx}.acea-row{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.acea-row.row-middle{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.acea-row.row-top{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}.acea-row.row-bottom{-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end}.acea-row.row-center{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.acea-row.row-right{-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}.acea-row.row-left{-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}.acea-row.row-between{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.acea-row.row-around{-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around}.acea-row.row-column-around{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around}.acea-row.row-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.acea-row.row-column-between{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.acea-row.row-center-wrapper{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.acea-row.row-between-wrapper{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.slider-banner{position:relative;width:100%;overflow:hidden}.slider-banner .swiper-container{height:100%}.slider-banner image{display:block;width:100%;height:100%}.start{width:122rpx;height:30rpx;background-image:url("https://h5.dayouqiantu.cn/static/images/start.png");background-repeat:no-repeat;-webkit-background-size:122rpx auto;background-size:122rpx auto}.start.star5{background-position:0 3rpx}.start.star4{background-position:0 -30rpx}.start.star3{background-position:0 -70rpx}.start.star2{background-position:0 -105rpx}.start.star1{background-position:0 -140rpx}.start.star0{background-position:0 -175rpx}.checkbox-wrapper{position:relative}.checkbox-wrapper input{display:none}.checkbox-wrapper .icon{position:absolute;left:0;top:50%;display:inline-block;width:18px;height:18px;border:1px solid #cccccc;-webkit-border-radius:50%;border-radius:50%;-webkit-transform:translate(0, -50%);-ms-transform:translate(0, -50%);transform:translate(0, -50%)}.checkbox-wrapper input:checked+.icon{background-color:#e93323;border-color:#e93323;background-image:url("https://h5.dayouqiantu.cn/static/images/enter.png");-webkit-background-size:21rpx 15rpx;background-size:21rpx 15rpx;background-repeat:no-repeat;background-position:center center}.Loads{height:80rpx;font-size:25rpx;color:#000}.Loads .iconfont{font-size:30rpx;margin-right:10rpx;height:32rpx;line-height:32rpx}@-webkit-keyframes load{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.loadingpic{-webkit-animation:load 3s linear 1s infinite;animation:load 3s linear 1s infinite}.loading{-webkit-animation:load linear 1s infinite;animation:load linear 1s infinite}
/*# sourceMappingURL=./base.css.map */
+1
View File
@@ -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]}
+21 -21
View File
@@ -17,19 +17,19 @@
}
/* padding20 */
.padding20 {
padding: 0.2*3.125rem;
padding: 0.2*100rpx;
}
/* pad20 */
.pad20 {
padding: 0 0.2*3.125rem;
padding: 0 0.2*100rpx;
}
/* padding30 */
.padding30 {
padding: 0.3*3.125rem;
padding: 0.3*100rpx;
}
/*pad30 */
.pad30 {
padding: 0 0.3*3.125rem;
padding: 0 0.3*100rpx;
}
/* layout */
.acea-row {
@@ -96,35 +96,35 @@
.slider-banner .swiper-container {
height: 100%;
}
.slider-banner img {
.slider-banner image{
display: block;
width: 100%;
height: 100%;
}
.start {
width: 1.22*3.125rem;
height: 0.3*3.125rem;
width: 1.22*100rpx;
height: 0.3*100rpx;
background-image: url("https://h5.dayouqiantu.cn/static/images/start.png");
background-repeat: no-repeat;
background-size: 1.22*3.125rem auto;
background-size: 1.22*100rpx auto;
}
.start.star5 {
background-position: 0 0.03*3.125rem;
background-position: 0 0.03*100rpx;
}
.start.star4 {
background-position: 0 -0.3*3.125rem;
background-position: 0 -0.3*100rpx;
}
.start.star3 {
background-position: 0 -0.7*3.125rem;
background-position: 0 -0.7*100rpx;
}
.start.star2 {
background-position: 0 -1.05*3.125rem;
background-position: 0 -1.05*100rpx;
}
.start.star1 {
background-position: 0 -1.4*3.125rem;
background-position: 0 -1.4*100rpx;
}
.start.star0 {
background-position: 0 -1.75*3.125rem;
background-position: 0 -1.75*100rpx;
}
/* 单选框和多选框 */
.checkbox-wrapper {
@@ -148,20 +148,20 @@
background-color: #e93323;
border-color: #e93323;
background-image: url("https://h5.dayouqiantu.cn/static/images/enter.png");
background-size: 0.21*3.125rem 0.15*3.125rem;
background-size: 0.21*100rpx 0.15*100rpx;
background-repeat: no-repeat;
background-position: center center;
}
.Loads {
height: 0.8*3.125rem;
font-size: 0.25*3.125rem;
height: 0.8*100rpx;
font-size: 0.25*100rpx;
color: #000;
}
.Loads .iconfont {
font-size: 0.3*3.125rem;
margin-right: 0.1*3.125rem;
height: 0.32*3.125rem;
line-height: 0.32*3.125rem;
font-size: 0.3*100rpx;
margin-right: 0.1*100rpx;
height: 0.32*100rpx;
line-height: 0.32*100rpx;
}
/*加载动画*/
@keyframes load {
+2
View File
@@ -0,0 +1,2 @@
input{line-height:normal;-webkit-box-sizing:border-box;box-sizing:border-box}@font-face{font-family:'GuildfordProBook 5';src:url('https://h5.dayouqiantu.cn/static/iconfont/GuildfordProBook5.otf')}[v-cloak]{display:none}.iconfont{font-size:36rpx}@media (-webkit-min-device-pixel-ratio:1.5),(min-device-pixel-ratio:1.5){.border-1px::after{-webkit-transform:scaleY(.7);-ms-transform:scaleY(.7);transform:scaleY(.7)}.border-1px::before{-webkit-transform:scaleY(.7);-ms-transform:scaleY(.7);transform:scaleY(.7)}}@media (-webkit-min-device-pixel-ratio:2),(min-device-pixel-ratio:2){.border-1px::after{-webkit-transform:scaleY(.5);-ms-transform:scaleY(.5);transform:scaleY(.5)}.border-1px::before{-webkit-transform:scaleY(.5);-ms-transform:scaleY(.5);transform:scaleY(.5)}}@media (-webkit-min-device-pixel-ratio:3),(min-device-pixel-ratio:3){.border-1px::after{-webkit-transform:scaleY(.33);-ms-transform:scaleY(.33);transform:scaleY(.33)}.border-1px::before{-webkit-transform:scaleY(.33);-ms-transform:scaleY(.33);transform:scaleY(.33)}}.line1{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;width:100%}.line2{word-break:break-all;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.mask{position:fixed;top:0;left:0;right:0;bottom:0;z-index:55;background-color:rgba(0,0,0,0.5)}
/*# sourceMappingURL=./reset.css.map */
+1
View File
@@ -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]}
+1 -1
View File
@@ -7,7 +7,7 @@ input{line-height: normal; box-sizing:border-box;}
display: none;
}
.iconfont{
font-size: .36*3.125rem;
font-size: .36*100rpx;
}
/* 一像素边框 */
@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5) {
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2432 -2428
View File
File diff suppressed because it is too large Load Diff
+25 -25
View File
@@ -1,39 +1,39 @@
<template>
<div>
<div class="address-window" :class="value === true ? 'on' : ''">
<div class="title">
<view>
<view class="address-window" :class="value === true ? 'on' : ''">
<view class="title">
选择地址
<span class="iconfont icon-guanbi" @click="closeAddress"></span>
</div>
<div class="list" v-if="addressList.length">
<div
<text class="iconfont icon-guanbi" @click="closeAddress"></text>
</view>
<view class="list" v-if="addressList.length">
<view
class="item acea-row row-between-wrapper"
:class="item.id === checked ? 'font-color-red' : ''"
v-for="(item, addressIndex) in addressList"
@click="tapAddress(addressIndex)"
:key="addressIndex"
>
<span class="iconfont icon-ditu" :class="item.id === checked ? 'font-color-red' : ''"></span>
<div class="addressTxt">
<div class="name" :class="item.id === checked ? 'font-color-red' : ''">
<text class="iconfont icon-ditu" :class="item.id === checked ? 'font-color-red' : ''"></text>
<view class="addressTxt">
<view class="name" :class="item.id === checked ? 'font-color-red' : ''">
{{ item.realName }}
<span class="phone">{{ item.phone }}</span>
</div>
<div class="line1">
<text class="phone">{{ item.phone }}</text>
</view>
<view class="line1">
{{ item.province }}{{ item.city }}{{ item.district
}}{{ item.detail }}
</div>
</div>
<span class="iconfont icon-complete" :class="item.id === checked ? 'font-color-red' : ''"></span>
</div>
</div>
<div class="pictrue" v-if="addressList.length < 1">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noAddress.png'" class="image" />
</div>
<div class="addressBnt bg-color-red" @click="goAddressPages">新加地址</div>
</div>
<div class="mask" @touchmove.prevent :hidden="value === false" @click="closeAddress"></div>
</div>
</view>
</view>
<text class="iconfont icon-complete" :class="item.id === checked ? 'font-color-red' : ''"></text>
</view>
</view>
<view class="pictrue" v-if="addressList.length < 1">
<image :src="$VUE_APP_RESOURCES_URL+'/images/noAddress.png'" class="image" />
</view>
<view class="addressBnt bg-color-red" @click="goAddressPages">新加地址</view>
</view>
<view class="mask" @touchmove.prevent :hidden="value === false" @click="closeAddress"></view>
</view>
</template>
<script>
import { getAddressList } from "@/api/user";
+10 -10
View File
@@ -1,15 +1,15 @@
<template>
<div class="time">
<view class="time">
{{ tipText }}
<span class="styleAll" v-if="isDay === true">{{ day }}</span>
<span class="timeTxt">{{ dayText }}</span>
<span class="styleAll">{{ hour }}</span>
<span class="timeTxt">{{ hourText }}</span>
<span class="styleAll">{{ minute }}</span>
<span class="timeTxt">{{ minuteText }}</span>
<span class="styleAll">{{ second }}</span>
<span class="timeTxt">{{ secondText }}</span>
</div>
<text class="styleAll" v-if="isDay === true">{{ day }}</text>
<text class="timeTxt">{{ dayText }}</text>
<text class="styleAll">{{ hour }}</text>
<text class="timeTxt">{{ hourText }}</text>
<text class="styleAll">{{ minute }}</text>
<text class="timeTxt">{{ minuteText }}</text>
<text class="styleAll">{{ second }}</text>
<text class="timeTxt">{{ secondText }}</text>
</view>
</template>
<script>
export default {
+34 -34
View File
@@ -1,51 +1,51 @@
<template>
<div>
<div class="coupon-list-window" :class="value === true ? 'on' : ''">
<div class="title">
<view>
<view class="coupon-list-window" :class="value === true ? 'on' : ''">
<view class="title">
优惠券
<span class="iconfont icon-guanbi" @click="close"></span>
</div>
<div v-if="couponList.length > 0">
<div class="coupon-list">
<div
<text class="iconfont icon-guanbi" @click="close"></text>
</view>
<view v-if="couponList.length > 0">
<view class="coupon-list">
<view
class="item acea-row row-center-wrapper"
v-for="coupon in couponList"
:key="coupon.id"
@click="click(coupon)"
>
<div class="money">
<view class="money">
<span class="num">{{ coupon.couponPrice }}</span>
</div>
<div class="text">
<div class="condition line1">{{ coupon.couponTitle }}</div>
<div class="data acea-row row-between-wrapper">
<div v-if="coupon.endTime === 0">不限时</div>
<div v-else><data-format-t :data="coupon.addTime"></data-format-t> - <data-format-t :data="coupon.endTime"></data-format-t></div>
<div
<text class="num">{{ coupon.couponPrice }}</text>
</view>
<view class="text">
<view class="condition line1">{{ coupon.couponTitle }}</view>
<view class="data acea-row row-between-wrapper">
<view v-if="coupon.endTime === 0">不限时</view>
<view v-else><data-format-t :data="coupon.addTime"></data-format-t> - <data-format-t :data="coupon.endTime"></data-format-t></view>
<view
class="iconfont icon-xuanzhong1 font-color-red"
v-if="checked === coupon.id"
></div>
<div class="iconfont icon-weixuanzhong" v-else></div>
</div>
</div>
</div>
</div>
<div class="couponNo bg-color-red" @click="couponNo">不使用优惠券</div>
</div>
<div v-if="!couponList.length && loaded">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noCoupon.png'" class="image" />
</div>
</div>
</div>
<div
></view>
<view class="iconfont icon-weixuanzhong" v-else></view>
</view>
</view>
</view>
</view>
<view class="couponNo bg-color-red" @click="couponNo">不使用优惠券</view>
</view>
<view v-if="!couponList.length && loaded">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/noCoupon.png'" class="image" />
</view>
</view>
</view>
<view
class="mask"
@touchmove.prevent
:hidden="value === false"
@click="close"
></div>
</div>
></view>
</view>
</template>
<style scoped>
.coupon-list-window .iconfont {
+34 -37
View File
@@ -1,48 +1,41 @@
<template>
<div>
<div class="coupon-list-window" :class="coupon.coupon === true ? 'on' : ''">
<div class="title">
优惠券<span class="iconfont icon-guanbi" @click="close"></span>
</div>
<div class="coupon-list" v-if="coupon.list.length > 0">
<div
<view>
<view class="coupon-list-window" :class="coupon.coupon === true ? 'on' : ''">
<view class="title">
优惠券
<text class="iconfont icon-guanbi" @click="close"></text>
</view>
<view class="coupon-list" v-if="coupon.list.length > 0">
<view
class="item acea-row row-center-wrapper"
v-for="(item, couponpopIndex) in coupon.list"
:key="couponpopIndex"
@click="getCouponUser(couponpopIndex, item.id)"
>
<div class="money">
<span class="num">{{ item.coupon_price }}</span>
</div>
<div class="text">
<div class="condition line1">
购物满{{ item.use_min_price }}元可用
</div>
<div class="data acea-row row-between-wrapper">
<div v-if="item.end_time === 0">不限时</div>
<div v-else>{{ item.start_time }}-{{ item.end_time }}</div>
<div
<view class="money">
<text class="num">{{ item.coupon_price }}</text>
</view>
<view class="text">
<view class="condition line1">购物满{{ item.use_min_price }}元可用</view>
<view class="data acea-row row-between-wrapper">
<view v-if="item.end_time === 0">不限时</view>
<view v-else>{{ item.start_time }}-{{ item.end_time }}</view>
<view
class="bnt acea-row row-center-wrapper"
:class="!item.is_use ? 'bg-color-red' : 'gray'"
>
{{ !item.is_use ? "立即领取" : "已领取" }}
</div>
</div>
</div>
</div>
</div>
>{{ !item.is_use ? "立即领取" : "已领取" }}</view>
</view>
</view>
</view>
</view>
<!--无优惠券-->
<div class="pictrue" v-else>
<img :src="$VUE_APP_RESOURCES_URL+'/images/noCoupon.png'" class="image" />
</div>
</div>
<div
class="mask"
@touchmove.prevent
:hidden="coupon.coupon === false"
@click="close"
></div>
</div>
<view class="pictrue" v-else>
<image :src="$VUE_APP_RESOURCES_URL+'/images/noCoupon.png'" class="image" />
</view>
</view>
<view class="mask" @touchmove.prevent :hidden="coupon.coupon === false" @click="close"></view>
</view>
</template>
<script>
import { getCouponReceive } from "@/api/user";
@@ -67,7 +60,11 @@ export default {
list = that.coupon.list;
if (list[index].is_use === true) return;
getCouponReceive(id).then(function() {
that.$dialog.toast({ mes: "已领取" });
uni.showToast({
title: "已领取",
icon: "none",
duration: 2000
});
that.$set(list[index], "is_use", true);
that.$emit("changefun", { action: "currentcoupon", value: index });
that.$emit("changeFun", { action: "changecoupon", value: false });
+83 -75
View File
@@ -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 -1
View File
@@ -1,5 +1,5 @@
<template>
<span>{{time}}</span>
<text>{{time}}</text>
</template>
<script>
import { dataFormat } from "@/utils";
+1 -1
View File
@@ -1,5 +1,5 @@
<template>
<span>{{time}}</span>
<text>{{time}}</text>
</template>
<script>
import { dataFormatT } from "@/utils";
+11 -11
View File
@@ -1,23 +1,23 @@
<template>
<div>
<div v-if="isIpx" class="iphonex-footer-bg"></div>
<div v-else class="footer-bg"></div>
<div id="footer" :class="[isIpx ? 'iphonex-footer' : '', 'acea-row row-middle'] ">
<div
<view>
<view v-if="isIpx" class="iphonex-footer-bg"></view>
<view v-else class="footer-bg"></view>
<view id="footer" :class="[isIpx ? 'iphonex-footer' : '', 'acea-row row-middle'] ">
<view
@click="changeTabtar(footerIndex)"
class="item"
:class="{ on: footerIndex == tabtarIndex }"
v-for="(item, footerIndex) in footerList"
:key="footerIndex"
>
<div
<view
class="iconfont"
:class="item.icon1 + ' ' + (footerIndex == tabtarIndex ? item.icon2 : '')"
></div>
<div>{{ item.name }}</div>
</div>
</div>
</div>
></view>
<view>{{ item.name }}</view>
</view>
</view>
</view>
</template>
<script>
import { mapState, mapMutations, mapActions } from "vuex";
+24 -24
View File
@@ -1,28 +1,28 @@
<template>
<div class="goodList">
<div @click="routerGo(item)" class="item acea-row row-between-wrapper" v-for="(item, goodlistIndex) in goodList" :key="goodlistIndex">
<div class="pictrue">
<img :src="item.image" class="image" />
<img :src="$VUE_APP_RESOURCES_URL + '/images/one.png'" class="numPic" v-if="isSort === true && index === 0" />
<img :src="$VUE_APP_RESOURCES_URL + '/images/two.png'" class="numPic" v-if="isSort === true && index === 1" />
<img :src="$VUE_APP_RESOURCES_URL + '/images/three.png'" class="numPic" v-if="isSort === true && index === 2" />
</div>
<div class="underline">
<div class="text">
<div class="line1">{{ item.storeName }}</div>
<div class="money font-color-red">
<view class="goodList">
<view @click="routerGo(item)" class="item acea-row row-between-wrapper" v-for="(item, goodlistIndex) in goodList" :key="goodlistIndex">
<view class="pictrue">
<image :src="item.image" class="image" />
<image :src="$VUE_APP_RESOURCES_URL + '/images/one.png'" class="numPic" v-if="isSort === true && index === 0" />
<image :src="$VUE_APP_RESOURCES_URL + '/images/two.png'" class="numPic" v-if="isSort === true && index === 1" />
<image :src="$VUE_APP_RESOURCES_URL + '/images/three.png'" class="numPic" v-if="isSort === true && index === 2" />
</view>
<view class="underline">
<view class="text">
<view class="line1">{{ item.storeName }}</view>
<view class="money font-color-red">
<span class="num">{{ item.price }}</span>
</div>
<div class="vip-money acea-row row-middle">
<div class="vip">{{ item.otPrice || 0 }}</div>
<span class="num">已售{{ item.sales }}{{ item.unitName }}</span>
</div>
</div>
</div>
<div class="iconfont icon-gouwuche cart-color acea-row row-center-wrapper"></div>
</div>
</div>
<text class="num">{{ item.price }}</text>
</view>
<view class="vip-money acea-row row-middle">
<view class="vip">{{ item.otPrice || 0 }}</view>
<text class="num">已售{{ item.sales }}{{ item.unitName }}</text>
</view>
</view>
</view>
<view class="iconfont icon-gouwuche cart-color acea-row row-center-wrapper"></view>
</view>
</view>
</template>
<script>
export default {
@@ -46,4 +46,4 @@ export default {
}
}
};
</script>
</script>
+8 -8
View File
@@ -1,11 +1,11 @@
<template>
<div class="home" :style="{ top: top + 'px' }" style="position:fixed;" id="right-nav" @touchmove="touchmove($event)">
<div class="homeCon bg-color-red1" :class="homeActive === true ? 'on' : ''">
<div @click="homeGo()" class="iconfont icon-shouye-xianxing " style="color: green;"></div>
<div @click="shoppingCartGo()" class="iconfont icon-caigou-xianxing" style="color: green;"></div>
<!--<div @click="userGo()" class="iconfont icon-yonghu1"></div>-->
</div>
</div>
<view class="home" :style="{ top: top + 'px' }" style="position:fixed;" id="right-nav" @touchmove="touchmove($event)">
<view class="homeCon bg-color-red1" :class="homeActive === true ? 'on' : ''">
<view @click="homeGo()" class="iconfont icon-shouye-xianxing " style="color: green;"></view>
<view @click="shoppingCartGo()" class="iconfont icon-caigou-xianxing" style="color: green;"></view>
<!--<view @click="userGo()" class="iconfont icon-yonghu1"></view>-->
</view>
</view>
</template>
<script>
import { mapGetters } from 'vuex';
@@ -59,4 +59,4 @@ export default {
background-repeat: no-repeat;
background-color: rgba(255, 255, 255, 0.9);
}
</style>
</style>
+4 -4
View File
@@ -1,19 +1,19 @@
<template>
<div
<view
class="Loads acea-row row-center-wrapper"
v-if="loading || !loaded"
style="margin-top: .2rem;"
>
<template v-if="loading">
<div
<view
class="iconfont icon-jiazai loading acea-row row-center-wrapper"
></div>
></view>
正在加载中
</template>
<template v-else>
上拉加载更多
</template>
</div>
</view>
</template>
<script>
+26 -26
View File
@@ -1,30 +1,30 @@
<template>
<div class="orderGoods">
<div class="total">{{ cartInfo.length }}件商品</div>
<div class="goodWrapper">
<div class="item acea-row row-between-wrapper" v-for="cart in cartInfo" :key="cart.id">
<div class="pictrue">
<img :src="cart.productInfo.image" class="image" />
</div>
<div class="text">
<div class="acea-row row-between-wrapper">
<div class="name line1">{{ cart.productInfo.storeName }}</div>
<div class="num">x {{ cart.cartNum }}</div>
</div>
<div
<view class="orderGoods">
<view class="total">{{ cartInfo.length }}件商品</view>
<view class="goodWrapper">
<view class="item acea-row row-between-wrapper" v-for="cart in cartInfo" :key="cart.id">
<view class="pictrue">
<image :src="cart.productInfo.image" class="image" />
</view>
<view class="text">
<view class="acea-row row-between-wrapper">
<view class="name line1">{{ cart.productInfo.storeName }}</view>
<view class="num">x {{ cart.cartNum }}</view>
</view>
<view
class="attr line1"
v-if="cart.productInfo.attrInfo"
>{{ cart.productInfo.attrInfo.suk }}</div>
<div class="money font-color-red">{{ cart.truePrice }}</div>
<div
>{{ cart.productInfo.attrInfo.suk }}</view>
<view class="money font-color-red">{{ cart.truePrice }}</view>
<view
class="evaluate"
v-if="evaluate == 3"
v-if="evaluate == 3"
@click="routerGo(cart)"
>评价</div>
</div>
</div>
</div>
</div>
>评价</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
@@ -40,10 +40,10 @@ export default {
return {};
},
mounted: function() {},
methods: {
routerGo(item) {
this.$yrouter.push({ path: '/pages/shop/GoodsEvaluate/index',query:{id:cart.unique} });
},
methods: {
routerGo(item) {
this.$yrouter.push({ path: '/pages/shop/GoodsEvaluate/index',query:{id:cart.unique} });
},
}
};
</script>
+50 -50
View File
@@ -1,70 +1,70 @@
<template>
<div>
<div class="payment" :class="value === true ? 'on' : ''">
<div class="title acea-row row-center-wrapper">
选择付款方式<span class="iconfont icon-guanbi" @click="close"></span>
</div>
<div
<view>
<view class="payment" :class="value === true ? 'on' : ''">
<view class="title acea-row row-center-wrapper">
选择付款方式<text class="iconfont icon-guanbi" @click="close"></text>
</view>
<view
class="item acea-row row-between-wrapper"
v-if="types.indexOf('weixin') !== -1"
@click="checked('weixin')"
>
<div class="left acea-row row-between-wrapper">
<div class="iconfont icon-weixinzhifu"></div>
<div class="text">
<div class="name">微信支付</div>
<div class="info">使用微信快捷支付</div>
</div>
</div>
<div class="iconfont icon-xiangyou"></div>
</div>
<!-- <div
<view class="left acea-row row-between-wrapper">
<view class="iconfont icon-weixinzhifu"></view>
<view class="text">
<view class="name">微信支付</view>
<view class="info">使用微信快捷支付</view>
</view>
</view>
<view class="iconfont icon-xiangyou"></view>
</view>
<!-- <view
class="item acea-row row-between-wrapper"
v-if="types.indexOf('alipay') !== -1"
@click="checked('alipay')"
>
<div class="left acea-row row-between-wrapper">
<div class="iconfont icon-zhifubao"></div>
<div class="text">
<div class="name">支付宝支付</div>
<div class="info">使用线上支付宝支付</div>
</div>
</div>
<div class="iconfont icon-xiangyou"></div>
</div> -->
<div
<view class="left acea-row row-between-wrapper">
<view class="iconfont icon-zhifubao"></view>
<view class="text">
<view class="name">支付宝支付</view>
<view class="info">使用线上支付宝支付</view>
</view>
</view>
<view class="iconfont icon-xiangyou"></view>
</view> -->
<view
class="item acea-row row-between-wrapper"
v-if="types.indexOf('yue') !== -1"
@click="checked('yue')"
>
<div class="left acea-row row-between-wrapper">
<div class="iconfont icon-yuezhifu"></div>
<div class="text">
<div class="name">余额支付</div>
<div class="info">
当前可用余额<span class="money">{{ balance }}</span>
</div>
</div>
</div>
<div class="iconfont icon-xiangyou"></div>
</div>
<!-- <div
<view class="left acea-row row-between-wrapper">
<view class="iconfont icon-yuezhifu"></view>
<view class="text">
<view class="name">余额支付</view>
<view class="info">
当前可用余额<text class="money">{{ balance }}</text>
</view>
</view>
</view>
<view class="iconfont icon-xiangyou"></view>
</view>
<!-- <view
class="item acea-row row-between-wrapper"
v-if="types.indexOf('offline') !== -1"
@click="checked('offline')"
>
<div class="left acea-row row-between-wrapper">
<div class="iconfont icon-yuezhifu1"></div>
<div class="text">
<div class="name">线下支付</div>
<div class="info">选择线下付款方式</div>
</div>
</div>
<div class="iconfont icon-xiangyou"></div>
</div> -->
</div>
<div class="mask" v-show="value" @click="close"></div>
</div>
<view class="left acea-row row-between-wrapper">
<view class="iconfont icon-yuezhifu1"></view>
<view class="text">
<view class="name">线下支付</view>
<view class="info">选择线下付款方式</view>
</view>
</view>
<view class="iconfont icon-xiangyou"></view>
</view> -->
</view>
<view class="mask" v-show="value" @click="close"></view>
</view>
</template>
<script>
export default {
+47 -47
View File
@@ -1,70 +1,70 @@
<template>
<div>
<div class="priceChange" :class="change === true ? 'on' : ''">
<div class="priceTitle">
<span v-if="status==0">
<span v-if="orderInfo.refundStatus == 1">立即退款</span>
<span v-if="orderInfo.refundStatus != 1">一键改价</span>
</span>
<span v-if="status!=0">订单备注</span>
<span class="iconfont icon-guanbi" @click="close"></span>
</div>
<div class="listChange" v-if="status == 0">
<div class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 0">
<div>商品总价(¥)</div>
<div class="money">
<view>
<view class="priceChange" :class="change === true ? 'on' : ''">
<view class="priceTitle">
<text v-if="status==0">
<text v-if="orderInfo.refundStatus == 1">立即退款</text>
<text v-if="orderInfo.refundStatus != 1">一键改价</text>
</text>
<text v-if="status!=0">订单备注</text>
<text class="iconfont icon-guanbi" @click="close"></text>
</view>
<view class="listChange" v-if="status == 0">
<view class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 0">
<view>商品总价(¥)</view>
<view class="money">
{{ orderInfo.totalPrice }}
<span class="iconfont icon-suozi"></span>
</div>
</div>
<div class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 0">
<div>原始邮费(¥)</div>
<div class="money">
<text class="iconfont icon-suozi"></text>
</view>
</view>
<view class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 0">
<view>原始邮费(¥)</view>
<view class="money">
{{ orderInfo.payPostage }}
<span class="iconfont icon-suozi"></span>
</div>
</div>
<div class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 0">
<div>实际支付(¥)</div>
<div class="money">
<text class="iconfont icon-suozi"></text>
</view>
</view>
<view class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 0">
<view>实际支付(¥)</view>
<view class="money">
<input
type="text"
v-model="price"
:class="focus === true ? 'on' : ''"
@focus="priceChange"
/>
</div>
</div>
<div class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 1">
<div>实际支付(¥)</div>
<div class="money">
</view>
</view>
<view class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 1">
<view>实际支付(¥)</view>
<view class="money">
{{ orderInfo.payPrice }}
<span class="iconfont icon-suozi"></span>
</div>
</div>
<div class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 1">
<div>退款金额(¥)</div>
<div class="money">
<text class="iconfont icon-suozi"></text>
</view>
</view>
<view class="item acea-row row-between-wrapper" v-if="orderInfo.refundStatus === 1">
<view>退款金额(¥)</view>
<view class="money">
<input
type="text"
v-model="refund_price"
:class="focus === true ? 'on' : ''"
@focus="priceChange"
/>
</div>
</div>
</div>
<div class="listChange" v-else>
</view>
</view>
</view>
<view class="listChange" v-else>
<textarea
:placeholder="'请填写备注信息...'"
v-model="remark"
></textarea>
</div>
<div class="modify" @click="save">{{ orderInfo.refundStatus === 0 ? "立即修改" : "确认退款" }}</div>
<div class="modify1" @click="refuse" v-if="orderInfo.refundStatus === 1">拒绝退款</div>
</div>
<div class="mask" @touchmove.prevent v-show="change === true"></div>
</div>
</view>
<view class="modify" @click="save">{{ orderInfo.refundStatus === 0 ? "立即修改" : "确认退款" }}</view>
<view class="modify1" @click="refuse" v-if="orderInfo.refundStatus === 1">拒绝退款</view>
</view>
<view class="mask" @touchmove.prevent v-show="change === true"></view>
</view>
</template>
<style scoped>
.priceChange .listChange textarea {
+5 -5
View File
@@ -1,19 +1,19 @@
<template>
<div class="slider-banner product-bg">
<view class="slider-banner product-bg">
<swiper class="swiper-wrapper" @change="handleChange" v-if="imgUrls.length > 0">
<block v-for="(item, imgUrlsIndex) in imgUrls" :key="imgUrlsIndex">
<swiper-item>
<img :src="item" class="slide-image" />
<image :src="item" class="slide-image" />
</swiper-item>
</block>
</swiper>
<!-- <swiper class="swiper-wrapper" :options="ProductConSwiper" v-if="imgUrls.length > 0">
<swiperSlide class="swiper-slide" v-for="item in imgUrls" :key="item" ref="goodSwiper">
<img :src="item" class="slide-image" />
<image :src="item" class="slide-image" />
</swiperSlide>
</swiper>-->
<div class="pages">{{ currents || 1 }}/{{ imgUrls.length || 1 }}</div>
</div>
<view class="pages">{{ currents || 1 }}/{{ imgUrls.length || 1 }}</view>
</view>
</template>
<script>
// import { swiper, swiperSlide } from "vue-awesome-swiper";
+36 -36
View File
@@ -1,40 +1,40 @@
<template>
<div>
<div class="product-window" :class="attr.cartAttr === true ? 'on' : ''">
<div class="textpic acea-row row-between-wrapper">
<div class="pictrue">
<img :src="attr.productSelect.image" class="image" />
</div>
<div class="text">
<div class="line1">{{ attr.productSelect.store_name }}</div>
<div class="money font-color-red">
<view>
<view class="product-window" :class="attr.cartAttr === true ? 'on' : ''">
<view class="textpic acea-row row-between-wrapper">
<view class="pictrue">
<image :src="attr.productSelect.image" class="image" />
</view>
<view class="text">
<view class="line1">{{ attr.productSelect.store_name }}</view>
<view class="money font-color-red">
<span class="num">{{ attr.productSelect.price }}</span>
<span class="stock">库存: {{ attr.productSelect.stock }}</span>
</div>
</div>
<div class="iconfont icon-guanbi" @click="closeAttr"></div>
</div>
<div class="productWinList">
<div class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
<div class="title">{{ item.attrName }}</div>
<div class="listn acea-row row-middle">
<div
<text class="num">{{ attr.productSelect.price }}</text>
<text class="stock">库存: {{ attr.productSelect.stock }}</text>
</view>
</view>
<view class="iconfont icon-guanbi" @click="closeAttr"></view>
</view>
<view class="productWinList">
<view class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
<view class="title">{{ item.attrName }}</view>
<view class="listn acea-row row-middle">
<view
class="itemn"
:class="item.index == indexn ? 'on' : ''"
v-for="(itemn, indexn) in item.attrValue"
@click="tapAttr(indexw, indexn)"
:key="indexn"
>{{ itemn.attr }}</div>
</div>
</div>
</div>
<div class="cart">
<div class="title">数量</div>
<div class="carnum acea-row row-left">
<div class="item reduce" :class="cartNum <= 1 ? 'on' : ''" @click="CartNumDes">-</div>
<div class="item num">{{ cartNum }}</div>
<div
>{{ itemn.attr }}</view>
</view>
</view>
</view>
<view class="cart">
<view class="title">数量</view>
<view class="carnum acea-row row-left">
<view class="item reduce" :class="cartNum <= 1 ? 'on' : ''" @click="CartNumDes">-</view>
<view class="item num">{{ cartNum }}</view>
<view
class="item plus"
:class="
cartNum >= attr.productSelect.stock
@@ -42,12 +42,12 @@
: ''
"
@click="CartNumAdd"
>+</div>
</div>
</div>
</div>
<div class="mask" @touchmove.prevent :hidden="attr.cartAttr === false" @click="closeAttr"></div>
</div>
>+</view>
</view>
</view>
</view>
<view class="mask" @touchmove.prevent :hidden="attr.cartAttr === false" @click="closeAttr"></view>
</view>
</template>
<script>
export default {
+18 -18
View File
@@ -1,22 +1,22 @@
<template>
<div class="promotionGood" v-if="benefit.length > 0">
<div class="item acea-row row-between-wrapper" v-for="(item, promotionGoodIndex) in benefit" :key="promotionGoodIndex" @click="routerGo(item)">
<div class="pictrue"><img :src="item.image" class="image" /></div>
<div class="text">
<div class="name line1">{{ item.storeName }}</div>
<div class="sp-money acea-row">
<div class="moneyCon">
<view class="promotionGood" v-if="benefit.length > 0">
<view class="item acea-row row-between-wrapper" v-for="(item, promotionGoodIndex) in benefit" :key="promotionGoodIndex" @click="routerGo(item)">
<view class="pictrue"><image :src="item.image" class="image" /></view>
<view class="text">
<view class="name line1">{{ item.storeName }}</view>
<view class="sp-money acea-row">
<view class="moneyCon">
促销价:
<span class="num">{{ item.price }}</span>
</div>
</div>
<div class="acea-row row-between-wrapper">
<div class="money">日常价{{ item.otPrice }}</div>
<div>仅剩{{ item.stock }}{{ item.unitName }}</div>
</div>
</div>
</div>
</div>
<text class="num">{{ item.price }}</text>
</view>
</view>
<view class="acea-row row-between-wrapper">
<view class="money">日常价{{ item.otPrice }}</view>
<view>仅剩{{ item.stock }}{{ item.unitName }}</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
@@ -34,4 +34,4 @@ export default {
console.log(this, 999);
}
};
</script>
</script>
+17 -17
View File
@@ -1,27 +1,27 @@
<template>
<div class="recommend" ref="container">
<div class="title acea-row row-center-wrapper">
<span class="iconfont icon-zhuangshixian"></span>
<span class="name">为你推荐</span>
<span class="iconfont icon-zhuangshixian lefticon"></span>
</div>
<div class="recommendList acea-row row-between-wrapper">
<div
<view class="recommend" ref="container">
<view class="title acea-row row-center-wrapper">
<text class="iconfont icon-zhuangshixian"></text>
<text class="name">为你推荐</text>
<text class="iconfont icon-zhuangshixian lefticon"></text>
</view>
<view class="recommendList acea-row row-between-wrapper">
<view
@click="routerGo(item)"
class="item"
v-for="(item, recommendIndex) in hostProduct"
:key="recommendIndex"
>
<div class="pictrue"><img :src="item.image" class="image" /></div>
<div class="name line1">{{ item.storeName }}</div>
<div class="money font-color-red">
<view class="pictrue"><image :src="item.image" class="image" /></view>
<view class="name line1">{{ item.storeName }}</view>
<view class="money font-color-red">
<span class="num">{{ item.price }}</span>
</div>
</div>
</div>
<text class="num">{{ item.price }}</text>
</view>
</view>
</view>
<Loading :loaded="loadend" :loading="loading"></Loading>
</div>
</view>
</template>
<script>
import { getHostProducts } from '@/api/store';
@@ -67,4 +67,4 @@ export default {
!this.loading && this.hostProducts();
}
};
</script>
</script>
+6 -6
View File
@@ -1,9 +1,9 @@
<template>
<div v-if="shareInfoStatus" class="poster-first">
<div class="mask-share">
<img :src="$VUE_APP_RESOURCES_URL+'/images/share-info.png'" @click="shareInfoClose" />
</div>
</div>
<view v-if="shareInfoStatus" class="poster-first">
<view class="mask-share">
<image :src="$VUE_APP_RESOURCES_URL+'/images/share-info.png'" @click="shareInfoClose" />
</view>
</view>
</template>
<style scoped>
.poster-first {
@@ -17,7 +17,7 @@
bottom: 0;
z-index: 999;
}
.mask-share img {
.mask-share image{
width: 100%;
}
</style>
+14 -14
View File
@@ -1,20 +1,20 @@
<template>
<div class="sharing-packets" :class="state === true ? 'on' : ''">
<div
<view class="sharing-packets" :class="state === true ? 'on' : ''">
<view
class="iconfont icon-guanbi acea-row row-center-wrapper"
@click="closeShare"
></div>
<div class="line"></div>
<div class="sharing-con" @click="goShare">
<img :src="$VUE_APP_RESOURCES_URL+'/images/red-packets.png'" class="image" />
<div class="text font-color-red">
<div>会员分享返</div>
<div class="money"><span class="label"></span>{{ priceName }}</div>
<div class="tip">下单即返佣金</div>
<div class="shareBut">立即分享</div>
</div>
</div>
</div>
></view>
<view class="line"></view>
<view class="sharing-con" @click="goShare">
<image :src="$VUE_APP_RESOURCES_URL+'/images/red-packets.png'" class="image" />
<view class="text font-color-red">
<view>会员分享返</view>
<view class="money"><text class="label"></text>{{ priceName }}</view>
<view class="tip">下单即返佣金</view>
<view class="shareBut">立即分享</view>
</view>
</view>
</view>
</template>
<script>
export default {
+28 -28
View File
@@ -1,43 +1,43 @@
<template>
<div v-if="posterImageStatus" class="poster-first">
<view v-if="posterImageStatus" class="poster-first">
<canvas style="width:747px;height:1326px" canvas-id="myCanvas"></canvas>
<!-- <div class="poster-pop" v-show="!canvasStatus">
<!-- <view class="poster-pop" v-show="!canvasStatus">
<img
:src="$VUE_APP_RESOURCES_URL+'/images/poster-close.png'"
class="close"
@click="posterImageClose"
/>
<div class="canvas" ref="poster">
<img class="image" :src="posterData.image" alt="商品图片" />
<div class="text black">
<span v-text="posterData.title"></span>
</div>
<div class="text rad">
<span v-text="'¥' + posterData.price"></span>
</div>
<div class="code">
<div class="code-img">
<img :src="posterData.code" show-menu-by-longpress mode="widthFix" alt="二维码" />
</div>
<div class="code-text">
<span>长按识别二维码 立即购买</span>
</div>
</div>
</div>
<div class="save-poster" @click="savePosterPath">生成图片</div>
</div> -->
<div class="poster-pop" v-show="canvasStatus">
<view class="canvas" ref="poster">
<image class="image" :src="posterData.image" alt="商品图片" />
<view class="text black">
<text v-text="posterData.title"></text>
</view>
<view class="text rad">
<text v-text="'¥' + posterData.price"></text>
</view>
<view class="code">
<view class="code-img">
<image :src="posterData.code" show-menu-by-longpress mode="widthFix" alt="二维码" />
</view>
<view class="code-text">
<text>长按识别二维码 立即购买</text>
</view>
</view>
</view>
<view class="save-poster" @click="savePosterPath">生成图片</view>
</view> -->
<view class="poster-pop" v-show="canvasStatus">
<img
:src="$VUE_APP_RESOURCES_URL+'/images/poster-close.png'"
class="close"
@click="posterImageClose"
mode="widthFix"
/>
<img :src="posterImage" alt="tp" class="poster-image" show-menu-by-longpress mode="widthFix" />
<div class="keep">长按图片可以保存到手机</div>
</div>
<div class="mask"></div>
</div>
<image :src="posterImage" alt="tp" class="poster-image" show-menu-by-longpress mode="widthFix" />
<view class="keep">长按图片可以保存到手机</view>
</view>
<view class="mask"></view>
</view>
</template>
<style scoped>
.poster-first {
@@ -85,7 +85,7 @@
width: 33%;
padding: 0.06rem;
}
.poster-pop .canvas .code .code-img img {
.poster-pop .canvas .code .code-img image{
width: 100%;
}
.poster-pop .canvas .code .code-text {
+39 -28
View File
@@ -1,28 +1,27 @@
<template>
<div>
<div class="switchWindow" :class="switchActive === true ? 'on' : ''">
<view>
<view class="switchWindow" :class="switchActive === true ? 'on' : ''">
<!-- @/assets/images/public.png -->
<div class="pictrue">
<img v-if="login_type === 'h5'" :src="$VUE_APP_RESOURCES_URL+'/images/h5.png'" />
<img :src="$VUE_APP_RESOURCES_URL+'/images/h5.png'" alt="" v-else />
</div>
<view class="pictrue">
<image v-if="login_type === 'h5'" :src="$VUE_APP_RESOURCES_URL+'/images/h5.png'" />
<image :src="$VUE_APP_RESOURCES_URL+'/images/h5.png'" alt v-else />
</view>
<!-- 是否选择切换到小程序账户 -->
<div class="info">
是否选择切换到<span class="font-color" v-if="login_type === 'h5'"
>微信账号</span
>
<span class="font-color" v-else>手机用户</span>
</div>
<div class="switchBnt" @click="switchH5">切换</div>
<div class="switchBnt cancelBnt" @click="switchClose">取消</div>
</div>
<div
class="mask"
@touchmove.prevent
v-show="switchActive === true"
@click="switchClose"
></div>
</div>
<view class="info">
<text>是否选择切换到</text>
<text class="font-color" v-if="login_type === 'h5'">微信账号</text>
<text class="font-color" v-else>手机用户</text>
<text></text>
</view>
<view class="switchBnt" @click="switchH5">
<text>切换</text>
</view>
<view class="switchBnt cancelBnt" @click="switchClose">
<text>取消</text>
</view>
</view>
<view class="mask" @touchmove.prevent v-show="switchActive === true" @click="switchClose"></view>
</view>
</template>
<style>
.switchWindow {
@@ -47,6 +46,7 @@
opacity: 0;
transform: scale(0);
}
.switchWindow.on {
opacity: 1;
transform: scale(1);
@@ -55,22 +55,26 @@
-moz-transform: scale(1);
-o-transform: scale(1);
}
.switchWindow .pictrue {
width: 2.36rem;
height: 2.36rem;
margin: 0 auto;
}
.switchWindow .pictrue img {
.switchWindow .pictrue image {
width: 100%;
height: 100%;
display: block;
}
.switchWindow .info {
font-size: 0.32rem;
color: #282828;
margin-top: 0.44rem;
font-weight: bold;
}
.switchWindow .switchBnt {
font-size: 0.32rem;
color: #fff;
@@ -84,6 +88,7 @@
background-image: -webkit-linear-gradient(to right, #f67a38 0%, #f11b09 100%);
background-image: -moz-linear-gradient(to right, #f67a38 0%, #f11b09 100%);
}
.switchWindow .switchBnt.cancelBnt {
background-color: #fff;
color: #999;
@@ -119,25 +124,31 @@ export default {
},
switchH5() {
let that = this;
uni.showLoading({title: '正在切换中'})
uni.showLoading({
title: "正在切换中"
});
if (that.login_type === "h5") {
cookie.set("loginType", "wechat", 60);
uni.hideLoading()
uni.hideLoading();
this.$store.commit("LOGOUT");
this.$emit("changeswitch", false);
location.reload();
} else {
switchH5Login()
.then(({ data }) => {
uni.hideLoading()
uni.hideLoading();
const expires_time = dayjs(data.expires_time);
store.commit("LOGIN", data.token, expires_time);
this.$emit("changeswitch", false);
location.reload();
})
.catch(err => {
uni.hideLoading()
return that.$dialog.toast({ mes: err });
uni.hideLoading();
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
});
}
}
+23 -23
View File
@@ -1,29 +1,29 @@
<template>
<div class="evaluateWtapper">
<div class="evaluateItem" v-for="(item, evaluateWtapperIndex) in reply" :key="evaluateWtapperIndex">
<div class="pic-text acea-row row-middle">
<div class="pictrue">
<img :src="item.avatar" class="image" />
</div>
<div class="acea-row row-middle">
<div class="name line1">{{ item.nickname }}</div>
<div class="start" :class="'star' + item.star"></div>
</div>
</div>
<div class="time">{{ item.add_time }} {{ item.suk }}</div>
<div class="evaluate-infor">{{ item.comment }}</div>
<div class="imgList acea-row">
<div class="pictrue" v-for="(itemn, eq) in item.picturesArr" :key="eq">
<img :src="itemn" class="image" />
</div>
</div>
<!--<div class="reply" v-if="item.merchant_reply_content">-->
<!--<span class="font-color-red">店小二</span>{{-->
<view class="evaluateWtapper">
<view class="evaluateItem" v-for="(item, evaluateWtapperIndex) in reply" :key="evaluateWtapperIndex">
<view class="pic-text acea-row row-middle">
<view class="pictrue">
<image :src="item.avatar" class="image" />
</view>
<view class="acea-row row-middle">
<view class="name line1">{{ item.nickname }}</view>
<view class="start" :class="'star' + item.star"></view>
</view>
</view>
<view class="time">{{ item.add_time }} {{ item.suk }}</view>
<view class="evaluate-infor">{{ item.comment }}</view>
<view class="imgList acea-row">
<view class="pictrue" v-for="(itemn, eq) in item.picturesArr" :key="eq">
<image :src="itemn" class="image" />
</view>
</view>
<!--<view class="reply" v-if="item.merchant_reply_content">-->
<!--<text class="font-color-red">店小二</text>{{-->
<!--item.merchant_reply_content-->
<!--}}-->
<!--</div>-->
</div>
</div>
<!--</view>-->
</view>
</view>
</template>
<script>
export default {
+12 -12
View File
@@ -1,16 +1,16 @@
<template>
<div v-show="iShidden === false">
<div class="WriteOff">
<div class="pictrue"><img :src="orderInfo.image" /></div>
<div class="num acea-row row-center-wrapper">
<view v-show="iShidden === false">
<view class="WriteOff">
<view class="pictrue"><image :src="orderInfo.image" /></view>
<view class="num acea-row row-center-wrapper">
{{ orderInfo.order_id }}
</div>
<div class="tip">确定要核销此订单吗</div>
<div class="sure" @click="confirm">确定核销</div>
<div class="sure cancel" @click="cancel">取消</div>
</div>
<div class="mask" @touchmove.prevent></div>
</div>
</view>
<view class="tip">确定要核销此订单吗</view>
<view class="sure" @click="confirm">确定核销</view>
<view class="sure cancel" @click="cancel">取消</view>
</view>
<view class="mask" @touchmove.prevent></view>
</view>
</template>
<style scoped>
.WriteOff {
@@ -31,7 +31,7 @@
height: 3.4rem;
margin: 0 auto;
}
.WriteOff .pictrue img {
.WriteOff .pictrue image{
width: 100%;
height: 100%;
display: block;
+7 -7
View File
@@ -8,13 +8,13 @@ import schema from "async-validator";
import dialog from "./utils/dialog";
import cookie from "@/utils/store/cookie";
// import "@/assets/iconfont/iconfont";
import "@/assets/iconfont/iconfont.css";
// import "@/assets/js/media_750";
// import "vue-ydui/dist/ydui.base.css";
import "@/assets/css/base.less";
import "@/assets/css/reset.less";
import "@/assets/css/style.less";
// // import "@/assets/iconfont/iconfont";
// import "@/assets/iconfont/iconfont.css";
// // import "@/assets/js/media_750";
// // import "vue-ydui/dist/ydui.base.css";
// import "@/assets/css/base.less";
// import "@/assets/css/reset.less";
// import "@/assets/css/style.less";
import {
parseRoute,
+5 -1
View File
@@ -17,7 +17,11 @@
"delay" : 0
},
/* */
"modules" : {},
"modules" : {
"OAuth" : {},
"Payment" : {},
"Share" : {}
},
/* */
"distribute" : {
/* android */
+4 -4
View File
@@ -1,7 +1,7 @@
<template>
<div class="lottie-bg">
<div id="lottie"><img src="../../assets/images/live-logo.gif" rel="preload" style="width: 100%;" /></div>
</div>
<view class="lottie-bg">
<view id="lottie"><image src="../../static/images/live-logo.gif" rel="preload" mode="widthFix" style="width: 100%;" /></view>
</view>
</template>
<script>
@@ -30,7 +30,7 @@ export default {
cookie.set('spread', urlSpread || 0);
}
}
// this.toLaunch();
// this.toLaunch();
login({
fail: () => {
this.toLaunch();
+43 -47
View File
@@ -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>
+28 -28
View File
@@ -1,12 +1,12 @@
<template>
<div class="bargain-record" ref="container">
<div class="item" v-for="(item, bargainrecordIndex) in bargain" :key="bargainrecordIndex">
<div class="picTxt acea-row row-between-wrapper">
<div class="pictrue">
<img :src="item.image" />
</div>
<div class="text acea-row row-column-around">
<div class="line1">{{ item.title }}</div>
<view class="bargain-record" ref="container">
<view class="item" v-for="(item, bargainrecordIndex) in bargain" :key="bargainrecordIndex">
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="item.image" />
</view>
<view class="text acea-row row-column-around">
<view class="line1">{{ item.title }}</view>
<count-down
:is-day="true"
:tip-text="'倒计时 '"
@@ -16,34 +16,34 @@
:second-text="' '"
:datatime="item.datatime"
></count-down>
<div class="money font-color-red">
<view class="money font-color-red">
已砍至
<span class="symbol"></span>
<span class="num">{{ item.residuePrice }}</span>
</div>
</div>
</div>
<div class="bottom acea-row row-between-wrapper">
<div class="purple" v-if="item.status === 1">活动进行中</div>
<div class="success" v-else-if="item.status === 3">砍价成功</div>
<div class="end" v-else>活动已结束</div>
<div class="acea-row row-middle row-right">
<div
<text class="symbol"></text>
<text class="num">{{ item.residuePrice }}</text>
</view>
</view>
</view>
<view class="bottom acea-row row-between-wrapper">
<view class="purple" v-if="item.status === 1">活动进行中</view>
<view class="success" v-else-if="item.status === 3">砍价成功</view>
<view class="end" v-else>活动已结束</view>
<view class="acea-row row-middle row-right">
<view
class="bnt cancel"
v-if="item.status === 1"
@click="getBargainUserCancel(item.bargainId)"
>取消活动</div>
<div
>取消活动</view>
<view
class="bnt bg-color-red"
v-if="item.status === 1"
@click="goDetail(item.bargainId)"
>继续砍价</div>
<div class="bnt bg-color-red" v-else @click="goList">重开一个</div>
</div>
</div>
</div>
>继续砍价</view>
<view class="bnt bg-color-red" v-else @click="goList">重开一个</view>
</view>
</view>
</view>
<Loading :loaded="status" :loading="loadingList"></Loading>
</div>
</view>
</template>
<script>
import CountDown from "@/components/CountDown";
+136 -130
View File
@@ -1,18 +1,18 @@
<template>
<div class="bargain">
<view class="bargain">
<!-- 在header上加 on 为请求支援 -->
<div :class="[bargainPartake != userInfo.uid ? 'header on' : 'header']">
<div class="people">{{ lookCount }}人查看 {{ shareCount }}人分享 {{ userCount }}人参与</div>
<view :class="[bargainPartake != userInfo.uid ? 'header on' : 'header']">
<view class="people">{{ lookCount }}人查看 {{ shareCount }}人分享 {{ userCount }}人参与</view>
<!-- 帮助砍价帮砍成功-->
<div class="pictxt acea-row row-center-wrapper" v-if="bargainPartake != userInfo.uid">
<div class="pictrue">
<img :src="bargainUserInfo.avatar" />
</div>
<div class="text">
<view class="pictxt acea-row row-center-wrapper" v-if="bargainPartake != userInfo.uid">
<view class="pictrue">
<image :src="bargainUserInfo.avatar" />
</view>
<view class="text">
{{ bargainUserInfo.nickname }}
<span>邀请您帮忙砍价</span>
</div>
</div>
<text>邀请您帮忙砍价</text>
</view>
</view>
<count-down
:is-day="true"
:tip-text="'倒计时 '"
@@ -22,143 +22,142 @@
:second-text="' '"
:datatime="datatime"
></count-down>
</div>
<div class="wrapper">
<div class="pictxt acea-row row-between-wrapper">
<div class="pictrue">
<img :src="bargain.image" />
</div>
<div class="text acea-row row-column-around">
<div class="line2" v-text="bargain.title"></div>
<div class="money font-color-red">
</view>
<view class="wrapper">
<view class="pictxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="bargain.image" />
</view>
<view class="text acea-row row-column-around">
<view class="line2" v-text="bargain.title"></view>
<view class="money font-color-red">
已砍至:
<span class="num" v-text="price"></span>
</div>
<div class="acea-row row-middle">
<div class="successNum" v-text="'原价' + bargain.price"></div>
<div class="successNum" v-text="'已有' + bargainSumCount + '人砍价成功'"></div>
</div>
</div>
</div>
<div class="cu-progress acea-row row-middle round margin-top">
<div
<text class="num" v-text="price"></text>
</view>
<view class="acea-row row-middle">
<view class="successNum" v-text="'原价' + bargain.price"></view>
<view class="successNum" v-text="'已有' + bargainSumCount + '人砍价成功'"></view>
</view>
</view>
</view>
<view class="cu-progress acea-row row-middle round margin-top">
<view
class="acea-row row-middle bg-red"
:style="{ width: loading ? pricePercent + '%' : '' }"
></div>
</div>
<div class="balance acea-row row-between-wrapper">
<div v-text="'已砍' + alreadyPrice + '元'"></div>
<div v-if="surplusPrice === 0">砍价成功</div>
<div v-else v-text="'还剩' + surplusPrice + '元'"></div>
</div>
></view>
</view>
<view class="balance acea-row row-between-wrapper">
<view v-text="'已砍' + alreadyPrice + '元'"></view>
<view v-if="surplusPrice === 0">砍价成功</view>
<view v-else v-text="'还剩' + surplusPrice + '元'"></view>
</view>
<!-- 帮助砍价帮砍成功-->
<!--<div class='bargainSuccess'><span class='iconfont icon-xiaolian'></span>已成功帮助好友砍价</div>-->
<div class="bargainBnts">
<div
<!--<view class='bargainSuccess'><text class='iconfont icon-xiaolian'></text>已成功帮助好友砍价</view>-->
<view class="bargainBnts">
<view
class="bargainBnt"
@click="goPoster"
v-if="bargainPartake === userInfo.uid && surplusPrice > 0"
>邀请好友帮砍价</div>
<div
>邀请好友帮砍价</view>
<view
class="bargainBnt"
@click="getBargainHelp"
v-else-if="bargainPartake != userInfo.uid"
>帮好友砍一刀</div>
<div class="bargainBnt" @click="getBargainStart" v-if="bargainPartake != userInfo.uid">开启砍价</div>
<div
>帮好友砍一刀</view>
<view class="bargainBnt" @click="getBargainStart" v-if="bargainPartake != userInfo.uid">开启砍价</view>
<view
class="bargainBnt"
@click="goPay"
v-if="surplusPrice === 0 && bargainPartake === userInfo.uid && userBargainStatus === 1"
>立即支付</div>
<div class="bargainBnt on" @click="goList">抢更多商品</div>
</div>
<div class="tip">
>立即支付</view>
<view class="bargainBnt on" @click="goList">抢更多商品</view>
</view>
<view class="tip">
已有
<span class="font-color-red" v-text="helpCount"></span>
位好友成功帮您砍价
</div>
<div class="lock"></div>
</div>
<div class="bargainGang">
<div class="title font-color-red acea-row row-center-wrapper">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</div>
<div class="titleCon">砍价帮</div>
<div class="pictrue on">
<img :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</div>
</div>
<div class="list">
<div
<text class="font-color-red" v-text="helpCount"></text>位好友成功帮您砍价
</view>
<view class="lock"></view>
</view>
<view class="bargainGang">
<view class="title font-color-red acea-row row-center-wrapper">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</view>
<view class="titleCon">砍价帮</view>
<view class="pictrue on">
<image :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</view>
</view>
<view class="list">
<view
class="item acea-row row-between-wrapper"
v-for="(item, bargainHelpListIndex) in bargainHelpList"
:key="bargainHelpListIndex"
>
<div class="pictxt acea-row row-between-wrapper">
<div class="pictrue">
<img :src="item.avatar" />
</div>
<div class="text">
<div class="name line1" v-text="item.nickname"></div>
<div class="line1" v-text="item.add_time"></div>
</div>
</div>
<div class="money font-color-red">
<span class="iconfont icon-kanjia"></span>
<view class="pictxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="item.avatar" />
</view>
<view class="text">
<view class="name line1" v-text="item.nickname"></view>
<view class="line1" v-text="item.add_time"></view>
</view>
</view>
<view class="money font-color-red">
<text class="iconfont icon-kanjia"></text>
砍掉{{ item.price }}
</div>
</div>
</div>
<div
</view>
</view>
</view>
<view
class="load font-color-red"
v-if="!helpListStatus && !helpListLoading"
@click="getBargainHelpList"
>点击加载更多</div>
<div class="lock"></div>
</div>
<div class="goodsDetails">
<div class="title font-color-red acea-row row-center-wrapper">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</div>
<div class="titleCon">商品详情</div>
<div class="pictrue on">
<img :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</div>
</div>
<div class="conter" v-html="bargain.description"></div>
<div class="lock"></div>
</div>
<div class="goodsDetails">
<div class="title font-color-red acea-row row-center-wrapper">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</div>
<div class="titleCon">活动规则</div>
<div class="pictrue on">
<img :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</div>
</div>
<div class="conter" v-html="bargain.rule"></div>
</div>
<div class="bargainTip" :class="active === true ? 'on' : ''">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/bargainBg.jpg'" />
<div class="iconfont icon-guanbi" @click="close"></div>
</div>
<div class="cutOff" v-if="bargainPartake === userInfo.uid">
>点击加载更多</view>
<view class="lock"></view>
</view>
<view class="goodsDetails">
<view class="title font-color-red acea-row row-center-wrapper">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</view>
<view class="titleCon">商品详情</view>
<view class="pictrue on">
<image :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</view>
</view>
<view class="conter" v-html="bargain.description"></view>
<view class="lock"></view>
</view>
<view class="goodsDetails">
<view class="title font-color-red acea-row row-center-wrapper">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</view>
<view class="titleCon">活动规则</view>
<view class="pictrue on">
<image :src="$VUE_APP_RESOURCES_URL+'/images/left.png'" />
</view>
</view>
<view class="conter" v-html="bargain.rule"></view>
</view>
<view class="bargainTip" :class="active === true ? 'on' : ''">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/bargainBg.jpg'" />
<view class="iconfont icon-guanbi" @click="close"></view>
</view>
<view class="cutOff" v-if="bargainPartake === userInfo.uid">
您已砍掉
<span class="font-color-red" v-text="bargainHelpPrice"></span>听说分享次数越多砍价成功的机会越大哦
</div>
<div class="cutOff on" v-else>
<div class="help font-color-red" v-text="'成功帮砍' + bargainHelpPrice + '元'"></div>您也可以砍价低价拿哦快去挑选心仪的商品吧~
</div>
<div class="tipBnt" @click="goPoster" v-if="bargainPartake === userInfo.uid">邀请好友帮砍价</div>
<div class="tipBnt" @click="getBargainStart" v-else>我也要参与</div>
</div>
<div class="mask" @touchmove.prevent :hidden="active === false" @click="close"></div>
</div>
<text class="font-color-red" v-text="bargainHelpPrice"></text>听说分享次数越多砍价成功的机会越大哦
</view>
<view class="cutOff on" v-else>
<view class="help font-color-red" v-text="'成功帮砍' + bargainHelpPrice + '元'"></view>您也可以砍价低价拿哦快去挑选心仪的商品吧~
</view>
<view class="tipBnt" @click="goPoster" v-if="bargainPartake === userInfo.uid">邀请好友帮砍价</view>
<view class="tipBnt" @click="getBargainStart" v-else>我也要参与</view>
</view>
<view class="mask" @touchmove.prevent :hidden="active === false" @click="close"></view>
</view>
</template>
<script>
import CountDown from "@/components/CountDown";
@@ -279,7 +278,11 @@ export default {
});
})
.catch(err => {
this.$dialog.error(err.msg || err.response.data.msg);
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
});
},
goPoster: function() {
@@ -364,7 +367,12 @@ export default {
res.data.status === "SUCCESSFUL" &&
that.bargainPartake !== that.userInfo.uid
) {
return that.$dialog.toast({ mes: "您已经砍过了" });
uni.showToast({
title: "您已经砍过了",
icon: "none",
duration: 2000
});
return;
}
that.helpListStatus = false;
that.page = 1;
@@ -492,9 +500,7 @@ export default {
},
onShareAppMessage() {
return {
path: `/pages/activity/DargainDetails/index/?id=${
this.$yroute.query.id
}&partake=${this.userInfo.uid}`
path: `/pages/activity/DargainDetails/index/?id=${this.$yroute.query.id}&partake=${this.userInfo.uid}`
};
}
};
+30 -30
View File
@@ -1,40 +1,40 @@
<template>
<div class="bargain-list">
<!-- <div class="header">
<img :src="$VUE_APP_RESOURCES_URL+'/images/cut-bg.png'" alt="">
</div>-->
<div class="list" v-if="bargainLis.length > 0">
<div
<view class="bargain-list">
<!-- <view class="header">
<image :src="$VUE_APP_RESOURCES_URL+'/images/cut-bg.png'" alt="">
</view>-->
<view class="list" v-if="bargainLis.length > 0">
<view
class="item acea-row row-between-wrapper"
v-for="(item, bargainLisIndex) in bargainLis"
:key="bargainLisIndex"
>
<div class="pictrue">
<img :src="item.image" />
</div>
<div class="text acea-row row-column-around">
<div class="line1" v-text="item.title"></div>
<div class="num">
<span class="iconfont icon-pintuan"></span>
<view class="pictrue">
<image :src="item.image" />
</view>
<view class="text acea-row row-column-around">
<view class="line1" v-text="item.title"></view>
<view class="num">
<text class="iconfont icon-pintuan"></text>
{{ item.people }}人正在参与
</div>
<div class="money font-color-red">
</view>
<view class="money font-color-red">
可砍至:
<span class="price">{{item.minPrice}}</span>
</div>
</div>
<div class="cutBnt bg-color-red" @click="goDetail(item.id)">
<span class="iconfont icon-kanjia"></span>参与砍价
</div>
</div>
<div class="load font-color-red" v-if="!status" @click="getBargainList">点击加载更多</div>
</div>
<div class="noCommodity" style="background-color: #fff;" v-if="bargainLis.length === 0">
<div class="noPictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noGood.png'" class="image" />
</div>
</div>
</div>
<text class="price">{{item.minPrice}}</text>
</view>
</view>
<view class="cutBnt bg-color-red" @click="goDetail(item.id)">
<text class="iconfont icon-kanjia"></text>参与砍价
</view>
</view>
<view class="load font-color-red" v-if="!status" @click="getBargainList">点击加载更多</view>
</view>
<view class="noCommodity" style="background-color: #fff;" v-if="bargainLis.length === 0">
<view class="noPictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/noGood.png'" class="image" />
</view>
</view>
</view>
</template>
<script>
import { getBargainList } from "@/api/activity";
+35 -35
View File
@@ -1,47 +1,47 @@
<template>
<div class="group-list" ref="container">
<!-- <div class="header">
<img :src="$VUE_APP_RESOURCES_URL+'/images/group.png'" class="image" />
</div>-->
<div class="list" v-if="combinationList.length>0">
<div
<view class="group-list" ref="container">
<!-- <view class="header">
<image :src="$VUE_APP_RESOURCES_URL+'/images/group.png'" class="image" />
</view>-->
<view class="list" v-if="combinationList.length>0">
<view
class="item acea-row row-between-wrapper"
v-for="(item, combinationListIndex) in combinationList"
:key="combinationListIndex"
@click="link(item.id)"
>
<div class="pictrue">
<img :src="item.image" />
</div>
<div class="text">
<div class="line1" v-text="item.title"></div>
<div class="acea-row">
<div class="team acea-row row-middle cart-color">
<div class="iconfont icon-pintuan"></div>
<div class="num" v-text="item.people + '人团'"></div>
</div>
</div>
<div class="bottom acea-row row-between-wrapper">
<div class="money">
<view class="pictrue">
<image :src="item.image" />
</view>
<view class="text">
<view class="line1" v-text="item.title"></view>
<view class="acea-row">
<view class="team acea-row row-middle cart-color">
<view class="iconfont icon-pintuan"></view>
<view class="num" v-text="item.people + '人团'"></view>
</view>
</view>
<view class="bottom acea-row row-between-wrapper">
<view class="money">
<span class="num" v-text="item.price"></span>
<span class="y-money" v-text="'¥' + item.productPrice"></span>
</div>
<div class="groupBnt bg-color-red">
<text class="num" v-text="item.price"></text>
<text class="y-money" v-text="'¥' + item.productPrice"></text>
</view>
<view class="groupBnt bg-color-red">
去拼团
<span class="iconfont icon-jiantou"></span>
</div>
</div>
</div>
</div>
<text class="iconfont icon-jiantou"></text>
</view>
</view>
</view>
</view>
<Loading :loaded="status" :loading="loadingList"></Loading>
</div>
<div class="noCommodity" style="background-color: #fff;" v-if="combinationList.length === 0">
<div class="noPictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noGood.png'" class="image" />
</div>
</div>
</div>
</view>
<view class="noCommodity" style="background-color: #fff;" v-if="combinationList.length === 0">
<view class="noPictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/noGood.png'" class="image" />
</view>
</view>
</view>
</template>
<script>
import { getCombinationList } from "@/api/activity";
+40 -40
View File
@@ -1,8 +1,8 @@
<template>
<div class="flash-sale" ref="container">
<div class="header" v-if="headerImg">
<img :src="headerImg" />
</div>
<view class="flash-sale" ref="container">
<view class="header" v-if="headerImg">
<image :src="headerImg" />
</view>
<vant-tabs
:active="active"
@change="setTime"
@@ -17,12 +17,12 @@
v-for="(item, index) in timeList"
:key="index"
>
<div slot="title" class="timeItem">
<div class="time">{{ item.time }}</div>
<div class="state">{{ item.state }}</div>
</div>
<div class="countDown font-color-red acea-row row-center-wrapper">
<div v-if="item.status === 0" class="activity">活动已结束</div>
<view slot="title" class="timeItem">
<view class="time">{{ item.time }}</view>
<view class="state">{{ item.state }}</view>
</view>
<view class="countDown font-color-red acea-row row-center-wrapper">
<view v-if="item.status === 0" class="activity">活动已结束</view>
<count-down
:is-day="false"
:tip-text="'距结束仅剩 '"
@@ -33,50 +33,50 @@
:datatime="datatime"
v-if="item.status === 1"
></count-down>
<div v-if="item.status === 2" class="activity">活动即将开始</div>
</div>
<div class="list">
<div
<view v-if="item.status === 2" class="activity">活动即将开始</view>
</view>
<view class="list">
<view
class="item acea-row row-between-wrapper"
v-for="(itemSeckill, indexSeckill) in seckillList"
:key="indexSeckill"
>
<div class="pictrue">
<img :src="itemSeckill.image" />
</div>
<div class="text acea-row row-column-around">
<div class="line1" v-text="itemSeckill.title"></div>
<div class="money">
<view class="pictrue">
<image :src="itemSeckill.image" />
</view>
<view class="text acea-row row-column-around">
<view class="line1" v-text="itemSeckill.title"></view>
<view class="money">
限时价
<span class="num font-color-red" v-text="'¥' + itemSeckill.price"></span>
</div>
<div class="progress cart-color">
<div class="bg-red" :style="{ width: loading ? itemSeckill.percent + '%' : '' }"></div>
<div class="piece font-color-red" v-text="'仅剩' + itemSeckill.stock + '件'"></div>
</div>
</div>
<div
<text class="num font-color-red" v-text="'¥' + itemSeckill.price"></text>
</view>
<view class="progress cart-color">
<view class="bg-red" :style="{ width: loading ? itemSeckill.percent + '%' : '' }"></view>
<view class="piece font-color-red" v-text="'仅剩' + itemSeckill.stock + '件'"></view>
</view>
</view>
<view
class="grab bg-color-red"
v-if="item.status === 1 && itemSeckill.stock > 0"
@click="goDetail(itemSeckill.id)"
>马上抢</div>
<div class="grab" v-if="item.status === 1 && itemSeckill.stock <= 0">已售磬</div>
<div class="grab bg-color-red" v-if="item.status === 2">即将开始</div>
<div class="grab bg-color-red" v-if="item.status === 0">已结束</div>
</div>
</div>
<div
>马上抢</view>
<view class="grab" v-if="item.status === 1 && itemSeckill.stock <= 0">已售磬</view>
<view class="grab bg-color-red" v-if="item.status === 2">即将开始</view>
<view class="grab bg-color-red" v-if="item.status === 0">已结束</view>
</view>
</view>
<view
class="noCommodity"
style="background-color: #fff;"
v-if="seckillList.length === 0 && page > 1"
>
<div class="noPictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noGood.png'" class="image" />
</div>
</div>
<view class="noPictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/noGood.png'" class="image" />
</view>
</view>
</vant-tab>
</vant-tabs>
</div>
</view>
</template>
<script>
import { getSeckillConfig, getSeckillList } from "@/api/activity";
+104 -95
View File
@@ -1,53 +1,54 @@
<template>
<div :class="[posterImageStatus ? 'noscroll product-con' : 'product-con']" v-show="domStatus">
<view :class="[posterImageStatus ? 'noscroll product-con' : 'product-con']" v-show="domStatus">
<product-con-swiper :imgUrls="imgUrls"></product-con-swiper>
<div class="wrapper">
<div class="share acea-row row-between row-bottom">
<div class="money font-color-red">
<view class="wrapper">
<view class="share acea-row row-between row-bottom">
<view class="money font-color-red">
<span class="num" v-text="storeInfo.price"></span>
<span class="y-money" v-text="'¥' + storeInfo.productPrice"></span>
</div>
</div>
<div class="introduce" v-text="storeInfo.title"></div>
<div class="label acea-row row-between-wrapper">
<div v-text="'类型:' + storeInfo.people + '人团'"></div>
<div v-text="'库存:' + storeInfo.stock + storeInfo.unitName"></div>
<div v-text="'已拼:' + storeInfo.sales + storeInfo.unitName"></div>
</div>
</div>
<div class="notice acea-row row-middle">
<div class="num font-color-red">
<span class="iconfont icon-laba"></span>
<text class="num" v-text="storeInfo.price"></text>
<text class="y-money" v-text="'¥' + storeInfo.productPrice"></text>
</view>
</view>
<view class="introduce" v-text="storeInfo.title"></view>
<view class="label acea-row row-between-wrapper">
<view v-text="'类型:' + storeInfo.people + '人团'"></view>
<view v-text="'库存:' + storeInfo.stock + storeInfo.unitName"></view>
<view v-text="'已拼:' + storeInfo.sales + storeInfo.unitName"></view>
</view>
</view>
<view class="notice acea-row row-middle">
<view class="num font-color-red">
<text class="iconfont icon-laba"></text>
已拼{{ storeInfo.sales
}}{{ storeInfo.unitName }}
<span class="line">|</span>
</div>
<div class="swiper-no-swiping swiper">
<text class="line">|</text>
</view>
<view class="swiper-no-swiping swiper">
<swiper class="swiper-wrapper" :options="swiperTip" :autoplay="true" :interval="3000">
<block v-for="(item, itemNewIndex) in itemNew" :key="itemNewIndex">
<swiper-item>
<div class="line1">{{ item }}</div>
<view class="line1">{{ item }}</view>
</swiper-item>
</block>
</swiper>
</div>
</div>
<div class="assemble">
<div v-for="(item, groupListindex) in groupList" :key="groupListindex">
<div class="item acea-row row-between-wrapper" v-if="groupListindex < groupListCount">
<div class="pictxt acea-row row-between-wrapper">
<div class="pictrue">
<img :src="item.avatar" class="image" />
</div>
<div class="text line1" v-text="item.nickname"></div>
</div>
<div class="right acea-row row-middle">
<div>
<div class="lack">
还差
<span class="font-color-red" v-text="item.count"></span>人成团
</div>
</view>
</view>
<view class="assemble">
<view v-for="(item, groupListindex) in groupList" :key="groupListindex">
<view class="item acea-row row-between-wrapper" v-if="groupListindex < groupListCount">
<view class="pictxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="item.avatar" class="image" />
</view>
<view class="text line1" v-text="item.nickname"></view>
</view>
<view class="right acea-row row-middle">
<view>
<view class="lack">
<text>还差</text>
<text class="font-color-red" v-text="item.count"></text>
<text>人成团</text>
</view>
<count-down
:is-day="false"
:tip-text="'剩余 '"
@@ -57,69 +58,69 @@
:second-text="''"
:datatime="item.stopTime"
></count-down>
</div>
<div class="spellBnt" @click="groupRule(item.id)">
</view>
<view class="spellBnt" @click="groupRule(item.id)">
去拼单
<span class="iconfont icon-jiantou"></span>
</div>
</div>
</div>
</div>
<div class="more" v-if="groupList.length > groupListCount" @click="setGroupListCount">
<text class="iconfont icon-jiantou"></text>
</view>
</view>
</view>
</view>
<view class="more" v-if="groupList.length > groupListCount" @click="setGroupListCount">
查看更多
<span class="iconfont icon-xiangxia"></span>
</div>
</div>
<div class="playWay">
<div class="title acea-row row-between-wrapper">
<div>拼团玩法</div>
</div>
<div class="way acea-row row-middle">
<div class="item">
<span class="num"></span>开团/参团
</div>
<div class="iconfont icon-arrow"></div>
<div class="item">
<span class="num"></span>邀请好友
</div>
<div class="iconfont icon-arrow"></div>
<div class="item">
<div>
<span class="num"></span>满员发货
</div>
</div>
</div>
</div>
<div class="userEvaluation">
<div class="title acea-row row-between-wrapper">
<div v-text="'用户评价(' + replyCount + ')'"></div>
<div class="praise" @click="goReply">
<span class="font-color-red" v-text="replyChance + '%'"></span>好评率
<span class="iconfont icon-jiantou"></span>
</div>
</div>
<text class="iconfont icon-xiangxia"></text>
</view>
</view>
<view class="playWay">
<view class="title acea-row row-between-wrapper">
<view>拼团玩法</view>
</view>
<view class="way acea-row row-middle">
<view class="item">
<text class="num"></text>开团/参团
</view>
<view class="iconfont icon-arrow"></view>
<view class="item">
<text class="num"></text>邀请好友
</view>
<view class="iconfont icon-arrow"></view>
<view class="item">
<view>
<text class="num"></text>满员发货
</view>
</view>
</view>
</view>
<view class="userEvaluation">
<view class="title acea-row row-between-wrapper">
<view v-text="'用户评价(' + replyCount + ')'"></view>
<view class="praise" @click="goReply">
<text class="font-color-red" v-text="replyChance + '%'"></text>好评率
<text class="iconfont icon-jiantou"></text>
</view>
</view>
<UserEvaluation :reply="reply"></UserEvaluation>
</div>
<div class="product-intro">
<div class="title">产品介绍</div>
<div class="conter" v-html="storeInfo.description"></div>
</div>
<div style="height:100rpx;"></div>
<div class="footer-group acea-row row-between-wrapper">
<div class="customerSer acea-row row-center-wrapper row-column">
<div class="iconfont icon-kefu"></div>
<div>客服</div>
</div>
<div class="bnt bg-color-violet" @click="openAlone">单独购买</div>
<div class="bnt bg-color-red" @click="openTeam">立即开团</div>
</div>
</view>
<view class="product-intro">
<view class="title">产品介绍</view>
<view class="conter" v-html="storeInfo.description"></view>
</view>
<view style="height:100rpx;"></view>
<view class="footer-group acea-row row-between-wrapper">
<view class="customerSer acea-row row-center-wrapper row-column">
<view class="iconfont icon-kefu"></view>
<view>客服</view>
</view>
<view class="bnt bg-color-violet" @click="openAlone">单独购买</view>
<view class="bnt bg-color-red" @click="openTeam">立即开团</view>
</view>
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cartNum"></ProductWindow>
<StorePoster
v-on:setPosterImageStatus="setPosterImageStatus"
:posterImageStatus="posterImageStatus"
:posterData="posterData"
></StorePoster>
</div>
</view>
</template>
<style scoped>
.noscroll {
@@ -285,7 +286,11 @@ export default {
var that = this;
that.attr.productSelect.cart_num = 1;
that.cartNum = 1;
that.$dialog.message("每人每次限购1" + that.storeInfo.unitName);
uni.showToast({
title: "每人每次限购1" + that.storeInfo.unitName,
icon: "none",
duration: 2000
});
},
setProductSelect: function() {
var that = this;
@@ -316,7 +321,11 @@ export default {
});
})
.catch(err => {
this.$dialog.error(err.msg||err.response.data.msg);
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
});
}
}
+216 -220
View File
@@ -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>
+8 -8
View File
@@ -1,12 +1,12 @@
<template>
<div class="poster-poster" v-if="status === false">
<div class="tip">
<span class="iconfont icon-shuoming"></span>提示长按图片保存至手机相册
</div>
<div class="poster">
<img :src="image" mode="widthFix" show-menu-by-longpress />
</div>
</div>
<view class="poster-poster" v-if="status === false">
<view class="tip">
<text class="iconfont icon-shuoming"></text>提示长按图片保存至手机相册
</view>
<view class="poster">
<image :src="image" mode="widthFix" show-menu-by-longpress />
</view>
</view>
</template>
<style scoped>
.poster-poster {
+41 -38
View File
@@ -1,15 +1,15 @@
<template>
<div :class="[posterImageStatus ? 'noscroll product-con' : 'product-con']" v-show="domStatus">
<view :class="[posterImageStatus ? 'noscroll product-con' : 'product-con']" v-show="domStatus">
<product-con-swiper :imgUrls="imgUrls"></product-con-swiper>
<div class="nav acea-row row-between-wrapper">
<div class="money">
<view class="nav acea-row row-between-wrapper">
<view class="money">
<span class="num" v-text="storeInfo.price"></span>
<span class="y-money" v-text="'¥' + storeInfo.price"></span>
</div>
<div class="acea-row row-middle">
<div class="times">
<div>距秒杀结束仅剩</div>
<text class="num" v-text="storeInfo.price"></text>
<text class="y-money" v-text="'¥' + storeInfo.price"></text>
</view>
<view class="acea-row row-middle">
<view class="times">
<view>距秒杀结束仅剩</view>
<count-down
:is-day="false"
:tip-text="''"
@@ -19,42 +19,42 @@
:second-text="''"
:datatime="datatime"
></count-down>
</div>
<div class="iconfont icon-jiantou"></div>
</div>
</div>
<div class="wrapperRush">
<div class="introduce acea-row row-between">
<div class="infor" v-text="storeInfo.title"></div>
<div class="iconfont icon-fenxiang" @click="setPosterImageStatus"></div>
</div>
<div class="label acea-row row-middle">
<div class="stock" v-text="'库存:' + storeInfo.stock + '件'"></div>
<div v-text="'销量:' + storeInfo.sales + '件'"></div>
</div>
</div>
<div class="product-intro">
<div class="title">产品介绍</div>
<div class="conter" v-html="storeInfo.description"></div>
</div>
<div style="height:100rpx;"></div>
<div class="footerRush acea-row row-between-wrapper">
<div
</view>
<view class="iconfont icon-jiantou"></view>
</view>
</view>
<view class="wrapperRush">
<view class="introduce acea-row row-between">
<view class="infor" v-text="storeInfo.title"></view>
<view class="iconfont icon-fenxiang" @click="setPosterImageStatus"></view>
</view>
<view class="label acea-row row-middle">
<view class="stock" v-text="'库存:' + storeInfo.stock + '件'"></view>
<view v-text="'销量:' + storeInfo.sales + '件'"></view>
</view>
</view>
<view class="product-intro">
<view class="title">产品介绍</view>
<view class="conter" v-html="storeInfo.description"></view>
</view>
<view style="height:100rpx;"></view>
<view class="footerRush acea-row row-between-wrapper">
<view
class="customerSer acea-row row-center-wrapper row-column"
@click="routerGo()"
>
<div class="iconfont icon-kefu"></div>
<div>客服</div>
</div>
<div class="bnt bg-color-red" @click="tapBuy">立即购买</div>
</div>
<view class="iconfont icon-kefu"></view>
<view>客服</view>
</view>
<view class="bnt bg-color-red" @click="tapBuy">立即购买</view>
</view>
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cartNum"></ProductWindow>
<StorePoster
v-on:setPosterImageStatus="setPosterImageStatus"
:posterImageStatus="posterImageStatus"
:posterData="posterData"
></StorePoster>
</div>
</view>
</template>
<style scoped>
.noscroll {
@@ -215,8 +215,11 @@ export default {
});
})
.catch(err => {
console.log(err);
this.$dialog.error(err.msg || err.response.data.msg);
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
});
}
}
+200 -187
View File
@@ -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>
+99 -99
View File
@@ -1,26 +1,26 @@
<template>
<div class="index">
<div class="header acea-row row-center-wrapper">
<div @click="goGoodSearch()" class="search acea-row row-middle">
<span class="iconfont icon-xiazai5"></span>搜索商品
</div>
</div>
<div class="slider-banner banner">
<view class="index">
<view class="header acea-row row-center-wrapper">
<view @click="goGoodSearch()" class="search acea-row row-middle">
<text class="iconfont icon-xiazai5"></text>搜索商品
</view>
</view>
<view class="slider-banner banner">
<swiper indicatorDots="true" v-if="banner.length > 0">
<block v-for="(item, bannerIndex) in banner" :key="bannerIndex">
<swiper-item>
<div @click="item.url?$yrouter.push('/'+item.url) : ''" class="swiper-item">
<img :src="item.pic" />
</div>
<view @click="item.url?$yrouter.push('/'+item.url) : ''" class="swiper-item">
<image :src="item.pic" />
</view>
</swiper-item>
</block>
</swiper>
</div>
<div class="news acea-row row-between-wrapper">
<div class="pictrue" v-if="$VUE_APP_RESOURCES_URL">
<img :src="$VUE_APP_RESOURCES_URL+'/images/news.png'" />
</div>
<div class="swiper-no-swiping new-banner">
</view>
<view class="news acea-row row-between-wrapper">
<view class="pictrue" v-if="$VUE_APP_RESOURCES_URL">
<image :src="$VUE_APP_RESOURCES_URL+'/images/news.png'" />
</view>
<view class="swiper-no-swiping new-banner">
<swiper
class="swiper-wrapper"
v-if="roll.length > 0"
@@ -31,120 +31,120 @@
>
<block v-for="(item, rollIndex) in roll" :key="rollIndex">
<swiper-item class="swiper-slide">
<div
<view
@click="item.uniapp_url?$yrouter.push(item.uniapp_url) : ''"
class="swiper-item acea-row row-between-wrapper"
>
<div class="text acea-row row-between-wrapper">
<div class="label" v-if="item.show === '是'">最新</div>
<div class="newsTitle line1">{{ item.info }}</div>
</div>
<div class="iconfont icon-xiangyou"></div>
</div>
<view class="text acea-row row-between-wrapper">
<view class="label" v-if="item.show === '是'">最新</view>
<view class="newsTitle line1">{{ item.info }}</view>
</view>
<view class="iconfont icon-xiangyou"></view>
</view>
</swiper-item>
</block>
</swiper>
</div>
</div>
<div class="nav acea-row">
<div
</view>
</view>
<view class="nav acea-row">
<view
@click="goWxappUrl(item)"
class="item"
v-for="(item, menusIndex) in menus"
:key="menusIndex"
>
<div class="pictrue">
<img :src="item.pic" />
</div>
<div>{{ item.name }}</div>
</div>
</div>
<div class="wrapper hot" v-if="bastList.length > 0">
<img class="bg" src="../../assets/images/index-bg.png" mode="widthFix" />
<div class="title acea-row row-between-wrapper">
<div class="text">
<div class="name line1">热门榜单</div>
</div>
<div @click="goHotNewGoods()" class="more">
<view class="pictrue">
<image :src="item.pic" />
</view>
<view>{{ item.name }}</view>
</view>
</view>
<view class="wrapper hot" v-if="bastList.length > 0">
<image class="bg" src="../../static/images/index-bg.png" mode="widthFix" ></image>
<view class="title acea-row row-between-wrapper">
<view class="text">
<view class="name line1">热门榜单</view>
</view>
<view @click="goHotNewGoods()" class="more">
更多
<span class="iconfont icon-jiantou"></span>
</div>
</div>
<div class="newProducts">
<text class="iconfont icon-jiantou"></text>
</view>
</view>
<view class="newProducts">
<scroll-view scroll-y="false" scroll-x="true">
<div class="newProductsScroll">
<div
<view class="newProductsScroll">
<view
@click="goGoodsCon(item)"
class="newProductsItem"
v-for="(item, likeInfoIndex) in likeInfo"
:key="likeInfoIndex"
>
<div class="img-box">
<img :src="item.image" />
</div>
<div class="pro-info line1">{{ item.storeName }}</div>
<div class="money font-color-red">{{ item.price }}</div>
</div>
</div>
<view class="img-box">
<image :src="item.image" />
</view>
<view class="pro-info line1">{{ item.storeName }}</view>
<view class="money font-color-red">{{ item.price }}</view>
</view>
</view>
</scroll-view>
</div>
</div>
<div class="wrapper" v-if="bastList.length > 0">
<div class="title acea-row row-between-wrapper">
<div class="text">
<div class="name line1">精品推荐</div>
</div>
<div @click="goHotNewGoods(1)" class="more">
</view>
</view>
<view class="wrapper" v-if="bastList.length > 0">
<view class="title acea-row row-between-wrapper">
<view class="text">
<view class="name line1">精品推荐</view>
</view>
<view @click="goHotNewGoods(1)" class="more">
更多
<span class="iconfont icon-jiantou"></span>
</div>
</div>
<text class="iconfont icon-jiantou"></text>
</view>
</view>
<Good-list :good-list="bastList" :is-sort="false"></Good-list>
</div>
</view>
<div class="wrapper" v-if="firstList.length > 0">
<div class="title acea-row row-between-wrapper">
<div class="text">
<div class="name line1">
<view class="wrapper" v-if="firstList.length > 0">
<view class="title acea-row row-between-wrapper">
<view class="text">
<view class="name line1">
首发新品
<span class="new font-color-red">NEW~</span>
</div>
</div>
<div @click="goHotNewGoods(3)" class="more">
<text class="new font-color-red">NEW~</text>
</view>
</view>
<view @click="goHotNewGoods(3)" class="more">
更多
<span class="iconfont icon-jiantou"></span>
</div>
</div>
<div class="newProducts">
<text class="iconfont icon-jiantou"></text>
</view>
</view>
<view class="newProducts">
<scroll-view scroll-y="false" scroll-x="true">
<div class="newProductsScroll">
<div
<view class="newProductsScroll">
<view
@click="goGoodsCon(item)"
class="newProductsItem"
v-for="(item, firstListIndex) in firstList"
:key="firstListIndex"
>
<div class="img-box">
<img :src="item.image" />
</div>
<div class="pro-info line1">{{ item.storeName }}</div>
<div class="money font-color-red">{{ item.price }}</div>
</div>
</div>
<view class="img-box">
<image :src="item.image" />
</view>
<view class="pro-info line1">{{ item.storeName }}</view>
<view class="money font-color-red">{{ item.price }}</view>
</view>
</view>
</scroll-view>
</div>
</div>
<div class="wrapper" v-if="benefit.length > 0">
<div class="title acea-row row-between-wrapper">
<div class="text">
<div class="name line1">促销单品</div>
</div>
<div @click="goGoodsPromotion()" class="more">
</view>
</view>
<view class="wrapper" v-if="benefit.length > 0">
<view class="title acea-row row-between-wrapper">
<view class="text">
<view class="name line1">促销单品</view>
</view>
<view @click="goGoodsPromotion()" class="more">
更多
<span class="iconfont icon-jiantou"></span>
</div>
</div>
</div>
<text class="iconfont icon-jiantou"></text>
</view>
</view>
</view>
<PromotionGood :benefit="benefit"></PromotionGood>
<Coupon-window
:coupon-list="couponList"
@@ -152,7 +152,7 @@
@checked="couponClose"
@close="couponClose"
></Coupon-window>
</div>
</view>
</template>
<script>
// import { swiper, swiperSlide } from "vue-awesome-swiper";
+10 -10
View File
@@ -1,19 +1,19 @@
<template>
<div class="page">
<div :class="tabtarIndex==0?'page':''" v-show="tabtarIndex==0">
<view class="page">
<view :class="tabtarIndex==0?'page':''" v-show="tabtarIndex==0">
<home></home>
</div>
<div :class="tabtarIndex==1?'page':''" v-show="tabtarIndex==1">
</view>
<view :class="tabtarIndex==1?'page':''" v-show="tabtarIndex==1">
<goods-class></goods-class>
</div>
<div :class="tabtarIndex==2?'page':''" v-if="tabtarIndex==2">
</view>
<view :class="tabtarIndex==2?'page':''" v-if="tabtarIndex==2">
<shopping-cart></shopping-cart>
</div>
<div :class="tabtarIndex==3?'page':''" v-if="tabtarIndex==3">
</view>
<view :class="tabtarIndex==3?'page':''" v-if="tabtarIndex==3">
<user></user>
</div>
</view>
<footer-components></footer-components>
</div>
</view>
</template>
<script>
+144 -115
View File
@@ -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>
+369 -338
View File
@@ -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 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;
.no-express image {
width: 6rem;
margin: 0 auto;
display: block;
}
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>
.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%;
}
.track-list view.finall {
position: relative;
padding: 0px 0 0.5rem 5px;
line-height: 18px;
border-color: white;
border-left: 1px solid #ffffff;
color: #999;
}
.track-list view.finall .div-spilander {
width: 1px;
position: absolute;
left: -1.5px;
height: 0.5rem;
background-color: #d9d9d9;
}
</style>
+86 -86
View File
@@ -1,60 +1,60 @@
<template>
<div class="my-order" ref="container">
<div class="header bg-color-red">
<div class="picTxt acea-row row-between-wrapper">
<div class="text">
<div class="name">订单信息</div>
<div>
<view class="my-order" ref="container">
<view class="header bg-color-red">
<view class="picTxt acea-row row-between-wrapper">
<view class="text">
<view class="name">订单信息</view>
<view>
累计订单{{ orderData.orderCount || 0 }} 总消费{{
orderData.sumPrice || 0
}}
</div>
</div>
</div>
</div>
<div class="nav acea-row row-around">
<div class="item" :class="{ on: type === 0 }" @click="changeType(0)">
<div>待付款</div>
<div class="num">{{ orderData.unpaidCount || 0 }}</div>
</div>
<div class="item" :class="{ on: type === 1 }" @click="changeType(1)">
<div>待发货</div>
<div class="num">{{ orderData.unshippedCount || 0 }}</div>
</div>
<div class="item" :class="{ on: type === 2 }" @click="changeType(2)">
<div>待收货</div>
<div class="num">{{ orderData.receivedCount || 0 }}</div>
</div>
<div class="item" :class="{ on: type === 3 }" @click="changeType(3)">
<div>待评价</div>
<div class="num">{{ orderData.evaluatedCount || 0 }}</div>
</div>
<div class="item" :class="{ on: type === 4 }" @click="changeType(4)">
<div>已完成</div>
<div class="num">{{ orderData.completeCount || 0 }}</div>
</div>
</div>
<div class="list">
<div class="item" v-for="(order,orderListIndex) in orderList" :key="orderListIndex">
<div class="title acea-row row-between-wrapper">
<div class="acea-row row-middle">
<span
</view>
</view>
</view>
</view>
<view class="nav acea-row row-around">
<view class="item" :class="{ on: type === 0 }" @click="changeType(0)">
<view>待付款</view>
<view class="num">{{ orderData.unpaidCount || 0 }}</view>
</view>
<view class="item" :class="{ on: type === 1 }" @click="changeType(1)">
<view>待发货</view>
<view class="num">{{ orderData.unshippedCount || 0 }}</view>
</view>
<view class="item" :class="{ on: type === 2 }" @click="changeType(2)">
<view>待收货</view>
<view class="num">{{ orderData.receivedCount || 0 }}</view>
</view>
<view class="item" :class="{ on: type === 3 }" @click="changeType(3)">
<view>待评价</view>
<view class="num">{{ orderData.evaluatedCount || 0 }}</view>
</view>
<view class="item" :class="{ on: type === 4 }" @click="changeType(4)">
<view>已完成</view>
<view class="num">{{ orderData.completeCount || 0 }}</view>
</view>
</view>
<view class="list">
<view class="item" v-for="(order,orderListIndex) in orderList" :key="orderListIndex">
<view class="title acea-row row-between-wrapper">
<view class="acea-row row-middle">
<text
class="sign cart-color acea-row row-center-wrapper"
v-if="order.combinationId > 0"
>拼团</span>
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.seckillId > 0">秒杀</span>
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.bargainId > 0">砍价</span>
>拼团</text>
<text class="sign cart-color acea-row row-center-wrapper" v-if="order.seckillId > 0">秒杀</text>
<text class="sign cart-color acea-row row-center-wrapper" v-if="order.bargainId > 0">砍价</text>
<data-format :data="order.addTime"></data-format>
</div>
<div class="font-color-red">{{ getStatus(order) }}</div>
</div>
<div @click="goOrderDetails(order)">
<div
</view>
<view class="font-color-red">{{ getStatus(order) }}</view>
</view>
<view @click="goOrderDetails(order)">
<view
class="item-info acea-row row-between row-top"
v-for="(cart,cartInfoIndex) in order.cartInfo"
:key="cartInfoIndex"
>
<div class="pictrue">
<view class="pictrue">
<img
:src="cart.productInfo.image"
@click.stop="
@@ -89,53 +89,53 @@
"
v-else-if="cart.seckillId > 0"
/>
</div>
<div class="text acea-row row-between">
<div class="name line2">{{ cart.productInfo.storeName }}</div>
<div class="money">
<div>
</view>
<view class="text acea-row row-between">
<view class="name line2">{{ cart.productInfo.storeName }}</view>
<view class="money">
<view>
{{
cart.productInfo.attrInfo
? cart.productInfo.attrInfo.price
: cart.productInfo.price
}}
</div>
<div>x{{ cart.cartNum }}</div>
</div>
</div>
</div>
</div>
<div class="totalPrice">
</view>
<view>x{{ cart.cartNum }}</view>
</view>
</view>
</view>
</view>
<view class="totalPrice">
{{ order.cartInfo.length || 0 }}件商品总金额
<span
<text
class="money font-color-red"
>{{ order.payPrice }}</span>
</div>
<div class="bottom acea-row row-right row-middle">
>{{ order.payPrice }}</text>
</view>
<view class="bottom acea-row row-right row-middle">
<template v-if="order._status._type == 0">
<div class="bnt cancelBnt" @click="cancelOrder(order)">取消订单</div>
<div
<view class="bnt cancelBnt" @click="cancelOrder(order)">取消订单</view>
<view
class="bnt bg-color-red"
@click="goOrderDetails(order)"
>立即付款</div>
>立即付款</view>
</template>
<template v-if="order._status._type == 1 || order._status._type == 9">
<div
<view
class="bnt bg-color-red"
@click="goOrderDetails(order)"
>查看详情</div>
>查看详情</view>
</template>
<template v-if="order._status._type == 2">
<div
<view
class="bnt default"
@click="
$yrouter.push({ path: '/pages/order/Logistics/index',query:{id:order.orderId}})
"
>查看物流</div>
<div class="bnt bg-color-red" @click="takeOrder(order)">确认收货</div>
>查看物流</view>
<view class="bnt bg-color-red" @click="takeOrder(order)">确认收货</view>
</template>
<template v-if="order._status._type == 3">
<!--<div-->
<!--<view-->
<!--class="bnt default"-->
<!--@click="-->
<!--$yrouter.push({ path: '/pages/order/Logistics/index',query:{id:order.orderId}})-->
@@ -143,29 +143,29 @@
<!--v-if="order.deliveryType == 'express'"-->
<!--&gt;-->
<!--查看物流-->
<!--</div>-->
<div
<!--</view>-->
<view
class="bnt bg-color-red"
@click="goOrderDetails(order)"
>去评价</div>
>去评价</view>
</template>
<template v-if="order._status._type === 4">
<div
<view
class="bnt bg-color-red"
@click="goOrderDetails(order)"
>查看订单</div>
>查看订单</view>
</template>
</div>
</div>
</div>
<div class="noCart" v-if="orderList.length === 0 && page > 1">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noOrder.png'" />
</div>
</div>
</view>
</view>
</view>
<view class="noCart" v-if="orderList.length === 0 && page > 1">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/noOrder.png'" />
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
<Payment v-model="pay" :types="payType" @checked="toPay" :balance="userInfo.nowMoney"></Payment>
</div>
</view>
</template>
<script>
import { getOrderData, getOrderList } from "@/api/order";
@@ -344,7 +344,7 @@ export default {
margin: 0.7rem auto 0.5rem auto;
}
.noCart .pictrue img {
.noCart .pictrue image{
width: 100%;
height: 100%;
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+28 -28
View File
@@ -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>
+31 -31
View File
@@ -1,45 +1,45 @@
<template>
<div class="return-list" ref="container">
<div class="goodWrapper" v-for="(order,orderListIndex) in orderList" :key="orderListIndex">
<div class="iconfont icon-tuikuanzhong powder" v-if="order._status._type === -1"></div>
<div class="iconfont icon-yituikuan" v-if="order._status._type === -2"></div>
<div class="orderNum">订单号{{ order.orderId }}</div>
<div
<view class="return-list" ref="container">
<view class="goodWrapper" v-for="(order,orderListIndex) in orderList" :key="orderListIndex">
<view class="iconfont icon-tuikuanzhong powder" v-if="order._status._type === -1"></view>
<view class="iconfont icon-yituikuan" v-if="order._status._type === -2"></view>
<view class="orderNum">订单号{{ order.orderId }}</view>
<view
class="item acea-row row-between-wrapper"
v-for="(cart,cartInfoIndex) in order.cartInfo"
:key="cartInfoIndex"
@click="goOrderDetails(order)"
>
<div class="pictrue">
<img :src="cart.productInfo.image" class="image" @click.stop="goGoodsCon(cart)" />
</div>
<div class="text">
<div class="acea-row row-between-wrapper">
<div class="name line1">{{ cart.productInfo.storeName }}</div>
<div class="num">x {{ cart.cartNum }}</div>
</div>
<div
<view class="pictrue">
<image :src="cart.productInfo.image" class="image" @click.stop="goGoodsCon(cart)" />
</view>
<view class="text">
<view class="acea-row row-between-wrapper">
<view class="name line1">{{ cart.productInfo.storeName }}</view>
<view class="num">x {{ cart.cartNum }}</view>
</view>
<view
class="attr line1"
v-if="cart.productInfo.attrInfo"
>{{ cart.productInfo.attrInfo.suk }}</div>
<div class="attr line1" v-else>{{ cart.productInfo.storeName }}</div>
<div class="money">{{ cart.productInfo.price }}</div>
</div>
</div>
<div class="totalSum">
>{{ cart.productInfo.attrInfo.suk }}</view>
<view class="attr line1" v-else>{{ cart.productInfo.storeName }}</view>
<view class="money">{{ cart.productInfo.price }}</view>
</view>
</view>
<view class="totalSum">
{{ order.cartInfo.length || 0 }}件商品总金额
<span
<text
class="font-color-red price"
>{{ order.payPrice }}</span>
</div>
</div>
<div class="noCart" v-if="orderList.length === 0 && page > 1">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noOrder.png'" />
</div>
</div>
>{{ order.payPrice }}</text>
</view>
</view>
<view class="noCart" v-if="orderList.length === 0 && page > 1">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/noOrder.png'" />
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</div>
</view>
</template>
<script>
+111 -111
View File
@@ -1,141 +1,141 @@
<template>
<div class="order-details pos-order-details">
<div class="header acea-row row-middle">
<div class="state">{{ title }}</div>
<div class="data">
<div class="order-num">订单{{ orderInfo.orderId }}</div>
<div>
<span class="time">
<view class="order-details pos-order-details">
<view class="header acea-row row-middle">
<view class="state">{{ title }}</view>
<view class="data">
<view class="order-num">订单{{ orderInfo.orderId }}</view>
<view>
<text class="time">
<data-format :data="orderInfo.addTime"></data-format>
</span>
</div>
</div>
</div>
<div class="orderingUser acea-row row-middle">{{ orderInfo.nickname }}</div>
<div class="address">
<div class="name">
</text>
</view>
</view>
</view>
<view class="orderingUser acea-row row-middle">{{ orderInfo.nickname }}</view>
<view class="address">
<view class="name">
{{ orderInfo.realName}}
<span class="phone">{{ orderInfo.userPhone }}</span>
</div>
<div>{{ orderInfo.userAddress }}</div>
</div>
<div class="line">
<img :src="$VUE_APP_RESOURCES_URL+'/images/line.jpg'" />
</div>
<div class="pos-order-goods">
<div
<text class="phone">{{ orderInfo.userPhone }}</text>
</view>
<view>{{ orderInfo.userAddress }}</view>
</view>
<view class="line">
<image :src="$VUE_APP_RESOURCES_URL+'/images/line.jpg'" />
</view>
<view class="pos-order-goods">
<view
class="goods acea-row row-between-wrapper"
v-for="(item, orderInfoIndex) in orderInfo.cartInfo"
:key="orderInfoIndex"
>
<div class="picTxt acea-row row-between-wrapper">
<div class="pictrue">
<img :src="item.productInfo.image" />
</div>
<div class="text acea-row row-between row-column">
<div class="info line2">{{ item.productInfo.storeName }}</div>
<div class="attr">{{ item.productInfo.suk }}</div>
</div>
</div>
<div class="money">
<div class="x-money">{{ item.productInfo.price }}</div>
<div class="num">x{{ item.cartNum }}</div>
<div class="y-money">{{ item.productInfo.otPrice ? item.productInfo.otPrice : 0 }}</div>
</div>
</div>
</div>
<div class="public-total">
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="item.productInfo.image" />
</view>
<view class="text acea-row row-between row-column">
<view class="info line2">{{ item.productInfo.storeName }}</view>
<view class="attr">{{ item.productInfo.suk }}</view>
</view>
</view>
<view class="money">
<view class="x-money">{{ item.productInfo.price }}</view>
<view class="num">x{{ item.cartNum }}</view>
<view class="y-money">{{ item.productInfo.otPrice ? item.productInfo.otPrice : 0 }}</view>
</view>
</view>
</view>
<view class="public-total">
{{ orderInfo.totalNum }}件商品应支付
<span class="money">{{ orderInfo.payPrice }}</span>
<text class="money">{{ orderInfo.payPrice }}</text>
( 邮费 ¥{{
orderInfo.payPostage
}}
)
</div>
<div class="wrapper">
<div class="item acea-row row-between">
<div>订单编号</div>
<div class="conter acea-row row-middle row-right">
</view>
<view class="wrapper">
<view class="item acea-row row-between">
<view>订单编号</view>
<view class="conter acea-row row-middle row-right">
{{ orderInfo.orderId
}}
<span
<text
class="copy copy-data"
@click="copyClipboard(orderInfo.orderId)"
>复制</span>
</div>
</div>
<div class="item acea-row row-between">
<div>下单时间</div>
<div class="conter">
>复制</text>
</view>
</view>
<view class="item acea-row row-between">
<view>下单时间</view>
<view class="conter">
<data-format :data="orderInfo.addTime"></data-format>
</div>
</div>
<div class="item acea-row row-between">
<div>支付状态</div>
<div class="conter">{{ orderInfo.paid == 1 ? "已支付" : "未支付" }}</div>
</div>
<div class="item acea-row row-between">
<div>支付方式</div>
<div class="conter">{{ payType }}</div>
</div>
<div class="item acea-row row-between">
<div>买家留言</div>
<div class="conter">{{ orderInfo.mark }}</div>
</div>
</div>
<div class="wrapper">
<div class="item acea-row row-between">
<div>支付金额</div>
<div class="conter">{{ orderInfo.totalPrice }}</div>
</div>
<div class="item acea-row row-between">
<div>优惠券抵扣</div>
<div class="conter">-{{ orderInfo.couponPrice }}</div>
</div>
<div class="actualPay acea-row row-right">
</view>
</view>
<view class="item acea-row row-between">
<view>支付状态</view>
<view class="conter">{{ orderInfo.paid == 1 ? "已支付" : "未支付" }}</view>
</view>
<view class="item acea-row row-between">
<view>支付方式</view>
<view class="conter">{{ payType }}</view>
</view>
<view class="item acea-row row-between">
<view>买家留言</view>
<view class="conter">{{ orderInfo.mark }}</view>
</view>
</view>
<view class="wrapper">
<view class="item acea-row row-between">
<view>支付金额</view>
<view class="conter">{{ orderInfo.totalPrice }}</view>
</view>
<view class="item acea-row row-between">
<view>优惠券抵扣</view>
<view class="conter">-{{ orderInfo.couponPrice }}</view>
</view>
<view class="actualPay acea-row row-right">
实付款
<span class="money font-color-red">{{ orderInfo.payPrice }}</span>
</div>
</div>
<div
<text class="money font-color-red">{{ orderInfo.payPrice }}</text>
</view>
</view>
<view
class="wrapper"
v-if="orderInfo.delivery_type != 'fictitious' && orderInfo._status._type === 2"
>
<div class="item acea-row row-between">
<div>配送方式</div>
<div class="conter" v-if="orderInfo.delivery_type === 'express'">快递</div>
<div class="conter" v-if="orderInfo.delivery_type === 'send'">送货</div>
</div>
<div class="item acea-row row-between">
<div v-if="orderInfo.delivery_type === 'express'">快递公司</div>
<div v-if="orderInfo.delivery_type === 'send'">送货人</div>
<div class="conter">{{ orderInfo.delivery_name }}</div>
</div>
<div class="item acea-row row-between">
<div v-if="orderInfo.delivery_type === 'express'">快递单号</div>
<div v-if="orderInfo.delivery_type === 'send'">送货人电话</div>
<div class="conter">
<view class="item acea-row row-between">
<view>配送方式</view>
<view class="conter" v-if="orderInfo.delivery_type === 'express'">快递</view>
<view class="conter" v-if="orderInfo.delivery_type === 'send'">送货</view>
</view>
<view class="item acea-row row-between">
<view v-if="orderInfo.delivery_type === 'express'">快递公司</view>
<view v-if="orderInfo.delivery_type === 'send'">送货人</view>
<view class="conter">{{ orderInfo.delivery_name }}</view>
</view>
<view class="item acea-row row-between">
<view v-if="orderInfo.delivery_type === 'express'">快递单号</view>
<view v-if="orderInfo.delivery_type === 'send'">送货人电话</view>
<view class="conter">
{{ orderInfo.delivery_id
}}
<span
<text
class="copy copy-data"
@click="copyClipboard(orderInfo.delivery_id)"
>复制</span>
</div>
</div>
</div>
<div style="height:100rpx;"></div>
<div class="footer acea-row row-right row-middle">
<div class="more"></div>
<div class="bnt cancel" @click="modify(0)" v-if="types == 0">一键改价</div>
<div class="bnt cancel" @click="modify(0)" v-if="types == -1">立即退款</div>
<div
>复制</text>
</view>
</view>
</view>
<view style="height:100rpx;"></view>
<view class="footer acea-row row-right row-middle">
<view class="more"></view>
<view class="bnt cancel" @click="modify(0)" v-if="types == 0">一键改价</view>
<view class="bnt cancel" @click="modify(0)" v-if="types == -1">立即退款</view>
<view
class="bnt cancel"
v-if="orderInfo.pay_type === 'offline' && orderInfo.paid === 0"
@click="offlinePay"
>确认付款</div>
<div class="bnt delivery" v-if="types == 1" @click="goGoodsDeliver(orderInfo)">去发货</div>
</div>
>确认付款</view>
<view class="bnt delivery" v-if="types == 1" @click="goGoodsDeliver(orderInfo)">去发货</view>
</view>
<PriceChange
:change="change"
:orderInfo="orderInfo"
@@ -143,7 +143,7 @@
v-on:savePrice="savePrice"
:status="status"
></PriceChange>
</div>
</view>
</template>
<script>
import PriceChange from "@/components/PriceChange";
+322 -310
View File
@@ -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
});
}