登录逻辑微调,订单详情初框
This commit is contained in:
parent
a9aceb5f71
commit
a2645471e8
@ -92,9 +92,10 @@ export default {
|
||||
isPilot: this.$store.state.user_type == 1,
|
||||
}
|
||||
},
|
||||
onLoad(){
|
||||
mounted(){
|
||||
let index = uni.getStorageSync('current');
|
||||
this.current = index?index:0;
|
||||
// B端没有设备和路线
|
||||
this.current = (!index||(!this.isPilot&&(index===2||index===3)))?0:index;
|
||||
this.isLogin = this.$store.state.vuex_token;
|
||||
this.isPilot = this.$store.state.user_type;
|
||||
this.changeCurrent(this.current);
|
||||
|
@ -52,14 +52,28 @@ export default {
|
||||
}else{
|
||||
try {
|
||||
this.loading = true;
|
||||
let res = await this.$api.aUpdatePass({
|
||||
let res = await this.$api[this.isPilot?'aUpdatePass':'bUpdatePass']({
|
||||
oldPass: encrypt(oldPass),
|
||||
newPass: encrypt(newPass),
|
||||
});
|
||||
if(res.status&&res.status===400){
|
||||
this.$refs.uToast.show({type: 'error',title: "密码修改失败!"});
|
||||
}else{
|
||||
this.form = {
|
||||
oldPass: '',
|
||||
newPass: '',
|
||||
comPass: ''
|
||||
}
|
||||
this.$refs.uToast.show({type: 'success',title: "密码修改成功,请重新登录!"});
|
||||
setTimeout(async()=>{
|
||||
await this.$api.logout();
|
||||
this.$u.vuex('vuex_token', '');
|
||||
this.$u.vuex('user_message', {});
|
||||
uni.setStorageSync('current',0);
|
||||
uni.reLaunch({
|
||||
url: '/aircraft/server/my/child_pages/login',
|
||||
})
|
||||
},1000);
|
||||
}
|
||||
} catch (error) {
|
||||
this.$refs.uToast.show({type: 'error',title: "密码修改失败!"});
|
||||
|
@ -98,6 +98,7 @@ export default {
|
||||
await that.$api.logout();
|
||||
that.$u.vuex('vuex_token', '');
|
||||
that.$u.vuex('user_message', {});
|
||||
uni.setStorageSync('current',0);
|
||||
uni.reLaunch({
|
||||
url: '/aircraft/server/my/child_pages/login',
|
||||
complete() {
|
||||
|
86
aircraft/server/order/detail.vue
Normal file
86
aircraft/server/order/detail.vue
Normal file
@ -0,0 +1,86 @@
|
||||
<!-- 订单详情 -->
|
||||
<template>
|
||||
<view class="order-detail">
|
||||
<Topnav :topLevel="topLevel" title="订单详情" defaultBackColor="#333333"
|
||||
defaultNavTextColor="#333333" showBack />
|
||||
<view class="order-top">
|
||||
<u-image width="100%" :src="myFileUrl+topBg" mode="widthFix" />
|
||||
<view class="top-abs" :style="{top: CustomBar+'px'}">
|
||||
<view class="order-status">待接单</view>
|
||||
<view class="order-tips">请尽快执行任务</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-content">
|
||||
123
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Topnav from '@/components/topnav/index.vue';
|
||||
import configService from '@/common/config.service.js';
|
||||
export default {
|
||||
// #ifdef MP
|
||||
options: {
|
||||
styleIsolation: 'shared'
|
||||
},
|
||||
// #endif
|
||||
components: { Topnav },
|
||||
data(){
|
||||
return{
|
||||
// #ifdef MP
|
||||
// 微信小程序自定义导航栏参数
|
||||
CustomBar: this.CustomBar || 0,
|
||||
// #endif
|
||||
//我的页图标基础路径
|
||||
myFileUrl: configService.fileUrl + 'aerocraft/my/',
|
||||
// 轮播图
|
||||
topBg: 'top-bg.png',
|
||||
// 页面是否滚动到顶
|
||||
topLevel: 0,
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.order-detail{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
.order-top{
|
||||
width: 100%;
|
||||
position: relative;
|
||||
.top-abs{
|
||||
position: absolute;
|
||||
.order-status{
|
||||
margin-top: 68rpx;
|
||||
margin-left: 32rpx;
|
||||
font-family: Source Han Sans SC;
|
||||
font-weight: bold;
|
||||
font-size: 42rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.order-tips{
|
||||
margin-top: 28rpx;
|
||||
margin-left: 32rpx;
|
||||
font-family: Source Han Sans SC;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
.order-content{
|
||||
flex: 1;
|
||||
z-index: 1;
|
||||
margin-top: -230rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 20rpx;
|
||||
padding: 40rpx 30rpx 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="aircraft-order">
|
||||
<view class="aircraft-order">
|
||||
<Topnav :topLevel="topLevel" title="爱尚云" />
|
||||
<u-image width="100%" :src="fileUrl+banner" mode="widthFix" />
|
||||
<view class="order-list">
|
||||
@ -26,7 +26,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-active">
|
||||
<u-button type="warning" :custom-style="customStyle" :hair-line="false">执行任务</u-button>
|
||||
<u-button type="warning" :custom-style="customStyle"
|
||||
:hair-line="false" @click="handleDoAction(item)">执行任务</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -38,7 +39,7 @@
|
||||
</view>
|
||||
<Movable :iconName="fileUrl+addIcon" />
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -71,6 +72,7 @@ export default {
|
||||
boyIcon: 'boy.png',
|
||||
// 订单列表
|
||||
orders: [{
|
||||
id: 1,
|
||||
mainOrderStatus: '待接单',
|
||||
orderType: '载物',
|
||||
attractionId: '白云山',
|
||||
@ -79,6 +81,7 @@ export default {
|
||||
gender: 1,
|
||||
customerName: '李晓霞'
|
||||
},{
|
||||
id: 2,
|
||||
mainOrderStatus: '待接单',
|
||||
orderType: '载人',
|
||||
attractionId: '白云山',
|
||||
@ -87,6 +90,7 @@ export default {
|
||||
gender: 0,
|
||||
customerName: '李道明'
|
||||
},{
|
||||
id: 3,
|
||||
mainOrderStatus: '待接单',
|
||||
orderType: '载物',
|
||||
attractionId: '白云山',
|
||||
@ -95,6 +99,7 @@ export default {
|
||||
gender: 1,
|
||||
customerName: '李晓霞'
|
||||
},{
|
||||
id: 4,
|
||||
mainOrderStatus: '待接单',
|
||||
orderType: '载物',
|
||||
attractionId: '白云山',
|
||||
@ -122,6 +127,12 @@ export default {
|
||||
async init(){
|
||||
|
||||
},
|
||||
// 执行任务
|
||||
handleDoAction(item){
|
||||
uni.navigateTo({
|
||||
url: `/aircraft/server/order/detail?id=${item.id}`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -9,6 +9,7 @@ const install = (Vue, vm) => {
|
||||
vm.$api.aSelfDetail = async (id) => await vm.$u.get(`/api/emEmployees/${id}`);// 查询飞行员详情
|
||||
vm.$api.aEditSelf = async (params = {}) => await vm.$u.put(`/api/emEmployees`,params);// 修改飞行员信息
|
||||
vm.$api.aUpdatePass = async (params = {}) => await vm.$u.post(`/api/emEmployees/updatePass`,params);// 修改飞行员密码
|
||||
vm.$api.bUpdatePass = async (params = {}) => await vm.$u.post(`/cnCustomer/updatePass`,params);// 修改客户密码
|
||||
|
||||
// 区域管理
|
||||
vm.$api.allAreas = async () => await vm.$u.get('/emArea/all');// 获取全部区域
|
||||
|
@ -3,9 +3,9 @@
|
||||
background: topLevel===0? '#ffffff00' : `rgba(255, 255, 255,${topLevel})` }">
|
||||
<view class="nav-content" :style="{ paddingTop: StatusBar+'px' }">
|
||||
<u-icon v-if="showBack" name="arrow-left" size="36" @click="back"
|
||||
:color="topLevel===0? '#ffffff00' : `rgba(51, 51, 51,${topLevel})`"></u-icon>
|
||||
:color="topLevel===0? defaultBackColor : `rgba(51, 51, 51,${topLevel})`"></u-icon>
|
||||
<view style="width: 35rpx;height: 35rpx;" v-else />
|
||||
<text :style="{ color: topLevel===0? '#ffffff00' : `rgba(51, 51, 51,${topLevel})` }">{{ title }}</text>
|
||||
<text :style="{ color: topLevel===0? defaultNavTextColor : `rgba(51, 51, 51,${topLevel})` }">{{ title }}</text>
|
||||
<view style="width: 35rpx;height: 35rpx;" />
|
||||
</view>
|
||||
</view>
|
||||
@ -30,6 +30,16 @@ export default {
|
||||
showBack:{
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 初始返回按钮颜色
|
||||
defaultBackColor:{
|
||||
type: String,
|
||||
default: '#ffffff00'
|
||||
},
|
||||
// 初始标题颜色
|
||||
defaultNavTextColor:{
|
||||
type: String,
|
||||
default: '#ffffff00'
|
||||
}
|
||||
},
|
||||
data(){
|
||||
|
@ -55,6 +55,12 @@
|
||||
"navigationBarTitleText": "登录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "order/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/child_pages/history",
|
||||
"style": {
|
||||
|
Loading…
Reference in New Issue
Block a user