This commit is contained in:
ghusermoon 2020-08-03 18:38:04 +08:00
parent 0bc6be9b9f
commit d54a378a9e
12 changed files with 193 additions and 82 deletions

View File

@ -396,6 +396,10 @@ export default {
articleCollectList() {
return vm.$u.post('article/articleCollectList');
},
// 关注用户列表
attentionMemberList() {
return vm.$u.post('member/attentionMemberList');
},
}
}
}

View File

@ -15,11 +15,11 @@
<view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40 && goods.goods_spec">
<text v-for="(spec, index) in goods.goods_spec" :key="index">{{ spec + ';' }}</text>
</view>
<!-- <view class="goods-time u-line-1" v-if="order.order_state == 10 || order.order_state == 10">结束时间{{ order.add_time * 1000 | date('yyyy-mm-dd hh:MM') }}</view> -->
<view class="goods-time u-line-1" v-if="order.view_type == 1">结束时间{{ order.end_time | date('yyyy-mm-dd hh:MM') }}</view>
<view class="goods-price u-line-1" v-if="order.order_state == 20 || order.order_state == 40">总价{{ goods.goods_price }}实付款{{ goods.goods_pay_price }}</view>
<view class="goods-date" v-if="order.order_state == 20 || order.order_state == 40">
<image src="@/pageE/static/mine/26.png"></image>
<view>{{ order.add_time | date }}</view>
<view>{{ order.add_time | date('yyyy-mm-dd hh:MM') }}</view>
</view>
</view>
</view>

View File

@ -201,7 +201,8 @@ export default {
showSpec: false, //
goodsNumber: 1,
sel: "", //
quanxuan: false, //
quanxuan: false, //
debounce: true,
}
},
components: {
@ -224,6 +225,7 @@ export default {
this.setTitle();
},
onShow() {
this.debounce = true;
this.showSpec = false;
this.showGroupUser = false;
this.showInvolvementUser = false;
@ -235,34 +237,6 @@ export default {
clearInterval(this.timer);
},
methods: {
// init() {
// this.id = this.$store.state.goods_id;
// this.type = this.$store.getters.getGoodsType;
// const info = this.$store.getters.getGoodsInfo;
// //
// if(this.type == 2) {
// this.user_suc = info.user_suc;
// this.groupUser = info.user;
// this.pintuan_id = info.pintuan_id;
// }
// //
// if (this.type == 3) {
// this.groupbuyInfo = this.$store.state.groupbuyInfo;
// this.setSpikeTime();
// }
// // console.log(this.groupbuyInfo);
// this.goodsInfo = info.goods;
// //
// let list = [];
// info.goods_image[0].forEach(item => {
// let temp = {
// image: item
// }
// list.push(temp);
// })
// this.list = list;
// this.setTitle();
// },
setSwiperList(list) {
let img = [];
list.forEach(item => {
@ -331,7 +305,7 @@ export default {
break;
}
},
//
//
ordinaryDetails(id) {
this.$u.api.getGoodsDetails({ id: id }).then((res)=>{
if (res.errCode == 0) {
@ -343,7 +317,7 @@ export default {
}
})
},
//
//
pinTuanDetails(id) {
this.$u.api.getPinTuanDetails({
pintuan_id: id
@ -358,7 +332,7 @@ export default {
}
})
},
//
//
spikeGoodsDetails(id) {
this.$u.api.getSpikeInfo({
groupbuy_id: id
@ -388,6 +362,8 @@ export default {
* @params {Number} ifcart 结算方式 1:购物车 0:直接结算立即购买/拼团/秒杀
**/
settlementOrder({type, num = this.goodsNumber, ifcart = 0} = {}) {
if(!this.debounce) return;
this.debounce = false;
let params = {
ifcart: ifcart,
cart_id: [this.goodsInfo.goods_id + '|' + num],
@ -413,6 +389,8 @@ export default {
this.$u.route({
url: '/pageC/cart/ConfirmOrder'
})
} else {
this.debounce = true;
}
})
},

View File

@ -124,7 +124,7 @@ export default {
return true;
},
chooseDate(e) {
let time = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute;
let time = e.year + '/' + e.month + '/' + e.day + ' ' + e.hour + ':' + e.minute;
this.time = time;
},
confirmBtn() {

View File

@ -122,6 +122,7 @@ export default {
choiceCoupon: {}, // 使
goodsClass: [],
orderType: '', // 1 2 3 4 5
debounce: true,
}
},
components: {
@ -153,6 +154,7 @@ export default {
this.setTotalPrice();
},
onShow() {
this.debounce = true;
this.storeCoupon = {};
this.choiceCoupon = {};
//
@ -189,11 +191,14 @@ export default {
if(res.errCode == 0) {
this.sendOrder(0);
} else {
this.debounce = true;
this.$u.toast(res.message);
}
})
},
intermediate() {
if(!this.debounce) return;
this.debounce = false;
if(this.orderType == 2) {
this.withImmediate();
} else if(this.orderType == 1) {
@ -258,6 +263,7 @@ export default {
}
})
} else {
this.debounce = true;
this.$u.toast(res.message);
}
})

View File

@ -1,58 +1,77 @@
<template>
<view class="concerns">
<u-index-list :scrollTop="scrollTop">
<view v-for="(item, index) in indexList" :key="index">
<u-index-anchor :index="item" class="anchor-class" />
<view class="list-cell">
<image src="../static/mine/23.png"></image>
<view>阿迪达斯</view>
</view>
<view class="list-cell">
列表2
</view>
<view class="list-cell">
列表3
<view>
<view v-for="(info, index) in list" :key="index">
<view class="daren-item" @click="toDetailsPage">
<image class="head" :src="info.member_avatar"></image>
<text class="name">{{ info.member_nickname }}</text>
<text class="zhuangtai">状态: {{ info.live_status == 1 ? '正在直播' : '未开播' }}</text>
<view class="guanzhu" @click="changeType(info.member_id)" v-if="info.is_attention == 1">关注</view>
<view class="guanzhu action" @click="changeType(info.member_id)" v-else >未关注</view>
</view>
</view>
</u-index-list>
</view>
</view>
</template>
<script>
export default {
data() {
return {
scrollTop: 0,
indexList: ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
list: [
{
member_avatar: '',
member_nickname: '111',
live_status: 0,
member_id: 1,
is_attention: 1,
}
]
}
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
}
};
</script>
<style lang="scss" scoped>
.concerns {
// padding: 35rpx 30rpx 0;
// .u-index-anchor {
// background-color: #ffffff !important;
// }
.list-cell {
.daren-item{
width: 215rpx;
height: 282rpx;
display: flex;
box-sizing: border-box;
flex-direction: column;
align-items: center;
width: 100%;
background-color: #fff;
border-radius: 10rpx;
overflow: hidden;
margin: 50rpx 0;
padding: 0 30rpx;
> image {
width: 70rpx;
height: 70rpx;
border-radius: 10rpx;
margin-right: 30rpx;
.head{
width: 80rpx;
height: 80rpx;
border-radius: 50%;
margin-top: 24rpx;
background-color: #0f0;
}
> view {
font-size: 30rpx;
color: rgba(102,102,102,1);
.name{
font-size: 26rpx;
color: #333;
font-weight: 400;
margin-top: 23rpx;
}
.zhuangtai{
font-size:22rpx;
color: #999;
margin-top: 19rpx;
}
.guanzhu{
width: 130rpx;
height: 50rpx;
background-color: #FF780F;
font-size: 26rpx;
line-height: 50rpx;
color: #fff;
text-align: center;
margin-top: 19rpx;
border-radius: 25rpx;
}
.action{
background: #f3f3f3;
}
}
}

View File

@ -11,6 +11,7 @@
</view>
<view class="exp-value">经验值<span>{{ memberInfo.member_exppoints }}</span></view>
<view class="distance">距离下一级还需要{{ memberInfo.member_exppoints | residualExp(rank[memberInfo.member_level - 1]) }}经验值</view>
<!-- <view class="distance">距离下一级还需要{{ memberInfo.next_grade_exppoints_diff }}经验值</view> -->
</view>
<view class="body">
<view class="title">
@ -24,6 +25,9 @@
</view>
</view>
</view>
<!-- <view class="body">
<u-parse :html="memberInfo.grade_rule"></u-parse>
</view> -->
</view>
</template>
<script>

View File

@ -1,7 +1,7 @@
<template>
<view class="write-complaints">
<view class="main-container">
<textarea auto-height placeholder="发表您的意见吧,我们会做得更好." maxlength="200" v-model="text" />
<textarea auto-height placeholder="发表您的意见吧,我们会做得更好" maxlength="200" v-model="text" />
<u-upload
ref="uUpload"
:custom-btn="true"
@ -12,6 +12,7 @@
:form-data="formData"
:name="name"
@on-uploaded="setImageList"
@on-error="uploadError"
>
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image src="../static/mine/27.png"></image>
@ -37,12 +38,21 @@ export default {
name: 'common', //
},
imageList: [],
debounce: true,
}
},
onShow() {
this.debounce = true;
},
methods: {
submit() {
if(!this.debounce) return;
this.debounce = false;
this.$refs.uUpload.upload();
},
uploadError() {
this.debounce = true;
},
setImageList(lists) {
// console.log(lists);
let imageList = [];
@ -78,6 +88,7 @@ export default {
}
})
} else {
this.debounce = true;
this.$u.toast(res.message);
}
})

View File

@ -3,7 +3,7 @@
<view class="status" v-if="state">
<view class="text">
<view class="status-text">{{ s_object[state].text }}</view>
<view class="time" v-if="orderInfo.view_type == 1">结束时间{{ orderInfo.end_time }}</view>
<view class="time" v-if="orderInfo.view_type == 1">距离结束{{ countdown }}</view>
</view>
<image :src="s_object[state].image"></image>
</view>
@ -116,6 +116,9 @@ export default {
},
orderInfo: {},
oid: '',
timer: '',
countdown: '', //
isSpike: false, //
}
},
onLoad(option) {
@ -126,7 +129,10 @@ export default {
//
onPullDownRefresh() {
this.getOrderInfo(this.oid);
},
},
beforeDestroy() {
clearInterval(this.timer);
},
methods: {
viewState(value) {
let state;
@ -154,12 +160,43 @@ export default {
}
this.state = state;
},
setSpikeTime(time) {
// console.log(time);
this.timer = setInterval(() => {
let spikeTime = time * 1000 - new Date().getTime();
// console.log(spikeTime);
if(spikeTime <= 0) {
this.isSpike = true;
this.spikeTime = '00:00:00'
clearInterval(this.timer);
return false;
};
//
const days = Math.floor(spikeTime/(24*3600*1000));
//
const leave1 = spikeTime % (24*3600*1000) //
let hours = Math.floor(leave1/(3600*1000));
//
const leave2 = leave1 % (3600*1000) //
let minutes = Math.floor(leave2 / (60*1000))
//
const leave3 = leave2 % (60*1000) //
let seconds = Math.round(leave3 / 1000)
//
hours = days * 24 + hours;
if(hours < 10) hours = '0' + hours;
if(minutes < 10) minutes = '0' + minutes;
if(seconds < 10) seconds = '0' + seconds;
this.countdown = hours + ':' + minutes + ':' + seconds;
}, 1000)
},
getOrderInfo(id) {
this.$u.api.getOrderInfo({
order_id: id,
}).then(res => {
if(res.errCode == 0) {
this.orderInfo = res.data;
this.setSpikeTime(res.data.end_time);
this.viewState(this.orderInfo.view_type);
this.setTitle(this.orderInfo.view_type);
}

View File

@ -123,6 +123,9 @@ export default {
}
}
},
onPullDownRefresh() {
this.sendLaundryOrderList();
},
onShow() {
this.current = 0;
this.swiperCurrent = 0;
@ -137,6 +140,7 @@ export default {
type: type,
page: this.page,
})
uni.stopPullDownRefresh();
this.timer = false;
if(res.errCode == 0) {
// this.orderList = res.data.list;

View File

@ -1,7 +1,7 @@
<template>
<view class="wash-order">
<view>
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88" ></u-tabs-swiper>
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88"></u-tabs-swiper>
</view>
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
<swiper-item class="swiper-item">
@ -144,7 +144,7 @@
<view class="wash-btn" @click="submitImage">确认送洗</view>
</swiper-item>
</swiper>
<u-select v-model="showClothesType" :list="typeList" value-name="id" label-name="name" @confirm="confirmType" :safe-area-inset-bottom="true" mode="single-column"></u-select>
<u-select v-model="showClothesType" :list="typeList" value-name="id" label-name="name" @confirm="confirmType" mode="single-column"></u-select>
<u-select v-model="showAddress"
mode="mutil-column-auto"
:list="areaList"
@ -243,9 +243,11 @@ export default {
uformData: {
name: 'common', //
},
debounce: true,
}
},
onShow() {
this.debounce = true;
this.current = 0;
this.swiperCurrent = 0;
this.showPopup = false;
@ -269,7 +271,7 @@ export default {
})
},
confirmType(e) {
// console.log(e[0]);
console.log(e);
this.type = e[0];
},
async getOrderList({ load = 'reload' } = {}) {
@ -285,22 +287,22 @@ export default {
return res;
},
submitImage() {
// this.$refs.uUpload.upload();
if(!this.debounce) return;
this.debounce = false;
this.current == 0 ? this.$refs.platform.upload() : this.$refs.physical.upload();
// this.confirmSend();
},
tabsChange(index) {
this.swiperCurrent = index;
},
setImageList(lists) {
console.log(lists);
// console.log(lists);
let imageList = [];
lists.forEach(res => {
if(res.response.errCode == 0) imageList.push(res.response.data.file_name);
})
// console.log(imageList);
this.filesArr = imageList;
console.log(this.filesArr);
// console.log(this.filesArr);
this.confirmSend();
},
validationParams() {
@ -372,6 +374,11 @@ export default {
// console.log(params);
this.$u.api.sendLaundrySave(params).then(res => {
this.$u.toast(res.message);
if(res.errCode == 0) {
} else {
this.debounce = true;
}
})
},
radioChange(e){
@ -412,6 +419,8 @@ export default {
})
},
animationfinish(e) {
//
this.debounce = true;
let current = e.detail.current;
this.swiperCurrent = current;
this.current = current;

View File

@ -109,7 +109,16 @@
"navigationBarTitleText": "商品详情",
"app-plus":{
"titleNView":{
"backgroundColor":"#ffffff"
"backgroundColor":"#ffffff",
"buttons": [
{
"type":"none",
"text":"\ue636",
"float":"right",
"fontSize":"18",
"fontSrc": "/static/fonts/cart.ttf"
}
]
}
}
}
@ -131,7 +140,16 @@
"navigationBarTitleText": "商品评价",
"app-plus":{
"titleNView":{
"backgroundColor":"#ffffff"
"backgroundColor":"#ffffff",
"buttons": [
{
"type":"none",
"text":"\ue636",
"float":"right",
"fontSize":"18",
"fontSrc": "/static/fonts/cart.ttf"
}
]
}
}
}
@ -237,6 +255,7 @@
{
"path": "cart/index",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "购物车",
"app-plus": {
"titleSize": "36px",
@ -604,6 +623,7 @@
{
"path": "tool/Manicure",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "美甲",
"app-plus": {
"titleSize": "36px",
@ -630,6 +650,7 @@
{
"path": "tool/SendWash",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "送洗",
"app-plus": {
"titleSize": "36px",
@ -640,6 +661,19 @@
}
}
},
{
"path": "tool/washComment",
"style": {
"navigationBarTitleText": "送洗评价",
"app-plus": {
"titleSize": "36px",
"titleNView": {
"titleColor": "#333333",
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "tool/WashOrder",
"style": {
@ -696,6 +730,7 @@
{
"path": "mine/MineConcerns",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "我的关注",
"app-plus": {
"titleSize": "36px",
@ -833,6 +868,7 @@
{
"path": "order/Index",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "我的订单",
"app-plus": {
"titleSize": "36px",
@ -846,6 +882,7 @@
{
"path": "order/Details",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "订单详情",
"app-plus": {
"titleSize": "36px",
@ -905,6 +942,7 @@
{
"path": "pages/index/index",
"style": {
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
},
@ -928,6 +966,7 @@
{
"path": "pages/mine/index",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "我的",
"app-plus": {
"titleSize": "36px",