Merge branch 'master' of http://122.51.230.86:3000/sunliwei/lanan-repair
# Conflicts: # config.js
This commit is contained in:
commit
96cb93ae35
19
api/login.js
19
api/login.js
@ -18,6 +18,14 @@ export function login(username, password, code, uuid) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 微信登录
|
||||||
|
export function wechatLogin(data) {
|
||||||
|
return request({
|
||||||
|
'url': '/weChat/wechatLogin',
|
||||||
|
'method': 'post',
|
||||||
|
'data':data
|
||||||
|
})
|
||||||
|
}
|
||||||
// 获取用户详细信息
|
// 获取用户详细信息
|
||||||
export function getInfo() {
|
export function getInfo() {
|
||||||
return request({
|
return request({
|
||||||
@ -59,6 +67,17 @@ export function loginApp(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function loginAppuserName(data) {
|
||||||
|
return request({
|
||||||
|
'url': '/userClient/weChat/login',
|
||||||
|
headers: {
|
||||||
|
isToken: false
|
||||||
|
},
|
||||||
|
method: 'post',
|
||||||
|
timeout: 20000,
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 使用租户域名(标识),获得租户编号
|
// 使用租户域名(标识),获得租户编号
|
||||||
export function getTenantIdByWebsite(website) {
|
export function getTenantIdByWebsite(website) {
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
// 应用全局配置
|
// 应用全局配置
|
||||||
module.exports = {
|
module.exports = {
|
||||||
//baseUrl: 'https://www.nuoyunr.com/admin-api',
|
//baseUrl: 'https://www.nuoyunr.com/admin-api',
|
||||||
|
baseUrl: 'https://3w823u8516.vicp.fun',
|
||||||
// baseUrl: 'http://192.168.1.4:48080',
|
// baseUrl: 'http://192.168.1.4:48080',
|
||||||
baseUrl: 'http://localhost:48080',
|
// baseUrl: 'http://localhost:48080',
|
||||||
imagesUrl: 'http://shequ.0315e.com/static/images/pages/',
|
imagesUrl: 'http://shequ.0315e.com/static/images/pages/',
|
||||||
baseImageUrl: 'https://www.nuoyunr.com/minio',
|
baseImageUrl: 'http://122.51.230.86:9000/',
|
||||||
//wsUrl: 'wss://www.nuoyunr.com/admin-api',
|
//wsUrl: 'wss://www.nuoyunr.com/admin-api',
|
||||||
wsUrl: 'ws://192.168.1.4:48080/admin-api',
|
wsUrl: 'ws://192.168.1.4:48080/admin-api',
|
||||||
// 应用信息
|
// 应用信息
|
||||||
|
@ -69,5 +69,15 @@
|
|||||||
"uniStatistics" : {
|
"uniStatistics" : {
|
||||||
"enable" : false
|
"enable" : false
|
||||||
},
|
},
|
||||||
|
"h5" : {
|
||||||
|
"router" : {
|
||||||
|
"base" : "/lanan-repair"
|
||||||
|
},
|
||||||
|
"devServer" : {
|
||||||
|
"port" : 8080,
|
||||||
|
"disableHostCheck" : true,
|
||||||
|
"https" : false
|
||||||
|
}
|
||||||
|
},
|
||||||
"vueVersion" : "2"
|
"vueVersion" : "2"
|
||||||
}
|
}
|
||||||
|
12
pages.json
12
pages.json
@ -6,12 +6,12 @@
|
|||||||
// "navigationBarTitleText": "uni-app"
|
// "navigationBarTitleText": "uni-app"
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
// {
|
{
|
||||||
// "path": "pages/login/login",
|
"path": "pages/login/login",
|
||||||
// "style": {
|
"style": {
|
||||||
// "navigationBarTitleText": "uni-app"
|
"navigationBarTitleText": "uni-app"
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
"path" : "pages/home/home",
|
"path" : "pages/home/home",
|
||||||
"style" :
|
"style" :
|
||||||
|
@ -37,20 +37,26 @@
|
|||||||
<script>
|
<script>
|
||||||
import request from '../../utils/request';
|
import request from '../../utils/request';
|
||||||
import {
|
import {
|
||||||
loginApp
|
loginAppuserName,
|
||||||
} from '@/api/login.js';
|
} from '@/api/login.js';
|
||||||
import {
|
import {
|
||||||
setToken,
|
setToken,
|
||||||
setTenantId
|
getToken,
|
||||||
|
setTenantId,
|
||||||
|
removeToken
|
||||||
} from '@/utils/auth.js'
|
} from '@/utils/auth.js'
|
||||||
import {
|
import {
|
||||||
login,
|
login,
|
||||||
getInfo,
|
getInfo,
|
||||||
getTenantIdByWebsite
|
getTenantIdByWebsite
|
||||||
} from '@/api/login.js'
|
} from '@/api/login.js'
|
||||||
|
import drawQrcode from "weapp-qrcode";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
//用户微信openId
|
||||||
|
openId: "",
|
||||||
phoneNumber: "",
|
phoneNumber: "",
|
||||||
baseUrl: this.$baseUrl,
|
baseUrl: this.$baseUrl,
|
||||||
isButtonDisabled: false,
|
isButtonDisabled: false,
|
||||||
@ -79,9 +85,80 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {
|
||||||
|
},
|
||||||
|
created(){
|
||||||
|
this.checkIfLogin()
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
checkIfLogin(){
|
||||||
|
if(getToken()){
|
||||||
|
//已登录
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/home/home'
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
//未登录
|
||||||
|
// this.checkIfCode()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*判断是否有code
|
||||||
|
* */
|
||||||
|
checkIfCode(){
|
||||||
|
let code = this.getUrlCode('code')
|
||||||
|
if (code !== null && code !== "") {
|
||||||
|
//自动登录
|
||||||
|
this.getOpenidAndUserinfo(code)
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '未获取到授权信息,请重新进入!!',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 微信自动登录
|
||||||
|
* @param {Object} code 用户code
|
||||||
|
*/
|
||||||
|
async getOpenidAndUserinfo(code) {
|
||||||
|
await request({
|
||||||
|
url: '/userClient/weChat/wechatLogin',
|
||||||
|
method: 'get',
|
||||||
|
params: {code:code}
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code==200) {
|
||||||
|
if(res.data.hasOwnProperty("accessToken")){
|
||||||
|
setToken(res.data.accessToken)
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/home/home'
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
//去注册
|
||||||
|
this.openId = res.data
|
||||||
|
//跳转到注册页
|
||||||
|
this.goregister()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取路径中的参数
|
||||||
|
* @param {Object} name
|
||||||
|
*/
|
||||||
|
getUrlCode(name) {
|
||||||
|
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ''])[1].replace(/\+/g, '%20')) || null
|
||||||
|
},
|
||||||
setidentity(text) {
|
setidentity(text) {
|
||||||
this.sfindex = text
|
this.sfindex = text
|
||||||
|
|
||||||
@ -112,18 +189,36 @@
|
|||||||
password: this.wrod,
|
password: this.wrod,
|
||||||
type: 0
|
type: 0
|
||||||
}
|
}
|
||||||
loginApp(data).then(res => {
|
loginAppuserName(data).then(res => {
|
||||||
if (res.data.needMobile === "1") {
|
if (res.code==200) {
|
||||||
uni.navigateTo({
|
if(res.data.hasOwnProperty("accessToken")){
|
||||||
url: '/pages/login/bindPhoe'
|
|
||||||
})
|
|
||||||
uni.setStorageSync('validaCodeToken', res.data.accessToken)
|
|
||||||
} else {
|
|
||||||
setToken(res.data.accessToken)
|
setToken(res.data.accessToken)
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/home/home'
|
url: '/pages/home/home'
|
||||||
})
|
})
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: '登录失败',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// if (res.data.needMobile === "1") {
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: '/pages/login/bindPhoe'
|
||||||
|
// })
|
||||||
|
// uni.setStorageSync('validaCodeToken', res.data.accessToken)
|
||||||
|
// } else {
|
||||||
|
// setToken(res.data.accessToken)
|
||||||
|
// uni.reLaunch({
|
||||||
|
// url: '/pages/home/home'
|
||||||
|
// })
|
||||||
|
// }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,7 +244,7 @@
|
|||||||
},
|
},
|
||||||
goregister() {
|
goregister() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/login/register'
|
url: '/pages/my/register?openId='+this.openId
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goforgot() {
|
goforgot() {
|
||||||
|
@ -13,7 +13,11 @@
|
|||||||
<view class="body">
|
<view class="body">
|
||||||
<view class="cardItem">
|
<view class="cardItem">
|
||||||
<view class="cardItemTop">
|
<view class="cardItemTop">
|
||||||
<image class="cardImg" src="" mode="aspectFill"></image>
|
<!-- <image class="cardImg" src="" mode="aspectFill"></image> -->
|
||||||
|
<view class="cardImg">
|
||||||
|
<view class="cardImgText">车辆保养卡</view>
|
||||||
|
<image class="cardImgBg" src="../../static/images/cardRollBg.png" mode="aspectFit"></image>
|
||||||
|
</view>
|
||||||
<view class="cardInfo">
|
<view class="cardInfo">
|
||||||
<view class="cardName">车辆保养卡</view>
|
<view class="cardName">车辆保养卡</view>
|
||||||
<view class="cardEndDate">2024-09-20</view>
|
<view class="cardEndDate">2024-09-20</view>
|
||||||
@ -98,6 +102,28 @@
|
|||||||
width: 136rpx;
|
width: 136rpx;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
background-color: #efefef;
|
background-color: #efefef;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.cardImgText {
|
||||||
|
color: #fff;
|
||||||
|
font-size: 24rpx;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cardImgBg {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cardInfo {
|
.cardInfo {
|
||||||
|
@ -74,13 +74,13 @@
|
|||||||
return {
|
return {
|
||||||
menuCard1: [
|
menuCard1: [
|
||||||
{ title: '我的资料', icon: require('@/static/icons/my-menu-icon1.png'), path: '/pages/my/myInfo' },
|
{ title: '我的资料', icon: require('@/static/icons/my-menu-icon1.png'), path: '/pages/my/myInfo' },
|
||||||
{ title: '消息中心', icon: require('@/static/icons/my-menu-icon2.png'), path: '/pages/my/message' },
|
{ title: '我的卡券', icon: require('@/static/icons/my-menu-icon5.png'), path: "/pages/my/cardRoll" },
|
||||||
{ title: '我的评价', icon: require('@/static/icons/my-menu-icon3.png'), path: '/pages/my/evaluate' },
|
{ title: '我的评价', icon: require('@/static/icons/my-menu-icon3.png'), path: '/pages/my/evaluate' },
|
||||||
],
|
],
|
||||||
menuCard2: [
|
menuCard2: [
|
||||||
|
{ title: '消息中心', icon: require('@/static/icons/my-menu-icon2.png'), path: '/pages/my/message' },
|
||||||
{ title: '客服中心', icon: require('@/static/icons/my-menu-icon4.png') },
|
{ title: '客服中心', icon: require('@/static/icons/my-menu-icon4.png') },
|
||||||
{ title: '操作指南', icon: require('@/static/icons/my-menu-icon5.png'), path: "/pages/guideList/guideList" },
|
{ title: '操作指南', icon: require('@/static/icons/my-menu-icon5.png'), path: "/pages/guideList/guideList" },
|
||||||
{ title: '我的卡卷', icon: require('@/static/icons/my-menu-icon5.png'), path: "/pages/my/cardRoll" },
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -5,58 +5,47 @@
|
|||||||
<view class="formItem">
|
<view class="formItem">
|
||||||
<view class="formLabel">姓名</view>
|
<view class="formLabel">姓名</view>
|
||||||
<view class="formContainer">
|
<view class="formContainer">
|
||||||
<input placeholder="请填写你的真实姓名" type="text" />
|
<input placeholder="请填写你的真实姓名" v-model="formData.cusName" type="text"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="formItem">
|
<view class="formItem">
|
||||||
<view class="formLabel">性别</view>
|
<view class="formLabel">性别</view>
|
||||||
<view class="formContainer">
|
<view class="formContainer">
|
||||||
<radio-group class="radioGroup">
|
<radio-group name="group1" class="radioGroup" :bindchange="radioChange">
|
||||||
<label class="radio">
|
<label class="radio" v-for="(item, index) in radioSexItems" :key="item.value">
|
||||||
<radio activeBackgroundColor="#009EDA" value="r1" checked="true" />男
|
<radio activeBackgroundColor="#009EDA" :value="item.value" :checked="item.checked"/>
|
||||||
</label>
|
{{item.name}}
|
||||||
<label class="radio">
|
|
||||||
<radio activeBackgroundColor="#009EDA" value="r2" />女
|
|
||||||
</label>
|
</label>
|
||||||
</radio-group>
|
</radio-group>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="formItem">
|
<view class="formItem">
|
||||||
<view class="formLabel">省份</view>
|
<view class="formLabel">身份证号</view>
|
||||||
<view class="formContainer">
|
<view class="formContainer">
|
||||||
<picker :range="addressRange" mode="multiSelector" @columnchange="addressColumnChangeFun">
|
<input placeholder="请填写你的身份证号" v-model="formData.idCard" type="text"/>
|
||||||
<view class="formPicker">
|
|
||||||
<input class="formPickerInput" type="text" disabled="true" placeholder="请选择所在省份/城市/区" />
|
|
||||||
<image class="formPickerBtn" src="../../static/icons/homeInfoMore.png" mode="aspectFit">
|
|
||||||
</image>
|
|
||||||
</view>
|
</view>
|
||||||
</picker>
|
</view>
|
||||||
|
<!-- <view class="formItem">-->
|
||||||
|
<!-- <view class="formLabel">生日</view>-->
|
||||||
|
<!-- <view class="formContainer">-->
|
||||||
|
<!-- <picker mode="date" :value="formData.birthday" start="1900-01-01" end="2050-12-12" :bindchange="bindDateChange">-->
|
||||||
|
<!-- </picker>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
<view class="formItem">
|
||||||
|
<view class="formLabel">手机号</view>
|
||||||
|
<view class="formContainer">
|
||||||
|
<input placeholder="请填写你的手机号" v-model="formData.phoneNumber" type="text"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="formItem">
|
<view class="formItem">
|
||||||
<view class="formLabel">详细地址</view>
|
<view class="formLabel">联系地址</view>
|
||||||
<view class="formContainer">
|
<view class="formContainer">
|
||||||
<picker :range="detailAddress" mode="multiSelector" @columnchange="detailColumnChangeFun">
|
<textarea placeholder="请填写你的联系地址" v-model="formData.address" maxlength="300"/>
|
||||||
<view class="formPicker">
|
|
||||||
<input class="formPickerInput" type="text" disabled="true" placeholder="请选择所在街道/小区" />
|
|
||||||
<image class="formPickerBtn" src="../../static/icons/homeInfoMore.png" mode="aspectFit">
|
|
||||||
</image>
|
|
||||||
</view>
|
|
||||||
</picker>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="formItem">
|
|
||||||
<view class="formLabel">上传图片</view>
|
|
||||||
<view class="formContainer">
|
|
||||||
<view class="">
|
|
||||||
<uni-file-picker :image-styles="{width: 80, height: 80}" v-model="imageValue"
|
|
||||||
fileMediatype="image" limit="1" mode="grid" @select="select" @progress="progress"
|
|
||||||
@success="success" @fail="fail">
|
|
||||||
<image style="width: 160rpx;height: 160rpx;" src="../../static/icons/addImageIcon.png"
|
|
||||||
mode="aspectFit"></image>
|
|
||||||
</uni-file-picker>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="dl" @click="getlogin()">
|
||||||
|
<text>注册</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -64,6 +53,10 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import VNavigationBar from '@/components/VNavigationBar.vue'
|
import VNavigationBar from '@/components/VNavigationBar.vue'
|
||||||
|
import request from "../../utils/request";
|
||||||
|
import {
|
||||||
|
setToken,
|
||||||
|
} from '@/utils/auth.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -71,6 +64,19 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
formData: {
|
||||||
|
openId: "",
|
||||||
|
cusName: "",
|
||||||
|
sex: "",
|
||||||
|
idCard:"",
|
||||||
|
phoneNumber:"",
|
||||||
|
address:"",
|
||||||
|
},
|
||||||
|
//性别
|
||||||
|
radioSexItems: [
|
||||||
|
{ name: '男', value: '0', checked: true },
|
||||||
|
{ name: '女', value: '1', checked: false },
|
||||||
|
],
|
||||||
detailAddress: [
|
detailAddress: [
|
||||||
['a', 'b'],
|
['a', 'b'],
|
||||||
['b', 'a']
|
['b', 'a']
|
||||||
@ -82,7 +88,105 @@
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
this.formData.openId = e.openId
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/**
|
||||||
|
* 注册
|
||||||
|
*/
|
||||||
|
async getlogin(){
|
||||||
|
//校验表单填写
|
||||||
|
if(this.checkForm()){
|
||||||
|
//获取选的性别
|
||||||
|
this.formData.sex = this.radioSexItems.filter(item => item.checked ===true)[0].value;
|
||||||
|
await request({
|
||||||
|
url: '/base/custom-app/register',
|
||||||
|
method: 'post',
|
||||||
|
data: this.formData
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code==200) {
|
||||||
|
if(res.data.hasOwnProperty("accessToken")){
|
||||||
|
setToken(res.data.accessToken)
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/home/home'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
checkForm(){
|
||||||
|
if(""==this.formData.cusName){
|
||||||
|
uni.showToast({
|
||||||
|
title: '请填写姓名',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if(""==this.formData.idCard || !this.isValidID(this.formData.idCard)){
|
||||||
|
uni.showToast({
|
||||||
|
title: '请填写正确的身份证号',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if(""==this.formData.phoneNumber || !this.isValidPhoneNumber(this.formData.phoneNumber)){
|
||||||
|
uni.showToast({
|
||||||
|
title: '请填写手机号',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if(""==this.formData.address){
|
||||||
|
uni.showToast({
|
||||||
|
title: '请填写联系地址',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 校验身份证号是否合法
|
||||||
|
* @param id
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
|
isValidID(id) {
|
||||||
|
const regex = /^[1-9]\d{5}(18|19|20|21|22)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|[Xx])$/;
|
||||||
|
return regex.test(id);
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 校验手机号
|
||||||
|
* @param phoneNumber
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
|
isValidPhoneNumber(phoneNumber) {
|
||||||
|
const regex = /^1[3-9]\d{9}$/;
|
||||||
|
return regex.test(phoneNumber);
|
||||||
|
},
|
||||||
|
bindDateChange(e) {
|
||||||
|
this.formData.birthday = e.detail.value;
|
||||||
|
},
|
||||||
|
radioChange: function(e) {
|
||||||
|
let radioItems = this.radioSexItems;
|
||||||
|
for (let i = 0, len = radioItems.length; i < len; ++i) {
|
||||||
|
radioItems[i].checked = radioItems[i].value === e.detail.value;
|
||||||
|
}
|
||||||
|
this.radioSexItems = radioItems;
|
||||||
|
},
|
||||||
|
submit() {
|
||||||
|
this.$refs.form.validate().then(res => {
|
||||||
|
console.log('表单数据信息:', res);
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('表单错误信息:', err);
|
||||||
|
})
|
||||||
|
},
|
||||||
detailColumnChangeFun({
|
detailColumnChangeFun({
|
||||||
detail
|
detail
|
||||||
}) {
|
}) {
|
||||||
@ -125,7 +229,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.container {
|
.container {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -186,4 +289,17 @@
|
|||||||
height: 28rpx;
|
height: 28rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.dl {
|
||||||
|
width: 90%;
|
||||||
|
height: 44px;
|
||||||
|
background: linear-gradient(-46deg, #0853C4 0%, #4282D8 80%);
|
||||||
|
border-radius: 5px;
|
||||||
|
margin: 0 auto;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #FFFFFF;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 22px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -3,76 +3,319 @@
|
|||||||
<VNavigationBar title="车辆详情" background-color="#fff" title-color="#333"></VNavigationBar>
|
<VNavigationBar title="车辆详情" background-color="#fff" title-color="#333"></VNavigationBar>
|
||||||
<view class="body">
|
<view class="body">
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<view class="formItem">
|
|
||||||
<text class="formLabel">车辆照片</text>
|
|
||||||
<image class="carImg" src="" mode="aspectFill"></image>
|
|
||||||
</view>
|
|
||||||
<view class="formItem">
|
<view class="formItem">
|
||||||
<text class="formLabel">车牌号</text>
|
<text class="formLabel">车牌号</text>
|
||||||
<text class="formValue">鲁A 781NB</text>
|
<input type="text" placeholder="请输入文本" v-model="car.licenseNumber"/>
|
||||||
</view>
|
</view>
|
||||||
<view class="formItem">
|
<view class="formItem">
|
||||||
<text class="formLabel">车辆持有人</text>
|
<text class="formLabel">品牌</text>
|
||||||
<text class="formValue">魏书豪</text>
|
<picker @change="brandChange" :value="brandIndex" :range="brandNamesComputed">
|
||||||
|
<view class="uni-input">{{ brandNamesComputed[brandIndex] }}</view>
|
||||||
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
<view class="formItem">
|
<view class="formItem">
|
||||||
<text class="formLabel">持有人电话</text>
|
<text class="formLabel">型号</text>
|
||||||
<text class="formValue">15726576890</text>
|
<input type="text" placeholder="请输入文本" v-model="car.carModelInput"/>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="formItem">
|
||||||
|
<text class="formLabel">车辆类别</text>
|
||||||
|
<picker @change="categoryChange" :value="categoryIndex" :range="categoryNamesComputed">
|
||||||
|
<view class="uni-input">{{ categoryNamesComputed[categoryIndex] }}</view>
|
||||||
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
<view class="card">
|
<view class="formItem">
|
||||||
<view class="formItem1">
|
<text class="formLabel">车辆性质</text>
|
||||||
<view class="labelVal">
|
<picker @change="natureChange" :value="natureIndex" :range="natureNamesComputed">
|
||||||
<text class="formLabel">车辆年检时间</text>
|
<view class="uni-input">{{ natureNamesComputed[natureIndex] }}</view>
|
||||||
<text class="formValue">2024年</text>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
<image class="formImg" src="" mode="aspectFill"></image>
|
<view class="formItem">
|
||||||
|
<text class="formLabel">注册日期</text>
|
||||||
|
<picker
|
||||||
|
mode="date"
|
||||||
|
:value="car.carRegisterDate"
|
||||||
|
start="2020-01-01"
|
||||||
|
end="2030-12-31"
|
||||||
|
@change="bindDateChange1">
|
||||||
|
<view style="margin-left: 10rpx">
|
||||||
|
{{ car.carRegisterDate}}
|
||||||
</view>
|
</view>
|
||||||
<view class="formItem1">
|
</picker>
|
||||||
<view class="labelVal">
|
|
||||||
<text class="formLabel">车辆保险时间</text>
|
|
||||||
<text class="formValue">2024年</text>
|
|
||||||
</view>
|
|
||||||
<image class="formImg" src="" mode="aspectFill"></image>
|
|
||||||
</view>
|
</view>
|
||||||
|
<!-- <view class="formItem">-->
|
||||||
|
<!-- <text class="formLabel">车辆图片</text>-->
|
||||||
|
|
||||||
|
<!-- <u-upload-->
|
||||||
|
<!-- :action="uploadUrl"-->
|
||||||
|
<!-- :headers="headers"-->
|
||||||
|
<!-- :file-list="fileList"-->
|
||||||
|
<!-- :max-count="3"-->
|
||||||
|
<!-- :show-upload-btn="true"-->
|
||||||
|
<!-- @after-read="afterRead"-->
|
||||||
|
<!-- @delete="deleteFile"-->
|
||||||
|
<!-- @success="uploadSuccess"-->
|
||||||
|
<!-- @fail="uploadFail"-->
|
||||||
|
<!-- ></u-upload>-->
|
||||||
|
|
||||||
|
<!-- </view>-->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="footer">
|
<view class="footer">
|
||||||
<view class="btnItem delete">
|
<view class="btnItem edit" @click="submit" v-if="bo2">
|
||||||
|
确定
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="btnItem delete" v-if="bo1" @click="del">
|
||||||
<uni-icons type="trash" color="#F92C2C"></uni-icons>
|
<uni-icons type="trash" color="#F92C2C"></uni-icons>
|
||||||
删除
|
删除
|
||||||
</view>
|
</view>
|
||||||
<view class="line"></view>
|
<view class="line" v-if="bo1"></view>
|
||||||
<view class="btnItem edit">
|
<view class="btnItem edit" v-if="bo1" @click="update">
|
||||||
<uni-icons type="compose" color="#0174F6"></uni-icons>
|
<uni-icons type="compose" color="#0174F6"></uni-icons>
|
||||||
编辑
|
保存
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import VNavigationBar from '@/components/VNavigationBar.vue'
|
import VNavigationBar from '@/components/VNavigationBar.vue';
|
||||||
|
import request from "../../utils/request";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
VNavigationBar,
|
VNavigationBar
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
// uploadUrl: 'https://your-server.com/upload',
|
||||||
|
// headers: {},
|
||||||
|
// fileList: [],
|
||||||
|
|
||||||
|
car: {
|
||||||
|
// 车牌号
|
||||||
|
licenseNumber: '',
|
||||||
|
// 型号
|
||||||
|
carModelInput: '',
|
||||||
|
// 品牌id
|
||||||
|
carBrand:'',
|
||||||
|
// 车辆类别 字典字段
|
||||||
|
carCategory:'',
|
||||||
|
// 车辆性质 字典字段
|
||||||
|
carNature:'',
|
||||||
|
// 注册日期
|
||||||
|
carRegisterDate:'2024-09-24',
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
bo1: false,
|
||||||
|
bo2: true,
|
||||||
|
categoryIndex: 0,
|
||||||
|
natureIndex: 0,
|
||||||
|
brandIndex: 0,
|
||||||
|
categoryList: [],
|
||||||
|
natureList: [],
|
||||||
|
brandList: []
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
// 计算属性,将对象数组转换为字符串数组
|
||||||
|
computed: {
|
||||||
|
// 计算属性,将对象数组转换为字符串数组 picker 标签的 range 属性 只能绑定数组
|
||||||
|
brandNamesComputed() {
|
||||||
|
return this.brandList.map(item => item.brandName);
|
||||||
|
},
|
||||||
|
natureNamesComputed() {
|
||||||
|
return this.natureList.map(item => item.label);
|
||||||
|
},
|
||||||
|
categoryNamesComputed() {
|
||||||
|
return this.categoryList.map(item => item.label);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onLoad(options) {
|
||||||
|
// 如果是修改
|
||||||
|
if (options.car) {
|
||||||
|
// 有数据为编辑 或 删除
|
||||||
|
this.car = JSON.parse(decodeURIComponent(options.car));
|
||||||
|
console.log('初始化页面数据', this.car)
|
||||||
|
this.bo1 = true;
|
||||||
|
this.bo2 = false;
|
||||||
|
} else {
|
||||||
|
// 没有数据 需要赋值一下初始化
|
||||||
|
this.bo1 = false;
|
||||||
|
this.bo2 = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化
|
||||||
|
this.getCategoryList();
|
||||||
|
this.getNatureList();
|
||||||
|
this.getBrandList();
|
||||||
|
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// afterRead(file) {
|
||||||
|
// console.log('文件读取完成');
|
||||||
|
// },
|
||||||
|
// deleteFile(file, index) {
|
||||||
|
// console.log('删除文件');
|
||||||
|
// this.fileList.splice(index, 1);
|
||||||
|
// },
|
||||||
|
// uploadSuccess(res, file) {
|
||||||
|
// console.log('上传成功', res);
|
||||||
|
// },
|
||||||
|
// uploadFail(error, file) {
|
||||||
|
// console.log('上传失败', error);
|
||||||
|
// },
|
||||||
|
|
||||||
|
// 品牌选择事件
|
||||||
|
brandChange(event) {
|
||||||
|
// 下标
|
||||||
|
const newIndex = event.detail.value;
|
||||||
|
this.brandIndex = newIndex;
|
||||||
|
//
|
||||||
|
this.car.carBrand = this.brandList[newIndex].id;
|
||||||
|
},
|
||||||
|
// 车辆类别选择事件
|
||||||
|
categoryChange(event) {
|
||||||
|
const newIndex = event.detail.value;
|
||||||
|
this.categoryIndex = newIndex;
|
||||||
|
//
|
||||||
|
this.car.carCategory = this.categoryList[newIndex].value;
|
||||||
|
},
|
||||||
|
// 车辆性质选择事件
|
||||||
|
natureChange(event) {
|
||||||
|
const newIndex = event.detail.value;
|
||||||
|
this.natureIndex = newIndex;
|
||||||
|
//
|
||||||
|
this.car.carNature = this.natureList[newIndex].value;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 日期选择 事件
|
||||||
|
bindDateChange1(e) {
|
||||||
|
this.car.carRegisterDate = e.target.value; // 更新选择的日期到data中的date变量
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查询下拉 车辆类别
|
||||||
|
async getCategoryList() {
|
||||||
|
let res = await request({
|
||||||
|
url: '/admin-api/system/dict-data/type?type=car_category',
|
||||||
|
method: 'get',
|
||||||
|
noTenantId: false
|
||||||
|
})
|
||||||
|
if (res.code == 200) {
|
||||||
|
console.log('车辆类别', res.data)
|
||||||
|
this.categoryList = res.data;
|
||||||
|
if (this.bo2 == true){
|
||||||
|
this.car.carCategory = res.data[0].value;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// 如果是修改 遍历当前集合 将index 同步
|
||||||
|
this.categoryList.forEach((item, index) => {
|
||||||
|
if (item.value == this.car.carCategory) {
|
||||||
|
this.categoryIndex = index;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 查询下拉 车辆性质
|
||||||
|
async getNatureList() {
|
||||||
|
let res = await request({
|
||||||
|
url: '/admin-api/system/dict-data/type?type=car_nature',
|
||||||
|
method: 'get',
|
||||||
|
noTenantId: false
|
||||||
|
})
|
||||||
|
if (res.code == 200) {
|
||||||
|
console.log('车辆性质', res.data)
|
||||||
|
this.natureList = res.data;
|
||||||
|
if (this.bo2 == true){
|
||||||
|
this.car.carNature = res.data[0].value;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// 如果是修改 遍历当前集合 将index 同步
|
||||||
|
this.natureList.forEach((item, index) => {
|
||||||
|
if (item.value == this.car.carNature) {
|
||||||
|
this.natureIndex = index;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 查询下拉 车辆品牌
|
||||||
|
async getBrandList() {
|
||||||
|
let res = await request({
|
||||||
|
url: '/userClient/base/carBrand/list',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
if (res.code == 200) {
|
||||||
|
console.log('车辆品牌', res.data)
|
||||||
|
this.brandList = res.data;
|
||||||
|
if (this.bo2 == true){
|
||||||
|
this.car.carBrand= res.data[0].id;
|
||||||
|
}else {
|
||||||
|
// 如果是修改 遍历当前集合 将index 同步
|
||||||
|
this.brandList.forEach((item, index) => {
|
||||||
|
if (item.id == this.car.carBrand) {
|
||||||
|
this.brandIndex = index;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 新增
|
||||||
|
async submit() {
|
||||||
|
let res = await request({
|
||||||
|
url: '/userClient/base/myCar/create',
|
||||||
|
method: 'POST',
|
||||||
|
data: this.car,
|
||||||
|
})
|
||||||
|
if (res.code == 200) {
|
||||||
|
// 新增成功返回上一个页面
|
||||||
|
|
||||||
|
uni.navigateBack();
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//删除
|
||||||
|
async del() {
|
||||||
|
let res = await request({
|
||||||
|
url: `/userClient/base/myCar/delete?id=${this.car.id}`,
|
||||||
|
method: 'Delete',
|
||||||
|
|
||||||
|
})
|
||||||
|
if (res.code == 200) {
|
||||||
|
// 新增成功返回上一个页面 并且上一个页面重新初始化 获取数据 怎么写
|
||||||
|
uni.navigateBack();
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 修改
|
||||||
|
async update() {
|
||||||
|
let res = await request({
|
||||||
|
url: `/userClient/base/myCar/update`,
|
||||||
|
data: this.car,
|
||||||
|
method: 'Put',
|
||||||
|
})
|
||||||
|
if (res.code == 200) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #F3F5F7;
|
background-color: #f3f5f7;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
@ -97,7 +340,8 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
column-gap: 20rpx;
|
column-gap: 20rpx;
|
||||||
|
|
||||||
border-bottom: 1rpx solid #DDDDDD;
|
border-bottom: 1rpx solid #dddddd;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
@ -110,16 +354,6 @@
|
|||||||
column-gap: 20rpx;
|
column-gap: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formItem1 {
|
|
||||||
box-sizing: border-box;
|
|
||||||
width: 686rpx;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 40rpx;
|
|
||||||
border-bottom: 1rpx solid #DDDDDD;
|
|
||||||
&:last-child {
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.formLabel {
|
.formLabel {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
@ -149,17 +383,16 @@
|
|||||||
background-color: #efefef;
|
background-color: #efefef;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
background: #FFFFFF;
|
background: #ffffff;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.line {
|
.line {
|
||||||
width: 2rpx;
|
width: 2rpx;
|
||||||
background-color: #DDDDDD;
|
background-color: #dddddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btnItem {
|
.btnItem {
|
||||||
@ -174,11 +407,11 @@
|
|||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
|
||||||
&.delete {
|
&.delete {
|
||||||
color: #F92C2C;
|
color: #f92c2c;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.edit {
|
&.edit {
|
||||||
color: #0174F6;
|
color: #0174f6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<VNavigationBar titleColor="rgba(0,0,0,0.9)" backgroundColor="#fff" title="我的车辆">
|
<VNavigationBar titleColor="rgba(0,0,0,0.9)" backgroundColor="#fff" title="我的车辆"></VNavigationBar>
|
||||||
</VNavigationBar>
|
|
||||||
<view class="body">
|
<view class="body">
|
||||||
<scroll-view style="height: 100%;" scroll-y="true">
|
<scroll-view style="height: 100%" scroll-y="true">
|
||||||
<view class="carList">
|
<view class="carList">
|
||||||
<view v-for="(item, index) in carList" :key="index" class="carItem" @click="gotoDetail(item)">
|
<view v-for="(item, index) in carList" :key="index" class="carItem" @click="gotoDetail(item)">
|
||||||
<image class="carImage" src="" mode="aspectFit"></image>
|
<image class="carImage" :src="config.baseImageUrl+item.logoImg" mode="aspectFit"></image>
|
||||||
<view class="carInfo">
|
<view class="carInfo">
|
||||||
<view class="carNum">{{ item.carNum }}</view>
|
<view class="carNum">{{ item.licenseNumber}}</view>
|
||||||
<view class="name">车辆持有人:{{ item.name }}</view>
|
<view class="name">品牌:{{ item.brandName }}</view>
|
||||||
<view class="phone">持有人电话:{{ item.phone }}</view>
|
<view class="phone">型号:{{ item.carModelInput }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
<view class="addCarBtn">
|
<view class="addCarBtn" @click="gotoDetail()">
|
||||||
<uni-icons color="#0174F6" type="plusempty"></uni-icons>
|
<uni-icons color="#0174F6" type="plusempty"></uni-icons>
|
||||||
添加车辆
|
添加车辆
|
||||||
</view>
|
</view>
|
||||||
@ -24,29 +23,69 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import VNavigationBar from '@/components/VNavigationBar.vue'
|
import VNavigationBar from '@/components/VNavigationBar.vue';
|
||||||
|
import request from "../../utils/request";
|
||||||
|
import config from "config";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
computed: {
|
||||||
|
config() {
|
||||||
|
return config
|
||||||
|
}
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
VNavigationBar
|
VNavigationBar
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
carList: [{
|
carList: [
|
||||||
|
{
|
||||||
carNum: '鲁A 781NB',
|
carNum: '鲁A 781NB',
|
||||||
name: '魏书豪',
|
name: '魏书豪',
|
||||||
phone: '15726786903',
|
phone: '15726786903',
|
||||||
image: ''
|
image: ''
|
||||||
}]
|
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
|
||||||
|
// 页面初始化
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
// 页面显示时执行初始化操作
|
||||||
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
gotoDetail() {
|
|
||||||
|
getList(){
|
||||||
|
request({
|
||||||
|
url: '/userClient/base/myCar/get',
|
||||||
|
method: 'GET',
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
this.carList = res.data;
|
||||||
|
console.log('图片路径', config.baseImageUrl+this.carList[0].logoImg)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
gotoDetail(item) {
|
||||||
|
if (item){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/myCar/carDetail?car=${encodeURIComponent(JSON.stringify(item))}`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/myCar/carDetail'
|
url: '/pages/myCar/carDetail'
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
@ -59,7 +98,7 @@
|
|||||||
.body {
|
.body {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 0;
|
height: 0;
|
||||||
background-color: #F3F5F7;
|
background-color: #f3f5f7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.carList {
|
.carList {
|
||||||
@ -74,7 +113,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
background: #FFFFFF;
|
background: #ffffff;
|
||||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||||
column-gap: 20rpx;
|
column-gap: 20rpx;
|
||||||
}
|
}
|
||||||
@ -97,12 +136,12 @@
|
|||||||
.phone {
|
.phone {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #858BA0;
|
color: #858ba0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.addCarBtn {
|
.addCarBtn {
|
||||||
padding: 34rpx 0;
|
padding: 34rpx 0;
|
||||||
background: #FFFFFF;
|
background: #ffffff;
|
||||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -112,7 +151,7 @@
|
|||||||
|
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #0174F6;
|
color: #0174f6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
BIN
static/images/cardRollBg.png
Normal file
BIN
static/images/cardRollBg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
@ -26,9 +26,9 @@ const request = config => {
|
|||||||
const isTanantId = (config.headers || {}).isTanantId === false
|
const isTanantId = (config.headers || {}).isTanantId === false
|
||||||
config.header = config.header || {}
|
config.header = config.header || {}
|
||||||
if(getTenantId() && !isTanantId){
|
if(getTenantId() && !isTanantId){
|
||||||
config.header['Tenant-Id'] = getTenantId()
|
config.header['tenant-id'] = getTenantId()
|
||||||
}
|
}
|
||||||
config.header['Tenant-Id'] = 180
|
config.header['tenant-id'] = 180
|
||||||
console.log(config.header,424242);
|
console.log(config.header,424242);
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
uni.request({
|
uni.request({
|
||||||
|
@ -10,7 +10,6 @@ export function tabBarconnect(userId) {
|
|||||||
|
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user