Compare commits

...

13 Commits

Author SHA1 Message Date
赵毅
6b9ad175d6 修改湖畔好店页面商家数据显示不全的问题 2025-09-22 18:03:13 +08:00
赵毅
cc30b85288 修复好店的支付bug 2025-09-22 17:09:04 +08:00
赵毅
ed3a8f6e55 完成扫一扫功能 2025-09-22 15:16:24 +08:00
赵毅
845e9bafce 对图片路径做处理 线上环境使用加速域名 2025-09-22 11:35:37 +08:00
赵毅
3209e7e26a 修改因为商家分类接口报错的bug 2025-09-22 11:34:52 +08:00
赵毅
0eed1e96bb 取消地区的限制 2025-09-22 11:34:00 +08:00
赵毅
c3174d2809 修改到家服务的顶部分类逻辑 2025-09-22 10:20:33 +08:00
赵毅
86c74c27b0 完成巡检模块 2025-09-20 18:26:36 +08:00
赵毅
a4c0c42c29 巡检模块页面 2025-09-20 16:45:33 +08:00
赵毅
58e8e9681b 修改员工工单列表部分的显示逻辑 2025-09-20 11:35:00 +08:00
赵毅
dffe1c1c55 修改项目启动报错 2025-09-20 10:41:56 +08:00
赵毅
db223d2a8c 湖畔社区顶部添加图片 更改登录页图片 2025-09-20 10:39:17 +08:00
赵毅
4baca916e0 修改细节名称 2025-09-20 10:38:25 +08:00
25 changed files with 863 additions and 217 deletions

View File

@ -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
View 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", //巡检任务提交
};

View File

@ -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-appAPI
uni.scanCode({
success: (res) => {
//
console.log('扫码结果:', res.result);
//
console.log('扫码结果:', res);
// respath
if (res.path) {
console.log('扫码结果中的path:', res.path);
// pathscene
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();

View File

@ -1,11 +1,11 @@
{
"ios": {
"name": "石榴九九"
"name": "湖畔生活家"
},
"android": {
"name": "石榴九九"
"name": "湖畔生活家"
},
"common": {
"name": "石榴九九"
"name": "湖畔生活家"
}
}

25
main.js
View File

@ -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

View File

@ -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;
}

View File

@ -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">

View File

@ -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;
}

View File

@ -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>

View File

@ -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

View File

@ -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;
});

View File

@ -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;

View File

@ -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, '');
// 00
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'
})
}
})
},

View 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;
}

View 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>

View File

@ -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
});
}
}
}

View File

@ -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;
},

View 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;
}

View 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>

View File

@ -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": {

View File

@ -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}`

View File

@ -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;

View File

@ -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>

View File

@ -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';

View File

@ -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 小程序跳转方法二次封装