增加其他页面

This commit is contained in:
aihe 2023-12-10 13:53:38 +08:00
parent 0bc72d8603
commit 6529aa82fb
13 changed files with 453 additions and 29 deletions

View File

@ -1,7 +1,7 @@
const tabBarUrls = [
'sending/sending',
'search/search',
'mine/mine'
'tabBar/sending/sending',
'tabBar/search/search',
'tabBar/mine/mine'
]
const goto = (url, type = 1)=> {

View File

@ -66,7 +66,37 @@ var dateUtils = {
}
};
const numberToChinese = (num)=> {
const chineseNums = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
const chineseUnits = ['', '十', '百', '千', '万', '亿', '兆'];
if (num === 0) {
return chineseNums[0];
}
const digits = Math.floor(num).toString().split('');
const len = digits.length;
let result = '';
for (let i = 0; i < len; i++) {
const digit = parseInt(digits[i]);
const unit = chineseUnits[len - 1 - i];
if (digit !== 0) {
result += chineseNums[digit] + unit;
} else {
if (result[result.length - 1] !== chineseNums[0]) {
result += chineseNums[digit]
}
}
}
return result;
}
export {
numberToChinese,
formatTime,
formatLocation,
dateUtils

View File

@ -5,7 +5,7 @@
<tpx-search placeholder="请输入" v-model:value="keyword" bgColor="#FFF"></tpx-search>
<view class="mt-20 mb-10">
<tpx-tags :list="hisList" type="" @onItemClick="handleHisItemClick"></tpx-tags>
<tpx-tags :list="hisList" :value="value" type="single" @onItemClick="handleHisItemClick"></tpx-tags>
</view>
<u-line></u-line>

View File

@ -1,6 +1,6 @@
<template>
<tpx-dialog :show="show" title="付款方式" @onClose="handleCloseModal()">
<view style="position: relative;height: calc(70vh);">
<view style="position: relative;height: calc(60vh);">
<tpx-layout>
<template v-slot:body>
<view class="shet-cont">

View File

@ -1,6 +1,6 @@
<template>
<tpx-dialog :show="show" title="上门取件时间" @onClose="handleCloseModal()">
<view style="position: relative;height: calc(70vh);">
<view style="position: relative;height: calc(60vh);">
<tpx-layout>
<template v-slot:body>
<view class="shet-cont">
@ -57,6 +57,7 @@
<script>
import { setClipboardData } from "@/common/untool"
import { numberToChinese } from "@/common/util"
import dayjs from 'dayjs/esm/index'
export default {
computed: {
@ -124,7 +125,7 @@
const timeList = []
let start = _this.range[0]
let end = _this.range[1]
if(dIndex == 0) {
if(dIndex == 0 && nowHour > start) {
start = nowHour + 1
}
for(var tIndex = start; tIndex <= end; tIndex ++) {
@ -134,7 +135,7 @@
cVal = timeStr
cTlt = `${timeStr}-${timeNextStr}`
if(dIndex == 0 && tIndex == start) {
cTlt = '一小时内'
cTlt = `${numberToChinese(start - nowHour)}小时内`
}
timeList.push({
title: cTlt , val: cVal

View File

@ -1,6 +1,6 @@
<template>
<tpx-dialog :show="show" title="选择仓库" @onClose="handleCloseModal()">
<view style="position: relative;height: calc(70vh);">
<view style="position: relative;height: calc(60vh);">
<tpx-layout>
<template v-slot:body>
<view class="shet-cont">
@ -8,7 +8,7 @@
<tpx-search placeholder="请输入" v-model:value="keyword" bgColor="#FFF"></tpx-search>
<view class="mt-20 mb-10">
<tpx-tags :list="hisList" type="" @onItemClick="handleHisItemClick"></tpx-tags>
<tpx-tags :list="hisList" v-model:value="model.value" type="single" @onItemClick="handleHisItemClick"></tpx-tags>
</view>
<u-line></u-line>
@ -29,7 +29,7 @@
</u-row>
<view v-if="dlCurrent.checked" class="w-tem" @click="handleCopy(dlCurrent.item)">
<view style="position: absolute;right: 20rpx;right: 20rpx;">
<u-icon name="file-text" size="34" color="#999"></u-icon>
<!-- <u-icon name="file-text" size="34" color="#999"></u-icon> -->
</view>
<u-row>
<view class="pr-20">
@ -115,7 +115,7 @@
},
handleHisItemClick(res) {
this.updateValue(res.val)
},
updateValue(val) {
this.model.value = val
@ -127,7 +127,7 @@
this.handleCloseModal()
},
handleCopy(item) {
setClipboardData(item.title)
// setClipboardData(item.title)
}
}
}

View File

@ -5,7 +5,7 @@
<tpx-search placeholder="请输入" v-model:value="keyword" bgColor="#FFF"></tpx-search>
<view class="mt-20 mb-10">
<tpx-tags :list="hisList" type="" @onItemClick="handleHisItemClick"></tpx-tags>
<tpx-tags :list="hisList" :value="value" type="single" @onItemClick="handleHisItemClick"></tpx-tags>
</view>
<u-line></u-line>

View File

@ -67,6 +67,24 @@
"style": {
"navigationBarTitleText": "投诉编辑"
}
},
{
"path": "pages/service/list",
"style": {
"navigationBarTitleText": "网点查询"
}
},
{
"path": "pages/service/articlelist",
"style": {
"navigationBarTitleText": "信息速递"
}
},
{
"path": "pages/service/articledetail",
"style": {
"navigationBarTitleText": "信息详情"
}
}
],
"subPackages": [{

View File

@ -207,22 +207,24 @@
<u-row justify="between">
<view>
<u-row align="top">
<u-checkbox-group v-model="agreePrivateRule" placement="column" @change="handleFormChange()">
<u-checkbox size="26" labelSize="26" v-model="agreePrivateRule" label="我已同意接受"
label-color=":#999" activeColor="#B12D29"
<u-checkbox-group placement="column" @change="handleAgree()">
<u-checkbox size="26" labelSize="26" :checked="agreePrivateRule" label="我已同意接受"
label-color=":#999" activeColor="#B12D29"
custom-style="margin-bottom: 10rpx;"></u-checkbox>
</u-checkbox-group>
<view @click="handleDialogClick(privacyModal)" class="pl-10" style="padding-top: 6rpx;">
<u-text text="《快件运单契约条款》" size="26"></u-text>
</view>
</u-row>
<u-row>
<view class="mr-10">
<u-text text="预估" :bold="true" size="28"></u-text>
</view>
<u-text :text="80" mode="price" color="#B12D29" :bold="true" size="28"></u-text>
</u-row>
<u-text margin="10rpx 0 0 0" text="温馨提示:具体费用以快递小哥核实为准" color="#999" size="26"></u-text>
<view @click="handleAgree()">
<u-row>
<view class="mr-10">
<u-text text="预估" :bold="true" size="28"></u-text>
</view>
<u-text :text="80" mode="price" color="#B12D29" :bold="true" size="28"></u-text>
</u-row>
<u-text margin="10rpx 0 0 0" text="温馨提示:具体费用以快递小哥核实为准" color="#999" size="26"></u-text>
</view>
</view>
<u-row>
<u-button size="large" shape="circle"
@ -326,6 +328,9 @@
}
},
handleAgree() {
this.agreePrivateRule = !this.agreePrivateRule
},
handleSendTypeChange(item) {
},

View File

@ -0,0 +1,93 @@
<template>
<view class="dbody">
<u-text :text="title" size="36" :bold="true"></u-text>
<!-- <u-text :text="desc" size="32" color="#666" margin="30rpx 0"></u-text> -->
<view class="mt-30">
<u-row>
<u-avatar size="80"></u-avatar>
<view class="pl-10">
<u-text :text="'海关新闻网'" size="28" ></u-text>
<u-text margin="6rpx 0 0 0" :text="'发布于2012-10-11 10:22'" size="26" color="#999"></u-text>
</view>
</u-row>
</view>
<view class="mt-30">
<u-parse :content="content"></u-parse>
</view>
<view class="mt-30">
<u-row custom-style="height:100rpx;" justify="end">
<u-row>
<u-icon name="thumb-up" size="38" color="#999" ></u-icon>
<u-text margin="0 0 0 10rpx" size="26" :text="66" color="#999"></u-text>
</u-row>
</u-row>
</view>
</view>
</template>
<script>
import getCdnUrl from "@/common/getCdnUrl"
import { goto, goBack, setClipboardData, confirmModal, showLoading } from "@/common/untool"
export default {
props: {
// hasLeftWin: {
// type: Boolean
// }
},
data() {
return {
title: '各国邮政新规',
desc: 'asd',
content: `
《快件服务协议》是探路物流与寄件人《以下简称"您”或“用户”)之间达成的快件寄递服务合同,附则、远单、隐私政策及京东物流发布的各类规则、服务细则、说明、通知等为《快件服务协议》有效组成部分(以下统称为“本协议”),本协议在您下电子运单前通过勾选的形式在线签署。在线签署并下单后,即表示您已接受协议的全部内容,在您与探路物流间发生法律效力。
<p>露从今夜白,月是故乡明</p>
<p>请您在务必仔细阅读</p>
请您在务必仔细阅读、充分理解后再决定勾选并下单尤其是以粗体、红色字体或下划线等方式标识的条款因这些条款可能会明确您应履行的义务或对您的权利有所限制。若您不同意本协议全部或任何内容,您应停止使用寄快递服务。如您对协议内容有任何疑问,您可随时通过京东物流官方网站或拔打京东物流客服热线。
`
}
},
onShareAppMessage() {
return {
// title: '',
// path: 'TODO'
}
},
onLoad(queryOption) {
this.initData();
},
onUnload() {
},
methods: {
getCdnUrl,
initData(){
// showLoading()
setTimeout(() => {
uni.stopPullDownRefresh();
}, 300);
},
setListData() {
},
}
}
</script>
<style lang="scss">
@import '@/common/uni-nvue.scss';
page {
background-color: #fff !important;
height: 100% !important;
}
</style>
<style scoped lang="scss">
.dbody{
padding: 30rpx;
}
</style>

View File

@ -0,0 +1,142 @@
<template>
<tpx-layout>
<template v-slot:body>
<scroll-view :scroll-y="true" @scrolltolower="onScrollBottom()" class="pos-abt-all"
>
<view class="pgb-cont">
<!-- 列表数据 -->
<!-- -->
<view>
<view v-for="(item) in dataList" class="blcok-white radius-20 mb-20" style="margin-top: 0;"
@click="handleTODetail(item)"
>
<u-text :text="'各国邮政新规'" size="30" :bold="true" lines="1"></u-text>
<u-row class="mt-20">
<view class="pr-10">
<u-text :text="'根据萨尔瓦多邮政通知,为了使萨尔瓦多邮政能在邮件抵达时,致电或'" size="28" color="#999" lines="2"></u-text>
</view>
<u-image height="100" width="150"></u-image>
</u-row>
<view class="mt-20">
<u-row justify="between">
<u-row>
<u-icon name="thumb-up" size="38" color="#999"></u-icon>
<u-text margin="0 0 0 10rpx" size="26" :text="66" color="#999"></u-text>
</u-row>
<view>
<u-text :text="'2012-10-11 10:22'" size="26" color="#999"></u-text>
</view>
</u-row>
</view>
</view>
</view>
<!-- 加载更多 -->
<u-loadmore icon-size="28" font-size="28" margin-top="30" v-if="showLoadMore || loadedAll"
:status="loadedAll ? 'nomore' : 'loading'" />
<!-- 空数据页 -->
<view v-if="dataList.length == 0" style="padding-top: 100rpx;">
<u-empty text="无数据" :icon="getCdnUrl('kong.png')" textSize="28" width="86" height="97">
</u-empty>
</view>
</view>
</scroll-view>
</template>
</tpx-layout>
</template>
<script>
import getCdnUrl from "@/common/getCdnUrl"
import { goto, goBack, setClipboardData, confirmModal, showLoading } from "@/common/untool"
export default {
props: {
// hasLeftWin: {
// type: Boolean
// }
},
computed: {
},
data() {
return {
searchParam: {
keyword: '',
},
queryOption: {},
dataList: [
{},{},{},{},{},{},{},{}
],
showLoadMore: false,
loadedAll: false
}
},
onShareAppMessage() {
return {
// title: '',
// path: 'TODO'
}
},
onLoad(queryOption) {
this.queryOption = queryOption
this.searchParam.tabType = queryOption.tab || tabList[0].val
this.initData();
},
onUnload() {
},
methods: {
getCdnUrl,
initData(){
// showLoading()
setTimeout(() => {
uni.stopPullDownRefresh();
}, 300);
},
setListData() {
},
onScrollBottom() {
console.log("onScrollBottom");
if (this.loadedAll) {
return;
}
this.showLoadMore = true;
setTimeout(() => {
this.setListData();
}, 300);
},
handleSearchMoreBtn(){
if(!this.showLoadMore) {
// 回显更多条件
Object.keys(this.tmpSearchParam).map(t=> {
this.tmpSearchParam[t] = this.searchParam[t] || ''
})
}
this.showSearchMore = !this.showSearchMore
},
handleTODetail(item={}) {
goto(`service/articledetail?id=${item.id}`)
},
}
}
</script>
<style lang="scss">
@import '@/common/uni-nvue.scss';
page {
background-color: #F6F6F6;
height: 100% !important;
}
</style>
<style scoped lang="scss">
.pgb-cont{
padding: 30rpx;
}
</style>

135
pages/service/list.vue Normal file
View File

@ -0,0 +1,135 @@
<template>
<tpx-layout>
<template v-slot:body>
<scroll-view :scroll-y="true" @scrolltolower="onScrollBottom()" class="pos-abt-all"
>
<view class="pgb-header">
<view class="com-jianju">
<!-- 关键字搜索框 -->
<tpx-search placeholder="选择省市区" v-model:value="searchParam.keyword" @change="handleSearchParamChange()" ></tpx-search>
</view>
</view>
<view class="pgb-cont">
<!-- 列表数据 -->
<!-- -->
<view>
<view v-for="(item) in dataList" class="blcok-white radius-20 mb-20" style="margin-top: 0;"
@click="handleTODetail(item)"
>
<u-text :text="'各国邮政新规'" size="30" :bold="true" lines="1"></u-text>
<u-text :text="'根据萨尔瓦多邮政通知,为了使萨尔瓦多邮政能在邮件抵达时,致电或'" size="28" color="#999" lines="2"></u-text>
</view>
</view>
<!-- 加载更多 -->
<u-loadmore icon-size="28" font-size="28" margin-top="30" v-if="showLoadMore || loadedAll"
:status="loadedAll ? 'nomore' : 'loading'" />
<!-- 空数据页 -->
<view v-if="dataList.length == 0" style="padding-top: 100rpx;">
<u-empty text="无数据" :icon="getCdnUrl('kong.png')" textSize="28" width="86" height="97">
</u-empty>
</view>
</view>
</scroll-view>
</template>
</tpx-layout>
</template>
<script>
import getCdnUrl from "@/common/getCdnUrl"
import { goto, goBack, setClipboardData, confirmModal, showLoading } from "@/common/untool"
export default {
props: {
// hasLeftWin: {
// type: Boolean
// }
},
computed: {
},
data() {
return {
searchParam: {
keyword: '',
},
queryOption: {},
dataList: [
{},{},{},{},{},{},{},{}
],
showLoadMore: false,
loadedAll: false
}
},
onShareAppMessage() {
return {
// title: '',
// path: 'TODO'
}
},
onLoad(queryOption) {
this.queryOption = queryOption
this.searchParam.tabType = queryOption.tab || tabList[0].val
this.initData();
},
onUnload() {
},
methods: {
getCdnUrl,
initData(){
// showLoading()
setTimeout(() => {
uni.stopPullDownRefresh();
}, 300);
},
setListData() {
},
onScrollBottom() {
console.log("onScrollBottom");
if (this.loadedAll) {
return;
}
this.showLoadMore = true;
setTimeout(() => {
this.setListData();
}, 300);
},
handleSearchMoreBtn(){
if(!this.showLoadMore) {
// 回显更多条件
Object.keys(this.tmpSearchParam).map(t=> {
this.tmpSearchParam[t] = this.searchParam[t] || ''
})
}
this.showSearchMore = !this.showSearchMore
},
}
}
</script>
<style lang="scss">
@import '@/common/uni-nvue.scss';
page {
background-color: #F6F6F6;
height: 100% !important;
}
</style>
<style scoped lang="scss">
.pgb-header {
// padding-top: --status-bar-height;
padding-top: 30rpx;
padding-bottom: 30rpx;
background-color: #FFF;
position: relative;
}
.pgb-cont{
padding: 30rpx;
}
</style>

View File

@ -30,7 +30,7 @@
<view class="pbody">
<view class="btnlist2">
<u-row gutter="20" custom-style="flex-wrap: wrap;">
<u-col v-for="tlItem in toolBtnlist" span="6">
<u-col v-for="tlItem in toolBtnlist" span="6" @click="goto(tlItem.url)">
<view style="margin: 0 0 20rpx 0;background: #F6F6F6;padding: 30rpx 28rpx;border-radius: 20rpx;position: relative;">
<u-row justify="between" >
<view class="neirong">
@ -72,14 +72,14 @@
{ title: '进仓单', subTitle: "这里是短语简介", icon: getCdnUrl(`sdg/t-jcd.png`), url: '' },
{ title: '时效预估', subTitle: "这里是短语简介", icon: getCdnUrl(`sdg/t-sxyg.png`), url: '' },
{ title: '运费试算', subTitle: "这里是短语简介", icon: getCdnUrl(`sdg/t-shisuan.png`), url: '' },
{ title: '我的订单', subTitle: "这里是短语简介", icon: getCdnUrl(`sdg/t-dingdan.png`), url: '' },
{ title: '我的订单', subTitle: "这里是短语简介", icon: getCdnUrl(`sdg/t-dingdan.png`), url: 'tabBar/search/search' },
{ title: '运单查询', subTitle: "这里是短语简介", icon: getCdnUrl(`sdg/t-yundan.png`), url: '' },
{ title: '地址簿', subTitle: "这里是短语简介", icon: getCdnUrl(`sdg/t-dizhi.png`), url: '' },
{ title: '网点查询', subTitle: "这里是短语简介", icon: getCdnUrl(`sdg/t-wangdain.png`), url: '' },
{ title: '地址簿', subTitle: "这里是短语简介", icon: getCdnUrl(`sdg/t-dizhi.png`), url: 'address/list' },
{ title: '网点查询', subTitle: "这里是短语简介", icon: getCdnUrl(`sdg/t-wangdain.png`), url: 'service/list' },
{ title: 'HSCODE', subTitle: "这里是短语简介", icon: getCdnUrl(`sdg/t-HS.png`), url: '' },
{ title: 'RECP', subTitle: "这里是短语简介", icon: getCdnUrl(`sdg/t-RE.png`), url: '' },
{ title: '扫码寄件', subTitle: "这里是短语简介", icon: getCdnUrl(`sdg/t-saoma.png`), url: '' },
{ title: '寄件须知', subTitle: "这里是短语简介", icon: getCdnUrl(`sdg/t-xuzhi.png`), url: '' },
{ title: '信息速递', subTitle: "这里是短语简介", icon: getCdnUrl(`sdg/t-xuzhi.png`), url: 'service/articlelist' },
]
}
},