全新UI视觉体验,移动端API优化降低重复调用,提高并发6倍,修复N多Bug

This commit is contained in:
stivepeim
2021-06-11 17:41:16 +08:00
parent 0b9f28fa52
commit b76840e10f
582 changed files with 35633 additions and 28276 deletions

View File

@@ -1,20 +1,21 @@
<template>
<view>
<block v-if="bargain.length>0">
<div class="bargain-record" ref="container">
<div class="item" v-for="(item, index) in bargain" :key="index">
<div class="bargain-record pad30" ref="container">
<div class="item borRadius14" v-for="(item, index) in bargain" :key="index">
<div class="picTxt acea-row row-between-wrapper">
<div class="pictrue">
<image :src="item.image" />
</div>
<div class="text acea-row row-column-around">
<div class="line1" style="width: 100%;">{{ item.title }}</div>
<count-down :justify-left="'justify-content:left'" :is-day="true" :tip-text="'倒计时 '" :day-text="' '" :hour-text="' '" :minute-text="' '"
:second-text="' '" :datatime="item.datatime" v-if="item.status === 1"></count-down>
<count-down :justify-left="'justify-content:left'" :bgColor="bgColor" :is-day="true" :tip-text="'倒计时 '" :day-text="'天'"
:hour-text="' '" :minute-text="' '"
:second-text="' '" :datatime="item.stopTime/1000" v-if="item.status === 1"></count-down>
<div class="successTxt font-color-red" v-else-if="item.status === 3">砍价成功</div>
<div class="endTxt" v-else>活动已结束</div>
<div class="money font-color-red">
已砍至<span class="symbol"></span><span class="num">{{ item.residue_price }}</span>
<div class="money">
已砍至<span class="symbol font-color-red"></span><span class="num font-color-red">{{ item.surplusPrice }}</span>
</div>
</div>
</div>
@@ -23,13 +24,16 @@
<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 class="bnt cancel" v-if="item.status === 1" @click="getBargainUserCancel(item.bargain_id)">
取消活动
<div class="bnt bg-color-red" v-if="item.status === 3 && !item.isOrder" @click="goConfirm(item)">
去付款
</div>
<div class="bnt bg-color-red" v-if="item.status === 1" @click="goDetail(item.bargain_id)">
<div class="bnt bg-color-red" v-if="item.status === 3 && !item.isDel && item.isOrder && !item.isPay" @click="goPay(item.surplusPrice,item.orderNo)">
立即付款
</div>
<div class="bnt bg-color-red" v-if="item.status === 1" @click="goDetail(item.id)">
继续砍价
</div>
<!-- <div class="bnt bg-color-red" v-else @click="goList">重开一个</div> -->
<div class="bnt bg-color-red" v-if="item.status === 2" @click="goList">重开一个</div>
</div>
</div>
</div>
@@ -40,6 +44,7 @@
<emptyPage title="暂无砍价记录~"></emptyPage>
</block>
<home></home>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
</view>
</template>
<script>
@@ -49,44 +54,127 @@
getBargainUserList,
getBargainUserCancel
} from "@/api/activity";
import {
getUserInfo
} from '@/api/user.js';
import Loading from "@/components/Loading";
import home from '@/components/home';
import payment from '@/components/payment';
import {
mapGetters
} from "vuex";
export default {
name: "BargainRecord",
components: {
CountDown,
Loading,
emptyPage,
home
home,
payment
},
props: {},
computed: mapGetters(['isLogin', 'userInfo', 'uid']),
data: function() {
return {
bgColor:{
'bgColor': '',
'Color': '#E93323',
'width': '40rpx',
'timeTxtwidth': '28rpx',
'isDay': false
},
bargain: [],
status: false, //砍价列表是否获取完成 false 未完成 true 完成
loadingList: false, //当前接口是否请求完成 false 完成 true 未完成
page: 1, //页码
limit: 20, //数量
userInfo: {}
payMode: [{
name: "微信支付",
icon: "icon-weixinzhifu",
value: 'weixin',
title: '微信快捷支付'
},
{
name: "余额支付",
icon: "icon-yuezhifu",
value: 'yue',
title: '可用余额:',
number: 0
}
],
pay_close: false,
pay_order_id: '',
totalPrice: '0'
};
},
onLoad: function() {
this.getBargainUserList();
this.getUserInfo();
// this.$scroll(this.$refs.container, () => {
// !this.loadingList && this.getBargainUserList();
// });
},
onShow() {
if (this.isLogin) {
this.payMode[1].number = this.userInfo.nowMoney;
this.$set(this, 'payMode', this.payMode);
} else {
toLogin();
}
},
methods: {
/**
* 打开支付组件
*
*/
goPay(pay_price, order_id) {
this.$set(this, 'pay_close', true);
this.$set(this, 'pay_order_id', order_id);
this.$set(this, 'totalPrice', pay_price);
},
/**
* 事件回调
*
*/
onChangeFun: function(e) {
let opt = e;
let action = opt.action || null;
let value = opt.value != undefined ? opt.value : null;
(action && this[action]) && this[action](value);
},
/**
* 关闭支付组件
*
*/
payClose: function() {
this.pay_close = false;
},
/**
* 支付成功回调
*
*/
pay_complete: function() {
this.status = false;
this.page = 1;
this.$set(this, 'bargain', []);
this.$set(this, 'pay_close', false);
this.getBargainUserList();
},
/**
* 支付失败回调
*
*/
pay_fail: function() {
this.pay_close = false;
},
goConfirm: function(item) { //立即支付
if (this.isLogin === false) {
toLogin();
} else {
uni.navigateTo({
url: `/pages/activity/goods_bargain_details/index?id=${item.id}&startBargainUid=${this.uid}&storeBargainId=${item.bargainUserId}`
})
}
},
goDetail: function(id) {
// this.$router.push({
// path: "/activity/dargain_detail/" + id +'&bargain='+ userInfo.uid
// });
uni.navigateTo({
url: `/pages/activity/goods_bargain_details/index?id=${id}&bargain=${this.userInfo.uid}`
url: `/pages/activity/goods_bargain_details/index?id=${id}&startBargainUid=${this.uid}`
})
},
// 砍价列表
@@ -104,8 +192,8 @@
limit: that.limit
})
.then(res => {
that.status = res.data.length < that.limit;
that.bargain.push.apply(that.bargain, res.data);
that.status = res.data.list.length < that.limit;
that.bargain.push.apply(that.bargain, res.data.list);
that.page++;
that.loadingList = false;
})
@@ -133,16 +221,7 @@
title: res
})
});
},
/**
* 获取个人用户信息
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
that.userInfo = res.data;
});
},
}
},
onReachBottom() {
this.getBargainUserList();
@@ -150,11 +229,15 @@
};
</script>
<style lang="scss">
<style lang="scss" scoped>
/*砍价记录*/
.bargain-record .item .picTxt .text .time .styleAll {
color: #fc4141;
font-size:24rpx;
.bargain-record .item .picTxt .text .time {
height: 36rpx;
line-height: 36rpx;
.styleAll {
color: #fc4141;
font-size:24rpx;
}
}
.bargain-record .item .picTxt .text .time .red {
color: #999;
@@ -162,13 +245,13 @@
}
.bargain-record .item {
background-color: #fff;
margin-bottom: 12upx;
margin-top: 15rpx;
padding: 30rpx 24rpx 0 24rpx;
}
.bargain-record .item .picTxt {
height: 210upx;
border-bottom: 1px solid #f0f0f0;
padding: 0 30upx;
padding-bottom: 30rpx;
}
.bargain-record .item .picTxt .pictrue {
@@ -183,10 +266,10 @@
}
.bargain-record .item .picTxt .text {
width: 515upx;
width: 470rpx;
font-size: 30upx;
color: #282828;
height: 150upx;
color: #333333;
height: 160rpx;
}
.bargain-record .item .picTxt .text .time {
@@ -205,6 +288,7 @@
}
.bargain-record .item .picTxt .text .money {
font-size: 24upx;
color: #999999;
}
.bargain-record .item .picTxt .text .money .num {
@@ -218,7 +302,6 @@
.bargain-record .item .bottom {
height: 100upx;
padding: 0 30upx;
font-size: 27upx;
}
@@ -231,7 +314,7 @@
}
.bargain-record .item .bottom .success {
color: #e93323;
color: $theme-color;
}
.bargain-record .item .bottom .bnt {

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,28 +1,29 @@
<template>
<div>
<view class='flash-sale'>
<!-- #ifdef H5 -->
<view class='iconfont icon-xiangzuo' @tap='goBack' :style="'top:'+ (navH/2) +'rpx'" v-if="returnShow"></view>
<!-- #endif -->
<view class="saleBox"></view>
<!-- banner -->
<!-- <navigator :url='item.url' class='slide-navigator acea-row row-between-wrapper' hover-class='none'>
<image :src="item.pic" class="slide-image" lazy-load></image>
</navigator> -->
<view class="header" v-if="timeList.length">
<view class="header" v-if="dataList.length">
<swiper indicator-dots="true" autoplay="true" :circular="circular" interval="3000" duration="1500"
indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
<block v-for="(item,index) in timeList[active].slide" :key="index">
<swiper-item>
<image :src="item.sattDir" class="slide-image" lazy-load></image>
indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
<block v-for="(items,index) in dataList[active].slide" :key="index">
<swiper-item class="borRadius14">
<image :src="items.sattDir" class="slide-image borRadius14" lazy-load></image>
</swiper-item>
</block>
</swiper>
</view>
<view class="seckillList acea-row row-between-wrapper">
<view class="priceTag">
<image src="/static/images/priceTag.png"></image>
</view>
<view class='timeLsit'>
<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft" style="width:auto;overflow:hidden;height:106rpx;">
<block v-for="(item,index) in timeList" :key='index'>
<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft"
style="width:auto;overflow:hidden;">
<block v-for="(item,index) in dataList" :key='index'>
<view @tap='settimeList(item,index)' class='item' :class="active == index?'on':''">
<view class='time'>{{item.time.split(',')[0]}}</view>
<view class="state">{{item.statusName}}</view>
@@ -31,7 +32,7 @@
</scroll-view>
</view>
</view>
<view class='list' v-if='seckillList.length>0'>
<view class='list pad30' v-if='seckillList.length>0'>
<block v-for="(item,index) in seckillList" :key='index'>
<view class='item acea-row row-between-wrapper' @tap='goDetails(item)'>
<view class='pictrue'>
@@ -39,11 +40,12 @@
</view>
<view class='text acea-row row-column-around'>
<view class='name line1'>{{item.title}}</view>
<view class='money'>
<view class='money'><text class="font-color">¥</text>
<text class='num font-color'>{{item.price}}</text>
<text class="y_money">¥{{item.otPrice}}</text>
</view>
<view class="limit">限量 <text class="limitPrice">{{item.quotaShow}} {{item.unitName}}</text></view>
<view class="limit">限量 <text class="limitPrice">{{item.quota}} {{item.unitName}}</text>
</view>
<view class="progress">
<view class='bg-reds' :style="'width:'+item.percent+'%;'"></view>
<view class='piece'>已抢{{item.percent}}%</view>
@@ -70,7 +72,8 @@
getSeckillHeaderApi,
getSeckillList
} from '../../../api/activity.js';
import home from '@/components/home/index.vue'
import home from '@/components/home/index.vue';
let app = getApp();
export default {
components: {
home
@@ -80,11 +83,10 @@
circular: true,
autoplay: true,
interval: 500,
// duration: 500,
topImage: '',
seckillList: [],
timeList: [],
active: 5,
active: 0,
scrollLeft: 0,
interval: 0,
status: 1,
@@ -96,31 +98,36 @@
loading: false,
loadend: false,
pageloading: false,
seckillHeader: []
dataList: [],
returnShow: true,
navH: ''
}
},
onLoad() {
var pages = getCurrentPages();
this.returnShow = pages.length===1?false:true;
// #ifdef H5
this.navH = app.globalData.navHeight-18;
// #endif
this.getSeckillConfig();
},
methods: {
goBack: function() {
uni.navigateBack();
},
getSeckillConfig: function() {
let that = this;
getSeckillHeaderApi().then(res => {
res.data.seckillTime.map(item => {
res.data.map(item => {
item.slide = JSON.parse(item.slide)
})
that.timeList = res.data.seckillTime;
that.active = res.data.seckillTimeIndex;
if (that.timeList.length) {
that.scrollLeft = (that.active - 1.37) * 100
setTimeout(function() {
that.loading = true
}, 2000);
that.seckillList = [],
that.page = 1
that.status = that.timeList[that.active].status
that.getSeckillList();
}
that.dataList = res.data;
that.getSeckillList();
that.seckillList = [];
that.page = 1;
that.status = that.dataList[that.active].status;
that.getSeckillList();
});
},
getSeckillList: function() {
@@ -132,7 +139,7 @@
if (that.loadend) return;
if (that.pageloading) return;
this.pageloading = true
getSeckillList(that.timeList[that.active].id, data).then(res => {
getSeckillList(that.dataList[that.active].id, data).then(res => {
var seckillList = res.data.list;
var loadend = seckillList.length < that.limit;
that.page++;
@@ -155,16 +162,16 @@
that.countDownHour = "00";
that.countDownMinute = "00";
that.countDownSecond = "00";
that.status = that.timeList[that.active].status;
that.status = that.dataList[that.active].status;
that.loadend = false;
that.page = 1;
that.seckillList = [];
// wxh.time(e.currentTarget.dataset.stop, that);
that.getSeckillList();
},
goDetails(item){
goDetails(item) {
uni.navigateTo({
url: '/pages/activity/goods_seckill_details/index?id=' + item.id + '&time=' + this.timeList[this.active].timeSwap + '&status=' + this.status + '&productId=' + item.productId
url: '/pages/activity/goods_seckill_details/index?id=' + item.id
})
}
},
@@ -181,22 +188,42 @@
page {
background-color: #F5F5F5 !important;
}
</style>
<style scoped lang="scss">
.icon-xiangzuo {
font-size: 40rpx;
color: #fff;
position: fixed;
left: 30rpx;
z-index: 99;
transform: translateY(-20%);
}
.flash-sale .header {
width: 710rpx;
height: 300rpx;
margin: -215rpx auto 0 auto;
border-radius: 20rpx;
height: 330rpx;
margin: -276rpx auto 0 auto;
border-radius: 14rpx;
overflow: hidden;
swiper{
height: 330rpx !important;
border-radius: 14rpx;
overflow: hidden;
}
}
.flash-sale .header image {
width: 100%;
height: 100%;
border-radius: 20rpx;
border-radius: 14rpx;
overflow: hidden;
img{
border-radius: 14rpx;
}
}
.flash-sale .seckillList {
padding: 0 20rpx;
padding: 25rpx;
}
.flash-sale .seckillList .priceTag {
@@ -210,9 +237,8 @@
}
.flash-sale .timeLsit {
width: 610rpx;
width: 596rpx;
white-space: nowrap;
margin: 10rpx 0;
}
.flash-sale .timeLsit .item {
@@ -220,10 +246,9 @@
font-size: 20rpx;
color: #666;
text-align: center;
padding: 11rpx 0;
box-sizing: border-box;
height: 96rpx;
margin-right: 35rpx;
margin-right: 30rpx;
width: 130rpx;
}
.flash-sale .timeLsit .item .time {
@@ -233,13 +258,15 @@
}
.flash-sale .timeLsit .item.on .time {
color: #E93323;
color: $theme-color;
}
.flash-sale .timeLsit .item.on .state {
width: 90rpx;
height: 30rpx;
line-height: 30rpx;
border-radius: 15rpx;
width: 128rpx;
/* padding: 0 12rpx; */
background: linear-gradient(90deg, rgba(252, 25, 75, 1) 0%, rgba(252, 60, 32, 1) 100%);
color: #fff;
}
@@ -269,11 +296,11 @@
.flash-sale .list .item {
height: 230rpx;
position: relative;
width: 710rpx;
/* width: 710rpx; */
margin: 0 auto 20rpx auto;
background-color: #fff;
border-radius: 20rpx;
padding: 0 25rpx;
border-radius: 14rpx;
padding: 25rpx 24rpx;
}
.flash-sale .list .item .pictrue {
@@ -290,7 +317,7 @@
}
.flash-sale .list .item .text {
width: 460rpx;
width: 440rpx;
font-size: 30rpx;
color: #333;
height: 166rpx;
@@ -302,7 +329,7 @@
.flash-sale .list .item .text .money {
font-size: 30rpx;
color: #E93323;
color: $theme-color;
}
.flash-sale .list .item .text .money .num {
@@ -330,7 +357,7 @@
.flash-sale .list .item .text .progress {
overflow: hidden;
background-color: #FFEFEF;
background-color: #EEEEEE;
width: 260rpx;
border-radius: 18rpx;
height: 18rpx;
@@ -369,7 +396,10 @@
.flash-sale .saleBox {
width: 100%;
height: 230rpx;
height: 298rpx;
/* #ifdef MP */
height: 300rpx;
/* #endif */
background: rgba(233, 51, 35, 1);
border-radius: 0 0 50rpx 50rpx;
}

View File

File diff suppressed because one or more lines are too long

View File

@@ -2,9 +2,6 @@
<view>
<view class='poster-poster'>
<view class='tip'><text class='iconfont icon-shuoming'></text>提示点击图片即可保存至手机相册 </view>
<!-- <view class='pictrue'>
<image :src='image' mode="widthFix"></image>
</view> -->
<view class='pictrue' v-if="canvasStatus">
<image :src='imagePath'></image>
</view>

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 686 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 929 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 662 B

View File

@@ -1,358 +0,0 @@
<template>
<view class="deliver-goods">
<header>
<view class="order-num acea-row row-between-wrapper">
<view class="num line1">订单号{{ order_id }}</view>
<view class="name line1">
<span class="iconfont icon-yonghu2"></span>{{ delivery.nickname }}
</view>
</view>
<view class="address">
<view class="name">
{{ delivery.real_name
}}<span class="phone">{{ delivery.user_phone }}</span>
</view>
<view>{{ delivery.user_address }}</view>
</view>
<view class="line"><image src="@/static/images/line.jpg" /></view>
</header>
<view class="wrapper">
<view class="item acea-row row-between-wrapper">
<view>发货方式</view>
<view class="mode acea-row row-middle row-right">
<view class="goods" :class="active === index ? 'on' : ''" v-for="(item, index) in types" :key="index" @click="changeType(item, index)">
{{ item.title }}<span class="iconfont icon-xuanzhong2"></span>
</view>
</view>
</view>
<block v-if="logistics.length>0">
<view class="list" v-show="active === 0">
<view class="item acea-row row-between-wrapper">
<view>发货方式</view>
<view class="select-box">
<picker class="pickerBox" @change="bindPickerChange" :value="seIndex" :range="logistics" range-key="name">
<!-- <view></view> -->
<view class="uni-input">{{logistics[seIndex].name}}</view>
</picker>
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view>快递单号</view>
<input type="text" placeholder="填写快递单号" v-model="delivery_id" class="mode" />
</view>
</view>
</block>
<view class="list" v-show="active === 1">
<view class="item acea-row row-between-wrapper">
<view>送货人</view>
<input type="text" placeholder="填写送货人" v-model="delivery_name" class="mode" />
</view>
<view class="item acea-row row-between-wrapper">
<view>送货电话</view>
<input type="text" placeholder="填写送货电话" v-model="delivery_id" class="mode" />
</view>
</view>
</view>
<view style="height:1.2rem;"></view>
<view class="confirm" @click="saveInfo">确认提交</view>
</view>
</template>
<script>
import {
getAdminOrderDelivery,
setAdminOrderDelivery,
getLogistics
} from "@/api/admin";
import { checkPhone } from '@/utils/validate.js'
export default {
name: "GoodsDeliver",
components: {},
props: {},
data: function() {
return {
types: [{
type: "express",
title: "发货"
},
{
type: "send",
title: "送货"
},
{
type: "fictitious",
title: "无需发货"
}
],
active: 0,
order_id: "",
delivery: [],
logistics: [],
delivery_type: "express",
delivery_name: "",
delivery_id: "",
seIndex:0,
};
},
watch: {
"$route.params.oid": function(newVal) {
let that = this;
if (newVal != undefined) {
that.order_id = newVal;
that.getIndex();
}
}
},
onLoad: function(option) {
this.order_id = option.id;
this.getIndex();
this.getLogistics();
},
methods: {
changeType: function(item, index) {
this.active = index;
this.delivery_type = item.type;
this.delivery_name = "";
this.delivery_id = "";
},
getIndex: function() {
let that = this;
getAdminOrderDelivery(that.order_id).then(
res => {
that.delivery = res.data;
},
error => {
that.$dialog.error(error);
}
);
},
getLogistics: function() {
let that = this;
getLogistics().then(
res => {
that.logistics = res.data;
},
error => {
that.$dialog.error(error);
}
);
},
async saveInfo() {
let that = this,
delivery_type = that.delivery_type,
delivery_name = that.logistics[that.seIndex].name,
delivery_id = that.delivery_id,
userName = that.delivery_name,
save = {};
save.order_id = that.order_id;
save.delivery_type = that.delivery_type;
switch (delivery_type) {
case "send":
if(!userName){
return that.$util.Tips({
title:'请填写送货人姓名'
})
}
if(!delivery_id || !checkPhone(delivery_id)){
return that.$util.Tips({
title:'请填写正确的手机号码'
})
}
save.delivery_name = userName;
save.delivery_id = delivery_id;
that.setInfo(save);
break;
case "express":
if(!delivery_id){
return this.$util.Tips({
title:'请填写快递单号'
})
}
save.delivery_name = delivery_name;
save.delivery_id = delivery_id;
that.setInfo(save);
break;
case "fictitious":
that.setInfo(save);
break;
}
},
setInfo: function(item) {
let that = this;
setAdminOrderDelivery(item).then(
res => {
that.$util.Tips({
title:res,
icon:'success',
mask:true
})
setTimeout(res=>{
uni.navigateBack();
},2000)
},
error => {
that.$dialog.error(error);
}
);
},
bindPickerChange(e){
this.seIndex = e.detail.value
}
}
};
</script>
<style lang="scss">
/*发货*/
.deliver-goods header {
width: 100%;
background-color: #fff;
margin-top: 10upx;
}
.deliver-goods header .order-num {
padding: 0 30upx;
border-bottom: 1px solid #f5f5f5;
height: 67upx;
}
.deliver-goods header .order-num .num {
width: 430upx;
font-size: 26upx;
color: #282828;
position: relative;
}
.deliver-goods header .order-num .num:after {
position: absolute;
content: '';
width: 1px;
height: 30upx;
background-color: #ddd;
top: 50%;
margin-top: -15upx;
right: 0;
}
.deliver-goods header .order-num .name {
width: 260upx;
font-size: 26upx;
color: #282828;
text-align: center;
}
.deliver-goods header .order-num .name .iconfont {
font-size: 35upx;
color: #477ef3;
vertical-align: middle;
margin-right: 10upx;
}
.deliver-goods header .address {
font-size: 26upx;
color: #868686;
background-color: #fff;
padding: 30upx;
}
.deliver-goods header .address .name {
font-size: 34upx;
color: #282828;
margin-bottom: 10upx;
}
.deliver-goods header .address .name .phone {
margin-left: 40upx;
}
.deliver-goods header .line {
width: 100%;
height: 3upx;
}
.deliver-goods header .line image {
width: 100%;
height: 100%;
display: block;
}
.deliver-goods .wrapper {
width: 100%;
background-color: #fff;
}
.deliver-goods .wrapper .item {
border-bottom: 1px solid #f0f0f0;
padding: 0 30upx;
height: 96upx;
font-size: 32upx;
color: #282828;
position: relative;
}
.deliver-goods .wrapper .item .mode {
width: 460upx;
height: 100%;
text-align: right;
}
.deliver-goods .wrapper .item .mode .iconfont {
font-size: 30upx;
margin-left: 13upx;
}
.deliver-goods .wrapper .item .mode .goods~.goods {
margin-left: 30upx;
}
.deliver-goods .wrapper .item .mode .goods {
color: #bbb;
}
.deliver-goods .wrapper .item .mode .goods.on {
color: #477ef3;
}
.deliver-goods .wrapper .item .icon-up {
position: absolute;
font-size: 35upx;
color: #2c2c2c;
right: 30upx;
}
.deliver-goods .wrapper .item select {
direction: rtl;
padding-right: 60upx;
position: relative;
z-index: 2;
}
.deliver-goods .wrapper .item input::placeholder {
color: #bbb;
}
.deliver-goods .confirm {
font-size: 32upx;
color: #fff;
width: 100%;
height: 100upx;
background-color: #477ef3;
text-align: center;
line-height: 100upx;
position: fixed;
bottom: 0;
}
.select-box{
flex: 1;
height: 100%;
.pickerBox{
display: flex;
align-items: center;
justify-content: flex-end;
width: 100%;
height: 100%;
}
}
</style>

View File

File diff suppressed because one or more lines are too long

View File

@@ -1,773 +0,0 @@
<template>
<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.order_id }}</view>
<view>
<span class="time">{{ orderInfo.add_time }}</span>
</view>
</view>
</view>
<view class="remarks acea-row row-between-wrapper" v-if="goname != 'looks'">
<span class="iconfont icon-zhinengkefu-"></span>
<input type="button" class="line1" style="text-align: left;" :value="
orderInfo.remark ? orderInfo.remark : '订单未备注,点击添加备注信息'
"
@click="modify('1')" />
</view>
<view class="orderingUser acea-row row-middle">
<span class="iconfont icon-yonghu2"></span>{{ orderInfo.nickname }}
</view>
<view class="address">
<view class="name">
{{ orderInfo.real_name
}}<span class="phone">{{ orderInfo.user_phone }}</span>
</view>
<view>{{ orderInfo.user_address }}</view>
</view>
<view class="line">
<image src="/static/images/line.jpg" />
</view>
<view class="pos-order-goods">
<navigator :url="`/pages/goods_details/index?id=${item.cart_info.productInfo.product_id}`" hover-class="none" class="goods acea-row row-between-wrapper" v-for="(item, index) in orderInfo._info" :key="index">
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="item.cart_info.productInfo.image" />
</view>
<view class="text acea-row row-between row-column">
<view class="info line2">
{{ item.cart_info.productInfo.store_name }}
</view>
<view class="attr">{{ item.cart_info.productInfo.suk }}</view>
</view>
</view>
<view class="money">
<view class="x-money">{{ item.cart_info.productInfo.price }}</view>
<view class="num">x{{ item.cart_info.cart_num }}</view>
<view class="y-money">{{ item.cart_info.productInfo.ot_price }}</view>
</view>
</navigator>
</view>
<view class="public-total">
{{ orderInfo.total_num }}件商品应支付
<span class="money">{{ orderInfo.pay_price }}</span> ( 邮费 ¥{{
orderInfo.pay_postage
}}
)
</view>
<view class="wrapper">
<view class="item acea-row row-between">
<view>订单编号</view>
<view class="conter acea-row row-middle row-right">
{{ orderInfo.order_id
}}
<!-- #ifdef H5 -->
<span class="copy copy-data" :data-clipboard-text="orderInfo.order_id">复制</span>
<!-- #endif -->
<!-- #ifdef MP -->
<span class="copy copy-data" @click="copyNum(orderInfo.order_id)">复制</span>
<!-- #endif -->
</view>
</view>
<view class="item acea-row row-between">
<view>下单时间</view>
<view class="conter">{{ orderInfo.add_time }}</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.total_price }}</view>
</view>
<view class="item acea-row row-between">
<view>优惠券抵扣</view>
<view class="conter">-{{ orderInfo.coupon_price }}</view>
</view>
<view class="item acea-row row-between">
<view>运费</view>
<view class="conter">{{ orderInfo.freight_price }}</view>
</view>
<view class="actualPay acea-row row-right">
实付款<span class="money font-color-red">{{ orderInfo.pay_price }}</span>
</view>
</view>
<view class="wrapper" v-if="
orderInfo.delivery_type != 'fictitious' && orderInfo._status._type === 2
">
<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 class="copy copy-data" :data-clipboard-text="orderInfo.delivery_id">复制</span>
</view>
</view>
</view>
<view style="height:120upx;"></view>
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'">
<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" @click="modify('1')">订单备注</view>
<view class="bnt cancel" v-if="orderInfo.pay_type === 'offline' && orderInfo.paid === 0" @click="offlinePay">
确认付款
</view>
<navigator class="bnt delivery" v-if="types == 1" :url="'/pages/admin/delivery/index?id='+orderInfo.order_id">去发货</navigator>
</view>
<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";
// #ifdef H5
import ClipboardJS from "@/plugin/clipboard/clipboard.js";
// #endif
import {
getAdminOrderDetail,
setAdminOrderPrice,
setAdminOrderRemark,
setOfflinePay,
setOrderRefund
} from "@/api/admin";
// import { required, num } from "@utils/validate";
// import { validatorDefaultCatch } from "@utils/dialog";
import {
isMoney
} from '@/utils/validate.js'
export default {
name: "AdminOrder",
components: {
PriceChange
},
props: {},
data: function() {
return {
order: false,
change: false,
order_id: "",
orderInfo: {
_status: {}
},
status: "",
title: "",
payType: "",
types: "",
clickNum: 1,
goname:''
};
},
watch: {
"$route.params.oid": function(newVal) {
let that = this;
if (newVal != undefined) {
that.order_id = newVal;
that.getIndex();
}
}
},
onLoad: function(option) {
let self = this
this.order_id = option.id;
this.goname = option.goname
this.getIndex();
// #ifdef H5
this.$nextTick(function() {
var clipboard = new ClipboardJS('.copy-data');
// var copybtn = document.getElementsByClassName("copy-data");
// var clipboard = new Clipboard(copybtn);
clipboard.on('success', function(e) {
self.$util.Tips({
title:'复制成功'
})
});
clipboard.on('error', function(e) {
self.$util.Tips({
title:'复制失败'
})
});
});
// #endif
},
methods: {
more: function() {
this.order = !this.order;
},
modify: function(status) {
this.change = true;
this.status = status;
},
changeclose: function(msg) {
this.change = msg;
},
getIndex: function() {
let that = this;
getAdminOrderDetail(that.order_id).then(
res => {
that.orderInfo = res.data;
that.types = res.data._status._type;
that.title = res.data._status._title;
that.payType = res.data._status._payType;
},
err => {
that.$util.Tips({
title: err
}, {
tab: 3,
url: 1
});
}
);
},
async savePrice(opt) {
let that = this,
data = {},
price = opt.price,
refund_price = opt.refund_price,
refund_status = that.orderInfo.refund_status,
remark = opt.remark;
data.order_id = that.orderInfo.order_id;
if (that.status == 0 && refund_status === 0) {
if (!isMoney(price)) {
return that.$util.Tips({
title: '请输入正确的金额'
});
}
data.price = price;
setAdminOrderPrice(data).then(
function() {
that.change = false;
that.$util.Tips({
title: '改价成功',
icon: 'success'
})
that.getIndex();
},
function() {
that.change = false;
that.$util.Tips({
title: '改价失败',
icon: 'none'
})
}
);
} else if (that.status == 0 && refund_status === 1) {
if (!isMoney(refund_price)) {
return that.$util.Tips({
title: '请输入正确的金额'
});
}
data.price = refund_price;
data.type = opt.type;
setOrderRefund(data).then(
res => {
that.change = false;
that.$util.Tips({
title: res
});
that.getIndex();
},
err => {
that.change = false;
that.$util.Tips({
title: err
});
}
);
} else {
if (!remark) {
return this.$util.Tips({
title: '请输入备注'
})
}
data.remark = remark;
setAdminOrderRemark(data).then(
res => {
that.change = false;
this.$util.Tips({
title: res,
icon: 'success'
})
that.getIndex();
},
err => {
that.change = false;
that.$util.Tips({
title: err
});
}
);
}
},
offlinePay: function() {
setOfflinePay({
order_id: this.orderInfo.order_id
}).then(
res => {
this.$util.Tips({
title: res,
icon: 'success'
});
this.getIndex();
},
err => {
this.$util.Tips({
title: err
});
}
);
},
// #ifdef MP
copyNum(id) {
uni.setClipboardData({
data: id,
success: function() {
console.log('success');
}
});
},
// #endif
// #ifdef H5
webCopy(item, index) {
let items = item
let indexs = index
let self = this
if (self.clickNum == 1) {
self.clickNum += 1
self.webCopy(items, indexs)
}
}
// #endif
}
};
</script>
<style>
/*商户管理订单详情*/
.pos-order-details .header {
background: linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
background: -webkit-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
background: -moz-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
}
.pos-order-details .header .state {
font-size: 36upx;
color: #fff;
}
.pos-order-details .header .data {
margin-left: 35upx;
font-size: 28upx;
}
.pos-order-details .header .data .order-num {
font-size: 30upx;
margin-bottom: 8upx;
}
.pos-order-details .remarks {
width: 100%;
height: 86upx;
background-color: #fff;
padding: 0 30upx;
}
.pos-order-details .remarks .iconfont {
font-size: 40upx;
color: #2a7efb;
}
.pos-order-details .remarks input {
width: 630upx;
height: 100%;
font-size: 30upx;
}
.pos-order-details .remarks input::placeholder {
color: #666;
}
.pos-order-details .orderingUser {
font-size: 26upx;
color: #282828;
padding: 0 30upx;
height: 67upx;
background-color: #fff;
margin-top: 16upx;
border-bottom: 1px solid #f5f5f5;
}
.pos-order-details .orderingUser .iconfont {
font-size: 40upx;
color: #2a7efb;
margin-right: 15upx;
}
.pos-order-details .address {
margin-top: 0;
}
.pos-order-details .pos-order-goods {
margin-top: 17upx;
}
.pos-order-details .footer .more {
font-size: 27upx;
color: #aaa;
width: 100upx;
height: 64upx;
text-align: center;
line-height: 64upx;
margin-right: 25upx;
position: relative;
}
.pos-order-details .footer .delivery {
background: linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
background: -webkit-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
background: -moz-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
}
.pos-order-details .footer .more .order .arrow {
width: 0;
height: 0;
border-left: 11upx solid transparent;
border-right: 11upx solid transparent;
border-top: 20upx solid #e5e5e5;
position: absolute;
left: 15upx;
bottom: -18upx;
}
.pos-order-details .footer .more .order .arrow:before {
content: '';
width: 0;
height: 0;
border-left: 9upx solid transparent;
border-right: 9upx solid transparent;
border-top: 19upx solid #fff;
position: absolute;
left: -10upx;
bottom: 0;
}
.pos-order-details .footer .more .order {
width: 200upx;
background-color: #fff;
border: 1px solid #eee;
border-radius: 10upx;
position: absolute;
top: -200upx;
z-index: 9;
}
.pos-order-details .footer .more .order .item {
height: 77upx;
line-height: 77upx;
}
.pos-order-details .footer .more .order .item~.item {
border-top: 1px solid #f5f5f5;
}
.pos-order-details .footer .more .moreName {
width: 100%;
height: 100%;
}
/*订单详情*/
.order-details .header {
padding: 0 30upx;
height: 150upx;
}
.order-details .header.on {
background-color: #666 !important;
}
.order-details .header .pictrue {
width: 110upx;
height: 110upx;
}
.order-details .header .pictrue image {
width: 100%;
height: 100%;
}
.order-details .header .data {
color: rgba(255, 255, 255, 0.8);
font-size: 24upx;
margin-left: 27upx;
}
.order-details .header.on .data {
margin-left: 0;
}
.order-details .header .data .state {
font-size: 30upx;
font-weight: bold;
color: #fff;
margin-bottom: 7upx;
}
/* .order-details .header .data .time{margin-left:20upx;} */
.order-details .nav {
background-color: #fff;
font-size: 26upx;
color: #282828;
padding: 25upx 0;
}
.order-details .nav .navCon {
padding: 0 40upx;
}
.order-details .nav .navCon .on {
font-weight: bold;
color: #e93323;
}
.order-details .nav .progress {
padding: 0 65upx;
margin-top: 10upx;
}
.order-details .nav .progress .line {
width: 100upx;
height: 2upx;
background-color: #939390;
}
.order-details .nav .progress .iconfont {
font-size: 25upx;
color: #939390;
margin-top: -2upx;
width: 30upx;
height: 30upx;
line-height: 33upx;
text-align: center;
margin-right: 0 !important;
}
.order-details .address {
font-size: 26upx;
color: #868686;
background-color: #fff;
padding: 25upx 30upx 30upx 30upx;
}
.order-details .address .name {
font-size: 30upx;
color: #282828;
margin-bottom: 0.1rem;
}
.order-details .address .name .phone {
margin-left: 40upx;
}
.order-details .line {
width: 100%;
height: 3upx;
}
.order-details .line image {
width: 100%;
height: 100%;
display: block;
}
.order-details .wrapper {
background-color: #fff;
margin-top: 12upx;
padding: 30upx;
}
.order-details .wrapper .item {
font-size: 28upx;
color: #282828;
}
.order-details .wrapper .item~.item {
margin-top: 20upx;
}
.order-details .wrapper .item .conter {
color: #868686;
width: 500upx;
text-align: right;
}
.order-details .wrapper .item .conter .copy {
font-size: 20rpx;
color: #333;
border-radius: 3rpx;
border: 1px solid #666;
padding: 0rpx 15rpx;
margin-left: 24rpx;
height: 40rpx;
}
.order-details .wrapper .actualPay {
border-top: 1upx solid #eee;
margin-top: 30upx;
padding-top: 30upx;
}
.order-details .wrapper .actualPay .money {
font-weight: bold;
font-size: 30upx;
}
.order-details .footer {
width: 100%;
height: 100upx;
position: fixed;
bottom: 0;
left: 0;
background-color: #fff;
padding: 0 30upx;
border-top: 1px solid #eee;
}
.order-details .footer .bnt {
width: auto;
height: 60upx;
line-height: 60upx;
text-align: center;
line-height: upx;
border-radius: 50upx;
color: #fff;
font-size: 27upx;
padding: 0 3%;
}
.order-details .footer .bnt.cancel {
color: #aaa;
border: 1px solid #ddd;
}
.order-details .footer .bnt.default {
color: #444;
border: 1px solid #444;
}
.order-details .footer .bnt~.bnt {
margin-left: 18upx;
}
.pos-order-goods {
padding: 0 30upx;
background-color: #fff;
}
.pos-order-goods .goods {
height: 185upx;
}
.pos-order-goods .goods~.goods {
border-top: 1px dashed #e5e5e5;
}
.pos-order-goods .goods .picTxt {
width: 515upx;
}
.pos-order-goods .goods .picTxt .pictrue {
width: 130upx;
height: 130upx;
}
.pos-order-goods .goods .picTxt .pictrue image {
width: 100%;
height: 100%;
border-radius: 6upx;
}
.pos-order-goods .goods .picTxt .text {
width: 365upx;
height: 130upx;
}
.pos-order-goods .goods .picTxt .text .info {
font-size: 28upx;
color: #282828;
}
.pos-order-goods .goods .picTxt .text .attr {
font-size: 24upx;
color: #999;
}
.pos-order-goods .goods .money {
width: 164upx;
text-align: right;
font-size: 28upx;
}
.pos-order-goods .goods .money .x-money {
color: #282828;
}
.pos-order-goods .goods .money .num {
color: #ff9600;
margin: 5upx 0;
}
.pos-order-goods .goods .money .y-money {
color: #999;
text-decoration: line-through;
}
.public-total {
font-size: 28upx;
color: #282828;
border-top: 1px solid #eee;
height: 92upx;
line-height: 92upx;
text-align: right;
padding: 0 30upx;
background-color: #fff;
}
.public-total .money {
color: #ff4c3c;
}
</style>

View File

@@ -1,466 +0,0 @@
<template>
<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, index) in list" :key="index">
<view class="order-num acea-row row-middle" @click="toDetail(item)">
订单号{{ item.order_id }}
<span class="time">下单时间{{ item.add_time }}</span>
</view>
<view class="pos-order-goods" v-for="(val, key) in item._info" :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.cart_info.productInfo.image" />
</view>
<view class="text acea-row row-between row-column">
<view class="info line2">
{{ val.cart_info.productInfo.store_name }}
</view>
<view class="attr" v-if="val.cart_info.productInfo.suk">
{{ val.cart_info.productInfo.suk }}
</view>
</view>
</view>
<view class="money">
<view class="x-money">{{ val.cart_info.productInfo.price }}</view>
<view class="num">x{{ val.cart_info.cart_num }}</view>
<view class="y-money">
{{ val.cart_info.productInfo.ot_price }}
</view>
</view>
</view>
</view>
<view class="public-total">
{{ item.total_num }}件商品应支付
<span class="money">{{ item.pay_price }}</span> ( 邮费 ¥{{
item.total_postage
}}
)
</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, 1)">订单备注</view>
<view class="bnt" @click="modify(item, 0)" v-if="where.status == -3 && item.refund_status === 1">
立即退款
</view>
<view class="bnt cancel" v-if="item.pay_type === 'offline' && item.paid === 0" @click="offlinePay(item)">
确认付款
</view>
<navigator class="bnt" v-if="where.status == 1" :url="'/pages/admin/delivery/index?id='+item.order_id">去发货
</navigator>
</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 {
getAdminOrderList,
setAdminOrderPrice,
setAdminOrderRemark,
setOfflinePay,
setOrderRefund
} from "@/api/admin";
import Loading from '@/components/Loading/index'
import PriceChange from '@/components/PriceChange/index'
import { isMoney } from '@/utils/validate.js'
export default {
name: "AdminOrderList",
components: {
Loading,
PriceChange
},
data() {
return {
current: "",
change: false,
types: 0,
where: {
page: 1,
limit: 10,
status: 0
},
list: [],
loaded: false,
loading: false,
orderInfo: {},
status: ""
};
},
watch: {
"$route.params.types": function(newVal) {
let that = this;
if (newVal != undefined) {
that.where.status = newVal;
that.init();
}
},
types: function() {
this.getIndex();
}
},
onLoad(option) {
this.where.status = option.types
this.current = "";
this.getIndex();
},
methods: {
// 获取数据
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 => {
that.$dialog.error(err);
}
);
},
// 初始化
init: function() {
this.list = [];
this.where.page = 1;
this.loaded = false;
this.loading = false;
this.getIndex();
this.current = "";
},
// 导航切换
changeStatus(val) {
if (this.where.status != val) {
this.where.status = val;
this.init();
}
},
// 商品操作
modify: function(item, status) {
let temp = status.toString()
this.change = true;
this.orderInfo = item;
this.status = temp;
},
changeclose: function(msg) {
this.change = msg;
},
async savePrice(opt) {
let that = this,
data = {},
price = opt.price,
refund_price = opt.refund_price,
refund_status = that.orderInfo.refund_status,
remark = opt.remark;
data.order_id = that.orderInfo.order_id;
if (that.status == 0 && refund_status === 0) {
if(!isMoney(price)){
return that.$util.Tips({title: '请输入正确的金额'});
}
data.price = price;
setAdminOrderPrice(data).then(
function() {
that.change = false;
that.$util.Tips({
title:'改价成功',
icon:'success'
})
that.init();
},
function() {
that.change = false;
that.$util.Tips({
title:'改价失败',
icon:'none'
})
}
);
} else if (that.status == 0 && refund_status === 1) {
if(!isMoney(refund_price)){
return that.$util.Tips({title: '请输入正确的金额'});
}
data.price = refund_price;
data.type = opt.type;
setOrderRefund(data).then(
res => {
that.change = false;
that.$util.Tips({title: res});
that.init();
},
err => {
that.change = false;
that.$util.Tips({title: err});
}
);
} else {
if(!remark){
return this.$util.Tips({
title:'请输入备注'
})
}
data.remark = remark;
setAdminOrderRemark(data).then(
res => {
that.change = false;
this.$util.Tips({
title:res,
icon:'success'
})
that.init();
},
err => {
that.change = false;
that.$util.Tips({title: err});
}
);
}
},
toDetail(item){
uni.navigateTo({
url:`/pages/admin/orderDetail/index?id=${item.order_id}`
})
}
},
onReachBottom() {
this.getIndex()
}
}
</script>
<style>
.pos-order-list .nav {
width: 100%;
height: 96upx;
background-color: #fff;
font-size: 30upx;
color: #282828;
position: fixed;
top: 0;
left: 0;
z-index: 9999;
}
.pos-order-list .nav .item.on {
color: #2291f8;
}
.pos-order-list .list {
margin-top: 120upx;
}
.pos-order-list .list .item {
background-color: #fff;
width: 100%;
}
.pos-order-list .list .item~.item {
margin-top: 24upx;
}
.pos-order-list .list .item .order-num {
height: 124upx;
border-bottom: 1px solid #eee;
font-size: 30upx;
font-weight: bold;
color: #282828;
padding: 0 30upx;
}
.pos-order-list .list .item .order-num .time {
font-size: 26upx;
font-weight: normal;
color: #999;
margin-top: -40upx;
}
.pos-order-list .list .item .operation {
padding: 20upx 30upx;
margin-top: 3upx;
}
.pos-order-list .list .item .operation .more {
position: relative;
}
.pos-order-list .list .item .operation .icon-gengduo {
font-size: 50upx;
color: #aaa;
}
.pos-order-list .list .item .operation .order .arrow {
width: 0;
height: 0;
border-left: 11upx solid transparent;
border-right: 11upx solid transparent;
border-top: 20upx solid #e5e5e5;
position: absolute;
left: 15upx;
bottom: -18upx;
}
.pos-order-list .list .item .operation .order .arrow:before {
content: '';
width: 0;
height: 0;
border-left: 7upx solid transparent;
border-right: 7upx solid transparent;
border-top: 20upx solid #fff;
position: absolute;
left: -7upx;
bottom: 0;
}
.pos-order-list .list .item .operation .order {
width: 200upx;
background-color: #fff;
border: 1px solid #eee;
border-radius: 10upx;
position: absolute;
top: -100upx;
z-index: 9;
}
.pos-order-list .list .item .operation .order .items {
height: 77upx;
line-height: 77upx;
text-align: center;
}
.pos-order-list .list .item .operation .order .items~.items {
border-top: 1px solid #f5f5f5;
}
.pos-order-list .list .item .operation .bnt {
font-size: 28upx;
color: #5c5c5c;
width: 170upx;
height: 60upx;
border-radius: 30upx;
border: 1px solid #bbb;
text-align: center;
line-height: 60upx;
}
.pos-order-list .list .item .operation .bnt~.bnt {
margin-left: 14upx;
}
.pos-order-goods {
padding: 0 30upx;
background-color: #fff;
}
.pos-order-goods .goods {
height: 185upx;
}
.pos-order-goods .goods~.goods {
border-top: 1px dashed #e5e5e5;
}
.pos-order-goods .goods .picTxt {
width: 515upx;
}
.pos-order-goods .goods .picTxt .pictrue {
width: 130upx;
height: 130upx;
}
.pos-order-goods .goods .picTxt .pictrue image {
width: 100%;
height: 100%;
border-radius: 6upx;
}
.pos-order-goods .goods .picTxt .text {
width: 365upx;
height: 130upx;
}
.pos-order-goods .goods .picTxt .text .info {
font-size: 28upx;
color: #282828;
}
.pos-order-goods .goods .picTxt .text .attr {
font-size: 24upx;
color: #999;
}
.pos-order-goods .goods .money {
width: 164upx;
text-align: right;
font-size: 28upx;
}
.pos-order-goods .goods .money .x-money {
color: #282828;
}
.pos-order-goods .goods .money .num {
color: #ff9600;
margin: 5upx 0;
}
.pos-order-goods .goods .money .y-money {
color: #999;
text-decoration: line-through;
}
.public-total {
font-size: 28upx;
color: #282828;
border-top: 1px solid #eee;
height: 92upx;
line-height: 92upx;
text-align: right;
padding: 0 30upx;
background-color: #fff;
}
.public-total .money {
color: #ff4c3c;
}
</style>

View File

File diff suppressed because one or more lines are too long

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 KiB

View File

@@ -1,631 +0,0 @@
<template>
<div class="statistical-page" ref="container">
<div class="navs">
<div class="list">
<div class="item" :class="time == 'today' ? 'on' : ''" @click="setTime('today')">
今天
</div>
<div class="item" :class="time == 'yesterday' ? 'on' : ''" @click="setTime('yesterday')">
昨天
</div>
<div class="item" :class="time == 'seven' ? 'on' : ''" @click="setTime('seven')">
最近7天
</div>
<div class="item" :class="time == 'month' ? 'on' : ''" @click="setTime('month')">
本月
</div>
<div class="item" :class="time == 'date' ? 'on' : ''" @click="dateTitle">
<!-- <span class="iconfont icon-xiangxia"></span>
<span v-for="(value, index) in renderValues" :key="index">
{{ value }}</span
> -->
自定义
</div>
</div>
</div>
<div class="wrapper">
<div class="title">
{{ title }}{{ this.where.type == 1 ? "营业额(元)" : "订单量(份)" }}
</div>
<div class="money">{{ time_price }}</div>
<div class="increase acea-row row-between-wrapper">
<div>
{{ title }}增长率<span :class="increase_time_status === 1 ? 'red' : 'green'">{{ increase_time_status === 1 ? "" : "-" }}{{ growth_rate }}%
<span class="iconfont" :class="
increase_time_status === 1
? 'icon-xiangshang1'
: 'icon-xiangxia2'
"></span></span>
</div>
<div>
{{ title }}增长<span :class="increase_time_status === 1 ? 'red' : 'green'">{{ increase_time_status === 1 ? "" : "-" }}{{ increase_time }}
<span class="iconfont" :class="
increase_time_status === 1
? 'icon-xiangshang1'
: 'icon-xiangxia2'
"></span></span>
</div>
</div>
</div>
<div class="chart">
<div class="chart-title">
单位{{where.type == 1?'元':'份'}}
</div>
<canvas canvas-id="canvasLineA" id="canvasLineA" class="charts" disable-scroll=true @touchstart="touchLineA"
@touchmove="moveLineA" @touchend="touchEndLineA"></canvas>
</div>
<div class="public-wrapper">
<div class="title">
<span class="iconfont icon-xiangxishuju"></span>详细数据
</div>
<div class="nav acea-row row-between-wrapper">
<div class="data">日期</div>
<div class="browse">订单量</div>
<div class="turnover">成交额</div>
</div>
<div class="conter">
<div class="item acea-row row-between-wrapper" v-for="(item, index) in list" :key="index">
<div class="data">{{ item.time }}</div>
<div class="browse">{{ item.count }}</div>
<div class="turnover">{{ item.price }}</div>
</div>
</div>
</div>
<uni-calendar ref="calendar" :date="info.date" :insert="info.insert" :lunar="info.lunar" :startDate="info.startDate" :endDate="info.endDate" :range="info.range" @confirm="confirm" :showMonth="info.showMonth" />
<div class="mask" @touchmove.prevent v-show="current === true" @click="close"></div>
<!-- <Loading :loaded="loaded" :loading="loading"></Loading> -->
</div>
</template>
<script>
import uCharts from '@/components/ucharts/ucharts'
import uniCalendar from '@/components/uni-calendar/uni-calendar.vue'
var canvaLineA = null;
// import Calendar from 'mpvue-calendar'
// #ifdef MP-WEIXIN
// import 'mpvue-calendar/src/style.css
// #endif
// #ifdef H5
// import 'mpvue-calendar/src/browser-style.css'
// #endif
import {
getStatisticsMonth,
getStatisticsTime
} from "@/api/admin";
// import Loading from "@components/Loading";
const year = new Date().getFullYear();
const month = new Date().getMonth() + 1;
const day = new Date().getDate();
export default {
name: "Statistics",
components: {
// Calendar,
// uCharts
uniCalendar
},
props: {},
data: function() {
return {
value: [
[year, month, day - 1],
[year, month, day]
],
isrange: true,
weekSwitch: false,
ismulti: false,
monFirst: true,
clean: false, //简洁模式
lunar: false, //显示农历
renderValues: [],
monthRange: [],
current: false,
where: {
start: "",
stop: "",
type: ""
},
types: "", //类型|order=订单数|price=营业额
time: "", //时间|today=今天|yesterday=昨天|month=本月
title: "", //时间|today=今天|yesterday=昨天|month=本月
growth_rate: "", //增长率
increase_time: "", //增长率
increase_time_status: "", //增长率
time_price: "", //增长率
loaded: false,
loading: false,
filter: {
page: 1,
limit: 10,
start: "",
stop: ""
},
list: [],
// charts
cWidth: '',
cHeight: '',
pixelRatio: 1,
textarea: '',
"LineA": {
"categories": ["2012", "2013", "2014", "2015", "2016", "2017"],
"series": [{
"data": [35, 8, 25, 37, 4, 20]
}]
},
info: {
startDate: '',
endDate: '',
lunar: false,
range: true,
insert: false,
selected: [],
showMonth:false
}
};
},
watch: {
"$route.params": function(newVal) {
var that = this;
if (newVal != undefined) {
that.setType(newVal.type);
that.setTime(newVal.time);
that.getIndex();
}
}
},
onLoad: function(options) {
this.setType(options.type);
this.setTime(options.time);
this.cWidth = uni.upx2px(690);
this.cHeight = uni.upx2px(500);
// this.handelRenderValues();
// this.getIndex();
this.getInfo();
// this.$scroll(this.$refs.container, () => {
// !this.loading && this.getInfo();
// });
},
computed: {
monthRangeText() {
return this.monthRange.length ? "固定" : "指定范围";
}
},
methods: {
getIndex: function() {
let tempDay = []
let tempNum = []
var that = this;
getStatisticsTime(that.where).then(
res => {
var _info = res.data.chart,
day = [],
num = [];
_info.forEach(function(item) {
day.push(item.time);
num.push(item.num);
});
that.growth_rate = res.data.growth_rate;
that.increase_time = res.data.increase_time;
that.increase_time_status = res.data.increase_time_status;
that.time_price = res.data.time;
res.data.chart.forEach((item, index) => {
tempDay.push(item.time)
tempNum.push(item.num)
})
that.LineA.categories = tempDay
that.LineA.series[0].data = tempNum
that.showLineA("canvasLineA", that.LineA);
},
error => {
that.$dialog.error(error);
}
);
},
setTime: function(time) {
let self = this
this.time = time;
var year = new Date().getFullYear(),
month = new Date().getMonth() + 1,
day = new Date().getDate();
this.list = [];
this.filter.page = 1;
this.loaded = false;
this.loading = false;
switch (time) {
case "today":
this.where.start =
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
1000;
this.where.stop =
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
1000 +
24 * 60 * 60 -
1;
this.title = "今日";
this.getIndex();
this.getInfo();
break;
case "yesterday":
this.where.start =
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
1000 -
24 * 60 * 60;
this.where.stop =
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
1000 -
1;
this.title = "昨日";
this.getIndex();
this.getInfo();
break;
case "month":
this.where.start =
new Date(year, new Date().getMonth(), 1).getTime() / 1000;
this.where.stop = new Date(year, month, 1).getTime() / 1000 - 1;
this.title = "本月";
this.getIndex();
this.getInfo();
break;
case "seven":
this.where.start =
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
1000 +
24 * 60 * 60 -
7 * 3600 * 24;
this.where.stop =
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
1000 +
24 * 60 * 60 -
1;
this.title = "七日";
this.getIndex();
this.getInfo();
break;
}
},
setType: function(type) {
switch (type) {
case "price":
this.where.type = 1;
break;
case "order":
this.where.type = 2;
break;
}
},
dateTitle: function() {
this.$refs.calendar.open()
this.time = 'date'
// this.current = true;
},
close: function() {
this.current = false;
},
getInfo: function() {
var that = this;
if (that.loading || that.loaded) return;
that.loading = true;
that.filter.start = that.where.start;
that.filter.stop = that.where.stop;
getStatisticsMonth(that.filter).then(
res => {
that.loading = false;
that.loaded = res.data.length < that.filter.limit;
that.list.push.apply(that.list, res.data);
that.filter.page = that.filter.page + 1;
},
error => {
that.$dialog.message(error);
}
);
},
// 创建charts
showLineA(canvasId, chartData) {
let _self = this
canvaLineA = new uCharts({
$this: _self,
canvasId: canvasId,
type: 'line',
fontSize: 11,
padding: [15, 15, 0, 15],
legend: {
show: false,
padding: 5,
lineHeight: 11,
margin: 5,
},
dataLabel: true,
dataPointShape: true,
dataPointShapeType: 'hollow',
background: '#FFFFFF',
pixelRatio: _self.pixelRatio,
categories: chartData.categories,
series: chartData.series,
animation: true,
enableScroll: true, //开启图表拖拽功能
xAxis: {
disableGrid: false,
type: 'grid',
gridType: 'dash',
itemCount: 4,
scrollShow: true,
scrollAlign: 'left'
},
yAxis: {
//disabled:true
gridType: 'dash',
splitNumber: 8,
min: 0,
max: 30,
format: (val) => {
return val.toFixed(0)
} //如不写此方法Y轴刻度默认保留两位小数
},
width: _self.cWidth * _self.pixelRatio,
height: _self.cHeight * _self.pixelRatio,
extra: {
line: {
type: 'straight'
}
},
});
},
// charts触摸事件
touchLineA(e) {
canvaLineA.scrollStart(e);
},
moveLineA(e) {
canvaLineA.scroll(e);
},
touchEndLineA(e) {
canvaLineA.scrollEnd(e);
},
// 日历确定
confirm(e) {
let self = this
if(e.range.after && e.range.before){
let star = new Date(e.range.after).getTime()/1000
let stop = new Date(e.range.before).getTime()/1000
self.where.start = star
self.where.stop = stop
self.list = [];
self.filter.page = 1;
self.loaded = false;
self.loading = false;
Promise.all([self.getIndex(),self.getInfo()]);
}
},
},
onReachBottom() {
this.getInfo();
}
};
</script>
<style>
/*交易额统计*/
.statistical-page .navs {
width: 100%;
height: 96upx;
background-color: #fff;
overflow: hidden;
line-height: 96upx;
position: fixed;
top: 0;
left: 0;
z-index: 9;
}
.statistical-page .navs .list {
overflow-y: hidden;
overflow-x: auto;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
width: 100%;
}
.statistical-page .navs .item {
font-size: 32upx;
color: #282828;
margin-left: 60upx;
display: inline-block;
}
.statistical-page .navs .item.on {
color: #2291f8;
}
.statistical-page .navs .item .iconfont {
font-size: 25upx;
margin-left: 13upx;
}
.statistical-page .wrapper {
width: 740upx;
background-color: #fff;
border-radius: 10upx;
margin: 119upx auto 0 auto;
padding: 50upx 60upx;
}
.statistical-page .wrapper .title {
font-size: 30upx;
color: #999;
text-align: center;
}
.statistical-page .wrapper .money {
font-size: 72upx;
color: #fba02a;
text-align: center;
margin-top: 10upx;
}
.statistical-page .wrapper .increase {
font-size: 28upx;
color: #999;
margin-top: 20upx;
}
.statistical-page .wrapper .increase .red {
color: #ff6969;
}
.statistical-page .wrapper .increase .green {
color: #1abb1d;
}
.statistical-page .wrapper .increase .iconfont {
font-size: 23upx;
margin-left: 15upx;
}
.statistical-page .chart {
width: 690upx;
background-color: #fff;
border-radius: 10upx;
margin: 23upx auto 0 auto;
/* padding: 25upx 22upx 0 22upx; */
}
.statistical-page .chart .chart-title{
padding:20upx 20upx 10upx;
font-size: 26upx;
color: #999;
}
.statistical-page .chart canvas {
width: 100%;
height: 530rpx;
}
.statistical-page .chart .company {
font-size: 26upx;
color: #999;
}
.yd-confirm {
background-color: #fff;
font-size: unset;
width: 540upx;
height: 250upx;
border-radius: 40upx;
}
.yd-confirm-hd {
text-align: center;
}
.yd-confirm-title {
color: #030303;
font-weight: bold;
font-size: 36upx;
}
.yd-confirm-bd {
text-align: center;
font-size: 28upx;
color: #333333;
}
.yd-confirm-ft {
line-height: 90upx;
margin-top: 14px;
border-top: 1upx solid #eee;
}
.yd-confirm-ft>a {
color: #e93323;
}
.yd-confirm-ft>a.primary {
border-left: 1upx solid #eee;
color: #e93323;
}
.echarts {
width: 100%;
height: 550upx;
}
.calendar-wrapper {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index: 777;
transform: translate3d(0, 100%, 0);
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
}
.calendar-wrapper.on {
transform: translate3d(0, 0, 0);
}
.statistical-page .wrapper .increase {
font-size: 26upx;
}
.statistical-page .wrapper .increase .iconfont {
margin-left: 0;
}
.public-wrapper .title {
font-size: 30upx;
color: #282828;
padding: 0 30upx;
margin-bottom: 20upx;
}
.public-wrapper .title .iconfont {
color: #2291f8;
font-size: 40upx;
margin-right: 13upx;
vertical-align: middle;
}
.public-wrapper {
margin: 18upx auto 0 auto;
width: 690upx;
background-color: #fff;
border-radius: 10upx;
padding-top: 25upx;
}
.public-wrapper .nav {
padding: 0 30upx;
height: 70upx;
line-height: 70upx;
font-size: 24upx;
color: #999;
}
.public-wrapper .data {
width: 210upx;
text-align: left;
}
.public-wrapper .browse {
width: 192upx;
text-align: right;
}
.public-wrapper .turnover {
width: 227upx;
text-align: right;
}
.public-wrapper .conter {
padding: 0 30upx;
}
.public-wrapper .conter .item {
border-bottom: 1px solid #f7f7f7;
height: 70upx;
font-size: 24upx;
}
.public-wrapper .conter .item .turnover {
color: #d84242;
}
</style>

View File

@@ -25,7 +25,6 @@
wechat.auth(code, state)
.then(() => {
getUserInfo().then(res => {
that.$store.commit("SETUID", res.data.uid);
location.href = decodeURIComponent(
decodeURIComponent(option.back_url)
);

View File

@@ -63,7 +63,6 @@ export default {
if (this.type === "1") {
this.name = "精品推荐";
this.icon = "icon-jingpintuijian";
// document.title = "精品推荐";
uni.setNavigationBarTitle({
title:"精品推荐"
})

View File

@@ -266,7 +266,6 @@
import {
getOrderDetail
} from "@/api/order";
// import VueCoreImageUpload from "vue-core-image-upload";
import easyUpload from '@/components/easy-upload/easy-upload.vue'
import {
TOKENNAME,
@@ -291,8 +290,6 @@
export default {
name: NAME,
components: {
// swiper,
// swiperSlide,
easyUpload,
home
},
@@ -482,7 +479,6 @@
this.getHistory();
},
imageuploaded(res) {
console.log(res)
if (res.status !== 200) return this.$dialog.error(res || "上传图片失败");
this.sendMsg(res.data.url, 3);
},
@@ -515,7 +511,6 @@
this.active = false;
},
keyup: function() {
console.log(this.$refs.input.innerHTML.length);
if (this.$refs.input.innerHTML.length > 0) {
this.sendColor = true;
} else {
@@ -557,13 +552,6 @@
}else{
this.sendColor = false
}
// if ($event.keyCode === 13) {
// $event.preventDefault();
// if (this.$refs.input.innerHTML) {
// this.sendMsg(this.$refs.input.innerHTML, 1);
// this.$refs.input.innerHTML = "";
// }
// }
this.height();
},
start() {
@@ -622,9 +610,6 @@
// this.$refs.input.blur();
// });
}
// this.$nextTick(function() {
// window.scrollTo(0, document.documentElement.scrollHeight);
// });
this.height();
},
height() {
@@ -771,7 +756,7 @@
.broadcast_details_pic {
font-size: 36rpx;
color: #e93323;
color: $theme-color;
text-align: left;
}

View File

@@ -36,7 +36,6 @@
},
onLoad: function (options) {
this.type = options.type;
cosole.log('hello')
},
onShow: function () {
let type = this.type;

View File

@@ -1,9 +1,5 @@
<template>
<view class='productSort copy-data'>
<!-- #ifdef APP-PLUS -->
<view class="sys-head" :style="{height:sysHeight}"></view>
<!-- #endif -->
<view class='productSort'>
<view class='header acea-row row-center-wrapper'>
<view class='acea-row row-between-wrapper input'>
<text class='iconfont icon-sousuo'></text>
@@ -11,15 +7,18 @@
placeholder-class='placeholder'></input>
</view>
</view>
<view class='aside'>
<view class='item acea-row row-center-wrapper' :class='index==navActive?"on":""' v-for="(item,index) in productList"
<view class='aside' :style="{bottom: tabbarH + 'px',height: height + 'rpx'}">
<scroll-view scroll-y="true" scroll-with-animation='true' style="height: 100%;">
<view class='item acea-row row-center-wrapper' :class='index==navActive?"on":""' v-for="(item,index) in productList"
:key="index" @click='tap(index,"b"+index)'><text>{{item.name}}</text></view>
</scroll-view>
</view>
<view class='conter'>
<scroll-view scroll-y="true" :scroll-into-view="toView" :style='"height:"+height+"rpx;"' @scroll="scroll"
<scroll-view scroll-y="true" :scroll-into-view="toView" :style='"height:"+height+"rpx;margin-top: 96rpx;"' @scroll="scroll"
scroll-with-animation='true'>
<block v-for="(item,index) in productList" :key="index">
<view class='listw' :id="'b'+index">
<view class='title acea-row row-center-wrapper'>
<view class='line'></view>
@@ -29,10 +28,7 @@
<view class='list acea-row'>
<block v-for="(itemn,indexn) in item.child" :key="indexn">
<navigator hover-class='none' :url='"/pages/goods_list/index?cid="+itemn.id+"&title="+itemn.name' class='item acea-row row-column row-middle'>
<!-- <view class='picture' :style="{'background-color':(itemn.extra&&itemn.extra.indexOf('https://') > -1) || (itemn.extra&&itemn.extra.indexOf('http://') > -1)?'none':'#f7f7f7'}">
<image :src='itemn.extra'></image>
</view> -->
<view class='picture' :style="{'background-color':itemn.extra?'none':'#f7f7f7'}">
<view class='picture' :style="{'background-color':itemn.extra?'none':'#f7f7f7'}">
<image :src='itemn.extra'></image>
</view>
<view class='name line1'>{{itemn.name}}</view>
@@ -48,7 +44,6 @@
</template>
<script>
let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
import {
getCategoryList
} from '@/api/store.js';
@@ -63,25 +58,25 @@
height: 0,
hightArr: [],
toView: "",
tabbarH: 0,
sysHeight: sysHeight,
tabbarH: 0
}
},
onLoad(options) {
this.getAllCategory();
},
onShow() {},
onShow(){
},
methods: {
infoScroll: function() {
let that = this;
let len = that.productList.length;
let child = that.productList[len - 1] && that.productList[len - 1].child ? that.productList[len - 1].child : [];
this.number = child ? child.length : 0;
let child = that.productList[len - 1]&&that.productList[len - 1].child?that.productList[len - 1].child:[];
this.number = child?child.length:0;
//设置商品列表高度
uni.getSystemInfo({
success: function(res) {
that.height = (res.windowHeight) * (750 / res.windowWidth);
that.height = (res.windowHeight) * (750 / res.windowWidth) - 98;
},
});
let height = 0;
@@ -106,9 +101,9 @@
let that = this;
getCategoryList().then(res => {
that.productList = res.data;
setTimeout(function() {
setTimeout(function(){
that.infoScroll();
}, 500)
},500)
})
},
scroll: function(e) {
@@ -139,9 +134,6 @@
</script>
<style scoped lang="scss">
.sys-head{
background-color: #fff;
}
.productSort .header {
width: 100%;
height: 96rpx;
@@ -153,7 +145,7 @@
z-index: 9;
border-bottom: 1rpx solid #f5f5f5;
}
.productSort .header .input {
width: 700rpx;
height: 60rpx;
@@ -162,45 +154,42 @@
box-sizing: border-box;
padding: 0 25rpx;
}
.productSort .header .input .iconfont {
font-size: 35rpx;
font-size: 26rpx;
color: #555;
}
.productSort .header .input .placeholder {
color: #999;
}
.productSort .header .input input {
font-size: 26rpx;
height: 100%;
width: 597rpx;
}
.productSort .aside {
position: fixed;
width: 24%;
width: 180rpx;
left: 0;
top: 0;
top:0;
background-color: #f7f7f7;
overflow-y: auto;
overflow-y: scroll;
overflow-x: hidden;
height: auto;
margin-top: 96rpx;
/* 兼容 IOS<11.2 */
bottom: calc(100rpx+ constant(safe-area-inset-bottom));
/* 兼容 IOS>11.2 */
bottom: calc(100rpx + env(safe-area-inset-bottom));
}
.productSort .aside .item {
height: 100rpx;
width: 100%;
font-size: 26rpx;
color: #424242;
}
.productSort .aside .item.on {
background-color: #fff;
border-left: 4rpx solid #fc4141;
@@ -209,55 +198,58 @@
color: #fc4141;
font-weight: bold;
}
.productSort .conter {
margin: 96rpx 0 0 180rpx;
padding: 0 14rpx;
background-color: #fff;
}
.productSort .conter .listw {
padding-top: 20rpx;
}
.productSort .conter .listw .title {
height: 90rpx;
}
.productSort .conter .listw .title .line {
width: 100rpx;
height: 2rpx;
background-color: #f0f0f0;
}
.productSort .conter .listw .title .name {
font-size: 28rpx;
color: #333;
margin: 0 30rpx;
font-weight: bold;
}
.productSort .conter .list {
flex-wrap: wrap;
}
.productSort .conter .list .item {
width: 177rpx;
margin-top: 26rpx;
}
.productSort .conter .list .item .picture {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
}
.productSort .conter .list .item .picture image {
width: 100%;
height: 100%;
border-radius: 50%;
div{
background-color: #f7f7f7;
}
}
.productSort .conter .list .item .name {
font-size: 24rpx;
color: #333;

View File

File diff suppressed because one or more lines are too long

View File

@@ -2,12 +2,15 @@
<view>
<view class='productList'>
<view class='search bg-color acea-row row-between-wrapper'>
<!-- #ifdef H5 -->
<view class="iconfont icon-xiangzuo" @click="goback()"></view>
<!-- #endif -->
<view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text>
<input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search" :value='where.keyword'
@confirm="searchSubmit"></input>
<input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search"
:value='where.keyword' @confirm="searchSubmit"></input>
</view>
<view class='iconfont' :class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'>
</view>
<view class='iconfont' :class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'></view>
</view>
<view class='nav acea-row row-middle'>
<view class='item' :class='title ? "font-color":""' @click='set_where(1)'>{{title ? title:'默认'}}</view>
@@ -26,22 +29,32 @@
<!-- down -->
<view class='item' :class='nows ? "font-color":""' @click='set_where(4)'>新品</view>
</view>
<view class='list acea-row row-between-wrapper' :class='is_switch==true?"":"on"'>
<view class='item' :class='is_switch==true?"":"on"' hover-class='none' v-for="(item,index) in productList" :key="index" @click="godDetail(item)">
<view class='pictrue' :class='is_switch==true?"":"on"'>
<image :src='item.image' :class='is_switch==true?"":"on"'></image>
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activityH5 && item.activityH5.type === '1'">秒杀</span>
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activityH5 && item.activityH5.type === '2'">砍价</span>
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activityH5 && item.activityH5.type === '3'">拼团</span>
</view>
<view class='text' :class='is_switch==true?"":"on"'>
<view class='name line1'>{{item.storeName}}</view>
<view class='money font-color' :class='is_switch==true?"":"on"'><text class='num'>{{item.price}}</text></view>
<view class='vip acea-row row-between-wrapper' :class='is_switch==true?"":"on"'>
<view class='vip-money' v-if="item.vip_price && item.vip_price > 0">{{item.vip_price}}
<image src='../../static/images/vip.png'></image>
<view :class='is_switch==true?"":"listBox"' v-if="productList.length>0">
<view class='list acea-row row-between-wrapper' :class='is_switch==true?"":"on"'>
<view class='item' :class='is_switch==true?"":"on"' hover-class='none'
v-for="(item,index) in productList" :key="index" @click="godDetail(item)">
<view class='pictrue' :class='is_switch==true?"":"on"'>
<image :src='item.image' :class='is_switch==true?"":"on"'></image>
<span class="pictrue_log_class"
:class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'"
v-if="item.activityH5 && item.activityH5.type === '1'">秒杀</span>
<span class="pictrue_log_class"
:class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'"
v-if="item.activityH5 && item.activityH5.type === '2'">砍价</span>
<span class="pictrue_log_class"
:class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'"
v-if="item.activityH5 && item.activityH5.type === '3'">拼团</span>
</view>
<view class='text' :class='is_switch==true?"":"on"'>
<view class='name line1'>{{item.storeName}}</view>
<view class='money font-color' :class='is_switch==true?"":"on"'><text
class='num'>{{item.price}}</text></view>
<view class='vip acea-row row-between-wrapper' :class='is_switch==true?"":"on"'>
<view class='vip-money' v-if="item.vip_price && item.vip_price > 0">{{item.vip_price}}
<image src='../../static/images/vip.png'></image>
</view>
<view>已售{{Number(item.sales) + Number(item.ficti) || 0}}{{item.unitName}}</view>
</view>
<view>已售{{Number(item.sales) + Number(item.ficti) || 0}}{{item.unitName}}</view>
</view>
</view>
</view>
@@ -65,8 +78,12 @@
getProductHot
} from '@/api/store.js';
import recommend from '@/components/recommend';
import {mapGetters} from "vuex";
import { goShopDetail } from '@/libs/order.js'
import {
mapGetters
} from "vuex";
import {
goShopDetail
} from '@/libs/order.js'
export default {
computed: mapGetters(['uid']),
components: {
@@ -93,9 +110,9 @@
loadTitle: '加载更多',
title: '',
hostProduct: [],
hotPage:1,
hotLimit:10,
hotScroll:false
hotPage: 1,
hotLimit: 10,
hotScroll: false
};
},
onLoad: function(options) {
@@ -103,10 +120,9 @@
this.title = options.title || '';
this.$set(this.where, 'keyword', options.searchValue || '');
this.get_product_list();
this.get_host_product();
},
methods: {
goback(){
goback() {
// #ifdef H5
return history.back();
// #endif
@@ -117,10 +133,10 @@
// #endif
},
// 去详情页
godDetail(item){
goShopDetail(item,this.uid).then(res=>{
godDetail(item) {
goShopDetail(item, this.uid).then(res => {
uni.navigateTo({
url:`/pages/goods_details/index?id=${item.id}`
url: `/pages/goods_details/index?id=${item.id}`
})
})
},
@@ -140,13 +156,13 @@
*/
get_host_product: function() {
let that = this;
if(that.hotScroll) return
if (that.hotScroll) return
getProductHot(
that.hotPage,
that.hotLimit,
).then(res => {
that.hotPage++
that.hotScroll = res.data.list.length<that.hotLimit
that.hotScroll = res.data.list.length < that.hotLimit
that.hostProduct = that.hostProduct.concat(res.data.list)
// that.$set(that, 'hostProduct', res.data)
});
@@ -155,7 +171,7 @@
set_where: function(e) {
switch (e) {
case 1:
return;
return;
break;
case 2:
if (this.price == 0) this.price = 1;
@@ -205,6 +221,9 @@
that.loadTitle = loadend ? '已全部加载' : '加载更多';
that.$set(that, 'productList', productList);
that.$set(that.where, 'page', that.where.page + 1);
if (that.productList.length === 0) {
this.get_host_product();
}
}).catch(err => {
that.loading = false;
that.loadTitle = '加载更多';
@@ -215,20 +234,24 @@
},
onReachBottom() {
if(this.productList.length>0){
if (this.productList.length > 0) {
this.get_product_list();
}else{
} else {
this.get_host_product();
}
}
}
</script>
<style scoped lang="scss">
.iconfont{
.iconfont {
color: #fff;
}
.listBox{
padding: 20px 15px;
margin-top: 154rpx;
}
.productList .search {
width: 100%;
height: 86rpx;
@@ -250,7 +273,12 @@
}
.productList .search .input input {
/* #ifdef H5 */
width: 528rpx;
/* #endif */
/* #ifndef H5 */
width: 548rpx;
/* #endif */
height: 100%;
font-size: 26rpx;
}
@@ -302,34 +330,39 @@
}
.productList .list {
padding: 0 20rpx;
margin-top: 172rpx;
padding: 0 30rpx;
margin-top: 192rpx;
}
.productList .list.on {
border-radius: 14rpx;
margin-top: 0 !important;
background-color: #fff;
border-top: 1px solid #f6f6f6;
padding: 40rpx 0 0 0;
// margin: 20rpx 0;
// background-color: #fff;
}
.productList .list .item {
width: 345rpx;
margin-top: 20rpx;
width: 335rpx;
background-color: #fff;
border-radius: 20rpx;
border-radius: 14rpx;
margin-bottom: 20rpx;
}
.productList .list .item.on {
width: 100%;
display: flex;
border-bottom: 1rpx solid #f6f6f6;
padding: 30rpx 0;
padding: 0 24rpx 50rpx 24rpx;
margin: 0;
border-radius: 14rpx;
}
.productList .list .item .pictrue {
position: relative;
width: 100%;
height: 345rpx;
height: 335rpx;
}
.productList .list .item .pictrue.on {
@@ -348,14 +381,14 @@
}
.productList .list .item .text {
padding: 20rpx 17rpx 26rpx 17rpx;
padding: 18rpx 20rpx;
font-size: 30rpx;
color: #222;
}
.productList .list .item .text.on {
width: 508rpx;
padding: 0 0 0 22rpx;
width: 456rpx;
padding: 0 0 0 20rpx;
}
.productList .list .item .text .money {
@@ -397,5 +430,6 @@
.noCommodity {
background-color: #fff;
padding-bottom: 30rpx;
margin-top: 172rpx;
}
</style>

View File

@@ -21,7 +21,7 @@
</view>
</view>
<view class='noCommodity'>
<view class='pictrue' v-if="bastList.length == 0">
<view class='pictrue' v-if="bastList.length == 0 && isbastList">
<image src='../../static/images/noSearch.png'></image>
</view>
<recommend :hostProduct='hostProduct' v-if="bastList.length == 0"></recommend>
@@ -56,7 +56,8 @@
loadend: false,
loadTitle: '加载更多',
hotPage:1,
isScroll:true
isScroll:true,
isbastList: false
};
},
onShow: function() {
@@ -97,6 +98,7 @@
that.loadend = loadend;
that.loadTitle = loadend ? "😕人家是有底线的~~" : "加载更多";
that.page = that.page + 1;
that.isbastList = true;
}).catch(err => {
that.loading = false,
that.loadTitle = '加载更多'
@@ -153,10 +155,11 @@
.searchGood .search {
padding-left: 30rpx;
background-color: #fff !important;
}
.searchGood .search {
margin-top: 20rpx;
padding-top: 20rpx;
}
.searchGood .search .input {
@@ -170,7 +173,7 @@
.searchGood .search .input input {
width: 472rpx;
font-size: 28rpx;
font-size: 26rpx;
}
.searchGood .search .input .placeholder {
@@ -206,7 +209,7 @@
color: #454545;
padding: 0 21rpx;
height: 60rpx;
border-radius: 3rpx;
border-radius: 30rpx;
line-height: 60rpx;
border: 1rpx solid #aaa;
margin: 0 0 20rpx 20rpx;

View File

File diff suppressed because one or more lines are too long

View File

@@ -1,17 +1,25 @@
<template>
<view :class="{borderShow:isBorader}">
<view class="combination" v-if="combinationList.length">
<view class="title acea-row row-right">
<!-- <view class="acea-row row-middle">
<view class="sign">
<image src="../../../static/images/sign02.png"></image>
<view class="title acea-row row-between">
<view class="spike-bd">
<view v-if="assistUserList.length > 0" class="activity_pic">
<view v-for="(item,index) in assistUserList" :key="index" class="picture"
:style='index===2?"position: relative":"position: static"'>
<span class="avatar" :style='"background-image: url("+item+")"'></span>
<span v-if="index===2 && Number(assistUserCount) > 3" class="mengceng">
<i>···</i>
</span>
</view>
<text class="pic_count">{{assistUserCount}}人参与</text>
</view>
<view class="name">拼团惠<text>享超值开团价</text></view>
</view> -->
<navigator url="/pages/activity/goods_combination/index" hover-class="none" class="more acea-row row-center-wrapper">更多<text class="iconfont icon-xiangyou"></text></navigator>
</view>
<navigator url="/pages/activity/goods_combination/index" hover-class="none"
class="more acea-row row-center-wrapper">GO<text class="iconfont icon-xiangyou"></text></navigator>
</view>
<view class="conter acea-row">
<scroll-view scroll-x="true" style="white-space: nowrap; vertical-align: middle;" show-scrollbar="false">
<scroll-view scroll-x="true" style="white-space: nowrap; vertical-align: middle;"
show-scrollbar="false">
<view class="itemCon" v-for="(item, index) in combinationList" :key="index" @click="goDetail(item)">
<view class="item">
<view class="pictrue">
@@ -42,14 +50,16 @@
<script>
let app = getApp();
import {
getCombinationList
getCombinationIndexApi
} from '@/api/activity.js';
export default {
name: 'b_combination',
data() {
return {
combinationList: [],
isBorader:false,
isBorader: false,
assistUserList: [],
assistUserCount: 0
};
},
created() {
@@ -60,20 +70,17 @@
// 拼团列表
getCombinationList: function() {
let that = this;
// let limit = that.$config.LIMIT;
let data = {
page: 1,
limit: 4
};
getCombinationList(data).then(function(res) {
that.combinationList = res.data.list;
getCombinationIndexApi().then(function(res) {
that.combinationList = res.data.productList;
that.assistUserList = res.data.avatarList;
that.assistUserCount = res.data.totalPeople;
}).catch((res) => {
return that.$util.Tips({
title: res
});
})
},
goDetail(item){
goDetail(item) {
uni.navigateTo({
url: `/pages/activity/goods_combination_details/index?id=${item.id}`
})
@@ -83,7 +90,58 @@
</script>
<style lang="scss" scoped>
.default{
.mengceng {
width: 38rpx;
height: 38rpx;
line-height: 36rpx;
background: rgba(51, 51, 51, 0.6);
text-align: center;
border-radius: 50%;
opacity: 1;
position: absolute;
left: 0px;
top: 2rpx;
color: #FFF;
i{
font-style: normal;
font-size: 20rpx;
}
}
.activity_pic {
margin-left: 28rpx;
padding-left: 20rpx;
.picture {
display: inline-block;
}
.avatar {
width: 38rpx;
height: 38rpx;
display: inline-table;
vertical-align: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
border-radius: 50%;
background-repeat: no-repeat;
background-size: cover;
background-position: 0 0;
margin-right: -10rpx;
box-shadow: 0 0 0 1px #fff;
}
.pic_count {
margin-left: 30rpx;
color: $theme-color;
font-size: 22rpx;
font-weight: 500;
}
}
.default {
width: 690rpx;
height: 300rpx;
border-radius: 14rpx;
@@ -91,36 +149,42 @@
background-color: #ccc;
text-align: center;
line-height: 300rpx;
.iconfont{
.iconfont {
font-size: 80rpx;
}
}
.combination{
width: 700rpx;
.combination {
width: auto;
background-color: #fff;
border-radius: 14rpx;
margin: 26rpx auto 0 auto;
padding: 25rpx 20rpx 21rpx 20rpx;
margin: 0 auto 30rpx auto;
padding: 16rpx 24rpx 24rpx 24rpx;
background-image: url(../../../static/images/pth.png);
background-repeat: no-repeat;
background-size: 100%;
.title {
width: 80%;
margin-left: 128rpx;
.sign {
width: 40rpx;
height: 40rpx;
image {
width: 100%;
height: 100%;
}
}
.name {
font-size: 32rpx;
color: #282828;
margin-left: 12rpx;
font-weight: bold;
text {
color: #797979;
font-size: 24rpx;
@@ -128,55 +192,69 @@
margin-left: 14rpx;
}
}
.more {
height: 37rpx;
width: 86rpx;
height: 40rpx;
background: linear-gradient(142deg, #FFE9CE 0%, #FFD6A7 100%);
opacity: 1;
border-radius: 18px;
font-size: 22rpx;
color: #666666;
padding-left: 2rpx;
color: #FE960F;
padding-left: 8rpx;
font-weight: 800;
.iconfont {
font-size: 20rpx;
font-size: 21rpx;
}
}
}
.conter{
margin-top: 28rpx;
.conter {
margin-top: 24rpx;
.itemCon {
display: inline-block;
width: 174rpx;
width: 220rpx;
margin-right: 24rpx;
}
.item{
width:100%;
.pictrue{
.item {
width: 100%;
.pictrue {
width: 100%;
height: 174rpx;
height: 220rpx;
border-radius: 6rpx;
image{
image {
width: 100%;
height: 100%;
border-radius: 6rpx;
}
}
.text{
.text {
margin-top: 4rpx;
.y_money {
font-size: 20rpx;
font-size: 24rpx;
color: #999999;
text-decoration: line-through;
}
.name {
font-size: 24rpx;
color: #000;
margin-top: 14rpx;
}
.money {
color: #FD502F;
font-size: 28rpx;
height: 100%;
font-weight: bold;
margin: 2rpx 0;
margin: 10rpx 0 0rpx 0;
.num {
font-size: 28rpx;
}

View File

@@ -3,12 +3,9 @@
<view class="combination" v-if="bargList.length">
<view class="title acea-row row-between">
<view class="acea-row row-column">
<view class="sign">
Hi{{userData.nickname || '亲爱的顾客'}}
</view>
<view class="name"><text>你的好友正在邀请你参与砍价</text></view>
<image src="../../../static/images/kanjia.png" class="pic"></image>
</view>
<navigator url="/pages/activity/goods_bargain/index" hover-class="none" class="more acea-row row-center-wrapper">更多<text class="iconfont icon-xiangyou"></text></navigator>
<navigator url="/pages/activity/goods_bargain/index" hover-class="none" class="more acea-row row-center-wrapper">GO<text class="iconfont icon-xiangyou"></text></navigator>
</view>
<view class="conter acea-row">
<scroll-view scroll-x="true" style="white-space: nowrap; vertical-align: middle;" show-scrollbar="false">
@@ -21,7 +18,6 @@
<view class="name line1">{{item.title}}</view>
<view class="money">¥<text class="num">{{item.minPrice}}</text></view>
<view class="btn">参与砍价</view>
<!-- <view class="y_money">¥{{item.price}}</view> -->
</view>
</view>
</view>
@@ -37,7 +33,7 @@
toLogin
} from '@/libs/login.js';
import {
getBargainList
getBargainIndexApi
} from '@/api/activity.js';
import { mapGetters } from 'vuex';
export default {
@@ -60,17 +56,13 @@
methods: {
// 砍价列表
getBargainList() {
let limit = this.$config.LIMIT;
getBargainList({
page: 1,
limit: limit
}).then(res => {
this.bargList = res.data.list
getBargainIndexApi().then(res => {
this.bargList = res.data ? res.data.productList : [];
})
},
bargDetail(item){
uni.navigateTo({
url: `/pages/activity/goods_bargain_details/index?id=${item.id}&bargain=${this.uid}`
url: `/pages/activity/goods_bargain_details/index?id=${item.id}&startBargainUid=${this.uid}`
});
}
}
@@ -78,6 +70,10 @@
</script>
<style lang="scss" scoped>
.pic{
width: 130rpx;
height: 30rpx;
}
.default{
width: 690rpx;
height: 300rpx;
@@ -91,20 +87,19 @@
}
}
.combination{
width: 690rpx;
width: auto;
background-image: url(../../../static/images/kjbj.png);
background-repeat: no-repeat;
background-size: 100%;
// height: 288rpx;
background-color: #fff;
border-radius: 14rpx;
margin: 26rpx auto 0 auto;
margin: 30rpx auto 0 auto;
padding: 25rpx 20rpx 25rpx 20rpx;
.title {
.sign {
font-size: 32rpx;
color: #E93323;
color: $theme-color;
margin-bottom: 2rpx;
font-weight: bold;
margin-bottom: 10rpx;
@@ -120,13 +115,17 @@
}
.more {
height: 37rpx;
width: 86rpx;
height: 40rpx;
background: linear-gradient(142deg, #FFE9CE 0%, #FFD6A7 100%);
opacity: 1;
border-radius: 18px;
font-size: 22rpx;
color: #666666;
padding-left: 2rpx;
color: #FE960F;
padding-left: 8rpx;
font-weight: 800;
.iconfont {
font-size: 20rpx;
font-size: 21rpx;
}
}
}
@@ -134,14 +133,14 @@
margin-top: 28rpx;
.itemCon {
display: inline-block;
width: 174rpx;
width: 220rpx;
margin-right: 24rpx;
}
.item{
width:100%;
.pictrue{
width: 100%;
height: 174rpx;
height: 220rpx;
border-radius: 6rpx;
image{
width: 100%;
@@ -152,7 +151,7 @@
.text{
margin-top: 4rpx;
.y_money {
font-size: 20rpx;
font-size: 24rpx;
color: #999999;
text-decoration: line-through;
}
@@ -166,13 +165,13 @@
font-size: 28rpx;
height: 100%;
font-weight: bold;
margin: 2rpx 0;
margin: 10rpx 0;
.num {
font-size: 28rpx;
}
}
.btn{
width: 174rpx;
width: 220rpx;
height: 48rpx;
line-height: 48rpx;
text-align: center;

View File

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
<view class='newsDetail'>
<view class='title'>{{articleInfo.title}}</view>
<view class='list acea-row row-middle'>
<view class='label'>{{articleInfo.categoryName}}</view>
<view class='label'>{{articleInfo.author}}</view>
<view class='item'></text>{{articleInfo.createTime}}</view>
<view class='item'><text class='iconfont icon-liulan'></text>{{articleInfo.visit}}</view>
</view>
@@ -144,30 +144,25 @@
page {
background-color: #fff !important;
}
.newsDetail{
padding: 30rpx 0;
}
.newsDetail .title {
padding: 0 30rpx;
font-size: 34rpx;
color: #282828;
font-weight: bold;
margin: 45rpx 0 23rpx 0;
line-height: 1.5;
}
.newsDetail .list {
margin: 0 30rpx;
// border-bottom: 1rpx solid #eee;
margin: 28rpx 30rpx 0 30rpx;
padding-bottom: 25rpx;
}
.newsDetail .list .label {
font-size: 30rpx;
color: #B1B2B3;
// height: 38rpx;
// border-radius: 3rpx;
// text-align: center;
// line-height: 38rpx;
// padding: 0 10rpx;
}
.newsDetail .list .item {

View File

@@ -7,7 +7,7 @@
<block v-for="(item,index) in imgUrls" :key="index">
<swiper-item>
<navigator :url="'/pages/news_details/index?id='+item.id">
<image :src="item.imageInput[0]" class="slide-image" />
<image :src="item.imageInput" class="slide-image" />
</navigator>
</swiper-item>
</block>
@@ -16,7 +16,7 @@
<view class='nav' v-if="navList.length > 0">
<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft" style="width:auto;overflow:hidden;">
<block v-for="(item,index) in navList" :key="index">
<view class='item' :class='active==item.id?"on":""' @click='tabSelect(item.id, index)'>
<view class='item borRadius14' :class='active==item.id?"on":""' @click='tabSelect(item.id, index)'>
<view>{{item.name}}</view>
<view class='line bg-color' v-if="active==item.id"></view>
</view>
@@ -25,38 +25,15 @@
</view>
<view class='list'>
<block v-for="(item,index) in articleList" :key="index">
<navigator :url='"/pages/news_details/index?id="+item.id' hover-class='none' class='item acea-row row-between-wrapper'
v-if="item.imageInput.length == 1">
<navigator :url='"/pages/news_details/index?id="+item.id' hover-class='none' class='item acea-row row-between-wrapper'>
<view class='text acea-row row-column-between'>
<view class='name line2'>{{item.title}}</view>
<view>{{item.createTime}}</view>
</view>
<view class='pictrue'>
<image :src='item.imageInput[0]'></image>
<image :src='item.imageInput'></image>
</view>
</navigator>
<navigator :url='"/pages/news_details/index?id="+item.id' hover-class='none' class='item' v-else-if="item.imageInput.length == 2">
<view class='title line1'>{{item.title}}</view>
<view class='picList acea-row row-between-wrapper'>
<block v-for="(itemImg,indexImg) in item.imageInput" :key="indexImg">
<view class='pictrue'>
<image :src='itemImg'></image>
</view>
</block>
</view>
<view class='time'>{{item.createTime}}</view>
</navigator>
<navigator :url='"/pages/news_details/index?id="+item.id' hover-class='none' class='item' v-else-if="item.imageInput.length > 2">
<view class='title line1'>{{item.title}}</view>
<view class='picList on acea-row row-between-wrapper'>
<block v-for="(itemImg,indexImg) in item.imageInput" :key="indexImg">
<view class='pictrue'>
<image :src='itemImg'></image>
</view>
</block>
</view>
<view class='time'>{{item.createTime}}</view>
</navigator>
</block>
</view>
</view>
@@ -194,7 +171,7 @@
.newsList .swiper .slide-image {
width: 100%;
height: 335rpx;
border-radius: 6rpx;
border-radius: 14rpx;
}
// #ifdef MP-WEIXIN
.newsList .swiper .wx-swiper-dot {
@@ -213,7 +190,6 @@
margin-bottom: -15rpx;
}
// #endif
// #ifdef APP-PLUS || H5
.newsList .swiper .uni-swiper-dot {
width: 12rpx !important;
height: 12rpx !important;
@@ -229,9 +205,8 @@
.newsList .swiper .uni-swiper-dots.uni-swiper-dots-horizontal {
margin-bottom: -15rpx;
}
// #endif
.newsList .nav {
padding: 0 30rpx;
padding: 0 24rpx;
width: 100%;
white-space: nowrap;
box-sizing: border-box;
@@ -260,7 +235,7 @@
}
.newsList .list .item {
margin: 0 30rpx;
margin: 0 24rpx;
border-bottom: 1rpx solid #f0f0f0;
padding: 35rpx 0;
}
@@ -273,7 +248,7 @@
.newsList .list .item .pictrue image {
width: 100%;
height: 100%;
border-radius: 6rpx;
border-radius: 14rpx;
}
.newsList .list .item .text {

View File

File diff suppressed because it is too large Load Diff

View File

@@ -2,46 +2,52 @@
<view>
<view class='order-details'>
<!-- 给header上与data上加on为退款订单-->
<view class='header bg-color acea-row row-middle' :class='isGoodsReturn ? "on":""'>
<view class='pictrue' v-if="isGoodsReturn==false">
<image :src="orderInfo.statusPic"></image>
</view>
<view class='data' :class='isGoodsReturn ? "on":""'>
<view class='state'>{{orderInfo.pstatus.msg}}</view>
<view>{{orderInfo.createTime}}</view>
<view class='header bg-color' :class='isGoodsReturn ? "on":""'>
<view class='picTxt acea-row row-middle'>
<view class='pictrue' v-if="isGoodsReturn==false">
<image :src="orderInfo.statusPic"></image>
</view>
<view class='data' :class='isGoodsReturn ? "on":""'>
<view class='state'>{{orderInfo.orderStatusMsg}}</view>
<view>{{orderInfo.createTime}}</view>
</view>
</view>
</view>
<view v-if="isGoodsReturn==false">
<view v-if="isGoodsReturn==false" class="pad30">
<view class='nav'>
<view class='navCon acea-row row-between-wrapper'>
<view :class="status.type == 0 || status.type == -9 ? 'on':''">待付款</view>
<view :class="status.type == 1 ? 'on':''">{{orderInfo.shippingType==1 ? '待发货':'待核销'}}</view>
<view :class="status.type == 2 ? 'on':''" v-if="orderInfo.shippingType == 1">待收货</view>
<view :class="status.type == 3 ? 'on':''">待评价</view>
<view :class="status.type == 4 ? 'on':''">已完成</view>
<view :class="!orderInfo.paid ? 'on':''">待付款</view>
<view :class="orderInfo.paid && orderInfo.status == 0 ? 'on':''">
{{orderInfo.shippingType==1 ? '待发货':'待核销'}}</view>
<view :class="orderInfo.status == 1 ? 'on':''" v-if="orderInfo.shippingType == 1">待收货</view>
<view :class="orderInfo.status == 2 ? 'on':''">待评价</view>
<view :class="orderInfo.status == 3 ? 'on':''">已完成</view>
</view>
<view class='progress acea-row row-between-wrapper'>
<view class='iconfont' :class='(status.type == 0 || status.type == -9 ? "icon-webicon318":"icon-yuandianxiao") + " " + (status.type >= 0 ? "font-color":"")'></view>
<view class='line' :class='status.type > 0 ? "bg-color":""'></view>
<view class='iconfont' :class='(status.type == 1 ? "icon-webicon318":"icon-yuandianxiao") + " " + (status.type >= 1 ? "font-color":"")'></view>
<view class='line' :class='status.type > 1 ? "bg-color":""' v-if="orderInfo.shippingType == 1"></view>
<view class='iconfont' :class='(status.type == 2 ? "icon-webicon318":"icon-yuandianxiao") + " " +(status.type >= 2 ? "font-color":"")'
v-if="orderInfo.shippingType == 1"></view>
<view class='line' :class='status.type > 2 ? "bg-color":""'></view>
<view class='iconfont' :class='(status.type == 3 ? "icon-webicon318":"icon-yuandianxiao") + " " + (status.type >= 3 ? "font-color":"")'></view>
<view class='line' :class='status.type > 3 ? "bg-color":""'></view>
<view class='iconfont' :class='(status.type == 4 ? "icon-webicon318":"icon-yuandianxiao") + " " + (status.type >= 4 ? "font-color":"")'></view>
<view class='iconfont'
:class='(!orderInfo.paid ? "icon-webicon318":"icon-yuandianxiao") + " " + ( orderInfo.paid ? "font-color":"")'>
</view>
<view class='line' :class='orderInfo.paid > 0 ? "bg-color":""'></view>
<view class='iconfont'
:class='(orderInfo.status == 0 ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 0 ? "font-color":"")'>
</view>
<view class='line' :class='orderInfo.status > 0 ? "bg-color":""'
v-if="orderInfo.shippingType == 1"></view>
<view class='iconfont'
:class='(orderInfo.status == 1 ? "icon-webicon318":"icon-yuandianxiao") + " " +(orderInfo.status >= 1 ? "font-color":"")'
v-if="orderInfo.shippingType == 1"></view>
<view class='line' :class='orderInfo.status > 1 ? "bg-color":""'></view>
<view class='iconfont'
:class='(orderInfo.status == 2 ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 2 ? "font-color":"")'>
</view>
<view class='line' :class='orderInfo.status > 2 ? "bg-color":""'></view>
<view class='iconfont'
:class='(orderInfo.status == 3 ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 3 ? "font-color":"")'>
</view>
</view>
</view>
<!-- 拒绝退款 -->
<view class="refund" v-if="orderInfo.refundReason">
<view class="title">
<image src="/static/images/shuoming.png" mode=""></image>
商家拒绝退款
</view>
<view class="con">拒绝原因{{orderInfo.refundReason}}</view>
</view>
<view class="writeOff" v-if="orderInfo.shippingType == 2 && orderInfo.paid">
<view v-if="orderInfo.shippingType == 2 && orderInfo.paid" class="writeOff borRadius14">
<view class="title">核销信息</view>
<view class="grayBg">
<view class="pictrue">
@@ -60,7 +66,7 @@
<text class="iconfont icon-shijian"></text>核销时间
</view>
<view class="info">
每日<text class="time">{{orderInfo.systemStore.dayTime}}</text>
每日<text class="time">{{orderInfo.systemStore.dayTime.replace(',','-')}}</text>
</view>
</view>
<view class="item">
@@ -71,169 +77,190 @@
</view>
</view>
</view>
<view class="map acea-row row-between-wrapper" v-if="orderInfo.shippingType == 2">
<view v-if="orderInfo.shippingType == 2" class="map acea-row row-between-wrapper borRadius14">
<view>自提地址信息</view>
<view class="place cart-color acea-row row-center-wrapper" @tap="showMaoLocation">
<text class="iconfont icon-weizhi"></text>查看位置
</view>
</view>
<view class='address' v-if="orderInfo.shippingType === 1">
<view v-if="orderInfo.shippingType === 1" class='address borRadius14'>
<view class='name'>{{orderInfo.realName}}<text class='phone'>{{orderInfo.userPhone}}</text></view>
<view>{{orderInfo.userAddress}}</view>
</view>
<view class='address' v-else style="margin-top:0;">
<view class='name' @tap="makePhone">{{orderInfo.systemStore?orderInfo.systemStore.name:''}}<text class='phone'>{{orderInfo.systemStore?orderInfo.systemStore.phone:''}}</text><text
class="iconfont icon-tonghua font-color"></text></view>
<view v-else class='address' style="margin-top:15rpx;">
<view class='name' @tap="makePhone">{{orderInfo.systemStore?orderInfo.systemStore.name:''}}<text
class='phone'>{{orderInfo.systemStore?orderInfo.systemStore.phone:''}}</text><text
class="iconfont icon-tonghua font-color"></text></view>
<view>{{orderInfo.systemStore?orderInfo.systemStore.detailedAddress:''}}</view>
</view>
<view class='line' v-if="orderInfo.shippingType === 1">
<image src='../../static/images/line.jpg'></image>
</view>
</view>
<orderGoods :evaluate='evaluate' :orderId="order_id" :ids="id" :uniId="uniId" :cartInfo="cartInfo" :jump="true"></orderGoods>
<!-- <div class="goodCall" @click="goGoodCall"> -->
<!-- #ifdef H5 -->
<div class="goodCall" @click="kefuClick">
<span class="iconfont icon-kefu"></span><span>联系客服</span>
</div>
<!-- #endif -->
<!-- #ifdef MP -->
<div class="goodCall">
<button open-type='contact' hover-class='none'>
<orderGoods :evaluate='evaluate' :productType="orderInfo.type" :orderId="order_id" :ids="id" :uniId="uniId" :cartInfo="cartInfo"
:jump="true"></orderGoods>
<!-- #ifndef MP -->
<div class="goodCall borRadius14" @click="kefuClick">
<span class="iconfont icon-kefu"></span><span>联系客服</span>
</button>
</div>
<!-- #endif -->
<view class='wrapper'>
<view class='item acea-row row-between'>
<view>订单编号</view>
<view class='conter acea-row row-middle row-right'>{{orderInfo.orderId}}
<!-- #ifndef H5 -->
<text class='copy' @tap='copy'>复制</text>
<!-- #endif -->
<!-- #ifdef H5 -->
<text class='copy copy-data' :data-clipboard-text="orderInfo.orderId">复制</text>
<!-- #endif -->
</view>
</view>
<view class='item acea-row row-between'>
<view>下单时间</view>
<view class='conter'>{{(orderInfo.createTime || 0)}}</view>
</view>
<view class='item acea-row row-between'>
<view>支付状态</view>
<view class='conter' v-if="orderInfo.paid">已支付</view>
<view class='conter' v-else>未支付</view>
</view>
<view class='item acea-row row-between'>
<view>支付方式</view>
<view class='conter'>{{orderInfo.pstatus.payType}}</view>
</view>
<view class='item acea-row row-between' v-if="orderInfo.mark">
<view>买家留言</view>
<view class='conter'>{{orderInfo.mark}}</view>
</view>
</div>
<!-- #endif -->
<!-- #ifdef MP -->
<div class="goodCall borRadius14">
<button open-type='contact' hover-class='none'>
<span class="iconfont icon-kefu"></span><span>联系客服</span>
</button>
</div>
<!-- #endif -->
</view>
<!-- 退款订单详情 -->
<view class='wrapper' v-if="isGoodsReturn">
<view class='item acea-row row-between'>
<view>收货人</view>
<view class='conter'>{{orderInfo.realName}}</view>
<view class="pad30">
<view class='nav refund' v-if="orderInfo.refundStatus>0">
<view class="title">
<image src="/static/images/shuoming.png" mode=""></image>
{{orderInfo.refundStatus==1?'商家审核中':orderInfo.refundStatus==2?'商家已退款':'商家拒绝退款'}}
</view>
<view class="con pad30">{{orderInfo.refundStatus==1 ? "您已成功发起退款申请,请耐心等待商家处理;退款前请与商家协商一致,有助于更好的处理售后问题": orderInfo.refundStatus==2? "退款已成功受理,如商家已寄出商品请尽快退回;感谢您的支持": "拒绝原因:" + orderInfo.refundReason}}</view>
</view>
<view class='item acea-row row-between'>
<view>联系电话</view>
<view class='conter'>{{orderInfo.userPhone}}</view>
</view>
<view class='item acea-row row-between'>
<view>收货地址</view>
<view class='conter'>{{orderInfo.userAddress}}</view>
</view>
</view>
<view v-if="orderInfo.status!=0">
<view class='wrapper' v-if='orderInfo.deliveryType=="express"'>
<view class='wrapper borRadius14'>
<view class='item acea-row row-between'>
<view>配送方式</view>
<view class='conter'>发货</view>
<view>订单编号</view>
<view class='conter acea-row row-middle row-right'>{{orderInfo.orderId}}
<!-- #ifndef H5 -->
<text class='copy' @tap='copy'>复制</text>
<!-- #endif -->
<!-- #ifdef H5 -->
<text class='copy copy-data' :data-clipboard-text="orderInfo.orderId">复制</text>
<!-- #endif -->
</view>
</view>
<view class='item acea-row row-between'>
<view>快递公司</view>
<view class='conter'>{{orderInfo.deliveryName || ''}}</view>
<view>下单时间</view>
<view class='conter'>{{(orderInfo.createTime || 0)}}</view>
</view>
<view class='item acea-row row-between'>
<view>快递号</view>
<view class='conter'>{{orderInfo.deliveryId || ''}}</view>
<view>支付状态</view>
<view class='conter' v-if="orderInfo.paid">已支付</view>
<view class='conter' v-else>未支付</view>
</view>
<view class='item acea-row row-between'>
<view>支付方式</view>
<view class='conter'>{{orderInfo.payTypeStr}}</view>
</view>
<view class='item acea-row row-between' v-if="orderInfo.mark">
<view>买家留言</view>
<view class='conter'>{{orderInfo.mark}}</view>
</view>
</view>
<view class='wrapper' v-else-if='orderInfo.deliveryType=="send"'>
<!-- 退款订单详情 "-->
<view v-if="isGoodsReturn" class='wrapper borRadius14' >
<view class='item acea-row row-between'>
<view>配送方式</view>
<view class='conter'>送货</view>
</view>
<view class='item acea-row row-between'>
<view>配送人姓名</view>
<view class='conter'>{{orderInfo.deliveryName || ''}}</view>
<view>收货人:</view>
<view class='conter'>{{orderInfo.realName}}</view>
</view>
<view class='item acea-row row-between'>
<view>联系电话:</view>
<view class='conter acea-row row-middle row-right'>{{orderInfo.deliveryId || ''}}<text class='copy' @tap='goTel'>拨打</text></view>
<view class='conter'>{{orderInfo.userPhone}}</view>
</view>
</view>
<view class='wrapper' v-else-if='orderInfo.deliveryType=="fictitious"'>
<view class='item acea-row row-between'>
<view>虚拟发货</view>
<view class='conter'>已发货请注意查收</view>
<view>收货地址:</view>
<view class='conter'>{{orderInfo.userAddress}}</view>
</view>
</view>
<view v-if="orderInfo.status>0">
<view class='wrapper borRadius14' v-if='orderInfo.deliveryType=="express"'>
<view class='item acea-row row-between'>
<view>配送方式:</view>
<view class='conter'>发货</view>
</view>
<view class='item acea-row row-between'>
<view>快递公司:</view>
<view class='conter'>{{orderInfo.deliveryName || ''}}</view>
</view>
<view class='item acea-row row-between'>
<view>快递号:</view>
<view class='conter'>{{orderInfo.deliveryId || ''}}</view>
</view>
</view>
<view class='wrapper borRadius14' v-else-if='orderInfo.deliveryType=="send"'>
<view class='item acea-row row-between'>
<view>配送方式:</view>
<view class='conter'>送货</view>
</view>
<view class='item acea-row row-between'>
<view>配送人姓名:</view>
<view class='conter'>{{orderInfo.deliveryName || ''}}</view>
</view>
<view class='item acea-row row-between'>
<view>联系电话:</view>
<view class='conter acea-row row-middle row-right'>{{orderInfo.deliveryId || ''}}<text
class='copy' @tap='goTel'>拨打</text></view>
</view>
</view>
<view class='wrapper borRadius14' v-else-if='orderInfo.deliveryType=="fictitious"'>
<view class='item acea-row row-between'>
<view>虚拟发货:</view>
<view class='conter'>已发货,请注意查收</view>
</view>
</view>
</view>
<view class='wrapper borRadius14'>
<view class='item acea-row row-between'>
<view>商品总价:</view>
<view class='conter'>¥{{orderInfo.proTotalPrice}}</view>
</view>
<view class='item acea-row row-between' v-if="orderInfo.payPostage > 0">
<view>运费:</view>
<view class='conter'>¥{{orderInfo.payPostage}}</view>
</view>
<view class='item acea-row row-between' v-if='orderInfo.couponId'>
<view>优惠券抵扣:</view>
<view class='conter'>-¥{{orderInfo.couponPrice}}</view>
</view>
<view class='item acea-row row-between' v-if="orderInfo.useIntegral > 0">
<view>积分抵扣:</view>
<view class='conter'>-¥{{orderInfo.deductionPrice}}</view>
</view>
<view class='actualPay acea-row row-right'>实付款:<text
class='money font-color'>¥{{orderInfo.payPrice}}</text></view>
</view>
<view style='height:120rpx;'></view>
<view class='footer acea-row row-right row-middle' v-if="isGoodsReturn==false">
<view class="qs-btn" v-if="!orderInfo.paid" @click.stop="cancelOrder">取消订单</view>
<view class='bnt bg-color' v-if="!orderInfo.paid" @tap='pay_open(orderInfo.orderId)'>立即付款</view>
<!-- #ifdef MP -->
<view @tap="openSubcribe('/pages/users/goods_return/index?orderId='+orderInfo.orderId)"
class='bnt cancel' v-else-if="orderInfo.paid === true && orderInfo.refundStatus === 0 && orderInfo.type!==1 && type==='normal'">申请退款
</view>
<!-- #endif -->
<!-- #ifndef MP -->
<navigator hover-class="none" :url="'/pages/users/goods_return/index?orderId='+orderInfo.orderId"
class='bnt cancel' v-else-if="orderInfo.paid === true && orderInfo.refundStatus === 0 && orderInfo.type!==1 && type==='normal'">申请退款
</navigator>
<!-- #endif -->
<view class='bnt bg-color' v-if="orderInfo.combinationId > 0" @tap='goJoinPink'>查看拼团</view>
<navigator class='bnt cancel' v-if="orderInfo.deliveryType == 'express' && orderInfo.status >0"
hover-class='none' :url="'/pages/users/goods_logistics/index?orderId='+ orderInfo.orderId">查看物流
</navigator>
<view class='bnt bg-color' v-if="orderInfo.status==1" @tap='confirmOrder'>确认收货</view>
<view class='bnt cancel' v-if="orderInfo.status==3" @tap='delOrder'>删除订单</view>
<view class='bnt bg-color' v-if="orderInfo.status==3 && orderInfo.type!==1" @tap='goOrderConfirm'>再次购买</view>
</view>
</view>
<view class='wrapper'>
<view class='item acea-row row-between'>
<view>支付金额</view>
<view class='conter'>{{orderInfo.totalPrice}}</view>
</view>
<view class='item acea-row row-between' v-if='orderInfo.couponId'>
<view>优惠券抵扣</view>
<view class='conter'>-{{orderInfo.couponPrice}}</view>
</view>
<view class='item acea-row row-between' v-if="orderInfo.useIntegral > 0">
<view>积分抵扣</view>
<view class='conter'>-{{orderInfo.deductionPrice}}</view>
</view>
<view class='item acea-row row-between' v-if="orderInfo.payPostage > 0">
<view>运费</view>
<view class='conter'>{{orderInfo.payPostage}}</view>
</view>
<view class='actualPay acea-row row-right'>实付款<text class='money font-color'>{{orderInfo.payPrice}}</text></view>
</view>
<view style='height:120rpx;'></view>
<view class='footer acea-row row-right row-middle' v-if="isGoodsReturn==false || status.type == 9">
<view class="qs-btn" v-if="status.type == 0 || status.type == -9" @click.stop="cancelOrder">取消订单</view>
<view class='bnt bg-color' v-if="status.type==0" @tap='pay_open(orderInfo.orderId)'>立即付款</view>
<!-- #ifdef MP -->
<view @tap="openSubcribe('/pages/users/goods_return/index?orderId='+orderInfo.orderId)" class='bnt cancel'
v-else-if="orderInfo.paid === true && orderInfo.refundStatus === 0">申请退款</view>
<!-- #endif -->
<!-- #ifndef MP -->
<navigator hover-class="none" :url="'/pages/users/goods_return/index?orderId='+orderInfo.orderId" class='bnt cancel'
v-else-if="orderInfo.paid === true && orderInfo.refundStatus === 0">申请退款</navigator>
<!-- #endif -->
<view class='bnt bg-color' v-if="status.class_status==1" @tap='goJoinPink'>查看拼团</view>
<navigator class='bnt cancel' v-if="orderInfo.deliveryType == 'express' && status.class_status==3 && status.type==2"
hover-class='none' :url="'/pages/users/goods_logistics/index?orderId='+ orderInfo.orderId">查看物流</navigator>
<view class='bnt bg-color' v-if="status.class_status==3" @tap='confirmOrder'>确认收货</view>
<view class='bnt cancel' v-if="status.type==4" @tap='delOrder'>删除订单</view>
<view class='bnt bg-color' v-if="status.class_status==5" @tap='goOrderConfirm'>再次购买</view>
</view>
</view>
<home></home>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id"
:totalPrice='totalPrice'></payment>
</view>
</template>
<style scoped lang="scss">
.shuoming{
width: 32rpx;
height: 32rpx;
}
.goodCall {
color: #e93323;
color: $theme-color;
text-align: center;
width: 100%;
height: 86rpx;
@@ -255,15 +282,15 @@
justify-content: center;
height: 86rpx;
font-size: 30rpx;
color: #e93323;
color: $theme-color;
}
/* #endif */
}
.order-details .header {
height: 250rpx;
padding: 0 30rpx;
height: 150rpx;
}
.order-details .header.on {
@@ -301,11 +328,18 @@
margin-left: 20rpx;
}
.picTxt {
height: 150rpx;
}
.order-details .nav {
background-color: #fff;
font-size: 26rpx;
color: #282828;
padding: 25rpx 0;
padding: 27rpx 0;
width: 100%;
border-radius: 14rpx;
margin: -100rpx auto 0 auto;
}
.order-details .nav .navCon {
@@ -313,7 +347,7 @@
}
.order-details .nav .on {
color: #e93323;
color: $theme-color;
}
.order-details .nav .progress {
@@ -337,8 +371,8 @@
font-size: 26rpx;
color: #868686;
background-color: #fff;
margin-top: 13rpx;
padding: 35rpx 30rpx;
margin-top: 15rpx;
padding: 30rpx 24rpx;
}
.order-details .address .name {
@@ -365,7 +399,7 @@
.order-details .wrapper {
background-color: #fff;
margin-top: 12rpx;
padding: 30rpx;
padding: 30rpx 24rpx;
}
.order-details .wrapper .item {
@@ -379,14 +413,14 @@
.order-details .wrapper .item .conter {
color: #868686;
width: 460rpx;
// width: 490rpx;
text-align: right;
}
.order-details .wrapper .item .conter .copy {
font-size: 20rpx;
color: #333;
border-radius: 3rpx;
border-radius: 20rpx;
border: 1rpx solid #666;
padding: 3rpx 15rpx;
margin-left: 24rpx;
@@ -415,10 +449,10 @@
}
.order-details .footer .bnt {
width: 176rpx;
height: 60rpx;
width: 158rpx;
height: 54rpx;
text-align: center;
line-height: 60rpx;
line-height: 54rpx;
border-radius: 50rpx;
color: #fff;
font-size: 27rpx;
@@ -435,8 +469,8 @@
.order-details .writeOff {
background-color: #fff;
margin-top: 13rpx;
padding-bottom: 30rpx;
margin-top: 15rpx;
padding-bottom: 50rpx;
}
.order-details .writeOff .title {
@@ -444,7 +478,7 @@
color: #282828;
height: 87rpx;
border-bottom: 1px solid #f0f0f0;
padding: 0 30rpx;
padding: 0 24rpx;
line-height: 87rpx;
}
@@ -531,9 +565,9 @@
color: #282828;
line-height: 86rpx;
border-bottom: 1px solid #f0f0f0;
margin-top: 13rpx;
margin-top: 15rpx;
background-color: #fff;
padding: 0 30rpx;
padding: 0 24rpx;
}
.order-details .map .place {
@@ -558,8 +592,8 @@
}
.refund {
padding: 0 30rpx 30rpx;
margin-top: 24rpx;
padding: 0 !important;
margin-top: 15rpx;
background-color: #fff;
.title {
@@ -569,7 +603,9 @@
color: #333;
height: 86rpx;
border-bottom: 1px solid #f5f5f5;
font-weight: 400;
padding: 0 24rpx;
image {
width: 32rpx;
height: 32rpx;
@@ -578,9 +614,9 @@
}
.con {
padding-top: 25rpx;
font-size: 28rpx;
color: #868686;
font-size: 25rpx;
color: #666666;
padding: 30rpx 24rpx;
}
}
</style>
@@ -588,7 +624,6 @@
<script>
import {
getOrderDetail,
orderAgain,
orderTake,
orderDel,
orderCancel,
@@ -597,9 +632,6 @@
import {
openOrderRefundSubscribe
} from '@/utils/SubscribeMessage.js';
import {
getUserInfo
} from '@/api/user.js';
import home from '@/components/home';
import payment from '@/components/payment';
import orderGoods from "@/components/orderGoods";
@@ -660,10 +692,12 @@
id: 0, //订单id
uniId: '',
utils: this.$util,
type: 'normal'
};
},
computed: mapGetters(['isLogin', 'chatUrl']),
computed: mapGetters(['isLogin', 'chatUrl', 'userInfo']),
onLoad: function(options) {
options.type == undefined || options.type == null ? this.type = 'normal' : this.type = options.type;
if (!options.order_id && !options.uniId) return this.$util.Tips({
title: '缺少参数'
}, {
@@ -675,15 +709,10 @@
onShow() {
if (this.isLogin) {
this.getOrderInfo();
this.getUserInfo();
this.payMode[1].number = this.userInfo.nowMoney;
this.$set(this, 'payMode', this.payMode);
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
onHide: function() {
@@ -700,6 +729,7 @@
});
});
// #endif
},
methods: {
kefuClick() {
@@ -801,18 +831,6 @@
*/
onLoadFun: function() {
this.getOrderInfo();
this.getUserInfo();
},
/**
* 获取用户信息
*
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
that.payMode[1].number = res.data.nowMoney;
that.$set(that, 'payMode', that.payMode);
})
},
/**
* 获取订单详细信息
@@ -825,22 +843,22 @@
});
getOrderDetail(that.order_id).then(res => {
uni.hideLoading();
let _type = res.data.pstatus.type;
that.$set(that, 'orderInfo', res.data);
that.$set(that, 'evaluate', _type == 3 ? 3 : 0);
that.$set(that, 'evaluate', res.data.status == 2 ? 2 : 0);
that.$set(that, 'system_store', res.data.systemStore);
that.$set(that, 'id', res.data.id);
let cartInfo = res.data.cartInfo,
newCartInfo = [];
cartInfo.forEach((item, index) => {
newCartInfo.push(item.info);
});
that.$set(that, 'cartInfo', newCartInfo);
that.$set(that, 'cartInfo', res.data.orderInfoList);
if (res.data.refundStatus != 0) {
that.isGoodsReturn = true;
};
that.getOrderStatus();
that.markCode(res.data.verifyCode);
if (that.orderInfo.shippingType == 2 && that.orderInfo.paid) that.markCode(res.data
.verifyCode);
if(that.orderInfo.refundStatus>0){
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: '#666666'
})
}
}).catch(err => {
uni.hideLoading();
that.$util.Tips({
@@ -904,7 +922,8 @@
if (type == 2 && delivery_type == 'express') status.class_status = 2; //查看物流
if (type == 2) status.class_status = 3; //确认收货
if (type == 4 || type == 0) status.class_status = 4; //删除订单
if (!seckill_id && !bargain_id && !combination_id && (type == 3 || type == 4)) status.class_status = 5; //再次购买
if (!seckill_id && !bargain_id && !combination_id && (type == 3 || type == 4)) status.class_status =
5; //再次购买
this.$set(this, 'status', status);
},
/**
@@ -921,16 +940,9 @@
*
*/
goOrderConfirm: function() {
let that = this;
orderAgain(that.orderInfo.orderId).then(res => {
return uni.navigateTo({
url: '/pages/users/order_confirm/index?cartId=' + res.data.cateId + '&again=true&new=true&addAgain=true'
});
}).catch(err => {
return that.$util.Tips({
title: err
});
})
this.$Order.getPreOrder("again",[{
orderNo: this.order_id
}]);
},
confirmOrder: function() {
let that = this;

View File

@@ -47,7 +47,7 @@
<button @click="goIndex" class='returnBnt cart-color' formType="submit" hover-class='none' v-else>返回首页</button>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
</view>
</template>
@@ -88,16 +88,16 @@
};
},
computed: mapGetters(['isLogin']),
// watch:{
// isLogin:{
// handler:function(newV,oldV){
// if(newV){
// this.getOrderPayInfo();
// }
// },
// deep:true
// }
// },
watch:{
isLogin:{
handler:function(newV,oldV){
if(newV){
this.getOrderPayInfo();
}
},
deep:true
}
},
onLoad: function(options) {
if (!options.order_id) return this.$util.Tips({
title: '缺少参数无法查看订单支付状态'
@@ -111,13 +111,7 @@
if (this.isLogin) {
this.getOrderPayInfo();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {

View File

@@ -1,126 +1,135 @@
<template>
<view class="new-users">
<view class="head">
<view class="user-card">
<view class="new-users copy-data" :style="{height:pageHeight}">
<view class="mid" style="flex:1;overflow: hidden;">
<scroll-view scroll-y="true" style="height: 100%;">
<view class="bg"></view>
<view class="user-info">
<image class="avatar" :src='userInfo.avatar' v-if="userInfo.avatar" @click="goEdit()"></image>
<image v-else class="avatar" src="/static/images/f.png" mode="" @click="goEdit()"></image>
<view class="info">
<!-- #ifdef MP -->
<view class="name" v-if="!userInfo.uid" @tap="openAuto">
请点击授权
</view>
<!-- #endif -->
<!-- #ifdef H5 -->
<view class="name" v-if="!userInfo.uid && isWeixin" @tap="openAuto">
请点击授权
</view>
<!-- #endif -->
<view class="name" v-if="userInfo.uid">
{{userInfo.nickname}}
<view class="vip" v-if="userInfo.vip">
<image :src="userInfo.vipIcon" alt="">
<view style="margin-left: 10rpx;" class="vip-txt">{{userInfo.vipName || ''}}</view>
<view class="head pad30">
<view class="user-card">
<view class="user-info">
<image class="avatar" :src='userInfo.avatar' v-if="userInfo.avatar && uid"
@click="goEdit()"></image>
<image v-else class="avatar" src="/static/images/f.png" mode="" @click="goEdit()"></image>
<view class="info">
<view class="name" v-if="!uid" @tap="openAuto">
请点击登录
</view>
<view class="name" v-if="uid">
{{userInfo.nickname}}
<view class="vip" v-if="userInfo.vip">
<image :src="userInfo.vipIcon" alt="">
<view style="margin-left: 10rpx;" class="vip-txt">{{userInfo.vipName || ''}}
</view>
</view>
</view>
<view class="num" v-if="userInfo.phone && uid" @click="goEdit()">
<view class="num-txt">{{userInfo.phone}}</view>
<view class="icon">
<image src="/static/images/edit.png" mode=""></image>
</view>
</view>
<view class="phone" v-if="!userInfo.phone && isLogin" @tap="bindPhone">绑定手机号</view>
</view>
</view>
<view class="num" v-if="userInfo.phone" @click="goEdit()">
<view class="num-txt">{{userInfo.phone}}</view>
<view class="icon">
<image src="/static/images/edit.png" mode=""></image>
<view class="num-wrapper">
<view class="num-item" @click="goMenuPage('/pages/users/user_money/index')">
<text
class="num">{{userInfo.nowMoney && uid ?Number(userInfo.nowMoney).toFixed(2):0}}</text>
<view class="txt">余额</view>
</view>
<view class="num-item" @click="goMenuPage('/pages/users/user_integral/index')">
<text class="num">{{userInfo.integral && uid ? userInfo.integral: 0}}</text>
<view class="txt">积分</view>
</view>
<view class="num-item" @click="goMenuPage('/pages/users/user_coupon/index')">
<text class="num">{{userInfo.couponCount && uid ? userInfo.couponCount : 0}}</text>
<view class="txt">优惠券</view>
</view>
<view class="num-item" @click="goMenuPage('/pages/users/user_goods_collection/index')">
<text class="num">{{userInfo.collectCount && uid ? userInfo.collectCount : 0}}</text>
<view class="txt">收藏</view>
</view>
</view>
<view class="phone" v-if="!userInfo.phone && isLogin" @tap="bindPhone">绑定手机号</view>
<!-- <view class="sign" @click="goSignIn">签到</view> -->
</view>
<view class="order-wrapper">
<view class="order-hd flex">
<view class="left">订单中心</view>
<navigator class="right flex" hover-class="none" url="/pages/users/order_list/index"
open-type="navigate">
查看全部
<text class="iconfont icon-xiangyou"></text>
</navigator>
</view>
<view class="order-bd">
<block v-for="(item,index) in orderMenu" :key="index">
<navigator class="order-item" hover-class="none" :url="item.url">
<view class="pic">
<image :src="item.img" mode=""></image>
<text class="order-status-num" v-if="item.num > 0">{{ item.num }}</text>
</view>
<view class="txt">{{item.title}}</view>
</navigator>
</block>
</view>
</view>
</view>
<view class="num-wrapper">
<view class="num-item" @click="goMenuPage('/pages/users/user_money/index')">
<text class="num">{{userInfo.nowMoney?Number(userInfo.nowMoney).toFixed(2):0}}</text>
<view class="txt">余额</view>
<view class="contenBox">
<!-- 轮播 -->
<view class="slider-wrapper" v-if="imgUrls.length>0">
<swiper indicator-dots="true" :autoplay="autoplay" :circular="circular" :interval="interval"
:duration="duration" indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
<block v-for="(item,index) in imgUrls" :key="index">
<swiper-item class="borRadius14">
<image :src="item.pic" class="slide-image" @click="navito(item.url)"></image>
</swiper-item>
</block>
</swiper>
</view>
<view class="num-item" @click="goMenuPage('/pages/users/user_integral/index')">
<text class="num">{{userInfo.integral || 0}}</text>
<view class="txt">积分</view>
</view>
<view class="num-item" @click="goMenuPage('/pages/users/user_coupon/index')">
<text class="num">{{userInfo.couponCount || 0}}</text>
<view class="txt">优惠券</view>
</view>
</view>
<view class="sign" @click="goSignIn">签到</view>
</view>
<view class="order-wrapper">
<view class="order-hd flex">
<view class="left">订单中心</view>
<navigator class="right flex" hover-class="none" url="/pages/users/order_list/index" open-type="navigate">
查看全部
<text class="iconfont icon-xiangyou"></text>
</navigator>
</view>
<view class="order-bd">
<block v-for="(item,index) in orderMenu" :key="index">
<navigator class="order-item" hover-class="none" :url="item.url">
<view class="pic">
<image :src="item.img" mode=""></image>
<text class="order-status-num" v-if="item.num > 0">{{ item.num }}</text>
<!-- 会员菜单 -->
<view class="user-menus" style="margin-top: 20rpx;">
<view class="menu-title">我的服务</view>
<view class="list-box">
<block v-for="(item,index) in MyMenus" :key="index">
<navigator class="item" :url="item.url" hover-class="none"
v-if="!(item.url =='/pages/service/index' || (item.url =='/pages/users/user_spread_user/index' && !userInfo.isPromoter))">
<image :src="item.pic"></image>
<text>{{item.name}}</text>
</navigator>
</block>
<!-- #ifndef MP -->
<view class="item" @click="kefuClick">
<image :src="servicePic"></image>
<text>联系客服</text>
</view>
<view class="txt">{{item.title}}</view>
</navigator>
</block>
</view>
</view>
</view>
<!-- 轮播 -->
<view class="slider-wrapper" v-if="imgUrls.length>0">
<swiper indicator-dots="true" :autoplay="autoplay" :circular="circular" :interval="interval" :duration="duration"
indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
<block v-for="(item,index) in imgUrls" :key="index">
<swiper-item>
<image :src="item.pic" class="slide-image" @click="navito(item.url)"></image>
</swiper-item>
</block>
</swiper>
</view>
<!-- 会员菜单 -->
<view class="user-menus" style="margin-top: 20rpx;">
<block v-for="(item,index) in MyMenus" :key="index">
<navigator class="item" :url="item.url" hover-class="none" v-if="!(item.url =='/pages/service/index' || (item.url =='/pages/users/user_spread_user/index' && !userInfo.isPromoter))">
<view class="left">
<image :src="item.pic"></image>
<text>{{item.name}}</text>
<!-- #endif -->
<!-- #ifdef MP -->
<button class="item" open-type='contact' hover-class='none'>
<image :src="servicePic"></image>
<text>联系客服</text>
</button>
<!-- #endif -->
</view>
</view>
<view class="iconfont icon-xiangyou"></view>
</navigator>
</block>
<!-- #ifdef H5 -->
<view class="item" @click="kefuClick">
<view class="left">
<image :src="servicePic"></image>
<text>联系客服</text>
<image src="/static/images/support.png" alt="" class='support'>
<view class="uni-p-b-98"></view>
</view>
<view class="iconfont icon-xiangyou"></view>
</view>
<!-- #endif -->
<!-- #ifdef MP -->
<button class="item" open-type='contact' hover-class='none'>
<view class="left">
<image :src="servicePic"></image>
<text>联系客服</text>
</view>
<view class="iconfont icon-xiangyou"></view>
</button>
<!-- #endif -->
</scroll-view>
</view>
<img src="/static/images/support.png" alt="" class='support'>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
</view>
</template>
<script>
let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
import Cache from '@/utils/cache';
import {
getMenuList,
getUserInfo
BACK_URL
} from '@/config/cache';
import {
getMenuList
// setVisit
} from '@/api/user.js';
import {
@@ -145,7 +154,7 @@
authorize
// #endif
},
computed: mapGetters(['isLogin']),
computed: mapGetters(['isLogin', 'chatUrl', 'userInfo', 'uid']),
data() {
return {
orderMenu: [{
@@ -188,10 +197,16 @@
isAuto: false, //没有授权的不会自动授权
isShowAuth: false, //是否隐藏授权
orderStatusNum: {},
userInfo: {},
MyMenus: [],
wechatUrl: [],
servicePic: '',
servicePic: '/static/images/customer.png',
sysHeight: sysHeight,
// #ifdef MP
pageHeight: '100%',
// #endif
// #ifdef H5
pageHeight: app.globalData.windowHeight,
// #endif
// #ifdef H5
isWeixin: Auth.isWeixin()
//#endif
@@ -199,33 +214,32 @@
},
onLoad() {
let that = this;
// #ifdef H5
that.$set(that, 'pageHeight', app.globalData.windowHeight);
// #endif
that.$set(that, 'MyMenus', app.globalData.MyMenus);
console.log('user页面',that.isLogin)
// if (that.isLogin == false) {
// // #ifdef H5 || APP-PLUS
// toLogin();
// // #endif
// // #ifdef MP
// this.isAuto = true;
// this.$set(this, 'isShowAuth', true);
// // #endif
// }
if (that.isLogin == false) {
// #ifdef H5
toLogin()
// #endif
}
},
onShow: function() {
let that = this;
// #ifdef H5
uni.getSystemInfo({
success: function(res) {
that.pageHeight = res.windowHeight + 'px'
}
});
// #endif
if (that.isLogin) {
this.getUserInfo();
this.getMyMenus();
// this.setVisit();
this.getOrderData();
}else{
// #ifdef H5 || APP-PLUS
this.$store.dispatch('USERINFO');
} else {
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
@@ -235,15 +249,15 @@
// url:'/pages/user/index'
// }).then(res=>{})
// },
navito(e){
navito(e) {
window.location.href = 'https://' + e;
},
kefuClick(){
location.href = this.wechatUrl[0].wap_url;
kefuClick() {
location.href = this.chatUrl;
},
getOrderData(){
getOrderData() {
let that = this;
orderData().then(res=>{
orderData().then(res => {
that.orderMenu.forEach((item, index) => {
switch (item.title) {
case '待付款':
@@ -263,17 +277,16 @@
break
}
})
that.$set(that,'orderMenu',that.orderMenu);
that.$set(that, 'orderMenu', that.orderMenu);
})
},
// 打开授权
openAuto() {
this.isAuto = true;
this.isShowAuth = true
Cache.set(BACK_URL, '')
toLogin();
},
// 授权回调
onLoadFun() {
this.getUserInfo();
this.getMyMenus();
// this.setVisit();
this.getOrderData();
@@ -292,20 +305,9 @@
// 绑定手机
bindPhone() {
uni.navigateTo({
url: '/pages/users/user_phone/index'
url: '/pages/users/app_login/index'
})
},
/**
* 获取个人用户信息
*/
getUserInfo: function() {
const _app = getApp();
let that = this;
getUserInfo().then(res => {
that.userInfo = res.data;
that.$store.commit("SETUID", res.data.uid);
});
},
/**
*
* 获取个人中心图标
@@ -319,7 +321,7 @@
return item.url.indexOf('service') !== -1
})
res.data.routine_my_menus.map((item) => {
if(item.url.indexOf('service') !==-1) that.servicePic = item.pic
if (item.url.indexOf('service') !== -1) that.servicePic = item.pic
})
that.imgUrls = res.data.routine_my_banner
});
@@ -327,21 +329,12 @@
// 编辑页面
goEdit() {
if (this.isLogin == false) {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
} else {
uni.navigateTo({
url: '/pages/users/user_info/index'
})
}
// uni.navigateTo({
// url: '/pages/users/user_info/index'
// })
},
// 签到
goSignIn() {
@@ -350,14 +343,14 @@
})
},
// goMenuPage
goMenuPage(url){
if(this.isLogin){
goMenuPage(url) {
if (this.isLogin) {
uni.navigateTo({
url
})
}else{
} else {
// #ifdef MP
this.openAuto()
this.openAuto()
// #endif
}
}
@@ -366,37 +359,62 @@
</script>
<style lang="scss" scoped>
page,
body {
height: 100%;
}
.bg {
position: absolute;
left: 0;
top: 0;
width:100%;
height: 420rpx;
background-image: url('~@/static/images/user_bg.png');
background-repeat: no-repeat;
background-size: 100% 100%;
}
.contenBox {
padding: 0 30rpx;
}
.support {
width: 219rpx;
height: 74rpx;
margin: 54rpx auto;
display: block;
}
.new-users {
display: flex;
flex-direction: column;
height: 100%;
.sys-head {
position: relative;
width: 100%;
background: linear-gradient(90deg, $bg-star1 0%, $bg-end1 100%);
.sys-title {
z-index: 10;
position: relative;
height: 43px;
text-align: center;
line-height: 43px;
font-size: 36rpx;
color: #FFFFFF;
}
}
.head {
padding-top: 30rpx;
background: #fff;
background: linear-gradient(360deg, rgba(255, 121, 49, 0) 0%, rgba(248, 74, 29, 0.82) 39%, #E93323 100%);
// padding: 0 30rpx;
.user-card {
position: relative;
width: 710rpx;
height: 340rpx;
width: 100%;
margin: 0 auto;
padding: 35rpx 28rpx;
background: linear-gradient(90deg, $bg-star 0%, $bg-end 100%);
box-shadow: 0px 10rpx 20rpx 0px rgba(255, 2, 0, 0.2);
border-radius: 24rpx;
.bg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-image: url('~@/static/images/user_bg.png');
background-size: 100% 100%;
}
padding: 35rpx 0 30rpx 0;
.user-info {
z-index: 20;
position: relative;
@@ -430,7 +448,6 @@
border-radius: 18px;
font-size: 20rpx;
margin-left: 12rpx;
// margin-top: 2rpx;
image {
width: 27rpx;
@@ -460,8 +477,7 @@
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 60rpx;
// padding: 0 47rpx;
margin-top: 30rpx;
color: #fff;
.num-item {
@@ -474,7 +490,7 @@
}
.txt {
margin-top: 8rpx;
margin-top: 10rpx;
font-size: 26rpx;
color: rgba(255, 255, 255, 0.6);
}
@@ -500,13 +516,24 @@
}
.order-wrapper {
background-color: #fff;
border-radius: 14rpx;
padding: 30rpx 16rpx;
position: relative;
z-index: 11;
.order-hd {
justify-content: space-between;
padding: 0 20rpx 28rpx;
margin-top: 33rpx;
border-bottom: 1px solid #F5F5F5;
font-size: 30rpx;
color: #282828;
margin-bottom: 40rpx;
padding: 0 16rpx;
.left {
color: #282828;
font-size: 30rpx;
font-weight: 600;
}
.right {
align-items: center;
@@ -515,22 +542,21 @@
.icon-xiangyou {
margin-left: 5rpx;
margin-top: 6rpx;
font-size: 26rpx;
font-size: 24rpx;
}
}
}
.order-bd {
display: flex;
padding: 0 24rpx;
justify-content: space-between;
padding: 0;
.order-item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 20%;
height: 160rpx;
.pic {
position: relative;
@@ -554,7 +580,7 @@
.slider-wrapper {
margin: 20rpx 0;
height: 130rpx;
height: 138rpx;
swiper,
swiper-item {
@@ -563,47 +589,51 @@
image {
width: 100%;
height: 130rpx;
height: 100%;
}
}
.user-menus {
background-color: #fff;
border-radius: 14rpx;
.menu-title {
padding: 30rpx 30rpx 40rpx;
font-size: 30rpx;
color: #282828;
font-weight: 600;
}
.list-box {
display: flex;
flex-wrap: wrap;
padding: 0;
}
.item {
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
height: 90rpx;
padding: 0 30rpx;
flex-direction: column;
width: 25%;
margin-bottom: 47rpx;
font-size: 26rpx;
color: #333333;
.left {
display: flex;
align-items: center;
image {
width: 46rpx;
height: 46rpx;
margin-right: 25rpx;
}
image {
width: 52rpx;
height: 52rpx;
margin-bottom: 18rpx;
}
&::before {
content: ' ';
position: absolute;
right: 0;
bottom: 0;
width: 655rpx;
height: 1px;
background-color: #EEEEEE;
}
&:last-child::before {
display: none;
}
}
button{
button {
font-size: 28rpx;
}
}
@@ -613,13 +643,13 @@
}
.order-status-num {
min-width:12rpx;
min-width: 12rpx;
background-color: #fff;
color: #ee5a52;
border-radius: 15px;
position: absolute;
right:-14rpx;
right: -14rpx;
top: -15rpx;
font-size: 20rpx;
padding: 0 8rpx;

View File

@@ -0,0 +1,266 @@
<template>
<view class="appBox">
<div class="shading">
<image :src="logoUrl" v-if="logoUrl" />
<image src="/static/images/logo2.png" v-else />
</div>
<mobileLogin :isUp="isUp" :isShow="isShow" :platform="platform" :isPos="isPos" :appleShow="appleShow" :authKey="authKey" @wechatPhone="wechatPhone"></mobileLogin>
</view>
</template>
<script>
const app = getApp();
import sendVerifyCode from "@/mixins/SendVerifyCode";
import Routine from '@/libs/routine';
import {
loginMobile,
registerVerify,
getCodeApi,
getUserInfo,
phoneSilenceAuth,
phoneWxSilenceAuth
} from "@/api/user";
import {
bindingPhone
} from '@/api/api.js'
import {
getUserPhone
} from '@/api/public';
import mobileLogin from '@/components/login_mobile/index.vue'
export default {
name: 'login_mobile',
data() {
return {
options: '',
keyCode: '',
account: '',
codeNum: '',
isUp: true,
authKey: '',
logoUrl: '',
isShow: false,
isPos: false,
platform: '', // 手机平台
appleShow: '' //是否是苹果登录
}
},
components: {
mobileLogin
},
mixins: [sendVerifyCode],
mounted() {
//this.getCode();
},
onLoad: function(options) {
let that = this;
// 获取系统信息
uni.getSystemInfo({
success(res) {
that.platform = res.platform;
}
});
const {
code,
state,
scope,
back_url,
appleShow
} = options;
that.options = options
if (options.authKey) that.authKey = options.authKey
if (options.appleShow) that.appleShow = options.appleShow
},
methods: {
wechatPhone() {
this.$Cache.clear('snsapiKey');
if (this.options.back_url) {
let url = uni.getStorageSync('snRouter');
url = url.indexOf('/pages/index/index') != -1 ? '/' : url;
if (url.indexOf('/pages/users/wechat_login/index') !== -1) {
url = '/';
}
if (!url) {
url = '/pages/index/index';
}
this.isUp = false
uni.showToast({
title: '登录成功',
icon: 'none'
})
setTimeout(res => {
location.href = url
}, 800)
} else {
uni.navigateBack()
}
},
// 获取验证码
async code() {
let that = this;
if (!that.account) return that.$util.Tips({
title: '请填写手机号码'
});
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
title: '请输入正确的手机号码'
});
await registerVerify(that.account).then(res => {
that.$util.Tips({
title: res.msg
});
that.sendCode();
}).catch(err => {
return that.$util.Tips({
title: err
})
})
},
// 获取验证码api
getCode() {
let that = this
getCodeApi().then(res => {
that.keyCode = res.data.key;
}).catch(res => {
that.$util.Tips({
title: res
});
});
},
close() {
this.$emit('close', false)
},
// #ifdef MP
phoneSilenceAuth(code) {
let self = this
phoneSilenceAuth({
code: code,
spid: app.globalData.spid,
spread: app.globalData.code,
phone: this.account,
captcha: this.codeNum
}).then(res => {
this.$store.commit('LOGIN', {
token: res.data.token
});
this.$store.commit("SETUID", res.data.uid);
this.getUserInfo();
}).catch(error => {
self.$util.Tips({
title: error
})
})
},
// #endif
/**
* 获取个人用户信息
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
uni.hideLoading();
that.userInfo = res.data
that.$store.commit("UPDATE_USERINFO", res.data);
// #ifdef MP
that.$util.Tips({
title: '登录成功',
icon: 'success'
}, {
tab: 3
})
that.close()
// #endif
// #ifdef H5
that.$emit('wechatPhone', true)
// #endif
});
},
}
}
</script>
<style>
page {
height: 100%;
}
</style>
<style lang="scss" scoped>
.appBox {
background-color: #fff;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
overflow: hidden;
}
.shading {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
image {
width: 180rpx;
height: 180rpx;
}
}
page {
background-color: #fff !important;
}
.ChangePassword .phone {
font-size: 32rpx;
font-weight: bold;
text-align: center;
margin-top: 55rpx;
}
.ChangePassword .list {
width: 580rpx;
margin: 53rpx auto 0 auto;
}
.ChangePassword .list .item {
width: 100%;
height: 110rpx;
border-bottom: 2rpx solid #f0f0f0;
}
.ChangePassword .list .item input {
width: 100%;
height: 100%;
font-size: 32rpx;
}
.ChangePassword .list .item .placeholder {
color: #b9b9bc;
}
.ChangePassword .list .item input.codeIput {
width: 340rpx;
}
.ChangePassword .list .item .code {
font-size: 32rpx;
background-color: #fff;
}
.ChangePassword .list .item .code.on {
color: #b9b9bc !important;
}
.ChangePassword .confirmBnt {
font-size: 32rpx;
width: 580rpx;
height: 90rpx;
border-radius: 45rpx;
color: #fff;
margin: 92rpx auto 0 auto;
text-align: center;
line-height: 90rpx;
}
</style>

View File

@@ -29,11 +29,15 @@
<view class="people font-color">{{item.brokeragePrice}}</view>
</view>
</view>
<view class='noCommodity' v-if="rankList.length == 0 && (page != 1 || active== 0)">
<emptyPage title="暂无排行~"></emptyPage>
</view>
</view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
</template>
@@ -45,6 +49,8 @@
import {
toLogin
} from '@/libs/login.js';
import home from '@/components/home';
import emptyPage from '@/components/emptyPage.vue'
import {
mapGetters
} from "vuex";
@@ -53,6 +59,8 @@
// #endif
export default {
components: {
emptyPage,
home,
// #ifdef MP
authorize
// #endif
@@ -90,13 +98,7 @@
this.getBrokerageRankList();
this.getBrokerageRankNumber(this.type);
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
@@ -179,7 +181,7 @@
.CommissionRank .wrapper {
width: 710rpx;
background-color: #fff;
border-radius: 20rpx;
border-radius: 14rpx;
margin: -76rpx auto 0 auto;
}
@@ -193,7 +195,8 @@
}
.CommissionRank .wrapper .nav .item.font-color {
border-bottom: 4rpx solid #e93323;
border-bottom: 4rpx solid $theme-color;
margin-top: -2rpx;
}
.CommissionRank .wrapper .list {

View File

@@ -1,24 +1,27 @@
<template>
<view>
<form @submit="formSubmit" report-submit='true'>
<view class='evaluate-con'>
<view class='goodsStyle acea-row row-between'>
<view class='evaluate-con pad30'>
<view class='goodsStyle acea-row row-between borRadius14'>
<view class='pictrue'>
<image :src='productInfo.image'></image>
</view>
<view class='text acea-row row-between'>
<view class='name line2'>{{productInfo.storeName}}</view>
<view>
<view class='name line2'>{{productInfo.storeName}}</view>
<view class='attr line1' v-if="productInfo.sku">{{productInfo.sku}}</view>
</view>
<view class='money'>
<view>{{productInfo.price}}</view>
<view class='num'>x{{cart_num}}</view>
<view>{{productInfo.truePrice}}</view>
<view class='num'>x{{productInfo.cartNum}}</view>
</view>
</view>
</view>
<view class='score'>
<view class='score borRadius14'>
<view class='item acea-row row-middle' v-for="(item,indexw) in scoreList" :key="indexw">
<view>{{item.name}}</view>
<view class='starsList'>
<text @click="stars(indexn, indexw)" v-for="(itemn, indexn) in item.stars" :key="indexn" class='iconfont' :class="item.index >= indexn? 'icon-shitixing font-color':'icon-kongxinxing'"></text>
<text @click="stars(indexn, indexw)" v-for="(itemn, indexn) in item.stars" :key="indexn" class='iconfont' :class="item.index >= indexn? 'icon-shitixing':'icon-kongxinxing'"></text>
</view>
<text class='evaluate'>{{item.index === -1 ? "" : item.index + 1 + "分"}}</text>
</view>
@@ -27,7 +30,7 @@
<view class='list acea-row row-middle'>
<view class='pictrue' v-for="(item,index) in picsPath" :key="index">
<image :src='item'></image>
<text class='iconfont icon-guanbi1 font-color' @click='DelPic(index)'></text>
<text class='iconfont icon-guanbi1' @click='DelPic(index)'></text>
</view>
<view class='pictrue acea-row row-center-wrapper row-column' @click='uploadpic' v-if="picsPath.length < 8">
<text class='iconfont icon-icon25201'></text>
@@ -40,7 +43,7 @@
</view>
</form>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
</view>
</template>
@@ -103,26 +106,19 @@
}
},
onLoad(options) {
if (!options.unique || !options.uni || !options.id) return this.$util.Tips({
if (!options.unique || !options.orderId ) return this.$util.Tips({
title: '缺少参数'
}, {
tab: 3,
url: 1
});
this.unique = options.unique;
this.orderId = options.uni;
this.id = options.id;
this.evaluateId = options.id;
this.unique = Number(options.unique) || 0;
this.orderId = options.orderId || 0;
this.evaluateId = Number(options.id) || 0;
if (this.isLogin) {
this.getOrderProduct();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
@@ -140,12 +136,12 @@
getOrderProduct: function() {
let that = this;
orderProduct({
orderId: that.id,
orderId: that.evaluateId,
uni: that.unique
}).then(res => {
that.$set(that, 'productInfo', res.data.productInfo);
that.$set(that, 'cart_num', res.data.cartNum);
that.$set(that, 'productId', res.data.productId);
that.$set(that, 'productInfo', res.data);
// that.$set(that, 'cart_num', res.data.cartNum);
// that.$set(that, 'productId', res.data.productId);
});
},
stars: function(indexn, indexw) {
@@ -159,7 +155,7 @@
let that = this,
pic = this.picsPath[index];
that.picsPath.splice(index, 1);
that.$set(that, 'picsPath', that.picsPath);
that.pics.splice(index, 1);
},
/**
@@ -196,10 +192,10 @@
value.productScore = product_score;
value.serviceScore = service_score;
value.pics = that.pics.length>0?JSON.stringify(that.pics):'';
value.productId = that.productId;
value.oid = that.evaluateId;
value.productId = that.productInfo.productId;
value.orderNo = that.orderId;
value.unique = that.unique;
value.sku = that.productInfo.attrInfo.suk;
value.sku = that.productInfo.sku;
uni.showLoading({
title: "正在发布评论……"
});
@@ -221,16 +217,23 @@
</script>
<style lang="scss" scoped>
.goodsStyle .text .name, .attr{
//width: 496rpx;
}
.icon-shitixing{
color: #FFBB00 !important;
}
.evaluate-con .score {
background-color: #fff;
border-top: 1rpx solid #f5f5f5;
// border-top: 1rpx solid #f5f5f5;
margin-top: 20rpx;
font-size: 28rpx;
color: #282828;
padding: 48rpx 30rpx 65rpx 30rpx;
padding: 46rpx 24rpx;
}
.evaluate-con .score .item~.item {
margin-top: 30rpx;
margin-top: 36rpx;
}
.evaluate-con .score .item .starsList {
@@ -252,10 +255,10 @@
}
.evaluate-con .score .textarea {
width: 690rpx;
background-color: #fafafa;
border-radius: 10rpx;
margin-top: 48rpx;
width: 100%;
background-color: #F5F5F5;
border-radius: 14rpx;
margin-top: 55rpx;
}
.evaluate-con .score .textarea textarea {
@@ -264,6 +267,7 @@
width: 100%;
box-sizing: border-box;
height: 160rpx;
width: auto !important;
}
.evaluate-con .score .textarea .placeholder {
@@ -282,6 +286,7 @@
position: relative;
font-size: 22rpx;
color: #bbb;
border-radius: 14rpx;
}
.evaluate-con .score .textarea .list .pictrue:nth-last-child(1) {
@@ -292,7 +297,7 @@
.evaluate-con .score .textarea .list .pictrue image {
width: 100%;
height: 100%;
border-radius: 3rpx;
border-radius: 14rpx;
}
.evaluate-con .score .textarea .list .pictrue .icon-guanbi1 {
@@ -310,7 +315,7 @@
.evaluate-con .score .evaluateBnt {
font-size: 30rpx;
color: #fff;
width: 690rpx;
width: 100%;
height: 86rpx;
border-radius: 43rpx;
text-align: center;

View File

@@ -1,23 +1,29 @@
<template>
<view>
<view style="height: 100%;">
<view class='evaluate-list'>
<view class='generalComment acea-row row-between-wrapper'>
<view class='acea-row row-middle font-color'>
<view class='evaluate'>评分</view>
<view class='start' :class="'star'+ (replyData.sumCount===0?'3':Math.round(replyData.replyStar/replyData.sumCount))"></view>
<view class='start'
:class="'star'+ (replyData.sumCount===0?'3':Math.round(replyData.replyStar/replyData.sumCount))">
</view>
</view>
<view><text class='font-color'>{{(replyData.replyChance)*100}}%</text>好评率</view>
</view>
<view class='nav acea-row row-middle'>
<view class='item' :class='type==0 ? "bg-color":""' @click='changeType(0)'>全部({{replyData.sumCount}})</view>
<view class='item' :class='type==1 ? "bg-color":""' @click='changeType(1)'>好评({{replyData.goodCount}})</view>
<view class='item' :class='type==2 ? "bg-color":""' @click='changeType(2)'>({{replyData.inCount}})</view>
<view class='item' :class='type==3 ? "bg-color":""' @click='changeType(3)'>差评({{replyData.poorCount}})</view>
<view class='item' :class='type==0 ? "bg-color":""' @click='changeType(0)'>全部({{replyData.sumCount}})
</view>
<view class='item' :class='type==1 ? "bg-color":""' @click='changeType(1)'>({{replyData.goodCount}})
</view>
<view class='item' :class='type==2 ? "bg-color":""' @click='changeType(2)'>中评({{replyData.inCount}})
</view>
<view class='item' :class='type==3 ? "bg-color":""' @click='changeType(3)'>差评({{replyData.poorCount}})
</view>
</view>
<userEvaluation :reply="reply"></userEvaluation>
<view class='loadingicon acea-row row-center-wrapper'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
</view>
<view class='loadingicon acea-row row-center-wrapper'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
<view class='noCommodity' v-if="!replyData.sumCount && page > 1">
<view class='pictrue'>
@@ -75,7 +81,7 @@
getProductReplyCount: function() {
let that = this;
getReplyConfig(that.productId).then(res => {
that.$set(that,'replyData',res.data);
that.$set(that, 'replyData', res.data);
});
},
/**
@@ -95,16 +101,16 @@
let list = res.data.list,
loadend = list.length < that.limit;
that.reply = that.$util.SplitArray(list, that.reply);
that.$set(that,'reply',that.reply);
that.$set(that, 'reply', that.reply);
that.loading = false;
that.loadend = loadend;
if(that.reply.length){
if (that.reply.length) {
that.loadTitle = loadend ? "😕人家是有底线的~~" : "加载更多";
}
that.page = that.page + 1;
}).catch(err => {
that.loading = false,
that.loadTitle = '加载更多'
that.loadTitle = '加载更多'
});
},
/*
@@ -116,7 +122,7 @@
this.type = type;
this.page = 1;
this.loadend = false;
this.$set(this,'reply',[]);
this.$set(this, 'reply', []);
this.getProductReplyList();
}
},
@@ -130,10 +136,48 @@
</script>
<style lang="scss">
page{background-color:#fff;}
.evaluate-list .generalComment{height:94rpx;padding:0 30rpx;margin-top:1rpx;background-color:#fff;font-size:28rpx;color:#808080;}
.evaluate-list .generalComment .evaluate{margin-right:7rpx;}
.evaluate-list .nav{font-size:24rpx;color:#282828;padding:0 30rpx 32rpx 30rpx;background-color:#fff;border-bottom:1rpx solid #f5f5f5;}
.evaluate-list .nav .item{font-size:24rpx;color:#282828;border-radius:6rpx;height:54rpx;padding:0 20rpx;background-color:#f4f4f4;line-height:54rpx;margin-right:17rpx;}
.evaluate-list .nav .item.bg-color{color:#fff;}
page {
background-color: #fff;
height: 100%;
}
.evaluate-list{
padding: 30rpx 0 0 0;
background-color: #fff;
}
.evaluate-list .generalComment {
padding: 0 30rpx;
margin-top: 1rpx;
background-color: #fff;
font-size: 28rpx;
color: #808080;
}
.evaluate-list .generalComment .evaluate {
margin-right: 7rpx;
color: #333333;
font-size: 28rpx;
}
.evaluate-list .nav {
font-size: 24rpx;
color: #282828;
padding: 30rpx;
background-color: #fff;
border-bottom: 1rpx solid #f5f5f5;
}
.evaluate-list .nav .item {
font-size: 24rpx;
color: #282828;
border-radius: 27rpx;
height: 54rpx;
padding: 0 20rpx;
background-color: #f4f4f4;
line-height: 54rpx;
margin-right: 17rpx;
}
.evaluate-list .nav .item.bg-color {
color: #fff;
}
</style>

View File

@@ -12,32 +12,36 @@
<div class="row-right">
<div>
<!-- #ifdef H5 -->
<a class="store-phone" :href="'tel:' + item.phone"><span class="iconfont icon-dadianhua01"></span></a>
<a class="store-phone" :href="'tel:' + item.phone"><span
class="iconfont icon-dadianhua01"></span></a>
<!-- #endif -->
<!-- #ifdef MP || APP-PLUS -->
<view class="store-phone" @click="call(item.phone)"><text class="iconfont icon-dadianhua01"></text></view>
<!-- #ifdef MP -->
<view class="store-phone" @click="call(item.phone)"><text
class="iconfont icon-dadianhua01"></text></view>
<!-- #endif -->
</div>
<!-- <div>
<a class="store-phone" :href="'tel:' + item.phone"><span class="iconfont icon-dadianhua01"></span></a>
</div> -->
<div class="store-distance" @click.stop="showMaoLocation(item)">
<span class="addressTxt" v-if="item.range">距离{{ item.range }}千米</span>
<span class="addressTxt" v-if="item.distance">距离{{ item.distance/1000 }}千米</span>
<span class="addressTxt" v-else>查看地图</span>
<span class="iconfont icon-youjian"></span>
</div>
</div>
</div>
<Loading :loaded="loaded" :loading="loading"></Loading>
</div>
<div>
<iframe v-if="locationShow && !isWeixin" ref="geoPage" width="0" height="0" frameborder="0" style="display:none;"
<!-- <iframe v-if="locationShow && !isWeixin" ref="geoPage" width="0" height="0" frameborder="0" style="display:none;"
scrolling="no" :src="
'https://apis.map.qq.com/tools/geolocation?key=' +
mapKey +
'&referer=myapp'
">
</iframe>
</iframe> -->
</div>
</div>
</template>
@@ -111,29 +115,60 @@
},
selfLocation() {
let self = this
uni.getLocation({
type: 'wgs84',
success: function(res) {
try {
uni.setStorageSync('user_latitude', res.latitude);
uni.setStorageSync('user_longitude', res.longitude);
} catch {}
// #ifdef H5
if (self.$wechat.isWeixin()) {
self.$wechat.location().then(res => {
this.user_latitude = res.latitude;
this.user_longitude = res.longitude;
uni.setStorageSync('user_latitude', res.latitude);
uni.setStorageSync('user_longitude', res.longitude);
self.getList();
},
complete:function() {
self.getList();
}
});
})
} else {
// #endif
uni.getLocation({
type: 'wgs84',
success: (res) => {
try {
this.user_latitude = res.latitude;
this.user_longitude = res.longitude;
uni.setStorageSync('user_latitude', res.latitude);
uni.setStorageSync('user_longitude', res.longitude);
} catch {}
self.getList();
},
complete: function() {
self.getList();
}
});
// #ifdef H5
}
// #endif
},
showMaoLocation(e) {
uni.openLocation({
latitude: Number(e.latitude),
longitude: Number(e.longitude),
success: function() {
let self = this;
// #ifdef H5
if (self.$wechat.isWeixin()) {
self.$wechat.seeLocation({
latitude: Number(e.latitude),
longitude: Number(e.longitude)
}).then(res => {
console.log('success');
Number
}
});
})
} else {
// #endif
uni.openLocation({
latitude: Number(e.latitude),
longitude: Number(e.longitude),
name: e.name,
address: `${e.address}-${e.detailedAddress}`,
success: function() {
console.log('success');
}
});
// #ifdef H5
}
// #endif
},
// 选中门店
checked(e) {
@@ -241,9 +276,10 @@
border-radius: 50%;
display: block;
text-align: center;
line-height: 50rpx;
line-height: 48rpx;
background-color: #e83323;
margin-bottom: 22rpx;
text-decoration: none;
}
.store-distance {

View File

@@ -3,13 +3,13 @@
<view class='logistics'>
<view class='header acea-row row-between row-top'>
<view class='pictrue'>
<image :src='product.productInfo.image'></image>
<image :src='product.productImg'></image>
</view>
<view class='text acea-row row-between'>
<view class='name line2'>{{product.productInfo.storeName}}</view>
<view class='name line2'>{{product.productName}}</view>
<view class='money'>
<view>{{product.truePrice}}</view>
<view>x{{product.cartNum}}</view>
<view>{{product.price}}</view>
<view>x{{product.payNum}}</view>
</view>
</view>
</view>
@@ -40,7 +40,7 @@
<recommend :hostProduct='hostProduct' v-if="hostProduct.length"></recommend>
</view>
<!-- #ifdef MP -->
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
</view>
</template>
@@ -106,13 +106,7 @@
this.getExpress();
this.get_host_product();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
onReady: function() {
@@ -142,30 +136,11 @@
let that=this;
express(that.orderId).then(function(res){
let result = res.data.express|| {};
that.$set(that,'product',res.data.order.cartInfo[0] || {});
that.$set(that,'product',res.data.order.info[0] || {});
that.$set(that,'orderInfo',res.data.order);
that.$set(that,'expressList',result.list || []);
});
},
/**
* 获取我的推荐
*/
// getGroomList(onloadH) {
// this.loading = true
// if (!this.goodScroll) return
// if (onloadH) {
// this.iSshowH = true
// }
// getGroomList(type, this.params).then(({
// data
// }) => {
// this.iSshowH = false
// this.loading = false
// this.goodScroll = data.list.length >= this.params.limit
// this.params.page++
// this.tempArr = this.tempArr.concat(data.list)
// })
// }
get_host_product: function () {
this.loading = true
if (!this.goodScroll) return
@@ -176,7 +151,6 @@
that.goodScroll = res.data.list.length >= that.params.limit
that.params.page++
that.hostProduct = that.hostProduct.concat(res.data.list)
// that.$set(that,'hostProduct',res.data.list);
});
},
},
@@ -271,7 +245,7 @@
height: 40rpx;
text-align: center;
line-height: 40rpx;
border-radius: 3rpx;
border-radius: 20rpx;
border: 1rpx solid #999;
}
@@ -291,15 +265,15 @@
}
.logistics .logisticsCon .item .circular.on {
background-color: #e93323;
background-color: $theme-color;
}
.logistics .logisticsCon .item .text.on-font {
color: #e93323;
color: $theme-color;
}
.logistics .logisticsCon .item .text .data.on-font {
color: #e93323;
color: $theme-color;
}
.logistics .logisticsCon .item .text {

View File

@@ -2,21 +2,17 @@
<view>
<form @submit="subRefund" report-submit='true'>
<view class='apply-return'>
<view class='goodsStyle acea-row row-between' v-for="(item,index) in orderInfo.cartInfo" :key="index">
<view class='pictrue'><image :src='item.info.productInfo.image'></image></view>
<view class='goodsStyle acea-row row-between borRadius14' v-for="(item,index) in orderInfo.orderInfoList" :key="index">
<view class='pictrue'><image :src='item.image'></image></view>
<view class='text acea-row row-between'>
<view class='name line2'>{{item.info.productInfo.storeName}}</view>
<view class='money' v-if="item.info.productInfo.attrInfo">
<view>{{item.info.productInfo.attrInfo.price}}</view>
<view class='num'>x{{item.info.cartNum}}</view>
</view>
<view class='money' v-else>
<view>{{item.info.productInfo.price}}</view>
<view class='num'>x{{item.info.cartNum}}</view>
<view class='name line2'>{{item.storeName}}</view>
<view class='money'>
<view>{{item.price}}</view>
<view class='num'>x{{item.cartNum}}</view>
</view>
</view>
</view>
<view class='list'>
<view class='list borRadius14'>
<view class='item acea-row row-between-wrapper'>
<view>退货件数</view>
<view class='num'>{{orderInfo.totalNum}}</view>
@@ -38,7 +34,7 @@
<view>备注说明</view>
<textarea placeholder='填写备注信息100字以内' class='num' name="refund_reason_wap_explain" placeholder-class='填写备注信息100字以内'></textarea>
</view>
<view class='item acea-row row-between'>
<view class='item acea-row row-between' style="border: none;">
<view class='title acea-row row-between-wrapper'>
<view>上传凭证</view>
<view class='tip'>( 最多可上传3张 )</view>
@@ -54,17 +50,17 @@
</view>
</view>
</view>
<button class='returnBnt bg-color' form-type="submit">申请退款</button>
</view>
<button class='returnBnt bg-color' form-type="submit">申请退款</button>
</view>
</form>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
</view>
</template>
<script>
import { ordeRefundReason, orderRefundVerify, getOrderDetail} from '@/api/order.js';
import { ordeRefundReason, orderRefundVerify, applyRefund} from '@/api/order.js';
import {
toLogin
} from '@/libs/login.js';
@@ -111,13 +107,7 @@
this.getOrderInfo();
this.getRefundReason();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
@@ -131,7 +121,7 @@
*/
getOrderInfo:function(){
let that=this;
getOrderDetail(that.orderId).then(res=>{
applyRefund(that.orderId).then(res=>{
that.$set(that,'orderInfo',res.data);
});
},
@@ -190,22 +180,25 @@
</script>
<style scoped lang="scss">
.apply-return .list{background-color:#fff;margin-top:18rpx;}
.apply-return .list .item{margin-left:30rpx;padding-right:30rpx;min-height:90rpx;border-bottom:1rpx solid #eee;font-size:30rpx;color:#333;}
.apply-return{
padding: 20rpx 30rpx 70rpx 30rpx;
}
.apply-return .list{background-color:#fff;margin-top:18rpx;padding:0 24rpx 70rpx 24rpx;}
.apply-return .list .item{min-height:90rpx;border-bottom:1rpx solid #eee;font-size:30rpx;color:#333;}
.apply-return .list .item .num{color:#282828;width:427rpx;text-align:right;}
.apply-return .list .item .num .picker .reason{width:385rpx;}
.apply-return .list .item .num .picker .iconfont{color:#666;font-size:30rpx;margin-top:2rpx;}
.apply-return .list .item.textarea{padding:30rpx 30rpx 30rpx 0;}
.apply-return .list .item.textarea{padding:24rpx 0;}
.apply-return .list .item textarea{height:100rpx;font-size:30rpx;}
.apply-return .list .item .placeholder{color:#bbb;}
.apply-return .list .item .title{height:95rpx;width:100%;}
.apply-return .list .item .title .tip{font-size:30rpx;color:#bbb;}
.apply-return .list .item .upload{padding-bottom:36rpx;}
.apply-return .list .item .upload .pictrue{margin:22rpx 23rpx 0 0;width:156rpx;height:156rpx;position:relative;font-size:24rpx;color:#bbb;}
.apply-return .list .item .upload .pictrue{border-radius: 14rpx; margin:22rpx 23rpx 0 0;width:156rpx;height:156rpx;position:relative;font-size:24rpx;color:#bbb;}
.apply-return .list .item .upload .pictrue:nth-of-type(4n){margin-right:0;}
.apply-return .list .item .upload .pictrue image{width:100%;height:100%;border-radius:3rpx;}
.apply-return .list .item .upload .pictrue image{width:100%;height:100%;border-radius:14rpx;}
.apply-return .list .item .upload .pictrue .icon-guanbi1{position:absolute;font-size:45rpx;top:-10rpx;right:-10rpx;}
.apply-return .list .item .upload .pictrue .icon-icon25201{color:#bfbfbf;font-size:50rpx;}
.apply-return .list .item .upload .pictrue:nth-last-child(1){border:1rpx solid #ddd;box-sizing:border-box;}
.apply-return .returnBnt{font-size:32rpx;color:#fff;width:690rpx;height:86rpx;border-radius:50rpx;text-align:center;line-height:86rpx;margin:43rpx auto;}
.apply-return .returnBnt{font-size:32rpx;color:#fff;width:100%;height:86rpx;border-radius:50rpx;text-align:center;line-height:86rpx;margin:43rpx auto;}
</style>

View File

@@ -0,0 +1,34 @@
<template>
<web-view class="web-view" :webview-styles="webviewStyles" :src="url" :style="{width: windowW + 'px', height: windowH + 'px'}"></web-view>
</template>
<script>
import {
mapGetters
} from "vuex";
export default {
computed: mapGetters(['chatUrl']),
data() {
return {
windowH: 0,
windowW: 0,
webviewStyles: {
progress: {
color: 'transparent'
}
},
url: ''
}
},
onLoad(option) {
this.url = this.chatUrl;
try {
const res = uni.getSystemInfoSync();
this.windowW = res.windowWidth;
this.windowH = res.windowHeight;
} catch (e) {
// error
}
}
}
</script>

View File

@@ -1,47 +1,37 @@
<template>
<div class="register absolute">
<div class="login-wrapper">
<div class="shading">
<div class="pictrue acea-row row-center-wrapper">
<image :src="logoUrl" v-if="logoUrl" />
<image src="/static/images/logo2.png" v-else />
</div>
<!-- <image :src="logoUrl"/> -->
<image :src="logoUrl"/>
<!-- <image src="/static/images/logo2.png" v-if="!logoUrl" /> -->
</div>
<div class="whiteBg" v-if="formItem === 1">
<div class="title acea-row row-center-wrapper">
<div class="item" :class="current === index ? 'on' : ''" v-for="(item, index) in navList" @click="navTap(index)"
:key="index">
{{ item }}
</div>
</div>
<div class="list" :hidden="current !== 1">
<div class="list" v-if="current !== 1">
<form @submit.prevent="submit">
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/phone_1.png"></image>
<input type="text" placeholder="输入手机号码" v-model="account" required />
<image src="/static/images/phone_1.png" style="width: 24rpx; height: 34rpx;"></image>
<input type="text" class="texts" placeholder="输入手机号码" v-model="account" required/>
</div>
</div>
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image>
<input type="password" placeholder="填写登录密码" v-model="password" required />
<image src="/static/images/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
<input type="password" class="texts" placeholder="填写登录密码" v-model="password" required />
</div>
</div>
</form>
<!-- <navigator class="forgetPwd" hover-class="none" url="/pages/users/retrievePassword/index">
<span class="iconfont icon-wenti"></span>忘记密码
</navigator> -->
</div>
<div class="list" :hidden="current !== 0">
<div class="list" v-if="current !== 0 || appLoginStatus || appleLoginStatus">
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/phone_1.png"></image>
<input type="text" placeholder="输入手机号码" v-model="account" />
<image src="/static/images/phone_1.png" style="width: 24rpx; height: 34rpx;"></image>
<input type="text" class="texts" placeholder="输入手机号码" v-model="account" />
</div>
</div>
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image>
<image src="/static/images/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
{{ text }}
@@ -50,59 +40,19 @@
</div>
<div class="item" v-if="isShowCode">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image>
<image src="/static/images/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
<input type="text" placeholder="填写验证码" class="codeIput" v-model="codeVal" />
<div class="code" @click="again"><img :src="codeUrl" /></div>
</div>
</div>
</div>
<div class="logon" @click="loginMobile" :hidden="current !== 0">登录</div>
<div class="logon" @click="submit" :hidden="current === 0">登录</div>
<div class="tip">
<div :hidden="current !== 1">
没有账号?
<span @click="current = 0" class="font-color-red">快速登录</span>
</div>
<div class="logon" @click="loginMobile" v-if="current !== 0">登录</div>
<div class="logon" @click="submit" v-if="current === 0">登录</div>
<div class="tips">
<div v-if="current==0" @click="current = 1">快速登录</div>
<div v-if="current==1" @click="current = 0">账号登录</div>
</div>
</div>
<!-- <div class="whiteBg" v-else>
<div class="title">注册账号</div>
<div class="list">
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/phone_1.png"></image>
<input type="text" placeholder="输入手机号码" v-model="account" />
</div>
</div>
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image>
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
{{ text }}
</button>
</div>
</div>
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/code_1.png"></image>
<input type="password" placeholder="填写您的登录密码" v-model="password" />
</div>
</div>
<div class="item" v-if="isShowCode">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image>
<input type="text" placeholder="填写验证码" class="codeIput" v-model="codeVal" />
<div class="code" @click="again"><img :src="codeUrl" /></div>
</div>
</div>
</div>
<div class="logon" @click="register">注册</div>
<div class="tip">
已有账号?
<span @click="formItem = 1" class="font-color-red">立即登录</span>
</div>
</div> -->
<div class="bottom"></div>
</div>
</template>
@@ -126,7 +76,7 @@
validatorDefaultCatch
} from "@/utils/dialog";
import {
getLogo
getLogo, appAuth, appleLogin
} from "@/api/public";
import {
VUE_APP_API_URL
@@ -140,7 +90,7 @@
data: function() {
return {
navList: ["快速登录", "账号登录"],
current: 0,
current: 1,
account: "",
password: "",
captcha: "",
@@ -150,7 +100,13 @@
keyCode: "",
codeUrl: "",
codeVal: "",
isShowCode: false
isShowCode: false,
platform: '',
appLoginStatus: false, // 微信登录强制绑定手机号码状态
appUserInfo: null, // 微信登录保存的用户信息
appleLoginStatus: false, // 苹果登录强制绑定手机号码状态
appleUserInfo: null,
appleShow: false // 苹果登录版本必须要求ios13以上的
};
},
watch:{
@@ -166,7 +122,143 @@
this.getCode();
this.getLogoImage();
},
onLoad() {
let self = this
uni.getSystemInfo({
success: function(res) {
if (res.platform.toLowerCase() == 'ios' && res.system.split(' ')[1] >= 13) {
self.appleShow = true
}
}
});
},
methods: {
// 苹果登录
appleLogin() {
let self = this
this.account = ''
this.captcha = ''
uni.showLoading({
title: '登录中'
})
uni.login({
provider: 'apple',
timeout: 10000,
success(loginRes) {
uni.getUserInfo({
provider: 'apple',
success: function(infoRes) {
self.appleUserInfo = infoRes.userInfo
self.appleLoginApi()
},
fail() {
uni.hideLoading()
uni.showToast({
title: '获取用户信息失败',
icon: 'none',
duration: 2000
})
},
complete() {
uni.hideLoading()
}
});
},
fail(error) {
uni.hideLoading()
console.log(error)
}
})
},
// 苹果登录Api
appleLoginApi() {
let self = this
appleLogin({
openId: self.appleUserInfo.openId,
email: self.appleUserInfo.email == undefined ? '' :self.appleUserInfo.email,
identityToken: self.appleUserInfo.identityToken || ''
}).then((res) => {
this.$store.commit("LOGIN", {
'token': res.data.token
});
this.getUserInfo(res.data);
}).catch(error => {
uni.hideLoading();
uni.showModal({
title: '提示',
content: `错误信息${error}`,
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
})
},
// App微信登录
wxLogin() {
let self = this
this.account = ''
this.captcha = ''
uni.showLoading({
title: '登录中'
})
uni.login({
provider: 'weixin',
success: function(loginRes) {
// 获取用户信息
uni.getUserInfo({
provider: 'weixin',
success: function(infoRes) {
uni.hideLoading();
self.appUserInfo = infoRes.userInfo
self.appUserInfo.type = self.platform === 'ios' ? 'iosWx' : 'androidWx'
self.wxLoginGo(self.appUserInfo)
},
fail() {
uni.hideLoading();
uni.showToast({
title: '获取用户信息失败',
icon: 'none',
duration: 2000
})
},
complete() {
uni.hideLoading()
}
});
},
fail() {
uni.hideLoading()
uni.showToast({
title: '登录失败',
icon: 'none',
duration: 2000
})
}
});
},
wxLoginGo(userInfo) {
appAuth(userInfo).then(res => {
if (res.data.type === 'register') {
uni.navigateTo({
url: '/pages/users/app_login/index?authKey='+res.data.key
})
}
if (res.data.type === 'login') {
this.$store.commit("LOGIN", {
'token': res.data.token
});
this.getUserInfo(res.data);
}
}).catch(res => {
that.$util.Tips({
title: res
});
});
},
again() {
this.codeUrl =
VUE_APP_API_URL +
@@ -177,20 +269,11 @@
},
getCode() {
let that = this
// getCodeApi()
// .then(res => {
// that.keyCode = res.data.key;
// })
// .catch(res => {
// that.$util.Tips({
// title: res
// });
// });
},
async getLogoImage() {
let that = this;
getLogo().then(res => {
that.logoUrl = res.data.logoUrl;
that.logoUrl = res.data.logoUrl?res.data.logoUrl:'/static/images/logo2.png';
});
},
async loginMobile() {
@@ -208,34 +291,17 @@
title: '请输入正确的验证码'
});
loginMobile({
account: that.account,
phone: that.account,
captcha: that.captcha,
spread: that.$Cache.get("spread")
spread_spid: that.$Cache.get("spread")
})
.then(res => {
let data = res.data;
let newTime = Math.round(new Date() / 1000);
that.$store.commit("LOGIN", {
'token': data.token
// 'time': dayjs(data.expiresTime) - newTime
this.$store.commit("LOGIN", {
'token': res.data.token
});
const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
that.$Cache.clear(BACK_URL);
// getUserInfo().then(res => {
that.$store.commit("SETUID", res.data.user.uid);
if (backUrl === '/pages/index/index' || backUrl === '/pages/order_addcart/order_addcart' || backUrl ===
'/pages/user/index') {
uni.switchTab({
url: backUrl
});
} else {
uni.switchTab({
url: '/pages/index/index'
});
}
// })
that.getUserInfo(data);
})
.catch(res => {
that.$util.Tips({
@@ -290,21 +356,15 @@
title: '请输入正确的手机号码'
});
if (that.formItem == 2) that.type = "register";
// phone: that.account
// type: that.type,
// key: that.keyCode,
// code: that.codeVal
await registerVerify(that.account)
.then(res => {
that.$util.Tips({title:res.message});
that.sendCode();
})
.catch(res => {
// if (res.data.status === 402) {
// that.codeUrl = `${VUE_APP_API_URL}/sms_captcha?key=${that.keyCode}`;
// that.isShowCode = true;
// }
that.$util.Tips({title:res.message});
.catch(err => {
return that.$util.Tips({
title: err
});
});
},
navTap: function(index) {
@@ -329,44 +389,210 @@
.then(({
data
}) => {
// let newTime = Math.round(new Date() / 1000);
that.$store.commit("LOGIN", {
this.$store.commit("LOGIN", {
'token': data.token
// 'time': dayjs(data.expiresTime) - newTime
});
const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
that.$Cache.clear(BACK_URL);
getUserInfo().then(res => {
that.$store.commit("SETUID", res.data.uid);
if (backUrl === '/pages/index/index' || backUrl === '/pages/order_addcart/order_addcart' || backUrl ==='/pages/user/index') {
uni.switchTab({
url: backUrl
});
} else {
uni.switchTab({
url: '/pages/index/index'
});
}
})
that.getUserInfo(data);
})
.catch(e => {
that.$util.Tips({
title: e
});
});
},
getUserInfo(data){
this.$store.commit("SETUID", data.uid);
getUserInfo().then(res => {
this.$store.commit("UPDATE_USERINFO", res.data);
let backUrl = this.$Cache.get(BACK_URL) || "/pages/index/index";
if (backUrl.indexOf('/pages/users/login/index') !== -1) {
backUrl = '/pages/index/index';
}
uni.reLaunch({
url: backUrl
});
})
}
}
};
</script>
<style lang="scss">
<style lang="scss" scoped>
page {
background: #fff;
}
.appLogin {
margin-top: 60rpx;
.hds {
display: flex;
justify-content: center;
align-items: center;
font-size: 24rpx;
color: #B4B4B4;
.line {
width: 68rpx;
height: 1rpx;
background: #CCCCCC;
}
p {
margin: 0 20rpx;
}
}
.btn-wrapper {
display: flex;
align-items: center;
justify-content: center;
margin-top: 30rpx;
.btn {
display: flex;
align-items: center;
justify-content: center;
width: 68rpx;
height: 68rpx;
border-radius: 50%;
}
.apple-btn {
display: flex;
align-items: center;
justify-content: center;
margin-left: 30rpx;
background: #000;
border-radius: 34rpx;
font-size: 40rpx;
.icon-s-pingguo {
color: #fff;
font-size: 40rpx;
}
}
.iconfont {
font-size: 40rpx;
color: #fff;
}
.wx {
margin-right: 30rpx;
background-color: #61C64F;
}
.mima {
background-color: #28B3E9;
}
.yanzheng {
background-color: #F89C23;
}
}
}
.code img {
width: 100%;
height: 100%;
}
.acea-row.row-middle {
input {
margin-left: 20rpx;
display: block;
}
}
</style>
.login-wrapper {
padding: 30rpx;
.shading {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
/* #ifdef APP-VUE */
margin-top: 50rpx;
/* #endif */
/* #ifndef APP-VUE */
margin-top: 200rpx;
/* #endif */
image {
width: 180rpx;
height: 180rpx;
}
}
.whiteBg {
margin-top: 100rpx;
.list {
border-radius: 16rpx;
overflow: hidden;
.item {
border-bottom: 1px solid #F0F0F0;
background: #fff;
.row-middle {
position: relative;
padding: 16rpx 45rpx;
.texts{
flex: 1;
font-size: 28rpx;
height: 80rpx;
line-height: 80rpx;
display: flex;
justify-content: center;
align-items: center;
}
input {
flex: 1;
font-size: 28rpx;
height: 80rpx;
line-height: 80rpx;
display: flex;
justify-content: center;
align-items: center;
}
.code {
position: absolute;
right: 30rpx;
top: 50%;
color: $theme-color;
font-size: 26rpx;
transform: translateY(-50%);
}
}
}
}
.logon {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 86rpx;
margin-top: 80rpx;
background-color: $theme-color;
border-radius: 120rpx;
color: #FFFFFF;
font-size: 30rpx;
}
.tips {
margin: 30rpx;
text-align: center;
color: #999;
}
}
}
</style>

View File

@@ -1,17 +1,23 @@
<template>
<view>
<view class='order-submission'>
<view class="allAddress" :style="store_self_mention ? '':'padding-top:10rpx'">
<view class="allAddress" :style="store_self_mention ? '':'padding-top:10rpx;'">
<view class="nav acea-row">
<view class="item font-color" :class="shippingType == 0 ? 'on' : 'on2'" @tap="addressType(0)" v-if='store_self_mention'></view>
<view class="item font-color" :class="shippingType == 1 ? 'on' : 'on2'" @tap="addressType(1)" v-if='store_self_mention'></view>
<view class="item font-color" :class="shippingType == 0 ? 'on' : 'on2'" @tap="addressType(0)"
v-if='store_self_mention'></view>
<view class="item font-color" :class="shippingType == 1 ? 'on' : 'on2'" @tap="addressType(1)"
v-if='store_self_mention'></view>
</view>
<view class='address acea-row row-between-wrapper' @tap='onAddress' v-if='shippingType == 0'>
<view class='address acea-row row-between-wrapper' @tap='onAddress' v-if='shippingType == 0' :style="store_self_mention ? '':'border-top-left-radius: 14rpx;border-top-right-radius: 14rpx;'">
<view class='addressCon' v-if="addressInfo.realName">
<view class='name'>{{addressInfo.realName}}
<text class='phone'>{{addressInfo.phone}}</text>
</view>
<view><text class='default font-color' v-if="addressInfo.isDefault">[默认]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.detail}}</view>
<view class="acea-row">
<text class='default font-color'
v-if="addressInfo.isDefault">[默认]</text>
<text class="line2">{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.detail}}</text>
</view>
</view>
<view class='addressCon' v-else>
<view class='setaddress'>设置收货地址</view>
@@ -24,7 +30,8 @@
<view class='name'>{{system_store.name}}
<text class='phone'>{{system_store.phone}}</text>
</view>
<view class="line1"> {{system_store.address}}{{", " + system_store.detailedAddress}}</view>
<view class="line1"> {{system_store.address}}{{", " + system_store.detailedAddress}}
</view>
</view>
<view class='iconfont icon-jiantou'></view>
</block>
@@ -36,129 +43,134 @@
<image src='/static/images/line.jpg'></image>
</view>
</view>
<orderGoods :cartInfo="cartInfo"></orderGoods>
<view class='wrapper'>
<view class='item acea-row row-between-wrapper' @tap='couponTap' v-if="!pinkId && !BargainId && !combinationId && !seckillId">
<view>优惠券</view>
<view class='discount'>{{couponTitle}}
<text class='iconfont icon-jiantou'></text>
</view>
</view>
<view class='item acea-row row-between-wrapper' v-if="!pinkId && !BargainId && !combinationId && !seckillId">
<view>积分抵扣</view>
<view class='discount acea-row row-middle'>
<view> {{useIntegral ? "剩余积分":"当前积分"}}
<text class='num font-color'>{{integral || 0}}</text>
</view>
<checkbox-group @change="ChangeIntegral">
<checkbox :checked='useIntegral ? true : false' />
</checkbox-group>
</view>
</view>
<view class='item acea-row row-between-wrapper' v-if="priceGroup.vipPrice > 0 && userInfo.vip && !pinkId && !BargainId && !combinationId && !seckillId">
<view>会员优惠</view>
<view class='discount'>-{{priceGroup.vipPrice}}</view>
</view>
<view class='item acea-row row-between-wrapper' v-if='shippingType==0'>
<view>快递费用</view>
<view class='discount' v-if='parseFloat(priceGroup.storePostage) > 0'>+¥{{priceGroup.storePostage}}</view>
<view class='discount' v-else>免运费</view>
</view>
<view v-else>
<view class="item acea-row row-between-wrapper">
<view>联系人</view>
<view class="discount textR">
<input type="text" placeholder="请填写您的联系姓名" placeholder-class="placeholder" @blur='realName'></input>
<view class="pad30">
<orderGoods :cartInfo="cartInfo" :orderProNum="orderProNum"></orderGoods>
<view class='wrapper borRadius14'>
<view class='item acea-row row-between-wrapper' @tap='couponTap'
v-if="!orderInfoVo.bargainId && !orderInfoVo.combinationId && !orderInfoVo.seckillId && productType==='normal'">
<view>优惠券</view>
<view class='discount'>{{couponTitle}}
<text class='iconfont icon-jiantou'></text>
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view>联系电话</view>
<view class="discount textR">
<input type="text" placeholder="请填写您的联系电话" placeholder-class="placeholder" @blur='phone'></input>
<view class='item acea-row row-between-wrapper'
v-if="!orderInfoVo.bargainId && !orderInfoVo.combinationId && !orderInfoVo.seckillId && productType==='normal'">
<view>积分抵扣</view>
<!-- -->
<view class='discount acea-row row-middle'>
<view> {{useIntegral ? "剩余积分":"当前积分"}}
<text class='num font-color'>{{useIntegral ? orderInfoVo.surplusIntegral : orderInfoVo.userIntegral || 0}}</text>
</view>
<checkbox-group @change="ChangeIntegral">
<checkbox :checked='useIntegral ? true : false' :disabled="orderInfoVo.userIntegral==0 && !useIntegral"/>
</checkbox-group>
</view>
</view>
</view>
<!-- <view class='item acea-row row-between-wrapper' wx:else>
<!-- <view class='item acea-row row-between-wrapper'
v-if="priceGroup.vipPrice > 0 && userInfo.vip && !pinkId && !BargainId && !combinationId && !seckillId">
<view>会员优惠</view>
<view class='discount'>-{{priceGroup.vipPrice}}</view>
</view> -->
<view class='item acea-row row-between-wrapper' v-if='shippingType==0'>
<view>快递费用</view>
<view class='discount' v-if='parseFloat(orderInfoVo.freightFee) > 0'>
+¥{{orderInfoVo.freightFee}}
</view>
<view class='discount' v-else>免运费</view>
</view>
<view v-else>
<view class="item acea-row row-between-wrapper">
<view>联系人</view>
<view class="discount textR">
<input type="text" placeholder="请填写您的联系姓名" placeholder-style="color:#ccc;" placeholder-class="placeholder"
@blur='realName'></input>
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view>联系电话</view>
<view class="discount textR">
<input type="text" placeholder="请填写您的联系电话" placeholder-style="color:#ccc;" placeholder-class="placeholder"
@blur='phone'></input>
</view>
</view>
</view>
<!-- <view class='item acea-row row-between-wrapper' wx:else>
<view>自提门店</view>
<view class='discount'>{{system_store.name}}</view>
</view> -->
<view class='item' v-if="textareaStatus">
<view>备注信息</view>
<textarea v-if="coupon.coupon===false" placeholder-class='placeholder' @input='bindHideKeyboard' value="" name="mark"
placeholder='请添加备注150字以内'></textarea>
</view>
</view>
<view class='wrapper'>
<view class='item'>
<view>支付方式</view>
<view class='list'>
<view class='payItem acea-row row-middle' :class='active==index ?"on":""' @tap='payItem(index)' v-for="(item,index) in cartArr"
:key='index' v-if="item.payStatus==1">
<view class='name acea-row row-center-wrapper'>
<view class='iconfont animated' :class='(item.icon) + " " + (animated==true&&active==index ?"bounceIn":"")'></view>{{item.name}}
</view>
<view class='tip'>{{item.title}}</view>
</view>
<!-- #ifdef MP || APP-PLUS -->
<!-- <view class='payItem acea-row row-middle' :class='active==index ?"on":""' @tap='payItem(index)' v-for="(item,index) in cartArr"
:key='index' v-if="item.payStatus==1">
<view class='name acea-row row-center-wrapper'>
<view class='iconfont animated' :class='(item.icon) + " " + (animated==true&&active==index ?"bounceIn":"")'></view>{{item.name}}
</view>
<view class='tip'>{{item.title}}</view>
</view> -->
<!-- #endif -->
<view class='item' v-if="textareaStatus">
<view>备注信息</view>
<textarea v-if="coupon.coupon===false" placeholder-class='placeholder' @input='bindHideKeyboard'
value="" name="mark" placeholder='请添加备注150字以内'></textarea>
</view>
</view>
<view class='wrapper borRadius14'>
<view class='item'>
<view>支付方式</view>
<view class='list'>
<view class='payItem acea-row row-middle' :class='active==index ?"on":""'
@tap='payItem(index)' v-for="(item,index) in cartArr" :key='index'
v-if="item.payStatus==1">
<view class='name acea-row row-center-wrapper'>
<view class='iconfont animated'
:class='(item.icon) + " " + (animated==true&&active==index ?"bounceIn":"")'>
</view>
{{item.name}}
</view>
<view class='tip'>{{item.title}}</view>
</view>
</view>
</view>
</view>
<view class='moneyList borRadius14'>
<view class='item acea-row row-between-wrapper'>
<view>商品总价:</view>
<view class='money'>¥{{orderInfoVo.proTotalFee || 0}}</view>
</view>
<view class='item acea-row row-between-wrapper' v-if="orderInfoVo.couponFee > 0">
<view>优惠券抵扣:</view>
<view class='money'>-¥{{orderInfoVo.couponFee}}</view>
</view>
<view class='item acea-row row-between-wrapper' v-if="orderInfoVo.deductionPrice > 0">
<view>积分抵扣:</view>
<view class='money'>-¥{{orderInfoVo.deductionPrice}}</view>
</view>
<view class='item acea-row row-between-wrapper' v-if="orderInfoVo.freightFee > 0">
<view>运费:</view>
<view class='money'>+¥{{orderInfoVo.freightFee}}</view>
</view>
</view>
<view style='height:120rpx;'></view>
</view>
<view class='moneyList'>
<view class='item acea-row row-between-wrapper'>
<view>商品总价:</view>
<view class='money'>¥{{priceGroup.totalPrice}}</view>
</view>
<view class='item acea-row row-between-wrapper' v-if="coupon_price > 0">
<view>优惠券抵扣:</view>
<view class='money'>-¥{{coupon_price}}</view>
</view>
<view class='item acea-row row-between-wrapper' v-if="integral_price > 0">
<view>积分抵扣:</view>
<view class='money'>-¥{{integral_price}}</view>
</view>
<view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostage > 0">
<view>运费:</view>
<view class='money'>+¥{{priceGroup.storePostage}}</view>
</view>
</view>
<view style='height:120rpx;'></view>
<view class='footer acea-row row-between-wrapper'>
<view>合计:
<text class='font-color'>¥{{totalPrice || 0}}</text>
<text class='font-color'>¥{{orderInfoVo.payFee || 0}}</text>
</view>
<view class='settlement' style='z-index:100' @tap="SubOrder">立即结算</view>
</view>
</view>
<couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone" :openType='openType' :cartId='cartId'
@ChangCoupons="ChangCoupons"></couponListWindow>
<addressWindow ref="addressWindow" @changeTextareaStatus="changeTextareaStatus" :address='address' :pagesUrl="pagesUrl"
@OnChangeAddress="OnChangeAddress" @changeClose="changeClose"></addressWindow>
<couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone" :openType='openType' @ChangCoupons="ChangCoupons" :orderShow="orderShow"></couponListWindow>
<addressWindow ref="addressWindow" @changeTextareaStatus="changeTextareaStatus" :address='address'
:pagesUrl="pagesUrl" @OnDefaultAddress="OnDefaultAddress" @OnChangeAddress="OnChangeAddress" @changeClose="changeClose"></addressWindow>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
</template>
<script>
import {
orderConfirm,
//orderConfirm,
getCouponsOrderPrice,
orderCreate,
postOrderComputed,
orderPay,
wechatOrderPay,
wechatQueryPayResult
wechatQueryPayResult,
loadPreOrderApi
} from '@/api/order.js';
import {
getAddressDefault,
getAddressList,
getAddressDetail
} from '@/api/user.js';
import {
@@ -196,6 +208,7 @@
},
data() {
return {
orderShow: 'orderShow', //下单页面使用优惠券组件不展示tab切换页
textareaStatus: true,
//支付方式
cartArr: [{
@@ -211,14 +224,14 @@
value: 'yue',
title: '可用余额:',
payStatus: 1,
},
{
"name": "线下支付", //offlinePayStatu1开启线下支付2关闭offlinePostagetrue有邮费
"icon": "icon-yinhangqia",
value: 'offline',
title: '线下支付',
payStatus: 1,
},
}
// {
// "name": "线下支付", //offlinePayStatu1开启线下支付2关闭offlinePostagetrue有邮费
// "icon": "icon-yinhangqia",
// value: 'offline',
// title: '线下支付',
// payStatus: 1,
// },
],
payType: 'weixin', //支付方式
openType: 1, //优惠券打开方式 1=使用
@@ -229,16 +242,13 @@
statusTile: '立即使用'
}, //优惠券组件
address: {
address: false
address: false,
addressId: 0
}, //地址组件
addressInfo: {}, //地址信息
pinkId: 0, //拼团id
addressId: 0, //地址id
couponId: 0, //优惠券id
cartId: '', //购物车id
BargainId: 0,
combinationId: 0,
seckillId: 0,
userInfo: {}, //用户信息
mark: '', //备注信息
couponTitle: '请选择', //优惠券
@@ -277,57 +287,45 @@
bargain: false, //是否是砍价
combination: false, //是否是拼团
secKill: false, //是否是秒杀
orderInfoVo: {},
addressList: [], //地址列表数据
orderProNum: 0,
preOrderNo: '' //预下单订单号
};
},
computed: mapGetters(['isLogin']),
watch:{
isLogin:{
handler:function(newV,oldV){
if(newV){
this.getaddressInfo();
this.getConfirm();
computed: mapGetters(['isLogin', 'systemPlatform', 'productType']),
watch: {
isLogin: {
handler: function(newV, oldV) {
if (newV) {
this.getloadPreOrder();
//this.getaddressInfo();
}
},
deep:true
deep: true
}
},
onLoad: function(options) {
onLoad(options) {
// #ifdef H5
this.payChannel = this.$wechat.isWeixin() ? 'public' : 'weixinh5'
this.payChannel = this.$wechat.isWeixin() ? 'public' : 'weixinh5';
// #endif
// #ifdef MP
this.payChannel = 'routine'
this.payChannel = 'routine';
// #endif
if (!options.cartId) return this.$util.Tips({
title: '请选择要购买的商品'
}, {
tab: 3,
url: 1
});
this.couponId = options.couponId || 0;
this.pinkId = options.pinkId ? parseInt(options.pinkId) : 0;
// if (!options.cartId) return this.$util.Tips({
// title: '请选择要购买的商品'
// }, {
// tab: 3,
// url: 1
// });
this.preOrderNo = options.preOrderNo || 0;
this.addressId = options.addressId || 0;
this.cartId = options.cartId;
this.is_address = options.is_address ? true : false;
this.news = options.new || true;
this.again = options.again || false;
this.addAgain = options.addAgain || false;
this.secKill = options.secKill || false;
this.combination = options.combination || false;
this.bargain = options.bargain || false;
if (this.isLogin) {
this.getaddressInfo();
this.getConfirm();
//调用子页面方法授权后执行获取地址列表
this.$nextTick(function() {})
//this.getaddressInfo();
this.getloadPreOrder();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
/**
@@ -335,12 +333,11 @@
*/
onShow: function() {
let _this = this
// wx.getLaunchOptionsSync
this.textareaStatus = true;
if (this.isLogin && this.toPay == false) {
this.getaddressInfo();
this.$nextTick(function() {
this.$refs.addressWindow.getAddressList();
})
//this.getaddressInfo();
}
uni.$on("handClick", res => {
@@ -366,13 +363,34 @@
// this.isClose = true
// },
methods: {
// 订单详情
getloadPreOrder: function() {
loadPreOrderApi(this.preOrderNo).then(res => {
let orderInfoVo = res.data.orderInfoVo
this.orderInfoVo = orderInfoVo;
this.cartInfo = orderInfoVo.orderDetailList;
this.orderProNum = orderInfoVo.orderProNum;
this.address.addressId = this.addressId ? this.addressId :orderInfoVo.addressId;
this.cartArr[1].title = '可用余额:' + orderInfoVo.userBalance;
this.cartArr[1].payStatus = parseInt(res.data.yuePayStatus) === 1 ? 1 : 2;
this.cartArr[0].payStatus = parseInt(res.data.payWeixinOpen) === 1 ? 1 : 0;
this.store_self_mention = res.data.storeSelfMention == 'true'&& this.productType === 'normal' ? true : false;
//调用子页面方法授权后执行获取地址列表
this.$nextTick(function() {
this.$refs.addressWindow.getAddressList();
})
}).catch(err => {
return this.$util.Tips({
title: err
});
})
},
/**
* 授权回调事件
*
*/
onLoadFun: function() {
this.getaddressInfo();
this.getConfirm();
//this.getaddressInfo();
//调用子页面方法授权后执行获取地址列表
// this.$scope.selectComponent('#address-window').getAddressList();
},
@@ -414,23 +432,28 @@
})
}
},
// 计算订单价格
computedPrice: function() {
let shippingType = this.shippingType;
postOrderComputed(this.orderKey, {
addressId: this.addressId,
useIntegral: this.useIntegral ? 1 : 0,
postOrderComputed({
addressId: this.address.addressId,
useIntegral: this.useIntegral ? true : false,
couponId: this.couponId,
shippingType: parseInt(shippingType) + 1,
payType: this.payType
preOrderNo: this.preOrderNo
}).then(res => {
let result = res.data.result.result;
if (result) {
this.totalPrice = result.orderId.payPrice;
this.integral_price = result.orderId.deductionPrice;
this.coupon_price = result.orderId.couponPrice;
this.integral = this.useIntegral ? result.orderId.surplusIntegral : this.userInfo.integral;
this.$set(this.priceGroup, 'storePostage', shippingType == 1 ? 0 : result.orderId.payPostage);
}
let data = res.data;
this.orderInfoVo.couponFee = data.couponFee;
//赋值操作userIntegral 当前积分surplusIntegral 剩余积分
this.orderInfoVo.userIntegral = data.surplusIntegral;
this.orderInfoVo.deductionPrice = data.deductionPrice;
this.orderInfoVo.freightFee = data.freightFee;
this.orderInfoVo.payFee = data.payFee;
this.orderInfoVo.proTotalFee = data.proTotalFee;
this.orderInfoVo.useIntegral = data.useIntegral;
this.orderInfoVo.usedIntegral = data.usedIntegral;
this.orderInfoVo.surplusIntegral = data.surplusIntegral;
//this.orderInfoVo.userIntegral = data.userIntegral;
}).catch(err => {
return this.$util.Tips({
title: err
@@ -501,92 +524,37 @@
this.useIntegral = !this.useIntegral;
this.computedPrice();
},
/**
* 首次进页面展示默认地址
*/
OnDefaultAddress: function(e) {
this.addressInfo = e;
this.address.addressId = e.id;
},
/**
* 选择地址后改变事件
* @param object e
*/
OnChangeAddress: function(e) {
this.addressInfo = e;
this.address.addressId = e.id;
this.textareaStatus = true;
this.addressId = e;
//this.orderInfoVo.addressId = e;
this.address.address = false;
this.getaddressInfo();
//this.getaddressInfo();
this.computedPrice();
},
bindHideKeyboard: function(e) {
this.mark = e.detail.value;
},
/**
* 获取当前订单详细信息
*
*/
getConfirm: function() {
let that = this;
orderConfirm(that.cartId, that.news, this.addAgain, this.secKill, this.combination, this.bargain).then(res => {
that.$set(that, 'userInfo', res.data.userInfo);
that.$set(that, 'integral', res.data.userInfo.integral);
that.$set(that, 'cartInfo', res.data.cartInfo);
that.$set(that, 'integralRatio', res.data.integralRatio);
that.$set(that, 'offlinePostage', res.data.offlinePostage);
that.$set(that, 'orderKey', res.data.orderKey);
that.$set(that, 'priceGroup', res.data.priceGroup);
that.$set(that, 'totalPrice', that.$util.$h.Add(parseFloat(res.data.priceGroup.totalPrice), parseFloat(res.data
.priceGroup.storePostage)));
that.$set(that, 'seckillId', parseInt(res.data.secKillId));
that.$set(that, 'store_self_mention', res.data.storeSelfMention == 'true' ? true : false);
that.cartArr[1].title = '可用余额:' + res.data.userInfo.nowMoney;
that.cartArr[0].payStatus = res.data.payWeixinOpen || 0
that.cartArr[1].payStatus = res.data.yuePayStatus || 0
if (res.data.offlinePayStatus == 1) {
that.cartArr[2].payStatus = 1
} else {
that.cartArr[2].payStatus = 0
}
// that.$set(that, 'cartArr', that.cartArr);
that.$set(that, 'ChangePrice', that.totalPrice);
that.getBargainId();
if (!that.secKill) that.getCouponList();
}).catch(err => {
return this.$util.Tips({
title: err
}, {
tab: 3,
url: 1
});
});
},
/*
* 提取砍价和拼团id
*/
getBargainId: function() {
let that = this;
let cartINfo = that.cartInfo;
let BargainId = 0;
let combinationId = 0;
cartINfo.forEach(function(value, index, cartINfo) {
BargainId = cartINfo[index].bargainId || 0,
combinationId = cartINfo[index].combinationId || 0
})
that.$set(that, 'BargainId', parseInt(BargainId));
that.$set(that, 'combinationId', parseInt(combinationId));
if (that.cartArr.length == 3 && (BargainId || combinationId || that.seckillId)) {
that.cartArr[2].payStatus = 0;
that.$set(that, 'cartArr', that.cartArr);
}
},
/**
* 获取当前金额可用优惠券
*
*/
getCouponList: function() {
let that = this;
let data = {
cartId: this.cartId
}
getCouponsOrderPrice(data).then(res => {
that.$set(that.coupon, 'list', res.data);
that.openType = 1;
getCouponsOrderPrice(this.preOrderNo).then(res => {
this.$set(this.coupon, 'list', res.data);
this.openType = 1;
});
},
/*
@@ -627,6 +595,7 @@
},
couponTap: function() {
this.coupon.coupon = true;
if(!this.coupon.list.length)this.getCouponList();
},
car: function() {
let that = this;
@@ -636,9 +605,7 @@
let that = this;
that.textareaStatus = false;
that.address.address = true;
that.pagesUrl = '/pages/users/user_address_list/index?cartId=' + this.cartId + '&pinkId=' + this.pinkId +
'&couponId=' + this.couponId + '&secKill=' + this.secKill + '&combination=' + this.combination + '&bargain=' +
this.bargain;
that.pagesUrl = '/pages/users/user_address_list/index?preOrderNo='+ this.preOrderNo;
},
realName: function(e) {
this.contacts = e.detail.value;
@@ -648,12 +615,8 @@
},
payment: function(data) {
let that = this;
orderCreate(that.orderKey, data).then(res => {
orderCreate(data).then(res => {
that.getOrderPay(res.data.orderNo, '支付成功');
// if(that.totalPrice===0)return that.$util.Tips({
// title: '支付成功',
// icon: 'success'
// });
}).catch(err => {
uni.hideLoading();
@@ -667,13 +630,9 @@
let goPages = '/pages/order_pay_status/index?order_id=' + orderNo + '&msg=' + message;
wechatOrderPay({
orderNo: orderNo,
// #ifdef MP
payChannel: 'routine',
// #endif
// #ifdef H5 || APP-PLUS
payChannel: that.$wechat.isWeixin() ? 'public' : 'weixinh5',
// #endif
payType: that.payType
payChannel: that.payChannel,
payType: that.payType,
scene: that.productType==='normal'? 0 :1177 //下单时小程序的场景值
}).then(res => {
let jsConfig = res.data.jsConfig;
switch (res.data.payType) {
@@ -685,23 +644,34 @@
package: jsConfig.packages,
signType: jsConfig.signType,
paySign: jsConfig.paySign,
ticket: that.productType==='normal'? null : jsConfig.ticket,
success: function(ress) {
uni.hideLoading();
if (that.BargainId || that.combinationId || that.pinkId || that.seckillId)
wechatQueryPayResult(orderNo).then(res => {
uni.hideLoading();
if (that.orderInfoVo.bargainId || that.orderInfoVo.combinationId || that.pinkId || that
.orderInfoVo.seckillId)
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
tab: 4,
url: goPages
});
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
tab: 4,
tab: 5,
url: goPages
});
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
tab: 5,
url: goPages
});
}).cache(err => {
uni.hideLoading();
return that.$util.Tips({
title: err
});
})
},
fail: function(e) {
uni.hideLoading();
@@ -715,12 +685,13 @@
complete: function(e) {
uni.hideLoading();
//关闭当前页面跳转至订单状态
if (e.errMsg == 'requestPayment:cancel') return that.$util.Tips({
title: '取消支付'
}, {
tab: 5,
url: goPages + '&status=2'
});
if (e.errMsg == 'requestPayment:cancel') return that.$util
.Tips({
title: '取消支付'
}, {
tab: 5,
url: goPages + '&status=2'
});
},
})
// #endif
@@ -734,6 +705,7 @@
};
that.$wechat.pay(data).then(res => {
if (res.errMsg == 'chooseWXPay:cancel') {
uni.hideLoading();
return that.$util.Tips({
title: '取消支付'
}, {
@@ -741,9 +713,8 @@
url: goPages + '&status=2'
});
} else {
wechatQueryPayResult({
orderNo: orderNo
}).then(res => {
wechatQueryPayResult(orderNo).then(res => {
uni.hideLoading();
return that.$util.Tips({
title: '支付成功',
icon: 'success'
@@ -752,12 +723,14 @@
url: goPages
});
}).cache(err => {
uni.hideLoading();
return that.$util.Tips({
title: err
});
})
}
}).cache(res => {
uni.hideLoading();
return that.$util.Tips({
title: '取消支付'
}, {
@@ -785,7 +758,8 @@
url: goPages + '&status=0'
});
setTimeout(() => {
location.href = jsConfig.mwebUrl + '&redirect_url=' + window.location.protocol + '//' + window.location.host +
location.href = jsConfig.mwebUrl + '&redirect_url=' + window.location
.protocol + '//' + window.location.host +
goPages + '&status=1';
}, 100)
break;
@@ -814,7 +788,7 @@
break;
case 'SUCCESS':
uni.hideLoading();
if (that.BargainId || that.combinationId || that.pinkId || that.seckillId)
if (that.orderInfoVo.bargainId || that.orderInfoVo.combinationId || that.pinkId || that.orderInfoVo.seckillId)
return that.$util.Tips({
title: message,
icon: 'success'
@@ -833,16 +807,16 @@
case 'WECHAT_PAY':
// #ifdef MP
that.toPay = true;
let packages = 'prepay_id=' + jsConfig.prepayId;
let packagess = 'prepay_id=' + jsConfig.prepayId;
uni.requestPayment({
timeStamp: jsConfig.timeStamp.toString(),
nonceStr: jsConfig.nonceStr,
package: packages,
package: packagess,
signType: jsConfig.signType,
paySign: jsConfig.paySign,
success: function(res) {
uni.hideLoading();
if (that.BargainId || that.combinationId || that.pinkId || that.seckillId)
if (that.orderInfoVo.bargainId || that.orderInfoVo.combinationId || that.pinkId || that.orderInfoVo.seckillId)
return that.$util.Tips({
title: '支付成功',
icon: 'success'
@@ -941,7 +915,7 @@
if (!that.payType) return that.$util.Tips({
title: '请选择支付方式'
});
if (!that.addressId && !that.shippingType) return that.$util.Tips({
if (!that.address.addressId && !that.shippingType) return that.$util.Tips({
title: '请选择收货地址'
});
if (that.shippingType == 1) {
@@ -967,26 +941,22 @@
data = {
realName: that.contacts,
phone: that.contactsTel,
addressId: that.addressId,
formId: '',
addressId: that.address.addressId,
couponId: that.couponId,
payType: that.payType,
useIntegral: that.useIntegral,
bargainId: that.BargainId,
combinationId: that.combinationId,
pinkId: that.pinkId,
seckillId: that.seckillId,
preOrderNo: that.preOrderNo,
mark: that.mark,
storeId: that.system_store.id || 0,
shippingType: that.$util.$h.Add(that.shippingType, 1),
isNew: that.news,
payChannel: that.payChannel
};
if (data.payType == 'yue' && parseFloat(that.userInfo.nowMoney) < parseFloat(that.totalPrice)) return that.$util
.Tips({
title: '余额不足!'
});
if (data.payType == 'yue' && parseFloat(that.userInfo.nowMoney) < parseFloat(that.totalPrice))
return that.$util
.Tips({
title: '余额不足!'
});
uni.showLoading({
title: '订单支付中'
});
@@ -998,13 +968,15 @@
// #ifndef MP
that.payment(data);
// #endif
// that.payment(data);
}
}
}
</script>
<style lang="scss" scoped>
.line2{
width: 504rpx;
}
.textR {
text-align: right;
}
@@ -1021,13 +993,13 @@
}
.order-submission .address {
padding: 28rpx 30rpx;
padding: 28rpx;
background-color: #fff;
box-sizing: border-box;
}
.order-submission .address .addressCon {
width: 610rpx;
width: 596rpx;
font-size: 26rpx;
color: #666;
}
@@ -1063,21 +1035,21 @@
// background-image: linear-gradient(to bottom, #e93323 0%, #f5f5f5 100%);
// background-image: -webkit-linear-gradient(to bottom, #e93323 0%, #f5f5f5 100%);
// background-image: -moz-linear-gradient(to bottom, #e93323 0%, #f5f5f5 100%);
padding-top: 100rpx;
padding: 100rpx 30rpx 0 30rpx;
}
.order-submission .allAddress .nav {
width: 710rpx;
width: 690rpx;
margin: 0 auto;
}
.order-submission .allAddress .nav .item {
width: 355rpx;
width: 334rpx;
}
.order-submission .allAddress .nav .item.on {
position: relative;
width: 250rpx;
width: 230rpx;
}
.order-submission .allAddress .nav .item.on::before {
@@ -1092,7 +1064,7 @@
border-style: none solid solid;
border-color: transparent transparent #fff;
z-index: 2;
border-radius: 7rpx 30rpx 0 0;
border-radius: 14rpx 36rpx 0 0;
text-align: center;
line-height: 80rpx;
}
@@ -1100,7 +1072,7 @@
.order-submission .allAddress .nav .item:nth-of-type(2).on::before {
content: "到店自提";
border-width: 0 0 80rpx 20rpx;
border-radius: 30rpx 7rpx 0 0;
border-radius: 36rpx 14rpx 0 0;
}
.order-submission .allAddress .nav .item.on2 {
@@ -1114,11 +1086,11 @@
font-size: 28rpx;
display: block;
height: 0;
width: 400rpx;
width: 401rpx;
border-width: 0 0 60rpx 60rpx;
border-style: none solid solid;
border-color: transparent transparent #f7c1bd;
border-radius: 40rpx 6rpx 0 0;
border-radius: 36rpx 14rpx 0 0;
text-align: center;
line-height: 60rpx;
}
@@ -1126,17 +1098,17 @@
.order-submission .allAddress .nav .item:nth-of-type(1).on2::before {
content: "快递配送";
border-width: 0 60rpx 60rpx 0;
border-radius: 6rpx 40rpx 0 0;
border-radius: 14rpx 36rpx 0 0;
}
.order-submission .allAddress .address {
width: 710rpx;
height: 150rpx;
width: 690rpx;
max-height: 180rpx;
margin: 0 auto;
}
.order-submission .allAddress .line {
width: 710rpx;
width: 100%;
margin: 0 auto;
}
@@ -1146,19 +1118,19 @@
.order-submission .wrapper {
background-color: #fff;
margin-top: 13rpx;
margin-top: 15rpx;
}
.order-submission .wrapper .item {
padding: 27rpx 30rpx;
padding: 27rpx 24rpx;
font-size: 30rpx;
color: #282828;
border-bottom: 1px solid #f0f0f0;
color: #333333;
border-bottom: 1px solid #F5F5F5;
}
.order-submission .wrapper .item .discount {
font-size: 30rpx;
color: #999;
color: #333;
}
.order-submission .wrapper .item .discount .iconfont {
@@ -1191,12 +1163,13 @@
.order-submission .wrapper .item textarea {
background-color: #f9f9f9;
width: 690rpx;
width: auto !important;
height: 140rpx;
border-radius: 3rpx;
border-radius: 14rpx;
margin-top: 30rpx;
padding: 25rpx 28rpx;
padding: 15rpx;
box-sizing: border-box;
font-weight: 400;
}
.order-submission .wrapper .item .placeholder {
@@ -1209,7 +1182,7 @@
.order-submission .wrapper .item .list .payItem {
border: 1px solid #eee;
border-radius: 6rpx;
border-radius: 14rpx;
height: 86rpx;
width: 100%;
box-sizing: border-box;
@@ -1220,7 +1193,7 @@
.order-submission .wrapper .item .list .payItem.on {
border-color: #fc5445;
color: #e93323;
color: $theme-color;
}
.order-submission .wrapper .item .list .payItem .name {
@@ -1253,7 +1226,7 @@
}
.order-submission .moneyList {
margin-top: 12rpx;
margin-top: 15rpx;
background-color: #fff;
padding: 30rpx;
}
@@ -1268,7 +1241,7 @@
}
.order-submission .moneyList .item .money {
color: #868686;
color: #666666;
}
.order-submission .footer {
@@ -1289,7 +1262,7 @@
color: #fff;
width: 240rpx;
height: 70rpx;
background-color: #e93323;
background-color: $theme-color;
border-radius: 50rpx;
text-align: center;
line-height: 70rpx;

View File

@@ -36,48 +36,56 @@
</view>
<view class='list'>
<view class='item' v-for="(item,index) in orderList" :key="index">
<view @click='goOrderDetails(item.storeOrder.orderId,item.storeOrder.unique)'>
<view @click='goOrderDetails(item.orderId)'>
<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="item.storeOrder.bargainId != 0">砍价</text>
<text class="sign cart-color acea-row row-center-wrapper" v-if="item.activityType !== '普通' && item.activityType !== '核销'">{{item.activityType}}</text>
<!-- <text class="sign cart-color acea-row row-center-wrapper" v-if="item.bargainId != 0">砍价</text>
<text class="sign cart-color acea-row row-center-wrapper" v-else-if="item.storeOrder.combinationId != 0">拼团</text>
<text class="sign cart-color acea-row row-center-wrapper" v-else-if="item.storeOrder.seckillId != 0">秒杀</text>
<view>{{item.storeOrder.createTime}}</view>
<text class="sign cart-color acea-row row-center-wrapper" v-else-if="item.storeOrder.seckillId != 0">秒杀</text> -->
<view>{{item.createTime}}</view>
</view>
<view v-if="item.status?item.status.type == 0:0" class='font-color'>待付款</view>
<view class='font-color'>{{item.orderStatus}}</view>
<!-- <view v-if="item.status?item.status.type == 0:0" class='font-color'>待付款</view>
<view v-else-if="item.status?item.status.type == 1:0 && item.storeOrder.shippingType==1" class='font-color'>待发货</view>
<view v-else-if="item.status?item.status.type == 2:0 && item.storeOrder.shippingType==1" class='font-color'>待收货</view>
<view v-else-if="item.status?item.status.type == 3:0 && item.storeOrder.shippingType==1" class='font-color'>待评价</view>
<view v-else-if="item.status?item.status.type == 4:0 && item.storeOrder.shippingType==1" class='font-color'>已完成</view>
<view v-else-if="item.storeOrder.shippingType==2" class='font-color'>待核销</view>
<view v-else-if="item.storeOrder.shippingType==2" class='font-color'>待核销</view> -->
</view>
<view class='item-info acea-row row-between row-top' v-for="(item,index) in item.cartInfo" :key="index">
<view class='item-info acea-row row-between row-top' v-for="(items,index) in item.orderInfoList" :key="index">
<view class='pictrue'>
<image :src='item.info.productInfo.image'></image>
<image :src='items.image'></image>
</view>
<view class='text acea-row row-between'>
<view class='name line2'>{{item.info.productInfo.storeName}}</view>
<view class='name line2'>{{items.storeName}}</view>
<view class='money'>
<view v-if="item.info.productInfo.attrInfo">{{item.info.productInfo.attrInfo.price}}</view>
<view v-else>{{item.info.productInfo.price}}</view>
<view>x{{item.info.cartNum}}</view>
<view>{{items.price}}</view>
<view>x{{items.cartNum}}</view>
</view>
</view>
</view>
<view class='totalPrice'>{{(item.cartInfo?item.cartInfo.length:0) || 0}}件商品总金额
<text class='money font-color'>{{item.storeOrder.payPrice}}</text>
<view class='totalPrice'>{{item.totalNum}}件商品总金额
<text class='money font-color'>{{item.payPrice}}</text>
</view>
</view>
<view class='bottom acea-row row-right row-middle'>
<view class='bnt cancelBnt' v-if="item.status?item.status.type==0:0 || item.status?item.status.type == 9:0" @click='cancelOrder(index,item.storeOrder.id)'>取消订单</view>
<view class='bnt bg-color' v-if="item.status?item.status.type == 0:0" @click='goPay(item.storeOrder.payPrice,item.storeOrder.orderId)'>立即付款</view>
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 1:0 || item.status?item.status.type == 9:0" @click='goOrderDetails(item.storeOrder.orderId,item.storeOrder.unique)'>查看详情</view>
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 2:0 && item.status.deliveryType" @click='goOrderDetails(item.storeOrder.orderId,item.storeOrder.unique)'>查看详情</view>
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 3:0" @click='goOrderDetails(item.storeOrder.orderId,item.storeOrder.unique)'>去评价</view>
<view class='bnt bg-color' v-else-if="item.storeOrder.seckillId < 1 && item.storeOrder.bargainId < 1 && item.storeOrder.combinationId < 1 && item.status?item.status.type == 4:0"
@click='goOrderDetails(item.storeOrder.orderId,item.storeOrder.unique)'>再次购买</view>
<view class='bnt cancelBnt' v-if="item.status?item.status.type == 4:0" @click='delOrder(item.storeOrder.id,index)'>删除订单</view>
<view class='bnt cancelBnt' v-if="!item.paid" @click='cancelOrder(index,item.id)'>取消订单</view>
<view class='bnt bg-color' v-if="!item.paid" @click='goPay(item.payPrice,item.orderId)'>立即付款</view>
<view class='bnt bg-color' v-else-if="item.status== 0 || item.status== 1 || item.status== 3" @click='goOrderDetails(item.orderId)'>查看详情</view>
<view class='bnt bg-color' v-else-if="item.status==2" @click='goOrderDetails(item.orderId)'>去评价</view>
<view class='bnt cancelBnt' v-if="item.status == 3" @click='delOrder(item.id,index)'>删除订单</view>
</view>
<!-- <view class='bottom acea-row row-right row-middle'>
<view class='bnt cancelBnt' v-if="item.status?item.status.type==0:0 || item.status?item.status.type == 9:0" @click='cancelOrder(index,item.id)'>取消订单</view>
<view class='bnt bg-color' v-if="item.status?item.status.type == 0:0" @click='goPay(item.payPrice,item.orderId)'>立即付款</view>
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 1:0 || item.status?item.status.type == 9:0" @click='goOrderDetails(item.orderId)'>查看详情</view>
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 2:0 && item.status.deliveryType" @click='goOrderDetails(item.orderId)'>查看详情</view>
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 3:0" @click='goOrderDetails(item.orderId)'>去评价</view>
<view class='bnt bg-color' v-else-if="item.storeOrder.seckillId < 1 && item.storeOrder.bargainId < 1 && item.storeOrder.combinationId < 1 && item.status?item.status.type == 4:0"
@click='goOrderDetails(item.orderId)'>再次购买</view>
<view class='bnt cancelBnt' v-if="item.status?item.status.type == 4:0" @click='delOrder(item.id,index)'>删除订单</view>
</view> -->
</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if="orderList.length>0">
@@ -93,7 +101,7 @@
</view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
@@ -105,12 +113,8 @@
getOrderList,
orderData,
orderCancel,
orderDel,
orderPay
orderDel
} from '@/api/order.js';
import {
getUserInfo
} from '@/api/user.js';
import {
openOrderSubscribe
} from '@/utils/SubscribeMessage.js';
@@ -166,27 +170,24 @@
isShowAuth: false //是否隐藏授权
};
},
computed: mapGetters(['isLogin']),
computed: mapGetters(['isLogin', 'userInfo']),
onShow() {
if (this.isLogin) {
this.loadend = false;
this.page = 1;
this.$set(this, 'orderList', []);
this.getOrderData();
this.getOrderList();
this.getUserInfo();
this.payMode[1].number = this.userInfo.nowMoney;
this.$set(this, 'payMode', this.payMode);
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
onLoadFun() {
this.getOrderData();
this.getOrderList();
this.getUserInfo();
},
// 授权关闭
authColse: function(e) {
@@ -202,17 +203,6 @@
let value = opt.value != undefined ? opt.value : null;
(action && this[action]) && this[action](value);
},
/**
* 获取用户信息
*
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
that.payMode[1].number = res.data.nowMoney;
that.$set(that, 'payMode', that.payMode);
});
},
/**
* 关闭支付组件
*
@@ -269,7 +259,7 @@
* 打开支付组件
*
*/
goPay: function(pay_price, order_id) {
goPay(pay_price, order_id) {
this.$set(this, 'pay_close', true);
this.$set(this, 'pay_order_id', order_id);
this.$set(this, 'totalPrice', pay_price);
@@ -282,8 +272,7 @@
this.loadend = false;
this.page = 1;
this.$set(this, 'orderList', []);
this.pay_close = false;
this.pay_order_id = '';
this.$set(this, 'pay_close', false);
this.getOrderData();
this.getOrderList();
},
@@ -293,7 +282,6 @@
*/
pay_fail: function() {
this.pay_close = false;
this.pay_order_id = '';
},
/**
* 去订单详情
@@ -346,7 +334,7 @@
page: that.page,
limit: that.limit,
}).then(res => {
let list = res.data || [];
let list = res.data.list || [];
let loadend = list.length < that.limit;
that.orderList = that.$util.SplitArray(list, that.orderList);
that.$set(that, 'orderList', that.orderList);
@@ -389,7 +377,7 @@
<style scoped lang="scss">
.my-order .header {
height: 260rpx;
height: 250rpx;
padding: 0 30rpx;
}
@@ -424,20 +412,24 @@
background-color: #fff;
width: 690rpx;
height: 140rpx;
border-radius: 6rpx;
margin: -73rpx auto 0 auto;
border-radius: 14rpx;
margin: -60rpx auto 0 auto;
}
.my-order .nav .item {
text-align: center;
font-size: 26rpx;
color: #282828;
padding: 29rpx 0;
padding: 26rpx 0;
}
.my-order .nav .item.on {
// font-weight: bold;
// border-bottom: 5rpx solid #e93323;
/* #ifdef H5 || MP */
font-weight: bold;
border-bottom: 5rpx solid #e93323;
/* #endif */
border-bottom: 5rpx solid $theme-color;
}
.my-order .nav .item .num {
@@ -451,13 +443,13 @@
.my-order .list .item {
background-color: #fff;
border-radius: 6rpx;
border-radius: 14rpx;
margin-bottom: 14rpx;
}
.my-order .list .item .title {
height: 84rpx;
padding: 0 30rpx;
padding: 0 24rpx;
border-bottom: 1rpx solid #eee;
font-size: 28rpx;
color: #282828;
@@ -465,13 +457,14 @@
.my-order .list .item .title .sign {
font-size: 24rpx;
padding: 0 7rpx;
padding: 0 13rpx;
height: 36rpx;
margin-right: 15rpx;
border-radius: 18rpx;
}
.my-order .list .item .item-info {
padding: 0 30rpx;
padding: 0 24rpx;
margin-top: 22rpx;
}
@@ -483,18 +476,17 @@
.my-order .list .item .item-info .pictrue image {
width: 100%;
height: 100%;
border-radius: 6rpx;
border-radius: 14rpx;
}
.my-order .list .item .item-info .text {
width: 486rpx;
width: 500rpx;
font-size: 28rpx;
color: #999;
margin-top: 6rpx;
}
.my-order .list .item .item-info .text .name {
width: 306rpx;
width: 350rpx;
color: #282828;
}

View File

@@ -0,0 +1,43 @@
<template>
<view class="content">
<jyf-parser :html="content" ref="article" :tag-style="tagStyle"></jyf-parser>
</view>
</template>
<script>
import parser from "@/components/jyf-parser/jyf-parser";
import {
getUserAgreement,
} from '@/api/user.js';
export default {
components: {
"jyf-parser": parser
},
data() {
return {
tagStyle: {
img: 'width:100%;display:block;',
table: 'width:100%',
video: 'width:100%'
},
content: ``
}
},
mounted() {
getUserAgreement().then(res => {
this.content = res.data.content
}).catch(err => {
that.$util.Tips({
title: err.msg
});
})
}
}
</script>
<style scoped>
.content {
padding: 40rpx 30rpx;
line-height: 2;
}
</style>

View File

@@ -2,74 +2,84 @@
<view>
<view class="promoter-list">
<view class='promoterHeader bg-color'>
<view class='headerCon acea-row row-between-wrapper'>
<view class='headerCon acea-row row-between'>
<view>
<view class='name'>推广人数</view>
<view><text class='num'>{{teamCount}}</text></view>
<view><text class='num'>{{peopleData.count}}</text></view>
</view>
<view class='iconfont icon-tuandui'></view>
</view>
</view>
<view class='nav acea-row row-around'>
<view :class="grade == 0 ? 'item on' : 'item'" @click='setType(0)'>一级({{total}})</view>
<view :class="grade == 1 ? 'item on' : 'item'" @click='setType(1)'>({{totalLevel}})</view>
</view>
<view class='search acea-row row-between-wrapper'>
<view class='input'><input placeholder='点击搜索会员名称' placeholder-class='placeholder' v-model="keyword" @confirm="submitForm" confirm-type='search' name="search"></input></view>
<button class='iconfont icon-sousuo2' @click="submitForm"></button>
</view>
<view class='list'>
<view class="sortNav acea-row row-middle">
<view class="sortItem" @click='setSort("childCount","ASC")' v-if="sort == 'childCountDESC'">团队排序
<image src='/static/images/sort1.png'></image>
</view>
<view class="sortItem" @click='setSort("childCount")' v-else-if="sort == 'childCountASC'">团队排序
<image src='/static/images/sort3.png'></image>
</view>
<view class="sortItem" @click='setSort("childCount","DESC")' v-else>团队排序
<image src='/static/images/sort2.png'></image>
</view>
<view class="sortItem" @click='setSort("numberCount","ASC")' v-if="sort == 'numberCountDESC'">金额排序
<image src='/static/images/sort1.png'></image>
</view>
<view class="sortItem" @click='setSort("numberCount")' v-else-if="sort == 'numberCountASC'">金额排序
<image src='/static/images/sort3.png'></image>
</view>
<view class="sortItem" @click='setSort("numberCount","DESC")' v-else>金额排序
<image src='/static/images/sort2.png'></image>
</view>
<view class="sortItem" @click='setSort("orderCount","ASC")' v-if="sort == 'orderCountDESC'">订单排序
<image src='/static/images/sort1.png'></image>
</view>
<view class="sortItem" @click='setSort("orderCount")' v-else-if="sort == 'orderCountASC'">订单排序
<image src='/static/images/sort3.png'></image>
</view>
<view class="sortItem" @click='setSort("orderCount","DESC")' v-else>订单排序
<image src='/static/images/sort2.png'></image>
<view class="pad30">
<view class='nav acea-row row-around'>
<view :class="grade == 0 ? 'item on' : 'item'" @click='setType(0)'>({{peopleData.total}})</view>
<view :class="grade == 1 ? 'item on' : 'item'" @click='setType(1)'>二级({{peopleData.totalLevel}})
</view>
</view>
<block v-for="(item,index) in recordList" :key="index">
<view class='item acea-row row-between-wrapper'>
<view class="picTxt acea-row row-between-wrapper">
<view class='pictrue'>
<image :src='item.avatar'></image>
</view>
<view class='text'>
<view class='name line1'>{{item.nickname}}</view>
<view>加入时间: {{item.time}}</view>
</view>
<view class='search acea-row row-between-wrapper'>
<view class='input'><input placeholder='点击搜索会员名称' placeholder-class='placeholder' v-model="keyword"
@confirm="submitForm" confirm-type='search' name="search"></input></view>
<button class='iconfont icon-sousuo2' @click="submitForm"></button>
</view>
<view class='list'>
<view class="sortNav acea-row row-middle">
<view class="sortItem" @click='setSort("childCount","ASC")' v-if="sort == 'childCountDESC'">团队排序
<image src='/static/images/sort1.png'></image>
</view>
<view class="right">
<view><text class='num font-color'>{{item.childCount ? item.childCount : 0}}</text></view>
<view><text class="num">{{item.orderCount ? item.orderCount : 0}}</text></view>
<view><text class="num">{{item.numberCount ? item.numberCount : 0}}</text></view>
<view class="sortItem" @click='setSort("childCount")' v-else-if="sort == 'childCountASC'">团队排序
<image src='/static/images/sort3.png'></image>
</view>
<view class="sortItem" @click='setSort("childCount","DESC")' v-else>团队排序
<image src='/static/images/sort2.png'></image>
</view>
<view class="sortItem" @click='setSort("numberCount","ASC")' v-if="sort == 'numberCountDESC'">
金额排序
<image src='/static/images/sort1.png'></image>
</view>
<view class="sortItem" @click='setSort("numberCount")' v-else-if="sort == 'numberCountASC'">金额排序
<image src='/static/images/sort3.png'></image>
</view>
<view class="sortItem" @click='setSort("numberCount","DESC")' v-else>金额排序
<image src='/static/images/sort2.png'></image>
</view>
<view class="sortItem" @click='setSort("orderCount","ASC")' v-if="sort == 'orderCountDESC'">订单排序
<image src='/static/images/sort1.png'></image>
</view>
<view class="sortItem" @click='setSort("orderCount")' v-else-if="sort == 'orderCountASC'">订单排序
<image src='/static/images/sort3.png'></image>
</view>
<view class="sortItem" @click='setSort("orderCount","DESC")' v-else>订单排序
<image src='/static/images/sort2.png'></image>
</view>
</view>
</block>
<block v-for="(item,index) in recordList" :key="index">
<view class='item acea-row row-between-wrapper'>
<view class="picTxt acea-row row-between-wrapper">
<view class='pictrue'>
<image :src='item.avatar'></image>
</view>
<view class='text'>
<view class='name line1'>{{item.nickname}}</view>
<view>加入时间: {{item.time.split(' ')[0]}}</view>
</view>
</view>
<view class="right">
<view><text class='num font-color'>{{item.childCount ? item.childCount : 0}}</text>
</view>
<view><text class="num">{{item.orderCount ? item.orderCount : 0}}</text></view>
<view><text class="num">{{item.numberCount ? item.numberCount : 0}}</text></view>
</view>
</view>
</block>
<Loading :loaded="status" :loading="loadingList"></Loading>
<block v-if="recordList.length == 0 && isShow">
<emptyPage title="暂无推广人数~"></emptyPage>
</block>
</view>
</view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
@@ -77,7 +87,8 @@
<script>
import {
spreadPeople
spreadPeople,
spreadPeoCount
} from '@/api/user.js';
import {
toLogin
@@ -85,12 +96,16 @@
import {
mapGetters
} from "vuex";
import emptyPage from '@/components/emptyPage.vue'
import Loading from "@/components/Loading";
// #ifdef MP
import authorize from '@/components/Authorize';
// #endif
import home from '@/components/home';
export default {
components: {
Loading,
emptyPage,
// #ifdef MP
authorize,
// #endif
@@ -98,9 +113,6 @@
},
data() {
return {
total: 0,
totalLevel: 0,
teamCount: 0,
page: 1,
limit: 20,
keyword: '',
@@ -109,7 +121,10 @@
sortKey: '',
grade: 0,
status: false,
loadingList: false,
recordList: [],
peopleData: {},
isShow: false,
isAuto: false, //没有授权的不会自动授权
isShowAuth: false //是否隐藏授权
};
@@ -118,14 +133,9 @@
onLoad() {
if (this.isLogin) {
this.userSpreadNewList();
this.spreadPeoCount();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
onShow: function() {
@@ -142,10 +152,10 @@
authColse: function(e) {
this.isShowAuth = e
},
setSort: function(sortKey,isAsc) {
setSort: function(sortKey, isAsc) {
let that = this;
that.isAsc = isAsc;
that.sort = sortKey+isAsc;
that.sort = sortKey + isAsc;
that.sortKey = sortKey;
that.page = 1;
that.limit = 20;
@@ -160,7 +170,7 @@
this.$set(this, 'recordList', []);
this.userSpreadNewList();
},
setType: function(grade) {
if (this.grade != grade) {
this.grade = grade;
@@ -170,10 +180,16 @@
this.sort = '';
this.isAsc = '';
this.status = false;
this.loadingList = false;
this.$set(this, 'recordList', []);
this.userSpreadNewList();
}
},
spreadPeoCount() {
spreadPeoCount().then(res => {
this.peopleData = res.data;
});
},
userSpreadNewList: function() {
let that = this;
let page = that.page;
@@ -185,6 +201,7 @@
let grade = that.grade;
let recordList = that.recordList;
let recordListNew = [];
if (that.loadingList) return;
if (status == true) return;
spreadPeople({
page: page,
@@ -194,15 +211,14 @@
sortKey: sortKey,
isAsc: isAsc
}).then(res => {
let recordListData = res.data.spreadPeopleList?res.data.spreadPeopleList:[];
let recordListData = res.data.list ? res.data.list : [];
let len = recordListData.length;
recordListNew = recordList.concat(recordListData);
that.total = res.data.total;
that.totalLevel = res.data.totalLevel;
that.teamCount = res.data.count;
that.status = limit > len;
that.page = page + 1;
that.$set(that, 'recordList', recordListNew || []);
that.loadingList = false;
if(that.recordList.length===0) that.isShow = true;
});
}
},
@@ -220,23 +236,28 @@
font-size: 28rpx;
color: #282828;
border-bottom: 1rpx solid #eee;
border-top-left-radius: 14rpx;
border-top-right-radius: 14rpx;
margin-top: -30rpx;
}
.promoter-list .nav .item.on {
border-bottom: 5rpx solid #e93323;
color: #e93323;
border-bottom: 5rpx solid $theme-color;
color: $theme-color;
}
.promoter-list .search {
width: 100%;
background-color: #fff;
height: 86rpx;
padding-left: 30rpx;
height: 100rpx;
padding: 0 24rpx;
box-sizing: border-box;
border-bottom-left-radius: 14rpx;
border-bottom-right-radius: 14rpx;
}
.promoter-list .search .input {
width: 610rpx;
width: 592rpx;
height: 60rpx;
border-radius: 50rpx;
background-color: #f5f5f5;
@@ -265,15 +286,14 @@
}
.promoter-list .search .iconfont {
font-size: 45rpx;
font-size: 32rpx;
color: #515151;
width: 110rpx;
height: 60rpx;
line-height: 60rpx;
}
.promoter-list .list {
margin-top: 12rpx;
margin-top: 20rpx;
}
.promoter-list .list .sortNav {
@@ -282,6 +302,8 @@
border-bottom: 1rpx solid #eee;
color: #333;
font-size: 28rpx;
border-top-left-radius: 14rpx;
border-top-right-radius: 14rpx;
}
.promoter-list .list .sortNav .sortItem {
@@ -300,14 +322,10 @@
background-color: #fff;
border-bottom: 1rpx solid #eee;
height: 152rpx;
padding: 0 30rpx 0 20rpx;
padding: 0 24rpx;
font-size: 24rpx;
color: #666;
}
.promoter-list .list .item .picTxt {
width: 440rpx;
}
.promoter-list .list .item .picTxt .pictrue {
width: 106rpx;
@@ -325,9 +343,10 @@
}
.promoter-list .list .item .picTxt .text {
width: 304rpx;
// width: 304rpx;
font-size: 24rpx;
color: #666;
margin-left: 14rpx;
}
.promoter-list .list .item .picTxt .text .name {
@@ -337,13 +356,12 @@
}
.promoter-list .list .item .right {
width: 240rpx;
text-align: right;
font-size: 22rpx;
color: #333;
}
.promoter-list .list .item .right .num{
.promoter-list .list .item .right .num {
margin-right: 7rpx;
}
</style>

View File

@@ -10,7 +10,7 @@
<view class='iconfont icon-2'></view>
</view>
</view>
<view class='list' v-if="recordList.length>0">
<view class='list pad30' v-if="recordList.length>0">
<block v-for="(item,index) in recordList" :key="index">
<view class='item'>
<view class='title acea-row row-column row-center'>
@@ -19,7 +19,7 @@
</view>
<view class='listn'>
<block v-for="(child,indexn) in item.child" :key="indexn">
<view class='itenm'>
<view class='itenm borRadius14'>
<view class='top acea-row row-between-wrapper'>
<view class='pictxt acea-row row-between-wrapper'>
<view class='pictrue'>
@@ -46,7 +46,7 @@
</view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
@@ -92,13 +92,7 @@
if (this.isLogin) {
this.getRecordOrderList();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
@@ -160,7 +154,6 @@
<style scoped lang="scss">
.promoter-order .list .item .title {
height: 133rpx;
padding: 0 30rpx;
font-size: 26rpx;
color: #999;
}
@@ -176,12 +169,11 @@
}
.promoter-order .list .item .listn .itenm~.itenm {
margin-top: 12rpx;
margin-top: 20rpx;
}
.promoter-order .list .item .listn .itenm .top {
margin-left: 30rpx;
padding-right: 30rpx;
padding: 0 24rpx;
border-bottom: 1rpx solid #eee;
height: 100rpx;
}
@@ -215,7 +207,7 @@
}
.promoter-order .list .item .listn .itenm .bottom {
padding: 20rpx 30rpx;
padding: 20rpx 24rpx;
font-size: 28rpx;
color: #666;
line-height: 1.6;

View File

@@ -48,7 +48,7 @@
</view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
@@ -107,13 +107,7 @@
if (this.isLogin) {
this.getRanklist();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
// onShow: function () {

View File

@@ -1,23 +1,25 @@
<template>
<view>
<form @submit="formSubmit" report-submit='true'>
<view class='addAddress'>
<view class='list'>
<view class='item acea-row row-between-wrapper'>
<view class='addAddress pad30'>
<view class='list borRadius14'>
<view class='item acea-row row-between-wrapper' style="border: none;">
<view class='name'>姓名</view>
<input type='text' placeholder='请输入姓名' name='realName' :value="userAddress.realName" placeholder-class='placeholder'></input>
<input type='text' placeholder='请输入姓名' placeholder-style="color:#ccc;" name='realName' :value="userAddress.realName"
placeholder-class='placeholder'></input>
</view>
<view class='item acea-row row-between-wrapper'>
<view class='name'>联系电话</view>
<input type='text' placeholder='请输入联系电话' name="phone" :value='userAddress.phone' placeholder-class='placeholder'></input>
<input type='text' placeholder='请输入联系电话' placeholder-style="color:#ccc;" name="phone" :value='userAddress.phone'
placeholder-class='placeholder'></input>
</view>
<view class='item acea-row row-between-wrapper'>
<view class='name'>所在地区</view>
<view class="address">
<picker mode="multiSelector" @change="bindRegionChange" @columnchange="bindMultiPickerColumnChange" :value="valueRegion"
:range="multiArray">
<picker mode="multiSelector" @change="bindRegionChange"
@columnchange="bindMultiPickerColumnChange" :value="valueRegion" :range="multiArray">
<view class='acea-row'>
<view class="picker">{{region[0]}}{{region[1]}}{{region[2]}}</view>
<view class="picker line1">{{region[0]}}{{region[1]}}{{region[2]}}</view>
<view class='iconfont icon-dizhi font-color'></view>
</view>
</picker>
@@ -25,12 +27,14 @@
</view>
<view class='item acea-row row-between-wrapper'>
<view class='name'>详细地址</view>
<input type='text' placeholder='请填写具体地址' name='detail' placeholder-class='placeholder' :value='userAddress.detail'></input>
<input type='text' placeholder='请填写具体地址' placeholder-style="color:#ccc;" name='detail' placeholder-class='placeholder'
:value='userAddress.detail'></input>
</view>
</view>
<view class='default acea-row row-middle'>
<view class='default acea-row row-middle borRadius14'>
<checkbox-group @change='ChangeIsDefault'>
<checkbox :checked="userAddress.isDefault" />设置为默认地址</checkbox-group>
<checkbox :checked="userAddress.isDefault" />设置为默认地址
</checkbox-group>
</view>
<button class='keepBnt bg-color' form-type="submit">立即保存</button>
@@ -43,7 +47,7 @@
</view>
</form>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
@@ -102,26 +106,27 @@
};
},
computed: mapGetters(['isLogin']),
watch:{
isLogin:{
handler:function(newV,oldV){
if(newV){
watch: {
isLogin: {
handler: function(newV, oldV) {
if (newV) {
this.getUserAddress();
this.getCityList();
}
},
deep:true
deep: true
}
},
onLoad(options) {
if (this.isLogin) {
this.cartId = options.cartId || '';
this.pinkId = options.pinkId || 0;
this.couponId = options.couponId || 0;
this.preOrderNo = options.preOrderNo || 0;
// this.cartId = options.cartId || '';
// this.pinkId = options.pinkId || 0;
// this.couponId = options.couponId || 0;
this.id = options.id || 0;
this.secKill = options.secKill || false;
this.combination = options.combination || false;
this.bargain = options.bargain || false;
// this.secKill = options.secKill || false;
// this.combination = options.combination || false;
// this.bargain = options.bargain || false;
uni.setNavigationBarTitle({
title: options.id ? '修改地址' : '添加地址'
})
@@ -131,13 +136,7 @@
// this.initialize();
// }
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
@@ -286,9 +285,23 @@
that.pinkId = '';
that.couponId = '';
uni.navigateTo({
url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id :
res.data
.id) + '&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + that.secKill + '&combination=' + that.combination + '&bargain=' + that.bargain
url: '/pages/users/order_confirm/index?cartId=' +
cartId +
'&addressId=' + (
that.id ? that
.id :
res.data
.id) +
'&pinkId=' +
pinkId +
'&couponId=' +
couponId +
'&secKill=' + that
.secKill +
'&combination=' +
that.combination +
'&bargain=' + that
.bargain
});
} else {
uni.navigateBack({
@@ -307,9 +320,10 @@
});
},
fail: function(res) {
if (res.errMsg == 'chooseAddress:cancel') return that.$util.Tips({
title: '取消选择'
});
if (res.errMsg == 'chooseAddress:cancel') return that.$util
.Tips({
title: '取消选择'
});
},
})
},
@@ -361,13 +375,17 @@
that.pinkId = '';
that.couponId = '';
uni.navigateTo({
url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id :
res.data
.id) + '&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + that.secKill + '&combination=' + that.combination + '&bargain=' + that.bargain
url: '/pages/users/order_confirm/index?cartId=' +
cartId + '&addressId=' + (that.id ? that.id :
res.data
.id) + '&pinkId=' + pinkId + '&couponId=' +
couponId + '&secKill=' + that.secKill +
'&combination=' + that.combination + '&bargain=' +
that.bargain
});
} else {
uni.navigateTo({
url:'/pages/users/user_address_list/index'
url: '/pages/users/user_address_list/index'
})
// history.back();
}
@@ -436,16 +454,12 @@
icon: 'success'
});
setTimeout(function() {
if (that.cartId) {
let cartId = that.cartId;
let pinkId = that.pinkId;
let couponId = that.couponId;
that.cartId = '';
that.pinkId = '';
that.couponId = '';
uni.navigateTo({
url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id : res.data.id) +'&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + that.secKill + '&combination=' + that.combination + '&bargain=' + that.bargain
});
if (that.preOrderNo>0) {
uni.redirectTo({
url: '/pages/users/order_confirm/index?preOrderNo=' + that
.preOrderNo + '&addressId=' + (that.id ? that.id : res.data
.id)
})
} else {
// #ifdef H5
return history.back();
@@ -455,7 +469,29 @@
delta: 1,
})
// #endif
}
// if (that.cartId) {
// let cartId = that.cartId;
// let pinkId = that.pinkId;
// let couponId = that.couponId;
// that.cartId = '';
// that.pinkId = '';
// that.couponId = '';
// uni.navigateTo({
// url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id : res.data.id) +'&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + that.secKill + '&combination=' + that.combination + '&bargain=' + that.bargain
// });
// } else {
// // #ifdef H5
// return history.back();
// // #endif
// // #ifndef H5
// return uni.navigateBack({
// delta: 1,
// })
// // #endif
// }
}, 1000);
}).catch(err => {
return that.$util.Tips({
@@ -471,40 +507,42 @@
</script>
<style scoped lang="scss">
.addAddress {
padding-top: 20rpx;
}
.addAddress .list {
background-color: #fff;
padding: 0 24rpx;
}
.addAddress .list .item {
padding: 30rpx;
border-top: 1rpx solid #eee;
height: 90rpx;
line-height: 90rpx;
}
.addAddress .list .item .name {
width: 195rpx;
// width: 195rpx;
font-size: 30rpx;
color: #333;
}
.addAddress .list .item .address {
// width: 412rpx;
flex: 1;
margin-left: 20rpx;
margin-left: 50rpx;
}
.addAddress .list .item input {
width: 475rpx;
font-size: 30rpx;
font-weight: 400;
}
.addAddress .list .item .placeholder {
color: #ccc;
}
.addAddress .list .item picker {
width: 475rpx;
}
.addAddress .list .item picker .picker {
width: 410rpx;
font-size: 30rpx;
@@ -531,7 +569,7 @@
border-radius: 50rpx;
text-align: center;
line-height: 86rpx;
margin: 50rpx auto;
margin: 80rpx auto 24rpx auto;
font-size: 32rpx;
color: #fff;
}
@@ -544,7 +582,7 @@
line-height: 86rpx;
margin: 0 auto;
font-size: 32rpx;
color: #fe960f;
border: 1px solid #fe960f;
color: #E93323 ;
border: 1px solid #E93323;
}
</style>

View File

@@ -1,11 +1,11 @@
<template>
<view>
<view class='line'>
<image src='../../../static/images/line.jpg' v-if="addressList.length"></image>
</view>
<view class='address-management' :class='addressList.length < 1 && page > 1 ? "fff":""'>
<view class='line'>
<image src='../../../static/images/line.jpg' v-if="addressList.length"></image>
</view>
<radio-group class="radio-group" @change="radioChange" v-if="addressList.length">
<view class='item' v-for="(item,index) in addressList" :key="index">
<view class='item borRadius14' v-for="(item,index) in addressList" :key="index">
<view class='address' @click='goOrder(item.id)'>
<view class='consignee'>收货人{{item.realName}}<text class='phone'>{{item.phone}}</text></view>
<view>收货地址{{item.province}}{{item.city}}{{item.district}}{{item.detail}}</view>
@@ -37,22 +37,19 @@
</view>
</view>
<view style='height:120rpx;'></view>
<view class='footer acea-row row-between-wrapper'>
<!-- #ifdef APP-PLUS -->
<view class='addressBnt bg-color on' @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
<!-- #endif -->
<!-- #ifdef MP-->
<view class='addressBnt bg-color' @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
<view class='addressBnt wxbnt' @click='getWxAddress'><text class='iconfont icon-weixin2'></text>导入微信地址</view>
<!-- #endif -->
<!-- #ifdef H5-->
<view class='addressBnt bg-color' :class="this.$wechat.isWeixin()?'':'on'" @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
<view class='addressBnt wxbnt' @click='getAddress' v-if="this.$wechat.isWeixin()"><text class='iconfont icon-weixin2'></text>导入微信地址</view>
<!-- #endif -->
</view>
</view>
<view class='footer acea-row row-between-wrapper'>
<!-- #ifdef MP-->
<view class='addressBnt bg-color' @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
<view class='addressBnt wxbnt' @click='getWxAddress'><text class='iconfont icon-weixin2'></text>导入微信地址</view>
<!-- #endif -->
<!-- #ifdef H5-->
<view class='addressBnt bg-color' :class="this.$wechat.isWeixin()?'':'on'" @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
<view v-if="this.$wechat.isWeixin()" class='addressBnt wxbnt' @click='getAddress'><text class='iconfont icon-weixin2'></text>导入微信地址</view>
<!-- #endif -->
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
@@ -114,21 +111,15 @@
},
onLoad(options) {
if (this.isLogin) {
this.cartId = options.cartId || '';
this.pinkId = options.pinkId || 0;
this.couponId = options.couponId || 0;
this.secKill = options.secKill || false;
this.combination = options.combination || false;
this.bargain = options.bargain || false;
this.preOrderNo = options.preOrderNo || 0;
// this.pinkId = options.pinkId || 0;
// this.couponId = options.couponId || 0;
// this.secKill = options.secKill || false;
// this.combination = options.combination || false;
// this.bargain = options.bargain || false;
this.getAddressList(true);
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
onShow: function() {
@@ -353,23 +344,13 @@
this.pinkId = '';
this.couponId = '';
uni.navigateTo({
url: '/pages/users/user_address/index?cartId=' + cartId + '&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + this.secKill + '&combination=' + this.combination + '&bargain=' + this.bargain
url: '/pages/users/user_address/index?preOrderNo=' + this.preOrderNo
})
},
goOrder: function(id) {
let cartId = '';
let pinkId = '';
let couponId = '';
if (this.cartId && id) {
cartId = this.cartId;
pinkId = this.pinkId;
couponId = this.couponId;
this.cartId = '';
this.pinkId = '';
this.couponId = '';
if(this.preOrderNo){
uni.redirectTo({
url: '/pages/users/order_confirm/index?is_address=1&cartId=' + cartId + '&addressId=' + id + '&pinkId=' +
pinkId + '&couponId=' + couponId + '&secKill=' + this.secKill + '&combination=' + this.combination + '&bargain=' + this.bargain
url: '/pages/users/order_confirm/index?is_address=1&preOrderNo=' + this.preOrderNo + '&addressId=' + id
})
}
}
@@ -380,31 +361,32 @@
}
</script>
<style>
<style lang="scss" scoped>
.address-management{
padding: 20rpx 30rpx;
}
.address-management.fff {
background-color: #fff;
height: 1300rpx
}
.address-management .line {
.line {
width: 100%;
height: 3rpx;
image {
width: 100%;
height: 100%;
display: block;
}
}
.address-management .line image {
width: 100%;
height: 100%;
display: block;
}
.address-management .item {
background-color: #fff;
padding: 0 30rpx;
margin-bottom: 12rpx;
padding: 0 20rpx;
margin-bottom: 20rpx;
}
.address-management .item .address {
padding: 30rpx 0;
padding: 35rpx 0;
border-bottom: 1rpx solid #eee;
font-size: 28rpx;
color: #282828;
@@ -438,11 +420,11 @@
}
.address-management .item .operation .iconfont.icon-shanchu {
margin-left: 40rpx;
margin-left: 35rpx;
font-size: 38rpx;
}
.address-management .footer {
.footer {
position: fixed;
width: 100%;
background-color: #fff;
@@ -452,7 +434,7 @@
box-sizing: border-box;
}
.address-management .footer .addressBnt {
.footer .addressBnt {
width: 330rpx;
height: 76rpx;
border-radius: 50rpx;
@@ -462,18 +444,18 @@
color: #fff;
}
.address-management .footer .addressBnt.on {
.footer .addressBnt.on {
width: 690rpx;
margin: 0 auto;
}
.address-management .footer .addressBnt .iconfont {
.footer .addressBnt .iconfont {
font-size: 35rpx;
margin-right: 8rpx;
vertical-align: -1rpx;
}
.address-management .footer .addressBnt.wxbnt {
.footer .addressBnt.wxbnt {
background-color: #fe960f;
}
</style>

View File

@@ -3,14 +3,14 @@
<view class='bill-details'>
<view class='nav acea-row'>
<view class='item' :class='type==="all" ? "on":""' @click='changeType("all")'>全部</view>
<view class='item' :class='type==="expenditure" ? "on":""' @click='changeType("expenditure")'>支出</view>
<view class='item' :class='type==="income" ? "on":""' @click='changeType("income")'>收入</view>
<view class='item' :class='type==="expenditure" ? "on":""' @click='changeType("expenditure")'>消费</view>
<view class='item' :class='type==="income" ? "on":""' @click='changeType("income")'>充值</view>
</view>
<view class='sign-record'>
<view class='list' v-for="(item,index) in userBillList" :key="index">
<view class='list pad30' v-for="(item,index) in userBillList" :key="index">
<view class='item'>
<view class='data'>{{item.date}}</view>
<view class='listn'>
<view class='listn borRadius14'>
<view class='itemn acea-row row-between-wrapper' v-for="(vo,indexn) in item.list" :key="indexn">
<view>
<view class='name line1'>{{vo.title}}</view>
@@ -31,7 +31,7 @@
</view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
@@ -78,13 +78,7 @@
if (this.isLogin) {
this.getUserBillList();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
/**
@@ -154,6 +148,9 @@
</script>
<style scoped lang='scss'>
.sign-record{
}
.bill-details .nav {
background-color: #fff;
height: 90rpx;
@@ -169,7 +166,7 @@
}
.bill-details .nav .item.on {
color: #e93323;
border-bottom: 3rpx solid #e93323;
color: $theme-color;
border-bottom: 3rpx solid $theme-color;
}
</style>

View File

@@ -108,7 +108,7 @@
</view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
</view>
</template>
@@ -117,8 +117,7 @@
import {
extractCash,
extractBank,
getUserInfo,
brokerageCommission
extractUser
} from '@/api/user.js';
import {
toLogin
@@ -169,8 +168,8 @@
isLogin:{
handler:function(newV,oldV){
if(newV){
this.getUserInfo();
this.getUserExtractBank();
this.getExtractUser();
}
},
deep:true
@@ -178,17 +177,10 @@
},
onLoad() {
if (this.isLogin) {
this.getUserInfo();
this.getUserExtractBank();
//this.getBrokerageCommission();
this.getExtractUser();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
@@ -218,13 +210,12 @@
this.qrcodeUrlZ = "";
},
onLoadFun: function() {
this.getUserInfo();
this.getUserExtractBank();
// this.getBrokerageCommission();
},
getBrokerageCommission: function(){
brokerageCommission().then(res=>{
getExtractUser(){
extractUser().then(res=>{
this.commission = res.data;
this.minPrice = res.data.minPrice;
})
},
// 授权关闭
@@ -234,20 +225,9 @@
getUserExtractBank: function() {
let that = this;
extractBank().then(res => {
let array = res.data.extractBank;
let array = res.data;
array.unshift("请选择银行");
that.$set(that, 'array', array);
that.minPrice = res.data.minPrice;
that.commission = res.data;
});
},
/**
* 获取个人用户信息
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
that.userInfo = res.data;
});
},
swichNav: function(current) {
@@ -256,6 +236,15 @@
bindPickerChange: function(e) {
this.index = e.detail.value;
},
moneyInput(e) {
//正则表达试
e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
//重新赋值给input
this.$nextTick(() => {
this.money= e.target.value
})
},
subCash: function(e) {
let that = this,
value = e.detail.value;
@@ -289,13 +278,15 @@
if (value.money.length == 0) return this.$util.Tips({
title: '请填写提现金额'
});
if (!(/^(\d?)+(\.\d{0,2})?$/.test(value.money))) return this.$util.Tips({
title: '提现金额保留2位小数'
});
if (value.money < that.minPrice) return this.$util.Tips({
title: '提现金额不能低于' + that.minPrice
});
if(this.isCommitted==false){
this.isCommitted=true;
extractCash(value).then(res => {
that.getUserInfo();
return this.$util.Tips({
title: "提现成功",
icon: 'success'
@@ -337,7 +328,7 @@
width: 40rpx;
height: 40rpx;
border-radius: 50%;
border: 2rpx solid #e93323;
border: 2rpx solid $theme-color;
text-align: center;
line-height: 37rpx;
margin: 0 auto 6rpx auto;
@@ -346,9 +337,9 @@
}
.cash-withdrawal .nav .item .iconfont.on {
background-color: #e93323;
background-color: $theme-color;
color: #fff;
border-color: #e93323;
border-color: $theme-color;
}
.cash-withdrawal .nav .item .line {

View File

@@ -1,5 +1,9 @@
<template>
<view>
<view class="navbar acea-row row-around">
<view class="item acea-row row-center-wrapper" :class="{ on: navOn === 'usable' }" @click="onNav('usable')">未使用</view>
<view class="item acea-row row-center-wrapper" :class="{ on: navOn === 'unusable' }" @click="onNav('unusable')">已使用/过期</view>
</view>
<view class='coupon-list' v-if="couponsList.length">
<view class='item acea-row row-center-wrapper' v-for='(item,index) in couponsList' :key="index">
<view class='money' :class="item.validStr==='unusable'||item.validStr==='overdue'||item.validStr==='notStart' ? 'moneyGray' : ''">
@@ -20,13 +24,16 @@
</view>
</view>
</view>
<view class='noCommodity' v-if="!couponsList.length && loading==true">
<view class='loadingicon acea-row row-center-wrapper' v-if="couponsList.length">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
<view class='noCommodity' v-if="!couponsList.length">
<view class='pictrue'>
<image src='../../../static/images/noCoupon.png'></image>
</view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
@@ -68,6 +75,11 @@
return {
couponsList: [],
loading: false,
loadend: false,
loadTitle: '加载更多',//提示语
page: 1,
limit: 20,
navOn: 'usable',
isAuto: false, //没有授权的不会自动授权
isShowAuth: false //是否隐藏授权
};
@@ -87,13 +99,7 @@
if (this.isLogin) {
this.getUseCoupons();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
@@ -107,21 +113,65 @@
authColse: function(e) {
this.isShowAuth = e
},
onNav: function(type) {
this.navOn = type;
this.couponsList = [];
this.page = 1;
this.loadend = false;
this.getUseCoupons();
},
/**
* 获取领取优惠券列表
*/
getUseCoupons: function() {
let that = this;
getUserCoupons({status:0}).then(res => {
that.loading = true;
that.$set(that, 'couponsList', res.data || []);
})
if(this.loadend) return false;
if(this.loading) return false;
getUserCoupons({ page: that.page, limit: that.limit, type: that.navOn}).then(res => {
let list= res.data ? res.data.list : [],loadend=list.length < that.limit;
let couponsList = that.$util.SplitArray(list, that.couponsList);
that.$set(that,'couponsList',couponsList);
that.loadend = loadend;
that.loadTitle = loadend ? '我也是有底线的' : '加载更多';
that.page = that.page + 1;
that.loading = false;
}).catch(err=>{
that.loading = false;
that.loadTitle = '加载更多';
});
}
}
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
this.getUseCoupons();
}
}
</script>
<style>
<style lang="scss" scoped>
.navbar {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 106rpx;
background-color: #FFFFFF;
z-index: 9;
.item {
border-top: 5rpx solid transparent;
border-bottom: 5rpx solid transparent;
font-size: 30rpx;
color: #999999;
&.on {
border-bottom-color: #E93323;
color: #282828;
}
}
}
.money {
display: flex;
flex-direction: column;
@@ -132,6 +182,9 @@
color: #ffffff;
font-size: 24rpx;
}
.coupon-list {
margin-top: 122rpx;
}
.coupon-list .item .text{
height: 100%;
}
@@ -154,4 +207,7 @@
color: #e83323;
margin-right: 12rpx;
}
.noCommodity {
margin-top: 300rpx;
}
</style>

View File

@@ -1,5 +1,12 @@
<template>
<view>
<view class="acea-row row-around nav">
<template v-for="item in navList">
<view :key="item.type" :class="['acea-row', 'row-middle', type === item.type ? 'on' : '']"
@click="setType(item.type)">{{ item.name }}</view>
</template>
</view>
<view style="height: 106rpx;"></view>
<view class='coupon-list' v-if="couponsList.length">
<view class='item acea-row row-center-wrapper' v-for="(item,index) in couponsList" :key="index">
<view class='money' :class='item.isUse ? "moneyGray" : "" '>
@@ -8,30 +15,35 @@
</view>
<view class='text'>
<view class='condition line2'>
<span class='line-title' :class='(item.isUse==true || item.isUse==2)?"gray":""' v-if='item.useType===1'>通用</span>
<span class='line-title' :class='(item.isUse==true || item.isUse==2)?"gray":""' v-else-if='item.useType===3'>品类</span>
<span class='line-title' :class='(item.isUse==true || item.isUse==2)?"gray":""' v-else>商品</span>
<span>{{item.name}}</span>
<span class='line-title' :class='(item.isUse==true || item.isUse==2)?"gray":""'
v-if='item.useType===1'>通用</span>
<span class='line-title' :class='(item.isUse==true || item.isUse==2)?"gray":""'
v-else-if='item.useType===3'>品类</span>
<span class='line-title' :class='(item.isUse==true || item.isUse==2)?"gray":""' v-else>商品</span>
<span>{{item.name}}</span>
</view>
<view class='data acea-row row-between-wrapper'>
<view v-if="item.day>0">领取后{{item.day}}天内可用</view>
<view v-else>{{ item.useStartTimeStr&& item.useEndTimeStr ? item.useStartTimeStr + " - " + item.useEndTimeStr : ""}}</view>
<view v-else>
{{ item.useStartTimeStr&& item.useEndTimeStr ? item.useStartTimeStr + " - " + item.useEndTimeStr : ""}}
</view>
<view class='bnt gray' v-if="item.isUse==true">已领取</view>
<view class='bnt bg-color' v-else @click='getCoupon(item.id,index)'>立即领取</view>
</view>
</view>
</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if="couponsList.length">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
<view class='noCommodity' v-else-if="!couponsList.length && loading==true">
<view class='loadingicon acea-row row-center-wrapper'>
<text class='loading iconfont icon-jiazai'
:hidden='loading==false'></text>{{couponsList.length?loadTitle:''}}
</view>
<view class='noCommodity' v-if="!couponsList.length && isShow && !loading">
<view class='pictrue'>
<image src='../../../static/images/noCoupon.png'></image>
</view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
</view>
</template>
@@ -44,126 +56,186 @@
import {
toLogin
} from '@/libs/login.js';
import {
mapGetters
} from "vuex";
// #ifdef MP
import authorize from '@/components/Authorize';
// #endif
export default {
components: {
// #ifdef MP
authorize
// #endif
},
data() {
return {
couponsList: [],
loading: false,
loadend: false,
loadTitle: '加载更多',//提示语
page: 1,
limit: 20,
isAuto: false, //没有授权的不会自动授权
isShowAuth: false //是否隐藏授权
};
},
computed: mapGetters(['isLogin']),
watch: {
isLogin: {
handler: function(newV, oldV) {
if (newV) {
this.getUseCoupons();
}
import {
mapGetters
} from "vuex";
// #ifdef MP
import authorize from '@/components/Authorize';
// #endif
export default {
components: {
// #ifdef MP
authorize
// #endif
},
data() {
return {
couponsList: [],
loading: false,
loadend: false,
loadTitle: '加载更多', //提示语
page: 1,
limit: 20,
isAuto: false, //没有授权的不会自动授权
isShowAuth: false, //是否隐藏授权
type: 1,
isShow: false,
navList: [{
type: 1,
name: '通用券',
count: 0
},
deep: true
}
},
onLoad(){
if(this.isLogin){
this.getUseCoupons();
}else{
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
this.getUseCoupons();
},
methods: {
onLoadFun(){
this.getUseCoupons();
{
type: 2,
name: '商品券',
count: 0
},
{
type: 3,
name: '品类券',
count: 0
},
],
count: 0
};
},
computed: mapGetters(['isLogin']),
watch: {
isLogin: {
handler: function(newV, oldV) {
if (newV) {
this.getUseCoupons();
}
},
// 授权关闭
authColse:function(e){
this.isShowAuth = e
},
getCoupon:function(id,index){
let that = this;
let list = that.couponsList;
let ids = [];
ids.push(id);
//领取优惠券
setCouponReceive(id).then(function (res) {
list[index].isUse = true;
that.$set(that,'couponsList',list);
that.$util.Tips({ title: '领取成功' });
},function(res){
return that.$util.Tips({title:res});
})
},
/**
* 获取领取优惠券列表
*/
getUseCoupons:function(){
let that=this
if(this.loadend) return false;
if(this.loading) return false;
getCoupons({ page: that.page, limit: that.limit }).then(res=>{
let list=res.data,loadend=list.length < that.limit;
let couponsList = that.$util.SplitArray(list, that.couponsList);
that.$set(that,'couponsList',couponsList);
that.loadend = loadend;
that.loadTitle = loadend ? '我也是有底线的' : '加载更多';
that.page = that.page + 1;
that.loading = false;
}).catch(err=>{
that.loading = false;
that.loadTitle = '加载更多';
});
}
deep: true
}
},
onLoad() {
if (this.isLogin) {
this.getUseCoupons();
} else {
toLogin();
}
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
this.getUseCoupons();
},
methods: {
onLoadFun() {
this.getUseCoupons();
},
// 授权关闭
authColse: function(e) {
this.isShowAuth = e
},
getCoupon: function(id, index) {
let that = this;
let list = that.couponsList;
let ids = [];
ids.push(id);
//领取优惠券
setCouponReceive(id).then(function(res) {
list[index].isUse = true;
that.$set(that, 'couponsList', list);
that.$util.Tips({
title: '领取成功'
});
}, function(res) {
return that.$util.Tips({
title: res
});
})
},
/**
* 获取领取优惠券列表
*/
getUseCoupons: function() {
let that = this
if (that.loadend) return false;
if (that.loading) return false;
that.loading = true;
getCoupons({
page: that.page,
limit: that.limit,
type: that.type
}).then(res => {
let list = res.data,
loadend = list.length < that.limit;
let couponsList = that.$util.SplitArray(list, that.couponsList);
that.$set(that, 'couponsList', couponsList);
that.loadend = loadend;
that.loadTitle = loadend ? '我也是有底线的' : '加载更多';
that.page = that.page + 1;
that.loading = false;
that.isShow = true;
}).catch(err => {
that.loading = false;
that.loadTitle = '加载更多';
});
},
setType: function(type) {
if (this.type !== type) {
this.type = type;
this.couponsList = [];
this.page = 1;
this.loadend = false;
this.getUseCoupons();
}
}
}
}
</script>
<style scoped>
.condition .line-title{
width:90rpx;
padding: 0 10rpx;
box-sizing: border-box;
background:rgba(255,247,247,1);
border:1px solid rgba(232,51,35,1);
opacity:1;
border-radius:20rpx;
font-size:20rpx;
color: #E83323;
margin-right: 12rpx;
.nav {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 106rpx;
background-color: #FFFFFF;
font-size: 30rpx;
color: #999999;
z-index: 9;
}
.condition .line-title.gray{
border-color:#BBB;
color:#bbb;
background-color:#F5F5F5;
.nav .acea-row {
border-top: 5rpx solid transparent;
border-bottom: 5rpx solid transparent;
cursor: pointer;
}
.coupon-list .pic-num{
color: #FFFFFF;
font-size: 24rpx;
.nav .acea-row.on {
border-bottom-color: #E93323;
color: #E93323;
}
.condition .line-title {
width: 90rpx;
padding: 0 10rpx;
box-sizing: border-box;
background: rgba(255, 247, 247, 1);
border: 1px solid rgba(232, 51, 35, 1);
opacity: 1;
border-radius: 20rpx;
font-size: 20rpx;
color: #E83323;
margin-right: 12rpx;
}
.condition .line-title.gray {
border-color: #BBB;
color: #bbb;
background-color: #F5F5F5;
}
.coupon-list .pic-num {
color: #FFFFFF;
font-size: 24rpx;
}
</style>

View File

@@ -1,22 +1,48 @@
<template>
<view>
<view class="hdbj"></view>
<view class='collectionGoods' v-if="collectProductList.length">
<navigator :url='"/pages/goods_details/index?id="+item.id' hover-class='none' class='item acea-row row-between-wrapper'
v-for="(item,index) in collectProductList" :key="index">
<view class='pictrue'>
<image :src="item.image"></image>
<!-- #ifdef H5 || MP-->
<view class='nav acea-row row-between-wrapper'>
<view>当前共 <text class='num font-color'>{{ totals }}</text>件商品</view>
<view class='administrate acea-row row-center-wrapper' @click='manage'>{{ footerswitch ? '管理' : '取消'}}
</view>
<view class='text acea-row row-column-between'>
<view class='name line1'>{{item.storeName}}</view>
<view class='acea-row row-between-wrapper'>
<view class='money font-color'>{{item.price}}</view>
<view class='delete' @click.stop='delCollection(item.id,index)'>删除</view>
</view>
<!-- #endif -->
<view class="list">
<checkbox-group @change="checkboxChange" class="centent">
<view v-for="(item,index) in collectProductList" :key="index" class='item acea-row row-middle'>
<checkbox :value="item.id.toString()" :checked="item.checked" v-if="!footerswitch"
style="margin-right: 10rpx;" />
<navigator :url='"/pages/goods_details/index?id="+item.productId' hover-class='none'
class="acea-row">
<view class='pictrue'>
<image :src="item.image"></image>
</view>
<view>
<view class='name line1'>{{item.storeName}}</view>
<view class='money font-color'>{{item.price}}</view>
</view>
</navigator>
</view>
</view>
</navigator>
</checkbox-group>
</view>
<view class='loadingicon acea-row row-center-wrapper'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
<view v-if="!footerswitch" class='footer acea-row row-between-wrapper'>
<view>
<checkbox-group @change="checkboxAllChange">
<checkbox value="all" :checked="!!isAllSelect" />
<text class='checkAll'>全选</text>
</checkbox-group>
</view>
<view class='button acea-row row-middle'>
<form @submit="delCollectionAll" report-submit='true'>
<button class='bnt cart-color' formType="submit">取消收藏</button>
</form>
</view>
</view>
</view>
<view class='noCommodity' v-else-if="!collectProductList.length && page > 1">
<view class='pictrue'>
@@ -25,7 +51,7 @@
<recommend :hostProduct="hostProduct"></recommend>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
@@ -35,7 +61,7 @@
import {
getCollectUserList,
getProductHot,
collectDel
collectDelete
} from '@/api/store.js';
import {
mapGetters
@@ -58,6 +84,7 @@
},
data() {
return {
footerswitch: true,
hostProduct: [],
loadTitle: '加载更多',
loading: false,
@@ -66,10 +93,14 @@
limit: 8,
page: 1,
isAuto: false, //没有授权的不会自动授权
isShowAuth: false ,//是否隐藏授权
hotScroll:false,
hotPage:1,
hotLimit:10
isShowAuth: false, //是否隐藏授权
hotScroll: false,
hotPage: 1,
hotLimit: 10,
isAllSelect: false, //全选
selectValue: [], //选中的数据
delBtnWidth: 80, //左滑默认宽度
totals: 0
};
},
computed: mapGetters(['isLogin']),
@@ -79,30 +110,88 @@
this.page = 1;
this.collectProductList = [];
this.get_user_collect_product();
this.get_host_product();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
onShow(){
onShow() {
this.loadend = false;
this.page = 1;
this.collectProductList = [];
this.get_user_collect_product();
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
this.get_user_collect_product();
},
methods: {
// #ifdef MP
drawStart(e) {
var touch = e.touches[0];
this.startX = touch.clientX;
},
//触摸滑动
drawMove(e) {
var touch = e.touches[0];
var item = this.collectProductList[e.currentTarget.dataset.index];
var disX = this.startX - touch.clientX;
if (disX >= 20) {
if (disX > this.delBtnWidth) {
disX = this.delBtnWidth;
}
this.$set(this.collectProductList[e.currentTarget.dataset.index], 'right', disX);
} else {
this.$set(this.collectProductList[e.currentTarget.dataset.index], 'right', 0);
}
},
//触摸滑动结束
drawEnd(e) {
var item = this.collectProductList[e.currentTarget.dataset.index];
if (item.right >= this.delBtnWidth / 2) {
this.$set(this.collectProductList[e.currentTarget.dataset.index], 'right', this.delBtnWidth);
} else {
this.$set(this.collectProductList[e.currentTarget.dataset.index], 'right', 0);
}
},
// #endif
manage: function() {
this.footerswitch = !this.footerswitch;
},
checkboxChange: function(event) {
var items = this.collectProductList,
values = event.detail.value;
for (var i = 0, lenI = items.length; i < lenI; ++i) {
const item = items[i]
if (values.includes(item.id.toString())) {
this.$set(item, 'checked', true)
} else {
this.$set(item, 'checked', false)
}
}
this.selectValue = values.toString();
this.isAllSelect = items.length === values.length;
},
checkboxAllChange: function(event) {
let value = event.detail.value;
if (value.length > 0) {
this.setAllSelectValue(1)
} else {
this.setAllSelectValue(0)
}
},
setAllSelectValue: function(status) {
let selectValue = [];
if (this.collectProductList.length > 0) {
this.collectProductList.map(item => {
if (status) {
this.$set(item, 'checked', true)
selectValue.push(item.id);
this.isAllSelect = true;
} else {
this.$set(item, 'checked', false)
this.isAllSelect = false;
}
});
this.selectValue = selectValue.toString();
}
},
/**
* 授权回调
*/
@@ -127,10 +216,16 @@
page: that.page,
limit: that.limit
}).then(res => {
res.data.list.map(item => {
that.$set(item, 'right', 0);
});
that.totals = res.data.total;
let collectProductList = res.data.list;
let loadend = collectProductList.length < that.limit;
that.collectProductList = that.$util.SplitArray(collectProductList, that.collectProductList);
that.collectProductList = that.$util.SplitArray(collectProductList, that
.collectProductList);
that.$set(that, 'collectProductList', that.collectProductList);
if (that.collectProductList.length === 0) that.get_host_product();
that.loadend = loadend;
that.loadTitle = loadend ? '我也是有底线的' : '加载更多';
that.page = that.page + 1;
@@ -144,15 +239,34 @@
* 取消收藏
*/
delCollection: function(id, index) {
let that = this;
collectDel(id).then(res => {
return that.$util.Tips({
this.selectValue = id;
this.del({
ids: this.selectValue.toString()
});
},
delCollectionAll: function() {
if (!this.selectValue || this.selectValue.length == 0) return this.$util.Tips({
title: '请选择商品'
});
this.del({
ids: this.selectValue
});
},
del: function(data) {
collectDelete(data).then(res => {
this.$util.Tips({
title: '取消收藏成功',
icon: 'success'
}, function() {
that.collectProductList.splice(index, 1);
that.$set(that, 'collectProductList', that.collectProductList);
});
// this.collectProductList = this.collectProductList.filter(item=>item!==this.selectValue)
this.collectProductList = [];
this.loadend = false;
this.page = 1;
this.get_user_collect_product();
}).catch(err => {
return this.$util.Tips({
title: err
})
});
},
/**
@@ -160,45 +274,118 @@
*/
get_host_product: function() {
let that = this;
if(that.hotScroll) return
if (that.hotScroll) return
getProductHot(
that.hotPage,
that.hotLimit,
).then(res => {
that.hotPage++
that.hotScroll = res.data.list.length<that.hotLimit
that.hotScroll = res.data.list.length < that.hotLimit
that.hostProduct = that.hostProduct.concat(res.data.list)
});
}
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
this.get_user_collect_product();
this.get_host_product();
}
}
</script>
<style scoped lang="scss">
.hdbj {
width: 100%;
height: 30rpx;
background-color: #f5f5f5;
z-index: 999999;
position: fixed;
top: 0;
}
.order-item {
width: 100%;
display: flex;
position: relative;
align-items: right;
flex-direction: row;
}
.remove {
width: 120rpx;
height: 100%;
background-color: $theme-color;
color: white;
position: absolute;
top: 0;
right: -160rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 24rpx;
}
.collectionGoods {
background-color: #fff;
border-top: 1rpx solid #eee;
.nav {
width: 92%;
height: 90rpx;
background-color: #fff;
padding: 0 24rpx;
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-size: 28rpx;
color: #282828;
position: fixed;
left: 30rpx;
z-index: 5;
top: 30rpx;
border-bottom: 1px solid #EEEEEE;
border-top-left-radius: 14rpx;
border-top-right-radius: 14rpx;
}
.list {
padding: 30rpx;
margin-top: 90rpx;
.name {
width: 434rpx;
margin-bottom: 56rpx;
}
}
.centent {
/* #ifdef H5 || MP */
background-color: #fff;
/* #endif */
border-bottom-left-radius: 14rpx;
border-bottom-right-radius: 14rpx;
}
}
.collectionGoods .item {
margin-left: 30rpx;
padding-right: 30rpx;
border-bottom: 1rpx solid #eee;
background-color: #fff;
padding-left: 24rpx;
height: 180rpx;
margin-bottom: 15rpx;
border-radius: 14rpx;
}
.collectionGoods .item .pictrue {
width: 130rpx;
height: 130rpx;
margin-right: 20rpx;
}
.collectionGoods .item .pictrue image {
width: 100%;
height: 100%;
border-radius: 6rpx;
border-radius: 14rpx;
}
.collectionGoods .item .text {
@@ -232,4 +419,40 @@
padding-top: 1rpx;
border-top: 0;
}
.footer {
z-index: 9;
width: 100%;
height: 96rpx;
background-color: #fff;
position: fixed;
padding: 0 30rpx;
box-sizing: border-box;
border-top: 1rpx solid #eee;
border-bottom: 1px solid #EEEEEE;
/* #ifdef H5 || MP */
bottom: 0rpx;
/* #endif */
/* #ifndef MP */
// bottom: 98rpx;
// bottom: calc(98rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
// bottom: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
/* #endif */
.checkAll {
font-size: 28rpx;
color: #282828;
margin-left: 16rpx;
}
.button .bnt {
font-size: 28rpx;
color: #999;
border-radius: 30rpx;
border: 1px solid #999;
width: 160rpx;
height: 60rpx;
text-align: center;
line-height: 60rpx;
}
}
</style>

View File

@@ -1,39 +1,45 @@
<template>
<view>
<form @submit="formSubmit" report-submit='true'>
<view class='personal-data'>
<view class='list'>
<view class='personal-data pad30'>
<view class='list borRadius14'>
<view class="item acea-row row-between-wrapper">
<view>头像</view>
<view class="pictrue" @click.stop='uploadpic'>
<image :src='userInfo.localPath'></image>
<image :src='newAvatar ? newAvatar : userInfo.avatar'></image>
<image src='../../../static/images/alter.png' class="alter"></image>
</view>
</view>
<view class='item acea-row row-between-wrapper'>
<view>昵称</view>
<view class='input'><input type='text' name='nickname' :value='userInfo.nickname'></input></view>
<view class='input'><input type='text' name='nickname' :value='userInfo.nickname'></input>
</view>
</view>
<view class='item acea-row row-between-wrapper'>
<view>手机号码</view>
<navigator url="/pages/users/user_phone/index" hover-class="none" class="input">
<navigator url="/pages/users/app_login/index" hover-class="none" class="input"
v-if="!userInfo.phone">
点击绑定手机号<text class="iconfont icon-xiangyou"></text>
</navigator>
<navigator url="/pages/users/user_phone/index" hover-class="none" class="input" v-else>
<view class='input acea-row row-between-wrapper'>
<input type='text' disabled='true' name='phone' :value='userInfo.phone' class='id'></input>
<input type='text' disabled='true' name='phone' :value='userInfo.phone'
class='id'></input>
<text class='iconfont icon-xiangyou'></text>
</view>
</navigator>
<!-- <navigator url="/pages/users/user_phone/index" hover-class="none" class="input" v-if="!userInfo.phone">
<!-- <navigator url="/pages/users/user_phone/index" hover-class="none" class="input" v-if="!memberInfo.phone">
点击绑定手机号<text class="iconfont icon-xiangyou"></text>
</navigator>
<view class='input acea-row row-between-wrapper' v-else>
<input type='text' disabled='true' name='phone' :value='userInfo.phone' class='id'></input>
<input type='text' disabled='true' name='phone' :value='memberInfo.phone' class='id'></input>
<text class='iconfont icon-suozi'></text>
</view> -->
</view>
<view class='item acea-row row-between-wrapper'>
<view>ID号</view>
<view class='input acea-row row-between-wrapper'>
<input type='text' :value='userInfo.uid' disabled='true' class='id'></input>
<input type='text' :value='uid' disabled='true' class='id'></input>
<text class='iconfont icon-suozi'></text>
</view>
</view>
@@ -45,7 +51,7 @@
</view>
</view>
<!-- #endif -->
<view class="item acea-row row-between-wrapper" v-if="userInfo.phone && userInfo.userType == 'h5'">
<view class="item acea-row row-between-wrapper" v-if="userInfo.phone">
<view>密码</view>
<navigator url="/pages/users/user_pwd_edit/index" hover-class="none" class="input">
点击修改密码<text class="iconfont icon-xiangyou"></text>
@@ -54,19 +60,19 @@
</view>
<button class='modifyBnt bg-color' formType="submit">保存修改</button>
<!-- #ifdef H5 -->
<view class="logOut cart-color acea-row row-center-wrapper" @click="outLogin" v-if="!this.$wechat.isWeixin()">退出登录</view>
<view class="logOut cart-color acea-row row-center-wrapper" @click="outLogin"
v-if="!this.$wechat.isWeixin()">退出登录</view>
<!-- #endif -->
</view>
</form>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
</view>
</template>
<script>
import {
getUserInfo,
userEdit,
getLogout
} from '@/api/user.js';
@@ -91,44 +97,21 @@
},
data() {
return {
userInfo: {},
memberInfo: {},
loginType: 'h5', //app.globalData.loginType
userIndex: 0,
newAvatar: '',
isAuto: false, //没有授权的不会自动授权
isShowAuth: false //是否隐藏授权
};
},
computed: mapGetters(['isLogin']),
watch: {
isLogin: {
handler: function(newV, oldV) {
if (newV) {
this.getUserInfo();
}
},
deep: true
}
},
computed: mapGetters(['isLogin', 'uid', 'userInfo']),
onLoad() {
if (this.isLogin) {
this.getUserInfo();
} else {
// #ifdef H5 || APP-PLUS
if (!this.isLogin) {
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
/**
* 授权回调
*/
onLoadFun: function() {
this.getUserInfo();
},
// 授权关闭
authColse: function(e) {
this.isShowAuth = e
@@ -151,48 +134,40 @@
let that = this;
if (that.loginType == 'h5') {
uni.showModal({
title: '提示',
content: '确认退出登录?',
success: function (res) {
if (res.confirm) {
getLogout()
.then(res => {
that.$store.commit("LOGOUT");
uni.switchTab({
url: '/pages/index/index'
title: '提示',
content: '确认退出登录?',
success: function(res) {
if (res.confirm) {
getLogout()
.then(res => {
that.$store.commit("LOGOUT");
uni.reLaunch({
url: '/pages/index/index'
});
})
.catch(err => {
console.log(err);
});
})
.catch(err => {
console.log(err);
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
},
/**
* 获取用户详情
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
res.data.localPath = res.data.avatar;
that.$set(that, 'userInfo', res.data);
that.$store.commit("UPDATE_USERINFO", res.data);
that.$store.commit("SETUID", res.data.uid);
});
},
/**
* 上传文件
*
*/
uploadpic: function() {
let that = this;
that.$util.uploadImageOne({url:'user/upload/image',name:'multipart', model:"user", pid:7}, function(res){
that.userInfo.avatar = res.data.url;
that.$set(that.userInfo,'localPath',res.data.localPath);
that.$util.uploadImageOne({
url: 'user/upload/image',
name: 'multipart',
model: "user",
pid: 7
}, function(res) {
that.newAvatar = res.data.url;
});
},
@@ -205,8 +180,12 @@
if (!value.nickname) return that.$util.Tips({
title: '用户姓名不能为空'
});
value.avatar = that.userInfo.avatar;
value.avatar = that.newAvatar?that.newAvatar:that.userInfo.avatar;
userEdit(value).then(res => {
that.$store.commit("changInfo", {
amount1: 'avatar',
amount2: that.newAvatar
});
return that.$util.Tips({
title: '更换头像已成功',
icon: 'success'
@@ -214,8 +193,9 @@
tab: 3,
url: 1
});
}).catch(msg => {
return that.$util.Tips({
return that.$util.Tips({
title: msg || '保存失败,您并没有修改'
}, {
tab: 3,
@@ -249,11 +229,11 @@
padding: 0 30rpx;
position: relative;
border: 2rpx solid #f8f8f8;
box-sizing:border-box;
box-sizing: border-box;
}
.personal-data .wrapper .wrapList .item.on {
border-color: #e93323;
border-color: $theme-color;
border-radius: 20rpx;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArIAAACgCAYAAADw+I85AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6M0QzNkY3NzlCNzJCMTFFOTgyNEU4QzhGQTRFRUY2REQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6M0QzNkY3N0FCNzJCMTFFOTgyNEU4QzhGQTRFRUY2REQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozRDM2Rjc3N0I3MkIxMUU5ODI0RThDOEZBNEVFRjZERCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozRDM2Rjc3OEI3MkIxMUU5ODI0RThDOEZBNEVFRjZERCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pn3rJMAAAArUSURBVHja7N3NXuLIGsDhqigK2Ou+grmEuf/t2fT+bOYKZn9aW5Q6qaQSIoKfoCQ8z29QRBSBzX+q31RiSikAAMDYVF4CAACELAAACFkAABCyAAAIWQAAELIAACBkAQAQsgAAIGQBAEDIAgCAkAUAQMgCAICQBQAAIQsAgJAFAAAhCwAAQhYAACELAABCFgAAhCwAAAhZAACELAAACFkAABCyAAAIWQAAELIAACBkAQAQsgAAIGQBAEDIAgCAkAUAQMgCAICQBQAAIQsAgJAFAAAhCwAAQhYAACELAABCFgAAhCwAAAhZAACELAAACFkAABCyAAAIWQAAELIAACBkAQAQsgAAIGQBAEDIAgCAkAUAQMgCAICQBQAAIQsAgJAFAAAhCwAAQhYAACELAABCFgAAhCwAAAhZAACELAAACFkAABCyAAAIWQAAELIAACBkAQBAyAIAIGQBAEDIAgCAkAUAQMgCAMAJuPQSAABMy79///XaXfJi5qy0YFUuqVzW9eWhvqzK9b1+/vpHyAIAcMjCqxs1tldj/zHl/6oU4rz+ctY2a3tzjO2n0F6tUqobMYZ5fX1V337XBm0MMbX3SuXnvv1peqcBAKYlXl+VSI2lZJuIzSuwi7pUY3/HFPsijYMPcVOps9hG7W19fRVT+50YT6TXvdUAABML2at5V6rdTdfNSmzXquX2FOKTr7trsVvBjeVOISzLyuyfNnNTOIWWFbIAAFNzfd2umjYrsmlWR+i8KuusXbhurudZgTZpU6w/p82Ka0oldJvb47z+cp3HDU5kQVbIAgBMTVwsmzitr1V1ni5C07Pd5EAXtCVlm3BNTfS27dvGbAiDcYPUr9TWvys91jetT2BEVsgCAEwuZOeLJkDr/+Z5sbXdb7UdCIixb9M2WDdjss2n4X274YN2LraJ3fzjeUTh9yk8TyELADC1kM0rsjHVTRpnTYam2I8LNBOuaRO0TbaWbQhidyRYKveLmz0P+vu223ZV8ZWtuYQsAADvD9nlTTMb23/dxelg9TUM4nSzRLvZsSANf274u9uvZnXm/hGyAAAcVHWzzKusl5uDtvq9YtvvpzZJmwGC+GS1tR83iHuGYMuPXtbfF7IAABxWXP7IyVkNT4awGQ/Y7FswHBkIW9e7W1Kfv0/GDKpTeJ5CFgBgapbLPAJQxX5X2DIuEPsdYtsSTak/nKv5Xir7GQxWZNvvlZGC/pReUcgCAHB41c2PnbfHrc+v3bbv61MhZAEAJibmkE1pXRdo9SRDuxXVuJWp3XBsGYDdfL9frx38jub767LVgZAFAOCAIdvsWpBjs5tlHZx4tvmQNhsVdH1bAjYO9pTtrlX9cEJvfQrPU8gCAExMdXOTPz3knQvCk/1iU4iDhO3HCuKT8yK0v6P/mfL9wTFf9W0PpzBvIGQBACYmLm7yOMCqDtB5f6hXak94UFo0lPMklO22ykFfg71mNyu3/ZkUNltz1b+7vYOQBQDgkCG7vMmxmWdkVyGfiWvH3rD9yWeb22O/KVdfuqVy29HZOBwuWKVmbEHIAgBw6JBdLMqKaryLMV3GwRFcqRykVXWt2g0V9KfyimV7rsEEbTkILLbDCXftqIGDvQAAOLTFsjtxwbrOzds6PJcpPT8pQnctlV6N/XlsBwd9lZXcsp/sbZXiuszJClkAAA4rzuclUpsl11UdoXcxxXm709Zg7rUp1fJ13KzKDnbfGhwQFu/qr1fdoGwUsgAAHD5kF32JlhD9E5ots+KiCv0JvAZzr3GzPUGJ235lNo8TpHjbBnF373QSz1PIAgBMLWSvrtoQTf3ga5YP0nqsP89jPgCs7dz2Q4xhu03T5mfuYnNyhTjYzSAE228BALDXv3//9aGf+/mf/5ai3Zy0q4wOrGOIv1NoznEwq0P3sv66yl+XLs0ztfV9wkOO2NieVKFP29SeKqyP2I/+fUIWAIDdZrP+6nDhdDMa0JyZ60+57LvPM9+0CJsfttq6NMetCVkAgIn57pXST0Zr7tOLEqzd552ELAAA3x2u3aV6zw8LWQAAvlKO1Vm5XHzmFwlZAABGE69CFgDgDb5z1vTnr3+m8BLmcL06VnMKWQCAwzRVt9rYHVWf5c2r8g4Bef/WVWi3tZq6WF6L6/DOmVchCwDwdcGWY+0q7N+ZKpa4vSj3y2F7H9ptr9IZvh5CFgDgm+UVx8UHgm0Ye7ehXaUVsEIWAOBLLEq0fTb+lqFdnb0d8WtxXS7fcq4EIQsA8HY5Pmc7bs9jAt0MbJ6HXZe460YLuhna7eDrVjF/j+x1yM9lHo48AytkAQAOY7EnYu9Cu7KadsRtd7DXqtzvqgTgdhTm3z2Gldmq/K0n0ZBCFgDgdd02UkM5UPNK6uMbf0eO2nyQV161XYanq5lX5fZTnpn91jGCfVUNAMB+OdwWOyL2f++I2KHH8rPrrds/cvDYV/XiTWhXkuOp/WEAAOy3axXy944QfY9uNXc7mK9P7Lnnlegf4UT/FV/IAgC8bHukII8HPB7g9z6W3/XSY32nvEK8DKe5SixkAQBecbkVcmlHfH7G9okRYvj+1c/chz9OLKqFLADAO23vUrAKhz0jV7dt10uP+dXhniP2YgxvjpAFANhvO+gejvAYD6885lfJK7D5oK44ljfH9lsAAPttL/o9HuExHl95zK+QdyS4HtubI2QBAPbbXp1cH+Ex1q885rEd4pS7J/F/GQAAvD1sx260EStkAQBelr4gZKtXHvNYlmOOWCELAPCy7X/2P8aBWBevPOYx5JXY2djfHCELALDf9oFYxzi+6PKVxzxGxF5N4c0RsgAA++3a4/WQ4wUxPF8ZfTji85lPJWKFLADAy3JUbp9565DbVF2H52cOWx3puczCCLfYErIAAB93vyM+DzEre7EjLO+P9Bzy+MJyam+MkAUAeNmf8HwngeUnO6raEZapPNYxem85xTdGyAIAvCwH5u2Ohsqnc/3IyuxF+dntDrsNh996K5aIjVN8Y4QsAMDr8tzq/Y6O+hHaA6jeEoqx3PfHjga7D8eZjZ2H42wZdhKcohYA4G1uw+5dBvKc61UJ0XxZh81esFW5zML+HQ9W4fmK7yHMwoR2KBCyAACf8zvs3oc1ltveG473R4rYqvydkyZkAQDeJ4fnQwnFj86ednO3x9pq6zN/m5AFAJiwVYnZbqzgrdGYAzavwu7aCeFQrs6l8YQsAMDH5BC9K5fcVHkmNR9YVQ3CNt8nz8s+DuL3mPJjz8/lDRCyAACf9/AFkfoWZzFSIGQBAF7x89c/Y/pzZ+fWdvaRBQCYhvm5PWEhCwAwftfn2HVCFgBg3GIJ2bMjZAEAxu06nNEBXkIWAGAaujOKnSUhCwAwXme7GitkAQDG66xXY2tJyAIAjNMsnPFqbG0tZAEAxun6zJ+/kAUAGKF8Bq9z77hHIQsAMD5XXoLwIGQBAMYlz8XOzvw1WAcrsgAAo2M1NoRV/iBkAQDGZeYlCPdCFgBgXHK7XYjYZrRAyAIAjMi5r8am+nI3rHoAAITsGNyWmBWyAAAjkncrOOexgjxSsBreIGQBAMbh8oyfew7Y2+0bhSwAgJA9ZQ+7Ivbcyx4AQMietvt9EStkAQDGIc/HntO/pKcSsCtlDwAwbufUbHkV9i4MdifwogAAjNfUdyvIJzhYhcHJDtQ9AMA0TGmsIJVYzZfH0B7M9fiRX/R/AQYA1i4UF+HkevkAAAAASUVORK5CYII=");
background-size: 100% 100%;
@@ -308,7 +288,7 @@
border-radius: 27rpx;
width: 140rpx;
height: 54rpx;
border: 2rpx solid #e93323;
border: 2rpx solid $theme-color;
}
.personal-data .wrapper .wrapList .item .currentBnt {
@@ -323,14 +303,13 @@
}
.personal-data .list {
margin-top: 15rpx;
margin-top: 30rpx;
background-color: #fff;
}
.personal-data .list .item {
padding: 30rpx 30rpx 30rpx 0;
border-bottom: 1rpx solid #f2f2f2;
margin-left: 30rpx;
padding: 24rpx;
font-size: 32rpx;
color: #282828;
}
@@ -355,8 +334,8 @@
height: 100%;
border-radius: 50%;
}
.personal-data .list .item .pictrue .alter{
.personal-data .list .item .pictrue .alter {
width: 30rpx;
height: 30rpx;
border-radius: 50%;

View File

@@ -3,20 +3,20 @@
<view class='integral-details'>
<view class='header'>
<view class='currentScore'>当前积分</view>
<view class="scoreNum">{{userInfo.integral||0}}</view>
<view class="scoreNum">{{integral.integral||0}}</view>
<view class='line'></view>
<view class='nav acea-row'>
<view class='item'>
<view class='num'>{{userInfo.sumIntegral||0}}</view>
<view class='num'>{{integral.sumIntegral||0}}</view>
<view>累计积分</view>
</view>
<view class='item'>
<view class='num'>{{userInfo.deductionIntegral||0}}</view>
<view class='num'>{{integral.deductionIntegral||0}}</view>
<view>累计消费</view>
</view>
<view class='item'>
<view class='num'>{{userInfo.yesterdayIntegral||0}}</view>
<view>今日获得</view>
<view class='num'>{{integral.frozenIntegral||0}}</view>
<view>冻结积分</view>
</view>
</view>
</view>
@@ -29,11 +29,11 @@
<view class='tip acea-row row-middle'><text class='iconfont icon-shuoming'></text>提示积分数值的高低会直接影响您的会员等级</view>
<view class='item acea-row row-between-wrapper' v-for="(item,index) in integralList" :key="index">
<view>
<view class='state'>{{item.mark}}</view>
<view>{{item.add_time}}</view>
<view class='state'>{{item.title}}</view>
<view>{{item.updateTime}}</view>
</view>
<view class='num font-color' v-if="item.pm">+{{item.number}}</view>
<view class='num' v-else>-{{item.number}}</view>
<view class='num font-color' v-if="item.type===1">+{{item.integral}}</view>
<view class='num' v-else>-{{item.integral}}</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if="integralList.length>0">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
@@ -61,13 +61,13 @@
</view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
</view>
</template>
<script>
import { postSignUser, getIntegralList } from '@/api/user.js';
import { postIntegralUser, getIntegralList } from '@/api/user.js';
import {
toLogin
} from '@/libs/login.js';
@@ -100,7 +100,7 @@
page: 1,
limit: 10,
integralList: [],
userInfo:{},
integral:{},
loadend: false,
loading: false,
loadTitle: '加载更多',
@@ -125,13 +125,7 @@
this.getUserInfo();
this.getIntegralList();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
/**
@@ -154,12 +148,8 @@
},
getUserInfo: function() {
let that = this;
postSignUser({
sign: 1,
integral: 1,
all: 1
}).then(function(res) {
that.$set(that,'userInfo',res.data);
postIntegralUser().then(function(res) {
that.$set(that,'integral',res.data);
});
},
@@ -266,7 +256,7 @@
.integral-details .wrapper .nav .item.on {
background-color: #fff;
color: #e93323;
color: $theme-color;
font-weight: bold;
border-radius: 20rpx 0 0 0;
}

View File

@@ -9,22 +9,22 @@
<view>总资产()</view>
<view class='money'>{{statistics.nowMoney || 0}}</view>
</view>
<!-- #ifdef APP-PLUS || H5 -->
<!-- #ifdef H5 -->
<navigator url="/pages/users/user_payment/index" hover-class="none" class='recharge font-color'>充值</navigator>
<!-- #endif -->
<!-- #ifdef MP -->
<view v-if="rechargeSwitch" @click="openSubscribe('/pages/users/user_payment/index')" class='recharge font-color'>充值</view>
<view v-if="userInfo.rechargeSwitch" @click="openSubscribe('/pages/users/user_payment/index')" class='recharge font-color'>充值</view>
<!-- #endif -->
</view>
<view class='cumulative acea-row row-top'>
<!-- #ifdef APP-PLUS || H5 -->
<!-- #ifdef H5 -->
<view class='item'>
<view>累计充值()</view>
<view class='money'>{{statistics.recharge || 0}}</view>
</view>
<!-- #endif -->
<!-- #ifdef MP -->
<view class='item' v-if="rechargeSwitch">
<view class='item' v-if="userInfo.rechargeSwitch">
<view>累计充值()</view>
<view class='money'>{{statistics.recharge || 0}}</view>
</view>
@@ -49,7 +49,7 @@
</view>
<view>消费记录</view>
</navigator>
<navigator class='item' hover-class='none' url='/pages/users/user_bill/index?type=income' v-if="rechargeSwitch">
<navigator class='item' hover-class='none' url='/pages/users/user_bill/index?type=income' v-if="userInfo.rechargeSwitch">
<view class='pictrue'>
<image src='../../../static/images/record3.png'></image>
</view>
@@ -121,7 +121,7 @@
<recommend :hostProduct="hostProduct" v-if="hostProduct.length"></recommend>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
@@ -135,7 +135,6 @@
openRechargeSubscribe
} from '@/utils/SubscribeMessage.js';
import {
getUserInfo,
userActivity,
getuserDalance
} from '@/api/user.js';
@@ -160,10 +159,8 @@
},
data() {
return {
userInfo: {},
hostProduct: [],
isClose: false,
rechargeSwitch: false,
activity: {},
isAuto: false, //没有授权的不会自动授权
isShowAuth: false ,//是否隐藏授权
@@ -173,12 +170,11 @@
hotLimit:10
};
},
computed: mapGetters(['isLogin']),
computed: mapGetters(['isLogin', 'userInfo']),
watch:{
isLogin:{
handler:function(newV,oldV){
if(newV){
this.getUserInfo();
this.get_host_product();
this.get_activity();
this.userDalance();
@@ -189,23 +185,15 @@
},
onLoad() {
if (this.isLogin) {
this.getUserInfo();
this.get_host_product();
this.get_activity();
this.userDalance();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
onLoadFun: function() {
this.getUserInfo();
this.get_host_product();
this.get_activity();
this.userDalance();
@@ -234,16 +222,6 @@
});
},
// #endif
/**
* 获取用户详情
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
that.$set(that, 'userInfo', res.data);
that.rechargeSwitch = res.data.rechargeSwitch;
});
},
/**
* 获取活动可参与否
*/
@@ -278,7 +256,7 @@
<style scoped lang="scss">
.my-account .wrapper {
background-color: #fff;
padding: 32rpx 0 34rpx 0;
padding: 32rpx 0 15rpx 0;
margin-bottom: 14rpx;
}

View File

@@ -4,7 +4,7 @@
<view class="payment-top acea-row row-column row-center-wrapper">
<span class="name">我的余额</span>
<view class="pic">
<span class="pic-font">{{ userinfo.nowMoney || 0 }}</span>
<span class="pic-font">{{ userInfo.nowMoney || 0 }}</span>
</view>
</view>
<view class="payment">
@@ -20,7 +20,7 @@
<view class="pic-number">赠送{{ item.giveMoney }} </view>
</view>
<view class="pic-box pic-box-color acea-row row-center-wrapper" :class="parseFloat(activePic)===parseFloat(picList.length)?'pic-box-color-active':''" @click="picCharge(picList.length)">
<input type="number" placeholder="其他" v-model="money" class="pic-box-money pic-number-pic" :class="parseFloat(activePic) === parseFloat(picList.length) ? 'pic-box-color-active' : ''" />
<input type="number" placeholder="其他" v-model="money" :maxlength="50000" class="pic-box-money pic-number-pic uni-input" :class="parseFloat(activePic) === parseFloat(picList.length) ? 'pic-box-color-active' : ''" />
</view>
<view class="tips-box">
<view class="tips mt-30">注意事项</view>
@@ -34,7 +34,7 @@
name="number"></input></view>
<view class="tips-title">
<view style="font-weight: bold; font-size: 26rpx;">提示</view>
<view style="margin-top: 10rpx;">当前佣金为 <text class='font-color'>{{commission || 0}}</text></view>
<view style="margin-top: 10rpx;">当前佣金为 <text class='font-color'>{{userInfo.brokeragePrice || 0}}</text></view>
</view>
<view class="tips-box">
<view class="tips mt-30">注意事项</view>
@@ -43,11 +43,11 @@
</view>
</view>
</view>
<button class='but bg-color' formType="submit"> {{active ? '立即转入': '立即充值' }}</button>
<button class='but' formType="submit"> {{active ? '立即转入': '立即充值' }}</button>
</view>
</form>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
@@ -55,12 +55,11 @@
<script>
import {
getUserInfo,
rechargeRoutine,
rechargeWechat,
getRechargeApi,
extractBank,
transferIn
transferIn,
appWechat
} from '@/api/user.js';
import { wechatQueryPayResult } from '@/api/order.js';
import {
@@ -87,7 +86,6 @@
navRecharge: ['账户充值', '佣金转入'],
active: 0,
number: '',
userinfo: {},
placeholder: "0.00",
from: '',
isAuto: false, //没有授权的不会自动授权
@@ -97,18 +95,15 @@
money: "",
numberPic: '',
rechar_id: 0,
rechargeAttention: [],
commission: 0
rechargeAttention: []
};
},
computed: mapGetters(['isLogin']),
computed: mapGetters(['isLogin', 'systemPlatform','userInfo']),
watch:{
isLogin:{
handler:function(newV,oldV){
if(newV){
this.getUserInfo();
this.getRecharge();
this.getUserExtractBank();
}
},
deep:true
@@ -116,20 +111,12 @@
},
onLoad(options) {
// #ifdef H5
this.from = this.$wechat.isWeixin() ? "public" : "weixinh5"
this.from = this.$wechat.isWeixin() ? "public" : "weixinh5";
// #endif
if (this.isLogin) {
this.getUserInfo();
this.getRecharge();
this.getUserExtractBank();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
@@ -149,12 +136,6 @@
}
},
getUserExtractBank: function() {
let that = this;
extractBank().then(res => {
that.commission = res.data.commissionCount;
});
},
/**
* 充值额度选择
@@ -178,9 +159,7 @@
onLoadFun: function() {
this.getUserInfo();
this.getRecharge();
this.getUserExtractBank();
},
// 授权关闭
authColse: function(e) {
@@ -189,15 +168,6 @@
navRecharges: function(index) {
this.active = index;
},
/**
* 获取用户信息
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
that.$set(that, 'userinfo', res.data);
})
},
/*
* 用户充值
*/
@@ -219,6 +189,10 @@
transferIn({
price: parseFloat(value)
}).then(res => {
that.$store.commit("changInfo", {
amount1: 'brokeragePrice',
amount2: that.$util.$h.Sub(that.userInfo.brokeragePrice, parseFloat(value))
});
return that.$util.Tips({
title: '转入成功',
icon: 'success'
@@ -254,10 +228,15 @@
title: '充值金额不能为0'
});
}
if (money > 50000) {
return that.$util.Tips({
title: '充值金额最大值为50000'
});
}
} else {
money = this.numberPic
}
// #ifdef MP || APP-PLUS
// #ifdef MP
rechargeRoutine({
price: money,
type: 0,
@@ -272,7 +251,11 @@
signType: jsConfig.signType,
paySign: jsConfig.paySign,
success: function(res) {
that.$set(that, 'userinfo.nowMoney', that.$util.$h.Add(value, that.userinfo.nowMoney));
that.$store.commit("changInfo", {
amount1: 'nowMoney',
amount2: that.$util.$h.Add(value, that.userinfo.nowMoney)
});
//that.$set(that, 'userinfo.nowMoney', that.$util.$h.Add(value, that.userinfo.nowMoney));
return that.$util.Tips({
title: '支付成功',
icon: 'success'
@@ -333,10 +316,12 @@
} else {
that.$wechat.pay(data)
.finally(() => {
that.$set(that, 'userinfo.nowMoney', that.$util.$h.Add(value, that.userinfo.nowMoney));
wechatQueryPayResult({
orderNo: orderNo
}).then(res => {
that.$store.commit("changInfo", {
amount1: 'nowMoney',
amount2: that.$util.$h.Add(value, that.userinfo.nowMoney)
});
// that.$set(that, 'userinfo.nowMoney', that.$util.$h.Add(value, that.userinfo.nowMoney));
wechatQueryPayResult(orderNo).then(res => {
return that.$util.Tips({
title: '支付成功',
icon: 'success'
@@ -383,8 +368,8 @@
background-color: #fff;
border-radius: 10rpx;
padding-top: 25rpx;
border-top-right-radius: 39rpx;
border-top-left-radius: 39rpx;
border-top-right-radius: 14rpx;
border-top-left-radius: 14rpx;
}
.payment .nav {
@@ -446,8 +431,9 @@
font-size: 30rpx;
width: 700rpx;
height: 86rpx;
border-radius: 50rpx;
margin: 46rpx auto 0 auto;
border-radius: 43rpx;
margin: 50rpx auto 0 auto;
background: linear-gradient(90deg, #FF7931 0%, #F11B09 100%);
line-height: 86rpx;
}
@@ -537,4 +523,4 @@
font-size: 24rpx;
color: #333;
}
</style>
</style>

View File

@@ -19,7 +19,7 @@
<button form-type="submit" v-if="!isNew" class="confirmBnt bg-color" @click="editPwd">保存</button>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
</view>
</template>
@@ -71,13 +71,7 @@
// this.$set(this, 'key', res.data.key)
// });
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
@@ -210,7 +204,27 @@
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.shading {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
/* #ifdef APP-VUE */
margin-top: 50rpx;
/* #endif */
/* #ifndef APP-VUE */
margin-top: 200rpx;
/* #endif */
image {
width: 180rpx;
height: 180rpx;
}
}
page {
background-color: #fff !important;
}
@@ -249,7 +263,7 @@
.ChangePassword .list .item .code {
font-size: 32rpx;
background-color: #fff;
// background-color: #fff;
}
.ChangePassword .list .item .code.on {

View File

@@ -21,7 +21,7 @@
</form>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
</view>
</template>
@@ -77,13 +77,7 @@
if (this.isLogin) {
this.getUserInfo();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {

View File

@@ -1,32 +1,35 @@
<template>
<view>
<view class='return-list' v-if="orderList.length">
<view class='goodWrapper' v-for="(item,index) in orderList" :key="index" @click='goOrderDetails(item.storeOrder.orderId)'>
<view class='iconfont icon-tuikuanzhong powder' v-if="item.status.type==-1"></view>
<view class='iconfont icon-yituikuan' v-if="item.status.type==-2"></view>
<view class='orderNum'>订单号{{item.storeOrder.orderId}}</view>
<view class='item acea-row row-between-wrapper' v-for="(item,index) in item.cartInfo" :key="index">
<view class='return-list pad30' v-if="orderList.length">
<view class='goodWrapper borRadius14' v-for="(item,index) in orderList" :key="index" @click='goOrderDetails(item.orderId)'>
<view class='iconfont icon-tuikuanzhong powder' v-if="item.refundStatus==1 || item.refundStatus==3"></view>
<view class='iconfont icon-yituikuan' v-if="item.refundStatus==2"></view>
<view class='orderNum'>订单号{{item.orderId}}</view>
<view class='item acea-row row-between-wrapper' v-for="(items,index) in item.orderInfoList" :key="index">
<view class='pictrue'>
<image :src='item.info.productInfo.image'></image>
<image :src='items.image'></image>
</view>
<view class='text'>
<view class='acea-row row-between-wrapper'>
<view class='name line1'>{{item.info.productInfo.storeName}}</view>
<view class='num'>x {{item.info.cartNum}}</view>
<view class='name line1'>{{items.storeName}}</view>
<view class='num'>x {{items.cartNum}}</view>
</view>
<view class='attr line1' v-if="item.info.productInfo.attrInfo">{{item.info.productInfo.attrInfo.suk}}</view>
<view class='attr line1' v-else>{{item.info.productInfo.storeName}}</view>
<view class='money'>{{item.info.productInfo.price}}</view>
<view class='attr line1' v-if="items.suk">{{items.suk}}</view>
<view class='attr line1' v-else>{{items.storeName}}</view>
<view class='money'>{{items.price}}</view>
</view>
</view>
<view class='totalSum'>{{item.cartInfo.length || 0}}件商品总金额 <text class='font-color price'>{{item.storeOrder.payPrice}}</text></view>
<view class='totalSum'>{{item.totalNum || 0}}件商品总金额 <text class='font-color price'>{{item.payPrice}}</text></view>
</view>
</view>
<view class='loadingicon acea-row row-center-wrapper'>
<view class='loadingicon acea-row row-center-wrapper' v-if="orderList.length">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
<view v-if="orderList.length == 0">
<emptyPage title="暂无订单~"></emptyPage>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
@@ -34,6 +37,7 @@
<script>
import home from '@/components/home';
import emptyPage from '@/components/emptyPage.vue'
import {
getOrderList
} from '@/api/order.js';
@@ -48,6 +52,7 @@
// #endif
export default {
components: {
emptyPage,
home,
// #ifdef MP
authorize
@@ -81,13 +86,7 @@
if (this.isLogin) {
this.getOrderList();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
/**
@@ -130,7 +129,7 @@
page: that.page,
limit: that.limit,
}).then(res => {
let list = res.data || [];
let list = res.data.list || [];
let loadend = list.length < that.limit;
that.orderList = that.$util.SplitArray(list, that.orderList);
that.$set(that,'orderList',that.orderList);
@@ -150,17 +149,17 @@
<style lang="scss" scoped>
.return-list .goodWrapper {
background-color: #fff;
margin-top: 13rpx;
margin-top: 20rpx;
position: relative;
padding: 0rpx 24rpx;
}
.return-list .goodWrapper .orderNum {
padding: 0 30rpx;
border-bottom: 1px solid #eee;
height: 87rpx;
line-height: 87rpx;
font-size: 30rpx;
color: #282828;
color: #333333;
}
.return-list .goodWrapper .item {
@@ -183,7 +182,7 @@
position: absolute;
font-size: 109rpx;
top: 7rpx;
right: 30rpx;
right: 22rpx;
color: #ccc;
}

View File

@@ -12,7 +12,8 @@
<view class='integral acea-row'><text>积分: {{userInfo.integral}}</text></view>
</view>
</view>
<navigator class='right acea-row row-middle' hover-class='none' url='/pages/users/user_sgin_list/index'>
<navigator class='right acea-row row-middle' hover-class='none'
url='/pages/users/user_sgin_list/index'>
<view class='iconfont icon-caidan'></view>
<view>明细</view>
</navigator>
@@ -21,13 +22,18 @@
<view class='wrapper'>
<view class='list acea-row row-between-wrapper'>
<view class='item' v-for="(item,index) in signSystemList" :key="index">
<view :class="(index + 1 === signSystemList.length ? 'reward' : '') + ' ' +(sign_index >= index + 1 ? 'rewardTxt' : '')">{{item.title}}</view>
<view
:class="(index + 1 === signSystemList.length ? 'reward' : '') + ' ' +(sign_index >= index + 1 ? 'rewardTxt' : '')">
{{item.title}}
</view>
<!-- <view :class='(index+1) == signSystemList.length ? "rewardTxt" : ""'>{{item.title}}</view> -->
<view class='venus' :class="(index + 1 === signSystemList.length ? 'reward' : '') + ' ' +(sign_index >= index + 1 ? 'venusSelect' : '')"></view>
<view class='venus'
:class="(index + 1 === signSystemList.length ? 'reward' : '') + ' ' +(sign_index >= index + 1 ? 'venusSelect' : '')">
</view>
<view class='num' :class='item.is_sgin ? "on" : ""'>+{{item.integral}}</view>
</view>
</view>
<button class='but bg-color on' v-if="userInfo.isDaySign">已签到</button>
<button class='but bg-color on' v-if="signInfo.isDaySign">已签到</button>
<form @submit="goSign" report-submit='true' v-else>
<button class='but bg-color' formType="submit">立即签到</button>
</form>
@@ -47,11 +53,12 @@
<view class='item acea-row' v-for="(item,index) in signList" :key="index">
<view>
<view class='name line1'>{{item.title}}</view>
<view class='data'>{{item.add_time}}</view>
<view class='data'>{{item.createDay}}</view>
</view>
<view class='num font-color'>+{{item.number}}</view>
</view>
<view class='loading' @click='goSignList' v-if="signList.length >= 3">点击加载更多<text class='iconfont icon-xiangyou'></text></view>
<view class='loading' @click='goSignList' v-if="signList.length >= 3">点击加载更多<text
class='iconfont icon-xiangyou'></text></view>
</view>
</view>
<view class='signTip acea-row row-center-wrapper' :class='active==true?"on":""'>
@@ -65,7 +72,7 @@
<view class='mask' @touchmove.stop.prevent="false" :hidden='active==false'></view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
</view>
</template>
@@ -98,28 +105,28 @@
data() {
return {
active: false,
userInfo: {},
signCount: [],
signSystemList: [],
signList: [],
signInfo: {}, // 签到
integral: 0,
isAuto: false, //没有授权的不会自动授权
isShowAuth: false, //是否隐藏授权
day: 0,
sign_index: 0
sign_index: 0 //连续签到天数
};
},
computed: mapGetters(['isLogin']),
watch:{
isLogin:{
handler:function(newV,oldV){
if(newV){
computed: mapGetters(['isLogin', 'userInfo']),
watch: {
isLogin: {
handler: function(newV, oldV) {
if (newV) {
this.getUserInfo();
this.getSignSysteam();
this.getSignList();
}
},
deep:true
deep: true
}
},
onLoad() {
@@ -128,13 +135,7 @@
this.getSignSysteam();
this.getSignList();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
@@ -179,8 +180,8 @@
sign: 1
}).then(res => {
res.data.integral = parseInt(res.data.integral);
let sum_sgin_day = res.data.sumSignDay;
that.$set(that, 'userInfo', res.data);
let sum_sgin_day = res.data.sumSignDay; // 连续签到日期
that.$set(that, 'signInfo', res.data);
that.signCount = that.PrefixInteger(sum_sgin_day, 4);
that.sign_index = res.data.signNum;
});
@@ -226,17 +227,23 @@
*/
goSign: function(e) {
let that = this,
sum_sgin_day = that.userInfo.sumSignDay;
if (that.userInfo.isDaySign) return this.$util.Tips({
sum_sgin_day = that.signInfo.sumSignDay;
if (that.signInfo.isDaySign) return this.$util.Tips({
title: '您今日已签到!'
});
setSignIntegral().then(res => {
that.active = true;
that.integral = res.data.integral;
that.sign_index = (that.sign_index + 1) > that.signSystemList.length ? 1 : that.sign_index + 1;
that.sign_index = (that.sign_index + 1) > that.signSystemList.length ? 1 : that
.sign_index + 1;
that.signCount = that.PrefixInteger(sum_sgin_day + 1, 4);
that.$set(that.userInfo, 'isDaySign', true);
that.$set(that.userInfo, 'integral', that.$util.$h.Add(that.userInfo.integral, res.data.integral));
that.$set(that.signInfo, 'isDaySign', true);
// that.$set(that.signInfo, 'integral', that.$util.$h.Add(that.signInfo.integral, res.data
// .integral));
that.$store.commit("changInfo", {
amount1: 'integral',
amount2: that.$util.$h.Add(that.signInfo.integral, res.data.integral)
});
that.getSignList();
}).catch(err => {
return this.$util.Tips({
@@ -539,7 +546,7 @@
color: #eb4331;
width: 260rpx;
height: 76rpx;
background-color: #f8d168;
background: linear-gradient(90deg, #FFCA52 0%, #FE960F 100%);
border-radius: 38rpx;
line-height: 76rpx;
margin: 48rpx auto 0 auto;

View File

@@ -1,14 +1,14 @@
<template>
<view>
<view class='sign-record'>
<view class='list' v-for="(item,index) in signList" :key="index">
<view class='list pad30' v-for="(item,index) in signList" :key="index">
<view class='item'>
<view class='data'>{{item.month}}</view>
<view class='listn'>
<view class='listn borRadius14'>
<view class='itemn acea-row row-between-wrapper' v-for="(itemn,indexn) in item.list" :key="indexn">
<view>
<view class='name line1'>{{itemn.title}}</view>
<view>{{itemn.addTime}}</view>
<view>{{itemn.createDay}}</view>
</view>
<view class='num font-color'>+{{itemn.number}}</view>
</view>
@@ -20,7 +20,7 @@
</view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
</view>
</template>
@@ -65,13 +65,7 @@
if(this.isLogin){
this.getSignMoneList();
}else{
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
onReachBottom: function () {

View File

@@ -1,11 +1,12 @@
<template>
<view style="height: 100%;">
<view class='distribution-posters'>
<swiper :indicator-dots="indicatorDots" :autoplay="autoplay" :circular="circular" :interval="interval" :duration="duration"
@change="bindchange" previous-margin="40px" next-margin="40px">
<swiper :indicator-dots="indicatorDots" :autoplay="autoplay" :circular="circular" :interval="interval"
:duration="duration" @change="bindchange" previous-margin="40px" next-margin="40px">
<block v-for="(item,index) in spreadList" :key="index">
<swiper-item>
<image :src="item.pic" class="slide-image" :class="swiperIndex == index ? 'active' : 'quiet'" mode='aspectFill' />
<image :src="item.pic" class="slide-image" :class="swiperIndex == index ? 'active' : 'quiet'"
mode='aspectFill' />
</swiper-item>
</block>
</swiper>
@@ -21,11 +22,11 @@
<!-- #endif -->
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<view class="canvas" v-if="canvasStatus">
<canvas style="width:750px;height:1190px;" canvas-id="canvasOne"></canvas>
<canvas canvas-id="qrcode" :style="{width: `${qrcodeSize}px`, height: `${qrcodeSize}px`}"/>
<canvas canvas-id="qrcode" :style="{width: `${qrcodeSize}px`, height: `${qrcodeSize}px`}" />
</view>
</view>
</template>
@@ -45,7 +46,9 @@
mapGetters
} from "vuex";
// #ifdef MP
import { base64src } from '@/utils/base64src.js'
import {
base64src
} from '@/utils/base64src.js'
import authorize from '@/components/Authorize';
import {
getQrcode
@@ -72,7 +75,6 @@
duration: 500,
swiperIndex: 0,
spreadList: [],
userInfo: {},
poster: '',
isAuto: false, //没有授权的不会自动授权
isShowAuth: false, //是否隐藏授权
@@ -82,7 +84,7 @@
canvasStatus: true //海报绘图标签
};
},
computed: mapGetters(['isLogin']),
computed: mapGetters(['isLogin', 'uid', 'userInfo']),
watch: {
isLogin: {
handler: function(newV, oldV) {
@@ -95,17 +97,9 @@
},
onLoad() {
if (this.isLogin) {
// // #ifdef H5
this.userSpreadBannerList();
// // #endif
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
/**
@@ -116,12 +110,11 @@
return {
title: this.userInfo.nickname + '-分销海报',
imageUrl: this.spreadList[0].pic,
path: '/pages/index/index?spid=' + this.userInfo.uid,
path: '/pages/index/index?spid=' + this.uid,
};
},
// #endif
onReady() {
},
onReady() {},
methods: {
userSpreadBannerList: function() {
let that = this;
@@ -140,48 +133,60 @@
uni.hideLoading();
});
},
getImageBase64:function(images){
getImageBase64: function(images) {
uni.showLoading({
title: '海报生成中',
mask: true
});
let that = this;
// #ifdef H5
let spreadList = [];
images.forEach((item,index)=>{
imageBase64({url:item.pic}).then(res=>{
spreadList[index] = res.data.code;
that.$set(that,'base64List',spreadList);
let spreadList = []
// 生成一个Promise对象的数组
images.forEach(item => {
const oneApi = imageBase64({
url: item.pic
}).then(res => {
return res.data.code;
})
spreadList.push(oneApi)
})
Promise.all(spreadList).then(result => {
that.$set(that, 'base64List', result);
that.make();
that.setShareInfoStatus();
})
// #endif
// #ifdef MP
this.base64List = images.map(item => {
that.base64List = images.map(item => {
return item.pic
});
// #endif
that.userInfos();
// #ifdef MP
that.getQrcode();
// #endif
},
// 小程序二维码
getQrcode(){
getQrcode() {
let that = this;
let data = {
pid: that.userInfo.uid,
pid: that.uid,
path: 'pages/index/index'
}
let arrImagesUrl = "";
uni.downloadFile({
url: this.base64List[0],
url: this.base64List[0],
success: (res) => {
arrImagesUrl = res.tempFilePath;
}
});
getQrcode(data).then(res=>{
});
getQrcode(data).then(res => {
base64src(res.data.code, res => {
that.PromotionCode = res;
});
setTimeout(() => {
that.PosterCanvas(arrImagesUrl, that.PromotionCode, that.userInfo.nickname, 0);
that.PosterCanvas(arrImagesUrl, that.PromotionCode, that.userInfo.nickname, 0);
}, 300);
}).catch(err => {
uni.hideLoading();
@@ -189,26 +194,28 @@
title: err
});
that.$set(that, 'canvasStatus', false);
//that.getQrcode();
});
},
// 生成二维码;
make() {
let that = this;
let href = location.href.split('/pages')[0];
let href = '';
// #ifdef H5
href = window.location.href.split('/pages')[0];
// #endif
uQRCode.make({
canvasId: 'qrcode',
text: href+'/pages/index/index?spread=' + that.userInfo.uid,
text: href + '/pages/index/index?spread=' + that.uid,
size: this.qrcodeSize,
margin: 10,
success: res => {
that.PromotionCode = res;
setTimeout(() => {
that.PosterCanvas(this.base64List[0], that.PromotionCode, that.userInfo.nickname,0);
that.PosterCanvas(this.base64List[0], that.PromotionCode, that.userInfo
.nickname, 0);
}, 300);
},
complete: (res) => {
},
complete: (res) => {},
fail: res => {
uni.hideLoading();
that.$util.Tips({
@@ -217,7 +224,7 @@
}
})
},
PosterCanvas: function(arrImages, code, nickname,index) {
PosterCanvas: function(arrImages, code, nickname, index) {
let context = uni.createCanvasContext('canvasOne')
context.clearRect(0, 0, 0, 0);
let that = this;
@@ -232,21 +239,23 @@
context.fillText(nickname, 270, 980);
context.fillText('邀请您加入', 270, 1020);
setTimeout(() => {
context.draw(true,function(){
context.draw(true, function() {
uni.canvasToTempFilePath({
destWidth: 750,
destHeight: 1190,
canvasId: 'canvasOne',
fileType: 'jpg',
success: function(res) {
// 在H5平台下tempFilePath 为 base64
uni.hideLoading();
that.spreadList[index].pic = res.tempFilePath;
that.$set(that, 'poster', res.tempFilePath);
that.$set(that, 'canvasStatus', false);
}
destWidth: 750,
destHeight: 1190,
canvasId: 'canvasOne',
fileType: 'jpg',
success: function(res) {
// 在H5平台下tempFilePath 为 base64
uni.hideLoading();
that.spreadList[index].pic = res
.tempFilePath;
that.$set(that, 'poster', res
.tempFilePath);
that.$set(that, 'canvasStatus', false);
}
})
})
})
}, 100);
},
fail: function(err) {
@@ -273,15 +282,16 @@
this.swiperIndex = index;
let arrImagesUrl = "";
uni.downloadFile({
url: base64List[index],
url: base64List[index],
success: (res) => {
arrImagesUrl = res.tempFilePath;
setTimeout(() => {
this.$set(this, 'canvasStatus', true);
this.PosterCanvas(arrImagesUrl, this.PromotionCode, this.userInfo.nickname, index);
this.PosterCanvas(arrImagesUrl, this.PromotionCode, this.userInfo.nickname,
index);
}, 300);
}
});
});
},
// 点击保存海报
savePosterPath: function() {
@@ -327,43 +337,33 @@
}
});
},
userInfos() {
let that = this;
getUserInfo().then(res => {
that.userInfo = res.data;
// #ifdef H5
that.make();
that.setShareInfoStatus();
// #endif
// #ifdef MP
that.getQrcode();
// #endif
})
},
setShareInfoStatus: function() {
if (this.$wechat.isWeixin()) {
let configAppMessage = {
desc: '分销海报',
title: this.userInfo.nickname + '-分销海报',
link: '/pages/index/index?spread=' + this.userInfo.uid,
link: '/pages/index/index?spread=' + this.uid,
imgUrl: this.spreadList[0].pic
};
this.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"], configAppMessage)
this.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"],
configAppMessage)
}
}
}
}
</script>
<style lang="scss">
<style lang="scss" scoped>
page {
background-color: #a3a3a3 !important;
height: 100% !important;
}
.canvas{
.canvas {
position: relative;
}
.distribution-posters{
.distribution-posters {
width: 100%;
height: 100%;
display: flex;
@@ -371,6 +371,7 @@
justify-content: center;
align-items: center;
}
.distribution-posters swiper {
width: 100%;
height: 1000rpx;

View File

@@ -6,25 +6,36 @@
<view>
<view class='name'>{{name}}</view>
<view class='money' v-if="recordType == 4"><text class='num'>{{extractCount}}</text></view>
<view class='money' v-else><text class='num'>{{recordCount}}</text></view>
<view class='money' v-else><text class='num'>{{commissionCount}}</text></view>
</view>
<view class='iconfont icon-jinbi1'></view>
</view>
</view>
<view class='sign-record' v-if="recordType == 4">
<block v-for="(item,index) in recordList" :key="index" v-if="recordList.length>0">
<view class='list'>
<view class='list pad30'>
<view class='item'>
<view class='data'>{{item.date}}</view>
<view class='listn'>
<view class='listn borRadius14'>
<block v-for="(child,indexn) in item.list" :key="indexn">
<view class='itemn acea-row row-between-wrapper'>
<view>
<view class='name line1'>{{child.status === -1 ? '提现失败' : '提现成功'}}<span v-show="child.status === -1" style="font-size: 12px;color: red;">{{'('+child.failMsg+')'}}</span></view>
<view class='name line1'>{{child.status | statusFilter}}</view>
<view>{{child.createTime}}</view>
</view>
<view class='num font-color' v-if="child.status == -1">+{{child.extractPrice}}</view>
<view class='num font-color' v-if="child.status == 1">+{{child.extractPrice}}
</view>
<view class='num' v-else>-{{child.extractPrice}}</view>
<!-- <view>
<view class='name line1'>{{child.status === -1 ? '提现失败' : '提现成功'}}<span
v-show="child.status === -1"
style="font-size: 12px;color: red;">{{'('+child.failMsg+')'}}</span>
</view>
<view>{{child.createTime}}</view>
</view>
<view class='num font-color' v-if="child.status == -1">+{{child.extractPrice}}
</view>
<view class='num' v-else>-{{child.extractPrice}}</view> -->
</view>
</block>
</view>
@@ -37,17 +48,18 @@
</view>
<view class='sign-record' v-else>
<block v-for="(item,index) in recordList" :key="index" v-if="recordList.length>0">
<view class='list'>
<view class='list pad30'>
<view class='item'>
<view class='data'>{{item.date}}</view>
<view class='listn'>
<view class='listn borRadius14'>
<block v-for="(child,indexn) in item.list" :key="indexn">
<view class='itemn acea-row row-between-wrapper'>
<view>
<view class='name line1'>{{child.title}}</view>
<view>{{child.updateTime}}</view>
</view>
<view class='num font-color' v-if="child.type == 1">+{{child.price}}</view>
<view class='num font-color' v-if="child.type == 1">+{{child.price}}
</view>
<view class='num' v-else>-{{child.price}}</view>
</view>
</block>
@@ -56,12 +68,12 @@
</view>
</block>
<view v-if="recordList.length == 0">
<emptyPage title='暂无提现记录~'></emptyPage>
<emptyPage title='暂无佣金记录~'></emptyPage>
</view>
</view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
@@ -70,9 +82,7 @@
<script>
import {
getCommissionInfo,
getSpreadInfo,
getRecordApi,
getCountApi
} from '@/api/user.js';
import {
toLogin
@@ -93,6 +103,16 @@
emptyPage,
home
},
filters: {
statusFilter(status) {
const statusMap = {
'-1': '未通过',
'0': '审核中',
'1': '已提现'
}
return statusMap[status]
}
},
data() {
return {
name: '',
@@ -101,25 +121,20 @@
limit: 10,
recordList: [],
recordType: 0,
recordCount: 0,
status: false,
statuss: false,
isAuto: false, //没有授权的不会自动授权
isShowAuth: false ,//是否隐藏授权
extractCount:0
isShowAuth: false, //是否隐藏授权
extractCount: 0
};
},
computed: mapGetters(['isLogin']),
onLoad(options) {
if (this.isLogin) {
this.type = options.type;
this.extractCount = options.extractCount;
this.commissionCount = options.commissionCount;
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
onShow: function() {
@@ -131,7 +146,6 @@
this.name = '提现总额';
this.recordType = 4;
this.getList();
this.getCount();
} else if (type == 2) {
uni.setNavigationBarTitle({
title: "佣金记录"
@@ -139,7 +153,6 @@
this.name = '佣金明细';
this.recordType = 3;
this.getRecordList();
this.getRecordListCount();
} else {
uni.showToast({
title: '参数错误',
@@ -166,7 +179,6 @@
methods: {
onLoadFun() {
this.getRecordList();
this.getRecordListCount();
},
// 授权关闭
authColse: function(e) {
@@ -176,58 +188,41 @@
let that = this;
let recordList = that.recordList;
let recordListNew = [];
if (that.status == true) return;
if (that.statuss == true) return;
getRecordApi({
page: that.page,
limit: that.limit
}).then(res => {
let len = res.data.list.length;
let recordListData = res.data.list;
let len = res.data.list ? res.data.list.length : 0;
let recordListData = res.data.list || [];
recordListNew = recordList.concat(recordListData);
that.status = that.limit > len;
that.statuss = that.limit > len;
that.page = that.page + 1;
that.$set(that, 'recordList', recordListNew);
});
},
getCount: function() {
let that = this;
if (status == true) return;
getCountApi({
page: that.page,
limit: that.limit
}).then(res => {
that.extractCount = res.data.count;
});
},
getRecordList: function() {
let that = this;
let page = that.page;
let limit = that.limit;
let status = that.status;
let statuss = that.statuss;
let recordType = that.recordType;
let recordList = that.recordList;
let recordListNew = [];
if (status == true) return;
if (statuss == true) return;
getCommissionInfo({
page: page,
limit: limit
}).then(res => {
if(res.data.list){
let len = res.data.list.length;
let recordListData = res.data.list;
if (res.data.list) {
let len = res.data.list ? res.data.list.length : 0;
let recordListData = res.data.list || [];
recordListNew = recordList.concat(recordListData);
that.status = limit > len;
that.statuss = limit > len;
that.page = page + 1;
that.$set(that, 'recordList', recordListNew);
}
});
},
getRecordListCount: function() {
let that = this;
getSpreadInfo().then(res => {
that.recordCount = res.data.commissionCount;
that.extractCount = res.data.extractCount;
});
}
},
onReachBottom: function() {

View File

@@ -4,7 +4,7 @@
<view class="header">
<view class='name acea-row row-center-wrapper'>
<view>当前佣金</view>
<navigator url='/pages/users/user_spread_money/index?type=1' hover-class="none" class='record'>提现记录<text class='iconfont icon-xiangyou'></text></navigator>
<navigator :url="'/pages/users/user_spread_money/index?type=1&extractCount='+spreadInfo.extractCount" hover-class="none" class='record'>提现记录<text class='iconfont icon-xiangyou'></text></navigator>
</view>
<view class='num'>{{spreadInfo.commissionCount}}</view>
<view class='profit acea-row row-between-wrapper'>
@@ -18,7 +18,7 @@
</view>
</view>
</view>
<!-- #ifdef APP-PLUS || H5 -->
<!-- #ifdef H5 -->
<navigator url="/pages/users/user_cash/index" hover-class="none" class='bnt bg-color'>立即提现</navigator>
<!-- #endif -->
<!-- #ifdef MP -->
@@ -33,7 +33,7 @@
<text class='iconfont icon-tongji'></text>
<view>推广人统计</view>
</navigator>
<navigator url='/pages/users/user_spread_money/index?type=2' hover-class="none" class='item acea-row row-center-wrapper row-column'>
<navigator :url="'/pages/users/user_spread_money/index?type=2&commissionCount='+spreadInfo.commissionCount" hover-class="none" class='item acea-row row-center-wrapper row-column'>
<text class='iconfont icon-qiandai'></text>
<view>佣金明细</view>
</navigator>
@@ -52,7 +52,7 @@
</view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
@@ -90,7 +90,7 @@
isLogin: {
handler: function(newV, oldV) {
if (newV) {
this.getUserInfo();
this.getSpreadInfo();
}
},
deep: true
@@ -100,13 +100,7 @@
if (this.isLogin) {
this.getSpreadInfo();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
@@ -213,14 +207,14 @@
}
.my-promotion .list {
padding: 0 20rpx 50rpx 20rpx;
padding: 0 30rpx 50rpx 30rpx;
margin-top: 10rpx;
}
.my-promotion .list .item {
width: 345rpx;
width: 335rpx;
height: 240rpx;
border-radius: 20rpx;
border-radius: 14rpx;
background-color: #fff;
margin-top: 20rpx;
font-size: 30rpx;

View File

@@ -24,12 +24,15 @@
</view>
<view class="acea-row row-around row-middle">
<view class="spotw acea-row row-center" v-for="(item,index) in levelList" :key='index'>
<view class="spot" :class="current >item.experience?'past':'' + ' ' + current==item.experience?'on':''"></view>
<view class="spot"
:class="current >item.experience?'past':'' + ' ' + current==item.experience?'on':''">
</view>
</view>
</view>
</view>
<view class="numList acea-row row-around row-middle">
<view class="item" :class="current >=item.experience?'past':''" v-for="(item,index) in levelList" :key="index">{{item.experience}}</view>
<view class="item" :class="current >=item.experience?'past':''"
v-for="(item,index) in levelList" :key="index">{{item.experience}}</view>
</view>
</view>
<view class="vipList acea-row">
@@ -88,7 +91,8 @@
<view class="info line1">购买商品可获得对应是经验值</view>
</view>
</view>
<navigator url="/pages/goods_cate/goods_cate" class="button" hover-class="none" open-type='switchTab'>去获取</navigator>
<navigator url="/pages/goods_cate/goods_cate" class="button" hover-class="none"
open-type='switchTab'>去获取</navigator>
</view>
<!-- <view class="item acea-row row-between-wrapper">
<view class="picTxt acea-row row-middle">
@@ -128,7 +132,9 @@
<script>
import home from '@/components/home';
import {
getUserInfo,
mapGetters
} from "vuex";
import {
getlevelInfo,
getlevelExpList
} from '@/api/user.js';
@@ -136,9 +142,10 @@
components: {
home
},
computed: mapGetters(['userInfo']),
data() {
return {
userInfo: '',
//userInfo: '',
levelInfo: '',
levelList: [],
current: 0,
@@ -151,35 +158,19 @@
expList: []
};
},
onShow() {
this.getUserInfo();
onLoad() {
this.levelInfo = this.userInfo.experience;
this.getInfo();
this.getlevelList();
},
methods: {
/**
* 获取个人用户信息
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
that.$store.commit("SETUID", res.data.uid);
that.$store.commit("UPDATE_USERINFO", res.data);
that.userInfo = res.data;
that.levelInfo = res.data.experience;
}).catch(function(res) {
return that.$util.Tips({
title: res
});
})
},
getInfo: function() {
let that = this;
getlevelInfo().then(res => {
let levelList = res.data.list;
let levelList = res.data;
let list = []
that.levelList = levelList;
levelList.forEach((item, index) => {
levelList.map((item, index) => {
if (item.experience <= that.levelInfo) {
list.push(item.experience)
}
@@ -187,7 +178,8 @@
let maxn = Math.max.apply(null, list);
that.current = maxn;
// 解决len取的值没有时
let levelListLen = levelList[list.length] ? levelList[list.length] : levelList[list.length - 1];
let levelListLen = levelList[list.length] ? levelList[list.length] : levelList[list
.length - 1];
// 解决除数不能为0
let divisor = levelListLen.experience - maxn ? levelListLen.experience - maxn : 1;
// 每小格所占的百分比
@@ -266,11 +258,13 @@
}
.vip {
padding: 2rpx 8rpx;
padding: 6rpx 18rpx;
border: 1px solid rgba(250, 226, 193, 1);
border-radius: 20rpx;
font-size: 18rpx;
margin-left: 15rpx;
display: flex;
align-items: center;
image {
width: 20rpx;
@@ -293,7 +287,7 @@
border-radius: 23rpx;
padding: 22rpx 27rpx;
box-sizing: border-box;
.title {
font-size: 24rpx;
color: #AE8B4A;
@@ -307,12 +301,15 @@
.axis {
margin: 10rpx 0 15rpx 0;
overflow: hidden;
overflow: hidden;
.bar {
width: 630rpx;
.spotw{
.spotw {
width: 96rpx;
}
.barCon {
width: 100%;
height: 3rpx;
@@ -485,7 +482,7 @@
.item {
height: 122rpx;
border-bottom: 1px solid #EEEEEE;
.text {
.name {
font-size: 28rpx;
@@ -500,10 +497,11 @@
.num {
font-size: 32rpx;
color: #16AC57;
color: $theme-color;
}
.on{
color: #E93323;
.on {
color: #16AC57;
}
}
}

View File

@@ -0,0 +1,37 @@
<template>
<web-view class="web-view" :webview-styles="webviewStyles" :src="url" :style="{width: windowW + 'px', height: windowH + 'px'}"></web-view>
</template>
<script>
import {
mapGetters
} from "vuex";
export default {
//computed: mapGetters(['chatUrl']),
data() {
return {
windowH: 0,
windowW: 0,
webviewStyles: {
progress: {
color: 'transparent'
}
},
url: ''
}
},
onLoad(option) {
if(option.webUel) this.url = option.webUel;
uni.setNavigationBarTitle({
title: option.title
})
try {
const res = uni.getSystemInfoSync();
this.windowW = res.windowWidth;
this.windowH = res.windowHeight;
} catch (e) {
// error
}
}
}
</script>

View File

@@ -21,7 +21,7 @@
<button hover-class="none" @click="wechatLogin" class="bg-green btn1">微信登录</button>
<!-- #endif -->
<!-- #ifdef MP -->
<button hover-class="none" open-type="getUserInfo" @getuserinfo="setUserInfo" class="bg-green btn1">微信登录</button>
<button hover-class="none" @tap="getUserProfile" class="bg-green btn1">微信登录</button>
<!-- #endif -->
<!-- <button hover-class="none" @click="isUp = true" class="btn2">手机号登录</button> -->
</view>
@@ -30,7 +30,8 @@
<mobileLogin :isUp="isUp" @close="maskClose" :authKey="authKey" @wechatPhone="wechatPhone"></mobileLogin>
</block>
<block v-if="isPhoneBox">
<routinePhone :logoUrl="logoUrl" :isPhoneBox="isPhoneBox" @close="bindPhoneClose" :authKey="authKey"></routinePhone>
<routinePhone :logoUrl="logoUrl" :isPhoneBox="isPhoneBox" @close="bindPhoneClose" :authKey="authKey">
</routinePhone>
</block>
</view>
</template>
@@ -45,9 +46,7 @@
} from "vuex";
import {
getLogo,
silenceAuth,
getUserPhone,
wechatAuthV2
getUserPhone
} from '@/api/public';
import {
LOGO_URL,
@@ -80,12 +79,7 @@
mobileLogin,
routinePhone
},
computed: mapGetters({
'authorizeType': 'authorizeType'
}),
onLoad(options) {
console.log('options',options)
if (this.authorizeType === 'register') this.isPhoneBox = true
getLogo().then(res => {
this.logoUrl = res.data.logoUrl
})
@@ -93,7 +87,8 @@
// #ifdef H5
document.body.addEventListener("focusout", () => {
setTimeout(() => {
const scrollHeight = document.documentElement.scrollTop || document.body.scrollTop || 0;
const scrollHeight = document.documentElement.scrollTop || document.body.scrollTop ||
0;
window.scrollTo(0, Math.max(scrollHeight - 1, 0));
}, 100);
});
@@ -103,39 +98,31 @@
scope
} = options;
this.options = options
console.log('lalaal',this.options)
// 获取确认授权code
this.code = code || ''
if(!code) location.replace(decodeURIComponent(decodeURIComponent(option.query.back_url)));
//if(!code) location.replace(decodeURIComponent(decodeURIComponent(option.query.back_url)));
if (code && this.options.scope !== 'snsapi_base') {
let spread = app.globalData.spid ? app.globalData.spid : 0;
//公众号授权登录回调 wechatAuth(code, Cache.get("spread"), loginType)
wechat.auth(code, spread).then(res => {
console.log('进来的授权',res)
if (res.type === 'register') {
this.authKey = res.key;
console.log('authKey',this.authKey)
this.isUp = true
this.authKey = res.key;
this.isUp = true
}
if(res.type === 'login'){
// let time = res.data.expires_time - this.$Cache.time();
if (res.type === 'login') {
this.$store.commit('LOGIN', {
token: res.data.token,
// time: time
token: res.token
});
// this.$store.commit('SETUID', res.data.userInfo.uid);
// this.$store.commit('UPDATE_USERINFO', res.data.userInfo);
this.$store.commit("SETUID", res.uid);
this.getUserInfo();
this.wechatPhone();
//location.replace(decodeURIComponent(decodeURIComponent(option.query.back_url)));
}
}).catch(error => {
});
}).catch(error => {});
}
// #endif
let pages = getCurrentPages();
console.log('数据库1',pages)
// let prePage = pages[pages.length - 2];
// console.log('数据库',prePage)
// if (prePage.route == 'pages/order_addcart/order_addcart') {
// this.isHome = true
// } else {
@@ -191,20 +178,15 @@
encryptedData: encryptedData,
iv: iv,
code: code,
spid: app.globalData.spid,
spread: app.globalData.code,
type: 'routine',
key: this.authKey
})
.then(res => {
let time = res.data.expires_time - this.$Cache.time();
this.$store.commit('LOGIN', {
token: res.data.token,
time: time
token: res.data.token
});
this.userInfo = res.data.userInfo
this.$store.commit("SETUID", res.data.userInfo.uid);
this.$store.commit("UPDATE_USERINFO", res.data.userInfo);
this.$store.commit("SETUID", res.data.uid);
this.getUserInfo();
this.$util.Tips({
title: '登录成功',
icon: 'success'
@@ -216,8 +198,8 @@
.catch(res => {
uni.hideLoading();
that.$util.Tips({
title: res
});
title: res
});
});
},
/**
@@ -228,7 +210,6 @@
getUserInfo().then(res => {
uni.hideLoading();
that.userInfo = res.data
that.$store.commit("SETUID", res.data.uid);
that.$store.commit("UPDATE_USERINFO", res.data);
that.$util.Tips({
title: '登录成功',
@@ -238,63 +219,19 @@
})
});
},
setUserInfo(e) {
getUserProfile() {
let self = this;
uni.showLoading({
title: '正在登录中'
});
Routine.getCode()
.then(code => {
this.getWxUser(code);
})
.catch(res => {
uni.hideLoading();
});
},
getWxUser(code) {
let self = this
Routine.getUserInfo()
Routine.getUserProfile()
.then(res => {
console.log('res1',res);
let userInfo = res.userInfo;
userInfo.code = code;
userInfo.spread_spid = app.globalData.spid;//获取推广人ID
userInfo.spread_code = app.globalData.code;//获取推广人分享二维码ID
userInfo.avatar = userInfo.userInfo.avatarUrl;
userInfo.city = userInfo.userInfo.city;
userInfo.country = userInfo.userInfo.country;
userInfo.nickName = userInfo.userInfo.nickName;
userInfo.province = userInfo.userInfo.province;
userInfo.sex = userInfo.userInfo.gender;
userInfo.type = 'routine'
Routine.authUserInfo(userInfo.code, userInfo)
.then(res => {
console.log(res)
self.authKey = res.data.key;
if (res.data.type === 'register') {
uni.hideLoading();
self.isPhoneBox = true
} else {
uni.hideLoading();
let time = res.data.expires_time - self.$Cache.time();
self.$store.commit('LOGIN', {
token: res.data.token,
time: time
});
self.$util.Tips({
title: res,
icon: 'success'
}, {
tab: 3
})
}
Routine.getCode()
.then(code => {
self.getWxUser(code, res);
})
.catch(res => {
uni.hideLoading();
uni.showToast({
title: res,
icon: 'none',
duration: 2000
});
});
})
.catch(res => {
@@ -302,6 +239,52 @@
});
},
getWxUser(code, res) {
let self = this
let userInfo = res.userInfo;
userInfo.code = code;
userInfo.spread_spid = app.globalData.spid; //获取推广人ID
userInfo.spread_code = app.globalData.code; //获取推广人分享二维码ID
userInfo.avatar = userInfo.userInfo.avatarUrl;
userInfo.city = userInfo.userInfo.city;
userInfo.country = userInfo.userInfo.country;
userInfo.nickName = userInfo.userInfo.nickName;
userInfo.province = userInfo.userInfo.province;
userInfo.sex = userInfo.userInfo.gender;
userInfo.type = 'routine'
Routine.authUserInfo(userInfo.code, userInfo)
.then(res => {
self.authKey = res.data.key;
if (res.data.type === 'register') {
uni.hideLoading();
self.isPhoneBox = true
}
if (res.data.type === 'login') {
uni.hideLoading();
self.$store.commit('LOGIN', {
token: res.data.token
});
self.$store.commit("SETUID", res.data.uid);
self.getUserInfo();
self.$util.Tips({
title: res,
icon: 'success'
}, {
tab: 3
})
}
})
.catch(res => {
uni.hideLoading();
uni.showToast({
title: res,
icon: 'none',
duration: 2000
});
});
},
// #endif
// #ifdef H5
@@ -321,50 +304,34 @@
},
// 公众号登录
wechatLogin() {
console.log('微信登录',this.code)
console.log('微信登录2',this.options.code)
console.log('微信登录3',this.authKey)
console.log('isUp2',this.isUp)
if (!this.code && this.options.scope !== 'snsapi_base') {
this.$wechat.oAuth('snsapi_userinfo', '/pages/users/wechat_login/index');
} else {
console.log('isUp',this.isUp)
// if (this.authKey) {
// this.isUp = true;
// }
this.isUp = true;
}
// wechat.auth(this.code, this.$Cache.get("spread")).then(res => {
// if (res.data.type === 'register') {
// this.authKey = res.data.key;
// this.isUp = true
// }
// if(res.data.type === 'login'){
// let time = res.data.expires_time - this.$Cache.time();
// this.$store.commit('LOGIN', {
// token: res.data.token,
// time: time
// });
// this.$store.commit('SETUID', res.data.userInfo.uid);
// this.$store.commit('UPDATE_USERINFO', res.data.userInfo);
// // location.replace(decodeURIComponent(decodeURIComponent(option.query.back_url)));
// }
// }).catch(error => {
// // location.replace("/");
// });
},
// 输入手机号后的回调
wechatPhone() {
this.$Cache.clear('snsapiKey');
if (this.options.back_url) {
let url = uni.getStorageSync('snRouter')
let self = this
let url = uni.getStorageSync('snRouter');
url = url.indexOf('/pages/index/index') != -1 ? '/' : url;
if (url.indexOf('/pages/users/wechat_login/index') !== -1) {
url = '/';
}
if (!url) {
url = '/pages/index/index';
}
this.isUp = false
uni.showToast({
title: '登录成功',
icon: 'none'
})
setTimeout(res => {
location.href = url.indexOf("/pages/index/index") != -1 ? '/' : url
location.href = url
}, 800)
} else {
uni.navigateBack()
@@ -378,10 +345,12 @@
<style lang="scss">
page {
background: #fff;
height: 100%;
}
.page {
background: #fff;
height: 100%;
}
.wechat_login {