首次完整推送,
V:1.20240808.006
This commit is contained in:
148
pages/ctms/tabbar/index/index.vue
Normal file
148
pages/ctms/tabbar/index/index.vue
Normal file
@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<!-- 轮播图 -->
|
||||
<view class="uni-margin-wrap">
|
||||
<swiper class="swiper" circular indicator-dots="true" autoplay="true" interval="2000" duration="500">
|
||||
<swiper-item v-for="(item, index) in banner" :key="index">
|
||||
<view class="swiper-item" @click="clickBannerItem(item)" :data-link="item.link">
|
||||
<image class="swiper-image" :src="item.image" mode="aspectFill" :draggable="true" />
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
|
||||
<image class="logo" src="@/static/logo.png"></image>
|
||||
<view class="text-area">
|
||||
<text class="title">安邮车联</text>
|
||||
</view>
|
||||
<view class="text-area">
|
||||
<text class="title">运车助手</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ctms from '@/apis/ctms/index.js';
|
||||
import utils from "@/utils/common.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
current: 0,
|
||||
swiperDotIndex: 0,
|
||||
banner: [{
|
||||
image: '/static/img/banner/banner.jpg',
|
||||
link: ""
|
||||
}]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickBannerItem(item) {
|
||||
if (item.link) {
|
||||
var link = item.link;
|
||||
uni.navigateTo({
|
||||
url: "/pages/common/webview/index?url=" + link
|
||||
})
|
||||
}
|
||||
},
|
||||
changeSwiper(e) {
|
||||
this.current = e.detail.current
|
||||
},
|
||||
getBanner() {
|
||||
ctms.ads.banner().then((res) => {
|
||||
var _data = res;
|
||||
if (_data) {
|
||||
this.banner = _data;
|
||||
}
|
||||
});
|
||||
},
|
||||
checkSplash() {
|
||||
var ls = "splashShowed";
|
||||
var a = uni.getStorageSync(ls);
|
||||
if (!a) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad: function() {
|
||||
this.checkSplash();
|
||||
},
|
||||
onShow: function() {
|
||||
this.getBanner();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 200rpx;
|
||||
width: 200rpx;
|
||||
margin-top: 200rpx;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
|
||||
.text-area {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
color: #8f8f94;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.uni-margin-wrap {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.uni-padding-wrap {
|
||||
width: 550rpx;
|
||||
padding: 0 100rpx;
|
||||
}
|
||||
|
||||
/*轮播幻灯*/
|
||||
.swiper {
|
||||
height: 300rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.swiper-list {
|
||||
margin-top: 40rpx;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.swiper-item {
|
||||
width: 100%;
|
||||
display: block;
|
||||
height: 300rpx;
|
||||
line-height: 300rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.swiper-image {
|
||||
width: 100%;
|
||||
height: 300rpx;
|
||||
}
|
||||
|
||||
/*滑动区*/
|
||||
.swiper-box {
|
||||
height: 370rpx;
|
||||
background: #fff;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.swiper-box .wx-swiper-dots.wx-swiper-dots-horizontal {
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
</style>
|
264
pages/ctms/tabbar/me/index.vue
Normal file
264
pages/ctms/tabbar/me/index.vue
Normal file
@ -0,0 +1,264 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="about">
|
||||
<view class="content">
|
||||
<view class="qrcode">
|
||||
<image src="@/static/logo.png"></image>
|
||||
<text class="tip">{{userinfo.username}}</text>
|
||||
</view>
|
||||
<view class="desc">
|
||||
{{config.about.slogan}}
|
||||
</view>
|
||||
|
||||
<view class="uni-card">
|
||||
<view class="uni-list">
|
||||
<view class="uni-list-cell-divider">
|
||||
|
||||
</view>
|
||||
<!-- #ifndef APP-PLUS -->
|
||||
<navigator v-for="item in menus" :url="item.url" class="uni-list-cell"
|
||||
hover-class="uni-list-cell-hover">
|
||||
<view class="uni-list-cell-navigate uni-navigate-right">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</navigator>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view v-for="item in menus" class="uni-list-cell" hover-class="uni-list-cell-hover"
|
||||
@click="go(item.url)">
|
||||
<view class="uni-list-cell-navigate uni-navigate-right">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<button type="primary" @click="share">分享</button>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view class="version">
|
||||
当前版本:{{version}}
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import utils from "@/utils/common.js";
|
||||
import config from "@/config/ctms.config.js";
|
||||
import ctms from '@/apis/ctms/index.js';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userinfo: {},
|
||||
menus: {
|
||||
// cloud: {
|
||||
// title: '我的资料',
|
||||
// url: '/uni_modules/uni-id-pages/pages/userinfo/userinfo'
|
||||
// },
|
||||
orderpre: {
|
||||
title: '我的询价',
|
||||
url: '../../orderpre/list/list'
|
||||
},
|
||||
order: {
|
||||
title: '运单记录',
|
||||
url: '../../order/list/list'
|
||||
},
|
||||
news: {
|
||||
title: '资讯报道',
|
||||
url: '../../news/list/list'
|
||||
},
|
||||
// yinsi: {
|
||||
// title: '隐私协议',
|
||||
// url: '/pages/uni-agree/uni-agree'
|
||||
// },
|
||||
about: {
|
||||
title: '关于App',
|
||||
url: '../../about/about'
|
||||
},
|
||||
login: {
|
||||
title: '切换登陆',
|
||||
url: '../../login/login'
|
||||
}
|
||||
},
|
||||
version: '',
|
||||
config: {}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
var configApp = getApp().globalData.config;
|
||||
//使用扩展运算符合并对象
|
||||
var _cfg = {
|
||||
...configApp,
|
||||
...config
|
||||
};
|
||||
this.config = _cfg;
|
||||
this.version = _cfg.version;
|
||||
},
|
||||
onShow() {
|
||||
this.userinfo = ctms.user.getInfo();
|
||||
},
|
||||
|
||||
methods: {
|
||||
// #ifdef APP-PLUS
|
||||
save() {
|
||||
uni.showActionSheet({
|
||||
itemList: ['保存图片到相册'],
|
||||
success: () => {
|
||||
plus.gallery.save(
|
||||
'https://public.hiluker.com/luker_fm2.png',
|
||||
function() {
|
||||
uni.showToast({
|
||||
title: '保存成功',
|
||||
icon: 'none'
|
||||
});
|
||||
},
|
||||
function() {
|
||||
uni.showToast({
|
||||
title: '保存失败,请重试!',
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
share(e) {
|
||||
var msg = "运车助手"
|
||||
plus.share.sendWithSystem();
|
||||
uni.shareWithSystem({
|
||||
summary: "安邮车联运车平台,一个专门服务于汽车托运的系统,致力于推动轿运市场标准化、现代化发展。",
|
||||
href: "http://ctms.hiluker.cn",
|
||||
success() {
|
||||
// 分享完成,请注意此时不一定是成功分享
|
||||
},
|
||||
fail() {
|
||||
// 分享失败
|
||||
}
|
||||
})
|
||||
},
|
||||
// #endif
|
||||
|
||||
go(e) {
|
||||
uni.navigateTo({
|
||||
url: e
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page,
|
||||
view {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
page {
|
||||
min-height: 100%;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 360rpx;
|
||||
height: 360rpx;
|
||||
}
|
||||
|
||||
.about {
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
padding: 30rpx;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.qrcode {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.qrcode .tip {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.desc {
|
||||
margin-top: 30rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.code {
|
||||
color: #e96900;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
button {
|
||||
width: 100%;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.version {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
justify-content: center;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.source {
|
||||
margin-top: 30rpx;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.source-list {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.link {
|
||||
color: #007AFF;
|
||||
}
|
||||
|
||||
.uni-list-cell-navigate {
|
||||
position: unset;
|
||||
}
|
||||
|
||||
navigator {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.uni-navigator.uni-list-cell-navigate.uni-navigate-right:after {
|
||||
font-family: uniicons;
|
||||
content: '\e583';
|
||||
position: relative;
|
||||
right: 0.75rem;
|
||||
top: 50%;
|
||||
color: #bbb;
|
||||
transform: translateY(-50%);
|
||||
width: 15rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
|
||||
.uni-list .uni-list-cell:last-child::after {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
.uni-list-cell::after {
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0.9375rem;
|
||||
height: 1px;
|
||||
content: '';
|
||||
transform: scaleY(.5);
|
||||
background-color: #c8c7cc;
|
||||
}
|
||||
</style>
|
203
pages/ctms/tabbar/mid/index.vue
Normal file
203
pages/ctms/tabbar/mid/index.vue
Normal file
@ -0,0 +1,203 @@
|
||||
<template>
|
||||
<view class="content" :class="active">
|
||||
|
||||
</view>
|
||||
<view class="tabbar-box-wrap">
|
||||
<view class="tabbar-box">
|
||||
<view class="tabbar-box-item" @click="goToPage('order/create/create')">
|
||||
<image class="box-image" src="@/static/img/tabbar/more/edit.png" mode="aspectFit"></image>
|
||||
<text class="explain">在线下单</text>
|
||||
</view>
|
||||
|
||||
<view class="tabbar-box-item" @click="tel()">
|
||||
<image class="box-image" src="@/static/img/tabbar/more/qa.png" mode="aspectFit"></image>
|
||||
<text class="explain">电话沟通</text>
|
||||
</view>
|
||||
|
||||
<!-- #ifdef APP -->
|
||||
<!-- <view class="tabbar-box-item" @click="scan">
|
||||
<image class="box-image" src="@/static/img/tabbar/more/scan.png" mode="aspectFit"></image>
|
||||
<text class="explain">扫码</text>
|
||||
</view> -->
|
||||
<!-- #endif -->
|
||||
|
||||
<view class="tabbar-box-item" @click="goToPage('orderpre/create/create')">
|
||||
<image class="box-image" src="@/static/img/tabbar/more/search.png" mode="aspectFit"></image>
|
||||
<text class="explain">询问价格</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import config from "@/config/ctms.config.js";
|
||||
import hi from '@/common/util.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
active: false
|
||||
};
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
// setTimeout(() => {
|
||||
this.active = true;
|
||||
// }, 500);
|
||||
},
|
||||
onHide() {
|
||||
this.active = false;
|
||||
},
|
||||
methods: {
|
||||
goToPage(url) {
|
||||
if (!url) return;
|
||||
url = config.pageDir + url;
|
||||
uni.navigateTo({
|
||||
url
|
||||
});
|
||||
},
|
||||
tel() {
|
||||
var phone = config.kfPhone;
|
||||
// hi.tel(phone);
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phone
|
||||
})
|
||||
},
|
||||
|
||||
//扫码
|
||||
scan() {
|
||||
var _that = this;
|
||||
uni.scanCode({
|
||||
scanType: ['barCode', 'qrCode'],
|
||||
success(res) {
|
||||
console.log('扫码结果', res);
|
||||
_that.scanRes(res);
|
||||
},
|
||||
fail() {
|
||||
uni.showToast({
|
||||
title: '扫码错误'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
//扫码结果处理
|
||||
scanRes(res) {
|
||||
var _r = res.result;
|
||||
//'https://u.wechat.com/ME4no24MU8DO0ark5TS5PEc' 微信个人二维码
|
||||
// https://w.url.cn/s/AKB4Eje?cak=GvVLZD6AkOhHn_usbiFQxQ 微信发票二维码
|
||||
// https://qr.4pyun.com/discount?token=5381321504173D00AD1866439E6A39D6 瑞都停车场优惠券二维码
|
||||
var _path = res.path; //二维码携带的路径
|
||||
///storage/emulated/0/Android/data/cn.hiluker.ctmsclient/apps/__UNI__B63B6BD/doc/uniapp_temp/compressed/1722789622562_mmexport1722789546405.jpg
|
||||
if (_r.substring(0, 4) === 'http') {
|
||||
console.log('应该跳转', _r)
|
||||
uni.navigateTo({
|
||||
url: '/pages/common/webview/index?url=' + _r,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
/* #ifdef H5 */
|
||||
height: calc(100vh - var(--window-bottom) - var(--window-top));
|
||||
/* #endif */
|
||||
/* #ifndef H5 */
|
||||
height: 100vh;
|
||||
/* #endif */
|
||||
transition: opacity 0.3s;
|
||||
|
||||
background-image: url('@/static/logo.png');
|
||||
background-size: 30%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
opacity: 0.5;
|
||||
|
||||
&.active {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* 创建一个伪元素来覆盖整个元素,并设置透明度 */
|
||||
.content::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
/* 设置白色半透明遮罩 */
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.tabbar-box-wrap {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
padding: 50upx;
|
||||
box-sizing: border-box;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
|
||||
.tabbar-box {
|
||||
position: relative;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
border-radius: 20upx;
|
||||
padding: 15upx 20upx;
|
||||
box-sizing: border-box;
|
||||
z-index: 2;
|
||||
box-shadow: 0px 2px 5px 2px rgba(0, 0, 0, 0.1);
|
||||
|
||||
&:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -16upx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
width: 50upx;
|
||||
height: 50upx;
|
||||
transform: rotate(45deg);
|
||||
background: #fff;
|
||||
z-index: 1;
|
||||
box-shadow: 2px 2px 5px 1px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #ffffff;
|
||||
border-radius: 20upx;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.tabbar-box-item {
|
||||
// position: relative;
|
||||
width: 100%;
|
||||
z-index: 3;
|
||||
margin: 10upx;
|
||||
color: $uni-color-subtitle;
|
||||
text-align: center;
|
||||
font-size: $uni-font-size-base;
|
||||
|
||||
.box-image {
|
||||
width: 100%;
|
||||
height: $uni-img-size-lg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
83
pages/ctms/tabbar/notice/index.vue
Normal file
83
pages/ctms/tabbar/notice/index.vue
Normal file
@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view v-if="!totalCount" class="content">
|
||||
暂时没有消息通知
|
||||
</view>
|
||||
|
||||
<uni-collapse v-else v-model="showIndexs">
|
||||
<uni-collapse-item :name='"notice-"+index' :title='"("+(index+1)+")"+notice.title'
|
||||
v-for="(notice,index) in notices" :data-nid="notice.id" :key="index" thumb="./static/logo.png">
|
||||
<uni-list>
|
||||
<uni-list-item :title="notice.content" :note="'更新于 : '+notice.updateTime"></uni-list-item>
|
||||
</uni-list>
|
||||
</uni-collapse-item>
|
||||
</uni-collapse>
|
||||
|
||||
<view class="pagination">
|
||||
<uni-pagination :show-icon="false" :total="totalCount" :pageSize='psize' v-model='page' title="分页栏"
|
||||
@change="newPage" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import utils from "@/utils/common.js";
|
||||
import ctms from '@/apis/ctms/index.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showIndexs: [],
|
||||
notices: {},
|
||||
totalCount: 0,
|
||||
psize: 10,
|
||||
page: 1
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.checkNotice()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.page = 1;
|
||||
this.checkNotice();
|
||||
setTimeout(() => {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 3000);
|
||||
},
|
||||
methods: {
|
||||
//刷新列表
|
||||
checkNotice() {
|
||||
var _that = this;
|
||||
ctms.notice.list(this.page, this.psize).then(
|
||||
function(res) {
|
||||
if (res) {
|
||||
_that.notices = res.notices;
|
||||
for (var index in res.notices) {
|
||||
if (res.notices[index]['is_show']) {
|
||||
_that.showIndexs.push('notice-' + index);
|
||||
}
|
||||
}
|
||||
_that.totalCount = res.total;
|
||||
} else {
|
||||
_that.orders = {}
|
||||
_that.totalCount = 0;
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
//分页器动作
|
||||
newPage(e) {
|
||||
var page = e.current;
|
||||
this.page = page;
|
||||
this.checkNotice();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.content {
|
||||
text-align: center;
|
||||
height: 400upx;
|
||||
margin-top: 200upx;
|
||||
}
|
||||
</style>
|
211
pages/ctms/tabbar/order/index.vue
Normal file
211
pages/ctms/tabbar/order/index.vue
Normal file
@ -0,0 +1,211 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="uni-common-mt uni-form">
|
||||
<form @submit="formSubmit" @reset="formReset">
|
||||
<view class="uni-form-item ">
|
||||
<view class="title">车牌号:</view>
|
||||
<input class="uni-input" name="carno" v-model="search.carno"
|
||||
:placeholder="'车牌号或车架号,如 '+demoCarno" />
|
||||
</view>
|
||||
|
||||
<view class="uni-form-item ">
|
||||
<view class="title">手机号:</view>
|
||||
<input class="uni-input" name="phone" readonly="readonly" disabled="disabled" :value="search.phone"
|
||||
type="text" placeholder="发车人或收车人的手机号" />
|
||||
</view>
|
||||
|
||||
<view class="uni-form-item" v-if="false">
|
||||
<view class="title">运单号:</view>
|
||||
<input class="uni-input" name="ordersn" v-model="search.ordersn" type="text"
|
||||
placeholder="完整的运单号码" />
|
||||
</view>
|
||||
|
||||
<view class="uni-form-item">
|
||||
<view class="help-block">
|
||||
如果搜索不出结果,可尝试检查一下搜索条件是否正确无误。
|
||||
</view>
|
||||
</view>
|
||||
<uni-notice-bar text="手机号为自动获取您登陆时使用的手机号,如果需要更换查询用的手机号,请退出账号并使用新手机号登陆."></uni-notice-bar>
|
||||
|
||||
<view class="uni-btn-v">
|
||||
<button class="btn btn-success" form-type="submit">查询</button>
|
||||
<button class="btn btn-error" type="default" @click="reset">重置</button>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import config from "@/config/ctms.config.js";
|
||||
import store from '@/store/index.js';
|
||||
import utils from "@/utils/common.js";
|
||||
import ctms from '@/apis/ctms/index.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userinfo: {},
|
||||
search: {
|
||||
carno: '',
|
||||
phone: '',
|
||||
ordersn: ''
|
||||
},
|
||||
demoCarno: config.demoCarno,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
checkLogin() {
|
||||
return ctms.user.checkLogin()
|
||||
},
|
||||
formSubmit: function(e) {
|
||||
var _that = this;
|
||||
// utils.debug('form发生了submit事件,携带数据为:' + JSON.stringify(e.detail.value))
|
||||
//进行表单检查
|
||||
var formData = e.detail.value;
|
||||
|
||||
ctms.order.search(formData).then(
|
||||
function(res) {
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: "查询完成!",
|
||||
icon: "success"
|
||||
});
|
||||
_that.goTo('order/list/list');
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "查询结束,没有数据!",
|
||||
icon: "success"
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
formReset: function(e) {
|
||||
// utils.debug('清空数据')
|
||||
},
|
||||
reset: function() {
|
||||
this.search = {};
|
||||
this.search.phone = this.userinfo.mobile;
|
||||
},
|
||||
goTo(page) {
|
||||
page = config.pageDir + page;
|
||||
uni.navigateTo({
|
||||
url: page
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
var user = ctms.user.getInfo();
|
||||
this.userinfo = user;
|
||||
this.search.phone = user.mobile;
|
||||
},
|
||||
onShow: function() {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
body {
|
||||
background-color: #e6e6e60e;
|
||||
}
|
||||
|
||||
radio,
|
||||
checkbox,
|
||||
switch {
|
||||
transform: scale(1.5);
|
||||
margin-left: 1rem;
|
||||
margin-right: 1rem;
|
||||
margin-top: 36rpx;
|
||||
}
|
||||
|
||||
input {
|
||||
margin-left: 1rem;
|
||||
margin-right: 1rem;
|
||||
margin-top: 66rpx;
|
||||
border-bottom: 1upx #333 dashed;
|
||||
}
|
||||
|
||||
.uni-input {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding-bottom: 50rpx;
|
||||
}
|
||||
|
||||
.header {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.header>image {
|
||||
width: 300rpx;
|
||||
height: 300rpx;
|
||||
}
|
||||
|
||||
.uni-form {
|
||||
width: 94%;
|
||||
margin: 0rpx 3% 0 3%;
|
||||
}
|
||||
|
||||
.uni-form-item {
|
||||
width: 100%;
|
||||
display: inline-flex;
|
||||
height: 96rpx;
|
||||
line-height: 96rpx;
|
||||
}
|
||||
|
||||
.uni-form-item .title,
|
||||
.uni-form-item .data {}
|
||||
|
||||
/**不生效**/
|
||||
.uni-form-item .title {
|
||||
width: 150rpx;
|
||||
padding: 40rpx 20rpx;
|
||||
text-align: justify;
|
||||
text-align-last: justify;
|
||||
}
|
||||
|
||||
.uni-form .uni-btn-v {
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
|
||||
.radio {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 40rpx 30rpx;
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
background-color: #09BB07;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn-error {
|
||||
background-color: #fc0107;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: block;
|
||||
/* width: 100%; */
|
||||
font-size: 1rem;
|
||||
height: 1rem;
|
||||
line-height: 1.5rem;
|
||||
margin: 1.5rem;
|
||||
}
|
||||
|
||||
.help-block {
|
||||
display: block;
|
||||
width: 100%;
|
||||
color: #666666;
|
||||
font-size: 0.8rem;
|
||||
line-height: 1rem;
|
||||
margin: 1.5rem;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user