Compare commits
13 Commits
d24c12257b
...
6b9ad175d6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b9ad175d6 | ||
|
|
cc30b85288 | ||
|
|
ed3a8f6e55 | ||
|
|
845e9bafce | ||
|
|
3209e7e26a | ||
|
|
0eed1e96bb | ||
|
|
c3174d2809 | ||
|
|
86c74c27b0 | ||
|
|
a4c0c42c29 | ||
|
|
58e8e9681b | ||
|
|
dffe1c1c55 | ||
|
|
db223d2a8c | ||
|
|
4baca916e0 |
2
App.vue
2
App.vue
@ -1,6 +1,6 @@
|
||||
<style lang="scss">
|
||||
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
|
||||
@import "uview-ui/index.scss";
|
||||
@import "uni_modules/uview-ui/index.scss";
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
5
api/routingInspection.js
Normal file
5
api/routingInspection.js
Normal file
@ -0,0 +1,5 @@
|
||||
export const apiArr = {
|
||||
routingInspectionList: "/api/v2/wechat/inspection-task/list", //巡检任务列表
|
||||
routingInspectionInfo: "/api/v2/wechat/inspection-task/info", //巡检任务详情
|
||||
routingInspectionSubmit: "/api/v2/wechat/inspection-task/submit", //巡检任务提交
|
||||
};
|
||||
@ -1,32 +1,17 @@
|
||||
<template>
|
||||
<view class="foot-fixed">
|
||||
<view v-for="(item, index) in navList" :key="index">
|
||||
<view
|
||||
id="navIndex"
|
||||
:style="{ width: foot_width }"
|
||||
@click="jump"
|
||||
:data-idx="index"
|
||||
:data-url="item.url"
|
||||
:class="{ 'foot-item': true, 'scan-item': item.isScan }"
|
||||
>
|
||||
<view id="navIndex" :style="{ width: foot_width }" @click="jump" :data-idx="index" :data-url="item.url"
|
||||
:class="{ 'foot-item': true, 'scan-item': item.isScan }">
|
||||
<view class="foot-icon-box">
|
||||
<image
|
||||
class="foot-icon"
|
||||
:src="item.photo"
|
||||
mode="widthFix"
|
||||
v-if="current != index"
|
||||
:style="{
|
||||
width: item.photo.includes('footer_localLife.png')
|
||||
? '70rpx'
|
||||
: '',
|
||||
}"
|
||||
></image>
|
||||
<image class="foot-icon" :src="item.photo" mode="widthFix" v-if="current != index" :style="{
|
||||
width: item.photo.includes('footer_localLife.png')
|
||||
? '70rpx'
|
||||
: '',
|
||||
}"></image>
|
||||
<image
|
||||
:class="{ 'foot-icon3': item.photo.includes('footer_richScan.png'), 'foot-icon2': !item.photo.includes('footer_richScan.png') }"
|
||||
:src="item.photoAc"
|
||||
mode="widthFix"
|
||||
v-if="current == index"
|
||||
></image>
|
||||
:src="item.photoAc" mode="widthFix" v-if="current == index"></image>
|
||||
</view>
|
||||
|
||||
<text class="foot-label" id="navIndexLabel">{{ item.nav_name }}</text>
|
||||
@ -36,6 +21,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { NavgateTo } from "../../utils";
|
||||
|
||||
export default {
|
||||
name: "nav",
|
||||
props: {
|
||||
@ -163,15 +151,36 @@ export default {
|
||||
const url = e.currentTarget.dataset.url;
|
||||
const index = e.currentTarget.dataset.idx;
|
||||
const item = this.navList[index];
|
||||
|
||||
|
||||
// 检查是否为扫码功能
|
||||
if (item.isScan) {
|
||||
// 调用uni-app的扫码API
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
// 扫码成功后的处理逻辑
|
||||
console.log('扫码结果:', res.result);
|
||||
// 可以根据实际需求对扫码结果进行处理
|
||||
console.log('扫码结果:', res);
|
||||
|
||||
// 检查res中是否包含path字段
|
||||
if (res.path) {
|
||||
console.log('扫码结果中的path:', res.path);
|
||||
|
||||
// 解析path字段,提取scene参数的值
|
||||
const pathParts = res.path.split('?');
|
||||
if (pathParts.length > 1) {
|
||||
const queryParams = pathParts[1].split('&');
|
||||
for (const param of queryParams) {
|
||||
const [key, value] = param.split('=');
|
||||
if (key === 'scene') {
|
||||
const params = {
|
||||
id: value
|
||||
}
|
||||
uni.setStorageSync('merchantInfo', params);
|
||||
NavgateTo('/packages/localLife/detail/index')
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log('扫码失败:', err);
|
||||
@ -179,7 +188,7 @@ export default {
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// 检查url是否存在且不为空
|
||||
if (!url || url.trim() === '') {
|
||||
this.NotOpen();
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
{
|
||||
"ios": {
|
||||
"name": "石榴九九"
|
||||
"name": "湖畔生活家"
|
||||
},
|
||||
"android": {
|
||||
"name": "石榴九九"
|
||||
"name": "湖畔生活家"
|
||||
},
|
||||
"common": {
|
||||
"name": "石榴九九"
|
||||
"name": "湖畔生活家"
|
||||
}
|
||||
}
|
||||
|
||||
25
main.js
25
main.js
@ -7,9 +7,22 @@ import './uni.promisify.adaptor'
|
||||
App.mpType = 'app'
|
||||
Vue.config.productionTip = false
|
||||
|
||||
import uView from 'uview-ui';
|
||||
import uView from 'uni_modules/uview-ui';
|
||||
Vue.use(uView);
|
||||
|
||||
// 导入工具函数
|
||||
import { processImageUrl } from './utils/index.js'
|
||||
|
||||
// 添加全局方法 - Vue 2
|
||||
Vue.prototype.$processImage = (url) => {
|
||||
return processImageUrl(url)
|
||||
}
|
||||
|
||||
// 添加全局过滤器 - Vue 2
|
||||
Vue.filter('processImage', function(url) {
|
||||
return processImageUrl(url)
|
||||
})
|
||||
|
||||
|
||||
const app = new Vue({
|
||||
...App
|
||||
@ -21,11 +34,19 @@ app.$mount()
|
||||
// #ifdef VUE3
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import uView from 'uview-ui';
|
||||
import uView from 'uni_modules/uview-ui';
|
||||
const app = createApp(App)
|
||||
// 安装 uView
|
||||
app.use(uView)
|
||||
|
||||
// 导入工具函数
|
||||
import { processImageUrl } from './utils/index.js'
|
||||
|
||||
// 添加全局方法 - Vue 3
|
||||
app.config.globalProperties.$processImage = (url) => {
|
||||
return processImageUrl(url)
|
||||
}
|
||||
|
||||
// 挂载多个全局方法
|
||||
app.config.globalProperties.$toast = $toast
|
||||
app.config.globalProperties.$modal = $modal
|
||||
|
||||
@ -7,6 +7,16 @@ page {
|
||||
background-color: #f6f7fb;
|
||||
}
|
||||
|
||||
.top{
|
||||
height: 300rpx;
|
||||
width: 100%;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.top image {
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.community-list-container {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
<template>
|
||||
<view class="community-list-container">
|
||||
<view class="top">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/communityTopImg.png" mode=""></image>
|
||||
</view>
|
||||
<view class="community-list">
|
||||
<view class="community-item-box" v-for="(item, index) in communityList" :key="index">
|
||||
<view class="community-item">
|
||||
|
||||
@ -393,4 +393,78 @@
|
||||
.toUp image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* swiperBox 样式 - 与 localLife 页面保持一致 */
|
||||
/* swiperBox 样式 - 每行展示5个,平均分配空间 */
|
||||
.swiperBox {
|
||||
height: 350rpx;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.swiper {
|
||||
height: 350rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.navList {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
box-sizing: border-box;
|
||||
height: 350rpx;
|
||||
width: 100%;
|
||||
padding: 30rpx 20rpx;
|
||||
background-color: #fff;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.navItem {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 20%; /* 每行5个,平均分配宽度 */
|
||||
height: 105rpx;
|
||||
margin-bottom: 43rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.navItemImg {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.navItem image {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
|
||||
.dot {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 20rpx;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 25rpx;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.dotItem {
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #E6E6E6;
|
||||
margin-right: 5rpx;
|
||||
}
|
||||
|
||||
.actives {
|
||||
width: 20rpx;
|
||||
height: 8rpx;
|
||||
background: #FF370B;
|
||||
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
||||
}
|
||||
@ -13,25 +13,30 @@
|
||||
<u-icon name="arrow-down" color="#999999" size="28"></u-icon>
|
||||
</view>
|
||||
<view class="search-box" @click="searchService">
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
|
||||
class="search-icon"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
|
||||
class="search-icon" mode="aspectFit"></image>
|
||||
<text class="search-placeholder">请输入您要找的服务</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 服务分类 -->
|
||||
<view class="service-category">
|
||||
<view
|
||||
class="category-item"
|
||||
v-for="(item, index) in serviceCategories"
|
||||
:key="index"
|
||||
@click="navigateToService(item)"
|
||||
>
|
||||
<image :src="item.icon" class="category-icon"></image>
|
||||
<text class="category-name">{{ item.name }}</text>
|
||||
<!-- 服务分类 - 修改为 swiper 形式 -->
|
||||
<view class="swiperBox">
|
||||
<swiper class="swiper" @change="swiperChange" :current="currentIndex">
|
||||
<swiper-item v-for="(page, pageIndex) in swiperList" :key="pageIndex">
|
||||
<view class="navList">
|
||||
<view class="navItem" v-for="(item, itemIndex) in page" :key="itemIndex" @click="changeNav(item)">
|
||||
<view class="navItemImg">
|
||||
<image :src="picUrl + item.cate_image" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="navName">{{ item.cate_name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<view class="dot">
|
||||
<view class="dotItem" v-for="(page, index) in swiperList" :key="index"
|
||||
:class="currentIndex == index ? 'actives' : ''"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -40,41 +45,29 @@
|
||||
<view class="announcement-flex">
|
||||
到家
|
||||
<text class="announcement-title"> 公告</text>
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_notice1.png"
|
||||
class="announcement-img"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_notice1.png"
|
||||
class="announcement-img" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="hrStyle">|</view>
|
||||
<text class="announcement-content"
|
||||
>公告内容公告内容公告内容公告内容...</text
|
||||
>
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_notice2.png"
|
||||
class="arrow-right"
|
||||
@click="lookNotice"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<text class="announcement-content">公告内容公告内容公告内容公告内容...</text>
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_notice2.png"
|
||||
class="arrow-right" @click="lookNotice" mode="aspectFit"></image>
|
||||
</view>
|
||||
|
||||
<!-- 广告横幅 -->
|
||||
<view class="serverList">
|
||||
<view class="serverList_left">
|
||||
<!-- <view> -->
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/guanggao1.png" mode="aspectFit"/>
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/guanggao1.png"
|
||||
mode="aspectFit" />
|
||||
<!-- <swiper-item v-for="(item, index) in homeLeftList" :key="index">
|
||||
<image :src="item.pic_src" alt="" mode="aspectFit" />
|
||||
</swiper-item> -->
|
||||
<!-- </view> -->
|
||||
</view>
|
||||
<view class="serverList_right">
|
||||
<view
|
||||
:class="['serverItem', `serverItem${index + 1}`]"
|
||||
@tap="headerServerClick(item)"
|
||||
v-for="(item, index) in homeRightList"
|
||||
:key="index"
|
||||
>
|
||||
<view :class="['serverItem', `serverItem${index + 1}`]" @tap="headerServerClick(item)"
|
||||
v-for="(item, index) in homeRightList" :key="index">
|
||||
<image :src="item.pic_src" mode="" />
|
||||
</view>
|
||||
</view>
|
||||
@ -82,49 +75,35 @@
|
||||
|
||||
<!-- 立即联系 -->
|
||||
<view class="contact-section" @click="contactService">
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_kefu1.png"
|
||||
class="contact-icon"
|
||||
></image>
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_kefu1.png"
|
||||
class="contact-icon"></image>
|
||||
<view class="contact-text">
|
||||
<text class="contact-title">立即联系</text>
|
||||
<br />
|
||||
<text class="contact-subtitle">未找到您需要的服务?</text>
|
||||
</view>
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_kefu2.png"
|
||||
class="contact-icon2"
|
||||
></image>
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_kefu2.png"
|
||||
class="contact-icon2"></image>
|
||||
</view>
|
||||
<view class="interval"></view>
|
||||
|
||||
<!-- 推荐热门服务 -->
|
||||
<view class="hot-services">
|
||||
<view class="section-header">
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_bottom1.png"
|
||||
class="section-arrow"
|
||||
></image>
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_bottom1.png"
|
||||
class="section-arrow"></image>
|
||||
<text class="section-title">推荐热门服务</text>
|
||||
</view>
|
||||
<view class="service-list">
|
||||
<view
|
||||
class="service-card"
|
||||
v-for="(service, index) in hotServiceList"
|
||||
:key="index"
|
||||
>
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/ceshi.png"
|
||||
class="service-image"
|
||||
></image>
|
||||
<view class="service-card" v-for="(service, index) in hotServiceList" :key="index">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/ceshi.png"
|
||||
class="service-image"></image>
|
||||
<view class="service-info">
|
||||
<view class="service-info-left">
|
||||
<view class="service-info-left-top">
|
||||
<text class="service-name">{{ service.name }}</text>
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_bottom2.png"
|
||||
class="service-image2"
|
||||
></image>
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_bottom2.png"
|
||||
class="service-image2"></image>
|
||||
<text class="service-tag">{{ service.tag }}</text>
|
||||
</view>
|
||||
<br />
|
||||
@ -132,10 +111,7 @@
|
||||
</view>
|
||||
<view class="service-info-right">
|
||||
<view class="service-footer">
|
||||
<view
|
||||
class="service-button"
|
||||
@click="navigateToReservation(service)"
|
||||
>
|
||||
<view class="service-button" @click="navigateToReservation(service)">
|
||||
<text class="button-text">去预约</text>
|
||||
</view>
|
||||
<text class="service-count">{{ service.count }}</text>
|
||||
@ -150,12 +126,7 @@
|
||||
|
||||
<!-- 回到顶部 -->
|
||||
<div class="toUp" @click="scrollToTop">
|
||||
<u-badge
|
||||
numberType="limit"
|
||||
type="error"
|
||||
max="99"
|
||||
:value="value"
|
||||
></u-badge>
|
||||
<u-badge numberType="limit" type="error" max="99" :value="value"></u-badge>
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/toUp.png"></image>
|
||||
</div>
|
||||
</view>
|
||||
@ -168,7 +139,7 @@ import {
|
||||
NavgateTo,
|
||||
menuButtonInfo,
|
||||
} from "../../../utils/index";
|
||||
import { apiArr } from "../../../api/reservation";
|
||||
import { apiArr } from "../../../api/v2local";
|
||||
import nav from "../../../components/nav/nav";
|
||||
|
||||
export default {
|
||||
@ -177,51 +148,13 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
picUrl,
|
||||
// 当前位置
|
||||
currentLocation: "衡水市桃城区",
|
||||
// 服务分类数据
|
||||
serviceCategories: [
|
||||
{
|
||||
name: "家电维修",
|
||||
icon: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_top1.png",
|
||||
},
|
||||
{
|
||||
name: "数码维修",
|
||||
icon: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_top2.png",
|
||||
},
|
||||
{
|
||||
name: "电器清洗",
|
||||
icon: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_top3.png",
|
||||
},
|
||||
{
|
||||
name: "洗衣洗鞋",
|
||||
icon: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_top4.png",
|
||||
},
|
||||
{
|
||||
name: "精细擦窗",
|
||||
icon: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_top5.png",
|
||||
},
|
||||
{
|
||||
name: "整理收纳",
|
||||
icon: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_top6.png",
|
||||
},
|
||||
{
|
||||
name: "家庭保姆",
|
||||
icon: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_top7.png",
|
||||
},
|
||||
{
|
||||
name: "母婴服务",
|
||||
icon: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_top8.png",
|
||||
},
|
||||
{
|
||||
name: "管道疏通",
|
||||
icon: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_top9.png",
|
||||
},
|
||||
{
|
||||
name: "家庭保洁",
|
||||
icon: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_top10.png",
|
||||
},
|
||||
],
|
||||
serviceCategories: [],
|
||||
swiperList: [],
|
||||
currentIndex: 0,
|
||||
homeLeftList: [
|
||||
{
|
||||
title: "",
|
||||
@ -252,6 +185,30 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 获取服务分类
|
||||
async getServiceCategories() {
|
||||
const that = this;
|
||||
const params = {
|
||||
isShop: 2
|
||||
}
|
||||
const res = await request(apiArr.getMerChantCateList, "POST", params, { silent: true });
|
||||
// 过滤出可见的分类
|
||||
res.rows = res.rows.filter((item) => item.is_visible == 1);
|
||||
// 将数据分成每10个一组
|
||||
const chunkSize = 10;
|
||||
that.swiperList = [];
|
||||
for (let i = 0; i < res.rows.length; i += chunkSize) {
|
||||
that.swiperList.push(res.rows.slice(i, i + chunkSize));
|
||||
}
|
||||
},
|
||||
// swiper 切换事件
|
||||
swiperChange(e) {
|
||||
this.currentIndex = e.detail.current;
|
||||
},
|
||||
// 导航到分类页面
|
||||
changeNav(item) {
|
||||
NavgateTo(`/packages/localLife/classify/index?item=${JSON.stringify(item)}`);
|
||||
},
|
||||
// 选择位置
|
||||
chooseLocation() {
|
||||
// uni.navigateTo({
|
||||
@ -264,7 +221,7 @@ export default {
|
||||
// url: "/packages/homeServer/search/index",
|
||||
// });
|
||||
},
|
||||
// 导航到服务详情
|
||||
// 导航到服务详情(保留原方法但修改为与changeNav一致)
|
||||
navigateToService(item) {
|
||||
// uni.navigateTo({
|
||||
// url: "/packages/homeServer/classify/index",
|
||||
@ -309,6 +266,7 @@ export default {
|
||||
},
|
||||
onLoad() {
|
||||
this.getCurrentLocation();
|
||||
this.getServiceCategories();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -158,7 +158,10 @@ export default {
|
||||
//查询商家分类
|
||||
async getCateList() {
|
||||
let that = this;
|
||||
await request(apiArr.getMerChantCateList, "POST").then((res) => {
|
||||
const params = {
|
||||
isShop: 1,
|
||||
}
|
||||
await request(apiArr.getMerChantCateList, "POST",params).then((res) => {
|
||||
res.rows = res.rows.filter((item) => item.is_visible == 1)
|
||||
console.log(res);
|
||||
// 将数据分成每10个一组
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="white_container">
|
||||
<swiper class="swiper" autoplay>
|
||||
<image class="pic" :src="picUrl + info.album_images" />
|
||||
<!-- <swiper class="swiper" autoplay>
|
||||
<swiper-item v-for="(item, pageIndex) in info.bigImg" :key="pageIndex">
|
||||
<image class="pic" :src="picUrl + item" />
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</swiper> -->
|
||||
|
||||
<view class="main">
|
||||
<view class="title">{{ info.merchant_name }}</view>
|
||||
@ -28,7 +29,7 @@
|
||||
</view>
|
||||
<view class="table">
|
||||
<view class="label">营业地址</view>
|
||||
<view class="desc">{{ info.comAddress }}</view>
|
||||
<view class="desc" v-if="info.ad">{{ info.ad.ad_name ? info.ad.ad_name.replace(/,/g, "") : "" }}{{ info.address }}</view>
|
||||
</view>
|
||||
<view class="table mb32">
|
||||
<view class="label">特色服务</view>
|
||||
@ -97,7 +98,7 @@
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/Index_add.png" mode="" />
|
||||
<view>导航</view>
|
||||
</view>
|
||||
<view class="left_label" @click="handlePhoneClick">
|
||||
<view class="left_label" @click="handlePhoneClick" v-if="info.phone">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/localLife_detail_Frame.png"
|
||||
mode="" />
|
||||
<view>电话</view>
|
||||
@ -136,14 +137,22 @@ export default {
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.info = uni.getStorageSync("merchantInfo")
|
||||
const params = {
|
||||
id: uni.getStorageSync("merchantInfo").id
|
||||
}
|
||||
request(apiArr.getMerchantInfo, "POST", params).then(res => {
|
||||
this.info = res
|
||||
|
||||
// 确保onLoad执行完后再执行这两个方法
|
||||
this.page_num = 1
|
||||
this.flag = false
|
||||
this.commentList = []
|
||||
this.getCommentList()
|
||||
this.getMerchantInfo()
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
this.page_num = 1
|
||||
this.flag = false
|
||||
this.commentList = []
|
||||
this.getCommentList()
|
||||
this.getMerchantInfo()
|
||||
// 已移至onLoad中执行,确保执行顺序
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.flag) {
|
||||
@ -169,7 +178,7 @@ export default {
|
||||
} else {
|
||||
this.flag = false;
|
||||
}
|
||||
this.isShow = res.rows[0].merchant_info.quick_purchase_enabled == 1
|
||||
this.isShow = res.rows[0]?.merchant_info.quick_purchase_enabled == 1
|
||||
const list = res.rows.filter((item) => {
|
||||
return item.status == 2;
|
||||
});
|
||||
|
||||
@ -137,8 +137,8 @@ export default {
|
||||
currentIndex: 0,
|
||||
checkedItems: [false, false, false, false],
|
||||
address: "",
|
||||
page_size: "10",
|
||||
page_num: "1",
|
||||
page_size: 10,
|
||||
page_num: 1,
|
||||
flag: false,
|
||||
merchatList: [],
|
||||
};
|
||||
@ -178,7 +178,10 @@ export default {
|
||||
//查询商家分类
|
||||
async getCateList() {
|
||||
let that = this;
|
||||
await request(apiArr.getMerChantCateList, "POST").then((res) => {
|
||||
const params = {
|
||||
isShop: 1
|
||||
}
|
||||
await request(apiArr.getMerChantCateList, "POST", params).then((res) => {
|
||||
res.rows = res.rows.filter((item) => item.is_visible == 1)
|
||||
console.log(res);
|
||||
// 将数据分成每10个一组
|
||||
@ -228,7 +231,7 @@ export default {
|
||||
});
|
||||
|
||||
if (res.rows.length == this.page_size) {
|
||||
this.page_num = this.page_num + 1;
|
||||
this.page_size = this.page_size + 10;
|
||||
this.flag = true;
|
||||
} else {
|
||||
this.flag = false;
|
||||
|
||||
@ -18,7 +18,8 @@
|
||||
|
||||
<view class="Msg">
|
||||
<view class="payMony">
|
||||
¥<input type="number" v-model="Money" placeholder="付款金额" placeholder-style="font-size: 50rpx;" @blur="handleMoneyInput" @focus="showKeyboard" step="0.01" min="0.01">
|
||||
¥<input type="number" v-model="Money" placeholder="付款金额" placeholder-style="font-size: 50rpx;"
|
||||
@blur="handleMoneyInput" @focus="showKeyboard" step="0.01" min="0.01">
|
||||
<cu-keyboard ref="cukeyboard" @change="change" @confirm="keyboardConfirm" @hide="hide"></cu-keyboard>
|
||||
</view>
|
||||
<view class="payRemark">
|
||||
@ -144,26 +145,26 @@ export default {
|
||||
change(value) {
|
||||
// 先进行基本的输入格式化
|
||||
let formattedValue = value.toString().replace(/[^\d.]/g, '');
|
||||
|
||||
|
||||
// 如果第一个数字是0且后面还有其他数字,则删除这个0
|
||||
if (formattedValue.length >= 2 && formattedValue[0] === '0' && formattedValue[1] !== '.') {
|
||||
formattedValue = formattedValue.substring(1);
|
||||
}
|
||||
|
||||
|
||||
// 限制只能有一个小数点
|
||||
formattedValue = formattedValue.replace(/\.{2,}/g, '.');
|
||||
|
||||
|
||||
// 确保小数点后最多两位
|
||||
const parts = formattedValue.split('.');
|
||||
if (parts.length > 1) {
|
||||
formattedValue = parts[0] + '.' + parts[1].substring(0, 2);
|
||||
}
|
||||
|
||||
|
||||
// 处理开头是小数点的情况
|
||||
if (formattedValue.startsWith('.')) {
|
||||
formattedValue = '0' + formattedValue;
|
||||
}
|
||||
|
||||
|
||||
this.Money = formattedValue;
|
||||
},
|
||||
// 点击键盘确认按钮时触发
|
||||
@ -297,7 +298,7 @@ export default {
|
||||
}
|
||||
request(apiArr.createPay, "POST", {
|
||||
merchant_id: that.info.id,
|
||||
order_amount: Number((that.Money) * 100), //金额
|
||||
order_amount: Number((that.Money)), //金额
|
||||
refund_property_fee: that.homeMoney, //物业费
|
||||
refund_member_points: that.integral, //积分
|
||||
remark: that.remarks,
|
||||
@ -331,38 +332,44 @@ export default {
|
||||
|
||||
async LakaLaPrePay() {
|
||||
let that = this
|
||||
request(apiPay.pay, "POST", {
|
||||
total_amount: that.OrderMsg.order_amount,
|
||||
subject: '快捷支付订单',
|
||||
goods_id: that.payId,
|
||||
address: "",
|
||||
out_trade_no: that.OrderMsg.order_no,
|
||||
remark: that.OrderMsg.remark,
|
||||
quantity: '1',
|
||||
user: uni.getStorageSync('userId'),
|
||||
user_id: uni.getStorageSync('openId')
|
||||
request(apiArr.getPreOrderInfo, "POST", {
|
||||
id: that.payId,
|
||||
}).then(res => {
|
||||
console.log(res, 'res');
|
||||
|
||||
const { resp_data, msg } = res
|
||||
|
||||
wx.requestPayment({
|
||||
timeStamp: String(resp_data.acc_resp_fields.time_stamp),
|
||||
nonceStr: String(resp_data.acc_resp_fields.nonce_str),
|
||||
package: String(resp_data.acc_resp_fields.package),
|
||||
signType: String(resp_data.acc_resp_fields.sign_type),
|
||||
paySign: String(resp_data.acc_resp_fields.pay_sign),
|
||||
success(res) {
|
||||
that.queryPay(resp_data)
|
||||
},
|
||||
fail(fal) {
|
||||
if (fal.errMsg == 'requestPayment:fail cancel') {
|
||||
// that.payFail(2)
|
||||
} else {
|
||||
// that.payFail(1)
|
||||
if (res && res.timeStamp && res.nonceStr && res.package && res.signType && res.paySign) {
|
||||
// 调用微信支付
|
||||
uni.requestPayment({
|
||||
timeStamp: res.timeStamp,
|
||||
nonceStr: res.nonceStr,
|
||||
package: res.package,
|
||||
signType: res.signType,
|
||||
paySign: res.paySign,
|
||||
success: (payRes) => {
|
||||
const params = {
|
||||
id: this.OrderMsg.id,
|
||||
}
|
||||
request(apiArr.tradeQuery, "POST", params).then(res => {
|
||||
})
|
||||
},
|
||||
fail: (payErr) => {
|
||||
uni.showToast({
|
||||
title: payErr.errMsg == 'requestPayment:fail cancel' ? '已取消支付' : '支付失败',
|
||||
icon: 'none'
|
||||
})
|
||||
const params = {
|
||||
order_ids: orderId,
|
||||
}
|
||||
},
|
||||
complete: () => {
|
||||
// 支付完成后的回调,无论成功失败都会执行
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
console.error("获取支付参数失败,缺少必要参数")
|
||||
uni.showToast({
|
||||
title: '获取支付信息失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
153
packages/workOrderDashboard/addRoutingInspection/index.css
Normal file
153
packages/workOrderDashboard/addRoutingInspection/index.css
Normal file
@ -0,0 +1,153 @@
|
||||
.container {
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.select-container {
|
||||
margin-bottom: 40rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.select-label {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
margin-bottom: 20rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
border: 1rpx solid #ddd;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 20rpx;
|
||||
font-size: 28rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.options-container {
|
||||
margin-top: 10rpx;
|
||||
max-height: 400rpx;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
border: 1rpx solid #ddd;
|
||||
border-radius: 10rpx;
|
||||
background-color: #fff;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.option-item {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
padding: 0 20rpx;
|
||||
font-size: 28rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
.option-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.option-item:hover {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.option-item.selected {
|
||||
background-color: #e6f7ff;
|
||||
color: #1890ff;
|
||||
}
|
||||
|
||||
.camera-section {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.camera-container {
|
||||
text-align: center;
|
||||
padding: 40rpx;
|
||||
}
|
||||
|
||||
.camera-icon-container{
|
||||
width: 130rpx;
|
||||
height: 130rpx;
|
||||
border: 5rpx solid #333;
|
||||
border-radius: 50%;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.camera-icon {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.camera-text {
|
||||
margin-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.photos-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.photo-item {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
margin: 20rpx 20rpx 0 0;
|
||||
position: relative;
|
||||
border: 1rpx solid #ddd;
|
||||
}
|
||||
|
||||
.photo-preview {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.delete-icon {
|
||||
position: absolute;
|
||||
top: -10rpx;
|
||||
right: -10rpx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
background-color: rgba(255, 0, 0, 0.8);
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: white;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.footer {
|
||||
padding: 30rpx;
|
||||
background-color: #fff;
|
||||
border-top: 1rpx solid #eee;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.submit-button {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
background-color: #1890ff;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 45rpx;
|
||||
font-size: 32rpx;
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
|
||||
.no-options {
|
||||
padding: 30rpx 20rpx;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
185
packages/workOrderDashboard/addRoutingInspection/index.vue
Normal file
185
packages/workOrderDashboard/addRoutingInspection/index.vue
Normal file
@ -0,0 +1,185 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 点位选择下拉菜单 -->
|
||||
<view class="select-container">
|
||||
<label class="select-label">选择点位</label>
|
||||
<input type="text" class="search-input" v-model="searchKeyword" @focus="showOptions = true"
|
||||
placeholder="请输入点位名称搜索" readonly />
|
||||
|
||||
<!-- 下拉选项 -->
|
||||
<view class="options-container" v-if="showOptions">
|
||||
<!-- 为空时显示提示 -->
|
||||
<view v-if="pointsList.length === 0" class="no-options">
|
||||
暂无数据
|
||||
</view>
|
||||
<!-- 有选项时显示选项列表 -->
|
||||
<view v-else>
|
||||
<view v-for="option in pointsList"
|
||||
:key="option.point_id"
|
||||
class="option-item"
|
||||
@click="selectPointHandler(option)">
|
||||
{{ option.point_info.point_name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 拍照功能和图片预览 -->
|
||||
<view class="camera-section">
|
||||
<!-- 拍照按钮,当图片数量达到12张时隐藏 -->
|
||||
<view class="camera-container" v-if="images.length < 12">
|
||||
<image class="camera-icon" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/zhaoxiangji.png"
|
||||
mode="aspectFit" @click="takePhoto"></image>
|
||||
<view class="camera-text">点击拍照上传</view>
|
||||
</view>
|
||||
|
||||
<!-- 照片列表 -->
|
||||
<view class="photos-container">
|
||||
<view v-for="(image, index) in images" :key="index" class="photo-item">
|
||||
<image class="photo-preview" :src="image" mode="aspectFit"></image>
|
||||
<!-- 删除图标 -->
|
||||
<view class="delete-icon" @click="deleteImage(index)">×</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部提交按钮 -->
|
||||
<view class="footer">
|
||||
<button class="submit-button" @click="submitForm">确认提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
request,
|
||||
picUrl,
|
||||
uniqueByField,
|
||||
menuButtonInfo,
|
||||
NavgateTo,
|
||||
} from "../../../utils";
|
||||
|
||||
import { apiArr } from "../../../api/routingInspection";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
searchKeyword: '',
|
||||
showOptions: false,
|
||||
selectedPoint: '',
|
||||
selectedPointInfo: null, // 存储完整的点位信息
|
||||
pointsList: [],
|
||||
images: [], // 存储多张图片路径
|
||||
taskId: '',
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.item) {
|
||||
const item = JSON.parse(options.item)
|
||||
this.taskId = item.id
|
||||
this.getInfo(this.taskId)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getInfo(id) {
|
||||
const res = await request(apiArr.routingInspectionInfo, "POST", {
|
||||
task_id: id,
|
||||
});
|
||||
this.pointsList = res.task_point_info
|
||||
},
|
||||
selectPointHandler(option) {
|
||||
console.log("🚀 ~ selectPointHandler ~ option:", option)
|
||||
// 安全检查,确保必要的属性存在
|
||||
if (option && option.point_info && option.point_info.point_name) {
|
||||
// 根据实际数据结构选择正确的id属性
|
||||
this.selectedPoint = option.location_info && option.point_id
|
||||
? option.point_id
|
||||
: option.id || option.point_info.point_name
|
||||
this.selectedPointInfo = option // 保存完整的点位信息
|
||||
this.searchKeyword = option.point_info.point_name
|
||||
this.showOptions = false
|
||||
} else {
|
||||
console.warn('选择的点位信息不完整', option)
|
||||
}
|
||||
},
|
||||
takePhoto() {
|
||||
// 调起手机拍照功能,不允许从相册选择
|
||||
const that = this
|
||||
// 计算还可以拍摄的图片数量
|
||||
const remainingCount = 12 - that.images.length
|
||||
|
||||
uni.chooseImage({
|
||||
count: remainingCount > 0 ? remainingCount : 1, // 最多选择的图片数量
|
||||
sizeType: ['original', 'compressed'],
|
||||
sourceType: ['camera'], // 只允许拍照
|
||||
success: function (res) {
|
||||
const tempFilePaths = res.tempFilePaths
|
||||
// 将新拍摄的图片添加到列表中
|
||||
that.images = [...that.images, ...tempFilePaths]
|
||||
console.log('拍照成功,当前图片数量:', that.images.length)
|
||||
},
|
||||
fail: function (err) {
|
||||
console.error('拍照失败', err)
|
||||
uni.showToast({
|
||||
title: '拍照失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteImage(index) {
|
||||
// 删除指定索引的图片
|
||||
this.images.splice(index, 1)
|
||||
},
|
||||
async submitForm() {
|
||||
// 验证是否选择了点位
|
||||
if (!this.selectedPoint) {
|
||||
uni.showToast({
|
||||
title: '请选择点位',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// 验证是否上传了图片
|
||||
if (this.images.length === 0) {
|
||||
uni.showToast({
|
||||
title: '请至少上传一张照片',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
// 准备提交数据,使用正确的参数格式
|
||||
const params = {
|
||||
task_id: parseInt(this.taskId), // 巡检任务ID
|
||||
point_id: parseInt(this.selectedPoint), // 巡检点ID
|
||||
image: this.images // 巡检图片,格式为字符串数组
|
||||
}
|
||||
|
||||
// 调用正确的接口
|
||||
const res = await request(apiArr.routingInspectionSubmit, "POST", params);
|
||||
|
||||
// 输出提交的数据
|
||||
console.log('提交数据:', params)
|
||||
|
||||
// 显示提交成功提示
|
||||
uni.showToast({
|
||||
title: '提交成功',
|
||||
icon: 'success'
|
||||
})
|
||||
} catch (error) {
|
||||
console.error('提交失败', error)
|
||||
uni.showToast({
|
||||
title: '提交失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("./index.css");
|
||||
</style>
|
||||
@ -19,6 +19,11 @@
|
||||
<image class="work-order-icon" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/workOrder.png" mode="aspectFill" />
|
||||
<text class="work-order-text">工单台</text>
|
||||
</view>
|
||||
<view class="work-order-card" v-if="index == 1"
|
||||
@click="navigateToRoutingInspection">
|
||||
<image class="work-order-icon" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/polling.png" mode="aspectFill" />
|
||||
<text class="work-order-text">巡更巡检</text>
|
||||
</view>
|
||||
<view class="work-order-card" v-else></view>
|
||||
</view>
|
||||
</view>
|
||||
@ -96,6 +101,22 @@ export default {
|
||||
uni.navigateTo({
|
||||
url: '/packages/workOrderDashboard/index/index?communityId=' + changeCommData.id
|
||||
});
|
||||
},
|
||||
|
||||
// 跳转到巡更巡检
|
||||
navigateToRoutingInspection() {
|
||||
const changeCommData = uni.getStorageSync('changeWorkOrderData');
|
||||
if (!changeCommData) {
|
||||
uni.showToast({
|
||||
title: '请先选择小区',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/packages/workOrderDashboard/routingInspection/index?communityId=' + changeCommData.id
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -145,6 +145,7 @@ export default {
|
||||
status: this.active,
|
||||
page_num: this.page_num,
|
||||
page_size: this.page_size,
|
||||
user_id: ''
|
||||
});
|
||||
|
||||
if (res.rows) {
|
||||
@ -166,6 +167,7 @@ export default {
|
||||
status: status,
|
||||
page_num: this.page_num,
|
||||
page_size: this.page_size,
|
||||
user_id: ''
|
||||
});
|
||||
return res.total;
|
||||
},
|
||||
|
||||
57
packages/workOrderDashboard/routingInspection/index.css
Normal file
57
packages/workOrderDashboard/routingInspection/index.css
Normal file
@ -0,0 +1,57 @@
|
||||
page {
|
||||
background-color: #f6f7fb;
|
||||
padding: 15rpx;
|
||||
}
|
||||
|
||||
.item {
|
||||
width: 96%;
|
||||
margin: 10rpx 0;
|
||||
border-radius: 15rpx;
|
||||
background-color: #ffffff;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.item-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
color: #333;
|
||||
padding: 20rpx;
|
||||
border-bottom: 1rpx solid #eeeeee;
|
||||
}
|
||||
|
||||
.item-content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
color: #333;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.Btn {
|
||||
width: 150rpx;
|
||||
height: 70rpx;
|
||||
color: #ffffff;
|
||||
background-color: #169bd5;
|
||||
text-align: center;
|
||||
line-height: 70rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.empty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-weight: normal;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
margin-top: 200rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.empty image {
|
||||
width: 366rpx;
|
||||
height: 226rpx;
|
||||
margin-bottom: 27rpx;
|
||||
}
|
||||
84
packages/workOrderDashboard/routingInspection/index.vue
Normal file
84
packages/workOrderDashboard/routingInspection/index.vue
Normal file
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<view>
|
||||
<view v-if="list.length > 0">
|
||||
<view v-for="(item, index) in list" :key="index">
|
||||
<view class="item">
|
||||
<view class="item-top">
|
||||
<view>任务编号:{{ item.task_no }}</view>
|
||||
<view>任务类型:{{ getStatusName(item.execution_status) }}</view>
|
||||
</view>
|
||||
<view class="item-content">
|
||||
<view class="item-content-left">
|
||||
<view>任务名称:{{ item.inspection_plan_info.plan_name }}</view>
|
||||
<view>路线编号:{{ item.inspection_plan_info.inspection_route_info.route_code }}</view>
|
||||
<view>路线名称:{{ item.inspection_plan_info.inspection_route_info.route_name }}</view>
|
||||
<view>任务开始时间:{{ item.start_time }}</view>
|
||||
<view>任务结束时间:{{ item.end_time }}</view>
|
||||
<view>巡检人:{{ item.inspection_plan_info.community_worker_info.name }}</view>
|
||||
</view>
|
||||
<view class="item-content-right">
|
||||
<button class="Btn" @click="goInspection(item)">去巡检</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="empty">
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_nearbyList_empty.png"
|
||||
mode="aspectFill"></image>
|
||||
暂无数据
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
request,
|
||||
picUrl,
|
||||
uniqueByField,
|
||||
menuButtonInfo,
|
||||
NavgateTo,
|
||||
} from "../../../utils";
|
||||
|
||||
import { apiArr } from "../../../api/routingInspection";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.communityId = JSON.parse(options.communityId);
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
const res = await request(apiArr.routingInspectionList, "POST", {
|
||||
community_id: this.communityId,
|
||||
});
|
||||
this.list = res.rows;
|
||||
},
|
||||
goInspection(item) {
|
||||
NavgateTo('/packages/workOrderDashboard/addRoutingInspection/index?item=' + JSON.stringify(item),)
|
||||
},
|
||||
|
||||
// 将任务状态数字代码转换为中文名称
|
||||
getStatusName(status) {
|
||||
const statusMap = {
|
||||
1: '待开始',
|
||||
2: '进行中',
|
||||
3: '已超时',
|
||||
4: '已完成'
|
||||
};
|
||||
return statusMap[status] || status;
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("./index.css");
|
||||
</style>
|
||||
14
pages.json
14
pages.json
@ -682,7 +682,7 @@
|
||||
{
|
||||
"path": "index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "榴园到家 服务至上",
|
||||
"navigationBarTitleText": "湖畔到家 服务至上",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
@ -960,6 +960,18 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "packages/advertising",
|
||||
"pages": [
|
||||
{
|
||||
"path": "index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "推荐商品",
|
||||
"navigationBarBackgroundColor": "#ffffff"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
<template>
|
||||
<view>
|
||||
<view v-if="currentCity && currentCity.cityName && currentCity.cityName != '衡水市'">
|
||||
<!-- <view v-if="currentCity && currentCity.cityName && currentCity.cityName != '衡水市'">
|
||||
<view class="not_found_404">
|
||||
<text class="not_found_text">404</text>
|
||||
<text class="not_found_desc">当前城市暂未开通服务</text>
|
||||
<button class="not_found_button" @click="obtainLocation">重新定位</button>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view v-else> -->
|
||||
<view>
|
||||
<view class="container" :style="{ marginTop: top + 'px' }" v-if="loading">
|
||||
<!-- 城市信息部分 -->
|
||||
<view class="white_container searchBox" :style="{ height: localHeight + 'px' }">
|
||||
@ -113,7 +114,7 @@
|
||||
<view class="serverList_left">
|
||||
<swiper>
|
||||
<swiper-item v-for="(item, index) in homeLeftList" :key="index" @click="headerServerClick(item)">
|
||||
<image :src="item.pic_src" alt="" class="serverList_left_img"/>
|
||||
<image :src="item.pic_src" alt="" class="serverList_left_img" />
|
||||
<!-- <view>{{ item.ad_position }}</view> -->
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
@ -171,7 +172,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</u-sticky>
|
||||
|
||||
|
||||
<!-- 商家列表展示 -->
|
||||
<view class="merchantList" :class="{ merchantList2: merchatList.length < 3 }">
|
||||
<view class="overlay" v-if="showDropdown"></view>
|
||||
@ -204,8 +205,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="merchantItem_right_con_right" @click="toJump(item)">
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_review.png"
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_review.png"
|
||||
mode="aspectFill"></image>
|
||||
点评
|
||||
</view>
|
||||
@ -216,9 +216,9 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="more" v-if="flag">下拉加载后续10条,共计{{ bottomTotal }}条</view>
|
||||
<nav-footer />
|
||||
<nav-footer />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -953,8 +953,10 @@ export default {
|
||||
|
||||
// 分类查询
|
||||
async getCateList() {
|
||||
const res = await request(apiArr2.getCateList, "POST", {
|
||||
}, { slice: false });
|
||||
const params = {
|
||||
isShop: 1,
|
||||
}
|
||||
const res = await request(apiArr2.getCateList, "POST", params, { slice: false });
|
||||
if (res.rows.length) {
|
||||
this.currentCategoryId = res.rows[0].id
|
||||
this.activeCategoryId = `category-${this.currentCategoryId}`
|
||||
|
||||
@ -3,10 +3,11 @@
|
||||
width: 100%;
|
||||
height: 1334rpx;
|
||||
position: fixed;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.login-title {
|
||||
margin-top: 655rpx;
|
||||
margin-top: 550rpx;
|
||||
}
|
||||
|
||||
.login-tip {
|
||||
@ -52,6 +53,7 @@
|
||||
align-items: center;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.input {
|
||||
border: 1px solid #EFEFEF;
|
||||
width: 550rpx;
|
||||
@ -59,10 +61,12 @@
|
||||
line-height: 60rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-size: 24rpx;
|
||||
color: #FD4529;
|
||||
}
|
||||
|
||||
.app_login_btn {
|
||||
width: 550rpx;
|
||||
font-weight: 400;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="login"
|
||||
style="background-image: url(https://wechat-img-file.oss-cn-beijing.aliyuncs.com/login/Group_491.png);">
|
||||
style="background-image: url(https://wechat-img-file.oss-cn-beijing.aliyuncs.com/loginMainImg.png);">
|
||||
<view class="login-title">
|
||||
<view class="login-tip" style="font-size: 40rpx; color: #000000;">欢迎来到【湖畔生活家】</view>
|
||||
|
||||
|
||||
2
uni.scss
2
uni.scss
@ -75,4 +75,4 @@ $uni-font-size-subtitle:26px;
|
||||
$uni-color-paragraph: #3F536E; // 文章段落颜色
|
||||
$uni-font-size-paragraph:15px;
|
||||
|
||||
@import 'uview-ui/theme.scss';
|
||||
@import 'uni_modules/uview-ui/theme.scss';
|
||||
@ -2,11 +2,15 @@
|
||||
const environments = {
|
||||
development: {
|
||||
apiUrl: 'https://test.hshuishang.com',
|
||||
picUrl: 'https://test.hshuishang.com'
|
||||
picUrl: 'https://test.hshuishang.com',
|
||||
aliyunOssUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com',
|
||||
staticUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com'
|
||||
},
|
||||
production: {
|
||||
apiUrl: 'https://api.hshuishang.com',
|
||||
picUrl: 'https://api.hshuishang.com'
|
||||
picUrl: 'https://api.hshuishang.com',
|
||||
aliyunOssUrl: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com',
|
||||
staticUrl: 'http://static.hshuishang.com'
|
||||
}
|
||||
};
|
||||
|
||||
@ -32,6 +36,26 @@ const envConfig = environments[currentEnv] || environments.development;
|
||||
|
||||
export const RequsetUrl = envConfig.apiUrl; // 请求地址前缀
|
||||
export const picUrl = envConfig.picUrl; // 图片地址前缀
|
||||
export const aliyunOssUrl = envConfig.aliyunOssUrl; // 阿里云OSS地址
|
||||
export const staticUrl = envConfig.staticUrl; // 静态资源地址
|
||||
|
||||
/**
|
||||
* 处理图片URL,根据环境自动替换
|
||||
* @param {string} url - 原始图片URL
|
||||
* @returns {string} - 处理后的图片URL
|
||||
*/
|
||||
export const processImageUrl = (url) => {
|
||||
if (!url) return url;
|
||||
|
||||
// 如果URL包含阿里云OSS地址,则根据环境替换
|
||||
if (url.includes(aliyunOssUrl)) {
|
||||
if (currentEnv === 'production') {
|
||||
return url.replace(aliyunOssUrl, staticUrl);
|
||||
}
|
||||
}
|
||||
|
||||
return url;
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 小程序跳转方法二次封装
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user