tijiao
This commit is contained in:
@@ -189,7 +189,7 @@ export default {
|
||||
// 获取精选商品
|
||||
this.$http
|
||||
.post(
|
||||
`book/shopproduct/appGetList?limit=${this.limit}&page=${this.page}&istop=${this.istop}`
|
||||
`book/shopproduct/appGetList?limit=${this.limit}&page=${this.page}&istop=${this.istop}`,
|
||||
)
|
||||
.then((res) => {
|
||||
this.goodsList = res.page.list;
|
||||
|
||||
@@ -121,7 +121,7 @@ export default {
|
||||
"?page=" +
|
||||
this.shopScreen.page +
|
||||
"&limit=" +
|
||||
this.shopScreen.limit
|
||||
this.shopScreen.limit,
|
||||
)
|
||||
.then((res) => {
|
||||
this.totalPage = res.page.totalPage;
|
||||
@@ -178,7 +178,7 @@ export default {
|
||||
"?page=" +
|
||||
this.shopScreen.page +
|
||||
"&limit=" +
|
||||
this.shopScreen.limit
|
||||
this.shopScreen.limit,
|
||||
)
|
||||
.then((res) => {
|
||||
this.shopList = res.page.list;
|
||||
|
||||
@@ -560,12 +560,12 @@ export default {
|
||||
.replace(/width:[^;]+;/gi, "max-width:100%;")
|
||||
.replace(/width:[^;]+;/gi, "max-width:100%;");
|
||||
return match;
|
||||
}
|
||||
},
|
||||
);
|
||||
newContent = newContent.replace(/<br[^>]*\/>/gi, "");
|
||||
newContent = newContent.replace(
|
||||
/\<img/gi,
|
||||
'<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"'
|
||||
'<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"',
|
||||
);
|
||||
return newContent;
|
||||
},
|
||||
@@ -607,12 +607,12 @@ export default {
|
||||
.replace(/width:[^;]+;/gi, "max-width:100%;")
|
||||
.replace(/width:[^;]+;/gi, "max-width:100%;");
|
||||
return match;
|
||||
}
|
||||
},
|
||||
);
|
||||
newContent = newContent.replace(/<br[^>]*\/>/gi, "");
|
||||
newContent = newContent.replace(
|
||||
/\<img/gi,
|
||||
'<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"'
|
||||
'<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"',
|
||||
);
|
||||
return newContent;
|
||||
},
|
||||
|
||||
@@ -1025,7 +1025,7 @@ export default {
|
||||
.replace(/width:[^;]+;/gi, "max-width:100%;")
|
||||
.replace(/width:[^;]+;/gi, "max-width:100%;");
|
||||
return match;
|
||||
}
|
||||
},
|
||||
);
|
||||
// newContent = newContent.replace(/<img[^>]*>/gi, function(match, capture) {
|
||||
// match = match.replace(/<img[^>]*>/gi, "@click='1111'").replace(/<img[^>]*>/gi, "@click='1111'");
|
||||
@@ -1034,7 +1034,7 @@ export default {
|
||||
newContent = newContent.replace(/<br[^>]*\/>/gi, "");
|
||||
newContent = newContent.replace(
|
||||
/\<img/gi,
|
||||
'<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"'
|
||||
'<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"',
|
||||
);
|
||||
return newContent;
|
||||
},
|
||||
@@ -1079,12 +1079,12 @@ export default {
|
||||
.replace(/width:[^;]+;/gi, "max-width:100%;")
|
||||
.replace(/width:[^;]+;/gi, "max-width:100%;");
|
||||
return match;
|
||||
}
|
||||
},
|
||||
);
|
||||
newContent = newContent.replace(/<br[^>]*\/>/gi, "");
|
||||
newContent = newContent.replace(
|
||||
/\<img/gi,
|
||||
'<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"'
|
||||
'<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"',
|
||||
);
|
||||
return newContent;
|
||||
},
|
||||
|
||||
@@ -1,287 +1,313 @@
|
||||
<template><page-meta
|
||||
<template>
|
||||
<page-meta
|
||||
:page-font-size="$baseFontSize() + 'px'"
|
||||
:root-font-size="$baseFontSize() + 'px'"
|
||||
></page-meta>
|
||||
<view>
|
||||
<z-nav-bar>
|
||||
<u-search :clearabled="true" bgColor="#fff" borderColor="#54a966" focus v-model="bookScreen.bookName"
|
||||
@custom='souBook' @clear="clear"></u-search>
|
||||
</z-nav-bar>
|
||||
<view class="sear_ch" v-if="this.show==0">
|
||||
<view class="sear_ch_tit">
|
||||
历史搜索
|
||||
</view>
|
||||
<view class="sear_ch_tag">
|
||||
<text v-for="item in historyList" @click="serkeyWord(item)">{{item}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sear_class" v-if="this.show==1">
|
||||
<view class="sc_xuan">
|
||||
<view class="sc_con" v-for="(item,index) in classFen" @click="FenBook(item)"
|
||||
:class="bookScreen.type == item.id ? 'sc_con sc_con_style' : 'sc_con'">{{item.sort}}</view>
|
||||
</view>
|
||||
<view class="sc_xuan">
|
||||
<view class="sc_con" v-for="(item,index) in classMian" @click="MianBook(item)"
|
||||
:class="bookScreen.is_charge == item.id ? 'sc_con sc_con_style' : 'sc_con'">{{item.sort}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sear_list" v-if="this.show==1">
|
||||
<view class="bl_tioa" v-for="(item,index) in bookList" @click="onBookJump(item)">
|
||||
|
||||
</view>
|
||||
<view style="height: 1px;"></view>
|
||||
<view>
|
||||
<view v-if="status==0" style="text-align: center;">
|
||||
<u-loading-icon style="display: inline-block;"></u-loading-icon>
|
||||
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中</font>
|
||||
</view>
|
||||
<view v-if="status==1">
|
||||
<u-divider text="全部加载完成"></u-divider>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view v-if="this.show==1&&this.bookList==''">
|
||||
<u-divider text="暂无数据"></u-divider>
|
||||
</view>
|
||||
<view style="padding-bottom: 20rpx;">
|
||||
<u-back-top :scroll-top="scrollTop"></u-back-top>
|
||||
</view>
|
||||
</view>
|
||||
<music-play :playData="playData"></music-play>
|
||||
</view>
|
||||
<view>
|
||||
<z-nav-bar>
|
||||
<u-search
|
||||
:clearabled="true"
|
||||
bgColor="#fff"
|
||||
borderColor="#54a966"
|
||||
focus
|
||||
v-model="bookScreen.bookName"
|
||||
@custom="souBook"
|
||||
@clear="clear"
|
||||
></u-search>
|
||||
</z-nav-bar>
|
||||
<view class="sear_ch" v-if="this.show == 0">
|
||||
<view class="sear_ch_tit"> 历史搜索 </view>
|
||||
<view class="sear_ch_tag">
|
||||
<text v-for="item in historyList" @click="serkeyWord(item)">{{
|
||||
item
|
||||
}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sear_class" v-if="this.show == 1">
|
||||
<view class="sc_xuan">
|
||||
<view
|
||||
class="sc_con"
|
||||
v-for="(item, index) in classFen"
|
||||
@click="FenBook(item)"
|
||||
:class="bookScreen.type == item.id ? 'sc_con sc_con_style' : 'sc_con'"
|
||||
>{{ item.sort }}</view
|
||||
>
|
||||
</view>
|
||||
<view class="sc_xuan">
|
||||
<view
|
||||
class="sc_con"
|
||||
v-for="(item, index) in classMian"
|
||||
@click="MianBook(item)"
|
||||
:class="
|
||||
bookScreen.is_charge == item.id ? 'sc_con sc_con_style' : 'sc_con'
|
||||
"
|
||||
>{{ item.sort }}</view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sear_list" v-if="this.show == 1">
|
||||
<view
|
||||
class="bl_tioa"
|
||||
v-for="(item, index) in bookList"
|
||||
@click="onBookJump(item)"
|
||||
>
|
||||
</view>
|
||||
<view style="height: 1px"></view>
|
||||
<view>
|
||||
<view v-if="status == 0" style="text-align: center">
|
||||
<u-loading-icon style="display: inline-block"></u-loading-icon>
|
||||
<font
|
||||
style="
|
||||
vertical-align: super;
|
||||
margin-left: 10px;
|
||||
font-size: 26rpx;
|
||||
color: #909399;
|
||||
"
|
||||
>努力加载中</font
|
||||
>
|
||||
</view>
|
||||
<view v-if="status == 1">
|
||||
<u-divider text="全部加载完成"></u-divider>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="this.show == 1 && this.bookList == ''">
|
||||
<u-divider text="暂无数据"></u-divider>
|
||||
</view>
|
||||
<view style="padding-bottom: 20rpx">
|
||||
<u-back-top :scroll-top="scrollTop"></u-back-top>
|
||||
</view>
|
||||
</view>
|
||||
<music-play :playData="playData"></music-play>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import musicPlay from '@/components/music.vue'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
playData:{},
|
||||
scrollTop: 0,
|
||||
totalPage: 0,
|
||||
status: 3,
|
||||
show: 0,
|
||||
bookList: [],
|
||||
historyList: [],
|
||||
bookScreen: {
|
||||
authorName: '', //作者
|
||||
publisherName: '', //出版社
|
||||
type: '', //电子书类型
|
||||
bookName: '', //关键词
|
||||
is_charge: 1, //是否收费(0收费1免费)
|
||||
state: 1,
|
||||
page: 1, //当前页码数
|
||||
limit: 10, //单页数据数量
|
||||
},
|
||||
classFen: [{
|
||||
sort: '全部',
|
||||
id: ''
|
||||
}, {
|
||||
sort: '医学',
|
||||
id: 1
|
||||
}, {
|
||||
sort: '国学',
|
||||
id: 2
|
||||
}, {
|
||||
sort: '文学',
|
||||
id: 3
|
||||
}, {
|
||||
sort: '古籍',
|
||||
id: 4
|
||||
}],
|
||||
classMian: [{
|
||||
sort: '免费',
|
||||
id: 1
|
||||
}, {
|
||||
sort: 'VIP',
|
||||
id: 0
|
||||
}],
|
||||
};
|
||||
},
|
||||
import musicPlay from "@/components/music.vue";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
playData: {},
|
||||
scrollTop: 0,
|
||||
totalPage: 0,
|
||||
status: 3,
|
||||
show: 0,
|
||||
bookList: [],
|
||||
historyList: [],
|
||||
bookScreen: {
|
||||
authorName: "", //作者
|
||||
publisherName: "", //出版社
|
||||
type: "", //电子书类型
|
||||
bookName: "", //关键词
|
||||
is_charge: 1, //是否收费(0收费1免费)
|
||||
state: 1,
|
||||
page: 1, //当前页码数
|
||||
limit: 10, //单页数据数量
|
||||
},
|
||||
classFen: [
|
||||
{
|
||||
sort: "全部",
|
||||
id: "",
|
||||
},
|
||||
{
|
||||
sort: "医学",
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
sort: "国学",
|
||||
id: 2,
|
||||
},
|
||||
{
|
||||
sort: "文学",
|
||||
id: 3,
|
||||
},
|
||||
{
|
||||
sort: "古籍",
|
||||
id: 4,
|
||||
},
|
||||
],
|
||||
classMian: [
|
||||
{
|
||||
sort: "免费",
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
sort: "VIP",
|
||||
id: 0,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
|
||||
// 返回顶部
|
||||
onPageScroll(e) {
|
||||
this.scrollTop = e.scrollTop;
|
||||
},
|
||||
|
||||
// 返回顶部
|
||||
onPageScroll(e) {
|
||||
this.scrollTop = e.scrollTop;
|
||||
},
|
||||
// 下拉刷新
|
||||
onReachBottom() {
|
||||
this.status = 0;
|
||||
if (this.bookScreen.page < this.totalPage) {
|
||||
this.bookScreen.page = this.bookScreen.page + 1;
|
||||
setTimeout(() => {
|
||||
this.$http.post("book/book/list", this.bookScreen).then((res) => {
|
||||
this.totalPage = res.page.totalPage;
|
||||
for (let i in res.page.list) {
|
||||
this.bookList.push(res.page.list[i]);
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
} else {
|
||||
this.status = 1;
|
||||
}
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onReachBottom() {
|
||||
this.status = 0
|
||||
if (this.bookScreen.page < this.totalPage) {
|
||||
this.bookScreen.page = this.bookScreen.page + 1
|
||||
setTimeout(() => {
|
||||
this.$http
|
||||
.post('book/book/list', this.bookScreen)
|
||||
.then(res => {
|
||||
this.totalPage = res.page.totalPage
|
||||
for (let i in res.page.list) {
|
||||
this.bookList.push(res.page.list[i])
|
||||
}
|
||||
});
|
||||
}, 1000)
|
||||
} else {
|
||||
this.status = 1
|
||||
}
|
||||
//第一次加载
|
||||
onLoad(e) {},
|
||||
//页面显示
|
||||
onShow() {
|
||||
this.getHistory();
|
||||
},
|
||||
components: {
|
||||
musicPlay,
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
// 获取缓存
|
||||
getHistory() {
|
||||
this.historyList = uni.getStorageSync("hisRecords");
|
||||
if (this.historyList.length > 10) {
|
||||
this.historyList.splice(10, this.historyList.length);
|
||||
uni.setStorageSync("hisRecords", this.historyList);
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
// 获取列表数据
|
||||
getData() {
|
||||
this.$http.post("book/book/list", this.bookScreen).then((res) => {
|
||||
this.bookList = res.page.list;
|
||||
this.totalPage = res.page.totalPage;
|
||||
this.status = 3;
|
||||
this.show = 1;
|
||||
});
|
||||
},
|
||||
|
||||
// 清空
|
||||
clear() {
|
||||
this.show = 0;
|
||||
this.getHistory();
|
||||
},
|
||||
|
||||
// 搜索
|
||||
souBook() {
|
||||
if (this.bookScreen.bookName == "") {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "请输入关键字",
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.getData();
|
||||
|
||||
//第一次加载
|
||||
onLoad(e) {
|
||||
let ArryList = [];
|
||||
if (uni.getStorageSync("hisRecords") == "") {
|
||||
ArryList.push(this.bookScreen.bookName);
|
||||
uni.setStorageSync("hisRecords", ArryList);
|
||||
} else {
|
||||
let value = uni.getStorageSync("hisRecords");
|
||||
value.unshift(this.bookScreen.bookName);
|
||||
uni.setStorageSync("hisRecords", value);
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
//页面显示
|
||||
onShow() {
|
||||
this.getHistory()
|
||||
},
|
||||
components: {
|
||||
musicPlay
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
// 获取缓存
|
||||
getHistory() {
|
||||
this.historyList = uni.getStorageSync('hisRecords')
|
||||
if (this.historyList.length > 10) {
|
||||
this.historyList.splice(10, this.historyList.length)
|
||||
uni.setStorageSync('hisRecords', this.historyList);
|
||||
}
|
||||
},
|
||||
|
||||
// 获取列表数据
|
||||
getData() {
|
||||
this.$http
|
||||
.post('book/book/list', this.bookScreen)
|
||||
.then(res => {
|
||||
this.bookList = res.page.list
|
||||
this.totalPage = res.page.totalPage
|
||||
this.status = 3
|
||||
this.show = 1
|
||||
});
|
||||
},
|
||||
|
||||
// 清空
|
||||
clear() {
|
||||
this.show = 0
|
||||
this.getHistory()
|
||||
},
|
||||
|
||||
// 搜索
|
||||
souBook() {
|
||||
if (this.bookScreen.bookName == '') {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请输入关键字'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.getData();
|
||||
|
||||
let ArryList = []
|
||||
if (uni.getStorageSync('hisRecords') == '') {
|
||||
ArryList.push(this.bookScreen.bookName)
|
||||
uni.setStorageSync('hisRecords', ArryList);
|
||||
} else {
|
||||
let value = uni.getStorageSync('hisRecords')
|
||||
value.unshift(this.bookScreen.bookName)
|
||||
uni.setStorageSync('hisRecords', value);
|
||||
}
|
||||
},
|
||||
|
||||
// 点击历史搜索
|
||||
serkeyWord(e) {
|
||||
this.bookScreen.bookName = e
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
};
|
||||
// 点击历史搜索
|
||||
serkeyWord(e) {
|
||||
this.bookScreen.bookName = e;
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/style/mixin.scss';
|
||||
@import "@/style/mixin.scss";
|
||||
|
||||
.sear_ch {
|
||||
margin: 50rpx 40rpx 0 40rpx;
|
||||
.sear_ch {
|
||||
margin: 50rpx 40rpx 0 40rpx;
|
||||
|
||||
.sear_ch_tit {
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
margin: 40rpx 0 0 0;
|
||||
}
|
||||
.sear_ch_tit {
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
margin: 40rpx 0 0 0;
|
||||
}
|
||||
|
||||
.sear_ch_tag {
|
||||
margin: 20rpx 0 0 0;
|
||||
.sear_ch_tag {
|
||||
margin: 20rpx 0 0 0;
|
||||
|
||||
text {
|
||||
background-color: #eee;
|
||||
font-size: 24rpx;
|
||||
border-radius: 50rpx;
|
||||
display: inline-block;
|
||||
margin: 0 30rpx 20rpx 0;
|
||||
padding: 10rpx 25rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
text {
|
||||
background-color: #eee;
|
||||
font-size: 24rpx;
|
||||
border-radius: 50rpx;
|
||||
display: inline-block;
|
||||
margin: 0 30rpx 20rpx 0;
|
||||
padding: 10rpx 25rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sear_class {
|
||||
margin: 20rpx 30rpx 60rpx 30rpx;
|
||||
.sear_class {
|
||||
margin: 20rpx 30rpx 60rpx 30rpx;
|
||||
|
||||
.sc_xuan {
|
||||
.sc_xuan {
|
||||
margin-bottom: 10rpx;
|
||||
|
||||
margin-bottom: 10rpx;
|
||||
.sc_con {
|
||||
display: inline-block;
|
||||
font-size: 28rpx;
|
||||
margin-right: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
padding: 6rpx 12rpx;
|
||||
}
|
||||
|
||||
.sc_con {
|
||||
display: inline-block;
|
||||
font-size: 28rpx;
|
||||
margin-right: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
padding: 6rpx 12rpx;
|
||||
}
|
||||
.sc_con_style {
|
||||
color: #27b386;
|
||||
background-color: #2ab58833;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sc_con_style {
|
||||
color: #27b386;
|
||||
background-color: #2ab58833;
|
||||
}
|
||||
}
|
||||
}
|
||||
.sear_list {
|
||||
margin: 50rpx 30rpx 0 30rpx;
|
||||
|
||||
.sear_list {
|
||||
margin: 50rpx 30rpx 0 30rpx;
|
||||
.bl_tioa {
|
||||
box-shadow: 0 0px 10px 1px #d3d1d133;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
padding: 0 25upx 10upx 220upx;
|
||||
margin: 0 0 60rpx 0;
|
||||
border-radius: 15rpx;
|
||||
min-height: 250rpx;
|
||||
|
||||
.bl_tioa {
|
||||
box-shadow: 0 0px 10px 1px #d3d1d133;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
padding: 0 25upx 10upx 220upx;
|
||||
margin: 0 0 60rpx 0;
|
||||
border-radius: 15rpx;
|
||||
min-height: 250rpx;
|
||||
view {
|
||||
text {
|
||||
color: #9b9b9b;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
|
||||
view {
|
||||
.bok_name {
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
text {
|
||||
color: #9b9b9b;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
|
||||
.bok_name {
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
image {
|
||||
position: absolute;
|
||||
left: 30upx;
|
||||
top: -20upx;
|
||||
width: 160upx;
|
||||
height: 240upx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
image {
|
||||
position: absolute;
|
||||
left: 30upx;
|
||||
top: -20upx;
|
||||
width: 160upx;
|
||||
height: 240upx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,266 +1,279 @@
|
||||
<template><page-meta
|
||||
<template>
|
||||
<page-meta
|
||||
:page-font-size="$baseFontSize() + 'px'"
|
||||
:root-font-size="$baseFontSize() + 'px'"
|
||||
></page-meta>
|
||||
<view class="">
|
||||
<view class="header">
|
||||
<!-- 顶部导航栏 -->
|
||||
<z-nav-bar title="物流详情"></z-nav-bar>
|
||||
</view>
|
||||
<view class="" style="margin-bottom: 20rpx; font-size: 28rpx;">
|
||||
<view class="kuaidiItem">运单号: {{expressOrderSn}}
|
||||
<u-tag @click="copyData(expressOrderSn)" class="copyCode" text="复制" plain type="success" /></view>
|
||||
</view>
|
||||
<view v-if="deliverDetails.length > 0">
|
||||
<!-- <u-tabs active-color="#2979ff" inactive-color="#606266" bar-height="6" bar-width="40"
|
||||
<view class="">
|
||||
<view class="header">
|
||||
<!-- 顶部导航栏 -->
|
||||
<z-nav-bar title="物流详情"></z-nav-bar>
|
||||
</view>
|
||||
<view class="" style="margin-bottom: 20rpx; font-size: 28rpx">
|
||||
<view class="kuaidiItem"
|
||||
>运单号: {{ expressOrderSn }}
|
||||
<u-tag
|
||||
@click="copyData(expressOrderSn)"
|
||||
class="copyCode"
|
||||
text="复制"
|
||||
plain
|
||||
type="success"
|
||||
/></view>
|
||||
</view>
|
||||
<view v-if="deliverDetails.length > 0">
|
||||
<!-- <u-tabs active-color="#2979ff" inactive-color="#606266" bar-height="6" bar-width="40"
|
||||
name="name" :list="deliverList" :is-scroll="false" :current="current" @change="tabchange"></u-tabs> -->
|
||||
<view class="deliverCntent">
|
||||
<view class="">
|
||||
|
||||
<view v-for="(item, index) in deliverDetails" :class="['item',index == 0 ? 'first':'' ]">
|
||||
<view class="flexbox">
|
||||
<view class="img_icon "></view>
|
||||
<view class="wuliu">
|
||||
<view class="time">{{item.acceptTime}}</view>
|
||||
<view class="content">{{item.acceptStation}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="quesheng" v-else>
|
||||
<u-divider text="- 暂无物流信息 -"></u-divider>
|
||||
</view>
|
||||
<music-play :playData="playData"></music-play>
|
||||
<public-module></public-module>
|
||||
<!-- <u-loading color="red" :show="loading"></u-loading> -->
|
||||
</view>
|
||||
<view class="deliverCntent">
|
||||
<view class="">
|
||||
<view
|
||||
v-for="(item, index) in deliverDetails"
|
||||
:class="['item', index == 0 ? 'first' : '']"
|
||||
>
|
||||
<view class="flexbox">
|
||||
<view class="img_icon"></view>
|
||||
<view class="wuliu">
|
||||
<view class="time">{{ item.acceptTime }}</view>
|
||||
<view class="content">{{ item.acceptStation }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="quesheng" v-else>
|
||||
<u-divider text="- 暂无物流信息 -"></u-divider>
|
||||
</view>
|
||||
<music-play :playData="playData"></music-play>
|
||||
<public-module></public-module>
|
||||
<!-- <u-loading color="red" :show="loading"></u-loading> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import musicPlay from '@/components/music.vue'
|
||||
import $http from '@/config/requestConfig.js';
|
||||
// import Loading from '../../'
|
||||
import {
|
||||
mapState
|
||||
} from 'vuex';
|
||||
import loginVue from '../user/login.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
playData:{},
|
||||
loading: false,
|
||||
orderId: null,
|
||||
deliverDetails: [],
|
||||
express:{}, // 面单
|
||||
consignee:{}, // 收件人信息
|
||||
expressOrderSn:'', // 运单号
|
||||
// expressCompanyCode:'', //快递编码
|
||||
// expressCompanyName:'' ,// 快递公司
|
||||
orderSn : '',
|
||||
current: 0,
|
||||
deliverList: [],
|
||||
deliverDetailsLength: null,
|
||||
orderContet:{},
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.expressOrderSn = e.expressOrderSn
|
||||
// this.expressCompanyCode = e.expressCompanyCode
|
||||
// this.expressCompanyName = e.expressCompanyName
|
||||
//this.express = e.express
|
||||
//this.consignee = e.consignee
|
||||
console.log(e,'传入的参数')
|
||||
this.orderSn = e.orderSn
|
||||
},
|
||||
onShow() {
|
||||
this.getOrderList()
|
||||
},
|
||||
computed: {
|
||||
...mapState(['userInfo']),
|
||||
},
|
||||
components:{
|
||||
musicPlay
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 获取订单列表
|
||||
getOrderList() {
|
||||
console.log('this.orderType',this.orderType)
|
||||
this.$http
|
||||
// .get(`book/buyOrder/getOrderInfo?orderId=${this.orderID}`)
|
||||
.get(`book/buyOrder/orderDetail?orderSn=${this.orderSn}`)
|
||||
.then(res => {
|
||||
console.log('订单详情',res)
|
||||
var seconds = res.result.timestamp + 30 * 60 + 2 // 过期时间
|
||||
var nowSeconds = Math.floor(new Date().getTime() / 1000);
|
||||
res.result.overTime = seconds - nowSeconds
|
||||
|
||||
this.orderContet = res.result
|
||||
//this.userRecordid = res.userRecordid
|
||||
this.productIDs = res.result.goodsList.map(item => {
|
||||
return item.buyOrderProductId
|
||||
})
|
||||
// console.log(this.orderContet,'this.orderContet')
|
||||
if (this.orderContet.orderStatus == 0) {
|
||||
this.titleStat = '待支付'
|
||||
} else if (this.orderContet.orderStatus == 1) {
|
||||
this.titleStat = '待发货'
|
||||
} else if (this.orderContet.orderStatus == 2) {
|
||||
this.titleStat = '待收货'
|
||||
} else if (this.orderContet.orderStatus == 3) {
|
||||
this.titleStat = '已完成'
|
||||
}
|
||||
|
||||
|
||||
if(parseInt(this.orderContet.orderStatus) >= 2){
|
||||
this.getdeliverDetails()
|
||||
// 查询快递信息
|
||||
// this.getSheetInfo()
|
||||
}
|
||||
console.log(this.orderContet,'订单详情')
|
||||
})
|
||||
},
|
||||
|
||||
// 复制到剪切板
|
||||
copyData(data){
|
||||
uni.setClipboardData({
|
||||
data,
|
||||
success: function () {
|
||||
console.log('success');
|
||||
}
|
||||
});
|
||||
},
|
||||
tabchange(item) {
|
||||
console.log(item)
|
||||
this.current = item.index
|
||||
},
|
||||
// 获取物流
|
||||
getdeliverDetails() {
|
||||
this.deliverList = []
|
||||
// var strLength = this.orderContet.consignee.consigneeMobile.length
|
||||
// var subMobile = this.orderContet.consignee.consigneeMobile.substring(strLength-4,strLength)
|
||||
// this.expressOrderSn = 'SF1504651506851'
|
||||
// this.expressCompanyCode = 'SF'
|
||||
// subMobile = '9277'
|
||||
uni.showLoading()
|
||||
this.$http
|
||||
//.post(`/book/buyOrder/queryFMS?orderId=${this.orderId}`)
|
||||
.get(`/book/buyOrder/searchExpress?expressOrderSn=${this.expressOrderSn}`)
|
||||
.then(res => {
|
||||
console.log(res, '物流信息')
|
||||
if (res && res.code === 0) {
|
||||
uni.hideLoading()
|
||||
// this.deliverDetails = res.result.traces
|
||||
console.log(res.express.traces,'物流信息')
|
||||
if(res.express.traces.length > 0){
|
||||
this.deliverDetails = res.express.traces.reverse()
|
||||
}else{
|
||||
this.deliverDetails = []
|
||||
}
|
||||
|
||||
}
|
||||
}).catch(e => {
|
||||
uni.hideLoading()
|
||||
console.log(e,'e')
|
||||
})
|
||||
},
|
||||
import musicPlay from "@/components/music.vue";
|
||||
import $http from "@/config/requestConfig.js";
|
||||
// import Loading from '../../'
|
||||
import { mapState } from "vuex";
|
||||
import loginVue from "../user/login.vue";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
playData: {},
|
||||
loading: false,
|
||||
orderId: null,
|
||||
deliverDetails: [],
|
||||
express: {}, // 面单
|
||||
consignee: {}, // 收件人信息
|
||||
expressOrderSn: "", // 运单号
|
||||
// expressCompanyCode:'', //快递编码
|
||||
// expressCompanyName:'' ,// 快递公司
|
||||
orderSn: "",
|
||||
current: 0,
|
||||
deliverList: [],
|
||||
deliverDetailsLength: null,
|
||||
orderContet: {},
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.expressOrderSn = e.expressOrderSn;
|
||||
// this.expressCompanyCode = e.expressCompanyCode
|
||||
// this.expressCompanyName = e.expressCompanyName
|
||||
//this.express = e.express
|
||||
//this.consignee = e.consignee
|
||||
console.log(e, "传入的参数");
|
||||
this.orderSn = e.orderSn;
|
||||
},
|
||||
onShow() {
|
||||
this.getOrderList();
|
||||
},
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
components: {
|
||||
musicPlay,
|
||||
},
|
||||
methods: {
|
||||
// 获取订单列表
|
||||
getOrderList() {
|
||||
console.log("this.orderType", this.orderType);
|
||||
this.$http
|
||||
// .get(`book/buyOrder/getOrderInfo?orderId=${this.orderID}`)
|
||||
.get(`book/buyOrder/orderDetail?orderSn=${this.orderSn}`)
|
||||
.then((res) => {
|
||||
console.log("订单详情", res);
|
||||
var seconds = res.result.timestamp + 30 * 60 + 2; // 过期时间
|
||||
var nowSeconds = Math.floor(new Date().getTime() / 1000);
|
||||
res.result.overTime = seconds - nowSeconds;
|
||||
|
||||
this.orderContet = res.result;
|
||||
//this.userRecordid = res.userRecordid
|
||||
this.productIDs = res.result.goodsList.map((item) => {
|
||||
return item.buyOrderProductId;
|
||||
});
|
||||
// console.log(this.orderContet,'this.orderContet')
|
||||
if (this.orderContet.orderStatus == 0) {
|
||||
this.titleStat = "待支付";
|
||||
} else if (this.orderContet.orderStatus == 1) {
|
||||
this.titleStat = "待发货";
|
||||
} else if (this.orderContet.orderStatus == 2) {
|
||||
this.titleStat = "待收货";
|
||||
} else if (this.orderContet.orderStatus == 3) {
|
||||
this.titleStat = "已完成";
|
||||
}
|
||||
|
||||
if (parseInt(this.orderContet.orderStatus) >= 2) {
|
||||
this.getdeliverDetails();
|
||||
// 查询快递信息
|
||||
// this.getSheetInfo()
|
||||
}
|
||||
console.log(this.orderContet, "订单详情");
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
// 复制到剪切板
|
||||
copyData(data) {
|
||||
uni.setClipboardData({
|
||||
data,
|
||||
success: function () {
|
||||
console.log("success");
|
||||
},
|
||||
});
|
||||
},
|
||||
tabchange(item) {
|
||||
console.log(item);
|
||||
this.current = item.index;
|
||||
},
|
||||
// 获取物流
|
||||
getdeliverDetails() {
|
||||
this.deliverList = [];
|
||||
// var strLength = this.orderContet.consignee.consigneeMobile.length
|
||||
// var subMobile = this.orderContet.consignee.consigneeMobile.substring(strLength-4,strLength)
|
||||
// this.expressOrderSn = 'SF1504651506851'
|
||||
// this.expressCompanyCode = 'SF'
|
||||
// subMobile = '9277'
|
||||
uni.showLoading();
|
||||
this.$http
|
||||
//.post(`/book/buyOrder/queryFMS?orderId=${this.orderId}`)
|
||||
.get(
|
||||
`/book/buyOrder/searchExpress?expressOrderSn=${this.expressOrderSn}`,
|
||||
)
|
||||
.then((res) => {
|
||||
console.log(res, "物流信息");
|
||||
if (res && res.code === 0) {
|
||||
uni.hideLoading();
|
||||
// this.deliverDetails = res.result.traces
|
||||
console.log(res.express.traces, "物流信息");
|
||||
if (res.express.traces.length > 0) {
|
||||
this.deliverDetails = res.express.traces.reverse();
|
||||
} else {
|
||||
this.deliverDetails = [];
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
uni.hideLoading();
|
||||
console.log(e, "e");
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.item:first-child::before {
|
||||
background-color: #6fca78 !important
|
||||
}
|
||||
.item:first-child::before {
|
||||
background-color: #6fca78 !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.quesheng{text-align: center; margin-top: 20px;
|
||||
image{ width: 150rpx; height: 170rpx; display: block; margin: 10px auto;
|
||||
}
|
||||
text{
|
||||
color: #888;
|
||||
}
|
||||
}
|
||||
.copyCode{display: inline-block; margin-left: 20rpx; }
|
||||
.u-tabs {
|
||||
background: #fff
|
||||
}
|
||||
.quesheng {
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
image {
|
||||
width: 150rpx;
|
||||
height: 170rpx;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
}
|
||||
text {
|
||||
color: #888;
|
||||
}
|
||||
}
|
||||
.copyCode {
|
||||
display: inline-block;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.u-tabs {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.xiangqing {
|
||||
overflow: hidden;
|
||||
.xiangqing {
|
||||
overflow: hidden;
|
||||
|
||||
img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.kuaidiItem {
|
||||
padding: 10px;
|
||||
color: #666
|
||||
}
|
||||
.kuaidiItem {
|
||||
padding: 10px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.deliverCntent {
|
||||
.img_icon {
|
||||
border-left: 2px solid #eee;
|
||||
}
|
||||
line-height:20px;
|
||||
padding: 32rpx;
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
border-top: 1px solid #eee;
|
||||
font-size: 28rpx;
|
||||
color:#777;
|
||||
.item {
|
||||
padding-left: 10px;
|
||||
position: relative;
|
||||
}
|
||||
.item:before {
|
||||
display: inline-block;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 100%;
|
||||
background: #eee;
|
||||
left: 6px;
|
||||
top: 0;
|
||||
content: "";
|
||||
position: absolute;
|
||||
}
|
||||
.deliverCntent {
|
||||
.img_icon {
|
||||
border-left: 2px solid #eee;
|
||||
}
|
||||
line-height: 20px;
|
||||
padding: 32rpx;
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
border-top: 1px solid #eee;
|
||||
font-size: 28rpx;
|
||||
color: #777;
|
||||
.item {
|
||||
padding-left: 10px;
|
||||
position: relative;
|
||||
}
|
||||
.item:before {
|
||||
display: inline-block;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 100%;
|
||||
background: #eee;
|
||||
left: 6px;
|
||||
top: 0;
|
||||
content: "";
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.time {
|
||||
color: #888;
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 5px
|
||||
}
|
||||
.first{
|
||||
color: #55aa7f;
|
||||
}
|
||||
.content {
|
||||
padding-bottom: 14px;
|
||||
}
|
||||
}
|
||||
.flexbox {
|
||||
display: flex;
|
||||
}
|
||||
.time {
|
||||
color: #888;
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.first {
|
||||
color: #55aa7f;
|
||||
}
|
||||
.content {
|
||||
padding-bottom: 14px;
|
||||
}
|
||||
}
|
||||
.flexbox {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.img_icon {
|
||||
padding-right: 30rpx;
|
||||
}
|
||||
.img_icon {
|
||||
padding-right: 30rpx;
|
||||
}
|
||||
|
||||
.moreBtnF {
|
||||
align-items: center;
|
||||
padding: 30rpx;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
background-color: rgba(255, 255, 255, .9);
|
||||
}
|
||||
.moreBtnF {
|
||||
align-items: center;
|
||||
padding: 30rpx;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
background-color: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,25 +1,18 @@
|
||||
<template><page-meta
|
||||
<template>
|
||||
<page-meta
|
||||
:page-font-size="$baseFontSize() + 'px'"
|
||||
:root-font-size="$baseFontSize() + 'px'"
|
||||
></page-meta>
|
||||
<view>
|
||||
快递列表页面
|
||||
</view>
|
||||
<view> 快递列表页面 </view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<style></style>
|
||||
|
||||
@@ -221,6 +221,40 @@
|
||||
</span>
|
||||
<span>¥</span>{{ orderContet.shippingMoney }}
|
||||
</view>
|
||||
<view
|
||||
class="orderReal"
|
||||
v-if="
|
||||
orderContet.orderType == 'order' &&
|
||||
orderContet.districtMoney &&
|
||||
orderContet.districtMoney > 0
|
||||
"
|
||||
>
|
||||
<span style="color: #666; margin-right: 10rpx; float: left">
|
||||
活动立减:
|
||||
</span>
|
||||
<span style="color: #fa2d12"
|
||||
>- ¥{{ orderContet.districtMoney }}</span
|
||||
>
|
||||
</view>
|
||||
<view
|
||||
class="orderReal"
|
||||
v-if="
|
||||
orderContet.orderType == 'order' &&
|
||||
orderContet.vipDiscountAmount &&
|
||||
orderContet.vipDiscountAmount > 0
|
||||
"
|
||||
>
|
||||
<span style="color: #666; margin-right: 10rpx; float: left">
|
||||
<span
|
||||
style="color: #f94f04; font-weight: bold; margin-right: 2px"
|
||||
>VIP</span
|
||||
>
|
||||
专享立减:
|
||||
</span>
|
||||
<span style="color: #fa2d12"
|
||||
>- ¥{{ orderContet.vipDiscountAmount }}</span
|
||||
>
|
||||
</view>
|
||||
<view class="orderReal" v-if="orderContet.orderType == 'order'">
|
||||
<span style="color: #666; margin-right: 10rpx; float: left"
|
||||
>积分 :
|
||||
@@ -603,7 +637,7 @@ export default {
|
||||
//匹配最后一个表情符号并删除11。
|
||||
this.Pform.comment = this.Pform.comment.replace(
|
||||
/(\[[^\]]+\]|[\s\S])$/,
|
||||
""
|
||||
"",
|
||||
);
|
||||
if (this.emoji.length > 0) {
|
||||
this.emoji = this.emoji.slice(0, -1);
|
||||
@@ -994,7 +1028,7 @@ export default {
|
||||
if (res.confirm) {
|
||||
this.$http
|
||||
.post(
|
||||
"book/buyOrder/appDelete?orderId=" + this.orderContet.orderId
|
||||
"book/buyOrder/appDelete?orderId=" + this.orderContet.orderId,
|
||||
)
|
||||
.then((res) => {
|
||||
uni.showToast({
|
||||
@@ -1037,7 +1071,7 @@ export default {
|
||||
});
|
||||
}
|
||||
this.getOrderList();
|
||||
}
|
||||
},
|
||||
);
|
||||
} else if (payItem.paymentMethod == 1) {
|
||||
console.log("微信支付");
|
||||
|
||||
@@ -985,7 +985,7 @@ export default {
|
||||
});
|
||||
}
|
||||
this.getOrderList();
|
||||
}
|
||||
},
|
||||
);
|
||||
} else if (payItem.paymentMethod == 1) {
|
||||
console.log("微信支付");
|
||||
@@ -1285,7 +1285,7 @@ export default {
|
||||
//匹配最后一个表情符号并删除11。
|
||||
this.Pform.comment = this.Pform.comment.replace(
|
||||
/(\[[^\]]+\]|[\s\S])$/,
|
||||
""
|
||||
"",
|
||||
);
|
||||
if (this.emoji.length > 0) {
|
||||
this.emoji = this.emoji.slice(0, -1);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user