feat: 新增工单中心、房间巡查、失物招领等业务模块
- 新增工单中心(ticket_center)与工单工作台(ticket_workbench)页面 - 新增房间巡查(room_inspection)与失物招领发布(lost_found_publish)页面 - 预约看样流程新增房型/楼栋/楼层选择器组件 - 新增工具模块: booking-entry、privacy、reservation-flow - api/index.js 补充楼层列表、看样提交等接口 - locales/messages.js 补充多语言文案 - manifest.json 开启微信小程序隐私检查 - 完善登录、注册、申请详情、账单等相关页面交互
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
</tn-nav-bar>
|
||||
|
||||
<scroll-view class="page-scroll" scroll-y @scroll="handleScroll" :show-scrollbar="false">
|
||||
<view class="page-content tn-padding" :style="{ paddingTop: vuex_custom_bar_height + 'px', paddingBottom: '60rpx' }">
|
||||
<view class="page-content tn-padding" :style="{ paddingTop: vuex_custom_bar_height + 'px', paddingBottom: pageBottomPadding }">
|
||||
<view class="hero-header tn-margin-bottom-xl">
|
||||
<view class="hero-badge">
|
||||
<text class="badge-dot"></text>
|
||||
@@ -20,13 +20,6 @@
|
||||
</view>
|
||||
<view class="hero-title">{{ pageTitle }}</view>
|
||||
<view class="hero-desc">{{ pageDesc }}</view>
|
||||
|
||||
<view v-if="sourceSummaryList.length" class="tn-margin-top-lg">
|
||||
<view v-for="item in sourceSummaryList" :key="item.label" class="source-row tn-flex tn-flex-row-between">
|
||||
<text class="source-row__label">{{ item.label }}</text>
|
||||
<text class="source-row__value">{{ item.value }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-card tn-margin-top-xl">
|
||||
@@ -41,7 +34,15 @@
|
||||
@change="handleRoomTypeChange"
|
||||
/>
|
||||
</view>
|
||||
|
||||
|
||||
<view v-if="showFloorSelector" class="form-item tn-margin-top">
|
||||
<view class="form-label">{{ floorLabel }}</view>
|
||||
<floor-selector
|
||||
v-model="form.intendedFloorLevel"
|
||||
@change="handleFloorChange"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view v-if="showPreferenceSelectors" class="form-item tn-margin-top">
|
||||
<view class="form-label">{{ t('hobbyLabel') }}</view>
|
||||
<tag-selector
|
||||
@@ -79,13 +80,22 @@
|
||||
<textarea class="form-textarea" :placeholder="remarkPlaceholder" v-model="form.remark"></textarea>
|
||||
</view>
|
||||
|
||||
<view class="submit-btn btn-primary tn-margin-top-xl" :class="{ 'submit-btn--disabled': isSubmitting }" @click="submitRequest">
|
||||
<view v-if="!showFloatingSubmitBtn" class="submit-btn btn-primary tn-margin-top-xl" :class="{ 'submit-btn--disabled': isSubmitting }" @click="submitRequest">
|
||||
<text class="tn-text-bold">{{ isSubmitting ? t('submitting') : primaryActionText }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
|
||||
<view v-if="showFloatingSubmitBtn" class="floating-submit-bar">
|
||||
<view class="floating-submit-bar__inner">
|
||||
<view class="submit-btn btn-primary" :class="{ 'submit-btn--disabled': isSubmitting }" @click="submitRequest">
|
||||
<text class="tn-text-bold">{{ isSubmitting ? t('submitting') : primaryActionText }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -98,6 +108,7 @@ import { getStoredUser } from '../../utils/flow'
|
||||
import TagSelector from './components/TagSelector.vue'
|
||||
import DateRangeSelector from './components/DateRangeSelector.vue'
|
||||
import RoomTypeSelector from './components/RoomTypeSelector.vue'
|
||||
import FloorSelector from './components/FloorSelector.vue'
|
||||
|
||||
function createDefaultForm() {
|
||||
const now = new Date()
|
||||
@@ -107,6 +118,7 @@ function createDefaultForm() {
|
||||
return {
|
||||
intendedAreaCode: '',
|
||||
intendedRoomTypeCode: '',
|
||||
intendedFloorLevel: '',
|
||||
roomSlotHeight: 1,
|
||||
hobbiesAndInterestsTagKeys: [],
|
||||
lifestyleHabitsTagKeys: [],
|
||||
@@ -564,7 +576,8 @@ export default {
|
||||
components: {
|
||||
TagSelector,
|
||||
DateRangeSelector,
|
||||
RoomTypeSelector
|
||||
RoomTypeSelector,
|
||||
FloorSelector
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -743,12 +756,27 @@ export default {
|
||||
roomTypeLabel() {
|
||||
return this.getBusinessText('roomTypeLabel') || this.t('applyRoomType')
|
||||
},
|
||||
pageBottomPadding() {
|
||||
return this.showFloatingSubmitBtn ? '220rpx' : '60rpx'
|
||||
},
|
||||
showFloatingSubmitBtn() {
|
||||
return this.isRoomTypeApply
|
||||
},
|
||||
floorLabel() {
|
||||
return this.getBusinessText('floorLabel') || this.t('floorLabel')
|
||||
},
|
||||
showRoomTypeSelector() {
|
||||
if (this.isRoomTypeApply) {
|
||||
return true
|
||||
}
|
||||
return this.businessConfig ? this.businessConfig.showRoomTypeSelector !== false : true
|
||||
},
|
||||
showFloorSelector() {
|
||||
if (this.isRoomTypeApply) {
|
||||
return true
|
||||
}
|
||||
return this.businessConfig ? this.businessConfig.showFloorSelector !== false : true
|
||||
},
|
||||
showPreferenceSelectors() {
|
||||
if (this.isRoomTypeApply) {
|
||||
return true
|
||||
@@ -775,41 +803,6 @@ export default {
|
||||
},
|
||||
dateRangeEndPlaceholder() {
|
||||
return this.getBusinessText('dateRangeEndPlaceholder') || this.t('selectCheckoutDate')
|
||||
},
|
||||
sourceSummaryList() {
|
||||
const payload = this.sourcePayload || {}
|
||||
if (!Object.keys(payload).length) {
|
||||
return []
|
||||
}
|
||||
const roomTypeName = this.language === 'en'
|
||||
? (payload.roomTypeNameEn || payload.roomTypeName || '')
|
||||
: (payload.roomTypeName || '')
|
||||
const roomLabel = this.language === 'en'
|
||||
? (payload.roomLabelEn || payload.currentRoomLabelEn || payload.roomLabel || payload.currentRoomLabel || '')
|
||||
: (payload.roomLabel || payload.currentRoomLabel || '')
|
||||
const areaName = this.language === 'en'
|
||||
? (payload.areaLabelEn || payload.areaNameEn || payload.areaLabel || payload.areaName || '')
|
||||
: (payload.areaLabel || payload.areaName || '')
|
||||
const list = []
|
||||
if (roomTypeName) {
|
||||
list.push({ label: this.t('applyRoomType'), value: roomTypeName })
|
||||
}
|
||||
if (roomLabel) {
|
||||
list.push({ label: this.t('currentRoom'), value: roomLabel })
|
||||
}
|
||||
if (areaName) {
|
||||
list.push({ label: this.t('areaLabel'), value: areaName })
|
||||
}
|
||||
if (payload.price) {
|
||||
list.push({ label: this.t('referencePrice'), value: payload.price })
|
||||
}
|
||||
if (payload.payMethod) {
|
||||
list.push({ label: this.t('paymentMethod'), value: localizePayMethodText(payload.payMethod, this.language) })
|
||||
}
|
||||
if (this.pageTitle) {
|
||||
list.push({ label: this.t('applicationType'), value: this.pageTitle })
|
||||
}
|
||||
return list
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -943,6 +936,7 @@ export default {
|
||||
...defaultForm,
|
||||
intendedAreaCode: this.sourcePayload.areaCode || '',
|
||||
intendedRoomTypeCode: this.sourcePayload.roomTypeCode || '',
|
||||
intendedFloorLevel: this.sourcePayload.intendedFloorLevel || this.sourcePayload.IntendedFloorLevel || '',
|
||||
remark: '',
|
||||
start: this.sourcePayload.start || defaultForm.start,
|
||||
end: this.sourcePayload.end || ''
|
||||
@@ -967,18 +961,31 @@ export default {
|
||||
this.sourcePayload.roomTypeCode = roomType.code
|
||||
this.sourcePayload.roomTypeName = roomType.name
|
||||
this.sourcePayload.roomTypeNameEn = roomType.nameEn || ''
|
||||
this.sourcePayload.selectedRoomTypeBuildingCode = roomType.buildingCode || ''
|
||||
this.sourcePayload.selectedRoomTypeBuildingSectionCode = roomType.buildingSectionCode || ''
|
||||
this.sourcePayload.selectedRoomTypeBuildingName = roomType.buildingName || ''
|
||||
this.sourcePayload.selectedRoomTypeBuildingSectionName = roomType.buildingSectionName || ''
|
||||
|
||||
if (area) {
|
||||
this.sourcePayload.areaCode = area.code
|
||||
this.sourcePayload.areaName = area.name
|
||||
this.sourcePayload.areaNameEn = area.nameEn || ''
|
||||
}
|
||||
|
||||
|
||||
if (roomType.price) {
|
||||
this.sourcePayload.price = roomType.price
|
||||
}
|
||||
}
|
||||
},
|
||||
handleFloorChange({ floor }) {
|
||||
if (!this.sourcePayload) {
|
||||
this.sourcePayload = {}
|
||||
}
|
||||
this.sourcePayload.intendedFloorLevel = floor && floor.value ? floor.value : ''
|
||||
this.sourcePayload.intendedFloorName = floor
|
||||
? (this.language === 'en' ? (floor.nameEn || floor.name || '') : (floor.name || floor.nameEn || ''))
|
||||
: ''
|
||||
},
|
||||
loadDictOptions() {
|
||||
this.dictLoading = true
|
||||
return Promise.all([
|
||||
@@ -1052,6 +1059,7 @@ export default {
|
||||
return {
|
||||
intendedAreaCode: this.form.intendedAreaCode || null,
|
||||
intendedRoomTypeCode: this.form.intendedRoomTypeCode || null,
|
||||
IntendedFloorLevel: this.form.intendedFloorLevel || null,
|
||||
roomSlotHeight: Number(this.form.roomSlotHeight),
|
||||
hobbiesAndInterestsTagKeys: this.showPreferenceSelectors && this.form.hobbiesAndInterestsTagKeys.length ? this.form.hobbiesAndInterestsTagKeys : null,
|
||||
lifestyleHabitsTagKeys: this.showPreferenceSelectors && this.form.lifestyleHabitsTagKeys.length ? this.form.lifestyleHabitsTagKeys : null,
|
||||
@@ -1276,6 +1284,22 @@ export default {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.floating-submit-bar {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 30;
|
||||
padding: 20rpx 24rpx calc(20rpx + env(safe-area-inset-bottom));
|
||||
background: linear-gradient(180deg, rgba(248, 250, 255, 0) 0%, rgba(248, 250, 255, 0.92) 24%, #F8FAFF 100%);
|
||||
backdrop-filter: blur(16rpx);
|
||||
-webkit-backdrop-filter: blur(16rpx);
|
||||
}
|
||||
|
||||
.floating-submit-bar__inner {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.source-row {
|
||||
padding: 24rpx 0;
|
||||
border-bottom: 1px dashed rgba($brand-primary, 0.15);
|
||||
@@ -1286,6 +1310,10 @@ export default {
|
||||
padding-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.source-row--interactive:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.source-row__label {
|
||||
color: #6A7A99;
|
||||
font-size: 26rpx;
|
||||
@@ -1301,4 +1329,5 @@ export default {
|
||||
margin-left: 24rpx;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user