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">
|
||||||
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
|
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
|
||||||
@import "uview-ui/index.scss";
|
@import "uni_modules/uview-ui/index.scss";
|
||||||
</style>
|
</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>
|
<template>
|
||||||
<view class="foot-fixed">
|
<view class="foot-fixed">
|
||||||
<view v-for="(item, index) in navList" :key="index">
|
<view v-for="(item, index) in navList" :key="index">
|
||||||
<view
|
<view id="navIndex" :style="{ width: foot_width }" @click="jump" :data-idx="index" :data-url="item.url"
|
||||||
id="navIndex"
|
:class="{ 'foot-item': true, 'scan-item': item.isScan }">
|
||||||
: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">
|
<view class="foot-icon-box">
|
||||||
<image
|
<image class="foot-icon" :src="item.photo" mode="widthFix" v-if="current != index" :style="{
|
||||||
class="foot-icon"
|
width: item.photo.includes('footer_localLife.png')
|
||||||
:src="item.photo"
|
? '70rpx'
|
||||||
mode="widthFix"
|
: '',
|
||||||
v-if="current != index"
|
}"></image>
|
||||||
:style="{
|
|
||||||
width: item.photo.includes('footer_localLife.png')
|
|
||||||
? '70rpx'
|
|
||||||
: '',
|
|
||||||
}"
|
|
||||||
></image>
|
|
||||||
<image
|
<image
|
||||||
:class="{ 'foot-icon3': item.photo.includes('footer_richScan.png'), 'foot-icon2': !item.photo.includes('footer_richScan.png') }"
|
:class="{ 'foot-icon3': item.photo.includes('footer_richScan.png'), 'foot-icon2': !item.photo.includes('footer_richScan.png') }"
|
||||||
:src="item.photoAc"
|
:src="item.photoAc" mode="widthFix" v-if="current == index"></image>
|
||||||
mode="widthFix"
|
|
||||||
v-if="current == index"
|
|
||||||
></image>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<text class="foot-label" id="navIndexLabel">{{ item.nav_name }}</text>
|
<text class="foot-label" id="navIndexLabel">{{ item.nav_name }}</text>
|
||||||
@ -36,6 +21,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
import { NavgateTo } from "../../utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "nav",
|
name: "nav",
|
||||||
props: {
|
props: {
|
||||||
@ -163,15 +151,36 @@ export default {
|
|||||||
const url = e.currentTarget.dataset.url;
|
const url = e.currentTarget.dataset.url;
|
||||||
const index = e.currentTarget.dataset.idx;
|
const index = e.currentTarget.dataset.idx;
|
||||||
const item = this.navList[index];
|
const item = this.navList[index];
|
||||||
|
|
||||||
// 检查是否为扫码功能
|
// 检查是否为扫码功能
|
||||||
if (item.isScan) {
|
if (item.isScan) {
|
||||||
// 调用uni-app的扫码API
|
// 调用uni-app的扫码API
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
success: (res) => {
|
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) => {
|
fail: (err) => {
|
||||||
console.log('扫码失败:', err);
|
console.log('扫码失败:', err);
|
||||||
@ -179,7 +188,7 @@ export default {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查url是否存在且不为空
|
// 检查url是否存在且不为空
|
||||||
if (!url || url.trim() === '') {
|
if (!url || url.trim() === '') {
|
||||||
this.NotOpen();
|
this.NotOpen();
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"ios": {
|
"ios": {
|
||||||
"name": "石榴九九"
|
"name": "湖畔生活家"
|
||||||
},
|
},
|
||||||
"android": {
|
"android": {
|
||||||
"name": "石榴九九"
|
"name": "湖畔生活家"
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"name": "石榴九九"
|
"name": "湖畔生活家"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
25
main.js
25
main.js
@ -7,9 +7,22 @@ import './uni.promisify.adaptor'
|
|||||||
App.mpType = 'app'
|
App.mpType = 'app'
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
import uView from 'uview-ui';
|
import uView from 'uni_modules/uview-ui';
|
||||||
Vue.use(uView);
|
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({
|
const app = new Vue({
|
||||||
...App
|
...App
|
||||||
@ -21,11 +34,19 @@ app.$mount()
|
|||||||
// #ifdef VUE3
|
// #ifdef VUE3
|
||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import uView from 'uview-ui';
|
import uView from 'uni_modules/uview-ui';
|
||||||
const app = createApp(App)
|
const app = createApp(App)
|
||||||
// 安装 uView
|
// 安装 uView
|
||||||
app.use(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.$toast = $toast
|
||||||
app.config.globalProperties.$modal = $modal
|
app.config.globalProperties.$modal = $modal
|
||||||
|
|||||||
@ -7,6 +7,16 @@ page {
|
|||||||
background-color: #f6f7fb;
|
background-color: #f6f7fb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.top{
|
||||||
|
height: 300rpx;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top image {
|
||||||
|
border-radius: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.community-list-container {
|
.community-list-container {
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="community-list-container">
|
<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-list">
|
||||||
<view class="community-item-box" v-for="(item, index) in communityList" :key="index">
|
<view class="community-item-box" v-for="(item, index) in communityList" :key="index">
|
||||||
<view class="community-item">
|
<view class="community-item">
|
||||||
|
|||||||
@ -393,4 +393,78 @@
|
|||||||
.toUp image {
|
.toUp image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 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>
|
<u-icon name="arrow-down" color="#999999" size="28"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="search-box" @click="searchService">
|
<view class="search-box" @click="searchService">
|
||||||
<image
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
|
||||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
|
class="search-icon" mode="aspectFit"></image>
|
||||||
class="search-icon"
|
|
||||||
mode="aspectFit"
|
|
||||||
></image>
|
|
||||||
<text class="search-placeholder">请输入您要找的服务</text>
|
<text class="search-placeholder">请输入您要找的服务</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 服务分类 -->
|
<!-- 服务分类 - 修改为 swiper 形式 -->
|
||||||
<view class="service-category">
|
<view class="swiperBox">
|
||||||
<view
|
<swiper class="swiper" @change="swiperChange" :current="currentIndex">
|
||||||
class="category-item"
|
<swiper-item v-for="(page, pageIndex) in swiperList" :key="pageIndex">
|
||||||
v-for="(item, index) in serviceCategories"
|
<view class="navList">
|
||||||
:key="index"
|
<view class="navItem" v-for="(item, itemIndex) in page" :key="itemIndex" @click="changeNav(item)">
|
||||||
@click="navigateToService(item)"
|
<view class="navItemImg">
|
||||||
>
|
<image :src="picUrl + item.cate_image" mode="widthFix"></image>
|
||||||
<image :src="item.icon" class="category-icon"></image>
|
</view>
|
||||||
<text class="category-name">{{ item.name }}</text>
|
<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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -40,41 +45,29 @@
|
|||||||
<view class="announcement-flex">
|
<view class="announcement-flex">
|
||||||
到家
|
到家
|
||||||
<text class="announcement-title"> 公告</text>
|
<text class="announcement-title"> 公告</text>
|
||||||
<image
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_notice1.png"
|
||||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_notice1.png"
|
class="announcement-img" mode="aspectFit"></image>
|
||||||
class="announcement-img"
|
|
||||||
mode="aspectFit"
|
|
||||||
></image>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="hrStyle">|</view>
|
<view class="hrStyle">|</view>
|
||||||
<text class="announcement-content"
|
<text class="announcement-content">公告内容公告内容公告内容公告内容...</text>
|
||||||
>公告内容公告内容公告内容公告内容...</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>
|
||||||
<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>
|
||||||
|
|
||||||
<!-- 广告横幅 -->
|
<!-- 广告横幅 -->
|
||||||
<view class="serverList">
|
<view class="serverList">
|
||||||
<view class="serverList_left">
|
<view class="serverList_left">
|
||||||
<!-- <view> -->
|
<!-- <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">
|
<!-- <swiper-item v-for="(item, index) in homeLeftList" :key="index">
|
||||||
<image :src="item.pic_src" alt="" mode="aspectFit" />
|
<image :src="item.pic_src" alt="" mode="aspectFit" />
|
||||||
</swiper-item> -->
|
</swiper-item> -->
|
||||||
<!-- </view> -->
|
<!-- </view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="serverList_right">
|
<view class="serverList_right">
|
||||||
<view
|
<view :class="['serverItem', `serverItem${index + 1}`]" @tap="headerServerClick(item)"
|
||||||
:class="['serverItem', `serverItem${index + 1}`]"
|
v-for="(item, index) in homeRightList" :key="index">
|
||||||
@tap="headerServerClick(item)"
|
|
||||||
v-for="(item, index) in homeRightList"
|
|
||||||
:key="index"
|
|
||||||
>
|
|
||||||
<image :src="item.pic_src" mode="" />
|
<image :src="item.pic_src" mode="" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -82,49 +75,35 @@
|
|||||||
|
|
||||||
<!-- 立即联系 -->
|
<!-- 立即联系 -->
|
||||||
<view class="contact-section" @click="contactService">
|
<view class="contact-section" @click="contactService">
|
||||||
<image
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_kefu1.png"
|
||||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_kefu1.png"
|
class="contact-icon"></image>
|
||||||
class="contact-icon"
|
|
||||||
></image>
|
|
||||||
<view class="contact-text">
|
<view class="contact-text">
|
||||||
<text class="contact-title">立即联系</text>
|
<text class="contact-title">立即联系</text>
|
||||||
<br />
|
<br />
|
||||||
<text class="contact-subtitle">未找到您需要的服务?</text>
|
<text class="contact-subtitle">未找到您需要的服务?</text>
|
||||||
</view>
|
</view>
|
||||||
<image
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_kefu2.png"
|
||||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_kefu2.png"
|
class="contact-icon2"></image>
|
||||||
class="contact-icon2"
|
|
||||||
></image>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="interval"></view>
|
<view class="interval"></view>
|
||||||
|
|
||||||
<!-- 推荐热门服务 -->
|
<!-- 推荐热门服务 -->
|
||||||
<view class="hot-services">
|
<view class="hot-services">
|
||||||
<view class="section-header">
|
<view class="section-header">
|
||||||
<image
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_bottom1.png"
|
||||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_bottom1.png"
|
class="section-arrow"></image>
|
||||||
class="section-arrow"
|
|
||||||
></image>
|
|
||||||
<text class="section-title">推荐热门服务</text>
|
<text class="section-title">推荐热门服务</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="service-list">
|
<view class="service-list">
|
||||||
<view
|
<view class="service-card" v-for="(service, index) in hotServiceList" :key="index">
|
||||||
class="service-card"
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/ceshi.png"
|
||||||
v-for="(service, index) in hotServiceList"
|
class="service-image"></image>
|
||||||
: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">
|
||||||
<view class="service-info-left">
|
<view class="service-info-left">
|
||||||
<view class="service-info-left-top">
|
<view class="service-info-left-top">
|
||||||
<text class="service-name">{{ service.name }}</text>
|
<text class="service-name">{{ service.name }}</text>
|
||||||
<image
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_bottom2.png"
|
||||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/index_bottom2.png"
|
class="service-image2"></image>
|
||||||
class="service-image2"
|
|
||||||
></image>
|
|
||||||
<text class="service-tag">{{ service.tag }}</text>
|
<text class="service-tag">{{ service.tag }}</text>
|
||||||
</view>
|
</view>
|
||||||
<br />
|
<br />
|
||||||
@ -132,10 +111,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="service-info-right">
|
<view class="service-info-right">
|
||||||
<view class="service-footer">
|
<view class="service-footer">
|
||||||
<view
|
<view class="service-button" @click="navigateToReservation(service)">
|
||||||
class="service-button"
|
|
||||||
@click="navigateToReservation(service)"
|
|
||||||
>
|
|
||||||
<text class="button-text">去预约</text>
|
<text class="button-text">去预约</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="service-count">{{ service.count }}</text>
|
<text class="service-count">{{ service.count }}</text>
|
||||||
@ -150,12 +126,7 @@
|
|||||||
|
|
||||||
<!-- 回到顶部 -->
|
<!-- 回到顶部 -->
|
||||||
<div class="toUp" @click="scrollToTop">
|
<div class="toUp" @click="scrollToTop">
|
||||||
<u-badge
|
<u-badge numberType="limit" type="error" max="99" :value="value"></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>
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/toUp.png"></image>
|
||||||
</div>
|
</div>
|
||||||
</view>
|
</view>
|
||||||
@ -168,7 +139,7 @@ import {
|
|||||||
NavgateTo,
|
NavgateTo,
|
||||||
menuButtonInfo,
|
menuButtonInfo,
|
||||||
} from "../../../utils/index";
|
} from "../../../utils/index";
|
||||||
import { apiArr } from "../../../api/reservation";
|
import { apiArr } from "../../../api/v2local";
|
||||||
import nav from "../../../components/nav/nav";
|
import nav from "../../../components/nav/nav";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -177,51 +148,13 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
picUrl,
|
||||||
// 当前位置
|
// 当前位置
|
||||||
currentLocation: "衡水市桃城区",
|
currentLocation: "衡水市桃城区",
|
||||||
// 服务分类数据
|
// 服务分类数据
|
||||||
serviceCategories: [
|
serviceCategories: [],
|
||||||
{
|
swiperList: [],
|
||||||
name: "家电维修",
|
currentIndex: 0,
|
||||||
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",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
homeLeftList: [
|
homeLeftList: [
|
||||||
{
|
{
|
||||||
title: "",
|
title: "",
|
||||||
@ -252,6 +185,30 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
chooseLocation() {
|
||||||
// uni.navigateTo({
|
// uni.navigateTo({
|
||||||
@ -264,7 +221,7 @@ export default {
|
|||||||
// url: "/packages/homeServer/search/index",
|
// url: "/packages/homeServer/search/index",
|
||||||
// });
|
// });
|
||||||
},
|
},
|
||||||
// 导航到服务详情
|
// 导航到服务详情(保留原方法但修改为与changeNav一致)
|
||||||
navigateToService(item) {
|
navigateToService(item) {
|
||||||
// uni.navigateTo({
|
// uni.navigateTo({
|
||||||
// url: "/packages/homeServer/classify/index",
|
// url: "/packages/homeServer/classify/index",
|
||||||
@ -309,6 +266,7 @@ export default {
|
|||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getCurrentLocation();
|
this.getCurrentLocation();
|
||||||
|
this.getServiceCategories();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -158,7 +158,10 @@ export default {
|
|||||||
//查询商家分类
|
//查询商家分类
|
||||||
async getCateList() {
|
async getCateList() {
|
||||||
let that = this;
|
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)
|
res.rows = res.rows.filter((item) => item.is_visible == 1)
|
||||||
console.log(res);
|
console.log(res);
|
||||||
// 将数据分成每10个一组
|
// 将数据分成每10个一组
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="white_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">
|
<swiper-item v-for="(item, pageIndex) in info.bigImg" :key="pageIndex">
|
||||||
<image class="pic" :src="picUrl + item" />
|
<image class="pic" :src="picUrl + item" />
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper> -->
|
||||||
|
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<view class="title">{{ info.merchant_name }}</view>
|
<view class="title">{{ info.merchant_name }}</view>
|
||||||
@ -28,7 +29,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="table">
|
<view class="table">
|
||||||
<view class="label">营业地址</view>
|
<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>
|
||||||
<view class="table mb32">
|
<view class="table mb32">
|
||||||
<view class="label">特色服务</view>
|
<view class="label">特色服务</view>
|
||||||
@ -97,7 +98,7 @@
|
|||||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/Index_add.png" mode="" />
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/Index_add.png" mode="" />
|
||||||
<view>导航</view>
|
<view>导航</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"
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/localLife_detail_Frame.png"
|
||||||
mode="" />
|
mode="" />
|
||||||
<view>电话</view>
|
<view>电话</view>
|
||||||
@ -136,14 +137,22 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
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() {
|
onShow() {
|
||||||
this.page_num = 1
|
// 已移至onLoad中执行,确保执行顺序
|
||||||
this.flag = false
|
|
||||||
this.commentList = []
|
|
||||||
this.getCommentList()
|
|
||||||
this.getMerchantInfo()
|
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
if (this.flag) {
|
if (this.flag) {
|
||||||
@ -169,7 +178,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.flag = false;
|
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) => {
|
const list = res.rows.filter((item) => {
|
||||||
return item.status == 2;
|
return item.status == 2;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -137,8 +137,8 @@ export default {
|
|||||||
currentIndex: 0,
|
currentIndex: 0,
|
||||||
checkedItems: [false, false, false, false],
|
checkedItems: [false, false, false, false],
|
||||||
address: "",
|
address: "",
|
||||||
page_size: "10",
|
page_size: 10,
|
||||||
page_num: "1",
|
page_num: 1,
|
||||||
flag: false,
|
flag: false,
|
||||||
merchatList: [],
|
merchatList: [],
|
||||||
};
|
};
|
||||||
@ -178,7 +178,10 @@ export default {
|
|||||||
//查询商家分类
|
//查询商家分类
|
||||||
async getCateList() {
|
async getCateList() {
|
||||||
let that = this;
|
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)
|
res.rows = res.rows.filter((item) => item.is_visible == 1)
|
||||||
console.log(res);
|
console.log(res);
|
||||||
// 将数据分成每10个一组
|
// 将数据分成每10个一组
|
||||||
@ -228,7 +231,7 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (res.rows.length == this.page_size) {
|
if (res.rows.length == this.page_size) {
|
||||||
this.page_num = this.page_num + 1;
|
this.page_size = this.page_size + 10;
|
||||||
this.flag = true;
|
this.flag = true;
|
||||||
} else {
|
} else {
|
||||||
this.flag = false;
|
this.flag = false;
|
||||||
|
|||||||
@ -18,7 +18,8 @@
|
|||||||
|
|
||||||
<view class="Msg">
|
<view class="Msg">
|
||||||
<view class="payMony">
|
<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>
|
<cu-keyboard ref="cukeyboard" @change="change" @confirm="keyboardConfirm" @hide="hide"></cu-keyboard>
|
||||||
</view>
|
</view>
|
||||||
<view class="payRemark">
|
<view class="payRemark">
|
||||||
@ -144,26 +145,26 @@ export default {
|
|||||||
change(value) {
|
change(value) {
|
||||||
// 先进行基本的输入格式化
|
// 先进行基本的输入格式化
|
||||||
let formattedValue = value.toString().replace(/[^\d.]/g, '');
|
let formattedValue = value.toString().replace(/[^\d.]/g, '');
|
||||||
|
|
||||||
// 如果第一个数字是0且后面还有其他数字,则删除这个0
|
// 如果第一个数字是0且后面还有其他数字,则删除这个0
|
||||||
if (formattedValue.length >= 2 && formattedValue[0] === '0' && formattedValue[1] !== '.') {
|
if (formattedValue.length >= 2 && formattedValue[0] === '0' && formattedValue[1] !== '.') {
|
||||||
formattedValue = formattedValue.substring(1);
|
formattedValue = formattedValue.substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 限制只能有一个小数点
|
// 限制只能有一个小数点
|
||||||
formattedValue = formattedValue.replace(/\.{2,}/g, '.');
|
formattedValue = formattedValue.replace(/\.{2,}/g, '.');
|
||||||
|
|
||||||
// 确保小数点后最多两位
|
// 确保小数点后最多两位
|
||||||
const parts = formattedValue.split('.');
|
const parts = formattedValue.split('.');
|
||||||
if (parts.length > 1) {
|
if (parts.length > 1) {
|
||||||
formattedValue = parts[0] + '.' + parts[1].substring(0, 2);
|
formattedValue = parts[0] + '.' + parts[1].substring(0, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理开头是小数点的情况
|
// 处理开头是小数点的情况
|
||||||
if (formattedValue.startsWith('.')) {
|
if (formattedValue.startsWith('.')) {
|
||||||
formattedValue = '0' + formattedValue;
|
formattedValue = '0' + formattedValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.Money = formattedValue;
|
this.Money = formattedValue;
|
||||||
},
|
},
|
||||||
// 点击键盘确认按钮时触发
|
// 点击键盘确认按钮时触发
|
||||||
@ -297,7 +298,7 @@ export default {
|
|||||||
}
|
}
|
||||||
request(apiArr.createPay, "POST", {
|
request(apiArr.createPay, "POST", {
|
||||||
merchant_id: that.info.id,
|
merchant_id: that.info.id,
|
||||||
order_amount: Number((that.Money) * 100), //金额
|
order_amount: Number((that.Money)), //金额
|
||||||
refund_property_fee: that.homeMoney, //物业费
|
refund_property_fee: that.homeMoney, //物业费
|
||||||
refund_member_points: that.integral, //积分
|
refund_member_points: that.integral, //积分
|
||||||
remark: that.remarks,
|
remark: that.remarks,
|
||||||
@ -331,38 +332,44 @@ export default {
|
|||||||
|
|
||||||
async LakaLaPrePay() {
|
async LakaLaPrePay() {
|
||||||
let that = this
|
let that = this
|
||||||
request(apiPay.pay, "POST", {
|
request(apiArr.getPreOrderInfo, "POST", {
|
||||||
total_amount: that.OrderMsg.order_amount,
|
id: that.payId,
|
||||||
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')
|
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res, 'res');
|
if (res && res.timeStamp && res.nonceStr && res.package && res.signType && res.paySign) {
|
||||||
|
// 调用微信支付
|
||||||
const { resp_data, msg } = res
|
uni.requestPayment({
|
||||||
|
timeStamp: res.timeStamp,
|
||||||
wx.requestPayment({
|
nonceStr: res.nonceStr,
|
||||||
timeStamp: String(resp_data.acc_resp_fields.time_stamp),
|
package: res.package,
|
||||||
nonceStr: String(resp_data.acc_resp_fields.nonce_str),
|
signType: res.signType,
|
||||||
package: String(resp_data.acc_resp_fields.package),
|
paySign: res.paySign,
|
||||||
signType: String(resp_data.acc_resp_fields.sign_type),
|
success: (payRes) => {
|
||||||
paySign: String(resp_data.acc_resp_fields.pay_sign),
|
const params = {
|
||||||
success(res) {
|
id: this.OrderMsg.id,
|
||||||
that.queryPay(resp_data)
|
}
|
||||||
},
|
request(apiArr.tradeQuery, "POST", params).then(res => {
|
||||||
fail(fal) {
|
})
|
||||||
if (fal.errMsg == 'requestPayment:fail cancel') {
|
},
|
||||||
// that.payFail(2)
|
fail: (payErr) => {
|
||||||
} else {
|
uni.showToast({
|
||||||
// that.payFail(1)
|
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" />
|
<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>
|
<text class="work-order-text">工单台</text>
|
||||||
</view>
|
</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 class="work-order-card" v-else></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -96,6 +101,22 @@ export default {
|
|||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/packages/workOrderDashboard/index/index?communityId=' + changeCommData.id
|
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,
|
status: this.active,
|
||||||
page_num: this.page_num,
|
page_num: this.page_num,
|
||||||
page_size: this.page_size,
|
page_size: this.page_size,
|
||||||
|
user_id: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res.rows) {
|
if (res.rows) {
|
||||||
@ -166,6 +167,7 @@ export default {
|
|||||||
status: status,
|
status: status,
|
||||||
page_num: this.page_num,
|
page_num: this.page_num,
|
||||||
page_size: this.page_size,
|
page_size: this.page_size,
|
||||||
|
user_id: ''
|
||||||
});
|
});
|
||||||
return res.total;
|
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",
|
"path": "index/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "榴园到家 服务至上",
|
"navigationBarTitleText": "湖畔到家 服务至上",
|
||||||
"navigationBarBackgroundColor": "#fff"
|
"navigationBarBackgroundColor": "#fff"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -960,6 +960,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root": "packages/advertising",
|
||||||
|
"pages": [
|
||||||
|
{
|
||||||
|
"path": "index/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "推荐商品",
|
||||||
|
"navigationBarBackgroundColor": "#ffffff"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view v-if="currentCity && currentCity.cityName && currentCity.cityName != '衡水市'">
|
<!-- <view v-if="currentCity && currentCity.cityName && currentCity.cityName != '衡水市'">
|
||||||
<view class="not_found_404">
|
<view class="not_found_404">
|
||||||
<text class="not_found_text">404</text>
|
<text class="not_found_text">404</text>
|
||||||
<text class="not_found_desc">当前城市暂未开通服务</text>
|
<text class="not_found_desc">当前城市暂未开通服务</text>
|
||||||
<button class="not_found_button" @click="obtainLocation">重新定位</button>
|
<button class="not_found_button" @click="obtainLocation">重新定位</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else> -->
|
||||||
|
<view>
|
||||||
<view class="container" :style="{ marginTop: top + 'px' }" v-if="loading">
|
<view class="container" :style="{ marginTop: top + 'px' }" v-if="loading">
|
||||||
<!-- 城市信息部分 -->
|
<!-- 城市信息部分 -->
|
||||||
<view class="white_container searchBox" :style="{ height: localHeight + 'px' }">
|
<view class="white_container searchBox" :style="{ height: localHeight + 'px' }">
|
||||||
@ -113,7 +114,7 @@
|
|||||||
<view class="serverList_left">
|
<view class="serverList_left">
|
||||||
<swiper>
|
<swiper>
|
||||||
<swiper-item v-for="(item, index) in homeLeftList" :key="index" @click="headerServerClick(item)">
|
<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> -->
|
<!-- <view>{{ item.ad_position }}</view> -->
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
@ -171,7 +172,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-sticky>
|
</u-sticky>
|
||||||
|
|
||||||
<!-- 商家列表展示 -->
|
<!-- 商家列表展示 -->
|
||||||
<view class="merchantList" :class="{ merchantList2: merchatList.length < 3 }">
|
<view class="merchantList" :class="{ merchantList2: merchatList.length < 3 }">
|
||||||
<view class="overlay" v-if="showDropdown"></view>
|
<view class="overlay" v-if="showDropdown"></view>
|
||||||
@ -204,8 +205,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="merchantItem_right_con_right" @click="toJump(item)">
|
<view class="merchantItem_right_con_right" @click="toJump(item)">
|
||||||
<image
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_review.png"
|
||||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_review.png"
|
|
||||||
mode="aspectFill"></image>
|
mode="aspectFill"></image>
|
||||||
点评
|
点评
|
||||||
</view>
|
</view>
|
||||||
@ -216,9 +216,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="more" v-if="flag">下拉加载后续10条,共计{{ bottomTotal }}条</view>
|
<view class="more" v-if="flag">下拉加载后续10条,共计{{ bottomTotal }}条</view>
|
||||||
<nav-footer />
|
<nav-footer />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -953,8 +953,10 @@ export default {
|
|||||||
|
|
||||||
// 分类查询
|
// 分类查询
|
||||||
async getCateList() {
|
async getCateList() {
|
||||||
const res = await request(apiArr2.getCateList, "POST", {
|
const params = {
|
||||||
}, { slice: false });
|
isShop: 1,
|
||||||
|
}
|
||||||
|
const res = await request(apiArr2.getCateList, "POST", params, { slice: false });
|
||||||
if (res.rows.length) {
|
if (res.rows.length) {
|
||||||
this.currentCategoryId = res.rows[0].id
|
this.currentCategoryId = res.rows[0].id
|
||||||
this.activeCategoryId = `category-${this.currentCategoryId}`
|
this.activeCategoryId = `category-${this.currentCategoryId}`
|
||||||
|
|||||||
@ -3,10 +3,11 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 1334rpx;
|
height: 1334rpx;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-title {
|
.login-title {
|
||||||
margin-top: 655rpx;
|
margin-top: 550rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-tip {
|
.login-tip {
|
||||||
@ -52,6 +53,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
border: 1px solid #EFEFEF;
|
border: 1px solid #EFEFEF;
|
||||||
width: 550rpx;
|
width: 550rpx;
|
||||||
@ -59,10 +61,12 @@
|
|||||||
line-height: 60rpx;
|
line-height: 60rpx;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tips {
|
.tips {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #FD4529;
|
color: #FD4529;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app_login_btn {
|
.app_login_btn {
|
||||||
width: 550rpx;
|
width: 550rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="login"
|
<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-title">
|
||||||
<view class="login-tip" style="font-size: 40rpx; color: #000000;">欢迎来到【湖畔生活家】</view>
|
<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-color-paragraph: #3F536E; // 文章段落颜色
|
||||||
$uni-font-size-paragraph:15px;
|
$uni-font-size-paragraph:15px;
|
||||||
|
|
||||||
@import 'uview-ui/theme.scss';
|
@import 'uni_modules/uview-ui/theme.scss';
|
||||||
@ -2,11 +2,15 @@
|
|||||||
const environments = {
|
const environments = {
|
||||||
development: {
|
development: {
|
||||||
apiUrl: 'https://test.hshuishang.com',
|
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: {
|
production: {
|
||||||
apiUrl: 'https://api.hshuishang.com',
|
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 RequsetUrl = envConfig.apiUrl; // 请求地址前缀
|
||||||
export const picUrl = envConfig.picUrl; // 图片地址前缀
|
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 小程序跳转方法二次封装
|
* @description 小程序跳转方法二次封装
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user