Compare commits
No commits in common. "23e1c4d6f076c32b668c618a5e25d169012df3b2" and "a411e948905e241f0d932c4c04cfc2c9287f1176" have entirely different histories.
23e1c4d6f0
...
a411e94890
91
components/header_common.vue
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
<template>
|
||||||
|
<view class="header">
|
||||||
|
<view class="header-content">
|
||||||
|
<view class="left" @click="goBack">
|
||||||
|
<u-icon name="arrow-left" color="#fff" size="36rpx"></u-icon>
|
||||||
|
</view>
|
||||||
|
<view class="center">
|
||||||
|
<text class="title">{{ title }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="right">
|
||||||
|
<!-- 右侧占位 -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: '标题'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
goBack() {
|
||||||
|
let pages = getCurrentPages(); // 获取页面栈
|
||||||
|
console.log("-----pages",pages)
|
||||||
|
if (pages.length > 1) {
|
||||||
|
// 如果页面栈深度大于 1,说明可以返回上一页
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 如果已经是首页,可以选择跳转到某个指定页面或不做任何操作
|
||||||
|
uni.showToast({
|
||||||
|
title: '已经是首页了',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.header {
|
||||||
|
background-color: transparent;
|
||||||
|
/* 蓝色背景 */
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
|
position: fixed;
|
||||||
|
top: 90rpx;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 999;
|
||||||
|
|
||||||
|
.header-content {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.left {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.back-icon {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.center {
|
||||||
|
flex: 2;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
color: #2e2e2e;
|
||||||
|
font-size: 36rpx;
|
||||||
|
// font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
flex: 1;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -10,10 +10,6 @@
|
|||||||
"usingComponents" : true,
|
"usingComponents" : true,
|
||||||
"nvueStyleCompiler" : "uni-app",
|
"nvueStyleCompiler" : "uni-app",
|
||||||
"compilerVersion" : 3,
|
"compilerVersion" : 3,
|
||||||
"permissions": [
|
|
||||||
"camera",
|
|
||||||
"album"
|
|
||||||
],
|
|
||||||
"splashscreen" : {
|
"splashscreen" : {
|
||||||
"alwaysShowBeforeRender" : true,
|
"alwaysShowBeforeRender" : true,
|
||||||
"waiting" : true,
|
"waiting" : true,
|
||||||
@ -72,13 +68,7 @@
|
|||||||
"permission" : {
|
"permission" : {
|
||||||
"scope.userLocation" : {
|
"scope.userLocation" : {
|
||||||
"desc" : "你的位置信息将用于获取周边服务"
|
"desc" : "你的位置信息将用于获取周边服务"
|
||||||
},
|
}
|
||||||
"scope.album": {
|
|
||||||
"desc": "需要您的相册权限以便选择图片"
|
|
||||||
},
|
|
||||||
"scope.camera": {
|
|
||||||
"desc": "需要您的相机权限以便拍照"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mp-alipay" : {
|
"mp-alipay" : {
|
||||||
|
|||||||
@ -45,8 +45,6 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "近山社区",
|
"navigationBarTitleText": "近山社区",
|
||||||
"navigationStyle": "default",
|
"navigationStyle": "default",
|
||||||
"enableShareAppMessage": false, // 禁用该页面的转发
|
|
||||||
"enableShareTimeline": false, // 禁用该页面的朋友圈分享
|
|
||||||
"usingComponents": {}
|
"usingComponents": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -80,14 +80,14 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="note">注:照片支持分批上传,但最大数量为8</text>
|
<text class="note">注:照片可识别工单内容,支持分批上传,但最大数量为8</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 工单地点 -->
|
<!-- 工单地点 -->
|
||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
<view class="label">
|
<view class="label">
|
||||||
<u-icon name="map" color="#3B8CFF" size="38"></u-icon>
|
<u-icon name="map" color="#3B8CFF" size="38"></u-icon>
|
||||||
维修地点
|
工作地点
|
||||||
</view>
|
</view>
|
||||||
<textarea v-model="workOrderLocation" placeholder="请输入详细工作地点..." class="textarea" />
|
<textarea v-model="workOrderLocation" placeholder="请输入详细工作地点..." class="textarea" />
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 628 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 429 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 616 B |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 930 B After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 3.9 KiB |