三轮车购买页面完成
This commit is contained in:
parent
8965c01b23
commit
96d0fb5e81
67
api/file.js
67
api/file.js
@ -1,45 +1,50 @@
|
||||
import {
|
||||
HTTP_REQUEST_URL_THREE,
|
||||
HEADER,
|
||||
TOKENNAME,
|
||||
HTTP_REQUEST_URL_THREE,
|
||||
HEADER,
|
||||
TOKENNAME,
|
||||
} from '@/config/app';
|
||||
import { Toast } from '../libs/uniApi';
|
||||
import {
|
||||
Toast
|
||||
} from '../libs/uniApi';
|
||||
// import { checkLogin } from '../libs/login';
|
||||
import store from '../store';
|
||||
|
||||
function toLogin() {
|
||||
store.commit("LOGOUT");
|
||||
uni.showToast({
|
||||
title: '请登录',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
store.commit("LOGOUT");
|
||||
uni.showToast({
|
||||
title: '请登录',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
}
|
||||
|
||||
function upLoad(url, data) {
|
||||
let Url = HTTP_REQUEST_URL_THREE,
|
||||
header = {}
|
||||
if (store.state.app.token) header[TOKENNAME] = store.state.app.token;
|
||||
return new Promise((reslove, reject) => {
|
||||
uni.uploadFile({
|
||||
url: Url + '/api' + url,
|
||||
filePath: data.filePath,
|
||||
name: data.name,
|
||||
success: (uploadFileRes) => {
|
||||
uploadFileRes.data = JSON.parse(uploadFileRes.data)
|
||||
if(uploadFileRes.data.code==1) reslove(uploadFileRes.data)
|
||||
else Toast('网络错误')
|
||||
},
|
||||
fail: (err) => {
|
||||
Toast('网络错误')
|
||||
}
|
||||
})
|
||||
});
|
||||
let Url = HTTP_REQUEST_URL_THREE,
|
||||
header = {}
|
||||
if (store.state.app.token) header[TOKENNAME] = store.state.app.token;
|
||||
return new Promise((reslove, reject) => {
|
||||
uni.uploadFile({
|
||||
url: Url + '/api' + url,
|
||||
filePath: data.filePath,
|
||||
name: data.name,
|
||||
success: (uploadFileRes) => {
|
||||
uploadFileRes.data = JSON.parse(uploadFileRes.data)
|
||||
if (uploadFileRes.data.code == 1) reslove(uploadFileRes.data)
|
||||
else Toast('网络错误')
|
||||
},
|
||||
fail: (err) => {
|
||||
Toast('网络错误')
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
export const upLoadImage = (data)=>{
|
||||
return upLoad('/upload/image', data)
|
||||
export const upLoadImage = (data) => {
|
||||
return upLoad('/upload/image', data)
|
||||
}
|
||||
|
||||
export const VIDEO_URL = HTTP_REQUEST_URL_THREE + '/api/upload/video'
|
||||
export const FILE_URL = HTTP_REQUEST_URL_THREE + '/api/upload/file'
|
||||
export const FILE_URL = HTTP_REQUEST_URL_THREE + '/api/upload/file'
|
||||
// im文件上传
|
||||
// export const VIDEO_URL_IM = HTTP_REQUEST_URL_THREE + '/api/upload/video'
|
||||
export const FILE_URL_IM = HTTP_REQUEST_URL_THREE + '/common/im/sendFileMsg'
|
@ -14,6 +14,10 @@ export const upVehicleApi = (data) => oahttp.post('/vehicle/rentApply', data)
|
||||
export const applycarApi = (data) => oahttp.post('/vehicle/rentApply', data)
|
||||
// 显示轨迹
|
||||
export const locusApi = (data) => oahttp.post('/vehicle/vehicleTrack', data)
|
||||
// 获取可购买车辆列表
|
||||
export const canBuyCarListApi = (data) => oahttp.post('/vehicle/vehicleTrack', data)
|
||||
// 购买车辆
|
||||
export const buyCarApi = (data) => oahttp.post('/vehicle/vehicleTrack', data)
|
||||
// 当前车辆位置信息
|
||||
// export const locusApi = (data) => oahttp.post('/vehicle/vehicleTrack', data)
|
||||
// api / getCarLocal
|
||||
|
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<view class="login">
|
||||
<!-- <image class="bg-iamge" src="../../static/img/login/login_back_img.png"></image> -->
|
||||
<hx-lottie :options="options" ref="lottie" style="width: 100vw;height: 100vh;transform: scale(1.3);background-color: #0122c7;"/>
|
||||
<u-navbar v-if="uniMP" @leftClick="leftClick" bgColor="rgba(0,0,0,0)"
|
||||
leftIconColor=" #fff" :autoBack="false">
|
||||
</u-navbar>
|
||||
<hx-lottie :options="options" ref="lottie"
|
||||
style="width: 100vw;height: 100vh;transform: scale(1.3);background-color: #0122c7;" />
|
||||
<u-navbar v-if="uniMP" @leftClick="leftClick" bgColor="rgba(0,0,0,0)" leftIconColor=" #fff" :autoBack="false">
|
||||
</u-navbar>
|
||||
<!-- #ifdef APP-PLUS||H5 -->
|
||||
<!-- <view style="height: var(--status-bar-height)"></view> -->
|
||||
<!-- #endif -->
|
||||
@ -18,10 +18,10 @@
|
||||
</view>
|
||||
<input @click="getId" class="mobile item" v-model="formData.account" type="tel"
|
||||
placeholder="输入账号" />
|
||||
<input style="width: 0;height: 0;opacity: 0;margin: 0;padding: 0;" v-model="formData.account" type="tel"
|
||||
placeholder="输入账号" />
|
||||
<input @click="getId" class="mobile item" v-model="formData.password"
|
||||
maxlength="26" placeholder="输入密码" password type="safe-password" />
|
||||
<input style="width: 0;height: 0;opacity: 0;margin: 0;padding: 0;" v-model="formData.account"
|
||||
type="tel" placeholder="输入账号" />
|
||||
<input @click="getId" class="mobile item" v-model="formData.password" maxlength="26"
|
||||
placeholder="输入密码" password type="safe-password" />
|
||||
<!-- <input v-if="current == 1" class="mobile item" v-model="formData.account" placeholder="输入手机号" />
|
||||
<view v-if="current == 1" class="code item">
|
||||
<input placeholder="输入验证码" v-model="formData.code" maxlength="6" />
|
||||
@ -42,12 +42,14 @@
|
||||
loginAccount,
|
||||
userInfo
|
||||
} from "@/api/oaUser.js"
|
||||
import { getConfig } from "@/api/config.js";
|
||||
import {
|
||||
getConfig
|
||||
} from "@/api/config.js";
|
||||
import {
|
||||
Toast
|
||||
} from "../../libs/uniApi";
|
||||
import bj from "@/static/animation/bj2.json"
|
||||
import encrypt from "@/utils/encrypt.js"
|
||||
import bj from "@/static/animation/bj2.json"
|
||||
import encrypt from "@/utils/encrypt.js"
|
||||
// #ifdef APP-PLUS
|
||||
var jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||
|
||||
@ -56,11 +58,11 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
options: {
|
||||
data: '',
|
||||
},
|
||||
uniMP: false,
|
||||
APP_token: '',
|
||||
options: {
|
||||
data: '',
|
||||
},
|
||||
uniMP: false,
|
||||
APP_token: '',
|
||||
tabList: [{
|
||||
name: '账号登录'
|
||||
},
|
||||
@ -74,33 +76,33 @@
|
||||
terminal: 6, //6是APP端
|
||||
scene: 1,
|
||||
register_id: "",
|
||||
shop_token: ""
|
||||
shop_token: ""
|
||||
},
|
||||
tips: '获取验证码',
|
||||
// refCode: null,
|
||||
seconds: 60,
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.APP_token = uni.getStorageSync('APP_token');
|
||||
this.options.data = bj;
|
||||
// this.$refs.lottie.call('play');
|
||||
this.initTerminal();
|
||||
},
|
||||
onShow() {
|
||||
if(uni.getStorageSync('uniMP'))this.uniMP = true;
|
||||
},
|
||||
onLoad() {
|
||||
this.APP_token = uni.getStorageSync('APP_token');
|
||||
this.options.data = bj;
|
||||
// this.$refs.lottie.call('play');
|
||||
this.initTerminal();
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync('uniMP')) this.uniMP = true;
|
||||
},
|
||||
methods: {
|
||||
changeTabs(e) {
|
||||
this.current = e.index;
|
||||
this.formData.scene = e.index + 1;
|
||||
},
|
||||
leftClick(e) {
|
||||
uni.sendHostEvent('closeApp', e, (ret) => {
|
||||
//发送消息成功回调
|
||||
console.log('关闭应用'+JSON.stringify(ret));
|
||||
});
|
||||
},
|
||||
leftClick(e) {
|
||||
uni.sendHostEvent('closeApp', e, (ret) => {
|
||||
//发送消息成功回调
|
||||
console.log('关闭应用' + JSON.stringify(ret));
|
||||
});
|
||||
},
|
||||
// 获取设备id
|
||||
getId() {
|
||||
// #ifdef APP-PLUS
|
||||
@ -118,13 +120,13 @@
|
||||
if (!this.formData.account) return Toast('账号不能为空');
|
||||
if (this.formData.scene == 1 && !this.formData.password) return Toast('密码不能为空');
|
||||
if (this.formData.scene == 2 && !this.formData.code) return Toast('验证码不能为空');
|
||||
this.formData.shop_token = uni.getStorageSync('APP_token');
|
||||
this.formData.shop_token = uni.getStorageSync('APP_token');
|
||||
let that = this;
|
||||
uni.showLoading({
|
||||
title: '正在登录中'
|
||||
})
|
||||
let res = await loginAccount(that.formData);
|
||||
encrypt.encode('ACT', that.formData);
|
||||
encrypt.encode('ACT', that.formData);
|
||||
this.$store.commit('SET_USERINFO', {
|
||||
user: data,
|
||||
token: res.data.token
|
||||
@ -133,8 +135,8 @@
|
||||
data
|
||||
} = await userInfo();
|
||||
this.$store.commit('setUserInfo', data);
|
||||
let config = await getConfig();
|
||||
this.$store.commit('SET_CONFIG', config.data);
|
||||
let config = await getConfig();
|
||||
this.$store.commit('SET_CONFIG', config.data);
|
||||
uni.hideLoading()
|
||||
if (data.is_new_user) {
|
||||
uni.showLoading({
|
||||
@ -150,13 +152,13 @@
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
return uni.reLaunch({
|
||||
url: '/pages/oaHome/oaHome',
|
||||
success: () => {
|
||||
uni.$emit('initOaTask'); // 更新任务
|
||||
uni.hideLoading()
|
||||
}
|
||||
})
|
||||
return uni.reLaunch({
|
||||
url: '/pages/oaHome/oaHome',
|
||||
success: () => {
|
||||
uni.$emit('initOaTask'); // 更新任务
|
||||
uni.hideLoading()
|
||||
}
|
||||
})
|
||||
} else uni.navigateTo({
|
||||
url: '/pages/updatePassword/updatePassword'
|
||||
});
|
||||
@ -223,7 +225,7 @@
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
overflow: hidden;
|
||||
background-color: $theme-oa-color;
|
||||
/* #ifdef H5 */
|
||||
// background-image: url("../../static/img/login/login_back_img.png");
|
||||
@ -238,10 +240,10 @@
|
||||
// }
|
||||
|
||||
.body {
|
||||
position: absolute;
|
||||
top: 45%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
position: absolute;
|
||||
top: 45%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
@ -257,10 +259,10 @@
|
||||
line-height: 68rpx;
|
||||
-webkit-background-clip: text;
|
||||
}
|
||||
|
||||
::v-deep uni-input{
|
||||
min-height: 0 !important;
|
||||
}
|
||||
|
||||
::v-deep uni-input {
|
||||
min-height: 0 !important;
|
||||
}
|
||||
|
||||
.login-card {
|
||||
width: 694rpx;
|
||||
|
@ -4,8 +4,7 @@
|
||||
<!-- 消息 -->
|
||||
<view class="content" @click="showPlus=false" id="content" v-show='!showLoading'>
|
||||
<view class="">
|
||||
<u-loadmore :status="status"
|
||||
:loadmore-text="`你正在与${manager_nmae}聊天`" />
|
||||
<u-loadmore :status="status" :loadmore-text="`你正在与${manager_nmae}聊天`" />
|
||||
</view>
|
||||
<view class="task-li" v-for="item,index in list" :key="index">
|
||||
<view class="" v-if="index %5 ==0" style="text-align: center;">
|
||||
@ -15,16 +14,17 @@
|
||||
<view v-if="item.from_user_id!=fromId">
|
||||
<view class="task-li-r">
|
||||
<view class="" style="margin-right: 10rpx;">
|
||||
<u--image :showLoading="true" :src="item.from_user_avatar" shape="circle" width="40px" height="40px"></u--image>
|
||||
<u--image :showLoading="true" :src="item.from_user_avatar" shape="circle" width="40px"
|
||||
height="40px"></u--image>
|
||||
</view>
|
||||
<view @longpress="copyText(item.content)" class="task-li-content" v-if="item.type=='text'"
|
||||
style="margin-right: 10rpx;">
|
||||
<view style="color: #576B95;" @click="href(item.content)" v-if="isLink(item.content)">
|
||||
{{item.content}}
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
{{item.content}}
|
||||
</view>
|
||||
<view style="color: #576B95;" @click="href(item.content)" v-if="isLink(item.content)">
|
||||
{{item.content}}
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
{{item.content}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- 图片 -->
|
||||
<view class="task-li-content" v-if="item.type=='image'" style="margin-right: 10rpx;"
|
||||
@ -35,7 +35,9 @@
|
||||
<view class="task-li-content" v-if="item.type=='video'"
|
||||
style="margin-right: 10rpx;position: relative;"
|
||||
@tap="showOverLayFn(item.content,item.type)">
|
||||
<u--image :showLoading="true" :src=" item.content+'?x-oss-process=video\/snapshot,t_1000,m_fast,w_800,f_png' " width="100px" height="80px"></u--image>
|
||||
<u--image :showLoading="true"
|
||||
:src=" item.content+'?x-oss-process=video\/snapshot,t_1000,m_fast,w_800,f_png' "
|
||||
width="100px" height="80px"></u--image>
|
||||
<view class="yl-text">
|
||||
<u-icon name="play-circle" color='white' size='30'></u-icon>
|
||||
</view>
|
||||
@ -50,15 +52,15 @@
|
||||
<!-- 文字 -->
|
||||
<view class="task-li-content" @longpress="copyText(item.content)" v-if="item.type=='text'"
|
||||
style="margin-right: 10rpx;">
|
||||
<!-- {{item.content}} -->
|
||||
|
||||
<view style="color: #576B95;" @click="href(item.content)" v-if="isLink(item.content)">
|
||||
{{item.content}}
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
{{item.content}}
|
||||
</view>
|
||||
<!-- <a href="item.content" target="_blank"> {{item.content}}</a> -->
|
||||
<!-- {{item.content}} -->
|
||||
|
||||
<view style="color: #576B95;" @click="href(item.content)" v-if="isLink(item.content)">
|
||||
{{item.content}}
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
{{item.content}}
|
||||
</view>
|
||||
<!-- <a href="item.content" target="_blank"> {{item.content}}</a> -->
|
||||
</view>
|
||||
<!-- 图片 -->
|
||||
<view class="task-li-content" v-if="item.type=='image'" style="margin-right: 10rpx;"
|
||||
@ -68,7 +70,9 @@
|
||||
<!-- 视频 -->
|
||||
<view class="task-li-content" v-if="item.type=='video'"
|
||||
style="margin-right: 10rpx;position: relative;" @tap="showOverLayFn(item.content,item.type)">
|
||||
<u--image :showLoading="true" :src=" item.content+'?x-oss-process=video\/snapshot,t_1000,m_fast,w_800,f_png' " width="100px" height="80px"></u--image>
|
||||
<u--image :showLoading="true"
|
||||
:src=" item.content+'?x-oss-process=video\/snapshot,t_1000,m_fast,w_800,f_png' "
|
||||
width="100px" height="80px"></u--image>
|
||||
<view class="yl-text">
|
||||
<u-icon name="play-circle" color='white' size='30'></u-icon>
|
||||
</view>
|
||||
@ -84,8 +88,8 @@
|
||||
<view class="task-li-content" style="margin-right: 10rpx;">
|
||||
<video :src="item.localSrc" controls id="vi1" style="width: 400rpx; height: 100px;"></video>
|
||||
<!-- <image :src="" style="width:200rpx" mode="widthFix"></image> -->
|
||||
<u-loadmore status="loading" loading-text="努力上传中" />
|
||||
|
||||
<u-loadmore status="loading" loading-text="努力上传中" />
|
||||
|
||||
</view>
|
||||
<view class="" style="margin-right: 10rpx;">
|
||||
<u--image :showLoading="true" shape="circle" :src="a" width="40px" height="40px"></u--image>
|
||||
@ -94,8 +98,8 @@
|
||||
<view class="localTask" v-if="item.localType=='image'">
|
||||
<view class="task-li-content" style="margin-right: 10rpx;">
|
||||
<image :src="item.localSrc" style="width:200rpx" mode="widthFix"></image>
|
||||
<u-loadmore status="loading" loading-text="努力上传中" />
|
||||
|
||||
<u-loadmore status="loading" loading-text="努力上传中" />
|
||||
|
||||
</view>
|
||||
<view class="" style="margin-right: 10rpx;">
|
||||
<u--image :showLoading="true" shape="circle" :src="a" width="40px" height="40px"></u--image>
|
||||
@ -112,7 +116,7 @@
|
||||
<view class="bottom">
|
||||
<!-- -->
|
||||
<view class="send-col">
|
||||
<input type="text" class="send-ipt" @focus="scrollFn" v-model="value" placeholder="请输入聊天内容"
|
||||
<input type="text" class="send-ipt" @focus="scrollFn" v-model="value" placeholder="请输入聊天内容"
|
||||
placeholder-style="color:#DDD;" :cursor-spacing="6">
|
||||
|
||||
<u--image :showLoading="true" src="/static/img/bussness/Plus.png" width="32px" height="32px"
|
||||
@ -146,21 +150,28 @@
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
sendMsgApi,getMsgListApi,bindScoket,sendFileApi,getAreaManagerApi
|
||||
FILE_URL_IM
|
||||
} from "@/api/file.js"
|
||||
import {
|
||||
sendMsgApi,
|
||||
getMsgListApi,
|
||||
bindScoket,
|
||||
sendFileApi,
|
||||
getAreaManagerApi
|
||||
} from "@/api/bussness.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showLoading:true,
|
||||
showLoading: true,
|
||||
a: "https://img1.baidu.com/it/u=716638254,3920932970&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1695920400&t=aeec3d0e86c23759d5f82b3757e9b442",
|
||||
list: [],
|
||||
bind:false,
|
||||
bind: false,
|
||||
value: "",
|
||||
showPlus: false,
|
||||
scollNum: 500000000000,
|
||||
client_id: "",
|
||||
fromId: "",
|
||||
toId:"",
|
||||
toId: "",
|
||||
name: "",
|
||||
status: "loadmore",
|
||||
page_no: 1,
|
||||
@ -170,30 +181,30 @@
|
||||
overLayType: "",
|
||||
local: [],
|
||||
localType: "",
|
||||
imageList:[],
|
||||
sendData:{},
|
||||
manager_nmae:"",
|
||||
msg_id:"",
|
||||
aaa:false,
|
||||
imageList: [],
|
||||
sendData: {},
|
||||
manager_nmae: "",
|
||||
msg_id: "",
|
||||
aaa: false,
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isLink(text){
|
||||
var pattern = /^(https?:\/\/|www\.|.*\.com).*$/i;
|
||||
return pattern.test(text);
|
||||
isLink(text) {
|
||||
var pattern = /^(https?:\/\/|www\.|.*\.com).*$/i;
|
||||
return pattern.test(text);
|
||||
},
|
||||
href(url){
|
||||
href(url) {
|
||||
// uni.navigate
|
||||
plus.runtime.openURL(url);
|
||||
// plus.runtime.openUrl(url)
|
||||
},
|
||||
previewImage(src) {
|
||||
this.imageList[0]=src
|
||||
uni.previewImage({
|
||||
urls: this.imageList,
|
||||
})
|
||||
},
|
||||
previewImage(src) {
|
||||
this.imageList[0] = src
|
||||
uni.previewImage({
|
||||
urls: this.imageList,
|
||||
})
|
||||
},
|
||||
generateRandId() {
|
||||
var d = new Date().getTime();
|
||||
var uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
||||
@ -202,26 +213,26 @@
|
||||
return (c == "x" ? r : r & 0x3 | 0x8).toString(16);
|
||||
});
|
||||
// return uuid;
|
||||
this.msg_id=uuid
|
||||
this.msg_id = uuid
|
||||
console.log("改变id")
|
||||
},
|
||||
timeFn(time) {
|
||||
time=time*1000
|
||||
time = time * 1000
|
||||
const currentDate = new Date(); // 当前日期对象
|
||||
const targetDate = new Date(time);
|
||||
if (this.isSameDay(currentDate, targetDate)) {
|
||||
const hours = targetDate.getHours(); // 小时
|
||||
const minutes = targetDate.getMinutes(); // 分钟
|
||||
return hours + ':' + (minutes>=10?minutes:'0'+minutes);
|
||||
|
||||
return hours + ':' + (minutes >= 10 ? minutes : '0' + minutes);
|
||||
|
||||
} else if (this.isYesterday(currentDate, targetDate)) {
|
||||
return '昨天';
|
||||
}
|
||||
const month = targetDate.getMonth() + 1; // 月份(注意月份从0开始,需要加1)
|
||||
const day = targetDate.getDate(); // 日期
|
||||
return month + '月' + day + '日';
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
isSameDay(date1, date2) {
|
||||
return (
|
||||
@ -229,13 +240,13 @@
|
||||
date1.getMonth() === date2.getMonth() &&
|
||||
date1.getDate() === date2.getDate()
|
||||
);
|
||||
|
||||
|
||||
},
|
||||
isYesterday(currentDate, targetDate) {
|
||||
const yesterday = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate() - 1);
|
||||
return this.isSameDay(yesterday, targetDate);
|
||||
},
|
||||
toast(msg){
|
||||
toast(msg) {
|
||||
uni.showToast({
|
||||
title: msg,
|
||||
icon: 'none'
|
||||
@ -274,48 +285,48 @@
|
||||
},
|
||||
getListFn() {
|
||||
getMsgListApi({
|
||||
from_user_id:this.fromId,
|
||||
to_user_id:this.toId,
|
||||
scene:0,
|
||||
page_no:this.page_no,
|
||||
page_size:10
|
||||
}).then(res=>{
|
||||
if(res.data.length<=0){
|
||||
from_user_id: this.fromId,
|
||||
to_user_id: this.toId,
|
||||
scene: 0,
|
||||
page_no: this.page_no,
|
||||
page_size: 10
|
||||
}).then(res => {
|
||||
if (res.data.length <= 0) {
|
||||
uni.stopPullDownRefresh();
|
||||
this.status="nomore"
|
||||
this.status = "nomore"
|
||||
return
|
||||
}
|
||||
this.list=res.data.reverse().concat(this.list )
|
||||
uni.stopPullDownRefresh();
|
||||
this.list = res.data.reverse().concat(this.list)
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
scrollFn() {
|
||||
let that=this
|
||||
this.scollNum+=100
|
||||
let that = this
|
||||
this.scollNum += 100
|
||||
setTimeout(() => {
|
||||
uni.pageScrollTo({
|
||||
scrollTop: that.scollNum,// 滚动的实际距离
|
||||
success:function(){
|
||||
console.log('滚动')
|
||||
}
|
||||
})
|
||||
uni.pageScrollTo({
|
||||
scrollTop: that.scollNum, // 滚动的实际距离
|
||||
success: function() {
|
||||
console.log('滚动')
|
||||
}
|
||||
})
|
||||
}, 100)
|
||||
|
||||
|
||||
},
|
||||
sendFn() {
|
||||
let that=this
|
||||
let that = this
|
||||
if (!this.value) {
|
||||
this.toast("消息不能为空")
|
||||
return
|
||||
}
|
||||
}
|
||||
let data = {
|
||||
from_user_id: this.fromId,
|
||||
to_user_id:this.toId,
|
||||
to_user_id: this.toId,
|
||||
type: "text",
|
||||
content: this.value,
|
||||
scene:0,
|
||||
create_time:(Date.now()/1000),
|
||||
msg_id:this.msg_id
|
||||
scene: 0,
|
||||
create_time: (Date.now() / 1000),
|
||||
msg_id: this.msg_id
|
||||
}
|
||||
sendMsgApi({
|
||||
...data
|
||||
@ -333,7 +344,7 @@
|
||||
showPlusFn() {
|
||||
this.showPlus = !this.showPlus
|
||||
this.scrollFn()
|
||||
|
||||
|
||||
},
|
||||
choseImgFn() {
|
||||
this.generateRandId()
|
||||
@ -344,42 +355,42 @@
|
||||
success: res => {
|
||||
const tempFilePath = res.tempFilePaths[0];
|
||||
that.local.push({
|
||||
localType:'image',
|
||||
localSrc:tempFilePath,
|
||||
status:true,
|
||||
msg_id:that.msg_id
|
||||
localType: 'image',
|
||||
localSrc: tempFilePath,
|
||||
status: true,
|
||||
msg_id: that.msg_id
|
||||
})
|
||||
that.showPlus = false
|
||||
that.scrollFn()
|
||||
console.log(that.local)
|
||||
uni.uploadFile({
|
||||
url: "https://worker-task.lihaink.cn/common/im/sendFileMsg",
|
||||
uni.uploadFile({
|
||||
url: FILE_URL_IM,
|
||||
filePath: tempFilePath, // 选择的图片文件路径
|
||||
name: 'file',
|
||||
header: {
|
||||
"Authorization": uni.getStorageSync("TOKEN")
|
||||
},
|
||||
formData: {
|
||||
from_user_id:that.fromId,
|
||||
to_user_id:that.toId,
|
||||
scene:0,
|
||||
msg_id:that.msg_id,
|
||||
type:'image'
|
||||
from_user_id: that.fromId,
|
||||
to_user_id: that.toId,
|
||||
scene: 0,
|
||||
msg_id: that.msg_id,
|
||||
type: 'image'
|
||||
},
|
||||
success: function(uploadRes) {
|
||||
let data=JSON.parse(uploadRes.data).data
|
||||
|
||||
var localIndex =that.local.findIndex(function (element) {
|
||||
return element.msg_id === data.msg_id;
|
||||
});
|
||||
that.local[localIndex].status=false
|
||||
let data = JSON.parse(uploadRes.data).data
|
||||
|
||||
var localIndex = that.local.findIndex(function(element) {
|
||||
return element.msg_id === data.msg_id;
|
||||
});
|
||||
that.local[localIndex].status = false
|
||||
that.list.push(data)
|
||||
},
|
||||
fail: function(error) {
|
||||
this.toast('上传失败')
|
||||
this.toast('上传失败')
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
fail: err => {
|
||||
this.toast('操作取消')
|
||||
@ -396,36 +407,36 @@
|
||||
success: res => {
|
||||
const tempFilePath = res.tempFilePath;
|
||||
that.local.push({
|
||||
localType:'video',
|
||||
localSrc:tempFilePath,
|
||||
status:true,
|
||||
msg_id:that.msg_id
|
||||
localType: 'video',
|
||||
localSrc: tempFilePath,
|
||||
status: true,
|
||||
msg_id: that.msg_id
|
||||
})
|
||||
|
||||
that.showPlus = false
|
||||
that.scrollFn()
|
||||
uni.uploadFile({
|
||||
url: "https://worker-task.lihaink.cn/common/im/sendFileMsg",
|
||||
url: FILE_URL_IM,
|
||||
filePath: tempFilePath, // 选择的图片文件路径
|
||||
name: 'file',
|
||||
header: {
|
||||
"Authorization": uni.getStorageSync("token")
|
||||
},
|
||||
formData: {
|
||||
from_user_id:that.fromId,
|
||||
to_user_id:that.toId,
|
||||
scene:0,
|
||||
msg_id:that.msg_id,
|
||||
type:'video'
|
||||
from_user_id: that.fromId,
|
||||
to_user_id: that.toId,
|
||||
scene: 0,
|
||||
msg_id: that.msg_id,
|
||||
type: 'video'
|
||||
}, // 服务端接收文件的字段名
|
||||
|
||||
|
||||
success: function(uploadRes) {
|
||||
|
||||
let data=JSON.parse(uploadRes.data).data
|
||||
var localIndex =that.local.findIndex(function (element) {
|
||||
return element.msg_id === data.msg_id;
|
||||
});
|
||||
that.local[localIndex].status=false
|
||||
|
||||
let data = JSON.parse(uploadRes.data).data
|
||||
var localIndex = that.local.findIndex(function(element) {
|
||||
return element.msg_id === data.msg_id;
|
||||
});
|
||||
that.local[localIndex].status = false
|
||||
that.list.push(data)
|
||||
// 处理上传成功的逻辑
|
||||
},
|
||||
@ -440,7 +451,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
},
|
||||
fail: err => {
|
||||
// uni.showToast({
|
||||
@ -453,29 +464,31 @@
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
this.page_no=1
|
||||
this.page_no = 1
|
||||
this.generateRandId()
|
||||
this.fromId= JSON.parse( uni.getStorageSync("USER_INFO")).id
|
||||
|
||||
getAreaManagerApi({user_id:this.fromId}).then(res=>{
|
||||
this.toId=res.data.to_user_id
|
||||
this.manager_nmae=res.data.manager_name
|
||||
this.fromId = JSON.parse(uni.getStorageSync("USER_INFO")).id
|
||||
|
||||
getAreaManagerApi({
|
||||
user_id: this.fromId
|
||||
}).then(res => {
|
||||
this.toId = res.data.to_user_id
|
||||
this.manager_nmae = res.data.manager_name
|
||||
getMsgListApi({
|
||||
from_user_id:this.fromId,
|
||||
to_user_id:this.toId,
|
||||
scene:0,
|
||||
page_no:1,
|
||||
page_size:10
|
||||
}).then(res=>{
|
||||
this.showLoading=false
|
||||
this.list=res.data.reverse()
|
||||
from_user_id: this.fromId,
|
||||
to_user_id: this.toId,
|
||||
scene: 0,
|
||||
page_no: 1,
|
||||
page_size: 10
|
||||
}).then(res => {
|
||||
this.showLoading = false
|
||||
this.list = res.data.reverse()
|
||||
this.scrollFn()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
async onPullDownRefresh() {
|
||||
let that=this
|
||||
let that = this
|
||||
this.status = "loading"
|
||||
this.page_no++
|
||||
await this.getListFn()
|
||||
@ -483,48 +496,49 @@
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
let user=JSON.parse(uni.getStorageSync('USER_INFO'))
|
||||
this.a=user.avatar
|
||||
console.log(F)
|
||||
let user = JSON.parse(uni.getStorageSync('USER_INFO'))
|
||||
this.a = user.avatar
|
||||
console.log(user.avatar)
|
||||
uni.connectSocket({
|
||||
url: 'wss://worker-task.lihaink.cn/wss'
|
||||
url: 'wss://worker-task.lihaink.cn/wss'
|
||||
});
|
||||
uni.onSocketOpen(function (res) {
|
||||
console.log('WebSocket连接已打开!');
|
||||
uni.onSocketOpen(function(res) {
|
||||
console.log('WebSocket连接已打开!');
|
||||
});
|
||||
uni.onSocketError(function (res) {
|
||||
console.log('WebSocket连接打开失败,请检查!');
|
||||
uni.onSocketError(function(res) {
|
||||
console.log('WebSocket连接打开失败,请检查!');
|
||||
});
|
||||
let that=this
|
||||
let that = this
|
||||
uni.onSocketMessage(function(res) {
|
||||
let data=JSON.parse(res.data)
|
||||
if(data.client_id){
|
||||
let client_id= data.client_id
|
||||
if(!that.bind){
|
||||
let data = JSON.parse(res.data)
|
||||
if (data.client_id) {
|
||||
let client_id = data.client_id
|
||||
if (!that.bind) {
|
||||
bindScoket({
|
||||
client_id:client_id,
|
||||
user_id:that.fromId,
|
||||
scene:0,
|
||||
}).then(res=>{
|
||||
that.bind=true
|
||||
client_id: client_id,
|
||||
user_id: that.fromId,
|
||||
scene: 0,
|
||||
}).then(res => {
|
||||
that.bind = true
|
||||
})
|
||||
}
|
||||
}
|
||||
// 收到消息
|
||||
else if(data.type!='ping') {
|
||||
console.log(data)
|
||||
that.list.push(data)
|
||||
that.scrollFn()
|
||||
}
|
||||
else if (data.type != 'ping') {
|
||||
console.log(data)
|
||||
that.list.push(data)
|
||||
that.scrollFn()
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
this.generateRandId()
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -534,10 +548,11 @@
|
||||
color: white;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
transform: translate(-50%, -50%);
|
||||
font-size: 24rpx;
|
||||
|
||||
}
|
||||
|
||||
.topflag {
|
||||
height: 80rpx;
|
||||
background-color: #F6F7FD;
|
||||
@ -548,6 +563,7 @@
|
||||
min-height: 95vh;
|
||||
background-color: #F6F7FD;
|
||||
padding-top: 10rpx;
|
||||
|
||||
.task-li {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
@ -563,11 +579,13 @@
|
||||
|
||||
.task-li-content {
|
||||
background-color: white;
|
||||
padding: 20rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
line-height: 50rpx;
|
||||
// line-height: 30rpx;
|
||||
border-radius: 20rpx;
|
||||
// color: white;
|
||||
word-break: break-all;
|
||||
max-width: 60vw;
|
||||
max-width: 535rpx;
|
||||
overflow-wrap: break-word;
|
||||
|
||||
|
||||
|
@ -1,144 +1,222 @@
|
||||
<template>
|
||||
<view class="box">
|
||||
<view class="car-list" v-for="item,index in carList" :key="index">
|
||||
<view class="car-info">
|
||||
<view class="car-info-l">
|
||||
<view class="">
|
||||
<u--image :src="a" width="150rpx" height="150rpx"
|
||||
style="margin-right:20rpx"></u--image>
|
||||
<!-- 搜索 -->
|
||||
<view class="" style="padding:10rpx 20rpx;">
|
||||
<u-search :showAction="true" bgColor='white' @search="queryCarFn" placeholder="搜索车牌号" actionText="搜索"
|
||||
:animation="true" v-model="queryCar" @custom='queryCarFn'></u-search>
|
||||
</view>
|
||||
<view style="height: 80vh;" v-if="carList.length==0">
|
||||
<u-empty mode="search" marginTop='100' icon="/static/img/empty/data.png">
|
||||
</u-empty>
|
||||
</view>
|
||||
<view v-else class="car-list" v-for="item,index in carList" :key="index">
|
||||
<view class="car-info">
|
||||
<view class="car-info-l">
|
||||
<view class="">
|
||||
<u--image :src="a" width="150rpx" height="150rpx" style="margin-right:20rpx"></u--image>
|
||||
</view>
|
||||
<view class="car-info-c">
|
||||
<view class="lincense">
|
||||
车牌号: {{item.lincense}}
|
||||
</view>
|
||||
<view class="lincense">
|
||||
行驶里程: 1212KM
|
||||
</view>
|
||||
<view class="lincense">
|
||||
当前状态: 平台公司闲置中
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="car-info-c">
|
||||
<view class="lincense">
|
||||
车牌号: 12121545454
|
||||
<!-- -->
|
||||
<view class="car-info-r">
|
||||
<view class="" style="margin: 10rpx 50rpx;">
|
||||
<u-checkbox-group v-model="item.checked" placement="column" @change="checkboxChange(index)">
|
||||
<u-checkbox>
|
||||
</u-checkbox>
|
||||
</u-checkbox-group>
|
||||
</view>
|
||||
<view class="lincense">
|
||||
行驶里程: 1212KM
|
||||
<view class="" v-show="index==carCheckedArr[0]">
|
||||
选择该车辆为监管车辆
|
||||
</view>
|
||||
<view class="lincense">
|
||||
当前状态: 平台公司闲置中
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<view class="" @tap="open">
|
||||
已选择{{carCheckedArr.length}}辆车
|
||||
</view>
|
||||
<view class="bottom-btn" @tap="buyCarFn">
|
||||
<u-button type="primary" style="background-color: #0122C7;border: none;" text="确定"></u-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 组件 -->
|
||||
<u-popup :show="showPop" mode="bottom" @close="close" @open="open">
|
||||
<view class="pop">
|
||||
<view class="check-car-list" v-for="item,index in carList" v-show="item.checked.length" :key="index">
|
||||
<u--image :src="a" width="150rpx" height="150rpx"></u--image>
|
||||
<view class="" style="margin-top: 10rpx;">
|
||||
{{item.lincense}}
|
||||
</view>
|
||||
<view class="pop-check">
|
||||
<u-checkbox-group v-model="item.checked" @change="popChange(index)">
|
||||
<u-checkbox>
|
||||
</u-checkbox>
|
||||
</u-checkbox-group>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="car-info-r">
|
||||
选择该车辆为监管车辆
|
||||
<view class="" style="margin: 10rpx 50rpx;">
|
||||
<u-checkbox-group
|
||||
v-model="checkboxValue1[index]"
|
||||
placement="column"
|
||||
@change="checkboxChange(index)"
|
||||
>
|
||||
<u-checkbox
|
||||
>
|
||||
</u-checkbox>
|
||||
</u-checkbox-group>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="bottom">
|
||||
<view class="" @tap="open">
|
||||
已选择2辆车
|
||||
</view>
|
||||
<view class="bottom-btn">
|
||||
<u-button type="primary" text="确定"></u-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 组件 -->
|
||||
<u-popup :show="showPop" mode="bottom" @close="close" @open="open">
|
||||
<view class="pop">
|
||||
<view class="check-car-list" v-for="item,index in checkList" :key="index">
|
||||
<u--image :src="a" width="150rpx" height="150rpx"
|
||||
></u--image>
|
||||
<view class="" style="margin-top: 10rpx;">
|
||||
dsfdsfdf
|
||||
</view>
|
||||
<view class="pop-check" >
|
||||
<checkbox activeBorderColor='red' color="#FFCC33" backgroundColor='#FFCC33'></checkbox>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script scoped>
|
||||
// import { methods } from '../../uni_modules/uview-ui/libs/mixin/mixin'
|
||||
export default{
|
||||
data(){
|
||||
return{
|
||||
a:"https://tse3-mm.cn.bing.net/th/id/OIP-C.0xzWZj1_A-nzJiUBxrk8XQHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
|
||||
carList:[1,1,1,1,1,1,,1,1,],
|
||||
showPop:false,
|
||||
checkList:[1,1,1,1,1,1,1,1],
|
||||
checkboxValue1:[],
|
||||
arr:[]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
,methods:{
|
||||
checkboxChange(i){
|
||||
if(this.arr.includes(i)){
|
||||
// this.arr
|
||||
}else{
|
||||
|
||||
this.arr.push(i)
|
||||
// import { methods } from '../../uni_modules/uview-ui/libs/mixin/mixin'
|
||||
import {
|
||||
canBuyCarListApi,
|
||||
buyCarApi
|
||||
} from "@/api/property.js"
|
||||
import {
|
||||
Toast
|
||||
} from "../../libs/uniApi"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
queryCar: '',
|
||||
a: "https://tse3-mm.cn.bing.net/th/id/OIP-C.0xzWZj1_A-nzJiUBxrk8XQHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
|
||||
carList: [],
|
||||
carListI: [{
|
||||
checked: [],
|
||||
lincense: '川Y103D1'
|
||||
}, {
|
||||
checked: [],
|
||||
lincense: '川Y103D6'
|
||||
}, {
|
||||
checked: [],
|
||||
lincense: '川Y103D5'
|
||||
}, {
|
||||
checked: [],
|
||||
lincense: '川Y103D4'
|
||||
}, {
|
||||
checked: [],
|
||||
lincense: '川Y103D3'
|
||||
}, {
|
||||
checked: [],
|
||||
lincense: '川Y103D2'
|
||||
}],
|
||||
showPop: false,
|
||||
carCheckeList: [1, 1, 1, 1, 1, 1, 1, 1],
|
||||
carCheckedArr: []
|
||||
}
|
||||
|
||||
console.log(this.arr)
|
||||
},
|
||||
close() {
|
||||
this.showPop=false
|
||||
methods: {
|
||||
buyCarFn() {
|
||||
if (this.carCheckedArr.length == 0) {
|
||||
Toast("请先选择车辆!")
|
||||
return
|
||||
}
|
||||
// buyCarApi({}).then(res => {
|
||||
// Toast("购买成功!")
|
||||
// setTimeout(() => {
|
||||
// uni.navigateTo({
|
||||
// url: '/subpkg/property/index'
|
||||
// })
|
||||
// }, 500)
|
||||
|
||||
// })
|
||||
uni.navigateTo({
|
||||
url: '/subpkg/property/index'
|
||||
})
|
||||
},
|
||||
queryCarFn() {
|
||||
this.carList = []
|
||||
this.carListI.forEach(item => {
|
||||
if (item.lincense.includes(this.queryCar)) {
|
||||
this.carList.push(item)
|
||||
}
|
||||
})
|
||||
},
|
||||
checkboxChange(i) {
|
||||
if (this.carCheckedArr.includes(i)) {
|
||||
// let index=this.ca
|
||||
let index = this.carCheckedArr.indexOf(i)
|
||||
// console.log(index)
|
||||
this.carCheckedArr.splice(index, 1)
|
||||
// this.arr
|
||||
} else {
|
||||
this.carCheckedArr.push(i)
|
||||
}
|
||||
// console.log(this.carCheckedArr)
|
||||
},
|
||||
popChange(index) {
|
||||
this.checkboxChange(index)
|
||||
console.log(this.carCheckedArr)
|
||||
},
|
||||
close() {
|
||||
this.showPop = false
|
||||
},
|
||||
open() {
|
||||
if (this.carCheckedArr.length == 0) return
|
||||
this.showPop = true
|
||||
},
|
||||
change(e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
open(){
|
||||
this.showPop=true
|
||||
},
|
||||
change(e){
|
||||
console.log(e)
|
||||
|
||||
onLoad() {
|
||||
// canBuyCarListApi({}).then(res => {
|
||||
// this.carListI = res.data
|
||||
// })
|
||||
this.carList = Array.from(this.carListI);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.box{
|
||||
.box {
|
||||
padding-bottom: 100rpx;
|
||||
}
|
||||
.car-list{
|
||||
|
||||
.car-list {
|
||||
padding: 20rpx;
|
||||
background-color: #fff;
|
||||
|
||||
// padding-bottom: 200rpx;
|
||||
.car-info{
|
||||
.car-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20rpx;
|
||||
.car-info-l{
|
||||
|
||||
.car-info-l {
|
||||
display: flex;
|
||||
}
|
||||
.car-info-c{
|
||||
|
||||
.car-info-c {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.car-info-r{
|
||||
|
||||
.car-info-r {
|
||||
max-width: 20vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
.pop{
|
||||
|
||||
.pop {
|
||||
min-height: 40vh;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx 10rpx;
|
||||
padding: 20rpx 10rpx;
|
||||
padding-right: 0;
|
||||
padding-bottom: 100rpx;
|
||||
.check-car-list{
|
||||
|
||||
.check-car-list {
|
||||
// margin-right: 30rpx;
|
||||
width: 182.5rpx;
|
||||
display: flex;
|
||||
@ -147,13 +225,15 @@
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
.pop-check{
|
||||
|
||||
.pop-check {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: -5rpx;
|
||||
}
|
||||
}
|
||||
.bottom{
|
||||
|
||||
.bottom {
|
||||
background-color: white;
|
||||
height: 100rpx;
|
||||
position: fixed;
|
||||
@ -165,10 +245,11 @@
|
||||
padding: 0 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.bottom-btn{
|
||||
width: 200rpx;
|
||||
}
|
||||
justify-content: space-between;
|
||||
|
||||
.bottom-btn {
|
||||
width: 200rpx;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
@ -8,23 +8,18 @@
|
||||
<view class="noCar" v-if='company_type==18'>
|
||||
<!-- 申请 -->
|
||||
<view class="" v-if="step==6||step==9999">
|
||||
|
||||
<u-empty text="你还没有所属车辆哦,请向镇公司申请用车或使用自有车辆并绑定系统~" icon="../../static/img/empty/data.png">
|
||||
</u-empty>
|
||||
<view class="">
|
||||
|
||||
<mytn text='购买车辆' ></mytn>
|
||||
<view>
|
||||
<mytn text='购买车辆' class="buyCar" :position="false" @click="navgo('/subpkg/property/buyCar')">
|
||||
</mytn>
|
||||
</view>
|
||||
<view>
|
||||
<mytn text='申请用车' class="upCar" :position="false" @click="applycarFn"></mytn>
|
||||
|
||||
</view>
|
||||
<view class="">
|
||||
|
||||
<mytn text='上传自有车辆' @click="show=true"></mytn>
|
||||
</view>
|
||||
|
||||
|
||||
<u-modal :show="show" @close="show=false" :showCancelButton="true" @confirm="upCarFn"
|
||||
:closeOnClickOverlay="true" @cancel="show=false" title="车辆上传">
|
||||
<view class="slot-content">
|
||||
@ -70,7 +65,6 @@
|
||||
|
||||
<!-- 等待 -->
|
||||
<view class="" v-if='[5,-1,0,1,2].includes(step)'>
|
||||
|
||||
<view class="loading" v-if='step==5'>
|
||||
<span>你已提交解除申请,等待签约</span>
|
||||
<span class="dots">...</span>
|
||||
@ -90,7 +84,14 @@
|
||||
<span class="dots">...</span>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 购买车辆 -->
|
||||
<view class="loading" v-if="datas.type==999999999999999">
|
||||
<span>您的购车申请已经提交,我们正在加快审核中,请耐心等待,在此期间您可以继续使用车辆完成配送任务哦~</span>
|
||||
<span class="dots">...</span>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 审核结束 -->
|
||||
<view class="" v-if="step==4">
|
||||
<view style="margin-top: 15vh;">
|
||||
@ -170,7 +171,6 @@
|
||||
申请用车</u-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- 镇街公司 -->
|
||||
<view v-if='company_type==16'>
|
||||
@ -188,6 +188,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<text v-if="datas.self_num">自有车辆 {{datas.self_num}}</text>
|
||||
<!-- <text v-if="datas.self_num">出售车辆 {{datas.self_num}}</text> -->
|
||||
</view>
|
||||
<!-- 公告栏 -->
|
||||
<view class="application_tit" v-if="applicationList.length">
|
||||
@ -276,7 +277,6 @@
|
||||
<view class="slot-content">
|
||||
<u--input placeholder="请输入内容" type="number" v-model="newCarNum"></u--input>
|
||||
<view style="color: red;font-size: 20rpx;" v-show="novalue">
|
||||
|
||||
<view class="" v-if="newCarNum>datas.can_rent_num">
|
||||
数量超过上限
|
||||
</view>
|
||||
@ -300,6 +300,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
FILE_URL_IM
|
||||
} from "@/api/file.js"
|
||||
import {
|
||||
getvehicleListApi,
|
||||
getAgencyListApi,
|
||||
@ -345,41 +348,21 @@
|
||||
newcarTit: "",
|
||||
flag: false,
|
||||
showpopp: false,
|
||||
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
|
||||
// if (true) {
|
||||
// uni.navigateTo({
|
||||
// url: '/subpkg/property/vehicle_a'
|
||||
// })
|
||||
// }
|
||||
// getvehicleListApi().then(res => {
|
||||
// console.log(res)
|
||||
// // this.getvehicleList = res
|
||||
// })
|
||||
// getAgencyListApi().then(res => {
|
||||
// // this.applicationList=res
|
||||
|
||||
// })
|
||||
this.initIndex()
|
||||
setTimeout(() => {
|
||||
this.flag = true
|
||||
})
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.initIndex()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.initIndex()
|
||||
// 模拟上拉刷新
|
||||
// setTimeout(() => {
|
||||
// const newList = this.hostProduct.reverse();
|
||||
// this.hostProduct = newList;
|
||||
uni.stopPullDownRefresh();
|
||||
// }, 500)
|
||||
},
|
||||
|
||||
methods: {
|
||||
@ -423,7 +406,7 @@
|
||||
},
|
||||
confirmFn() {
|
||||
uni.reLaunch({
|
||||
url: '/subpkg/property/index' // 替换为需要刷新的页面路径
|
||||
url: '/subpkg/property/index'
|
||||
});
|
||||
},
|
||||
|
||||
@ -560,7 +543,19 @@
|
||||
position: fixed;
|
||||
bottom: 110rpx;
|
||||
left: 0;
|
||||
// z-index: 9999999;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
border-radius: 0;
|
||||
color: #fff;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
background-color: $theme-oa-color;
|
||||
}
|
||||
|
||||
.buyCar {
|
||||
position: fixed;
|
||||
bottom: 220rpx;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
border-radius: 0;
|
||||
|
@ -69,6 +69,7 @@
|
||||
height="80px"></u--image>
|
||||
<view class="text">
|
||||
<view class="name">《租赁合同》</view>
|
||||
<!-- <view class="name">《购买合同》</view> -->
|
||||
<view>
|
||||
<text>{{ datas.create_time}}</text>
|
||||
</view>
|
||||
@ -82,6 +83,10 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<mybtn text="购买车辆" @click="navTo('/subpkg/property/buyCar')"></mybtn>
|
||||
|
||||
</view>
|
||||
|
||||
<web-view style="height: 100vh;" :src="pdfUrl" v-if="showPDF"></web-view>
|
||||
@ -163,6 +168,11 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
navTo(url) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
// 计算到期时间
|
||||
overDateFn(date) {
|
||||
var specifiedDate = new Date(date);
|
||||
|
Loading…
x
Reference in New Issue
Block a user