Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp
commit
e8d3b3decb
|
@ -1 +0,0 @@
|
|||
qSyvBPhDsPdxvOhC
|
|
@ -2,8 +2,8 @@
|
|||
"name" : "lili商城",
|
||||
"appid" : "__UNI__83F0C3D",
|
||||
"description" : "",
|
||||
"versionName" : "4.2.4.1",
|
||||
"versionCode" : 4000241,
|
||||
"versionName" : "4.2.5",
|
||||
"versionCode" : 4000250,
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
"compatible" : {
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
<template>
|
||||
<view class="myTracks">
|
||||
<u-navbar title="我的足迹">
|
||||
<div @click="changeRightBtn" slot="right" style="margin-right:32rpx">
|
||||
{{edit}}
|
||||
</div>
|
||||
|
||||
</u-navbar>
|
||||
<u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty>
|
||||
<div v-else>
|
||||
|
||||
|
||||
|
||||
<view v-for="(item, index) in trackList" :key="index">
|
||||
<view class="myTracks-title" @click="navgaiteToStore(item)">{{item.storeName}}</view>
|
||||
<view class="myTracks-items">
|
||||
|
||||
<u-swipe-action style="width: 100%;" :show="item.show" :index="index" :key="item.id" @click="delTracks"
|
||||
@open="open" :options="options">
|
||||
<view class="myTracks-item">
|
||||
<u-checkbox-group>
|
||||
<u-checkbox v-model="item.___isDel" v-if="editFlag" active-color="#ff6b35" style="margin-right: 10rpx"
|
||||
@change="changeChecked(item)"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<view class="myTracks-item-img" @click.stop="navgaiteToDetail(item)">
|
||||
<image :src="item.thumbnail"></image>
|
||||
</view>
|
||||
|
@ -28,41 +28,27 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-swipe-action>
|
||||
|
||||
</view>
|
||||
<view class="myTracks-divider"></view>
|
||||
|
||||
</view>
|
||||
<uni-load-more :status="loadStatus"></uni-load-more>
|
||||
</div>
|
||||
<view v-if="editFlag">
|
||||
<view class="myTracks-action">
|
||||
<view class="myTracks-action-check">
|
||||
<u-checkbox-group>
|
||||
<u-checkbox v-model="allChecked" v-if="editFlag" active-color="#ff6b35" style="margin-right: 10rpx"
|
||||
@change="checkedAllitem"></u-checkbox>
|
||||
全选
|
||||
</u-checkbox-group>
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<u-button type="warning" @click="delAllTracks" class="myTracks-action-btn">
|
||||
删除
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { myTrackList, deleteHistoryListId } from "@/api/members.js";
|
||||
import {
|
||||
myTrackList,
|
||||
deleteHistoryListId
|
||||
} from "@/api/members.js";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
edit: "编辑",
|
||||
editFlag: false, //是否编辑
|
||||
allChecked: false, //是否全选
|
||||
loadStatus: "more", //底部下拉加载状态
|
||||
whetherEmpty: false, //是否数据为空
|
||||
params: {
|
||||
|
@ -71,7 +57,14 @@ export default {
|
|||
order: "desc",
|
||||
sort: "updateTime",
|
||||
},
|
||||
|
||||
options: [
|
||||
{
|
||||
text: '删除',
|
||||
style: {
|
||||
backgroundColor: '#dd524d'
|
||||
}
|
||||
}
|
||||
],
|
||||
trackList: [], //足迹列表
|
||||
};
|
||||
},
|
||||
|
@ -101,35 +94,14 @@ export default {
|
|||
url: "/pages/product/shopPage?id=" + val.storeId,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 设置右侧导航栏文本
|
||||
*/
|
||||
setStyle(text) {
|
||||
//导航按钮文本设置
|
||||
let pages = getCurrentPages();
|
||||
let page = pages[pages.length - 1];
|
||||
// #ifdef APP-PLUS
|
||||
let currentWebview = page.$getAppWebview();
|
||||
let titleNView = currentWebview.getStyle().titleNView;
|
||||
titleNView.buttons[0].text = text;
|
||||
if (text == "完成") {
|
||||
this.trackList.forEach((key) => {
|
||||
key.history.forEach((item) => {
|
||||
this.$set(item, "___isDel", false);
|
||||
});
|
||||
});
|
||||
}
|
||||
currentWebview.setStyle({
|
||||
titleNView: titleNView,
|
||||
});
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
// h5 临时方案
|
||||
document.getElementsByClassName("uni-btn-icon")[1].innerText = text;
|
||||
// #endif
|
||||
open(index) {
|
||||
// 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
|
||||
// 原本为'false',再次设置为'false'会无效
|
||||
this.trackList[index].show = true;
|
||||
this.trackList.map((val, idx) => {
|
||||
if (index != idx) this.trackList[idx].show = false;
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 跳转详情
|
||||
*/
|
||||
|
@ -152,7 +124,7 @@ export default {
|
|||
if (res.statusCode == 200) {
|
||||
res.data.result &&
|
||||
res.data.result.forEach((item) => {
|
||||
item.___isDel = false;
|
||||
item.show = false;
|
||||
});
|
||||
|
||||
let data = res.data.result;
|
||||
|
@ -169,61 +141,14 @@ export default {
|
|||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 点击后判断是不是全选
|
||||
*/
|
||||
|
||||
changeChecked(val) {
|
||||
var opt = null;
|
||||
const isCheckedAll = this.trackList.every((key) => {
|
||||
key.___isDel == val.___isDel;
|
||||
opt = key.___isDel;
|
||||
return opt;
|
||||
});
|
||||
if(opt){
|
||||
this.allChecked = isCheckedAll;
|
||||
}else{
|
||||
this.allChecked = false;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 右侧标签栏切换
|
||||
*/
|
||||
changeRightBtn(e) {
|
||||
if (!this.editFlag) {
|
||||
this.edit = "完成";
|
||||
} else {
|
||||
this.edit = "编辑";
|
||||
}
|
||||
this.editFlag = !this.editFlag;
|
||||
},
|
||||
|
||||
/**
|
||||
* 点击全选按钮
|
||||
*/
|
||||
checkedAllitem() {
|
||||
//全选按钮
|
||||
this.trackList.forEach((key) => {
|
||||
this.$set(key, "___isDel", this.allChecked);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除足迹
|
||||
*/
|
||||
delAllTracks() {
|
||||
let way = [];
|
||||
this.trackList.forEach((key) => {
|
||||
if (key.___isDel) {
|
||||
way.push(key.goodsId);
|
||||
}
|
||||
});
|
||||
if (way.length == 0) return false;
|
||||
deleteHistoryListId(way).then((res) => {
|
||||
delTracks(index) {
|
||||
deleteHistoryListId(this.trackList[index].goodsId).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
this.trackList = [];
|
||||
this.allChecked = false;
|
||||
this.getList();
|
||||
} else {
|
||||
uni.showToast({
|
||||
|
@ -285,6 +210,7 @@ export default {
|
|||
.myTracks-item-img {
|
||||
margin-right: 20rpx;
|
||||
border-radius: 8rpx;
|
||||
|
||||
image {
|
||||
width: 130rpx;
|
||||
height: 130rpx;
|
||||
|
@ -307,6 +233,7 @@ export default {
|
|||
color: $light-color;
|
||||
padding: 10rpx 0 0 0;
|
||||
}
|
||||
|
||||
.myTracks-action {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
@clear="submitSearchOrderList(current)"
|
||||
@custom="submitSearchOrderList(current)"
|
||||
v-model="orderSn"
|
||||
></u-search>
|
||||
>
|
||||
</u-search>
|
||||
</div>
|
||||
<scroll-view class="body-view" scroll-y @scrolltolower="renderDate">
|
||||
<view
|
||||
|
@ -60,79 +61,78 @@
|
|||
<view>x{{ sku.num }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-view u-flex u-row-between">
|
||||
<view class="description">
|
||||
<!-- 售后申请 -->
|
||||
<view v-if="current === 0 && order.groupAfterSaleStatus">
|
||||
<view
|
||||
v-if="
|
||||
current === 0 &&
|
||||
order.groupAfterSaleStatus &&
|
||||
order.groupAfterSaleStatus.includes('ALREADY_APPLIED')
|
||||
"
|
||||
class="cannot_apply"
|
||||
v-if="order.groupAfterSaleStatus.includes('ALREADY_APPLIED')"
|
||||
class="cannot_apply not_center"
|
||||
>
|
||||
<u-icon class="icon" name="info-circle-fill"></u-icon>
|
||||
该商品已申请售后服务
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="current === 0 && order.groupAfterSaleStatus">
|
||||
<view
|
||||
class="cannot_apply"
|
||||
v-if="
|
||||
current === 0 &&
|
||||
order.groupAfterSaleStatus &&
|
||||
order.groupAfterSaleStatus.includes('EXPIRED')
|
||||
"
|
||||
v-if="order.groupAfterSaleStatus.includes('EXPIRED')"
|
||||
class="cannot_apply not_center"
|
||||
@click="tipsShow = true"
|
||||
>
|
||||
<u-icon class="icon" name="info-circle-fill"></u-icon>
|
||||
该商品无法申请售后
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<div v-if="current === 1 || current === 2">
|
||||
<!-- 申请中 -->
|
||||
<view
|
||||
class="cannot_apply"
|
||||
class="cannot_apply not_center"
|
||||
v-if="order.serviceType == 'RETURN_GOODS'"
|
||||
>
|
||||
退货处理-{{ order.serviceStatus | serviceStatusList }}</view
|
||||
>
|
||||
<view
|
||||
class="cannot_apply"
|
||||
class="cannot_apply not_center"
|
||||
v-if="order.serviceType == 'SUPPLY_AGAIN_GOODS'"
|
||||
>
|
||||
补发商品-{{ order.serviceStatus | serviceStatusList }}</view
|
||||
>
|
||||
<view
|
||||
class="cannot_apply"
|
||||
class="cannot_apply not_center"
|
||||
v-if="order.serviceType == 'RETURN_MONEY'"
|
||||
>
|
||||
退款-{{ order.serviceStatus | serviceStatusList }}</view
|
||||
>
|
||||
<view
|
||||
class="cannot_apply"
|
||||
class="cannot_apply not_center"
|
||||
v-if="order.serviceType == 'EXCHANGE_GOODS'"
|
||||
>
|
||||
换货-{{ order.serviceStatus | serviceStatusList }}</view
|
||||
>
|
||||
<view class="cannot_apply" v-if="order.serviceType == 'CANCEL'">
|
||||
<view
|
||||
class="cannot_apply not_center"
|
||||
v-if="order.serviceType == 'CANCEL'"
|
||||
>
|
||||
取消订单-{{ order.serviceStatus | serviceStatusList }}</view
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- 申请记录 -->
|
||||
</view>
|
||||
<view class="btn-view u-flex u-row-right">
|
||||
<!-- 售后申请 -->
|
||||
|
||||
<div class="sale" v-if="current === 0 && sku.afterSaleStatus">
|
||||
<div
|
||||
v-if="
|
||||
current === 0 &&
|
||||
sku.afterSaleStatus &&
|
||||
(sku.afterSaleStatus.includes('NOT_APPLIED') ||
|
||||
sku.afterSaleStatus.includes('PART_AFTER_SALE'))
|
||||
sku.afterSaleStatus.includes('NOT_APPLIED') ||
|
||||
sku.afterSaleStatus.includes('PART_AFTER_SALE')
|
||||
"
|
||||
@click="applyService(sku.sn, order, sku)"
|
||||
class="sale"
|
||||
>
|
||||
<view class="default-btn border"> 申请售后 </view>
|
||||
</div>
|
||||
</div>
|
||||
<view class="after-line">
|
||||
<!-- 申请中 -->
|
||||
<view
|
||||
|
@ -229,7 +229,7 @@ export default {
|
|||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
sort: "createTime",
|
||||
flowPrice: 1,
|
||||
flowPrice: 0,
|
||||
order: "desc",
|
||||
},
|
||||
|
||||
|
@ -404,6 +404,10 @@ export default {
|
|||
*/
|
||||
onExpress(order, sku) {
|
||||
sku.storeName = order.storeName;
|
||||
let data = {
|
||||
...order,
|
||||
...sku,
|
||||
};
|
||||
|
||||
storage.setAfterSaleData(data);
|
||||
uni.navigateTo({
|
||||
|
@ -458,31 +462,38 @@ page,
|
|||
overflow-y: auto;
|
||||
height: calc(100vh - 44px - 80rpx - 104rpx);
|
||||
}
|
||||
|
||||
.u-tabs-search {
|
||||
padding: 20rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.countMoney {
|
||||
margin-left: 7rpx;
|
||||
color: $main-color;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.seller-view {
|
||||
background-color: #fff;
|
||||
margin: 20rpx 0rpx;
|
||||
padding: 0rpx 20rpx;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.seller-info {
|
||||
height: 70rpx;
|
||||
|
||||
.seller-name {
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
.name {
|
||||
margin-left: 15rpx;
|
||||
margin-top: -2rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.order-sn {
|
||||
font-size: 22rpx;
|
||||
color: #909399;
|
||||
|
@ -526,6 +537,7 @@ page,
|
|||
color: $main-color;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-view {
|
||||
padding: 16rpx 0;
|
||||
|
||||
|
@ -535,10 +547,12 @@ page,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.description {
|
||||
color: #909399;
|
||||
size: 25rpx;
|
||||
}
|
||||
|
||||
.cannot_apply {
|
||||
text-align: center;
|
||||
font-size: 22rpx;
|
||||
|
@ -547,6 +561,10 @@ page,
|
|||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
}
|
||||
.not_center {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.icon {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
@ -556,6 +574,7 @@ page,
|
|||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.default-btn {
|
||||
background-color: #ffffff;
|
||||
margin-left: 15rpx;
|
||||
|
@ -566,9 +585,11 @@ page,
|
|||
padding: 0 24rpx;
|
||||
border-radius: 200px;
|
||||
}
|
||||
|
||||
.close {
|
||||
color: $light-color;
|
||||
}
|
||||
|
||||
.border {
|
||||
border: 2rpx solid $light-color;
|
||||
color: $light-color;
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
shape="circle"
|
||||
class="cancel-btn"
|
||||
size="mini"
|
||||
v-if="order.groupAfterSaleStatus.includes('NOT_APPLIED')"
|
||||
v-if="order.groupAfterSaleStatus && order.groupAfterSaleStatus.includes('NOT_APPLIED')"
|
||||
@click="applyService(order)"
|
||||
>
|
||||
退款/售后
|
||||
|
|
|
@ -159,7 +159,7 @@ export default {
|
|||
let recommendLives = await getLiveList(this.recommendParams);
|
||||
if (recommendLives.data.success) {
|
||||
// 推荐直播间
|
||||
if (recommendLives.data.result.records.length != 0) {
|
||||
if (recommendLives.data.result.records.length ) {
|
||||
this.status = "loadmore";
|
||||
this.recommendLives = recommendLives.data.result.records;
|
||||
} else {
|
||||
|
@ -172,7 +172,7 @@ export default {
|
|||
* 2.如果没有直播间设置一个默认图片
|
||||
*/
|
||||
|
||||
if (this.recommendLives.length == 0) {
|
||||
if (!this.recommendLives.length) {
|
||||
if (this.liveList[0].shareImg) {
|
||||
this.$set(this, "swiperImg", [
|
||||
{
|
||||
|
@ -199,7 +199,7 @@ export default {
|
|||
let res = await getLiveList(this.params[this.current]);
|
||||
// 直播间
|
||||
if (res.data.success) {
|
||||
if (res.data.result.records.length != 0) {
|
||||
if (res.data.result.records.length ) {
|
||||
this.status = "loadmore";
|
||||
this.liveList.push(...res.data.result.records);
|
||||
} else {
|
||||
|
@ -211,7 +211,7 @@ export default {
|
|||
? (this.status = "loadmore")
|
||||
: (this.status = "noMore");
|
||||
|
||||
console.log(this.status);
|
||||
|
||||
this.liveList.forEach((item) => {
|
||||
if (item.roomGoodsList) {
|
||||
item.roomGoodsList = JSON.parse(item.roomGoodsList);
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
<view class="goods-row" :class="{ invalid: isInvalid(skuItem) }">
|
||||
<view class="goods-config">
|
||||
<view>
|
||||
<u-checkbox-group v-if="skuItem.invalid == 0">
|
||||
<u-checkbox-group v-if="skuItem.invalid == 0 && !skuItem.errorMessage">
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<u-checkbox shape="circle" :active-color="lightColor" class="c-left" v-model="skuItem.checked"
|
||||
@change="checkboxChange(skuItem)"></u-checkbox>
|
||||
|
@ -99,7 +99,7 @@
|
|||
>
|
||||
<div class="promotions-item-seckill" v-if="getPromotion(skuItem).includes('SECKILL')">
|
||||
距秒杀结束: <u-count-down show-border :hide-zero-day="true" :color="$mainColor" border-color="#ededed"
|
||||
font-size="24" :timestamp="getCountDownTime(seckill.endTime)">
|
||||
font-size="24" :timestamp="getCountDownTime(skuItem)">
|
||||
</u-count-down>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -110,7 +110,9 @@
|
|||
预估到手价 ¥<span>{{ formatPrice(skuItem.priceDetailDTO.flowPrice)[0]}}</span>
|
||||
<span>.{{ formatPrice(skuItem.priceDetailDTO.flowPrice)[1] }} </span>
|
||||
</div>
|
||||
|
||||
<div style='margin-left: 20rpx;' v-if="!skuItem.checked && skuItem.errorMessage">
|
||||
{{skuItem.errorMessage}}
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
</u-swipe-action>
|
||||
|
@ -192,8 +194,8 @@ export default {
|
|||
},
|
||||
],
|
||||
isInvalid(val) {
|
||||
//是否无效商品
|
||||
if (val.invalid == 1) {
|
||||
//是否无效商品/没库存商品
|
||||
if (val.invalid == 1 || (!val.checked && val.errorMessage)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -239,9 +241,12 @@ export default {
|
|||
* 倒数计时
|
||||
*/
|
||||
getCountDownTime(val) {
|
||||
let date = new Date(val.replace(/-/g, "/"));
|
||||
let timeSimple = new Date(date).getTime() / 1000;
|
||||
return timeSimple - new Date().getTime() / 1000;
|
||||
if (val.promotionMap) {
|
||||
let key = Object.keys(val.promotionMap).find((child, index) => {
|
||||
return child.split("-")[0] == 'SECKILL'
|
||||
});
|
||||
return val.promotionMap[key].endTime / 1000 - (new Date().getTime() / 1000)
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -854,7 +854,7 @@ function downloadPopup(data, callback, cancelCallback, rebootCallback) {
|
|||
export default function (isPrompt = false) {
|
||||
getCurrentNo((version) => {
|
||||
getServerNo((res) => {
|
||||
if (res.versionCode.replace(/\./g, "") <= version.versionCode) {
|
||||
if (res.versionCode.replace(/\./g, "") <= version.version) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue