Browse Source

优化3.0功能

master
gaoxs 5 years ago
parent
commit
963152460c
  1. 4
      api/order.js
  2. 2
      assets/css/style.css
  3. 1
      assets/css/style.css.map
  4. 50
      assets/css/style.less
  5. 51
      components/CouponListWindow.vue
  6. 4
      pages/authorization/index.vue
  7. 18
      pages/home/index.vue
  8. 2
      pages/order/OrderDetails/index.vue
  9. 12
      pages/order/OrderSubmission/index.vue
  10. 11
      pages/user/Recharge/index.vue
  11. 2
      pages/user/UserAccount/index.vue
  12. 42
      pages/user/coupon/UserCoupon/index.vue
  13. 483
      pages/user/promotion/PromoterList/index.vue
  14. 2
      pages/user/promotion/PromoterOrder/index.vue
  15. 1
      utils/index.js

4
api/order.js

@ -29,8 +29,8 @@ export function postOrderComputed(key, data) {
* @param price * @param price
* @returns {*} * @returns {*}
*/ */
export function getOrderCoupon(price) { export function getOrderCoupon(cartId) {
return request.get("/coupons/order/" + (parseFloat(price) || 0)); return request.get("/coupons/order/" + cartId);
} }
/** /**

2
assets/css/style.css

File diff suppressed because one or more lines are too long

1
assets/css/style.css.map

File diff suppressed because one or more lines are too long

50
assets/css/style.less

@ -190,14 +190,11 @@ page {
} }
.promotionGood .item .text .sp-money .moneyCon { .promotionGood .item .text .sp-money .moneyCon {
padding: 0 0.18*100rpx; // padding: 0 0.18*100rpx;
background-color: #eb3729; height: 0.36*100rpx;
height: 0.46*100rpx;
line-height: 0.46*100rpx; line-height: 0.46*100rpx;
background-image: linear-gradient(to right, #eb3729 0%, #eb3729 100%); font-size: 0.26*100rpx;
font-size: 0.2*100rpx; color:#ea3526;
color: #fff;
background-image: -moz-linear-gradient(to right, #eb3729 0%, #eb3729 100%);
border-radius: 0.24*100rpx 0.03*100rpx 0.24*100rpx 0.03*100rpx; border-radius: 0.24*100rpx 0.03*100rpx 0.24*100rpx 0.03*100rpx;
} }
@ -470,10 +467,27 @@ page {
.coupon-list .item .text .data .bnt.gray { .coupon-list .item .text .data .bnt.gray {
background-color: #ccc; background-color: #ccc;
} }
.condition .line-title {
width: 0.9*100rpx;
height: 0.3*100rpx;
line-height: 0.3*100rpx;
padding: 0 0.1*100rpx;
box-sizing: border-box;
background: rgba(255, 247, 247, 1);
border: 1rpx solid rgba(232, 51, 35, 1);
opacity: 1;
border-radius: 0.22*100rpx;
font-size: 0.2*100rpx !important;
color: #e83323;
margin-right: 0.12*100rpx;
}
.coupon-list .pic-num { .coupon-list .pic-num {
color: #ffffff !important; color: #ffffff !important;
font-size: 0.24*100rpx !important; font-size: 0.24*100rpx !important;
} }
/*优惠券列表弹窗*/ /*优惠券列表弹窗*/
.coupon-list-window { .coupon-list-window {
position: fixed; position: fixed;
@ -1423,6 +1437,9 @@ page {
width: 5.3*100rpx; width: 5.3*100rpx;
text-align: left; text-align: left;
} }
.index .wrapper .title .text-center .name{
justify-content: center;
}
.index .wrapper .title .text .name { .index .wrapper .title .text .name {
color: #282828; color: #282828;
@ -1689,10 +1706,12 @@ page {
.index .wrapper.hot .newProducts .newProductsItem { .index .wrapper.hot .newProducts .newProductsItem {
border: 0; border: 0;
} }
.index .wrapper.hot .title .text{
.index .wrapper.hot .title .text {
color: #fff; color: #fff;
font-size:28rpx; font-size: 28rpx;
.iconfont{
.iconfont {
margin-right: 10rpx; margin-right: 10rpx;
} }
} }
@ -4286,7 +4305,7 @@ page {
height: 2.23*100rpx; height: 2.23*100rpx;
background-color: #fff; background-color: #fff;
padding: 0 .24*100rpx; padding: 0 .24*100rpx;
margin: 0 auto .2*100rpx auto; margin: 0 auto .2*100rpx auto;
} }
.bargain-list .list .item .pictrue { .bargain-list .list .item .pictrue {
@ -6517,7 +6536,7 @@ page {
.my-promotion .header .num { .my-promotion .header .num {
text-align: center; text-align: center;
color: #fff; color: #fff;
margin-top: 0.25*100rpx; // margin-top: 0.25*100rpx;
font-size: 0.9*100rpx; font-size: 0.9*100rpx;
font-family: 'GuildfordProBook 5'; font-family: 'GuildfordProBook 5';
} }
@ -8557,10 +8576,11 @@ page {
} }
} }
.text .name .icon-jingpintuijian, .text .name .icon-xinpin{ .text .name .icon-jingpintuijian,
.text .name .icon-xinpin {
color: #00f !important; color: #00f !important;
} }
.text .name .icon-shoucang{ .text .name .icon-shoucang {
color: #ea3526!important; color: #ea3526 !important;
} }

51
components/CouponListWindow.vue

@ -7,29 +7,31 @@
</view> </view>
<view v-if="couponList.length > 0"> <view v-if="couponList.length > 0">
<view class="coupon-list"> <view class="coupon-list">
<view <div
class="item acea-row row-center-wrapper" class="item acea-row row-center-wrapper"
v-for="coupon in couponList" v-for="coupon in couponList"
:key="coupon.id" :key="coupon.id"
@click="click(coupon)" @click="click(coupon)"
> >
<view class="money"> <div class="money">
<div>
<text class="num">{{ coupon.couponPrice }}</text> <span class="num">{{ coupon.couponPrice }}</span>
</view> </div>
<view class="text"> <div class="pic-num">{{ coupon.useMinPrice }}元可用</div>
<view class="condition line1">{{ coupon.couponTitle }}</view> </div>
<view class="data acea-row row-between-wrapper"> <div class="text">
<view v-if="coupon.endTime === 0">不限时</view> <div class="condition line1">{{ coupon.couponTitle }}</div>
<view v-else><data-format-t :date="coupon.addTime"></data-format-t> - <data-format-t :date="coupon.endTime"></data-format-t></view> <div class="data acea-row row-between-wrapper">
<view <div v-if="coupon.endTime === 0">不限时</div>
<div v-else>截止:{{ coupon.endTime }}</div>
<div
class="iconfont icon-xuanzhong1 font-color-red" class="iconfont icon-xuanzhong1 font-color-red"
v-if="checked === coupon.id" v-if="checked === coupon.id"
></view> ></div>
<view class="iconfont icon-weixuanzhong" v-else></view> <div class="iconfont icon-weixuanzhong" v-else></div>
</view> </div>
</view> </div>
</view> </div>
</view> </view>
<view class="couponNo bg-color-red" @click="couponNo">不使用优惠券</view> <view class="couponNo bg-color-red" @click="couponNo">不使用优惠券</view>
</view> </view>
@ -39,12 +41,7 @@
</view> </view>
</view> </view>
</view> </view>
<view <view class="mask" @touchmove.prevent :hidden="value === false" @click="close"></view>
class="mask"
@touchmove.prevent
:hidden="value === false"
@click="close"
></view>
</view> </view>
</template> </template>
<style scoped lang="less"> <style scoped lang="less">
@ -78,6 +75,10 @@ export default {
price: { price: {
type: [Number, String], type: [Number, String],
default: undefined default: undefined
},
cartid: {
type: String,
default: ""
} }
}, },
data: function() { data: function() {
@ -90,6 +91,10 @@ export default {
price(n) { price(n) {
if (n === undefined || n == null) return; if (n === undefined || n == null) return;
this.getCoupon(); this.getCoupon();
},
cartid(n) {
if (n === undefined || n == null) return;
this.getCoupon();
} }
}, },
mounted: function() {}, mounted: function() {},
@ -99,7 +104,7 @@ export default {
this.$emit("close"); this.$emit("close");
}, },
getCoupon() { getCoupon() {
getOrderCoupon(this.price).then(res => { getOrderCoupon(this.cartid).then(res => {
this.couponList = res.data; this.couponList = res.data;
this.loaded = true; this.loaded = true;
}); });

4
pages/authorization/index.vue

@ -43,11 +43,11 @@ export default {
// // // //
}, },
onHide() { onHide() {
this.UPDATE_AUTHORIZATIONPAGE(false); this.updateAuthorizationPage(false);
this.changeAuthorization(false); this.changeAuthorization(false);
}, },
onUnload() { onUnload() {
this.UPDATE_AUTHORIZATIONPAGE(false); this.updateAuthorizationPage(false);
this.changeAuthorization(false); this.changeAuthorization(false);
}, },
methods: { methods: {

18
pages/home/index.vue

@ -51,15 +51,7 @@
</view> </view>
</view> --> </view> -->
<!-- <view class="wrapper hot" v-if="likeInfo.length > 0"> --> <!-- <view class="wrapper hot" v-if="likeInfo.length > 0"> -->
<view class="nav acea-row"> <uni-notice-bar scrollable="true" @click="goRoll(singNew)" single="true" speed="10" showIcon="true" :text="singNew.info"></uni-notice-bar>
<view @click="goWxappUrl(item)" class="item" v-for="(item, menusIndex) in menus" :key="menusIndex">
<view class="pictrue">
<image :src="item.pic" />
</view>
<view>{{ item.name }}</view>
</view>
</view>
<uni-notice-bar scrollable="true" single="true" speed="30" showIcon="true" :text="singNew.info"></uni-notice-bar>
<view class="wrapper hot" v-if="bastList.length > 0"> <view class="wrapper hot" v-if="bastList.length > 0">
<image class="bg" src="../../static/images/index-bg.png" mode="widthFix"></image> <image class="bg" src="../../static/images/index-bg.png" mode="widthFix"></image>
<view class="title no-border acea-row row-between-wrapper"> <view class="title no-border acea-row row-between-wrapper">
@ -130,17 +122,17 @@
</view> </view>
</view> </view>
<view class="wrapper" v-if="benefit.length > 0"> <view class="wrapper" v-if="benefit.length > 0">
<view class="title acea-row row-between-wrapper"> <view class="title acea-row row-center">
<view class="text"> <view class="text text-center">
<div class="name line1 new-name"> <div class="name line1 new-name">
<span class="iconfont icon-shoucang"></span> <span class="iconfont icon-shoucang"></span>
<span class="txt">猜你喜欢</span> <span class="txt">猜你喜欢</span>
</div> </div>
</view> </view>
<view @click="goGoodsPromotion(4)" class="more"> <!-- <view @click="goGoodsPromotion(4)" class="more">
更多 更多
<text class="iconfont icon-jiantou"></text> <text class="iconfont icon-jiantou"></text>
</view> </view> -->
</view> </view>
</view> </view>
<PromotionGood :benefit="benefit"></PromotionGood> <PromotionGood :benefit="benefit"></PromotionGood>

2
pages/order/OrderDetails/index.vue

@ -161,7 +161,7 @@
<view class="item acea-row row-between"> <view class="item acea-row row-between">
<view>下单时间</view> <view>下单时间</view>
<view class="conter"> <view class="conter">
<data-format :date="orderInfo.addTime"></data-format> {{ orderInfo.createTime }}
</view> </view>
</view> </view>
<view class="item acea-row row-between"> <view class="item acea-row row-between">

12
pages/order/OrderSubmission/index.vue

@ -182,6 +182,7 @@
:price="orderPrice.totalPrice" :price="orderPrice.totalPrice"
:checked="usableCoupon.id" :checked="usableCoupon.id"
@checked="changeCoupon" @checked="changeCoupon"
:cartid="cartid"
></CouponListWindow> ></CouponListWindow>
<AddressWindow <AddressWindow
@checked="changeAddress" @checked="changeAddress"
@ -341,7 +342,8 @@ export default {
shipping_type: 0, shipping_type: 0,
contacts: "", contacts: "",
contactsTel: "", contactsTel: "",
storeSelfMention: 0 storeSelfMention: 0,
cartid: ""
}; };
}, },
computed: mapGetters(["userInfo", "storeItems"]), computed: mapGetters(["userInfo", "storeItems"]),
@ -360,8 +362,14 @@ export default {
let that = this; let that = this;
this.$store.dispatch("getUser", true); this.$store.dispatch("getUser", true);
that.getCartInfo(); that.getCartInfo();
if (that.$yroute.query.pinkid !== undefined) console.log(that.$yroute);
if (that.$yroute.query.pinkid !== undefined) {
that.pinkId = that.$yroute.query.pinkid; that.pinkId = that.$yroute.query.pinkid;
}
if (that.$yroute.query.id !== undefined) {
that.cartid = that.$yroute.query.id;
console.log(that.cartid)
}
}, },
methods: { methods: {
showStoreList() { showStoreList() {

11
pages/user/Recharge/index.vue

@ -67,7 +67,9 @@ export default {
picList: [], picList: [],
activePic: 0, activePic: 0,
numberPic: "", numberPic: "",
paid_price: "" paid_price: "",
rechar_id: 0
}; };
}, },
computed: mapGetters(["userInfo"]), computed: mapGetters(["userInfo"]),
@ -84,6 +86,7 @@ export default {
.then(res => { .then(res => {
this.picList = res.data.recharge_price_ways || []; this.picList = res.data.recharge_price_ways || [];
if (this.picList[0]) { if (this.picList[0]) {
this.rechar_id = this.picList[0].id;
this.paid_price = this.picList[0].value.price; this.paid_price = this.picList[0].value.price;
this.numberPic = this.picList[0].value.give_price; this.numberPic = this.picList[0].value.give_price;
} }
@ -103,10 +106,12 @@ export default {
picCharge(idx, item) { picCharge(idx, item) {
this.activePic = idx; this.activePic = idx;
if (idx == this.picList.length) { if (idx == this.picList.length) {
this.rechar_id = 0;
this.paid_price = ""; this.paid_price = "";
this.numberPic = ""; this.numberPic = "";
} else { } else {
this.money = ""; this.money = "";
this.rechar_id = item.id;
this.paid_price = item.value.give_price; this.paid_price = item.value.give_price;
this.numberPic = item.value.price; this.numberPic = item.value.price;
} }
@ -140,9 +145,9 @@ export default {
} }
rechargeWechat({ rechargeWechat({
price: prices, price: prices,
// from: that.from,
from: that.from, from: that.from,
paidPrice: paid_price paid_price: paid_price,
rechar_id: that.rechar_id
}) })
.then(res => { .then(res => {
console.log(res); console.log(res);

2
pages/user/UserAccount/index.vue

@ -8,7 +8,7 @@
<view>总资产()</view> <view>总资产()</view>
<view class="money">{{ now_money }}</view> <view class="money">{{ now_money }}</view>
</view> </view>
<navigator url="/pages/user/Recharge/index" class="recharge font-color-red">充值</navigator> <!-- <navigator url="/pages/user/Recharge/index" class="recharge font-color-red">充值</navigator> -->
</view> </view>
<view class="cumulative acea-row row-top"> <view class="cumulative acea-row row-top">
<view class="item"> <view class="item">

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

@ -1,25 +1,31 @@
<template> <template>
<view ref="container"> <view ref="container">
<view class="coupon-list" v-if="couponsList.length > 0"> <div class="coupon-list" v-if="couponsList.length > 0">
<view <div
class="item acea-row row-center-wrapper" class="item acea-row row-center-wrapper"
v-for="(item, couponsListIndex) in couponsList" v-cloak
:key="couponsListIndex" v-for="(item, index) in couponsList"
:key="index"
> >
<view class="money" :class="item._type === 0 ? 'moneyGray' : ''"> <div class="money" :class="item._type === 0 ? 'moneyGray' : ''">
<text class="num">{{ item.couponPrice }}</text> <div>
</view> <span class="num">{{ item.couponPrice }}</span>
<view class="text"> </div>
<view class="condition line1">{{ item.couponTitle }}</view> <div class="pic-num">{{ item.useMinPrice }}元可用</div>
<view class="data acea-row row-between-wrapper"> </div>
<view v-if="item.endTime === 0">不限时</view> <div class="text">
<view v-else><data-format-t :date="item.addTime"></data-format-t> - <data-format-t :date="item.endTime"></data-format-t></view> <div class="condition line1">
<view class="bnt gray" v-if="item._type === 0">{{ item._msg }}</view> {{ item.couponTitle }}
<view class="bnt bg-color-red" v-else>{{ item._msg }}</view> </div>
</view> <div class="data acea-row row-between-wrapper">
</view> <div v-if="item.endTime === 0">不限时</div>
</view> <div v-else>{{ item.createTime }}-{{ item.endTime }}</div>
</view> <div class="bnt gray" v-if="item._type === 0">{{ item._msg }}</div>
<div class="bnt bg-color-red" v-else>{{ item._msg }}</div>
</div>
</div>
</div>
</div>
<!--暂无优惠券--> <!--暂无优惠券-->
<view <view
class="noCommodity" class="noCommodity"

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

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

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

@ -5,7 +5,7 @@
<view> <view>
<text class="name">累计推广订单</text> <text class="name">累计推广订单</text>
<view> <view>
<text class="num">{{ count }}</text> <text class="num">{{ count||'0' }}</text>
<text></text> <text></text>
</view> </view>
</view> </view>

1
utils/index.js

@ -196,6 +196,7 @@ export const login = () => {
reject('获取用户信息失败') reject('获取用户信息失败')
}); });
}).catch(error => { }).catch(error => {
console.log(error)
console.log('登录接口调用失败') console.log('登录接口调用失败')
reject('登录接口调用失败') reject('登录接口调用失败')
}); });

Loading…
Cancel
Save