Compare commits

...

84 Commits

Author SHA1 Message Date
赵毅
cb4e23669d 修改我的报修页面的各个状态的数量显示问题 2025-08-12 18:21:31 +08:00
赵毅
26c886f426 修改首页功能导航去的显示逻辑 2025-08-12 18:10:56 +08:00
赵毅
2ffa141844 修改接单派单按钮的显示逻辑 2025-08-12 18:04:29 +08:00
赵毅
439e689671 优化工单台页面 2025-08-12 17:56:55 +08:00
赵毅
93026479d3 添加工单台选择小区页面 2025-08-12 17:41:09 +08:00
赵毅
39a0160f95 修改首页搜索框样式 2025-08-12 17:31:20 +08:00
赵毅
847c1701f8 优化选择房产之后的提示的数据 2025-08-12 17:27:52 +08:00
赵毅
f44adc7721 修改首页功能导航区的显示逻辑 2025-08-12 17:15:58 +08:00
赵毅
59c5178af9 修改中部广告部分点击更多的事件 2025-08-12 17:07:38 +08:00
赵毅
17018a4e07 11 2025-08-12 16:34:57 +08:00
赵毅
0cab3dd853 修改主页的搜索框和热词的逻辑 2025-08-12 16:15:42 +08:00
赵毅
9d5b9a86bc 修复商家分类下拉部分的显示问题 2025-08-12 15:42:42 +08:00
赵毅
bc782b6227 修改接单 派单的显示逻辑
优化页面广告的显示问题
优化页面各部分的跳转逻辑
添加中部广告和底部分类tab的联动
2025-08-12 15:16:22 +08:00
赵毅
bdc1079f5a 优化商家详情的页面显示问题 2025-08-12 11:19:31 +08:00
赵毅
bfc285ff57 修复添加房产选择房产是的bug 2025-08-12 11:19:18 +08:00
赵毅
f34ffdd1c4 把公积金补贴商户改成一刻钟便利生活圈 2025-08-11 18:24:46 +08:00
赵毅
b2ad1d6abc 调整首页中部图片样式 2025-08-11 18:22:46 +08:00
赵毅
3580ba2185 更改接单 派单逻辑,添加工单台页面 2025-08-11 16:43:20 +08:00
赵毅
d49514d426 修改首页广告显示位置 2025-08-11 10:32:02 +08:00
赵毅
53342c7173 修复遮罩层的显示问题 2025-08-09 18:28:01 +08:00
赵毅
c87ee26b07 修改图片路径 2025-08-09 18:14:04 +08:00
赵毅
dbe6137a4e 修改底部导航 2025-08-09 18:06:19 +08:00
赵毅
87a645078b 小程序首页优化 2025-08-09 17:08:11 +08:00
赵毅
3f35b67705 首页添加搜索框 物业管理等 2025-08-08 17:45:30 +08:00
赵毅
29b21d9e53 修改本地生活 付款只能输入大于0的数字,且保留两位小数 2025-08-07 18:16:13 +08:00
赵毅
fc9e6b2ff7 修改本地生活点评回复的逻辑 2025-08-07 17:51:10 +08:00
赵毅
808661174e 修改本地生活点评的回复列表的显示逻辑 2025-08-07 17:43:59 +08:00
赵毅
25bb15d144 修改本地生活点评的显示逻辑 2025-08-07 17:03:49 +08:00
赵毅
1c332efdc0 添加点评部分的图片和视频的显示 2025-08-07 16:55:37 +08:00
赵毅
8f3af9a2aa 修改点击点评时的跳转页面 2025-08-07 15:23:42 +08:00
赵毅
353b01fa4f 修改本地生活线下快捷买单设置的显示逻辑 2025-08-07 10:18:15 +08:00
赵毅
70d90876ee 修改本地生活商家分类的显示逻辑 2025-08-07 09:53:42 +08:00
赵毅
81b65f9eb9 修复首页地址搜索的数据异常问题 2025-08-06 17:50:14 +08:00
赵毅
3e884f1b1a 修改我的小区展示数据的逻辑 2025-08-06 15:18:27 +08:00
赵毅
7fdf8f342f 修复物业缴费跳转的逻辑 2025-08-06 10:22:16 +08:00
赵毅
1de223346d 新增没有页房源绑定时的默认页面 2025-08-05 10:34:00 +08:00
赵毅
f52d8cbcc6 修改广告跳转页面异常的问题 2025-08-05 09:39:45 +08:00
赵毅
d64fa80c13 修改我的 - 积分的数据异常 2025-08-04 18:20:23 +08:00
赵毅
c83e7c5a9b 在线报修添加必填项校验 2025-08-04 15:55:15 +08:00
赵毅
806e2f36f6 修复 我的 - 设置页面的底部导航栏选中状态异常bug 2025-08-04 15:19:39 +08:00
赵毅
477a43e2ba 在线报修 - 修改图片上传数量限制 2025-08-04 15:16:27 +08:00
赵毅
609e551a90 在线报修-布局展示优化 2025-08-04 14:58:26 +08:00
赵毅
84ac2a6da5 物业缴费-后台 如果账单为否,点击物业缴费提示请配置账单 2025-08-04 11:46:28 +08:00
赵毅
7dc5ee160f 修复物业公积金数据异常的问题 2025-08-02 17:21:05 +08:00
赵毅
b1f9dc134d 修复我的小区每次点击相同的公告tab就会添加一条数据的bug 2025-08-02 15:54:58 +08:00
赵毅
68b309bb6b 修改 人员详情页面 - 添加工号 2025-08-02 15:28:10 +08:00
赵毅
0fa63c8166 优化 物业缴费跳转物业公积金 显示的小区信息逻辑 2025-08-02 11:14:45 +08:00
赵毅
336361d383 修复物业缴费页面显示undefined的问题 2025-08-02 10:03:48 +08:00
赵毅
d7118589fa 优化我的小区公告部分的显示样式 2025-08-02 09:45:12 +08:00
赵毅
660b77a732 优化我的小区左上角数据展示 2025-08-02 09:35:27 +08:00
赵毅
1b55237844 修改到家服务 - 人员详情页面 2025-08-01 18:16:51 +08:00
赵毅
5dca603b29 修复添加房产-楼层数据的显示问题 2025-08-01 16:39:41 +08:00
赵毅
1f3e2824ef 添加房产-修复小区和房源在后台配置的隐藏,小程序端依旧显示出来的bug 2025-08-01 15:18:57 +08:00
赵毅
83b7536692 物业缴费添加组合缴费功能 2025-08-01 09:51:23 +08:00
赵毅
75f55007b2 物业公积金-修复点击去抵扣物业账单没反应的bug 2025-07-31 18:01:35 +08:00
赵毅
3db2ddb1ff 物业缴费 - 修复切换房源失败 2025-07-31 17:40:29 +08:00
赵毅
631276afa3 物业公积金-手机号去掉 2025-07-31 16:30:19 +08:00
赵毅
4529b3f25c 物业缴费-修改点击箭头的操作 2025-07-31 16:07:14 +08:00
赵毅
4183457dfd 物业缴费-选择房源,如果没有房源提示暂无房源 2025-07-31 16:01:55 +08:00
赵毅
e816da4cf2 我的图标-布局调整 2025-07-31 15:54:31 +08:00
赵毅
7ffa374c55 我的小区-首页轮播横幅显示布局优化 2025-07-31 11:43:01 +08:00
赵毅
33916336ab 我的小区-添加房产-添加成功之后添加提示信息 2025-07-31 10:57:15 +08:00
赵毅
a89e4290b6 我的小区-选择房源-楼层点击加底色 2025-07-31 09:11:48 +08:00
赵毅
485145d706 fix : 公告分类标题-布局调整 2025-07-30 18:35:06 +08:00
赵毅
a9e42e8791 fix : 修改没有房源时 我的小区左上角的显示内容 2025-07-30 18:34:18 +08:00
赵毅
498f18d7da fix : 我的小区 添加没有房产的提示 2025-07-30 17:31:15 +08:00
赵毅
38f73a19c4 feat : 完成选择服务页面更改 2025-07-30 15:13:51 +08:00
赵毅
690c2d1833 feat : 商城页添加当日达标签 2025-07-28 17:38:48 +08:00
赵毅
18cf687324 fix : 修复报红 2025-07-28 10:58:45 +08:00
赵毅
38b6b44de9 修改图片地址 2025-07-28 10:25:26 +08:00
赵毅
744073e7ec 完善服务详情页面的价格范围筛选 2025-07-28 10:17:58 +08:00
赵毅
0a6d26eb49 修改页面 - 服务详情页面 2025-07-26 18:24:06 +08:00
赵毅
60d6fe9e9e 到家服务 完善筛选条件 2025-07-26 16:30:56 +08:00
赵毅
44013eb054 添加到家服务 公告管理页面 2025-07-26 11:46:59 +08:00
赵毅
1307aa9a7f 修改到家服务的搜索显示内容 2025-07-26 11:12:50 +08:00
赵毅
01aa983ec7 feat : 修改到家服务的师傅资料弹窗 2025-07-25 18:23:42 +08:00
赵毅
ad7818ce2d feat : 优化待评价 已评价页面 2025-07-25 16:09:33 +08:00
赵毅
ddd0408080 11 2025-07-25 15:22:22 +08:00
赵毅
d50dd6167e feat : 添加评论部分筛选款式功能 2025-07-25 15:21:49 +08:00
赵毅
48b26483c0 feat : 完善商品详情页面 2025-07-25 09:52:05 +08:00
赵毅
ad75a5142d feat : 商品详情部分添加价格说明 2025-07-24 11:52:22 +08:00
赵毅
0770dd40fb feat : 完成页面我的订单部分 - 待评价 已评价 评价 2025-07-23 17:18:39 +08:00
赵毅
82b4ba8b07 feat : 底部导航栏添加 - 本地生活 2025-07-23 15:42:59 +08:00
赵毅
38896f2a26 优化我的小区 公告部分的数据加载提示 2025-07-23 15:42:18 +08:00
73 changed files with 8345 additions and 2713 deletions

View File

@ -1,4 +1,6 @@
export const apiArr = { export const apiArr = {
isShowSearch: '/api/v1/wechat/home-page/search-enable/info', // 获取搜索框是否显示
hotWord: '/api/v1/wechat/home-page/search-hot-word/info', // 获取搜索框热词
list: '/api/v1/wechat/community/list', // 获取社区列表 list: '/api/v1/wechat/community/list', // 获取社区列表
info: '/api/v1/wechat/community/info', // 获取单个社区信息 info: '/api/v1/wechat/community/info', // 获取单个社区信息
isJoin: '/api/v1/wechat/community/is-join', // 用户是否加入社区、楼宇、房间 isJoin: '/api/v1/wechat/community/is-join', // 用户是否加入社区、楼宇、房间
@ -36,6 +38,7 @@ export const apiArr = {
commInfo: "/api/v2/wechat/mpuser-crud/community-owner/info",//我的房产信息小区列表 commInfo: "/api/v2/wechat/mpuser-crud/community-owner/info",//我的房产信息小区列表
create: "/api/v2/wechat/community-owners/create",//创建新的业主信息 create: "/api/v2/wechat/community-owners/create",//创建新的业主信息
communityInfo: "/api/v2/community/get-one",//获取小区信息
getOrderList:"/api/v2/wechat/community-orders/get-all-list",//获取账单 getOrderList:"/api/v2/wechat/community-orders/get-all-list",//获取账单
getCommunityRoomList:"/api/v2/wechat/community-room/list", //获取房源列表 getCommunityRoomList:"/api/v2/wechat/community-room/list", //获取房源列表

View File

@ -1,5 +1,6 @@
export const apiArr = { export const apiArr = {
getCateList: "/api/v2/wechat/merchant-cate-crud/list", //小区房源列表 getCateList: "/api/v2/wechat/merchant-cate-crud/list", //商家分类列表
getMerchantList: "/api/v2/wechat/merchant-info-crud/page", //商家列表
getHomeBanner: "/api/v2/wechat/home-banner-region-crud/page", //获取首页banner及其广告 getHomeBanner: "/api/v2/wechat/home-banner-region-crud/page", //获取首页banner及其广告
getButtonNum:"/api/v2/wechat/nav-display-crud/info",//获取首页button的行数 数量 getButtonNum:"/api/v2/wechat/nav-display-crud/info",//获取首页button的行数 数量
getHomeButton:"/api/v2/wechat/home-button-region-crud/page", //获取首页button getHomeButton:"/api/v2/wechat/home-button-region-crud/page", //获取首页button

View File

@ -2,6 +2,7 @@ export const apiArr = {
getMerChantCateList:"/api/v2/wechat/merchant-cate-crud/list", //商家分类 getMerChantCateList:"/api/v2/wechat/merchant-cate-crud/list", //商家分类
getMerchantList:"/api/v2/wechat/merchant-info-crud/page",//商家列表 getMerchantList:"/api/v2/wechat/merchant-info-crud/page",//商家列表
createComment:"/api/v2/wechat/merchant-evaluation-crud/creat",//创建用户评价 createComment:"/api/v2/wechat/merchant-evaluation-crud/creat",//创建用户评价
getMerchantInfo:"/api/v2/wechat/merchant-info-crud/info",//获取商家信息详情
getMerchantComment:"/api/v2/wechat/merchant-evaluation-crud/page",//获取商家评价 getMerchantComment:"/api/v2/wechat/merchant-evaluation-crud/page",//获取商家评价
merChantCommentLike:"/api/v2/wechat/merchant-evaluation-like-crud/creat",//点赞 merChantCommentLike:"/api/v2/wechat/merchant-evaluation-like-crud/creat",//点赞
merChantCommentUnlike:"/api/v2/wechat/merchant-evaluation-like-crud/del",//取消点赞 merChantCommentUnlike:"/api/v2/wechat/merchant-evaluation-like-crud/del",//取消点赞

View File

@ -1,4 +1,3 @@
.foot-fixed { .foot-fixed {
position: fixed; position: fixed;
bottom: -1px; bottom: -1px;
@ -8,14 +7,17 @@
width: 100%; width: 100%;
background: #ffffff; background: #ffffff;
border-top: 1px solid #E8E8E8; border-top: 1px solid #E8E8E8;
box-shadow: 0 0 3px rgba(0,0,0,0.1); box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
} }
.foot-fixed .foot-item { .foot-fixed .foot-item {
padding: 0; padding: 0;
} }
.foot-fixed .foot-item { .foot-fixed .foot-item {
position: relative; position: relative;
} }
.foot-fixed .foot-item { .foot-fixed .foot-item {
width: 20%; width: 20%;
float: left; float: left;
@ -27,48 +29,88 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
a { a {
color: #666; color: #666;
text-decoration: none; text-decoration: none;
} }
a { a {
background: transparent; background: transparent;
} }
.foot-fixed .foot-item .foot-icon-box{ .foot-fixed .foot-item .foot-icon-box {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 66rpx; width: 66rpx;
height: 66rpx; height: 66rpx;
} }
.foot-fixed .foot-item .foot-icon { .foot-fixed .foot-item .foot-icon {
width: 47rpx; width: 47rpx;
margin: 0 auto; margin: 0 auto;
} }
.foot-fixed .foot-item .foot-icon2 { .foot-fixed .foot-item .foot-icon2 {
width: 66rpx; width: 66rpx;
height: 66rpx; height: 66rpx;
margin: 0 auto; margin: 0 auto;
} }
.foot-icon3{
width: 130rpx;
height: 130rpx;
border-radius: 50%;
}
.foot-fixed .foot-item .foot-label { .foot-fixed .foot-item .foot-label {
margin: 5px 0; margin: 5px 0;
} }
.foot-fixed .foot-item .foot-label { .foot-fixed .foot-item .foot-label {
height: 15px; height: 15px;
line-height: 15px; line-height: 15px;
font-size: 12px; font-size: 12px;
} }
.foot-fixed .foot-item span { .foot-fixed .foot-item span {
display: block; display: block;
width: 100%; width: 100%;
text-align: center; text-align: center;
} }
.foot-fixed .scan-item {
position: relative;
margin-top: -30rpx;
z-index: 1000;
}
.foot-fixed .scan-item .foot-icon-box {
width: 130rpx;
height: 130rpx;
background: #fff;
border-radius: 50%;
box-shadow: 0 0 20rpx rgba(255, 77, 79, 0.5);
display: flex;
align-items: center;
justify-content: center;
margin-bottom: -20rpx;
}
.foot-fixed .scan-item .foot-icon {
width: 130rpx;
height: 130rpx;
border-radius: 50%;
}
.foot-fixed .scan-item .foot-label {
margin-top: 10rpx;
color: #FF4D4F;
font-weight: bold;
}
/* 自定义导航栏 */ /* 自定义导航栏 */
.nav-box { .nav-box {

View File

@ -1,141 +1,202 @@
<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 id="navIndex" :style="{width:foot_width}" @click="jump" :data-idx="index" :data-url="item.url" <view
class="foot-item"> 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"> <view class="foot-icon-box">
<image class="foot-icon" :src="item.photo" mode="widthFix" v-if="current != index"></image> <image
<image class="foot-icon2" :src="item.photoAc" mode="widthFix" v-if="current == index"></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>
</view> </view>
<text class="foot-label" id="navIndexLabel">{{ item.nav_name }}</text>
<text class="foot-label" id="navIndexLabel">{{item.nav_name}}</text>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
name: "nav", name: "nav",
props:{ props: {
current:{ current: {
type:Number, type: Number,
default: 0, default: 0,
},
},
computed: {
foot_width() {
//
return (100 / this.navList.length).toFixed(2) + '%';
} }
}, },
data() { data() {
return { return {
navList: [ navList: [
{ {
photo:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_home.png", photo:
photoAc:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_homeAc.png", "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_home.png",
nav_name:"首页", photoAc:
url:"/pages/index/index" "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_homeAc.png",
nav_name: "智慧首页",
url: "/pages/index/index",
}, },
{ {
photo:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_community.png", photo:
photoAc:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_communityAc.png", "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_facility.png",
nav_name:"我的小区", photoAc:
url:"/packages/community/index/index" "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_facilityAc.png",
nav_name: "智能设备",
url: "",
}, },
{ {
photo:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_shop.png", photo:
photoAc:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_shopAc.png", "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_richScan.png",
nav_name:"优选商城", photoAc:
url:"/packages/shop/index/index" "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_richScan.png",
url: "",
isScan: true,
}, },
{ {
photo:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_door.png", photo:
photoAc:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_communityAc.png", "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_community.png",
nav_name:"到家服务", photoAc:
url:"/packages/homeServer/index/index" "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_communityAc.png",
nav_name: "我的小区",
url: "/packages/community/index/index",
}, },
// {
// photo: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_localLife.png",
// photoAc: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_localLifeAc.png",
// nav_name: "",
// url: "/packages/localLife/index/index",
// },
// {
// photo:
// "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_shop.png",
// photoAc:
// "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_shopAc.png",
// nav_name: "",
// url: "/packages/shop/index/index",
// },
// {
// photo:
// "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_door.png",
// photoAc:
// "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_communityAc.png",
// nav_name: "",
// url: "/packages/homeServer/index/index",
// },
{ {
photo:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_mine.png", photo:
photoAc:"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_mineAc.png", "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_mine.png",
nav_name:"我的", photoAc:
url:"/pages/user/index" "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_mineAc.png",
nav_name: "个人中心",
url: "/pages/user/index",
}, },
], ],
foot_width: '20%', }
};
}, },
methods: { methods: {
getFootnav() { getFootnav() {
let _that = this; let _that = this;
uni.request({ uni.request({
url: 'https://zhsq.hshuishang.com/Miniapi/Index/footer_nav_list', url: "https://zhsq.hshuishang.com/Miniapi/Index/footer_nav_list",
method: 'post', method: "post",
header: { header: {
'Content-type': 'application/x-www-form-urlencoded' "Content-type": "application/x-www-form-urlencoded",
}, },
data: {}, data: {},
dataType: 'json', dataType: "json",
success: (result) => { success: (result) => {
result.data[0].url = "/pages/index/index" result.data[0].url = "/pages/index/index";
result.data[1].url = "/pages/device/device" result.data[1].url = "/pages/device/device";
result.data[2].nav_name = "手机通行" result.data[2].nav_name = "手机通行";
result.data[2].url = "/pages/phoneGo/phoneGo" result.data[2].url = "/pages/phoneGo/phoneGo";
result.data[3].url = `/packages/community/index/index` result.data[3].url = `/packages/community/index/index`;
result.data[4].url = "/pages/user/index" result.data[4].url = "/pages/user/index";
result.data.splice(1, 2); result.data.splice(1, 2);
let footWidth = (100 / result.data.length).toFixed(2) + '%'; let footWidth = (100 / result.data.length).toFixed(2) + "%";
this.navList = result.data; this.navList = result.data;
this.foot_width = footWidth; this.foot_width = footWidth;
}, },
}); });
}, },
// //
NotOpen() { NotOpen() {
uni.showModal({ uni.showModal({
title: '提示', title: "提示",
content: '此功能暂未开通!', content: "此功能暂未开通!",
showCancel: false, showCancel: false,
complete: (res) => { complete: (res) => {
if (res.cancel) { if (res.cancel) {
} }
} },
}) });
}, },
jump(e) { jump(e) {
const ctoken = uni.getStorageSync('ctoken'); const url = e.currentTarget.dataset.url;
const authen = ['/pages/index/index', '/pages/user/index','/pages/user/index']; // url
if (!url || url.trim() === '') {
this.NotOpen();
return;
}
const ctoken = uni.getStorageSync("ctoken");
const authen = [
"/pages/index/index",
"/pages/user/index",
];
// ctoken tab访 // ctoken tab访
if (authen.includes(e.currentTarget.dataset.url)) { if (authen.includes(url)) {
uni.redirectTo({ uni.redirectTo({
url: e.currentTarget.dataset.url, url: url,
}) });
return return;
} }
if (!ctoken) { if (!ctoken) {
uni.redirectTo({ uni.redirectTo({
url: '/pages/login/login', url: "/pages/login/login",
}) });
return; return;
} }
uni.redirectTo({ uni.redirectTo({
url: e.currentTarget.dataset.url, url: url,
}) });
}, },
}, },
mounted() { mounted() {
// this.getFootnav(); // this.getFootnav();
} },
} };
</script> </script>
<style> <style>
@import url("./nav.css"); @import url("./nav.css");
</style> </style>

View File

@ -5,26 +5,35 @@
<view class="table"> <view class="table">
<view class="label">房产</view> <view class="label">房产</view>
<view class="flexBox" @click="choseCommunity"> <view class="flexBox" @click="choseCommunity">
<input type="text" v-model="changeComm" disabled placeholder="请选择房产"> <input
type="text"
v-model="changeComm"
disabled
placeholder="请选择房产"
/>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
<view class="table"> <view class="table">
<view class="label">姓名</view> <view class="label">姓名</view>
<input type="text" v-model="nameVal" placeholder="请输入姓名"> <input type="text" v-model="nameVal" placeholder="请输入姓名" />
</view> </view>
<view class="table"> <view class="table">
<view class="label">手机</view> <view class="label">手机</view>
<input type="text" v-model="phoneVal" placeholder="请输入手机号"> <input type="text" v-model="phoneVal" placeholder="请输入手机号" />
</view> </view>
<view class="table"> <view class="table">
<view class="label">身份</view> <view class="label">身份</view>
<view class="flexBox" @click="chooseIdentity"> <view class="flexBox" @click="chooseIdentity">
<input type="number" v-model="selectedLabel" disabled placeholder="请选择身份"> <input
type="number"
v-model="selectedLabel"
disabled
placeholder="请选择身份"
/>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
<!-- <view class="tip"> <!-- <view class="tip">
注意业主为在物业登记在册的人员需经过物业审 核确认后即可成为该房产的业主如需帮助可与物 业或平台联系 注意业主为在物业登记在册的人员需经过物业审 核确认后即可成为该房产的业主如需帮助可与物 业或平台联系
@ -32,122 +41,129 @@
</view> </view>
<view class="btn" @click="headerSubmitClick">确定</view> <view class="btn" @click="headerSubmitClick">确定</view>
<u-popup :show="show" @close="close" mode="bottom" customStyle="width: 500rpx;" round="20rpx"> <u-popup
<u-picker :show="show" :columns="columns" keyName="label" @cancel="close" @confirm="confirm"></u-picker> :show="show"
@close="close"
mode="bottom"
customStyle="width: 500rpx;"
round="20rpx"
>
<u-picker
:show="show"
:columns="columns"
keyName="label"
@cancel="close"
@confirm="confirm"
></u-picker>
</u-popup> </u-popup>
</view> </view>
</template> </template>
<script> <script>
import { import { request, NavgateTo, isPhone } from "../../../utils";
request, import { apiArr } from "../../../api/community";
NavgateTo, export default {
isPhone
} from '../../../utils';
import {
apiArr
} from '../../../api/community';
export default {
onBackPress(options) { onBackPress(options) {
console.log('from:' + options.from) console.log("from:" + options.from);
}, },
data() { data() {
return { return {
communityId: '', communityId: "",
roomId: '', roomId: "",
managementMobile: '', managementMobile: "",
show: false, show: false,
changeComm: '', changeComm: "",
columns: [ columns: [
[{ [
{
label: "业主", label: "业主",
value: "1" value: "1",
}, },
{ {
label: "家属", label: "家属",
value: "2" value: "2",
}, },
{ {
label: "租客", label: "租客",
value: "3" value: "3",
}, },
{ {
label: "访客", label: "访客",
value: "4" value: "4",
}, },
]
], ],
selectedValue: '', ],
selectedLabel: '', selectedValue: "",
nameVal: '', selectedLabel: "",
phoneVal: '', nameVal: "",
} phoneVal: "",
};
}, },
methods: { methods: {
close() { close() {
this.show = false this.show = false;
}, },
chooseIdentity() { chooseIdentity() {
this.show = true this.show = true;
console.log() console.log();
}, },
confirm(selected) { confirm(selected) {
console.log(selected.value[0].value) console.log(selected.value[0].value);
this.selectedValue = selected.value[0].value this.selectedValue = selected.value[0].value;
this.selectedLabel = selected.value[0].label this.selectedLabel = selected.value[0].label;
this.show = false this.show = false;
}, },
headerCloseClick() { headerCloseClick() {
this.show = false; this.show = false;
}, },
headerInputClick(e) { headerInputClick(e) {
const { const { name } = e.currentTarget.dataset;
name const { value } = e.detail;
} = e.currentTarget.dataset;
const {
value
} = e.detail;
this[name] = value; this[name] = value;
}, },
async headerSubmitClick() { async headerSubmitClick() {
await request(apiArr.create, "POST", { await request(apiArr.create, "POST", {
community_id: parseInt(this.communityId), community_id: parseInt(this.communityId),
room_id: parseInt(this.roomId), room_id: parseInt(this.roomId),
user_id: uni.getStorageSync('userId'), user_id: uni.getStorageSync("userId"),
name: this.nameVal, // name: this.nameVal, //
mobile: this.phoneVal, // mobile: this.phoneVal, //
type: parseInt(this.selectedValue), // type: parseInt(this.selectedValue), //
id_type: 1 id_type: 1,
}).then(res => { }).then((res) => {
console.log(res) console.log(res);
uni.showToast({ uni.showToast({
title: '创建成功', title: "提交成功请等待物业审核!",
icon: "none", icon: "none",
duration: 2000 duration: 1500,
});
//
setTimeout(() => {
NavgateTo("/packages/community/myCommunity/index");
}, 1500);
}); });
NavgateTo("/packages/community/myCommunity/index")
})
}, },
choseCommunity() { choseCommunity() {
NavgateTo("/packages/community/choseCommunity/index") NavgateTo("/packages/community/choseCommunity/index");
}, },
}, },
onLoad(options) { onLoad(options) {
console.log("接收到的参数:", options); console.log("接收到的参数:", options);
this.communityId = options.community_id ? decodeURIComponent(options.community_id) : '' this.communityId = options.community_id
this.roomId = options.room_id ? decodeURIComponent(options.room_id) : '' ? decodeURIComponent(options.community_id)
this.changeComm = options.changeVal ? decodeURIComponent(options.changeVal) : '' : "";
this.roomId = options.room_id ? decodeURIComponent(options.room_id) : "";
this.changeComm = options.changeVal
? decodeURIComponent(options.changeVal)
: "";
}, },
onReachBottom() { onReachBottom() {},
};
},
}
</script> </script>
<style> <style>
@import url("./index.css"); @import url("./index.css");
</style> </style>

View File

@ -98,7 +98,7 @@ image {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
background-color: #fff; /* background-color: #fff; */
padding-bottom: 200rpx; padding-bottom: 200rpx;
margin-top: 20rpx; margin-top: 20rpx;
padding-top: 111rpx; padding-top: 111rpx;

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="container"> <div class="container">
<div class="currentAdd"> <div class="currentAdd">
<div class="currentAdd_left">{{city.region}}</div> <div class="currentAdd_left">{{ city.region }}</div>
<div class="currentAdd_right" @click="changeAddress"> <div class="currentAdd_right" @click="changeAddress">
切换城市 切换城市
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_choseAddress.png"></image> <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_choseAddress.png"></image>
@ -10,24 +10,27 @@
<div class="communityBox" v-if="step == 1"> <div class="communityBox" v-if="step == 1">
<div class="search"> <div class="search">
<input type="text" placeholder="请输入小区名称" v-model="communityName"> <input type="text" placeholder="请输入小区名称" v-model="communityName" />
<image @click="searchByName" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"></image> <image @click="searchByName"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png">
</image>
</div> </div>
<!-- @click="chooseCommunity(item)" --> <!-- @click="chooseCommunity(item)" -->
<div class="communityList"> <div class="communityList">
<div class="communityItem" v-for="item in communityList" :key="item.community_id" @click="nextStep(item)"> <div class="communityItem" v-for="item in communityList" :key="item.community_id" @click="nextStep(item)">
<div class="communityItem_left"> <div class="communityItem_left">
<div class="communityItem_tit">{{item.name}}</div> <div class="communityItem_tit">{{ item.name }}</div>
<div class="communityItem_address">{{item.addr}}</div> <div class="communityItem_address">{{ item.addr }}</div>
</div> </div>
<div class="communityItem_right"> <div class="communityItem_right">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communityMore.png"></image> <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communityMore.png">
</image>
</div> </div>
</div> </div>
</div> </div>
<div class="empty" v-if="!communityList"> <div class="empty" v-if="communityList.length == 0">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_noSearch.png"></image> <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_noSearch.png"></image>
<span>未找到相关信息的小区</span> <span>未找到相关信息的小区</span>
</div> </div>
@ -53,12 +56,15 @@
<div class="communityBox" v-if="step == 2"> <div class="communityBox" v-if="step == 2">
<div class="search"> <div class="search">
<input v-model="searchQuery" type="text" placeholder="请输入楼栋名称"> <input v-model="searchQuery" type="text" placeholder="请输入楼栋名称" />
<image @click="searchName" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"></image> <image @click="searchName"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png">
</image>
</div> </div>
<div class="floorList"> <div class="floorList">
<div @click="nextStep(item)" class="floorItem" v-for="(item, index) in filteredFloorsList" :key="index"> <div @click="nextStep(item, index)" :class="{ active: index === selectedFloorIndex }" class="floorItem"
v-for="(item, index) in filteredFloorsList" :key="index">
{{ item.label }} {{ item.label }}
</div> </div>
</div> </div>
@ -71,14 +77,17 @@
<div class="communityBox" v-if="step == 3"> <div class="communityBox" v-if="step == 3">
<div class="search"> <div class="search">
<input v-model="searchQuery" type="text" placeholder="请输入楼层名称"> <input v-model="searchQuery" type="text" placeholder="请输入楼层名称" />
<image @click="searchName" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"></image> <image @click="searchName"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png">
</image>
</div> </div>
<div class="roomList"> <div class="roomList">
<!-- <div class="roomItem" v-for="(item,index) in 5" :class="index == 1?'active2':''"> --> <!-- <div class="roomItem" v-for="(item,index) in 5" :class="index == 1?'active2':''"> -->
<div @click="nextStep(item)" class="roomItem" v-for="(item,index) in filteredFloorsList" :key="index"> <div @click="nextStep(item, index, 'room')" :class="{ active2: index === selectedRoomIndex }" class="roomItem"
{{item.label}} v-for="(item, index) in filteredFloorsList" :key="index">
{{ item.label }}
</div> </div>
</div> </div>
@ -90,14 +99,17 @@
<div class="communityBox" v-if="step == 4"> <div class="communityBox" v-if="step == 4">
<div class="search"> <div class="search">
<input v-model="searchQuery" type="text" placeholder="请输入房间名称"> <input v-model="searchQuery" type="text" placeholder="请输入房间名称" />
<image @click="searchName" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"></image> <image @click="searchName"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png">
</image>
</div> </div>
<div class="roomList"> <div class="roomList">
<!-- <div class="roomItem" v-for="(item,index) in 5" :class="index == 1?'active2':''"> --> <!-- <div class="roomItem" v-for="(item,index) in 5" :class="index == 1?'active2':''"> -->
<div @click="nextStep(item)" class="roomItem" v-for="(item,index) in filteredFloorsList" :key="index"> <div @click="nextStep(item, index, 'room')" :class="{ active2: index === selectedRoomIndex }" class="roomItem"
{{item.label}} v-for="(item, index) in filteredFloorsList" :key="index">
{{ item.label }}
</div> </div>
</div> </div>
@ -107,16 +119,17 @@
</div> </div>
</div> </div>
<areaPopup :show="show" @selectArea="selectArea" @close="close"></areaPopup> <areaPopup :show="show" @selectArea="selectArea" @close="close"></areaPopup>
<div class="dialogBox" v-if="dialogBoxShow"> <div class="dialogBox" v-if="dialogBoxShow">
<div class="dialogBoxCon"> <div class="dialogBoxCon">
<div class="dialogBoxCon1">确认选择</div> <div class="dialogBoxCon1">确认选择</div>
<div class="dialogBoxCon2">{{cName}}</div> <div class="dialogBoxCon2">{{ cName }}</div>
<div class="dialogBoxCon3">{{facilityName + fName + rName}}</div> <div class="dialogBoxCon3">{{ facilityName + fName + rName }}</div>
<div class="dialogBoxConBtnList"> <div class="dialogBoxConBtnList">
<div class="dialogBoxConBtnItem1" @click="dialogBoxShow = false">取消</div> <div class="dialogBoxConBtnItem1" @click="dialogBoxShow = false">
取消
</div>
<div class="dialogBoxConBtnItem2" @click="confirmComm">确定</div> <div class="dialogBoxConBtnItem2" @click="confirmComm">确定</div>
</div> </div>
</div> </div>
@ -125,107 +138,131 @@
</template> </template>
<script> <script>
import { import { apiArr } from "../../../api/community";
apiArr import {
} from '../../../api/community';
import {
request, request,
picUrl, picUrl,
uniqueByField, uniqueByField,
menuButtonInfo, menuButtonInfo,
NavgateTo NavgateTo,
} from '../../../utils'; } from "../../../utils";
export default { export default {
data() { data() {
return { return {
selectedFloorIndex: -1,
selectedRoomIndex: -1,
show: false, show: false,
step: "1", step: "1",
communityName: '', communityName: "",
cName: '', cName: "",
fName: '', fName: "",
communityId: '', communityId: "",
communityList: [], communityList: [],
facilityName: '', facilityName: "",
// foloorList: [], // foloorList: [],
// floorsList: [], // floorsList: [],
rName: '', rName: "",
roomId: '', roomId: "",
// roomList: [], // roomList: [],
page_num: 1, page_num: 1,
page_size: 10, page_size: 10,
dialogBoxShow: false, dialogBoxShow: false,
searchQuery: '', searchQuery: "",
filteredFloorsList: [], filteredFloorsList: [],
searchList: [], searchList: [],
city: uni.getStorageSync('location'), city: uni.getStorageSync("location"),
currentCommunity:"" currentCommunity: "",
} };
}, },
methods: { methods: {
changeAddress() { changeAddress() {
this.show = true this.show = true;
}, },
close() { close() {
this.show = false this.show = false;
}, },
selectArea(val) { selectArea(val) {
console.log(val); console.log(val);
this.city = { this.city = {
region: val.confirmDist.ad_name.split(',').join(''), region: val.confirmDist.ad_name.split(",").join(""),
...val.confirmDist ...val.confirmDist,
} };
this.searchByName(); this.searchByName();
this.show = false this.show = false;
}, },
async searchByName() { async searchByName() {
console.log(this.communityName,'zzz') console.log(this.communityName, "zzz");
await request(apiArr.getAllList, "POST", { await request(apiArr.getAllList, "POST", {
community_id: '', community_id: "",
name: this.communityName, name: this.communityName,
comm_code: '', comm_code: "",
ad_code: this.city.ad_code ? this.city.ad_code : uni.getStorageSync('ad_code'), ad_code: this.city.ad_code
? this.city.ad_code
: uni.getStorageSync("ad_code"),
page_num: this.page_num, page_num: this.page_num,
page_size: this.page_size page_size: this.page_size,
}).then(res => { }).then((res) => {
console.log(res.rows) console.log(res.rows);
this.communityList = res.rows this.communityList = res.rows;
}) });
}, },
async nextStep(item) { async nextStep(item, index, type = "") {
this.communityId = item.community_id ? item.community_id : this.communityId; if (type === "room") {
this.selectedRoomIndex = index;
} else {
this.selectedFloorIndex = index;
}
this.communityId = item.community_id
? item.community_id
: this.communityId;
this.facilityName = this.facilityName ? this.facilityName : item.label; this.facilityName = this.facilityName ? this.facilityName : item.label;
this.fName = this.step == 4 ? this.fName : (this.facilityName ? item.label : '') this.fName =
this.step == 4 ? this.fName : this.facilityName ? item.label : "";
await request(apiArr.commRoomSelect, "POST", { await request(apiArr.commRoomSelect, "POST", {
community_ids: item.community_id ? item.community_id : this.communityId, community_ids: [item.community_id ? item.community_id : this.communityId],
facility_names: this.facilityName, facility_names: this.facilityName ? [this.facilityName] : [],
floors: this.facilityName ? (this.facilityName == this.fName ? '' : item.label) : '',
}).then(res => { floors: this.facilityName
this.filteredFloorsList = this.step == 4 ? this.filteredFloorsList : res.rows ? this.facilityName == this.fName
this.searchList = res.rows ? ""
this.searchQuery = '' : [item.label]
if (this.step == '1') { : "",
this.step = '2'; }).then((res) => {
//
if (this.step != 4) {
res.rows.sort((a, b) => {
//
const floorA = parseInt(a.label.replace(/[^\d]/g, ''));
const floorB = parseInt(b.label.replace(/[^\d]/g, ''));
return floorA - floorB;
});
}
this.filteredFloorsList = this.step == 4 ? this.filteredFloorsList : res.rows;
this.searchList = res.rows;
this.searchQuery = "";
if (this.step == "1") {
this.step = "2";
this.cName = item.name; this.cName = item.name;
// this.foloorList = res.rows // this.foloorList = res.rows
} else if (this.step == '2') { } else if (this.step == "2") {
this.step = '3'; this.step = "3";
// this.floorsList = res.rows // this.floorsList = res.rows
} else if (this.step == '3') { } else if (this.step == "3") {
console.log(item.label); console.log(item.label);
this.fName = item.label; this.fName = item.label.includes("层") ? item.label : item.label + "层";
// this.roomList = res.rows // this.roomList = res.rows
this.step = '4'; this.step = "4";
} else { } else {
this.dialogBoxShow = true; this.dialogBoxShow = true;
this.rName = item.label this.rName = item.label;
this.romId = item.value this.romId = item.value;
} }
}) });
}, },
searchName() { searchName() {
// //
this.filteredFloorsList = this.searchList.filter(item => this.filteredFloorsList = this.searchList.filter((item) =>
item.label.includes(this.searchQuery) item.label.includes(this.searchQuery)
); );
}, },
@ -233,14 +270,17 @@
const params = { const params = {
changeVal: `${this.cName}${this.facilityName}${this.fName}${this.rName}`, changeVal: `${this.cName}${this.facilityName}${this.fName}${this.rName}`,
community_id: this.communityId, community_id: this.communityId,
room_id: this.romId room_id: this.romId,
}; };
console.log(params) console.log(params);
// //
function createQueryString(params) { function createQueryString(params) {
return Object.keys(params) return Object.keys(params)
.map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`) .map(
.join('&'); (key) =>
`${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`
)
.join("&");
} }
// //
@ -253,33 +293,31 @@
}, },
// //
chooseCommunity(e){ chooseCommunity(e) {
this.currentCommunity = e this.currentCommunity = e;
this.getRoomSelect() this.getRoomSelect();
}, },
// //
getRoomSelect(){ getRoomSelect() {
request(apiArr.commRoomSelect,"POST",{ request(apiArr.commRoomSelect, "POST", {
community_ids:this.currentCommunity.community_id, community_ids: [this.currentCommunity.community_id],
}).then(res=>{ }).then((res) => {
console.log(res); console.log(res);
this.step = 2 this.step = 2;
}) });
}, },
}, },
onLoad(options) { onLoad(options) {
const meun = menuButtonInfo(); const meun = menuButtonInfo();
this.searchByName() this.searchByName();
}, },
onReachBottom() { onReachBottom() { },
};
},
}
</script> </script>
<style> <style>
@import url("./index.css"); @import url("./index.css");
</style> </style>

View File

@ -3,6 +3,40 @@ page {
padding: 0; padding: 0;
} }
.empty {
font-size: 28rpx;
color: #999999;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-top: 400rpx;
}
.empty image {
width: 340rpx;
height: 240rpx;
}
.emptyBtn {
width: 400rpx;
height: 80rpx;
background-color: #ea030d;
color: white;
align-items: center;
margin-top: 400rpx;
}
.emptyBtn2 {
width: 400rpx;
height: 80rpx;
background-color: white;
color: #333;
align-items: center;
margin-top: 50rpx;
border: 1rpx solid #333;
}
swiper { swiper {
height: 100%; height: 100%;
} }
@ -35,8 +69,9 @@ image {
.emptyCommunity { .emptyCommunity {
font-size: 28rpx; font-size: 28rpx;
color: #222222; color: #222222;
width: 200rpx; width: auto;
height: 44rpx; height: 44rpx;
padding: 5rpx 15rpx;
background: rgba(255, 255, 255, 0.8); background: rgba(255, 255, 255, 0.8);
border-radius: 100rpx 100rpx 100rpx 100rpx; border-radius: 100rpx 100rpx 100rpx 100rpx;
display: flex; display: flex;
@ -104,6 +139,10 @@ image {
margin: 0 5rpx; margin: 0 5rpx;
} }
.swiperBox2_img {
border-radius: 20rpx 20rpx 0 0;
}
.active { .active {
width: 26rpx; width: 26rpx;
} }
@ -144,7 +183,8 @@ image {
margin: 0 auto; margin: 0 auto;
margin-top: 40rpx; margin-top: 40rpx;
} }
.ads_first{
.ads_first {
margin-top: 0; margin-top: 0;
} }
@ -156,13 +196,15 @@ image {
height: 100rpx; height: 100rpx;
padding: 0 20rpx; padding: 0 20rpx;
box-sizing: border-box; box-sizing: border-box;
overflow-x: auto;
white-space: nowrap;
} }
.tabItem { .tabItem {
font-size: 30rpx; font-size: 30rpx;
color: #222222; color: #222222;
margin-right: 60rpx; margin-right: 60rpx;
height: 42rpx; white-space: nowrap;
} }
.active2 { .active2 {
@ -183,6 +225,10 @@ image {
transform: translateX(-50%); transform: translateX(-50%);
} }
.newsList {
margin-bottom: 100rpx;
}
.newsItem { .newsItem {
display: flex; display: flex;
align-items: center; align-items: center;
@ -193,6 +239,10 @@ image {
border-bottom: 1rpx solid #EBEBEB; border-bottom: 1rpx solid #EBEBEB;
} }
.newsItem:last-child {
border-bottom: none;
}
.newsItem_left { .newsItem_left {
flex: 1; flex: 1;
} }
@ -306,3 +356,7 @@ image {
height: 100rpx; height: 100rpx;
margin-bottom: 16rpx; margin-bottom: 16rpx;
} }
.grid_Text {
font-size: 24rpx;
}

View File

@ -1,107 +1,65 @@
<template> <template>
<div class="container"> <div class="container">
<div <div class="empty" v-if="communityList.length == 0">
class="searchBox" <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_newEmpty.png" alt="" />
:style="{ height: localHeight + 'px', paddingTop: top + 'px' }" <text>当前账户未绑定任何项目房源信息</text>
> <button class="emptyBtn" @click="addCommunity">新增房产绑定</button>
<!-- <button class="emptyBtn2" @click="refresh">刷新</button> -->
</div>
<div v-else>
<div class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
<div class="searchBox_add"> <div class="searchBox_add">
<div class="emptyCommunity" @click="addCommunity"> <div class="emptyCommunity" @click="addCommunity">
{{ communityVal }} {{ communityVal }}
</div> </div>
<!-- <div class="MyCommunity" v-if="false">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/community/community_mycommunity.png"
mode="aspectFill"></image>
<span>惠生活</span>
<u-icon name="arrow-down" color="#999999" size="28"></u-icon>
</div> -->
</div> </div>
</div> </div>
<div class="swiperBox1"> <div class="swiperBox1">
<swiper @animationfinish="swipers" autoplay circular> <swiper @animationfinish="swipers" autoplay circular>
<swiper-item <swiper-item v-for="(item, index) in bannerList" :key="index" @click="headerServerClick(item)">
v-for="(item, index) in bannerList"
:key="index"
@click="headerServerClick(item)"
>
<image :src="item.ad_picture" mode="aspectFill" /> <image :src="item.ad_picture" mode="aspectFill" />
</swiper-item> </swiper-item>
</swiper> </swiper>
<view class="dot"> <view class="dot">
<view <view :class="['dotItem', currentIdx == index ? 'active' : '']" v-for="(item, index) in bannerList"
:class="['dotItem', currentIdx == index ? 'active' : '']" :key="index">
v-for="(item, index) in bannerList"
:key="index"
>
</view> </view>
</view> </view>
<!-- <div class="dot">
<div class="dotItem"></div>
<div class="dotItem active"></div>
</div> -->
</div> </div>
<div class="swiperBox2"> <div class="swiperBox2">
<swiper @animationfinish="swipers" autoplay circular> <swiper @animationfinish="swipers" autoplay circular>
<swiper-item <swiper-item v-for="(item, index) in streamerList" :key="index" @click="headerServerClick(item)">
v-for="(item, index) in streamerList" <image :src="item.ad_picture" mode="aspectFill" class="swiperBox2_img" />
:key="index"
@click="headerServerClick(item)"
>
<image :src="item.ad_picture" mode="aspectFill" />
</swiper-item> </swiper-item>
</swiper> </swiper>
</div> </div>
<!-- <div class="funcList">
<div class="funcItem" v-for="item in functionList" @click="jump(item.mini_program_url)">
<image :src="item.nav_icon"></image>
{{ item.nav_name }}
</div>
</div> -->
<view class="funcList"> <view class="funcList">
<u-grid :col="rowNum" :border="false"> <u-grid :col="rowNum" :border="false">
<u-grid-item <u-grid-item v-for="(item, index) in functionList" @click="jump(item.mini_program_url)" :key="index">
v-for="(item, index) in functionList"
@click="jump(item.mini_program_url)"
:key="index"
>
<image class="grid_Pic" :src="item.nav_icon" mode=""></image> <image class="grid_Pic" :src="item.nav_icon" mode=""></image>
<text>{{ item.nav_name }}</text> <text class="grid_Text">{{ item.nav_name }}</text>
</u-grid-item> </u-grid-item>
</u-grid> </u-grid>
</view> </view>
<div <div v-for="(item, index) in tileList" :key="index" :class="['ads', index == 0 ? 'ads_first' : '']"
v-for="(item, index) in tileList" @click="headerServerClick(item)">
:key="index"
:class="['ads', index == 0 ? 'ads_first' : '']"
@click="headerServerClick(item)"
>
<image :src="item.ad_picture" mode="aspectFill" /> <image :src="item.ad_picture" mode="aspectFill" />
</div> </div>
<div class="tabs"> <div class="tabs">
<div <div v-for="(item, index) in categoryList" :key="index"
v-for="(item, index) in categoryList" :class="['tabItem', selectedTab === index ? 'active2' : '']" @click="selectTab(index, item)">
:key="index"
:class="['tabItem', selectedTab === index ? 'active2' : '']"
@click="selectTab(index, item)"
>
{{ item.category_name }} {{ item.category_name }}
</div> </div>
</div> </div>
<div class="newsList"> <div class="newsList">
<div <div class="newsItem" v-for="item in infoList" @click="detail(item)" :key="item.id">
class="newsItem"
v-for="item in infoList"
@click="detail(item)"
:key="item.id"
>
<div class="newsItem_left"> <div class="newsItem_left">
<div class="newsItem_left_tit">{{ item.title }}</div> <div class="newsItem_left_tit">{{ item.title }}</div>
<div class="newsItem_left_sub">{{ item.author }}</div> <div class="newsItem_left_sub">{{ item.author }}</div>
@ -118,19 +76,13 @@
<div class="bigAdsCon"> <div class="bigAdsCon">
<div class="bigAdsCon_img"> <div class="bigAdsCon_img">
<swiper @animationfinish="swipers" autoplay circular> <swiper @animationfinish="swipers" autoplay circular>
<swiper-item <swiper-item v-for="(item, index) in largePopList" :key="index" @click="headerServerClick(item)">
v-for="(item, index) in largePopList"
:key="index"
@click="headerServerClick(item)"
>
<image :src="item.ad_picture" mode="aspectFill" /> <image :src="item.ad_picture" mode="aspectFill" />
</swiper-item> </swiper-item>
</swiper> </swiper>
</div> </div>
<div class="close" @click="closeAds"> <div class="close" @click="closeAds">
<image <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_close.png">
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_close.png"
>
</image> </image>
</div> </div>
</div> </div>
@ -139,13 +91,7 @@
<div class="bigAds" v-if="ads2Show"> <div class="bigAds" v-if="ads2Show">
<div class="bigAdsCon2"> <div class="bigAdsCon2">
<div class="bigAdsCon2_img"> <div class="bigAdsCon2_img">
<swiper <swiper :current="currentSwiperIndex" @change="onSwiperChange" @animationfinish="swipers" autoplay circular>
:current="currentSwiperIndex"
@change="onSwiperChange"
@animationfinish="swipers"
autoplay
circular
>
<swiper-item v-for="(item, index) in popList" :key="index"> <swiper-item v-for="(item, index) in popList" :key="index">
<image :src="item.ad_picture" mode="aspectFill" /> <image :src="item.ad_picture" mode="aspectFill" />
</swiper-item> </swiper-item>
@ -157,7 +103,8 @@
</div> </div>
</div> </div>
</div> </div>
<nav-footer :current="1" /> </div>
<nav-footer :current="3" />
</div> </div>
</template> </template>
@ -171,6 +118,7 @@ import {
} from "../../../utils"; } from "../../../utils";
import { apiArr } from "../../../api/v2Community"; import { apiArr } from "../../../api/v2Community";
import { apiArr as apiArr2 } from "../../../api/community";
export default { export default {
data() { data() {
@ -208,20 +156,68 @@ export default {
page_size: 10, page_size: 10,
page_num: 1, page_num: 1,
flag: false, flag: false,
loadMoreText: "下拉加载后续10条共计30条", loadMoreText: "",
isShowBill: false,
houseVal: "",
}; };
}, },
async onLoad(options) { async onLoad(options) {
//
},
async onShow() {
//
// if (!uni.getStorageSync("changeCommData")) {
// return;
// }
await request(apiArr2.commInfo, "POST", {
user_id: uni.getStorageSync("userId"),
longitude: uni.getStorageSync("location").lng,
latitude: uni.getStorageSync("location").lat,
page_num: this.page_num,
page_size: this.page_size,
}).then((res) => {
if (res.rows.length == 0) {
uni.removeStorageSync("changeCommData");
return;
}
const targetItem = res.rows.find((item) => {
return item.community_id == uni.getStorageSync("changeCommData").id;
});
if (targetItem) {
//
this.isShowBill = targetItem.bill_front_end_display == 1;
//
if (targetItem.front_end_display == 1) {
uni.removeStorageSync("changeCommData");
}
}
res.rows = res.rows.filter((item) => {
return item.front_end_display != 1;
});
console.log("🚀 ~ onLoad ~ res.rows:", res.rows)
if (!uni.getStorageSync("changeCommData")) {
uni.setStorageSync("changeCommData", { name: res.rows[0].name, id: res.rows[0].community_id })
uni.setStorageSync("isShowNav", res.rows[0].room_owner_list[0].type)
}
this.communityList = res.rows;
});
const meun = menuButtonInfo(); const meun = menuButtonInfo();
this.top = meun.top; this.top = meun.top;
// this.top = meun.height + meun.top; // this.top = meun.height + meun.top;
this.localHeight = meun.height; this.localHeight = meun.height;
// this.getCommunityList() // this.getCommunityList()
if (!uni.getStorageSync("changeCommData").id) { if (this.communityList.length == 0) {
uni.setStorageSync("changeCommData", { name: "森呼吸二期", id: 14 }); this.communityVal = "添加我的房产";
} } else {
console.log("🚀 ~ onLoad ~ this.communityList:", this.communityList)
this.communityVal = uni.getStorageSync("changeCommData").name; this.communityVal = uni.getStorageSync("changeCommData").name;
}
this.getfunctionNum(); this.getfunctionNum();
this.getAdvertising(); this.getAdvertising();
this.getCategoryList(); this.getCategoryList();
@ -274,6 +270,16 @@ export default {
this.NotOpen(); this.NotOpen();
return; return;
} }
if (
e == "/packages/community/propertyPayment/index" &&
!this.isShowBill
) {
uni.showToast({
title: "请配置账单",
icon: "none",
});
return;
}
NavgateTo(e); NavgateTo(e);
}, },
@ -301,6 +307,9 @@ export default {
}, },
async getfunctionList() { async getfunctionList() {
if (!uni.getStorageSync("changeCommData")) {
return;
}
const res = await request(apiArr.navPage, "POST", { const res = await request(apiArr.navPage, "POST", {
community_id: Number(uni.getStorageSync("changeCommData").id), community_id: Number(uni.getStorageSync("changeCommData").id),
page_num: 1, page_num: 1,
@ -322,6 +331,9 @@ export default {
}, },
async getAdvertising() { async getAdvertising() {
if (!uni.getStorageSync("changeCommData")) {
return;
}
const res = await request(apiArr.advPage, "POST", { const res = await request(apiArr.advPage, "POST", {
community_id: Number(uni.getStorageSync("changeCommData").id), community_id: Number(uni.getStorageSync("changeCommData").id),
ad_position: 1, ad_position: 1,
@ -392,26 +404,27 @@ export default {
headerServerClick(e) { headerServerClick(e) {
console.log("当前点击内容", e); console.log("当前点击内容", e);
if (!e.link_url) { if (!e.target_page) {
this.NotOpen(); this.NotOpen();
return; return;
} }
if (e.link_url) { if (e.target_page) {
// #ifdef APP-PLUS // #ifdef APP-PLUS
uni.navigateTo({ uni.navigateTo({
url: "/pages/webview/webview?url=" + encodeURIComponent(e.link_url), url:
"/pages/webview/webview?url=" + encodeURIComponent(e.target_page),
}); });
// #endif // #endif
// #ifdef H5 // #ifdef H5
window.open(e.link_url, "_blank"); window.open(e.target_page, "_blank");
// #endif // #endif
// #ifdef MP-WEIXIN || MP-ALIPAY || MP-BAIDU // #ifdef MP-WEIXIN || MP-ALIPAY || MP-BAIDU
if (e.appid) { if (e.appid) {
uni.navigateToMiniProgram({ uni.navigateToMiniProgram({
appId: e.appid, appId: e.appid,
path: e.link_url, path: e.target_page,
// //
extraData: { extraData: {
data1: "test", data1: "test",
@ -421,18 +434,23 @@ export default {
}, },
}); });
} else { } else {
NavgateTo(e.link_url); //
let targetPage = e.target_page;
if (!targetPage.startsWith("/")) {
targetPage = "/" + targetPage;
}
NavgateTo(targetPage);
// NavgateTo('/packages/localLife/index/index') // NavgateTo('/packages/localLife/index/index')
} }
// 使web-view // 使web-view
// uni.showModal({ // uni.showModal({
// title: '', // title: '',
// content: ': ' + e.link_url, // content: ': ' + e.target_page,
// confirmText: '', // confirmText: '',
// success(res) { // success(res) {
// if (res.confirm) { // if (res.confirm) {
// uni.setClipboardData({ // uni.setClipboardData({
// data: e.link_url, // data: e.target_page,
// success() { // success() {
// uni.showToast({ // uni.showToast({
// title: '', // title: '',
@ -473,6 +491,9 @@ export default {
}, },
async getCategoryList() { async getCategoryList() {
if (!uni.getStorageSync("changeCommData")) {
return;
}
const res = await request(apiArr.categoryPage, "POST", { const res = await request(apiArr.categoryPage, "POST", {
community_id: Number(uni.getStorageSync("changeCommData").id), community_id: Number(uni.getStorageSync("changeCommData").id),
category_code: "", category_code: "",
@ -489,10 +510,15 @@ export default {
if (isTabChange) { if (isTabChange) {
this.page_num = 1; this.page_num = 1;
this.infoList = []; this.infoList = [];
this.loadMoreText = "下拉加载后续10条共计30条"; // this.loadMoreText = "1030";
} }
this.selectedTab = index; this.selectedTab = index;
console.log("选中的tab:", index);
// tab
if (!isTabChange && !this.flag && this.infoList.length > 0) {
return;
}
const res = await request(apiArr.infoPage, "POST", { const res = await request(apiArr.infoPage, "POST", {
community_id: Number(uni.getStorageSync("changeCommData").id), community_id: Number(uni.getStorageSync("changeCommData").id),
announcement_category_id: item.id, announcement_category_id: item.id,
@ -513,10 +539,17 @@ export default {
// 3 // 3
this.flag = hasMore; this.flag = hasMore;
//
const isDataDuplicate =
!isTabChange &&
this.infoList.length > 0 &&
newData.length > 0 &&
this.infoList[this.infoList.length - 1].id === newData[0].id;
// //
if (isTabChange) { if (isTabChange) {
this.infoList = newData; this.infoList = newData;
} else { } else if (!isDataDuplicate) {
this.infoList = this.infoList.concat(newData); this.infoList = this.infoList.concat(newData);
} }
@ -527,7 +560,7 @@ export default {
icon: "none", icon: "none",
}); });
} else { } else {
this.loadMoreText = `下拉加载后续10条`; // this.loadMoreText = `10`;
} }
}, },

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="container"> <view class="container">
<view class="empty" v-if="false"> <view class="empty" v-if="communityList.length == 0">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_newEmpty.png" <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_newEmpty.png"
alt="" /> alt="" />
没有添加任何房产 没有添加任何房产
@ -67,7 +67,7 @@ export default {
res.rows.forEach(item => { res.rows.forEach(item => {
item.pic = item.pic.startsWith('http') ? item.pic : picUrl + item.pic item.pic = item.pic.startsWith('http') ? item.pic : picUrl + item.pic
}); });
this.communityList = res.rows this.communityList = res.rows.filter(item => item.front_end_display !== 1)
}) })
}, },
// toUpview(item) { // toUpview(item) {
@ -79,7 +79,8 @@ export default {
this.currentCommunity = e this.currentCommunity = e
uni.setStorageSync('changeCommData', { id: e.community_id, name: e.name }); uni.setStorageSync('changeCommData', { id: e.community_id, name: e.name });
uni.setStorageSync('currentCommunityAddr',e.addr); uni.setStorageSync('currentCommunityAddr',e.addr);
NavgateTo("/packages/community/index/index") uni.setStorageSync("isShowNav", e.room_owner_list[0].type)
NavgateTo("1")
}, },
}, },

View File

@ -59,6 +59,10 @@ page {
font-size: 32rpx; font-size: 32rpx;
} }
.red{
color: #FF0000;
}
.label { .label {
font-size: 28rpx; font-size: 28rpx;
color: #999999; color: #999999;
@ -73,7 +77,7 @@ page {
} }
.roomItem { .roomItem {
width: 276rpx; width: auto;
height: 54rpx; height: 54rpx;
background: #FFF5F5; background: #FFF5F5;
border-radius: 10rpx 10rpx 10rpx 10rpx; border-radius: 10rpx 10rpx 10rpx 10rpx;
@ -85,6 +89,7 @@ page {
color: #222222; color: #222222;
margin-right: 30rpx; margin-right: 30rpx;
margin-bottom: 28rpx; margin-bottom: 28rpx;
padding: 0 10rpx;
} }
.roomItem:nth-child(2n) { .roomItem:nth-child(2n) {

View File

@ -12,16 +12,16 @@
<div class="repairMsg"> <div class="repairMsg">
<div class="repairTit"> <div class="repairTit">
<span>*</span>报修信息 报修信息
</div> </div>
<div class="label">选择房源信息</div> <div class="label"><span class="red">*</span>选择房源信息</div>
<div class="roomList"> <div class="roomList">
<div v-for="(item, index) in roomList" :key="index" :class="active == index ?'roomItem active':'roomItem'" @click="changeAct(index)">{{ item.name }}</div> <div v-for="(item, index) in roomList" :key="index" :class="active == index ?'roomItem active':'roomItem'" @click="changeAct(index)">{{ item.name }}</div>
</div> </div>
<div class="row"> <div class="row">
<div class="row_label">报修类型</div> <div class="row_label"><span class="red">*</span>报修类型</div>
<div class="row_con" @click="chose"> <div class="row_con" @click="chose">
<input type="text" :value="category.category_name" placeholder="请选择报修类型" disabled> <input type="text" :value="category.category_name" placeholder="请选择报修类型" disabled>
<u-icon bold color="#999999" size="30" name="arrow-right"></u-icon> <u-icon bold color="#999999" size="30" name="arrow-right"></u-icon>
@ -29,28 +29,28 @@
</div> </div>
<div class="row"> <div class="row">
<div class="row_label">问题描述</div> <div class="row_label"><span class="red">*</span>问题描述</div>
<div class="row_con"> <div class="row_con">
<input type="text" placeholder="请描述故障" :value="repairInfo" data-name="repairInfo" @input="handlerInputClick"> <input type="text" placeholder="请描述故障" :value="repairInfo" data-name="repairInfo" @input="handlerInputClick">
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="row_label">联系人</div> <div class="row_label"><span class="red">*</span>联系人</div>
<div class="row_con"> <div class="row_con">
<input type="text" placeholder="请输入您的姓名" :value="contactName" data-name="contactName" @input="handlerInputClick"> <input type="text" placeholder="请输入您的姓名" :value="contactName" data-name="contactName" @input="handlerInputClick">
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="row_label">联系电话</div> <div class="row_label"><span class="red">*</span>联系电话</div>
<div class="row_con"> <div class="row_con">
<input type="number" maxlength="11" placeholder="请输入您的联系方式" :value="contactPhone" data-name="contactPhone" @input="handlerInputClick"> <input type="number" maxlength="11" placeholder="请输入您的联系方式" :value="contactPhone" data-name="contactPhone" @input="handlerInputClick">
</div> </div>
</div> </div>
<div class="row noneBorder"> <div class="row noneBorder">
<div class="row_label">上门时间</div> <div class="row_label"><span class="red">*</span>上门时间</div>
<div class="row_con" @click="choseTime"> <div class="row_con" @click="choseTime">
<input type="text" :value="time" placeholder="请选择上门时间" disabled> <input type="text" :value="time" placeholder="请选择上门时间" disabled>
<u-icon bold color="#999999" size="30" name="arrow-right"></u-icon> <u-icon bold color="#999999" size="30" name="arrow-right"></u-icon>
@ -63,7 +63,7 @@
<div class="row_label">上传图片</div> <div class="row_label">上传图片</div>
<div class="row_con2"> <div class="row_con2">
<u-upload :fileList="imgList" name="imgList" @afterRead="afterReadImg" @delete="deletePic" multiple <u-upload :fileList="imgList" name="imgList" @afterRead="afterReadImg" @delete="deletePic" multiple
:maxCount="10"> :maxCount="5">
<div class="imgCon"> <div class="imgCon">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_imageImg.png" mode="widthFix"></image> <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_imageImg.png" mode="widthFix"></image>
上传图片 上传图片
@ -235,6 +235,55 @@ export default {
this.active = e; this.active = e;
}, },
async handlerSubmitClick() { async handlerSubmitClick() {
//
if (!this.roomList[this.active]) {
uni.showToast({
title: '请选择房源信息',
icon: 'none'
});
return;
}
if (!this.category.id) {
uni.showToast({
title: '请选择报修类型',
icon: 'none'
});
return;
}
if (!this.repairInfo.trim()) {
uni.showToast({
title: '请输入问题描述',
icon: 'none'
});
return;
}
if (!this.contactName.trim()) {
uni.showToast({
title: '请输入联系人姓名',
icon: 'none'
});
return;
}
if (!this.contactPhone.trim() || this.contactPhone.length !== 11) {
uni.showToast({
title: '请输入有效的联系电话',
icon: 'none'
});
return;
}
if (!this.time) {
uni.showToast({
title: '请选择上门时间',
icon: 'none'
});
return;
}
uni.showLoading({ uni.showLoading({
title: '提交中' title: '提交中'
}); });

View File

@ -212,6 +212,10 @@ image {
font-size: 24rpx; font-size: 24rpx;
} }
.payItem_money{
width: 150rpx;
}
.bottom { .bottom {
width: 750rpx; width: 750rpx;
background: #FFFFFF; background: #FFFFFF;
@ -409,6 +413,17 @@ image {
font-size: 28rpx; font-size: 28rpx;
color: #000000; color: #000000;
margin-top: 10rpx; margin-top: 10rpx;
display: flex;
}
.PayTypeItem_con_msg2{
font-size: 26rpx;
margin-left: 20rpx;
border: 1rpx solid #f23f17;
padding: 0 10rpx;
background-color: #fde0dc;
color: #f23f17;
border-radius: 20rpx;
} }
.line3 { .line3 {
@ -421,8 +436,9 @@ image {
font-weight: bold; font-weight: bold;
font-size: 50rpx; font-size: 50rpx;
color: #FF370B; color: #FF370B;
text-align: center; /* text-align: center; */
padding-bottom: 30rpx; padding-bottom: 30rpx;
margin: 0 auto;
} }
.boxshadowCon_subTit span { .boxshadowCon_subTit span {

View File

@ -1,15 +1,27 @@
<template> <template>
<div class="container"> <div class="container">
<div class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }"> <div
class="searchBox"
:style="{ height: localHeight + 'px', paddingTop: top + 'px' }"
>
<div class="searchBox_add"> <div class="searchBox_add">
<u-icon bold color="#000" size="40" name="arrow-left" @click="back"></u-icon> <u-icon
bold
color="#000"
size="40"
name="arrow-left"
@click="back"
></u-icon>
</div> </div>
</div> </div>
<div class="community"> <div class="community">
<div class="community_left"> <div class="community_left">
<image mode="aspectFill" <image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/test.png" alt="" /> mode="aspectFill"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/test.png"
alt=""
/>
</div> </div>
<div class="community_right" @click="changeShow"> <div class="community_right" @click="changeShow">
<div class="community_right_text"> <div class="community_right_text">
@ -17,15 +29,27 @@
<div class="community_right_text2">{{ currentCommunityAddr }}</div> <div class="community_right_text2">{{ currentCommunityAddr }}</div>
</div> </div>
<div class="community_right_more"> <div class="community_right_more">
<u-icon bold color="#999999" size="30" name="arrow-right" @click="back"></u-icon> <u-icon bold color="#999999" size="30" name="arrow-right"></u-icon>
</div> </div>
</div> </div>
</div> </div>
<div class="tabList"> <div class="tabList">
<div class="tabItem" :class="active == 0 ? 'active' : ''" @click="changeTab(0)">账单</div> <div
class="tabItem"
:class="active == 0 ? 'active' : ''"
@click="changeTab(0)"
>
账单
</div>
<div class="line"></div> <div class="line"></div>
<div class="tabItem" :class="active == 1 ? 'active' : ''" @click="changeTab(1)">缴费记录</div> <div
class="tabItem"
:class="active == 1 ? 'active' : ''"
@click="changeTab(1)"
>
缴费记录
</div>
</div> </div>
<div class="homeMoney" v-if="active == 0"> <div class="homeMoney" v-if="active == 0">
@ -35,11 +59,18 @@
<div class="homeMoney_box_left2">可抵扣账户金额</div> <div class="homeMoney_box_left2">可抵扣账户金额</div>
</div> </div>
<div class="homeMoney_box_right"> <div class="homeMoney_box_right">
<div class="homeMoney_box_right1"><span></span>{{ balanceMoney }}</div> <div class="homeMoney_box_right1">
<div class="homeMoney_box_right2" @click="more"> <span></span>{{ balanceMoney }}
</div>
<div class="homeMoney_box_right2" @click="more(currentRoom)">
查看详情 查看详情
<div style="margin-left: 12rpx;"> <div style="margin-left: 12rpx">
<u-icon bold color="#894B11" size="30" name="arrow-right" ></u-icon> <u-icon
bold
color="#894B11"
size="30"
name="arrow-right"
></u-icon>
</div> </div>
</div> </div>
</div> </div>
@ -50,29 +81,60 @@
<div class="payItem" v-for="(item, index) in Bill" :key="index"> <div class="payItem" v-for="(item, index) in Bill" :key="index">
<div class="payItem_tit"> <div class="payItem_tit">
<div class="payItem_left"> <div class="payItem_left">
<checkbox :checked="item.check" @click="checkChange(item, index)"></checkbox> <checkbox
<div style="margin-left: 24rpx;">{{ item.order_date }}</div> :checked="item.check"
@click="checkChange(item, index)"
></checkbox>
<div style="margin-left: 24rpx">{{ item.order_date }}</div>
</div> </div>
<div class="payItem_right"> <div class="payItem_right">
<span></span> <span></span>
{{ item.unpaid_amount }} <view class="payItem_money">{{ item.unpaid_amount }}</view>
<p>未缴</p> <p>未缴</p>
<div style="margin-left: 40rpx;" @click="changeCheck(item, index)"> <div style="margin-left: 40rpx" @click="changeCheck(item, index)">
<u-icon bold color="#894B11" size="30" name="arrow-down" v-if="!item.more"></u-icon> <u-icon
<u-icon bold color="#894B11" size="30" name="arrow-up" v-if="item.more"></u-icon> bold
color="#894B11"
size="30"
name="arrow-down"
v-if="!item.more"
></u-icon>
<u-icon
bold
color="#894B11"
size="30"
name="arrow-up"
v-if="item.more"
></u-icon>
</div> </div>
</div> </div>
</div> </div>
<div class="payItem_List" v-for="(items, indes) in item.community_order_rows" v-if="item.more" <div v-if="item.more">
:key="items.order_id"> <div
<checkbox :checked="items.check" @click="itemsCheckChange(items, indes, index)"></checkbox> class="payItem_List"
<div class="Item_time" v-if="items.billing_cycle == 1">{{ items.order_date }}</div> v-for="(items, indes) in item.community_order_rows"
<div class="Item_time" v-if="items.billing_cycle == 2">{{ items.order_datetime }}</div> :key="items.order_id"
<div class="Item_type">{{ items.community_fee_type.type_name }}</div> >
<checkbox
:checked="items.check"
@click="itemsCheckChange(items, indes, index)"
></checkbox>
<div class="Item_time" v-if="items.billing_cycle == 1">
{{ items.order_date }}
</div>
<div class="Item_time" v-if="items.billing_cycle == 2">
{{ items.order_datetime }}
</div>
<div class="Item_type">
{{ items.community_fee_type ? items.community_fee_type.type_name : '' }}
</div>
<div class="Item_money">{{ items.money }}</div> <div class="Item_money">{{ items.money }}</div>
<div class="Item_status" v-if="items.status == 0">未付款</div> <div class="Item_status" v-if="items.status == 0">未付款</div>
<div class="Item_status sucess" v-if="items.status == 1">已付款</div> <div class="Item_status sucess" v-if="items.status == 1">
已付款
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -82,9 +144,11 @@
<div class="PayTypeItem"> <div class="PayTypeItem">
<div class="PayTypeItem_left"> <div class="PayTypeItem_left">
<div class="PayTypeItem_img"> <div class="PayTypeItem_img">
<image mode="aspectFill" <image
mode="aspectFill"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_wechat.png" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_wechat.png"
alt="" /> alt=""
/>
</div> </div>
<div class="PayTypeItem_con"> <div class="PayTypeItem_con">
<div class="PayTypeItem_con_tit">微信支付</div> <div class="PayTypeItem_con_tit">微信支付</div>
@ -100,13 +164,20 @@
<div class="PayTypeItem"> <div class="PayTypeItem">
<div class="PayTypeItem_left"> <div class="PayTypeItem_left">
<div class="PayTypeItem_img"> <div class="PayTypeItem_img">
<image mode="aspectFill" <image
mode="aspectFill"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_homeMoney.png" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_homeMoney.png"
alt="" /> alt=""
/>
</div> </div>
<div class="PayTypeItem_con"> <div class="PayTypeItem_con">
<div class="PayTypeItem_con_tit">物业公积金支付</div> <div class="PayTypeItem_con_tit">物业公积金支付</div>
<div class="PayTypeItem_con_msg">单笔支付限额10000.00</div> <div class="PayTypeItem_con_msg">
可用公积金<span></span>{{ balanceMoney }}
<div class="PayTypeItem_con_msg2" @click="changeShow2">
可组合支付
</div>
</div>
</div> </div>
</div> </div>
@ -122,11 +193,8 @@
<p></p> <p></p>
{{ currentMoney }} {{ currentMoney }}
</div> </div>
<div class="bottom_right" @click="OrderPay"> <div class="bottom_right" @click="OrderPay">立即支付</div>
立即支付
</div> </div>
</div>
<div class="payHisList" v-if="active == 1"> <div class="payHisList" v-if="active == 1">
<div class="payHisItem" v-for="item in payOrderList" :key="item.id"> <div class="payHisItem" v-for="item in payOrderList" :key="item.id">
@ -142,7 +210,9 @@
<div class="row"> <div class="row">
<div class="row_label">绑定房源</div> <div class="row_label">绑定房源</div>
<div class="row_con3"> <div class="row_con3">
<div class="row_con3_1">{{ item.community_order.length }}个账单</div> <div class="row_con3_1">
{{ item.community_order.length }}个账单
</div>
<div class="row_con3_2">明细可从收据查看</div> <div class="row_con3_2">明细可从收据查看</div>
</div> </div>
</div> </div>
@ -159,28 +229,38 @@
<div class="row"> <div class="row">
<div class="row_label">缴费单号</div> <div class="row_label">缴费单号</div>
<div class="row_con4">{{ item.order_pay_no }} </div> <div class="row_con4">{{ item.order_pay_no }}</div>
</div> </div>
<div class="line4"></div> <div class="line4"></div>
<div class="Receipt">收据</div> <div class="Receipt">收据</div>
</div> </div>
</div> </div>
<div class="boxshadow" v-if="show" @click="changeShow"> <div class="boxshadow" v-if="show" @click="changeShow">
<div class="boxshadowCon"> <div class="boxshadowCon">
<div class="boxshadowCon_Tit"> <div class="boxshadowCon_Tit">
选择房源 选择房源
<div class="cancel">取消</div> <div class="cancel" @click.stop="show = false">取消</div>
</div> </div>
<div class="lines"></div> <div class="lines"></div>
<div class="communityList"> <div class="communityList" v-if="roomList.length > 0">
<div class="communityItem" v-for="item in roomList" :key="item.room_id"> <div
<div class="communityItem_text">{{ item.facility_name }}{{ item.floor }} {{ item.number }}</div> class="communityItem"
<div class="communityItem_radio"> v-for="item in roomList"
<radio></radio> :key="item.room_id"
@click="selectRoom(item)"
>
<div class="communityItem_text">
{{ item.facility_name }}{{ item.floor }} {{ item.number }}
</div> </div>
<div class="communityItem_radio">
<radio :checked="selectedRoomId === item.room_id"></radio>
</div>
</div>
</div>
<div class="communityList" v-else>
<div class="communityItem">
<div class="communityItem_text">暂无房源</div>
</div> </div>
</div> </div>
</div> </div>
@ -190,49 +270,50 @@
<div class="boxshadowCon"> <div class="boxshadowCon">
<div class="boxshadowCon_Tit"> <div class="boxshadowCon_Tit">
付款总金额 付款总金额
<div class="cancel">取消</div> <div class="cancel" @click.stop="show2 = false">取消</div>
</div> </div>
<div class="boxshadowCon_subTit"> <div class="boxshadowCon_subTit">
<span></span>4900.00 <p></p>
{{ currentMoney }}
</div> </div>
<div class="lines"></div> <div class="lines"></div>
<div class="BanlenceList"> <div class="BanlenceList">
<div class="banlenceItem"> <div class="banlenceItem">
<div class="banlenceItem_left"> <div class="banlenceItem_left">
<image mode="aspectFill" <image
mode="aspectFill"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_wechat.png" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_wechat.png"
alt="" /> alt=""
/>
微信支付 微信支付
</div> </div>
<div class="banlenceItem_right"> <div class="banlenceItem_right">
<span></span>4900.00 <span></span>{{ (currentMoney - balanceMoney).toFixed(2) }}
</div> </div>
</div> </div>
<div class="line3"></div> <div class="line3"></div>
<div class="banlenceItem"> <div class="banlenceItem">
<div class="banlenceItem_left"> <div class="banlenceItem_left">
<image mode="aspectFill" <image
mode="aspectFill"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_homeMoney.png" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_homeMoney.png"
alt="" /> alt=""
/>
物业公积金支付 物业公积金支付
</div> </div>
<div class="banlenceItem_right"> <div class="banlenceItem_right">
<span></span>4900.00 <span></span>{{ balanceMoney }}
</div>
</div> </div>
</div> </div>
</div> <div class="btn" @click="OrderPay">
物业公积金+微信支付 <span></span>{{ currentMoney }}
<div class="btn"> </div>
物业公积金+微信支付 <span></span>4900.00
</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
@ -242,12 +323,9 @@ import {
uniqueByField, uniqueByField,
menuButtonInfo, menuButtonInfo,
formatDate, formatDate,
NavgateTo NavgateTo,
} from '../../../utils'; } from "../../../utils";
import { import { apiArr } from "../../../api/community";
apiArr
} from '../../../api/community';
export default { export default {
data() { data() {
@ -259,229 +337,248 @@ export default {
show2: false, show2: false,
roomList: [], roomList: [],
currentRoom: {}, currentRoom: {},
selectedRoomId: "", // ID
currentCommunity: "", // currentCommunity: "", //
currentCommunityAddr: "", // currentCommunityAddr: "", //
Bill: "", // Bill: "", //
balanceMoney: "",// balanceMoney: 0, //
currentMoney: 0, // currentMoney: 0, //
payType: '1', payType: "1",
payInfoId: "",//id payInfoId: "", //id
page_size: 10, page_size: 10,
page_num: 1, page_num: 1,
payOrderList: [], payOrderList: [],
flag: false, flag: false,
} };
}, },
onLoad(options) { onLoad(options) {
const meun = menuButtonInfo(); const meun = menuButtonInfo();
this.top = meun.top; this.top = meun.top;
// this.top = meun.height + meun.top; // this.top = meun.height + meun.top;
this.localHeight = meun.height; this.localHeight = meun.height;
this.currentCommunity = uni.getStorageSync('changeCommData') this.currentCommunity = uni.getStorageSync("changeCommData");
this.currentCommunityAddr = uni.getStorageSync("currentCommunityAddr") this.currentCommunityAddr = uni.getStorageSync("currentCommunityAddr");
this.getRoomSelect() this.getRoomSelect();
this.getUserGovenmentMoney() this.getUserGovenmentMoney();
}, },
methods: { methods: {
changeTab(index) { changeTab(index) {
this.active = index; this.active = index;
if (index == 1) { if (index == 1) {
this.page_num = 1 this.page_num = 1;
this.getPayList() this.getPayList();
} }
}, },
back() { back() {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1,
}); });
}, },
changeShow() { changeShow() {
this.show = !this.show this.show = !this.show;
}, },
changeShow2() { changeShow2() {
this.show2 = !this.show if (this.currentMoney == 0) {
uni.showToast({
title: "请选择账单",
icon: "none",
});
return;
}
this.show2 = !this.show2;
}, },
// //
getRoomSelect() { getRoomSelect() {
request(apiArr.getCommunityRoomList, 'POST', { request(apiArr.getCommunityRoomList, "POST", {
community_id: this.currentCommunity.id, community_id: this.currentCommunity.id,
page_num: 1, page_num: 1,
page_size: 50 page_size: 50,
}).then(res => { }).then((res) => {
this.roomList = res.rows this.roomList = res.rows;
this.currentRoom = this.roomList[0] this.currentRoom = this.roomList[0];
this.getOrderList() this.selectedRoomId = this.currentRoom.room_id;
this.getOrderList();
});
},
}) //
selectRoom(item) {
// ID
this.selectedRoomId = item.room_id;
//
console.log("选中的房源数据:", item);
this.currentRoom = item;
this.getOrderList();
}, },
// //
async getUserGovenmentMoney() { async getUserGovenmentMoney() {
request(apiArr.getUserGovenmentMoney, "POST", {}).then(res => { request(apiArr.getUserGovenmentMoney, "POST", {}).then((res) => {
console.log(res, '公积金'); console.log(res, "公积金");
this.balanceMoney = res.balance_after this.balanceMoney = res.balance_after;
}) });
}, },
// //
async getOrderList() { async getOrderList() {
await request(apiArr.getOrderList, 'POST', { await request(apiArr.getOrderList, "POST", {
room_id: this.currentRoom.room_id, room_id: this.currentRoom.room_id,
page_num: 1, page_num: 1,
page_size: 50 page_size: 50,
}).then(res => { }).then((res) => {
console.log(res, '账单'); console.log(res, "账单");
res.rows.forEach(item => { res.rows.forEach((item) => {
item.check = false item.check = false;
item.more = false item.more = false;
item.community_order_rows.forEach(ite => { item.community_order_rows.forEach((ite) => {
ite.check = false ite.check = false;
}) });
});
this.Bill = res.rows;
}); });
this.Bill = res.rows
})
}, },
// //
changeCheck(e, index) { changeCheck(e, index) {
this.Bill[index].more = !this.Bill[index].more this.Bill[index].more = !this.Bill[index].more;
}, },
// //
checkChange(e, index) { checkChange(e, index) {
this.Bill[index].check = !this.Bill[index].check this.Bill[index].check = !this.Bill[index].check;
this.Bill[index].community_order_rows.forEach(item => { this.Bill[index].community_order_rows.forEach((item) => {
if (this.Bill[index].check) { if (this.Bill[index].check) {
item.check = true item.check = true;
} else { } else {
item.check = false item.check = false;
} }
}) });
// //
let money = 0 let money = 0;
this.Bill.forEach(item => { this.Bill.forEach((item) => {
item.community_order_rows.forEach(ite => { item.community_order_rows.forEach((ite) => {
if (ite.check) { if (ite.check) {
money += ite.money money += ite.money;
} }
}) });
}) });
this.currentMoney = money this.currentMoney = money;
}, },
// //
itemsCheckChange(e, indes, index) { itemsCheckChange(e, indes, index) {
this.Bill[index].community_order_rows[indes].check = !this.Bill[index].community_order_rows[indes].check this.Bill[index].community_order_rows[indes].check =
!this.Bill[index].community_order_rows[indes].check;
// //
let isAll = this.Bill[index].community_order_rows.every(item => { let isAll = this.Bill[index].community_order_rows.every((item) => {
return item.check return item.check;
}) });
if (isAll) { if (isAll) {
this.Bill[index].check = true this.Bill[index].check = true;
} else { } else {
this.Bill[index].check = false this.Bill[index].check = false;
} }
//Billcommunity_order_rows //Billcommunity_order_rows
let money = 0 let money = 0;
this.Bill.forEach(item => { this.Bill.forEach((item) => {
item.community_order_rows.forEach(ite => { item.community_order_rows.forEach((ite) => {
if (ite.check) { if (ite.check) {
money += ite.money money += ite.money;
} }
}) });
}) });
this.currentMoney = money this.currentMoney = money;
}, },
// //
changePayType(e) { changePayType(e) {
this.payType = e this.payType = e;
}, },
// //
async createPay() { async createPay() {
let order_ids = [] let order_ids = [];
this.Bill.forEach(item => { this.Bill.forEach((item) => {
item.community_order_rows.forEach(items => { item.community_order_rows.forEach((items) => {
if (items.check) { if (items.check) {
order_ids.push(items.order_id) order_ids.push(items.order_id);
} }
}) });
}) });
let name_mini = '' let name_mini = "";
if(this.payType == 1){ if (this.payType == 1) {
name_mini = '微信' name_mini = "微信";
}else{ } else if (this.payType == 2) {
name_mini = '物业公积金' name_mini = "物业公积金";
} else {
name_mimi = "微信 + 物业公积金";
} }
if(!this.currentMoney){ if (!this.currentMoney) {
return uni.showToast({ return uni.showToast({
title: '请选择账单', title: "请选择账单",
duration: 2000 duration: 2000,
}); });
} }
await request(apiArr.createPayOrder, "POST", { await request(apiArr.createPayOrder, "POST", {
order_ids: order_ids, order_ids: order_ids,
community_id: this.currentCommunity.id, community_id: this.currentCommunity.id,
room_id: this.currentRoom.room_id, room_id: this.currentRoom.room_id,
pay_user_id: uni.getStorageSync('userId'), pay_user_id: uni.getStorageSync("userId"),
user_name: uni.getStorageSync('nickName'), user_name: uni.getStorageSync("nickName"),
pay_user_name: uni.getStorageSync('nickName'), pay_user_name: uni.getStorageSync("nickName"),
// //
pay_time: formatDate(new Date()), pay_time: formatDate(new Date()),
money: this.currentMoney, money: this.currentMoney,
name_mini name_mini,
}).then(res => { }).then((res) => {
console.log(res); console.log(res);
this.payInfoId = res.id this.payInfoId = res.id;
this.getPayInfo() this.getPayInfo();
}) });
}, },
// //
async getPayInfo() { async getPayInfo() {
await request(apiArr.getPayOrderInfo, "POST", { order_pay_id: 6}).then(res => { await request(apiArr.getPayOrderInfo, "POST", { order_pay_id: 6 }).then(
this.OrderPay() (res) => {
}) this.OrderPay();
}
);
}, },
// //
async OrderPay(){ async OrderPay() {
// this.payInfoId // this.payInfoId
await request(apiArr.OrderPay, "POST", { order_pay_id: 6}).then(res => { await request(apiArr.OrderPay, "POST", { order_pay_id: 6 }).then(
(res) => {
console.log(res); console.log(res);
}
}) );
}, },
// //
getPayList() { getPayList() {
request(apiArr.getPayOrderList, "POST", request(apiArr.getPayOrderList, "POST", {
{
room_id: this.currentRoom.room_id, room_id: this.currentRoom.room_id,
page_num: this.page_num, page_num: this.page_num,
page_size: this.page_size page_size: this.page_size,
}).then(res => { }).then((res) => {
console.log(res); console.log(res);
let flag = false let flag = false;
if (res.rows && res.rows.length == this.page_size) { if (res.rows && res.rows.length == this.page_size) {
flag = true flag = true;
} else { } else {
flag = false flag = false;
} }
this.flag = flag this.flag = flag;
this.payOrderList = this.payOrderList.concat(res.rows) this.payOrderList = this.payOrderList.concat(res.rows);
}) });
}, },
// //
more(){ more(item) {
NavgateTo("../providentFund/index") NavgateTo(`../providentFund/index?item=${JSON.stringify(item)}`);
}, },
}, },
};
}
</script> </script>
<style> <style>

View File

@ -1,19 +1,33 @@
<template> <template>
<view class="container"> <view class="container">
<u-navbar title=" " leftIconSize="20px" leftIconColor="#FFFFFF" bgColor="transparent" :autoBack="true" /> <u-navbar
title=" "
leftIconSize="20px"
leftIconColor="#FFFFFF"
bgColor="transparent"
:autoBack="true"
/>
<view class="container_body" :style="{ paddingTop: top + 'px' }"> <view class="container_body" :style="{ paddingTop: top + 'px' }">
<view class="title">物业公积金</view> <view class="title">物业公积金</view>
<view class="title_bottom"> <view class="title_bottom">
<view>{{ moeny }}</view> <view>{{ moeny }}</view>
<u-icon name="info-circle" size="30rpx" color="linear-gradient( 180deg, #FFFFFF 0%, #FFD7D7 100%);" /> <u-icon
name="info-circle"
size="30rpx"
color="linear-gradient( 180deg, #FFFFFF 0%, #FFD7D7 100%);"
/>
</view> </view>
<view class="name" @click="headerSwitchClick"> <view class="name" @click="headerSwitchClick">
<text>{{defaultName.name}}</text> <text>{{ defaultName.name }}</text>
<u-icon name="arrow-right" color="#FFFFFF" size="30rpx" /> <u-icon name="arrow-right" color="#FFFFFF" size="30rpx" />
</view> </view>
</view> </view>
<view class="main"> <view class="main">
<view class="person_info" v-for="(item,index) in list.owners" :key="index"> <view
class="person_info"
v-for="(item, index) in list.owners"
:key="index"
>
<view class="item"> <view class="item">
<view class="label">姓名</view> <view class="label">姓名</view>
<view class="desc">{{ item.name }}</view> <view class="desc">{{ item.name }}</view>
@ -25,10 +39,10 @@
<view class="desc" v-if="item.type == 3">租户</view> <view class="desc" v-if="item.type == 3">租户</view>
<view class="desc" v-if="item.type == 4">访客</view> <view class="desc" v-if="item.type == 4">访客</view>
</view> </view>
<view class="item"> <!-- <view class="item">
<view class="label">手机号</view> <view class="label">手机号</view>
<view class="desc">{{item.mobile}}</view> <view class="desc">{{item.mobile}}</view>
</view> </view> -->
<view class="item"> <view class="item">
<view class="label">房产总数</view> <view class="label">房产总数</view>
<view class="desc">{{ item.count_of_rooms }}</view> <view class="desc">{{ item.count_of_rooms }}</view>
@ -36,17 +50,26 @@
<view class="item"> <view class="item">
<view class="label fix"> <view class="label fix">
<text>物业费公积金总余额</text> <text>物业费公积金总余额</text>
<u-icon name="info-circle-fill" size="30rpx" color="red" @click="headerIconClick(index)" /> <u-icon
<view class="popup" v-if="item.popupShow" @click="headerIconClick(index)"> name="info-circle-fill"
{{ item.identity == '业主' ? ownerDesc : desc }} size="30rpx"
color="red"
@click="headerIconClick(index)"
/>
<view
class="popup"
v-if="item.popupShow"
@click="headerIconClick(index)"
>
{{ item.identity == "业主" ? ownerDesc : desc }}
<view class="angle"></view> <view class="angle"></view>
</view> </view>
</view> </view>
<view class="desc">{{item.property_fund_balance}}</view> <view class="desc">{{ item.property_fund_balance }}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="btn">去抵扣物业账单</view> <view class="btn" @click="goPay">去抵扣物业账单</view>
<u-popup :show="show" :round="50" @close="close"> <u-popup :show="show" :round="50" @close="close">
<view class="select_Popup"> <view class="select_Popup">
@ -57,7 +80,12 @@
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="main"> <view class="main">
<view class="item" v-for="(item,index) in houseList" :key="index" @click="headerConfirmClick(item)"> <view
class="item"
v-for="(item, index) in houseList"
:key="index"
@click="headerConfirmClick(item)"
>
<text>{{ item.name }}</text> <text>{{ item.name }}</text>
<image <image
v-if="item.checked" v-if="item.checked"
@ -84,104 +112,115 @@ import {
picUrl, picUrl,
uniqueByField, uniqueByField,
menuButtonInfo, menuButtonInfo,
} from '../../../utils'; NavgateTo,
} from "../../../utils";
import { apiArr } from '../../../api/v2Community';
import { apiArr } from "../../../api/v2Community";
export default { export default {
data() { data() {
return { return {
top: '', top: "",
moeny: '0.00', moeny: "0.00",
show: false, show: false,
ownerDesc: '本房产的物业公积金为该房产的所有成员物业公积金总和。无需经过成员同意便可用于本房产的物业费抵扣,一旦成功抵扣,成员所拥有的物业公积金将自动进行扣除。', ownerDesc:
desc: '物业公积金可通用至您加入的所有房产,任一房产的物业相关费用均可用该物业公积金抵扣。', "本房产的物业公积金为该房产的所有成员物业公积金总和。无需经过成员同意便可用于本房产的物业费抵扣,一旦成功抵扣,成员所拥有的物业公积金将自动进行扣除。",
defaultName: '', desc: "物业公积金可通用至您加入的所有房产,任一房产的物业相关费用均可用该物业公积金抵扣。",
list: [ defaultName: "",
list: [],
houseList: [],
roomList: [],
], itemObj: '',
houseList: [ };
],
roomList:[]
}
}, },
async onLoad(options) { async onLoad(options) {
if (options.item) {
this.itemObj = JSON.parse(decodeURIComponent(options.item));
this.defaultName = {
...this.itemObj,
checked: true,
};
} else {
this.defaultName = { this.defaultName = {
...this.houseList[0], ...this.houseList[0],
checked: true checked: true,
}; };
}
console.log(this.itemObj)
const meun = menuButtonInfo(); const meun = menuButtonInfo();
this.top = meun.height + meun.top; this.top = meun.height + meun.top;
await this.getRoomList() await this.getRoomList();
await this.getInfo() await this.getInfo();
}, },
methods: { methods: {
headerConfirmClick(item) { headerConfirmClick(item) {
this.defaultName = { this.defaultName = {
...item, ...item,
checked: true checked: true,
}; };
this.show = false; this.show = false;
this.getInfo() this.getInfo();
}, },
// //
headerSwitchClick() { headerSwitchClick() {
this.show = true; this.show = true;
const newRes = this.roomList.map(item => { const newRes = this.roomList.map((item) => {
if (item.name === this.defaultName.name) { if (item.name === this.defaultName.name) {
return { return {
...item, ...item,
checked: true checked: true,
} };
} }
return { return {
...item, ...item,
checked: false checked: false,
} };
}); });
console.log('newResnewRes', newRes); console.log("newResnewRes", newRes);
this.houseList = newRes; this.houseList = newRes;
}, },
// //
headerIconClick(ind) { headerIconClick(ind) {
this.list.owners[ind].popupShow = !this.list.owners[ind].popupShow this.list.owners[ind].popupShow = !this.list.owners[ind].popupShow;
}, },
close() { close() {
this.show = false; this.show = false;
}, },
async getRoomList(){ async getRoomList() {
await request(apiArr.getCommunityList,"POST",{ await request(apiArr.getCommunityList, "POST", {
page_num:1, page_num: 1,
page_size:50, page_size: 50,
community_id:uni.getStorageSync("changeCommData").id community_id: uni.getStorageSync("changeCommData").id,
}).then(res=>{ }).then((res) => {
res.rows.forEach(item=>{ res.rows.forEach((item) => {
item.checked = false item.checked = false;
})
this.roomList = res.rows
this.defaultName = res.rows[0]
})
},
async getInfo(){
await request(apiArr.getGovernmentByRoom,"POST",{
room_id:this.defaultName.room_id
}).then(res=>{
res.owners.forEach(item => {
item.popupShow = false
}); });
this.list = res this.roomList = res.rows;
}) if (!this.itemObj) {
this.defaultName = res.rows[0];
}
});
},
async getInfo() {
await request(apiArr.getGovernmentByRoom, "POST", {
room_id: this.defaultName.room_id,
}).then((res) => {
res.owners.forEach((item) => {
item.popupShow = false;
});
this.list = res;
});
},
goPay() {
NavgateTo("../propertyPayment/index");
}, },
}, },
} };
</script> </script>
<style lang="scss"> <style lang="scss">
@import './index.scss'; @import "./index.scss";
</style> </style>

View File

@ -138,6 +138,7 @@ page {
font-size: 28rpx; font-size: 28rpx;
color: #FFA600; color: #FFA600;
font-weight: 600; font-weight: 600;
width: 95rpx;
} }
.orderItem_row_state2 { .orderItem_row_state2 {
color: #FF4800; color: #FF4800;

View File

@ -1,9 +1,18 @@
<template> <template>
<view class="box"> <view class="box">
<div class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }"> <div
class="searchBox"
:style="{ height: localHeight + 'px', paddingTop: top + 'px' }"
>
<div class="searchBox_add"> <div class="searchBox_add">
<div class="searchBox_left"> <div class="searchBox_left">
<u-icon bold color="#000" size="40" name="arrow-left" @click="back"></u-icon> <u-icon
bold
color="#000"
size="40"
name="arrow-left"
@click="back"
></u-icon>
</div> </div>
<div class="searchBox_mid">我的报修</div> <div class="searchBox_mid">我的报修</div>
<div class="searchBox_right"></div> <div class="searchBox_right"></div>
@ -11,21 +20,38 @@
</div> </div>
<div class="tabList"> <div class="tabList">
<div :class="active == 1 ? 'tab active' : 'tab'" @click="headerTabsClick(1)"> <div
:class="active == 1 ? 'tab active' : 'tab'"
@click="headerTabsClick(1)"
>
待指派 <span>({{ awaitingNumb }})</span> 待指派 <span>({{ awaitingNumb }})</span>
</div> </div>
<div :class="active == 2 ? 'tab active' : 'tab'" @click="headerTabsClick(2)"> <div
:class="active == 2 ? 'tab active' : 'tab'"
@click="headerTabsClick(2)"
>
进行中 <span>({{ underwayNum }})</span> 进行中 <span>({{ underwayNum }})</span>
</div> </div>
<div :class="active == 4 ? 'tab active' : 'tab'" @click="headerTabsClick(4)"> <div
:class="active == 4 ? 'tab active' : 'tab'"
@click="headerTabsClick(4)"
>
已作废 <span>({{ discardNum }})</span> 已作废 <span>({{ discardNum }})</span>
</div> </div>
<div :class="active == 3 ? 'tab active' : 'tab'" @click="headerTabsClick(3)"> <div
:class="active == 3 ? 'tab active' : 'tab'"
@click="headerTabsClick(3)"
>
已完成 <span>({{ doneNum }})</span> 已完成 <span>({{ doneNum }})</span>
</div> </div>
</div> </div>
<div v-if="list.length !== 0" class="orderList" v-for="(item, index) in list" :key="index"> <div
v-if="list.length !== 0"
class="orderList"
v-for="(item, index) in list"
:key="index"
>
<div class="orderItem" @click="handlerDetailClick(item.id)"> <div class="orderItem" @click="handlerDetailClick(item.id)">
<div :class="['orderItemTit', statusType[item.status].style]"> <div :class="['orderItemTit', statusType[item.status].style]">
<div class="orderItemTit_left">工单编号{{ item.order_code }}</div> <div class="orderItemTit_left">工单编号{{ item.order_code }}</div>
@ -35,12 +61,13 @@
<div class="df"> <div class="df">
<div class="orderItem_row_label">小区房源名称</div> <div class="orderItem_row_label">小区房源名称</div>
<div class="orderItem_row_con">{{ item.room.name }}</div> <div class="orderItem_row_con">{{ item.room.name }}</div>
</div> <div
:class="['orderItem_row_state', statusType[item.status].color]"
<div :class="['orderItem_row_state', statusType[item.status].color]"> >
{{ statusType[item.status].desc }} {{ statusType[item.status].desc }}
</div> </div>
</div> </div>
</div>
<div class="orderItem_row"> <div class="orderItem_row">
<div class="orderItem_row_label">报修类型</div> <div class="orderItem_row_label">报修类型</div>
@ -70,8 +97,10 @@
</div> </div>
<div v-if="list.length == 0" class="empty"> <div v-if="list.length == 0" class="empty">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_nearbyList_empty.png" <image
mode="aspectFill"></image> src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_nearbyList_empty.png"
mode="aspectFill"
></image>
暂无数据 暂无数据
</div> </div>
@ -92,31 +121,31 @@ export default {
page_size: 10, page_size: 10,
flag: false, // flag: false, //
list: [], // list: [], //
awaitingNumb: '', // awaitingNumb: "", //
underwayNum: '', // underwayNum: "", //
doneNum: '', // doneNum: "", //
discardNum: '', // discardNum: "", //
// //
statusType: { statusType: {
1: { 1: {
desc: "待指派", desc: "待指派",
style: "orderItemTit_state1", style: "orderItemTit_state1",
color: "orderItem_row_state1" color: "orderItem_row_state1",
}, },
2: { 2: {
desc: "进行中", desc: "进行中",
style: "orderItemTit_state2", style: "orderItemTit_state2",
color: "orderItem_row_state2" color: "orderItem_row_state2",
}, },
3: { 3: {
desc: "已完成", desc: "已完成",
style: "orderItemTit_state3", style: "orderItemTit_state3",
color: "orderItem_row_state3" color: "orderItem_row_state3",
}, },
4: { 4: {
desc: "已作废", desc: "已作废",
style: "orderItemTit_state4", style: "orderItemTit_state4",
color: "orderItem_row_state4" color: "orderItem_row_state4",
}, },
}, },
}; };
@ -137,7 +166,8 @@ export default {
this.getTabsList(); this.getTabsList();
}, },
async init() { async init() {
const [awaitingNumb, underwayNum, doneNum, discardNum] = await Promise.all([ const [awaitingNumb, underwayNum, doneNum, discardNum] =
await Promise.all([
this.awaitingRes(), this.awaitingRes(),
this.underwayRes(), this.underwayRes(),
this.doneRes(), this.doneRes(),
@ -188,7 +218,7 @@ export default {
// //
async discardRes() { async discardRes() {
const res = await request(apiArr.getWorkOrderCrudList, "POST", { const res = await request(apiArr.getWorkOrderCrudList, "POST", {
status: 3, status: 4,
page_num: this.page_num, page_num: this.page_num,
page_size: this.page_size, page_size: this.page_size,
}); });
@ -197,7 +227,7 @@ export default {
// //
async doneRes() { async doneRes() {
const res = await request(apiArr.getWorkOrderCrudList, "POST", { const res = await request(apiArr.getWorkOrderCrudList, "POST", {
status: 4, status: 3,
page_num: this.page_num, page_num: this.page_num,
page_size: this.page_size, page_size: this.page_size,
}); });
@ -206,9 +236,9 @@ export default {
back() { back() {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1,
}) });
} },
}, },
onLoad(options) { onLoad(options) {

View File

@ -146,7 +146,7 @@
</view> </view>
</view> </view>
<nav-footer :current="3" /> <!-- <nav-footer :current="4" /> -->
<!-- 回到顶部 --> <!-- 回到顶部 -->
<div class="toUp" @click="scrollToTop"> <div class="toUp" @click="scrollToTop">
@ -304,7 +304,7 @@ export default {
// //
lookNotice() { lookNotice() {
NavgateTo("/packages/homeServer/noticeDetials/index"); NavgateTo("/packages/homeServer/noticeManage/index");
}, },
}, },
onLoad() { onLoad() {

View File

@ -148,7 +148,7 @@ page {
} }
.master_info_right2 { .master_info_right2 {
font-size: 28rpx; font-size: 26rpx;
color: #999999; color: #999999;
display: flex; display: flex;
align-items: center; align-items: center;
@ -423,6 +423,12 @@ page {
margin-right: 6rpx; margin-right: 6rpx;
} }
.evaluateItem_msg3{
font-size: 24rpx;
margin-left: 15rpx;
font-weight: bold;
}
.evaluateItem_main { .evaluateItem_main {
font-size: 26rpx; font-size: 26rpx;
color: #222222; color: #222222;
@ -448,9 +454,9 @@ page {
} }
.footerbtn1 { .footerbtn1 {
width: 200rpx; width: 300rpx;
height: 70rpx; height: 70rpx;
background: linear-gradient(91deg, #FFB95E 0%, #FF9100 100%); background: linear-gradient(91deg, #ff765a 0%, #ff3d11 100%);
border-radius: 100rpx 100rpx 100rpx 100rpx; border-radius: 100rpx 100rpx 100rpx 100rpx;
font-size: 36rpx; font-size: 36rpx;
color: #FFFFFF; color: #FFFFFF;
@ -502,3 +508,113 @@ page {
padding: 20rpx; padding: 20rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.shadow {
background: rgba(0, 0, 0, 0.4);
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 9;
}
.shadowBox1 {
height: 250rpx;
width: 100%;
background-color: #fff;
position: absolute;
left: 0;
bottom: 0;
display: flex;
}
.shadowBox1Item {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 26rpx;
color: #000000;
}
.shadowBox1Item image {
width: 100rpx;
height: 100rpx;
margin-bottom: 26rpx;
}
.shadowBox2 {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: auto;
height: auto;
}
.shadowBox_img {
width: 600rpx;
height: 750rpx;
background-color: white;
background-size: 100% 100%;
border-radius: 30rpx;
}
.boxshadow_btnList{
display: flex;
justify-content: center;
}
.shadowBox_btn1 {
font-size: 30rpx;
color: #FFFFFF;
width: 250rpx;
height: 70rpx;
background: #08c161;
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: center;
margin: 30rpx 10rpx;
}
.shadowBox_btn2 {
font-size: 30rpx;
color: #FFFFFF;
width: 250rpx;
height: 70rpx;
background: #fe380e;
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: center;
margin: 30rpx 10rpx;
}
.boxshadow_tit {
font-size: 32rpx;
color: #222222;
text-align: center;
padding-top: 40rpx;
margin-bottom: 30rpx;
}
.boxshadow_text{
font-size: 26rpx;
color: #a3a3a3;
text-align: center;
}
.boxshadow_text2{
font-size: 28rpx;
text-align: center;
margin: 20rpx;
}
.boxshadow_img {
width: 250rpx;
height: 250rpx;
margin: 0 auto;
margin-top: 40rpx;
}

View File

@ -13,7 +13,7 @@
@click="back" @click="back"
></u-icon> ></u-icon>
</view> </view>
<div class="searchBox_mid">刘师傅</div> <div class="searchBox_mid">人员详情</div>
<div class="searchBox_right"> <div class="searchBox_right">
<u-icon <u-icon
bold bold
@ -43,7 +43,9 @@
<div class="master"> <div class="master">
<div class="master_info"> <div class="master_info">
<div class="master_info_left"> <div class="master_info_left">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/home_icon12.png"></image> <image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/home_icon12.png"
></image>
<div class="state state1">待服务</div> <div class="state state1">待服务</div>
<div class="state state2" v-if="false">休息中</div> <div class="state state2" v-if="false">休息中</div>
<div class="state state3" v-if="false">服务中</div> <div class="state state3" v-if="false">服务中</div>
@ -146,7 +148,9 @@
<div class="Tit">职业证书</div> <div class="Tit">职业证书</div>
<div class="imgList"> <div class="imgList">
<div class="imgItem" v-for="(item, index) in 5" :key="index"> <div class="imgItem" v-for="(item, index) in 5" :key="index">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_MsgImg1.png"></image> <image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_MsgImg1.png"
></image>
</div> </div>
</div> </div>
</div> </div>
@ -155,7 +159,9 @@
<div class="master_info mt20" v-for="(item, index) in 3" :key="index"> <div class="master_info mt20" v-for="(item, index) in 3" :key="index">
<div class="master_info_left"> <div class="master_info_left">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/home_icon12.png"></image> <image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/home_icon12.png"
></image>
<div class="state state1">待服务</div> <div class="state state1">待服务</div>
<div class="state state2" v-if="false">休息中</div> <div class="state state2" v-if="false">休息中</div>
<div class="state state3" v-if="false">服务中</div> <div class="state state3" v-if="false">服务中</div>
@ -208,7 +214,9 @@
<div class="master"> <div class="master">
<div class="master_info"> <div class="master_info">
<div class="master_info_left"> <div class="master_info_left">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/home_icon12.png"></image> <image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/home_icon12.png"
></image>
<div class="state state1">待服务</div> <div class="state state1">待服务</div>
<div class="state state2" v-if="false">休息中</div> <div class="state state2" v-if="false">休息中</div>
<div class="state state3" v-if="false">服务中</div> <div class="state state3" v-if="false">服务中</div>
@ -233,7 +241,8 @@
<span>4.8</span> <span>4.8</span>
</div> </div>
<div class="master_info_right2"> <div class="master_info_right2">
价格范围 <span>500-800</span> <div>工号<span>123456</span></div>
<div>价格范围 <span>500-800</span></div>
</div> </div>
<div class="master_info_right3"> <div class="master_info_right3">
<div class="master_info_right3_item"> <div class="master_info_right3_item">
@ -313,7 +322,9 @@
<div class="EvaluateItem"> <div class="EvaluateItem">
<div class="evaluateItem_header"> <div class="evaluateItem_header">
<div class="evaluateItem_ava"> <div class="evaluateItem_ava">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_MsgImg1.png"></image> <image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_MsgImg1.png"
></image>
</div> </div>
<div class="evaluateItem_msg"> <div class="evaluateItem_msg">
<div class="evaluateItem_msg1">TP</div> <div class="evaluateItem_msg1">TP</div>
@ -323,6 +334,7 @@
:key="index" :key="index"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/homeServer_stait.png" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/homeServer_stait.png"
></image> ></image>
<span class="evaluateItem_msg3">技术评级100</span>
</div> </div>
</div> </div>
<div class="evaluateItem_time">2025-06-24</div> <div class="evaluateItem_time">2025-06-24</div>
@ -336,7 +348,9 @@
<div class="Tit">职业证书</div> <div class="Tit">职业证书</div>
<div class="imgList"> <div class="imgList">
<div class="imgItem" v-for="(item, index) in 5" :key="index"> <div class="imgItem" v-for="(item, index) in 5" :key="index">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_MsgImg1.png"></image> <image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_MsgImg1.png"
></image>
</div> </div>
</div> </div>
</div> </div>
@ -347,9 +361,9 @@
<div class="footerIcon" @click="Vendor"> <div class="footerIcon" @click="Vendor">
<image <image
id="footerIcon1" id="footerIcon1"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/homeServer_serverInfoIcon.png" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/footer_shop.png"
></image> ></image>
服务商 店铺
</div> </div>
<div class="footerIcon"> <div class="footerIcon">
<image <image
@ -358,9 +372,37 @@
></image> ></image>
收藏 收藏
</div> </div>
<div class="footerbtn1">联系客服</div> <div class="footerIcon">
<div class="footerbtn2">立即预约</div> <image
@click="openSave"
id="footerIcon2"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_share.png"
></image>
分享
</div> </div>
<div class="footerbtn1">联系客服咨询</div>
<!-- <div class="footerbtn2">立即预约</div> -->
</div>
<!-- 分享 -->
<view class="shadow" @click="changeShadow2" v-if="boxshadow2">
<view class="shadowBox2">
<view class="shadowBox_img">
<view class="boxshadow_tit">分享服务给朋友</view>
<view class="boxshadow_text">将服务人员信息分享给微信,</view>
<view class="boxshadow_text">好友对方可以直接查看详情</view>
<view class="boxshadow_text2">张师傅</view>
<view class="boxshadow_img">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/erweima.png"> </image>
</view>
<view class="boxshadow_text2">扫描二维码查看服务详情</view>
<view class="boxshadow_btnList">
<view class="shadowBox_btn1">分享到微信</view>
<view class="shadowBox_btn2">保存二维码</view>
</view>
</view>
</view>
</view>
</view> </view>
</template> </template>
@ -378,6 +420,7 @@ export default {
return { return {
top: "", top: "",
localHeight: "", localHeight: "",
boxshadow2: false,
}; };
}, },
methods: { methods: {
@ -390,6 +433,13 @@ export default {
back() { back() {
NavgateTo("1"); NavgateTo("1");
}, },
openSave() {
this.boxshadow2 = true;
},
changeShadow2() {
this.boxshadow2 = false;
},
}, },
onReady() {}, onReady() {},

View File

@ -0,0 +1,49 @@
page {
background-color: #f6f7fb;
}
.container {
padding: 30rpx;
}
.notice-item {
border-radius: 20rpx;
margin-bottom: 25rpx;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.notice-image {
width: 100%;
height: 400rpx;
border-radius: 20rpx 20rpx 0 0;
}
.notice-main {
background-color: white;
border-radius: 0 0 20rpx 20rpx;
padding: 20rpx 15rpx;
}
.notice-title {
font-size: 30rpx;
font-weight: bold;
}
.notice-content {
font-size: 28ropx;
color: #586271;
margin: 20rpx 0;
}
.notice-date {
display: flex;
font-size: 26rpx;
color: #a0a7b1;
align-items: center;
}
.date-image {
width: 25rpx;
height: 25rpx;
margin-right: 10rpx;
}

View File

@ -0,0 +1,58 @@
<template>
<view class="container">
<view v-for="(item, index) in noticeList" :key="index">
<view class="notice-item" @click="toNoticeDetail(item)">
<image :src="item.image" class="notice-image"></image>
<view class="notice-main">
<view class="notice-title">{{ item.title }}</view>
<view class="notice-content">{{ item.content }}</view>
<view class="notice-date">
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/time.png"
class="date-image"
></image>
<view>{{ item.date }}</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
request,
picUrl,
NavgateTo,
menuButtonInfo,
} from "../../../utils/index";
export default {
data() {
return {
noticeList: [
{
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
title: "公告标题1",
content: "公告内容",
date: "2023-01-01",
},
{
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
title: "公告标题2",
content: "公告内容",
date: "2023-01-02",
},
],
};
},
methods: {
toNoticeDetail(item) {
NavgateTo("/packages/homeServer/noticeDetails/index");
},
},
};
</script>
<style>
@import url("./index.css");
</style>

View File

@ -78,6 +78,43 @@
} }
} }
.tabs {
align-items: center;
background: #ffffff;
height: 100rpx;
padding: 0 20rpx;
box-sizing: border-box;
display: flex;
justify-content: space-between;
width: 600rpx;
margin: 0 auto;
}
.tabItem {
font-size: 25rpx;
color: #222222;
margin-right: 60rpx;
height: 42rpx;
}
.active2 {
font-size: 25rpx;
font-weight: 700;
position: relative;
}
.active2::after {
content: '';
background: url(https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_active.png) no-repeat;
background-size: 100% 100%;
width: 52rpx;
height: 22rpx;
position: absolute;
left: 50%;
bottom: -16rpx;
transform: translateX(-50%);
}
/* 搜索指定内容 */ /* 搜索指定内容 */
.specifiedContent { .specifiedContent {
min-height: 30rpx; min-height: 30rpx;
@ -153,6 +190,10 @@
.hot-services { .hot-services {
margin: 20rpx; margin: 20rpx;
border: 1rpx solid #e8e8e8; border: 1rpx solid #e8e8e8;
display: flex;
flex-direction: column;
height: 80vh;
overflow-y: auto;
} }
.section-header { .section-header {

View File

@ -18,7 +18,7 @@
<input <input
type="text" type="text"
class="search-input" class="search-input"
placeholder="请选择搜索指定内容" placeholder="请输入内容"
v-model="searchText" v-model="searchText"
@confirm="handleSearch" @confirm="handleSearch"
/> />
@ -26,7 +26,7 @@
</view> </view>
<!-- 搜索指定内容 --> <!-- 搜索指定内容 -->
<view <!-- <view
class="specifiedContent" class="specifiedContent"
v-if="!isLoading && specifiedContent.length > 0 && !hasResult" v-if="!isLoading && specifiedContent.length > 0 && !hasResult"
> >
@ -42,7 +42,7 @@
<view>{{ item.name }}</view> <view>{{ item.name }}</view>
</view> </view>
</view> </view>
</view> </view> -->
<!-- 搜索历史 --> <!-- 搜索历史 -->
<view <view
@ -73,12 +73,31 @@
<!-- 搜索结果 --> <!-- 搜索结果 -->
<view class="search-result" v-if="!isLoading && hasResult"> <view class="search-result" v-if="!isLoading && hasResult">
<view class="hot-services"> <view class="tabs">
<view
v-for="(item, index) in categoryList"
:key="index"
:class="['tabItem', selectedTab === index ? 'active2' : '']"
@click="selectTab(index, item)"
>
{{ item.category_name }}
</view>
</view>
<!-- 全部 -->
<searchAll v-if="selectedTab === 0" class="searchAll" />
<!-- 店铺 -->
<searchShop v-if="selectedTab === 1" class="searchShop" />
<!-- 服务 -->
<view class="hot-services" v-if="selectedTab === 2">
<view class="service-list"> <view class="service-list">
<view <view
class="service-card" class="service-card"
v-for="(service, index) in hotServiceList" v-for="(service, index) in hotServiceList"
:key="index" :key="index"
@click="navigateToReservation(service)"
> >
<image <image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/ceshi.png" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/ceshi.png"
@ -99,12 +118,12 @@
</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" class="service-button"
@click="navigateToReservation(service)" @click="navigateToReservation(service)"
> >
<text class="button-text" @click="goSubscribe">去预约</text> <text class="button-text" @click="goSubscribe">去预约</text>
</view> </view> -->
<text class="service-count">{{ service.count }}</text> <text class="service-count">{{ service.count }}</text>
</view> </view>
</view> </view>
@ -121,9 +140,10 @@
</view> </view>
<!-- 回到顶部 --> <!-- 回到顶部 -->
<div <u-back-top :scroll-top="scrollTop"></u-back-top>
<!-- <div
class="toUp" class="toUp"
v-show="searchHistory.length > 0 && isShowToTop" v-show="isShowToTop"
@click="scrollToTop" @click="scrollToTop"
> >
<u-badge <u-badge
@ -132,15 +152,23 @@
max="99" max="99"
:value="value" :value="value"
></u-badge> ></u-badge>
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/toUp.png"></image> <image
</div> src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/toUp.png"
></image>
</div> -->
</view> </view>
</template> </template>
<script> <script>
import { request, NavgateTo } from "../../../utils/index"; import { request, NavgateTo } from "../../../utils/index";
import SearchAll from "../searchAll/index.vue";
import SearchShop from "../searchShop/index.vue";
export default { export default {
components: {
SearchAll,
SearchShop,
},
data() { data() {
return { return {
isShowToTop: false, isShowToTop: false,
@ -172,10 +200,58 @@ export default {
description: "专业保洁团队,全屋深度清洁,去除顽固污渍,还您清新居所", description: "专业保洁团队,全屋深度清洁,去除顽固污渍,还您清新居所",
count: "已预约100+", count: "已预约100+",
}, },
{
id: 1,
name: "空调清洗",
image: "",
badge: "推荐",
tag: "平台保障",
description: "专业保洁团队,全屋深度清洁,去除顽固污渍,还您清新居所",
count: "已预约100+",
},
{
id: 1,
name: "空调清洗",
image: "",
badge: "推荐",
tag: "平台保障",
description: "专业保洁团队,全屋深度清洁,去除顽固污渍,还您清新居所",
count: "已预约100+",
},
{
id: 1,
name: "空调清洗",
image: "",
badge: "推荐",
tag: "平台保障",
description: "专业保洁团队,全屋深度清洁,去除顽固污渍,还您清新居所",
count: "已预约100+",
},
{
id: 1,
name: "空调清洗",
image: "",
badge: "推荐",
tag: "平台保障",
description: "专业保洁团队,全屋深度清洁,去除顽固污渍,还您清新居所",
count: "已预约100+",
},
], ],
categoryList: [
{ category_name: "全部" },
{ category_name: "店铺" },
{ category_name: "服务" },
],
selectedTab: 0,
scrollTop: 0
}; };
}, },
onPageScroll(e) {
this.scrollTop = e.scrollTop;
},
created() { created() {
const history = uni.getStorageSync("searchHistory") || []; const history = uni.getStorageSync("searchHistory") || [];
this.searchHistory = history; this.searchHistory = history;
@ -186,8 +262,8 @@ export default {
window.removeEventListener("scroll", this.handleScroll); window.removeEventListener("scroll", this.handleScroll);
}, },
methods: { methods: {
handleScroll() { handleScroll(e) {
this.isShowToTop = window.pageYOffset > 200; this.isShowToTop = e.detail.scrollTop > 0;
}, },
scrollToTop() { scrollToTop() {
uni.pageScrollTo({ uni.pageScrollTo({
@ -198,6 +274,9 @@ export default {
back() { back() {
NavgateTo("1"); NavgateTo("1");
}, },
selectTab(index, item) {
this.selectedTab = index;
},
// //
handleSearch() { handleSearch() {
const keyword = this.searchText.trim(); const keyword = this.searchText.trim();
@ -256,6 +335,14 @@ export default {
goSubscribe() { goSubscribe() {
NavgateTo("/packages/homeServer/searchInfo/index"); NavgateTo("/packages/homeServer/searchInfo/index");
}, },
navigateToReservation(item) {
uni.navigateTo({
url: `/packages/homeServer/serverInfo/index?service=${encodeURIComponent(
JSON.stringify(item)
)}`,
});
},
}, },
}; };
</script> </script>

View File

@ -0,0 +1,509 @@
page {
padding: 0 !important;
}
.container2 {
display: flex;
flex-direction: column;
height: 83vh;
overflow: hidden;
}
.main {
flex: 1;
box-sizing: border-box;
overflow: hidden;
overflow-y: auto;
position: relative;
padding-bottom: 160rpx;
}
.searchBox {
display: flex;
align-items: center;
background-color: #fff;
}
.Filter {
display: flex;
align-items: center;
background-color: #fff;
margin-top: -20rpx;
}
.Filter_right {
width: 133rpx;
height: 110rpx;
background: #FFFFFF;
border-radius: 0rpx 0rpx 0rpx 0rpx;
font-size: 26rpx;
color: #333;
display: flex;
align-items: center;
justify-content: center;
margin-left: 200rpx;
}
.activeFilter{
color: #FF370B;
}
.Filter_right image {
width: 22rpx;
height: 24rpx;
margin-left: 7rpx;
}
.iptBox {
width: 431rpx;
height: 70rpx;
background: #F6F7FB;
border-radius: 100rpx 100rpx 100rpx 100rpx;
margin-left: 40rpx;
display: flex;
align-items: center;
padding-left: 30rpx;
box-sizing: border-box;
}
.iptBox image {
width: 30rpx;
height: 30rpx;
margin-right: 16rpx;
}
.iptBox .u-input {
padding: 0 !important;
background-color: transparent !important;
}
.Filter_left {
display: flex;
align-items: center;
overflow: hidden;
overflow-x: auto;
white-space: nowrap;
}
/* 选中状态图片样式 */
.iconStyle {
width: 25rpx !important;
height: 45rpx !important;
}
/* 默认状态样式 */
.FilterItem image:not(.iconStyle) {
width: 20rpx;
height: 20rpx;
}
.FilterItem:not(.active) {
/* 默认字体样式 */
font-size: 26rpx;
color: #333;
}
.FilterItem {
font-size: 26rpx;
color: #222222;
display: flex;
align-items: center;
padding: 0 20rpx;
margin-right: 10rpx;
}
.FilterItem image {
width: 24rpx;
height: 15rpx;
margin-left: 10rpx;
}
.MasterList {
margin-top: 30rpx;
background-color: #fff;
padding: 12rpx 20rpx 20rpx 20rpx;
}
.MasterItem {
display: flex;
align-items: center;
margin-bottom: 20rpx;
border-bottom: 1rpx solid #EBEBEB;
box-sizing: border-box;
padding-bottom: 30rpx;
padding-top: 20rpx;
}
.MasterItem:last-child {
border-bottom: none;
}
.MasterItem_right {
flex: 1;
background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx;
}
.MasterItem_info {
box-sizing: border-box;
display: flex;
align-items: flex-start;
}
.MasterItem_Info_left {
display: flex;
flex-direction: column;
justify-content: center;
width: 130rpx;
margin-right: 40rpx;
}
.MasterItem_Info_left image {
width: 130rpx;
height: 130rpx;
}
.state {
width: 110rpx;
height: 40rpx;
border-radius: 100rpx 100rpx 100rpx 100rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
color: #FFFFFF;
margin: 0 auto;
margin-top: -20rpx;
z-index: 2;
position: relative;
}
.state1 {
background: #AECE2B;
}
.state2 {
background: #CECECE;
}
.state3 {
background: #FF370B;
}
.MasterItem_Info_right {
flex: 1;
}
.filter-section {
padding: 20rpx 30rpx;
border-bottom: 1rpx solid #f5f5f5;
}
.filter-title {
font-size: 28rpx;
color: #333;
margin-bottom: 20rpx;
font-weight: bold;
}
.filter-options {
display: flex;
flex-wrap: wrap;
gap: 15rpx;
}
.filter-option {
background: #f5f5f5;
border-radius: 50rpx;
padding: 12rpx 30rpx;
font-size: 24rpx;
color: #666;
white-space: nowrap;
}
.filter-option.active {
background: #ff370b;
color: white;
}
.price-range {
display: flex;
align-items: center;
gap: 20rpx;
margin-top: 10rpx;
}
.price-input {
flex: 1;
height: 60rpx;
background: #f5f5f5;
border-radius: 10rpx;
padding: 0 20rpx;
font-size: 24rpx;
border: none;
}
.price-separator {
font-size: 28rpx;
color: #999;
}
.filter-buttons {
display: flex;
justify-content: space-between;
padding: 20rpx 30rpx;
margin-top: 10rpx;
}
.reset-button {
width: 200rpx;
height: 70rpx;
border: 1rpx solid #7abbff;
border-radius: 50rpx;
background: #f0f7ff;
color: #409eff;
font-size: 28rpx;
}
.confirm-button {
width: 200rpx;
height: 70rpx;
background: #409eff;
border-radius: 50rpx;
color: white;
font-size: 28rpx;
border: none;
}
.MasterItem_Info_right_1 {
display: flex;
align-items: center;
font-size: 36rpx;
color: #222222;
justify-content: space-between;
}
.Medal {
width: 35rpx;
height: 40rpx;
margin-left: 6rpx;
margin-right: 28rpx;
}
.star {
width: 22rpx;
height: 22rpx;
margin-right: 6rpx;
}
.MasterItem_Info_right_1 span {
font-size: 26rpx;
color: #000000;
}
.MasterItem_Info_right_2 {
font-size: 26rpx;
color: #999999;
margin-top: 8rpx;
}
.MasterItem_Info_right_3 {
font-size: 26rpx;
display: flex;
color: #999999;
align-items: center;
margin-top: 16rpx;
}
.MasterItem_Info_right_3 span {
color: #FF370B;
}
.MasterItem_Info_right_4 {
display: flex;
align-items: center;
margin-top: 16rpx;
}
.tagItem {
width: 130rpx;
height: 40rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 100rpx 100rpx 100rpx 100rpx;
font-size: 22rpx;
color: #555555;
margin-right: 10rpx;
}
.tag1 {
background: rgba(255, 178, 23, 0.1);
}
.tag2 {
background: rgba(255, 81, 42, 0.1);
}
.tag3 {
background: rgba(175, 175, 175, 0.1);
}
.MasterItem_Info_right_5 {
font-size: 28rpx;
color: #999999;
display: flex;
align-items: center;
margin-top: 16rpx;
}
.MasterItem_Info_right_5 span {
color: #FF370B;
}
.MasterItem_Info_right_6 {
display: flex;
align-items: center;
margin-top: 20rpx;
}
.MasterItem_Info_right_6 image {
width: 110rpx;
height: 110rpx;
margin-right: 20rpx;
border-radius: 20rpx;
overflow: hidden;
}
.Btn {
font-size: 36rpx;
color: #FFFFFF;
width: 600rpx;
height: 90rpx;
background: linear-gradient(91deg, #FF7658 0%, #FF370B 100%);
border-radius: 100rpx 100rpx 100rpx 100rpx;
display: flex;
align-items: center;
justify-content: center;
position: fixed;
left: 50%;
bottom: 60rpx;
transform: translateX(-50%);
z-index: 3;
}
.local {
display: flex;
align-items: center;
}
.local span {
font-weight: 700;
}
.filterMore1 {
display: flex;
align-items: center;
overflow: hidden;
overflow-x: auto;
white-space: nowrap;
margin-top: 20rpx;
}
.filterMoreItem {
font-size: 28rpx;
color: #222222;
display: flex;
align-items: center;
background-color: #f6f6fa;
padding: 0 20rpx;
margin-right: 10rpx;
margin-right: 20rpx;
border-radius: 20rpx;
padding: 10rpx 20rpx;
}
.filterMore2_item {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20rpx;
color: #999;
}
.filterMore2_item_left {}
.active3 {
color: #ff702c !important;
}
.filterMore2_item_left2 {
color: #000;
}
.filterMore3Item {
font-size: 26rpx;
color: #555555;
width: 130rpx;
height: 50rpx;
background: #F6F7FB;
border-radius: 10rpx 10rpx 10rpx 10rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 40rpx;
margin-bottom: 18rpx;
}
.filterMore3Item:nth-child(4n) {
margin-right: 0;
}
.fullscreen-black-bg {
/* position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
background-color: rgba(0, 0, 0, .4);
box-sizing: border-box;
z-index: 9;
overflow: hidden; */
}
.FilterMore3 {
width: 100%;
background-color: #fff;
padding: 20rpx;
box-sizing: border-box;
display: flex;
flex-wrap: wrap;
}
.FilterMore {
width: 100%;
background-color: #fff;
padding: 20rpx;
box-sizing: border-box;
}
.dialogBox {
position: absolute;
background-color: rgba(0, 0, 0, .4);
z-index: 8;
width: 100%;
height: 100%;
}
.master_info_right_left {
display: flex;
align-items: center;
}
.master_info_right_right {
font-size: 28rpx;
color: #FF370B;
}

View File

@ -0,0 +1,433 @@
<template>
<view class="container2">
<div class="header">
<div class="Filter">
<div class="Filter_left">
<div
v-for="filter in filters"
:key="filter.id"
class="FilterItem"
:class="{ active: selectedFilter === filter.id }"
@click="
showDialog(filter.id);
selectedFilter = filter.id;
"
>
{{ filter.label }}
<image
:src="
selectedFilter === filter.id
? 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/search_up.png'
: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/homeServer_filterMore.png'
"
:class="{ iconStyle: selectedFilter === filter.id }"
></image>
</div>
</div>
<div class="Filter_right" @click="showDialog(6)">
<text :class="{ activeFilter: show6 }">筛选</text>
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/homeServer_filter.png"
></image>
</div>
</div>
<!-- 位置筛选 -->
<div class="FilterMore" v-if="show1">
<div class="local">距离 <span>上海公馆</span></div>
<div class="filterMore1">
<div class="filterMoreItem">附近</div>
<div class="filterMoreItem">500m</div>
<div class="filterMoreItem">1km</div>
<div class="filterMoreItem">3km</div>
<div class="filterMoreItem">5km</div>
<div class="filterMoreItem">10km</div>
</div>
</div>
<!-- 综合筛选 -->
<div class="FilterMore" v-if="show2">
<div class="filterMore2_item">
<div class="filterMore2_item_left">综合</div>
<div class="filterMore2_item_right">
<u-icon name="checkmark-circle-fill" color="#ff702c"></u-icon>
</div>
</div>
<div class="filterMore2_item">
<div class="filterMore2_item_left active3">从高到低</div>
<div class="filterMore2_item_right">
<u-icon name="checkmark-circle-fill" color="#ff702c"></u-icon>
</div>
</div>
<div class="filterMore2_item">
<div class="filterMore2_item_left">从低到高</div>
<div class="filterMore2_item_right">
<u-icon name="checkmark-circle-fill" color="#ff702c"></u-icon>
</div>
</div>
</div>
<!-- 排序筛选 -->
<div class="FilterMore" v-if="show3">
<div class="filterMore2_item">
<div class="filterMore2_item_left2">智能排序</div>
<div class="filterMore2_item_right">
<u-icon name="checkmark-circle-fill" color="#ff702c"></u-icon>
</div>
</div>
<div class="filterMore2_item">
<div class="filterMore2_item_left2 active3">距离优先</div>
<div class="filterMore2_item_right">
<u-icon name="checkmark-circle-fill" color="#ff702c"></u-icon>
</div>
</div>
<div class="filterMore2_item">
<div class="filterMore2_item_left2">好评优先</div>
<div class="filterMore2_item_right">
<u-icon name="checkmark-circle-fill" color="#ff702c"></u-icon>
</div>
</div>
<div class="filterMore2_item">
<div class="filterMore2_item_left2">销量优先</div>
<div class="filterMore2_item_right">
<u-icon name="checkmark-circle-fill" color="#ff702c"></u-icon>
</div>
</div>
</div>
<!-- 高级筛选面板 -->
<div class="FilterMore" v-if="show6">
<div class="filter-section">
<div class="filter-title">满意度</div>
<div class="filter-options">
<div
class="filter-option"
:class="{ active: selectedSatisfaction.includes('5+') }"
@click="toggleSatisfaction('5+')"
>
5分及以上
</div>
<div
class="filter-option"
:class="{ active: selectedSatisfaction.includes('4.9+') }"
@click="toggleSatisfaction('4.9+')"
>
4.9分及以上
</div>
<div
class="filter-option"
:class="{ active: selectedSatisfaction.includes('4.8+') }"
@click="toggleSatisfaction('4.8+')"
>
4.8分及以上
</div>
<div
class="filter-option"
:class="{ active: selectedSatisfaction.includes('4.7+') }"
@click="toggleSatisfaction('4.7+')"
>
4.7分及以上
</div>
<div
class="filter-option"
:class="{ active: selectedSatisfaction.includes('4.6+') }"
@click="toggleSatisfaction('4.6+')"
>
4.6分及以上
</div>
<div
class="filter-option"
:class="{ active: selectedSatisfaction.includes('4.5+') }"
@click="toggleSatisfaction('4.5+')"
>
4.5分及以上
</div>
</div>
</div>
<div class="filter-section">
<div class="filter-title">评论数量</div>
<div class="filter-options">
<div
class="filter-option"
:class="{ active: selectedReviewCount === '1-100' }"
@click="selectedReviewCount = '1-100'"
>
1-100
</div>
<div
class="filter-option"
:class="{ active: selectedReviewCount === '100-500' }"
@click="selectedReviewCount = '100-500'"
>
100-500
</div>
<div
class="filter-option"
:class="{ active: selectedReviewCount === '500+' }"
@click="selectedReviewCount = '500+'"
>
500以上
</div>
</div>
</div>
<div class="filter-section">
<div class="filter-title">价格范围</div>
<div class="price-range">
<input
type="number"
v-model="minPrice"
placeholder="最低价"
class="price-input"
@input="validatePriceRange"
/>
<span class="price-separator"></span>
<input
type="number"
v-model="maxPrice"
placeholder="最高价"
class="price-input"
@input="validatePriceRange"
/>
</div>
</div>
<div class="filter-section">
<div class="filter-title">类别</div>
<div class="filter-options">
<div
class="filter-option"
:class="{ active: selectedCategory === 'airConditioner' }"
@click="selectedCategory = 'airConditioner'"
>
空调维修
</div>
<div
class="filter-option"
:class="{ active: selectedCategory === 'refrigerator' }"
@click="selectedCategory = 'refrigerator'"
>
冰箱维修
</div>
</div>
</div>
<div class="filter-buttons">
<button class="reset-button" @click="resetFilters">重置</button>
<button class="confirm-button" @click="applyFilters">确定</button>
</div>
</div>
</div>
<div class="main">
<!-- 遮罩 -->
<div class="dialogBox" v-if="isShowDia"></div>
<div class="MasterList">
<div class="MasterItem" v-for="(item, index) in 5" :key="index">
<div class="MasterItem_right">
<div class="MasterItem_info">
<div class="MasterItem_Info_left">
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/home_icon12.png"
></image>
<div class="state state1">待服务</div>
<div class="state state2" v-if="false">休息中</div>
<div class="state state3" v-if="false">服务中</div>
</div>
<div class="MasterItem_Info_right">
<div class="MasterItem_Info_right_1">
<div class="master_info_right_left">
林师傅
<image
class="Medal"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/homeServer_Champion.png"
>
</image>
<image
class="Medal"
v-if="false"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/homeServer_RunnerUp.png"
>
</image>
<image
class="star"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start1.png"
></image>
<span>4.8</span>
</div>
<div class="master_info_right_right" @click="masterInfo">
查看资料
</div>
</div>
<div class="MasterItem_Info_right_2">
52 广东梅州人 5-10
</div>
<div class="MasterItem_Info_right_3">
<span>500+</span>预定 <span>100+</span>评价
</div>
<div class="MasterItem_Info_right_4">
<div class="tagItem tag1">积极主动</div>
<div class="tagItem tag2">技术精湛</div>
<div class="tagItem tag3">技术精湛</div>
</div>
<div class="MasterItem_Info_right_5">
价格范围 <span>500-800</span>
</div>
<div class="MasterItem_Info_right_6">
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_MsgImg1.png"
></image>
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_MsgImg1.png"
></image>
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_MsgImg1.png"
></image>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</view>
</template>
<style scoped>
.FilterItem.active {
color: red;
}
</style>
<script>
import {
request,
picUrl,
NavgateTo,
menuButtonInfo,
} from "../../../utils/index";
import { apiArr } from "../../../api/reservation";
export default {
data() {
return {
top: "",
localHeight: "",
selectedFilter: null,
//
filters: [
{ id: 1, label: "附近" },
{ id: 2, label: "综合" },
{ id: 3, label: "排序" },
],
show1: false,
show2: false,
show3: false,
show4: false,
show5: false,
show6: false,
isShowDia: false,
selectedSatisfaction: [],
selectedReviewCount: null,
selectedCategory: null,
minPrice: 0,
maxPrice: "",
};
},
watch: {
show1(val) {
if (!val) this.selectedFilter = null;
},
show2(val) {
if (!val) this.selectedFilter = null;
},
show3(val) {
if (!val) this.selectedFilter = null;
},
show6(val) {
if (!val) this.selectedFilter = null;
},
},
methods: {
masterInfo() {
NavgateTo("../masterInfo/index");
},
back() {
NavgateTo("1");
},
toggleSatisfaction(value) {
const index = this.selectedSatisfaction.indexOf(value);
if (index === -1) {
this.selectedSatisfaction.push(value);
} else {
this.selectedSatisfaction.splice(index, 1);
}
},
validatePriceRange() {
// 0-99999
if (this.minPrice < 0) this.minPrice = 0;
if (this.minPrice > 99999) this.minPrice = 99999;
// 0-99999
if (
this.maxPrice &&
(this.maxPrice < this.minPrice || this.maxPrice > 99999)
) {
this.maxPrice = Math.min(Math.max(this.maxPrice, this.minPrice), 99999);
}
},
resetFilters() {
this.selectedSatisfaction = [];
this.selectedReviewCount = null;
this.selectedCategory = null;
this.minPrice = 0;
this.maxPrice = "";
},
applyFilters() {
const filterData = {
satisfaction: this.selectedSatisfaction,
reviewCount: this.selectedReviewCount,
category: this.selectedCategory,
priceRange: {
min: this.minPrice || 0,
max: this.maxPrice || 99999,
},
};
console.log("筛选条件:", filterData);
this.show6 = false;
this.isShowDia = false;
},
showDialog(index) {
this[`show${index}`] = !this[`show${index}`];
this.logOtherButtons(index);
this.isShowDia = this[`show${index}`];
},
logOtherButtons(excludeIndex) {
for (let i = 1; i <= 6; i++) {
if (i !== excludeIndex) {
this[`show${i}`] = false;
}
}
},
},
onReady() {},
onLoad(options) {
const meun = menuButtonInfo();
this.top = meun.top;
this.localHeight = meun.height;
},
onShow() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
};
</script>
<style>
@import url("./index.css");
</style>

View File

@ -4,14 +4,15 @@ page {
} }
.container { .container {
display: flex; display: grid;
flex-direction: column; grid-template-rows: auto 1fr;
height: 100vh; height: 100vh;
overflow: hidden; overflow: hidden;
} }
.header { .header {
z-index: 9; z-index: 9;
overflow-x: auto;
} }
.main { .main {

View File

@ -62,6 +62,13 @@
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/homeServer_filterMore.png" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/homeServer_filterMore.png"
></image> ></image>
</div> </div>
<div class="FilterItem" @click="showDialog(6)">
地区
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/homeServer_filterMore.png"
></image>
</div>
</div> </div>
<div class="Filter_right"> <div class="Filter_right">
@ -147,12 +154,50 @@
</div> </div>
</div> </div>
<!-- 地区筛选 -->
<u-popup :show="show6" @close="close" v-if="show6">
<view>
<picker-view
indicator-style="height: 50px;"
style="width: 100%; height: 400rpx"
:value="id"
@change="bindChange"
>
<picker-view-column>
<view
v-for="(item, index) in provList"
:key="index"
style="line-height: 50px; text-align: center"
>{{ item.short_name }}</view
>
</picker-view-column>
<picker-view-column>
<view
v-for="(item, index) in defaultCity"
:key="index"
style="line-height: 50px; text-align: center"
>{{ item.short_name }}</view
>
</picker-view-column>
<picker-view-column>
<view
v-for="(item, index) in defaultDist"
:key="index"
style="line-height: 50px; text-align: center"
>{{ item.short_name }}</view
>
</picker-view-column>
</picker-view>
</view>
</u-popup>
<div class="main"> <div class="main">
<!-- 遮罩 --> <!-- 遮罩 -->
<div class="dialogBox" v-if="isShowDia"></div> <div class="dialogBox" v-if="isShowDia"></div>
<div class="MasterList"> <div class="MasterList">
<div class="MasterItem" v-for="(item, index) in 3" :key="index"> <div class="MasterItem" v-for="(item, index) in 5" :key="index">
<div class="MasterItem_right"> <div class="MasterItem_right">
<div class="MasterItem_info"> <div class="MasterItem_info">
<div class="MasterItem_Info_left"> <div class="MasterItem_Info_left">
@ -222,7 +267,7 @@
</div> </div>
</div> </div>
<div class="Btn">确定</div> <!-- <div class="Btn">确定</div> -->
</div> </div>
</view> </view>
</template> </template>
@ -235,6 +280,7 @@ import {
menuButtonInfo, menuButtonInfo,
} from "../../../utils/index"; } from "../../../utils/index";
import { apiArr } from "../../../api/reservation"; import { apiArr } from "../../../api/reservation";
import { apiArr as apiArr2 } from "../../../api/area";
export default { export default {
data() { data() {
@ -246,7 +292,19 @@ export default {
show3: false, show3: false,
show4: false, show4: false,
show5: false, show5: false,
show6: false,
isShowDia: false, isShowDia: false,
id: [0, 0, 0], //
provList: [], //
cityList: [], //
distList: [], //
defaultCity: [], //
defaultDist: [], // /
confirmProv: {}, //
confirmProv1: {},
confirmCity: {}, //
confirmDist: {}, // /
}; };
}, },
methods: { methods: {
@ -260,15 +318,97 @@ export default {
showDialog(index) { showDialog(index) {
this[`show${index}`] = !this[`show${index}`]; this[`show${index}`] = !this[`show${index}`];
this.logOtherButtons(index); this.logOtherButtons(index);
this.isShowDia = this[`show${index}`] this.isShowDia = this[`show${index}`];
},
close() {
this.show6 = false;
this.isShowDia = false;
}, },
logOtherButtons(excludeIndex) { logOtherButtons(excludeIndex) {
for (let i = 1; i <= 5; i++) { for (let i = 1; i <= 6; i++) {
if (i == 6) {
this.getProvList();
}
if (i !== excludeIndex) { if (i !== excludeIndex) {
this[`show${i}`] = false this[`show${i}`] = false;
} }
} }
}, },
/////////////////////////////////// ///////////////////////////////////////////
//
async getProvList() {
const res = await request(apiArr2.getArea, "POST", {}, { silent: false });
this.provList = res.rows;
this.confirmProv1 = res.rows[0];
//
this.getCityList(0);
//
},
//
async getCityList(sq = 0, x = 0) {
console.log("11swq", sq);
console.log("获取x", x);
if (!this.sf && this.cityList.length > 0) {
console.log("省份没变,查市跟区", this.cityList);
let newDist = this.cityList[sq];
console.log("新的市信息", newDist);
if (this.xsq.ad_code !== newDist.ad_code) {
console.log("新市区跟旧市区不一直");
this.xsq = newDist;
this.getDistList(this.confirmCity, x);
} else {
console.log("新市区跟旧市区一直");
this.confirmDist = this.defaultDist[x];
}
return;
}
const res = await request(
apiArr2.getArea,
"POST",
{ parent_ad_code: this.confirmProv1.ad_code },
{ silent: false }
);
this.cityList = res.rows;
let newDist;
this.defaultCity = res.rows;
this.confirmCity = res.rows[0]; //
this.getDistList(newDist, x);
},
// /
async getDistList(xsq, x) {
console.log("页面传递的x", x);
const res = await request(
apiArr2.getArea,
"POST",
{ parent_ad_code: xsq ? xsq.ad_code : this.confirmCity.ad_code },
{ silent: false }
);
this.distList = res.rows;
this.defaultDist = res.rows;
this.confirmDist = res.rows[0]; //
this.id = [0, 0, 0]; //
},
//
bindChange(e) {
console.log("[1231331], e", e);
const { value } = e.detail;
// // /
let newCrty = this.provList[value[0]];
console.log("新的省份信息", newCrty);
console.log("旧的省信息", this.confirmProv1);
if (newCrty.ad_code === this.confirmProv1.ad_code) {
console.log("省份信息没变");
this.sf = false;
} else {
this.sf = true;
}
console.log("this.cityListthis.cityList", this.cityList);
this.confirmProv1 = newCrty;
this.getCityList(value[1], value[2]);
},
}, },
onReady() {}, onReady() {},
@ -277,6 +417,7 @@ export default {
this.top = meun.top; this.top = meun.top;
// this.top = meun.height + meun.top; // this.top = meun.height + meun.top;
this.localHeight = meun.height; this.localHeight = meun.height;
this.getProvList(); //
}, },
onShow() {}, onShow() {},

View File

@ -0,0 +1,73 @@
.shop-list {
padding: 20rpx;
display: flex;
flex-direction: column;
height: 80vh;
overflow-y: auto;
}
.shop-card {
display: flex;
align-items: center;
padding: 20rpx;
border-bottom: 1rpx solid #f5f5f5;
}
.shop-img {
width: 160rpx;
height: 160rpx;
border-radius: 10rpx;
margin-right: 20rpx;
}
.shop-info {
flex: 1;
}
.shop-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
margin-bottom: 10rpx;
}
.shop-rating {
display: flex;
align-items: center;
font-size: 24rpx;
color: #999;
}
.rating-count {
margin-right: 15rpx;
align-items: center;
font-size: 24rpx;
color: #999;
margin: 20rpx 0;
}
.rating-stars {
color: #FFC107;
margin-right: 15rpx;
}
.distance {
margin-right: 15rpx;
}
.fans {
margin-right: 15rpx;
}
.enter-shop-btn {
width: 120rpx;
height: 60rpx;
background-color: #FF370B;
color: white;
border-radius: 30rpx;
border: none;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
}

View File

@ -0,0 +1,213 @@
<template>
<view class="shop-list">
<view class="shop-card" v-for="shop in shops" :key="shop.id">
<image :src="shop.image" class="shop-img"></image>
<view class="shop-info">
<view class="shop-title">{{ shop.title }}</view>
<view class="rating-count">{{ shop.ratingCount }}条评价</view>
<view class="shop-rating">
<view class="rating-stars">
<text class="star"></text>
<text class="rating-score">{{ shop.rating }}</text>
</view>
<view class="distance">
<text class="distance-value">{{ shop.distance }}km</text>
</view>
<view class="fans">
<text class="fans-count">{{ shop.fans }}个粉丝</text>
</view>
</view>
</view>
<button class="enter-shop-btn" @click="goShop">进店</button>
</view>
</view>
</template>
<script>
import {
request,
picUrl,
NavgateTo,
menuButtonInfo,
} from "../../../utils/index";
export default {
data() {
return {
shops: [
{
id: 1,
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
title: "专业到家服务",
ratingCount: 5,
rating: 4.8,
distance: 3.0,
fans: 120,
},
{
id: 2,
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
title: "专业到家服务",
ratingCount: 5,
rating: 4.8,
distance: 3.0,
fans: 120,
},
{
id: 3,
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
title: "专业到家服务",
ratingCount: 5,
rating: 4.8,
distance: 3.0,
fans: 120,
},
{
id: 4,
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
title: "专业到家服务",
ratingCount: 5,
rating: 4.8,
distance: 3.0,
fans: 120,
},
{
id: 5,
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
title: "专业到家服务",
ratingCount: 5,
rating: 4.8,
distance: 3.0,
fans: 120,
},
{
id: 6,
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
title: "专业到家服务",
ratingCount: 5,
rating: 4.8,
distance: 3.0,
fans: 120,
},
{
id: 7,
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
title: "专业到家服务",
ratingCount: 5,
rating: 4.8,
distance: 3.0,
fans: 120,
},
{
id: 7,
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
title: "专业到家服务",
ratingCount: 5,
rating: 4.8,
distance: 3.0,
fans: 120,
},
{
id: 7,
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
title: "专业到家服务",
ratingCount: 5,
rating: 4.8,
distance: 3.0,
fans: 120,
},
{
id: 7,
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
title: "专业到家服务",
ratingCount: 5,
rating: 4.8,
distance: 3.0,
fans: 120,
},
{
id: 7,
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
title: "专业到家服务",
ratingCount: 5,
rating: 4.8,
distance: 3.0,
fans: 120,
},
{
id: 7,
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
title: "专业到家服务",
ratingCount: 5,
rating: 4.8,
distance: 3.0,
fans: 120,
},
{
id: 7,
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
title: "专业到家服务",
ratingCount: 5,
rating: 4.8,
distance: 3.0,
fans: 120,
},
{
id: 7,
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
title: "专业到家服务",
ratingCount: 5,
rating: 4.8,
distance: 3.0,
fans: 120,
},
{
id: 7,
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
title: "专业到家服务",
ratingCount: 5,
rating: 4.8,
distance: 3.0,
fans: 120,
},
{
id: 7,
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
title: "专业到家服务",
ratingCount: 5,
rating: 4.8,
distance: 3.0,
fans: 120,
},
{
id: 7,
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
title: "专业到家服务",
ratingCount: 5,
rating: 4.8,
distance: 3.0,
fans: 120,
},
{
id: 7,
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
title: "专业到家服务",
ratingCount: 5,
rating: 4.8,
distance: 3.0,
fans: 120,
},
],
};
},
methods: {
goShop() {
NavgateTo("../vendor/index");
},
},
};
</script>
<style>
@import url("./index.css");
</style>

View File

@ -10,6 +10,29 @@
height: 307rpx; height: 307rpx;
} }
.cirList {
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto;
margin-top: 10rpx;
padding-bottom: 20rpx;
}
.cir {
width: 6rpx;
height: 6rpx;
border-radius: 50%;
background-color: #333;
margin-right: 6rpx;
}
.active {
width: 12rpx;
height: 6rpx;
border-radius: 100rpx;
}
.dotList { .dotList {
display: flex; display: flex;
align-items: center; align-items: center;
@ -92,7 +115,7 @@
} }
.serverListTit { .serverListTit {
font-size: 63rpx; font-size: 32rpx;
color: #222222; color: #222222;
font-weight: 600; font-weight: 600;
} }
@ -119,6 +142,7 @@
} }
.msg_tit { .msg_tit {
display: flex;
font-size: 30rpx; font-size: 30rpx;
color: #222222; color: #222222;
margin-bottom: 20rpx; margin-bottom: 20rpx;
@ -145,15 +169,7 @@
justify-content: center; justify-content: center;
font-size: 30rpx; font-size: 30rpx;
color: #FFFFFF; color: #FFFFFF;
} margin-left: 200rpx;
.serverItem_right_btn .more {
width: 26rpx;
height: 26rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
} }
.range { .range {
@ -187,3 +203,130 @@
min-width: 0; min-width: 0;
/* 防止 flex 子项溢出 */ /* 防止 flex 子项溢出 */
} }
.msg_meta {
display: flex;
align-items: center;
margin-bottom: 12rpx;
font-size: 24rpx;
color: #666666;
}
.msg_meta .rating,
.msg_meta .distance,
.msg_meta .served {
display: flex;
align-items: center;
margin-right: 20rpx;
}
.infoImage {
width: 25rpx;
height: 25rpx;
margin-right: 5rpx;
}
.tabs {
display: flex;
align-items: center;
background: #ffffff;
height: 100rpx;
padding: 0 20rpx;
box-sizing: border-box;
display: flex;
overflow-x: auto;
white-space: nowrap;
}
.tabItem {
font-size: 25rpx;
color: #222222;
margin-right: 60rpx;
height: 42rpx;
}
.active2 {
font-size: 25rpx;
font-weight: 700;
position: relative;
}
.active2::after {
content: '';
background: url(https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_active.png) no-repeat;
background-size: 100% 100%;
width: 52rpx;
height: 22rpx;
position: absolute;
left: 50%;
bottom: -16rpx;
transform: translateX(-50%);
}
.FilterMore {
width: 100%;
height: 220rpx;
background-color: #fff;
padding: 20rpx;
box-sizing: border-box;
/* 添加阴影 */
box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.1);
}
.filter-section {
padding: 20rpx 30rpx;
border-bottom: 1rpx solid #f5f5f5;
}
.filter-title {
font-size: 28rpx;
color: #333;
margin-bottom: 20rpx;
font-weight: bold;
}
.price-range {
display: flex;
align-items: center;
gap: 20rpx;
margin-top: 10rpx;
}
.price-input {
flex: 1;
height: 60rpx;
background: #f5f5f5;
border-radius: 10rpx;
padding: 0 20rpx;
font-size: 24rpx;
border: none;
}
.filter-buttons {
display: flex;
justify-content: space-between;
padding: 20rpx 30rpx;
margin-bottom: 10rpx;
}
.reset-button {
width: 150rpx;
height: 50rpx;
border: 1rpx solid #7abbff;
border-radius: 50rpx;
background: #f0f7ff;
color: #409eff;
font-size: 26rpx;
line-height: 50rpx;
}
.confirm-button {
width: 150rpx;
height: 50rpx;
background: #409eff;
border-radius: 50rpx;
color: white;
font-size: 26rpx;
border: none;
line-height: 50rpx;
}

View File

@ -1,123 +1,247 @@
<template> <template>
<view class="container"> <view class="container">
<div class="banner"> <div class="banner">
<swiper> <swiper @animationfinish="swipers" autoplay circular>
<swiper-item> <swiper-item
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/homeServer_banner.png"></image> v-for="(item, index) in bannerList"
:key="index"
@click="lookImage(item, index)"
>
<image :src="item.pic_src" mode="aspectFill" />
</swiper-item> </swiper-item>
</swiper> </swiper>
<div class="dotList">
<div class="dot active"></div> <view class="cirList">
<div class="dot"></div> <view
<div class="dot"></div> :class="['cir', currentIdx == index ? 'active' : '']"
</div> v-for="(item, index) in bannerList"
:key="index"
>
</view>
</view>
</div> </div>
<div class="line"></div> <div class="line"></div>
<div class="serverTitBox"> <div class="serverTitBox">
<div class="serverTit"> <div class="serverTit">
<div class="serverTit_left"> <div class="serverTit_left">
<div class="tit">空调清洗</div> <div class="tit">空调清洗</div>
<div class="msg"> <div class="msg">平台保障</div>
平台保障
</div>
</div> </div>
<div class="serverTit_right">已预约100+</div> <div class="serverTit_right">已预约100+</div>
</div> </div>
<div class="serverCon">专业保洁团队全屋深度清洁去除顽固污渍还您清新居所还您清新居所</div> <div class="serverCon">
专业保洁团队全屋深度清洁去除顽固污渍还您清新居所还您清新居所
</div>
</div> </div>
<div class="line"></div> <div class="line"></div>
<div class="priceSelect">
<div class="tit">价格范围</div>
<div class="range">
<div class="minPrice">10</div>
<slider-range style="flex: 1;" :value="rangeValue" :min="rangeMin" :max="rangeMax" :step="5" :bar-height="3"
:block-size="26" background-color="#EEEEF6" active-color="#FF6B00" :format="format"
:decorationVisible="true" @change="handleRangeChange"></slider-range>
<div class="maxPrice">39</div>
</div>
</div>
<div class="serverList"> <div class="serverList">
<div class="serverListTit">匹配的服务商(3)</div> <div class="serverListTit">找到8个匹配服务商</div>
<view class="tabs">
<view
v-for="(item, index) in categoryList"
:key="index"
:class="['tabItem', selectedTab === index ? 'active2' : '']"
@click="selectTab(index, item)"
>
{{ item.category_name }}
</view>
</view>
<div class="FilterMore" v-if="showPrice">
<div class="filter-section">
<div class="price-range">
<input
type="number"
v-model="minPrice"
placeholder="最低价"
class="price-input"
@input="validatePriceRange"
/>
<span class="price-separator"></span>
<input
type="number"
v-model="maxPrice"
placeholder="最高价"
class="price-input"
@input="validatePriceRange"
/>
</div>
</div>
<div class="filter-buttons">
<button class="reset-button" @click="resetFilters">重置</button>
<button class="confirm-button" @click="applyFilters">确定</button>
</div>
</div>
<div class="serverItem" @click="selectVendor"> <div class="serverItem" @click="selectVendor">
<div class="serverItem_left"> <div class="serverItem_left">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/test.png"></image> <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png"></image>
</div> </div>
<div class="serverItem_right"> <div class="serverItem_right">
<div class="serverItem_right_msg"> <div class="serverItem_right_msg">
<div class="msg_tit">安心家政</div> <div class="msg_tit">
<view>安心家政</view>
<div class="serverItem_right_btn" @click="selectMaster">
选择服务
</div>
</div>
<div class="msg_meta">
<span class="rating">
<image
class="infoImage"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/serverInfo_xing.png"
/>
4.8
</span>
<span class="distance">
<image
class="infoImage"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/serverInfo_weizhi.png"
/>3.3km</span
>
<span class="served">
<image
class="infoImage"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/serverInfo_fuwu.png"
/>12226</span
>
</div>
<div class="msg_price">价格范围 <span>80-150</span></div> <div class="msg_price">价格范围 <span>80-150</span></div>
</div> </div>
<div class="serverItem_right_btn" @click="selectMaster">
选择师傅
<div class="more">
<u-icon name="arrow-right" color="#fff" size="28"></u-icon>
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
</view> </view>
</template> </template>
<script> <script>
import { request, picUrl, NavgateTo, menuButtonInfo } from '../../../utils/index'; import {
import { apiArr } from '../../../api/reservation'; request,
import SliderRange from '@/components/primewind-sliderrange/components/primewind-sliderrange/index.vue' picUrl,
NavgateTo,
menuButtonInfo,
} from "../../../utils/index";
import { apiArr } from "../../../api/reservation";
import SliderRange from "@/components/primewind-sliderrange/components/primewind-sliderrange/index.vue";
export default { export default {
components: { components: {
// //
SliderRange SliderRange,
}, },
data() { data() {
return { return {
bannerList: [
{
pic_src: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
},
{
pic_src:
"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/homeServer_banner.png",
},
{
pic_src: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
},
],
currentIdx: 0,
top: "", top: "",
localHeight: "", localHeight: "",
rangeMin: 5, rangeMin: 5,
rangeMax: 200, rangeMax: 200,
rangeValue: [10, 50] rangeValue: [10, 50],
}
selectedTab: 0,
categoryList: [
{ category_name: "推荐" },
{ category_name: "评分优先" },
{ category_name: "距离最近" },
{ category_name: "价格最低" },
{ category_name: "服务最多" },
{ category_name: "价格范围" },
],
showPrice: false,
minPrice: "",
maxPrice: "",
};
}, },
methods: { methods: {
swipers(e) {
this.currentIdx = e.detail.current;
},
format(val) { format(val) {
return val + '%' return val + "%";
}, },
handleRangeChange(e) { handleRangeChange(e) {
this.rangeValue = e this.rangeValue = e;
}, },
selectVendor(){ selectVendor() {
NavgateTo("../vendor/index") // NavgateTo("../vendor/index");
NavgateTo("../searchInfo/index");
}, },
selectMaster(){ selectMaster() {
NavgateTo("../chooseMaster/index") NavgateTo("../searchInfo/index");
}, },
lookImage(item, index) {
// URL
const urls = this.bannerList.map((item) => item.pic_src);
// UniAppAPI
uni.previewImage({
current: index,
urls: urls,
loop: true,
});
},
selectTab(index, item) {
this.selectedTab = index;
if (item.category_name === "价格范围") {
this.showPrice = !this.showPrice;
} else {
this.showPrice = false;
}
}, },
onReady() {
validatePriceRange() {
// 0-99999
if (this.minPrice < 0) this.minPrice = 0;
if (this.minPrice > 99999) this.minPrice = 99999;
// 0-99999
if (
this.maxPrice &&
(this.maxPrice < this.minPrice || this.maxPrice > 99999)
) {
this.maxPrice = Math.min(Math.max(this.maxPrice, this.minPrice), 99999);
}
}, },
resetFilters() {
this.minPrice = "";
this.maxPrice = "";
},
applyFilters() {
const filterData = {
priceRange: {
min: this.minPrice || 0,
max: this.maxPrice || 99999,
},
};
console.log("筛选条件:", filterData);
this.showPrice = false;
},
},
onReady() {},
onLoad(options) { onLoad(options) {
const meun = menuButtonInfo(); const meun = menuButtonInfo();
this.top = meun.top; this.top = meun.top;
this.localHeight = meun.height; this.localHeight = meun.height;
}, },
onShow() { onShow() {},
},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom() {},
};
},
}
</script> </script>
<style> <style>

View File

@ -56,6 +56,26 @@ image {
margin-top: 30rpx; margin-top: 30rpx;
} }
.Msg_con_img {
display: flex;
flex-wrap: wrap;
width: 100%;
margin-top: 15rpx;
gap: 15rpx;
}
.Msg_con_img image {
width: calc(33.33% - 11rpx);
height: 225rpx;
flex-shrink: 0;
}
.Msg_con_video{
width: calc(33.33% - 11rpx);
height: 225rpx;
flex-shrink: 0;
}
.Msg_iconList_leftIcon { .Msg_iconList_leftIcon {
display: flex; display: flex;
align-items: center; align-items: center;
@ -117,9 +137,11 @@ image {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.comment_con input{
.comment_con input {
flex: 1; flex: 1;
} }
.comment_con image { .comment_con image {
width: 28.3rpx; width: 28.3rpx;
height: 28rpx; height: 28rpx;

View File

@ -3,13 +3,14 @@
<div class="Msg"> <div class="Msg">
<div class="Msg_Tit"> <div class="Msg_Tit">
<div class="Msg_Tit_left"> <div class="Msg_Tit_left">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/user_ava.png" v-if="!info.user.avatar" mode="aspectFill"> <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/user_ava.png"
v-if="!info.user.avatar" mode="aspectFill">
</image> </image>
<image :src="picUrl + info.user.avatar" v-if="info.user.avatar" mode="aspectFill"></image> <image :src="picUrl + info.user.avatar" v-if="info.user.avatar" mode="aspectFill"></image>
{{ info.user.nick_name }} {{ info.user.nick_name }}
</div> </div>
<div class="Msg_Tit_right"> <div class="Msg_Tit_right">
<image v-for="indez in 5" <image v-for="(item, index) in 5" :key="index"
:src="indez < info.satisfaction ? 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start1.png' : 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start2.png'" :src="indez < info.satisfaction ? 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start1.png' : 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start2.png'"
mode="aspectFill"></image> mode="aspectFill"></image>
</div> </div>
@ -17,35 +18,46 @@
<div class="Msg_con"> <div class="Msg_con">
{{ info.comment }} {{ info.comment }}
<div class="Msg_con_img" v-if="info.image_url">
<image v-for="(img, index) in info.image_url.split(',')" :key="index" :src="picUrl + img"
mode="aspectFill"></image>
<video class="Msg_con_video" v-if="info.video_url" :src="picUrl + info.video_url" controls></video>
</div>
</div> </div>
<div class="Msg_iconList"> <div class="Msg_iconList">
<div class="Msg_iconList_left"> <div class="Msg_iconList_left">
<div class="Msg_iconList_leftIcon"> <div class="Msg_iconList_leftIcon">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_review.png" mode="widthFix"></image> <image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_review.png"
mode="widthFix"></image>
{{ info.merchant_evaluation_reply_list ? info.merchant_evaluation_reply_list.length : 0 }} {{ info.merchant_evaluation_reply_list ? info.merchant_evaluation_reply_list.length : 0 }}
</div> </div>
<div class="Msg_iconList_leftIcon"> <div class="Msg_iconList_leftIcon">
<image v-if="info.is_like == 2" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_likeIcon.png" mode="widthFix" <image v-if="info.is_like == 2"
@click="like(info)"></image> src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_likeIcon.png"
<image v-if="info.is_like == 1" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_likeIcon2.png" mode="widthFix" @click="like(info)"></image>
<image v-if="info.is_like == 1"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_likeIcon2.png"
mode="widthFix" @click="unlike(info)"></image> mode="widthFix" @click="unlike(info)"></image>
{{ info.merchant_evaluation_like_list ? info.merchant_evaluation_like_list.length : 0 }} {{ info.merchant_evaluation_like_list ? info.merchant_evaluation_like_list.length : 0 }}
</div> </div>
</div> </div>
<div class="Msg_iconList_right"> <div class="Msg_iconList_right">
<div class="Msg_iconList_leftIcon" @click="deletes" v-if="isDelte"> <div class="Msg_iconList_leftIcon" @click="deletes" v-if="isDelte">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_del.png" mode="widthFix"></image> <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_del.png"
mode="widthFix"></image>
</div> </div>
</div> </div>
</div> </div>
<!-- 回复列表 --> <!-- 回复列表 -->
<div class="reply" v-for="item in replyList"> <div class="reply" v-for="(item, index) in replyList" :key="index">
<div class="reply_tit"> <div class="reply_tit">
<div class="reply_tit_left"> <div class="reply_tit_left">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/user_ava.png" v-if="!item.user.avatar" mode="aspectFill"> <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/user_ava.png"
v-if="!item.user.avatar" mode="aspectFill">
</image> </image>
<image :src="picUrl + item.user.avatar" v-if="item.user.avatar" mode="aspectFill"></image> <image :src="picUrl + item.user.avatar" v-if="item.user.avatar" mode="aspectFill"></image>
{{ item.user.nick_name }} {{ item.user.nick_name }}
@ -58,7 +70,8 @@
<div class="comment"> <div class="comment">
<div class="comment_con"> <div class="comment_con">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_send.png" mode="aspectFill"></image> <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_send.png"
mode="aspectFill"></image>
<input type="text" v-model="reply_content" placeholder="说点什么"> <input type="text" v-model="reply_content" placeholder="说点什么">
<button id="send" @click="sendComment">发送</button> <button id="send" @click="sendComment">发送</button>
@ -116,6 +129,14 @@ export default {
sendComment() { sendComment() {
// //
console.log('发送评论'); console.log('发送评论');
if (!this.reply_content) {
uni.showToast({
title: "请输入评论内容",
icon: "none",
duration: 2000
})
return
}
let that = this let that = this
request(apiArr.createUserReply, "POST", { request(apiArr.createUserReply, "POST", {
evaluation_id: that.info.id, evaluation_id: that.info.id,
@ -167,7 +188,9 @@ export default {
request(apiArr.userCommentInfo, "POST", { request(apiArr.userCommentInfo, "POST", {
id: that.id id: that.id
}).then(res => { }).then(res => {
console.log(res); res.merchant_evaluation_reply_list = res.merchant_evaluation_reply_list.filter((item) => {
return item.status == 2;
});
that.info = res that.info = res
if (res.user_id == uni.getStorageSync('userId')) { if (res.user_id == uni.getStorageSync('userId')) {
that.isDelte = true that.isDelte = true
@ -223,6 +246,9 @@ export default {
that.flag = false that.flag = false
} }
that.page_num++ that.page_num++
res.rows = res.rows.filter((item) => {
return item.status == 2;
});
that.replyList = that.replyList.concat(res.rows) that.replyList = that.replyList.concat(res.rows)
}) })
}, },

View File

@ -179,6 +179,26 @@ page {
margin-top: 30rpx; margin-top: 30rpx;
} }
.Msg_con_img {
display: flex;
flex-wrap: wrap;
width: 100%;
margin-top: 15rpx;
gap: 15rpx;
}
.Msg_con_img image {
width: calc(33.33% - 11rpx);
height: 225rpx;
flex-shrink: 0;
}
.Msg_con_video{
width: calc(33.33% - 11rpx);
height: 225rpx;
flex-shrink: 0;
}
.Msg_iconList_leftIcon { .Msg_iconList_leftIcon {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -12,7 +12,7 @@
<!-- <u-icon name="star-fill" color="#FFB84D" /> --> <!-- <u-icon name="star-fill" color="#FFB84D" /> -->
<div class="startList"> <div class="startList">
<image v-for="index in 5" <image v-for="index in 5" :key="index"
:src="index < item.rating ? 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start1.png' : 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start2.png'" :src="index < item.rating ? 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start1.png' : 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start2.png'"
mode="aspectFill"></image> mode="aspectFill"></image>
</div> </div>
@ -42,16 +42,17 @@
</view> </view>
</view> </view>
<view class="white_container detail" v-for="item in commentList"> <view class="white_container detail" v-for="(item, index) in commentList" :key="index">
<div class="Msg"> <div class="Msg">
<div class="Msg_Tit"> <div class="Msg_Tit">
<div class="Msg_Tit_left"> <div class="Msg_Tit_left">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/user_ava.png" v-if="!item.user.avatar" mode="aspectFill"></image> <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/user_ava.png"
v-if="!item.user.avatar" mode="aspectFill"></image>
<image :src="picUrl + item.user.avatar" v-if="item.user.avatar" mode="aspectFill"></image> <image :src="picUrl + item.user.avatar" v-if="item.user.avatar" mode="aspectFill"></image>
{{ item.user.nick_name }} {{ item.user.nick_name }}
</div> </div>
<div class="Msg_Tit_right"> <div class="Msg_Tit_right">
<image v-for="indez in 5" <image v-for="indez in 5" :key="indez"
:src="indez < item.satisfaction ? 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start1.png' : 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start2.png'" :src="indez < item.satisfaction ? 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start1.png' : 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start2.png'"
mode="aspectFill"></image> mode="aspectFill"></image>
</div> </div>
@ -59,20 +60,28 @@
<div class="Msg_con"> <div class="Msg_con">
{{ item.comment }} {{ item.comment }}
<div class="Msg_con_img" v-if="item.image_url">
<image v-for="(img, index) in item.image_url.split(',')" :key="index" :src="picUrl + img" mode="aspectFill">
</image>
<video class="Msg_con_video" v-if="item.video_url" :src="picUrl + item.video_url" controls></video>
</div>
</div> </div>
<div class="Msg_iconList"> <div class="Msg_iconList">
<div class="Msg_iconList_left"> <div class="Msg_iconList_left">
<div class="Msg_iconList_leftIcon"> <div class="Msg_iconList_leftIcon">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_review.png" mode="widthFix"></image> <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_review.png"
mode="widthFix"></image>
{{ item.merchant_evaluation_reply_list ? item.merchant_evaluation_reply_list.length : 0 }} {{ item.merchant_evaluation_reply_list ? item.merchant_evaluation_reply_list.length : 0 }}
</div> </div>
<div class="Msg_iconList_leftIcon"> <div class="Msg_iconList_leftIcon">
<image v-if="item.is_like == 2" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_likeIcon.png" mode="widthFix" <image v-if="item.is_like == 2"
@click="like(item)"></image> src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_likeIcon.png"
<image v-if="item.is_like == 1" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_likeIcon2.png" mode="widthFix" mode="widthFix" @click="like(item)"></image>
@click="unlike(item)"></image> <image v-if="item.is_like == 1"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_likeIcon2.png"
mode="widthFix" @click="unlike(item)"></image>
{{ item.merchant_evaluation_like_list ? item.merchant_evaluation_like_list.length : 0 }} {{ item.merchant_evaluation_like_list ? item.merchant_evaluation_like_list.length : 0 }}
</div> </div>
</div> </div>
@ -89,15 +98,18 @@
<view>导航</view> <view>导航</view>
</view> </view>
<view class="left_label" @click="handlePhoneClick"> <view class="left_label" @click="handlePhoneClick">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/localLife_detail_Frame.png" mode="" /> <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/localLife_detail_Frame.png"
mode="" />
<view>电话</view> <view>电话</view>
</view> </view>
<view class="left_label" @click="handleDiscussClick"> <view class="left_label" @click="handleDiscussClick">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/localLife_shopList_Group_1334.png" mode="" /> <image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/localLife_shopList_Group_1334.png"
mode="" />
<view>点评</view> <view>点评</view>
</view> </view>
</view> </view>
<text class="btn" @click="handleQuickPayClick">快捷买单</text> <text v-if="isShow" class="btn" @click="handleQuickPayClick">快捷买单</text>
</view> </view>
</view> </view>
</template> </template>
@ -120,16 +132,18 @@ export default {
page_size: 10, page_size: 10,
commentList: [], commentList: [],
flag: false, flag: false,
isShow: false,
}; };
}, },
onLoad(options) { onLoad(options) {
this.info = uni.getStorageSync("merchantInfo") this.info = uni.getStorageSync("merchantInfo")
}, },
onShow(){ onShow() {
this.page_num = 1 this.page_num = 1
this.flag = false this.flag = false
this.commentList = [] this.commentList = []
this.getCommentList() this.getCommentList()
this.getMerchantInfo()
}, },
onReachBottom() { onReachBottom() {
if (this.flag) { if (this.flag) {
@ -154,7 +168,26 @@ export default {
} else { } else {
this.flag = false; this.flag = false;
} }
this.commentList = this.commentList.concat(res.rows); this.isShow = res.rows[0].merchant_info.quick_purchase_enabled == 1
const list = res.rows.filter((item) => {
return item.status == 2;
});
list.forEach(item => {
item.merchant_evaluation_reply_list =item.merchant_evaluation_reply_list.filter((item) => {
return item.status == 2;
})
})
this.commentList = this.commentList.concat(list);
})
},
getMerchantInfo() {
request(apiArr.getMerchantInfo, "POST", {
id: uni.getStorageSync("merchantInfo").id,
}).then(res => {
this.isShow = res.quick_purchase_enabled == 1
}) })
}, },
@ -194,15 +227,15 @@ export default {
evaluation_id: e.id, evaluation_id: e.id,
}).then(res => { }).then(res => {
console.log(e); console.log(e);
if(e.merchant_evaluation_like_list){ if (e.merchant_evaluation_like_list) {
e.merchant_evaluation_like_list.push({}) e.merchant_evaluation_like_list.push({})
}else{ } else {
e.merchant_evaluation_like_list = [] e.merchant_evaluation_like_list = []
e.merchant_evaluation_like_list.push({}) e.merchant_evaluation_like_list.push({})
} }
e.is_like = 1 e.is_like = 1
uni.showToast({ uni.showToast({
icon:"none", icon: "none",
title: '点赞成功', title: '点赞成功',
duration: 2000 duration: 2000
}); });
@ -216,13 +249,13 @@ export default {
e.merchant_evaluation_like_list.pop() e.merchant_evaluation_like_list.pop()
uni.showToast({ uni.showToast({
title: '取消成功', title: '取消成功',
icon:"none", icon: "none",
duration: 2000 duration: 2000
}); });
}) })
}, },
commentDesc(e){ commentDesc(e) {
NavgateTo(`../UserComment/index?id=${e.id}`) NavgateTo(`../UserComment/index?id=${e.id}`)
}, },
}, },

View File

@ -1,5 +1,5 @@
page { page {
background-color: #f6f7fb; background-color: #fff;
} }
.container { .container {

View File

@ -2,6 +2,10 @@ page {
background-color: #fff; background-color: #fff;
} }
.container{
/* padding-top: 100rpx; */
}
.local { .local {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -1,25 +1,34 @@
<template> <template>
<div class="container"> <div class="container">
<div class="local"> <div class="local">
<image id="local" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_localIcon.png" mode="aspectFill"></image> <image
{{address}} id="local"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_localIcon.png"
mode="aspectFill"
></image>
{{ address }}
<u-icon name="arrow-down" color="#999999" size="28"></u-icon> <u-icon name="arrow-down" color="#999999" size="28"></u-icon>
</div> </div>
<div class="search"> <div class="search">
<div class="searchBox"> <div class="searchBox">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png" mode="aspectFill"></image> <image
<input type="text" placeholder="请输入您想搜索的内容"> src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
mode="aspectFill"
></image>
<input type="text" placeholder="请输入您想搜索的内容" />
</div> </div>
</div> </div>
<div class="swiperBox"> <div class="swiperBox">
<swiper class="swiper" @change="swiperChange" :current="currentIndex"> <swiper class="swiper" @change="swiperChange" :current="currentIndex">
<swiper-item v-for="(page, pageIndex) in swiperList" :key="pageIndex"> <swiper-item v-for="(page, pageIndex) in swiperList" :key="pageIndex">
<div class="navList"> <div class="navList">
<div class="navItem" v-for="(item, itemIndex) in page" :key="itemIndex"> <div
class="navItem"
v-for="(item, itemIndex) in page"
:key="itemIndex"
>
<image :src="picUrl + item.cate_image" mode="widthFix"></image> <image :src="picUrl + item.cate_image" mode="widthFix"></image>
<div class="navName">{{ item.cate_name }}</div> <div class="navName">{{ item.cate_name }}</div>
</div> </div>
@ -28,7 +37,11 @@
</swiper> </swiper>
<div class="dot"> <div class="dot">
<div class="dotItem" v-for="(page, index) in swiperList" :class="currentIndex == index ? 'actives' : ''"></div> <div
class="dotItem"
v-for="(page, index) in swiperList" :key="index"
:class="currentIndex == index ? 'actives' : ''"
></div>
</div> </div>
</div> </div>
@ -46,34 +59,61 @@
</scroll-view> --> </scroll-view> -->
<div class="merchantList"> <div class="merchantList">
<div class="merchantItem" v-for="item in merchatList" :key="item.id" @click="Info(item)"> <div
class="merchantItem"
v-for="item in merchatList"
:key="item.id"
@click="Info(item)"
>
<div class="merchantItem_left"> <div class="merchantItem_left">
<image :src="picUrl + item.bigImg[0]" mode="aspectFill"></image> <image :src="picUrl + item.bigImg[0]" mode="aspectFill"></image>
</div> </div>
<div class="merchantItem_right"> <div class="merchantItem_right">
<div class="merchantItem_right_tit"> <div class="merchantItem_right_tit">
<div class="merchantItem_right_tit_left"> <div class="merchantItem_right_tit_left">
{{item.merchant_name}} {{ item.merchant_name }}
</div> </div>
<div class="merchantItem_right_tit_right"> <div class="merchantItem_right_tit_right">
{{item.distances}} {{ item.distances }}
</div> </div>
</div> </div>
<div class="merchantItem_right_con"> <div class="merchantItem_right_con">
<div class="merchantItem_right_con_left"> <div class="merchantItem_right_con_left">
<div class="startList"> <div class="startList">
<image v-for="index in 5" :src="index < item.rating ? 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start1.png' : 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start2.png'" mode="aspectFill"></image> <image
v-for="index in 5"
:key="index"
:src="
index < item.rating
? 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start1.png'
: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start2.png'
"
mode="aspectFill"
></image>
</div> </div>
<div class="merchangtItem_tag" v-if="item.refund_property_fee_ratio">买单反物业费</div> <div
<div class="merchangtItem_tag" v-if="item.refund_user_points_ratio">买单反积分</div> class="merchangtItem_tag"
v-if="item.refund_property_fee_ratio"
>
买单返物业费
</div> </div>
<div class="merchantItem_right_con_right"> <div
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_review.png" mode="aspectFill"></image> class="merchangtItem_tag"
v-if="item.refund_user_points_ratio"
>
买单返积分
</div>
</div>
<div 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"
mode="aspectFill"
></image>
点评 点评
</div> </div>
</div> </div>
<div class="merchantItem_right_add"> <div class="merchantItem_right_add">
{{item.comAddress}} {{ item.comAddress }}
</div> </div>
</div> </div>
</div> </div>
@ -81,20 +121,24 @@
<div class="btnList"> <div class="btnList">
<div class="btn_left"> <div class="btn_left">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_serverIcon.png" mode="aspectFill"></image> <image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_serverIcon.png"
mode="aspectFill"
></image>
到店服务券 到店服务券
</div> </div>
<div class="line"></div> <div class="line"></div>
<div class="btn_right"> <div class="btn_right">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/lcoal_payIcon.png" mode="aspectFill"></image> <image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/lcoal_payIcon.png"
mode="aspectFill"
></image>
快捷支付记录 快捷支付记录
</div> </div>
</div> </div>
<div class="btnList_after"></div> <div class="btnList_after"></div>
<!-- <nav-footer :current="2" /> -->
</div> </div>
</template> </template>
@ -105,11 +149,10 @@ import {
uniqueByField, uniqueByField,
menuButtonInfo, menuButtonInfo,
calculateDistance, calculateDistance,
NavgateTo NavgateTo,
} from '../../../utils'; } from "../../../utils";
import { apiArr } from '../../../api/v2local';
import { apiArr } from "../../../api/v2local";
export default { export default {
data() { data() {
@ -117,16 +160,15 @@ export default {
picUrl, picUrl,
top: "", top: "",
localHeight: "", localHeight: "",
swiperList: [ swiperList: [],
],
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: [],
} };
}, },
onLoad(options) { onLoad(options) {
const meun = menuButtonInfo(); const meun = menuButtonInfo();
@ -135,12 +177,12 @@ export default {
this.localHeight = meun.height; this.localHeight = meun.height;
this.getCateList(); this.getCateList();
this.getMechantList(); this.getMechantList();
this.address = uni.getStorageSync("location").address this.address = uni.getStorageSync("location").address;
console.log(this.address) console.log(this.address);
}, },
onReachBottom() { onReachBottom() {
if(this.flag){ if (this.flag) {
this.getMechantList(); this.getMechantList();
} }
}, },
@ -155,8 +197,9 @@ export default {
}, },
// //
async getCateList() { async getCateList() {
let that = this let that = this;
await request(apiArr.getMerChantCateList, "POST").then(res => { await request(apiArr.getMerChantCateList, "POST").then((res) => {
res.rows = res.rows.filter((item) => item.is_visible == 1)
console.log(res); console.log(res);
// 10 // 10
const chunkSize = 10; const chunkSize = 10;
@ -164,54 +207,67 @@ export default {
for (let i = 0; i < res.rows.length; i += chunkSize) { for (let i = 0; i < res.rows.length; i += chunkSize) {
that.swiperList.push(res.rows.slice(i, i + chunkSize)); that.swiperList.push(res.rows.slice(i, i + chunkSize));
} }
}) });
}, },
// //
async getMechantList(){ async getMechantList() {
let that = this let that = this;
await request(apiArr.getMerchantList, "POST",{ await request(apiArr.getMerchantList, "POST", {
page_num:that.page_num, page_num: that.page_num,
page_size:that.page_size, page_size: that.page_size,
}).then(res => { }).then((res) => {
let latitude = uni.getStorageSync("location").lat let latitude = uni.getStorageSync("location").lat;
let longitude = uni.getStorageSync("location").lng let longitude = uni.getStorageSync("location").lng;
res.rows.forEach(item => { res.rows.forEach((item) => {
item.bigImg = item.album_images.split(',') item.bigImg = item.album_images.split(",");
const distanceInKm = calculateDistance(latitude,longitude,item.latitude,item.longitude); const distanceInKm = calculateDistance(
item.distances = distanceInKm >= 1 ? `${distanceInKm.toFixed(1)}km` : `${(distanceInKm * 1000).toFixed(1)}m`; latitude,
longitude,
item.latitude,
item.longitude
);
item.distances =
distanceInKm >= 1
? `${distanceInKm.toFixed(1)}km`
: `${(distanceInKm * 1000).toFixed(1)}m`;
if(item.ad){ if (item.ad) {
item.comAddress = item.ad.ad_name.replace(/,/g, '') + item.address item.comAddress = item.ad.ad_name.replace(/,/g, "") + item.address;
}else{ } else {
item.comAddress = item.address item.comAddress = item.address;
} }
}); });
res.rows.sort((a, b) => { res.rows.sort((a, b) => {
const valueA = parseFloat(a.distances.replace('km', '').replace('m', '')) * (a.distances.includes('km') ? 1000 : 1); const valueA =
const valueB = parseFloat(b.distances.replace('km', '').replace('m', '')) * (b.distances.includes('km') ? 1000 : 1); parseFloat(a.distances.replace("km", "").replace("m", "")) *
(a.distances.includes("km") ? 1000 : 1);
const valueB =
parseFloat(b.distances.replace("km", "").replace("m", "")) *
(b.distances.includes("km") ? 1000 : 1);
return valueA - valueB; return valueA - valueB;
}); });
if (res.rows.length == this.page_size) {
if(res.rows.length == this.page_size){
this.page_num = this.page_num + 1; this.page_num = this.page_num + 1;
this.flag = true this.flag = true;
}else{ } else {
this.flag = false this.flag = false;
} }
this.merchatList = this.merchatList.concat(res.rows) this.merchatList = this.merchatList.concat(res.rows);
}) });
}, },
// //
Info(e){ Info(e) {
uni.setStorageSync("merchantInfo",e) uni.setStorageSync("merchantInfo", e);
NavgateTo("../detail/index") NavgateTo("../detail/index");
}, },
//
toJump(e){
NavgateTo('../comment/index');
}, },
},
} };
</script> </script>
<style> <style>

View File

@ -18,8 +18,8 @@
<div class="Msg"> <div class="Msg">
<div class="payMony"> <div class="payMony">
<input type="text" v-model="Money" placeholder="付款金额" placeholder-style="font-size: 50rpx;"> <input type="number" v-model="Money" placeholder="付款金额" placeholder-style="font-size: 50rpx;"
</div> @blur="handleMoneyInput" step="0.01" min="0.01"> </div>
<div class="payRemark"> <div class="payRemark">
<input type="text" v-model="remarks" placeholder="付款备注"> <input type="text" v-model="remarks" placeholder="付款备注">
</div> </div>
@ -62,7 +62,8 @@
<div class="line"></div> <div class="line"></div>
<div class="btnItem" @click="home">首页</div> <div class="btnItem" @click="home">首页</div>
<div class="btnItem2" @click="changeBoxshadow"> <div class="btnItem2" @click="changeBoxshadow">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_qrcode.png" mode="aspectFill"></image> <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_qrcode.png"
mode="aspectFill"></image>
本页二维码 本页二维码
</div> </div>
</div> </div>
@ -135,6 +136,29 @@ export default {
methods: { methods: {
handleMoneyInput() {
//
let value = this.Money.toString().replace(/[^\d.]/g, '');
//
value = value.replace(/\.{2,}/g, '.');
//
value = value.replace(/^(\d+)\.(\d{2}).*$/, '$1.$2');
//
if (value.startsWith('.')) {
value = '0' + value;
}
// 0
const num = parseFloat(value);
if (isNaN(num) || num <= 0) {
value = '';
}
this.Money = value;
},
createQrcode() { createQrcode() {
uni.showLoading({ uni.showLoading({
@ -157,7 +181,7 @@ export default {
}); });
}, },
createQrcode2(e) { createQrcode2(e) {
let that= this let that = this
uni.request({ uni.request({
url: `https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=${e}`, url: `https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=${e}`,
method: 'post', method: 'post',
@ -182,7 +206,7 @@ export default {
} }
}); });
}, },
changeBoxshadow2(){ changeBoxshadow2() {
this.boxShow = !this.boxShow this.boxShow = !this.boxShow
}, },
changeBoxshadow() { changeBoxshadow() {

View File

@ -0,0 +1,217 @@
page {
background-color: #f0f2f5;
min-height: 100vh;
overflow-y: hidden;
}
.container {
padding: 20rpx;
}
/* 商品图片区域 */
.goods-scroll {
width: 96%;
white-space: nowrap;
margin-bottom: 30rpx;
padding: 20rpx 15rpx;
background-color: #ffffff;
}
.goods-list {
display: inline-flex;
}
.goods-item {
width: 120rpx;
height: 120rpx;
margin-right: 16rpx;
border-radius: 8rpx;
overflow: hidden;
}
.goods-img {
width: 100%;
height: 100%;
object-fit: cover;
}
/* 订单编号 */
.order-info {
display: flex;
justify-content: space-between;
padding: 20rpx 0;
border-bottom: 1rpx solid #EEEEEE;
margin-bottom: 30rpx;
}
.order-label {
font-size: 26rpx;
color: #9a9a9a;
}
.order-value {
font-size: 26rpx;
color: #333333;
}
.goods{
display: flex;
align-items: center;
justify-content: flex-start;
gap: 20rpx;
}
/* 货品图 */
.goodsImg{
display: flex;
width: 100rpx;
height: 100rpx;
}
/* 评分区域 */
.rating{
width: 460rpx;
display: flex;
justify-content: space-between;
margin: 0 0 0rpx 55rpx;
color: #a6a6a6;
}
.rating-section {
background-color: #FFFFFF;
border-radius: 16rpx;
padding: 20rpx;
margin-bottom: 30rpx;
height: 80vh;
}
.rating-item {
display: flex;
align-items: center;
margin-bottom: 30rpx;
margin-top: 20rpx;
}
.rating-item:last-child {
margin-bottom: 0;
}
.rating-label {
width: 160rpx;
font-size: 28rpx;
color: #333333;
font-weight: bold;
}
/* 评价输入 */
.comment-section {
padding: 20rpx;
margin-bottom: 30rpx;
border-top: 1rpx solid #f5f5f5;
}
.comment-input {
width: 100%;
min-height: 100rpx;
font-size: 26rpx;
color: #333333;
line-height: 1.5;
}
/* 图片上传 */
.upload-section {
/* background-color: #FFFFFF; */
border-radius: 16rpx;
padding: 20rpx;
margin-bottom: 40rpx;
display: flex;
}
.upload-btn {
display: flex;
width: 150rpx;
height: 150rpx;
padding: 15rpx;
background-color: #f6f6f6;
flex-direction: column;
justify-content: center;
align-items: center;
margin-bottom: 20rpx;
border-radius: 20rpx;
}
.upload-icon {
width: 60rpx;
height: 50rpx;
margin-right: 10rpx;
}
.upload-text {
font-size: 28rpx;
color: #333333;
margin: 10rpx 0;
}
.upload-count {
font-size: 28rpx;
color: #999999;
}
.image-list {
display: flex;
/* flex-wrap: wrap; */
}
.image-item {
width: 170rpx;
height: 170rpx;
margin-right: 20rpx;
margin-bottom: 20rpx;
position: relative;
border-radius: 20rpx;
overflow: hidden;
}
.uploaded-img {
width: 100%;
height: 100%;
object-fit: cover;
}
.delete-btn {
position: absolute;
top: -10rpx;
right: -10rpx;
width: 36rpx;
height: 36rpx;
background-color: rgba(0, 0, 0, 0.5);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
}
.delete-icon {
color: #FFFFFF;
font-size: 24rpx;
font-weight: bold;
}
/* 提交按钮 */
.submit-btn {
width: 90%;
height: 98rpx;
background-color: #ff4117;
border-radius: 49rpx;
display: flex;
justify-content: center;
align-items: center;
margin-top: 20rpx;
margin: 0 auto;
}
.btn-text {
font-size: 32rpx;
color: #FFFFFF;
font-weight: bold;
}

View File

@ -0,0 +1,182 @@
<template>
<view class="container">
<!-- 评分区域 -->
<view class="rating-section">
<!-- 订单编号 -->
<view class="order-info">
<text class="order-label">订单编号</text>
<text class="order-value">38757328485</text>
</view>
<view class="goods">
<view>
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png" class="goodsImg"></image>
</view>
<view class="rating">
<view>很差</view>
<view></view>
<view>一般</view>
<view>不错</view>
<view>满意</view>
</view>
</view>
<!-- 商品品质 -->
<view class="rating-item">
<text class="rating-label">商品品质</text>
<u-rate
v-model="qualityRating"
size="40"
active-color="#FFB400"
inactive-color="#EEEEEE"
gutter="60"
></u-rate>
</view>
<!-- 配送速度 -->
<view class="rating-item">
<text class="rating-label">配送速度</text>
<u-rate
v-model="speedRating"
size="40"
active-color="#FFB400"
inactive-color="#EEEEEE"
gutter="60"
></u-rate>
</view>
<!-- 快递员服务 -->
<view class="rating-item">
<text class="rating-label">快递员服务</text>
<u-rate
v-model="serviceRating"
size="40"
active-color="#FFB400"
inactive-color="#EEEEEE"
gutter="60"
></u-rate>
</view>
<!-- 评价输入 -->
<view class="comment-section">
<textarea
class="comment-input"
placeholder="展开说说对商品的想法吧…"
v-model="comment"
></textarea>
</view>
<!-- 图片上传 -->
<view class="upload-section">
<view class="image-list">
<view
class="image-item"
v-for="(img, index) in imageList"
:key="index"
>
<image :src="img" class="uploaded-img"></image>
<view class="delete-btn" @click="deleteImage(index)">
<text class="delete-icon">×</text>
</view>
</view>
</view>
<view
class="upload-btn"
@click="chooseImage"
v-if="imageList.length < 3"
>
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/upload.png"
class="upload-icon"
></image>
<view class="upload-text">上传图片</view>
<view class="upload-count">({{ imageList.length }}/3)</view>
</view>
</view>
<!-- 提交按钮 -->
<view class="submit-btn" @click="submitEvaluate">
<text class="btn-text">提交</text>
</view>
</view>
</view>
</template>
<script>
import uImage from "../../../uni_modules/uview-ui/components/u--image/u--image.vue";
export default {
components: { uImage },
data() {
return {
//
goods: [
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index1.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index2.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index3.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index4.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index5.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index1.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index2.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index3.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index4.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index5.png" },
],
//
qualityRating: 5,
speedRating: 0,
serviceRating: 0,
//
comment: "",
//
imageList: [],
};
},
methods: {
//
chooseImage() {
if (this.imageList.length >= 3) {
uni.showToast({
title: "最多上传3张图片",
icon: "none",
});
return;
}
uni.chooseImage({
count: 3 - this.imageList.length,
sizeType: ["original", "compressed"],
sourceType: ["album", "camera"],
success: (res) => {
this.imageList = this.imageList.concat(res.tempFilePaths);
},
});
},
//
deleteImage(index) {
this.imageList.splice(index, 1);
},
//
submitEvaluate() {
if (!this.comment.trim() && this.imageList.length === 0) {
uni.showToast({
title: "请至少填写评价内容或上传图片",
icon: "none",
});
return;
}
// API
uni.showToast({
title: "评价提交成功",
icon: "success",
});
setTimeout(() => {
uni.navigateBack();
}, 1500);
},
},
onLoad(options) {
console.log("🚀 ~ onLoad ~ options:", options);
const itemObj = JSON.parse(decodeURIComponent(options.item));
},
};
</script>
<style>
@import url("./index.css");
</style>

View File

@ -0,0 +1,110 @@
.order-list {
padding: 20rpx;
background-color: #f5f7fb;
}
.order-item {
background-color: white;
border-radius: 20rpx;
padding: 30rpx;
margin-bottom: 25rpx;
}
.order-header {
margin-bottom: 25rpx;
}
.order-name {
font-size: 30rpx;
font-weight: bold;
color: #333;
}
.order-number {
font-size: 30rpx;
color: #333;
}
.product-list {
padding-top: 25rpx;
}
.product-item {
display: flex;
align-items: center;
padding: 20rpx 0;
border-bottom: 1rpx solid #eee;
}
.product-item:last-child {
border-bottom: none;
}
.product-info {
flex: 1;
display: flex;
align-items: center;
}
.product-img {
position: relative;
width: 130rpx;
height: 130rpx;
margin-right: 25rpx;
border-radius: 20rpx;
}
.product-img image {
width: 100%;
height: 100%;
}
.tag {
position: absolute;
bottom: 0;
right: 0;
background-color: #ff7d00;
color: white;
font-size: 22rpx;
padding: 5rpx 10rpx;
border-radius: 20rpx 0 20rpx 20rpx;
}
.product-details {
flex: 1;
}
.product-name {
font-size: 28rpx;
color: #333;
font-weight: bold;
margin-bottom: 10rpx;
display: block;
}
.product-spec {
font-size: 22rpx;
color: #666;
margin-bottom: 10rpx;
display: block;
}
.product-unit {
font-size: 26rpx;
color: red;
margin-bottom: 10rpx;
display: block;
}
.evaluate-btn {
background-color: #ffe8e5;
color: #e33612;
border: none;
border-radius: 50rpx;
font-size: 26rpx;
min-width: 150rpx;
}
.evaluate-btn::after {
border: none;
}

View File

@ -0,0 +1,101 @@
<template>
<view class="order-list">
<view class="order-item" v-for="(item, index) in orderList" :key="index">
<view class="order-header">
<text class="order-name">{{ item.orderName }}</text>
<text class="order-number">{{ item.orderNumber }}</text>
</view>
<view class="product-list">
<view
class="product-item"
v-for="(product, pIndex) in item.products"
:key="pIndex"
>
<view class="product-info">
<view class="product-img">
<image :src="product.imageUrl" mode="aspectFit"></image>
<view class="tag" v-if="product.tag">{{ product.tag }}</view>
</view>
<view class="product-details">
<text class="product-name">{{ product.name }}</text>
<text class="product-spec">{{ product.spec }}</text>
<text class="product-unit">{{ product.unit }}</text>
</view>
</view>
<button class="evaluate-btn" @click="evaluateOrder(product)">
评价
</button>
</view>
</view>
</view>
</view>
</template>
<script>
import { request, NavgateTo } from "../../../utils";
export default {
data() {
return {
orderList: [
{
orderName: "衡水商贸国际公司",
orderNumber: "4534534255",
products: [
{
imageUrl: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/product.png",
tag: "当日达",
name: "货品名称",
spec: "货品规格",
unit: "货品单位",
},
{
imageUrl: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/product.png",
tag: "当日达",
name: "货品名称",
spec: "货品规格",
unit: "货品单位",
},
],
},
{
orderNumber: "54352342331",
products: [
{
imageUrl: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/product.png",
tag: "",
name: "货品名称",
spec: "货品规格",
unit: "货品单位",
},
{
imageUrl: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/product.png",
tag: "",
name: "货品名称",
spec: "货品规格",
unit: "货品单位",
},
{
imageUrl: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/product.png",
tag: "",
name: "货品名称",
spec: "货品规格",
unit: "货品单位",
},
],
},
],
};
},
methods: {
evaluateOrder(item) {
console.log("🚀 ~ evaluateOrder ~ orderNumber:", item);
NavgateTo(`../evaluate/index?item=${JSON.stringify(item)}`);
},
},
};
</script>
<style>
@import url("./awaitRated.css");
</style>

View File

@ -11,6 +11,9 @@ page {
height: 100rpx; height: 100rpx;
padding: 0 20rpx; padding: 0 20rpx;
box-sizing: border-box; box-sizing: border-box;
display: flex;
overflow-x: auto;
white-space: nowrap;
} }
.tabItem { .tabItem {

View File

@ -12,8 +12,13 @@
</view> </view>
<view class="content"> <view class="content">
<view v-for="(category, catIndex) in categoryList" :key="catIndex"> <view v-if="selectedTab === 6">
<view v-if="selectedTab === catIndex"> <awaitRated />
</view>
<view v-if="selectedTab === 7">
<rated />
</view>
<view v-else>
<view v-for="(item, index) in orderData" :key="index"> <view v-for="(item, index) in orderData" :key="index">
<view class="contentList"> <view class="contentList">
<!-- 订单头部信息 --> <!-- 订单头部信息 -->
@ -25,7 +30,7 @@
>{{ getOrderStatus(item.order_status) }}</view >{{ getOrderStatus(item.order_status) }}</view
> >
<view v-else-if="item.order_status == 7" class="status2"> <view v-else-if="item.order_status == 7" class="status2">
<img src="http://localhost:8080/refund.png" /> <img src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/refund.png" />
{{ getOrderStatus(item.order_status) }} {{ getOrderStatus(item.order_status) }}
</view> </view>
<view v-else class="order_status">{{ <view v-else class="order_status">{{
@ -66,33 +71,24 @@
</view> </view>
<view class="btn-group" v-if="item.order_status === 6"> <view class="btn-group" v-if="item.order_status === 6">
<button class="yfd-btn" @click="cancelOrder">运费单</button> <button class="yfd-btn" @click="cancelOrder">运费单</button>
<button class="pay-btn" @click="cancelOrder"> <button class="pay-btn" @click="cancelOrder">再来一单</button>
再来一单
</button>
</view> </view>
<view class="btn-group" v-if="item.order_status === 4"> <view class="btn-group" v-if="item.order_status === 4">
<button class="cancel-btn" @click="checkLogistics"> <button class="cancel-btn" @click="checkLogistics">
查看物流 查看物流
</button> </button>
<button class="yfd-btn" @click="cancelOrder">运费单</button> <button class="yfd-btn" @click="cancelOrder">运费单</button>
<button class="pay-btn" @click="cancelOrder"> <button class="pay-btn" @click="cancelOrder">再来一单</button>
再来一单
</button>
</view> </view>
<view class="btn-group" v-if="item.order_status === 5"> <view class="btn-group" v-if="item.order_status === 5">
<button class="cancel-btn" @click="orderEvaluate"> <button class="cancel-btn" @click="orderEvaluate">
服务评价 服务评价
</button> </button>
<button class="yfd-btn" @click="cancelOrder">运费单</button> <button class="yfd-btn" @click="cancelOrder">运费单</button>
<button class="pay-btn" @click="cancelOrder"> <button class="pay-btn" @click="cancelOrder">再来一单</button>
再来一单
</button>
</view> </view>
<view class="btn-group" v-if="item.order_status === 7"> <view class="btn-group" v-if="item.order_status === 7">
<button class="pay-btn" @click="cancelOrder"> <button class="pay-btn" @click="cancelOrder">再来一单</button>
再来一单
</button>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -104,26 +100,38 @@
</template> </template>
<script> <script>
import { picUrl, NavgateTo, request } from "../../../utils"; import { picUrl, NavgateTo, request } from "../../../utils";
import { apiArr } from "../../../api/order" import { apiArr } from "../../../api/order";
import Rated from "./rated.vue";
import AwaitRated from "./awaitRated.vue";
export default { export default {
components: {
Rated,
AwaitRated,
},
data() { data() {
return { return {
categoryList: [ categoryList: [
{ category_name: "全部" }, { category_name: "全部" },
{ category_name: "待付款" }, { category_name: "待付款" },
{ category_name: "已取消" },
{ category_name: "待发货" }, { category_name: "待发货" },
{ category_name: "配送中" }, { category_name: "配送中" },
{ category_name: "已完成" }, { category_name: "已完成" },
{ category_name: "待评价" },
{ category_name: "已评价" },
{ category_name: "售后" },
], ],
selectedTab: 0, selectedTab: 0,
orderData:[], orderData: [],
}; };
}, },
methods: { methods: {
selectTab(index, item) { selectTab(index, item) {
this.selectedTab = index; this.selectedTab = index;
this.getOrderList() if (index !== 6) {
this.getOrderList();
}
}, },
cancelOrder() { cancelOrder() {
// //
@ -138,45 +146,46 @@ export default {
}); });
}, },
goToPay() { goToPay() {
console.log("🚀 ~ goToPay ~ goToPay:", "去支付...");
}, },
toDetails(order_status) { toDetails(order_status) {
NavgateTo(`/packages/myOrders/orderDetails/index?order_status=${order_status}`); NavgateTo(
`/packages/myOrders/orderDetails/index?order_status=${order_status}`
);
}, },
checkLogistics() { checkLogistics() {
NavgateTo(`/packages/myOrders/logistics/index`); NavgateTo(`/packages/myOrders/logistics/index`);
}, },
orderEvaluate(){ orderEvaluate() {
NavgateTo(`/packages/myOrders/orderEvaluate/index`); NavgateTo(`/packages/myOrders/orderEvaluate/index`);
}, },
getOrderStatus(order_status){ getOrderStatus(order_status) {
switch(order_status){ switch (order_status) {
case 1: case 1:
return '待付款' return "待付款";
case 2: case 2:
return '支付中' return "支付中";
case 3: case 3:
return '待发货' return "待发货";
case 4: case 4:
return '配送中' return "配送中";
case 5: case 5:
return '已完成' return "已完成";
case 6: case 6:
return '已取消' return "已取消";
case 7: case 7:
return '退款中' return "退款中";
case 8: case 8:
return '已退款' return "已退款";
} }
}, },
getOrderList(){ getOrderList() {
request(apiArr.orderList, "POST", { request(apiArr.orderList, "POST", {
user_id: uni.getStorageSync('userId') user_id: uni.getStorageSync("userId"),
}).then(res => { }).then((res) => {
const orderList = res.order_list || []; const orderList = res.order_list || [];
let filteredData = orderList; let filteredData = orderList;
@ -185,16 +194,18 @@ export default {
1: 1, // 1: 1, //
2: 3, // 2: 3, //
3: 4, // 3: 4, //
4: 5 // 4: 5, //
}; };
const targetStatus = statusMap[this.selectedTab]; const targetStatus = statusMap[this.selectedTab];
if (targetStatus) { if (targetStatus) {
filteredData = orderList.filter(item => item.order_status === targetStatus); filteredData = orderList.filter(
(item) => item.order_status === targetStatus
);
} }
} }
this.orderData = filteredData; this.orderData = filteredData;
}) });
} },
}, },
onLoad(options) { onLoad(options) {

View File

@ -0,0 +1,133 @@
.evaluation-container {
padding: 20rpx;
background-color: #f5f7fb;
min-height: 100vh;
}
.order-header {
display: flex;
justify-content: space-between;
padding: 15rpx 0;
border-bottom: 1rpx solid #eee;
margin-bottom: 20rpx;
}
.order-name {
font-size: 30rpx;
font-weight: bold;
color: #333;
}
.order-number {
font-size: 30rpx;
color: #333;
}
.order-date {
font-size: 26rpx;
color: #999;
float: right;
}
.evaluation-content {
background: #fff;
border-radius: 10rpx;
padding: 20rpx;
margin-bottom: 20rpx;
}
.evaluation-area {
background: #f5f7fb;
padding: 20rpx 20rpx 50rpx 20rpx;
border-radius: 10rpx;
}
.evaluation-text {
font-size: 28rpx;
color: #333;
line-height: 40rpx;
margin-bottom: 20rpx;
}
.image-list {
display: flex;
gap: 15rpx;
padding: 10rpx 0;
}
.image-item {
width: 140rpx;
height: 140rpx;
border: 1rpx dashed #ddd;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.image-item image {
width: 80rpx;
height: 80rpx;
}
.image-text {
font-size: 24rpx;
color: #999;
margin-top: 10rpx;
}
.product-info {
background: #fff;
border-radius: 10rpx;
padding: 20rpx;
display: flex;
align-items: center;
}
.product-img {
position: relative;
margin-right: 20rpx;
}
.product-img image {
width: 120rpx;
height: 120rpx;
border-radius: 8rpx;
}
.tag {
position: absolute;
bottom: 0;
right: 0;
background-color: #ff7d00;
color: white;
font-size: 22rpx;
padding: 5rpx 10rpx;
border-radius: 20rpx 0 20rpx 20rpx;
}
.product-details {
flex: 1;
}
.product-name {
font-size: 28rpx;
color: #333;
font-weight: bold;
margin-bottom: 10rpx;
display: block;
}
.product-spec {
font-size: 22rpx;
color: #666;
margin-bottom: 10rpx;
display: block;
}
.product-unit {
font-size: 26rpx;
color: red;
margin-bottom: 10rpx;
display: block;
}

View File

@ -0,0 +1,79 @@
<template>
<view class="evaluation-container">
<!-- 评价内容区域 -->
<view class="evaluation-content">
<!-- 订单头部信息 -->
<view class="order-header">
<text class="order-name">{{ orderInfo.orderName }}</text>
<text class="order-number">{{ orderInfo.orderNumber }}</text>
</view>
<view class="evaluation-area">
<text class="evaluation-text">{{ evaluationInfo.content }}</text>
<!-- 评价图片区域 -->
<view class="image-list">
<view
class="image-item"
v-for="(img, index) in evaluationInfo.images"
:key="index"
>
<image :src="img.url" mode="aspectFill"></image>
<text class="image-text">{{ img.text }}</text>
</view>
</view>
<text class="order-date">{{ orderInfo.date }}</text>
</view>
<!-- 商品信息区域 -->
<view class="product-info">
<view class="product-img">
<image :src="productInfo.imageUrl" mode="aspectFit"></image>
<view
class="tag"
v-for="(tag, index) in productInfo.tags"
:key="index"
>{{ tag }}</view
>
</view>
<view class="product-details">
<text class="product-name">{{ productInfo.name }}</text>
<text class="product-spec">{{ productInfo.spec }}</text>
<text class="product-unit">{{ productInfo.unit }}</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
orderInfo: {
orderName: "衡水商贸国际公司",
orderNumber: "4534534255",
date: "2025-07-21",
},
evaluationInfo: {
content: "评价文字内容",
images: [
{ url: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/eval1.png", text: "评价图片" },
{ url: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/eval2.png", text: "评价图片" },
{ url: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/eval3.png", text: "评价图片" },
],
},
productInfo: {
imageUrl: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/product.png",
tags: ["当日达", "当日达"],
name: "货品名称",
spec: "货品规格",
unit: "货品单位",
},
};
},
};
</script>
<style>
@import url("./rated.css");
</style>

View File

@ -23,7 +23,7 @@
<img <img
class="copy-btn" class="copy-btn"
@click="copyNumber" @click="copyNumber"
src="http://localhost:8080/copy.png" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/copy.png"
alt="复制" alt="复制"
/> />
</view> </view>

View File

@ -16,7 +16,7 @@
<view class="countdown">预计到货时间: 2025-09-09 9:59:59</view> <view class="countdown">预计到货时间: 2025-09-09 9:59:59</view>
<view class="tips"> <view class="tips">
配送司机15901518415 配送司机15901518415
<img class="phone" src="http://localhost:8080/phone.png" /> <img class="phone" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/phone.png" />
</view> </view>
</view> </view>
<view class="status-bar" v-if="status === '已完成' || status === '退款中'"> <view class="status-bar" v-if="status === '已完成' || status === '退款中'">
@ -190,21 +190,21 @@ export default {
remark: "明天9点之前送到", remark: "明天9点之前送到",
goodsList: [ goodsList: [
{ {
image: "http://localhost:8080/order_details.png", image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_details.png",
name: "泰国金枕榴莲", name: "泰国金枕榴莲",
desc: "泰国金枕榴莲 软糯 香甜", desc: "泰国金枕榴莲 软糯 香甜",
price: "125.9", price: "125.9",
quantity: 1, quantity: 1,
}, },
{ {
image: "http://localhost:8080/order_details.png", image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_details.png",
name: "泰国金枕榴莲", name: "泰国金枕榴莲",
desc: "泰国金枕榴莲 软糯 香甜", desc: "泰国金枕榴莲 软糯 香甜",
price: "125.9", price: "125.9",
quantity: 1, quantity: 1,
}, },
{ {
image: "http://localhost:8080/order_details.png", image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_details.png",
name: "泰国金枕榴莲", name: "泰国金枕榴莲",
desc: "泰国金枕榴莲 软糯 香甜", desc: "泰国金枕榴莲 软糯 香甜",
price: "125.9", price: "125.9",

View File

@ -87,7 +87,7 @@
v-if="imageList.length < 3" v-if="imageList.length < 3"
> >
<image <image
src="http://localhost:8080/upload.png" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/upload.png"
class="upload-icon" class="upload-icon"
></image> ></image>
<view class="upload-text">上传图片</view> <view class="upload-text">上传图片</view>
@ -108,16 +108,16 @@ export default {
return { return {
// //
goods: [ goods: [
{ image: "http://localhost:8080/order_index1.png" }, { image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index1.png" },
{ image: "http://localhost:8080/order_index2.png" }, { image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index2.png" },
{ image: "http://localhost:8080/order_index3.png" }, { image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index3.png" },
{ image: "http://localhost:8080/order_index4.png" }, { image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index4.png" },
{ image: "http://localhost:8080/order_index5.png" }, { image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index5.png" },
{ image: "http://localhost:8080/order_index1.png" }, { image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index1.png" },
{ image: "http://localhost:8080/order_index2.png" }, { image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index2.png" },
{ image: "http://localhost:8080/order_index3.png" }, { image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index3.png" },
{ image: "http://localhost:8080/order_index4.png" }, { image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index4.png" },
{ image: "http://localhost:8080/order_index5.png" }, { image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index5.png" },
], ],
// //
qualityRating: 5, qualityRating: 5,

View File

@ -1,6 +1,6 @@
page { page {
background-color: #fff; background-color: #fff;
padding-bottom: 0; padding-bottom: 20rpx;
min-height: 100vh; min-height: 100vh;
} }
@ -28,9 +28,6 @@ image {
padding-left: 20rpx; padding-left: 20rpx;
} }
.swiper { .swiper {
height: 750rpx; height: 750rpx;
width: 750rpx; width: 750rpx;
@ -107,6 +104,45 @@ image {
margin-right: 40rpx; margin-right: 40rpx;
} }
/* 促销信息样式 */
.promotions-container {
padding: 15rpx;
background-color: #FFF;
border-radius: 10rpx;
margin: 15rpx 0;
}
.promotion-item {
display: flex;
align-items: center;
margin-bottom: 20rpx;
}
.promotion-tag {
width: 80rpx;
text-align: center;
background-color: #ffe8e5;
color: #ff5029;
padding: 5rpx 15rpx;
border-radius: 10rpx;
font-size: 26rpx;
margin-right: 30rpx;
}
.promotion-content {
font-size: 26rpx;
color: #333;
}
.promotion-content1 {
width: auto;
padding: 5rpx 10rpx;
text-align: center;
background-color: #ff6749;
color: white;
border-radius: 10rpx;
}
.GG_Item { .GG_Item {
font-size: 26rpx; font-size: 26rpx;
color: #999999; color: #999999;
@ -133,7 +169,7 @@ image {
} }
.GoodsMsg { .GoodsMsg {
font-size: 33rpx; /* font-size: 30rpx; */
color: #222222; color: #222222;
margin: 0 20rpx; margin: 0 20rpx;
margin-top: 55rpx; margin-top: 55rpx;
@ -151,14 +187,14 @@ image {
.Msg_ItemTit { .Msg_ItemTit {
width: 120rpx; width: 120rpx;
margin-right: 100rpx; margin-right: 100rpx;
font-size: 28rpx; font-size: 26rpx;
color: #999999; color: #999999;
margin: 0 20rpx; margin: 0 20rpx;
padding: 30rpx 0; padding: 30rpx 0;
} }
.Msg_ItemCon { .Msg_ItemCon {
font-size: 28rpx; font-size: 26rpx;
color: #222222; color: #222222;
display: flex; display: flex;
align-items: center; align-items: center;
@ -273,7 +309,7 @@ image {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: 28rpx; font-size: 26rpx;
color: #000000; color: #000000;
} }
@ -365,7 +401,215 @@ image {
color: #999999; color: #999999;
} }
.active{ .active {
background: #FF370B; background: #FF370B;
color: #fff; color: #fff;
} }
.priceInfo {
height: 450rpx;
padding: 20rpx;
}
.priceInfo-title {
/* font-size: 30rpx; */
font-weight: bolder;
margin: 15rpx 0 20rpx 0;
}
.priceInfo-content {
font-size: 26rpx;
color: #9c9c9c;
line-height: 1.7;
}
.priceInfo-content-title {
font-size: 28rpx;
color: #333;
}
.fenge {
width: 100%;
height: 15rpx;
background-color: #f5f7fb;
}
/* 评价部分样式 */
.reviews-section {
padding: 20rpx;
background-color: #fff;
margin-bottom: 20rpx;
}
.reviews-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
}
.reviews-header h3 {
/* font-size: 32rpx; */
font-weight: bold;
}
.view-all {
color: #999;
font-size: 26rpx;
background: none;
border: none;
padding: 0;
}
.reviews-list {
margin-top: 20rpx;
}
.review-item {
padding: 20rpx 0;
border-bottom: 1rpx solid #f5f5f5;
}
.review-user {
display: flex;
align-items: center;
margin-bottom: 15rpx;
}
.user-avatar {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
margin-right: 15rpx;
}
.user-info {
flex: 1;
}
.user-name {
font-size: 28rpx;
font-weight: 500;
}
.user-purchase {
font-size: 24rpx;
color: #999;
margin: 10rpx 0;
}
.review-content {
font-size: 27rpx;
line-height: 1.5;
margin-bottom: 15rpx;
}
.review-images {
display: flex;
flex-wrap: wrap;
gap: 10rpx;
margin-bottom: 15rpx;
}
.review-img {
width: 140rpx;
height: 140rpx;
border-radius: 8rpx;
}
.review-time {
font-size: 24rpx;
color: #999;
text-align: right;
}
.popup-header {
display: flex;
width: 90%;
padding-left: 80rpx;
margin: 20rpx 0;
}
.popup-header-h3 {
font-weight: bold;
margin: 0 auto;
}
.popup-header-view {
font-size: 24rpx;
color: #999;
margin-right: 30rpx;
}
.temp {
display: flex;
justify-content: space-between;
align-items: center;
}
.temp1 {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 24rpx;
color: #959595;
margin: 20rpx 0 5rpx 0;
}
.temp_img {
width: 35rpx;
height: 35rpx;
margin-right: 10rpx;
}
.temp_img1 {
width: 30rpx;
height: 30rpx;
margin: 5rpx 5rpx 0 5rpx;
}
.itemSize {
width: 30%;
font-size: 26rpx;
color: #333;
background: #F6F7FB;
border-radius: 40rpx;
padding: 10rpx 15rpx;
white-space: nowrap;
margin:20rpx 30rpx;
}
.itemSize_active {
background: #FF370B;
color: #fff;
}
.itemSize-img{
width: 100rpx;
height: 100rpx;
margin-right: 30rpx;
border-radius: 20rpx;
border:1rpx solid red;
}
.itemSize_top{
display: flex;
margin-left: 30rpx;
}
.itemSize_info {
margin-top: 10rpx;
}
.itemSize_name {
font-size: 28rpx;
font-weight: 500;
font-weight: bold;
}
.itemSize_price {
font-size: 28rpx;
font-weight: 500;
margin-top: 10rpx;
color: red;
}

View File

@ -1,16 +1,16 @@
<template> <template>
<view> <view>
<div class="header"> <view class="header">
<div <view
class="searchBox" class="searchBox"
:style="{ height: localHeight + 'px', paddingTop: top + 'px' }" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }"
> >
<div class="searchBox_left" @click="back"> <view class="searchBox_left" @click="back">
<u-icon name="arrow-left" size="20px" color="#000"></u-icon> <u-icon name="arrow-left" size="20px" color="#000"></u-icon>
</div> </view>
</div> </view>
</div> </view>
<div class="swiper"> <view class="swiper">
<swiper <swiper
:indicator-dots="false" :indicator-dots="false"
:autoplay="true" :autoplay="true"
@ -26,24 +26,24 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
<div class="NumDot"> <view class="NumDot">
{{ currentIndex }} /{{ currentGG.goods_carousel.length }} {{ currentIndex }} /{{ currentGG.goods_carousel.length }}
</div> </view>
</div> </view>
<div class="Money"> <view class="Money">
<div class="MoneyMark"></div> <view class="MoneyMark"></view>
{{ currentGG.sales_price }} {{ currentGG.sales_price }}
<div class="MoneyUnit">/{{ currentGG.goods_unit }}</div> <view class="MoneyUnit">/{{ currentGG.goods_unit }}</view>
<div class="oldMoney">{{ currentGG.market_price }}</div> <view class="oldMoney">{{ currentGG.market_price }}</view>
</div> </view>
<!-- 规格 --> <!-- 规格 -->
<!-- @click="changeGG2(item, index)" :class="index == currentGGIndex ? 'active' : ''"> --> <!-- @click="changeGG2(item, index)" :class="index == currentGGIndex ? 'active' : ''"> -->
<div class="GGBox"> <view class="GGBox">
<div class="GG_left"> <view class="GG_left">
<div <view
class="GG_Item" class="GG_Item"
v-for="(item, index) in info.commodity_goods_info_list" v-for="(item, index) in info.commodity_goods_info_list"
:key="item.id" :key="item.id"
@ -51,57 +51,150 @@
:class="index == currentGGIndex ? 'active' : ''" :class="index == currentGGIndex ? 'active' : ''"
> >
{{ item.goods_spec }} / {{ item.goods_unit }} {{ item.goods_spec }} / {{ item.goods_unit }}
</div> </view>
</div> </view>
<div class="GG_rigth"> <view class="GG_rigth">
{{ info.commodity_goods_info_list.length }}<u-icon {{ info.commodity_goods_info_list.length }}<u-icon
size="26rpx" size="26rpx"
name="arrow-right" name="arrow-right"
></u-icon> ></u-icon>
</div> </view>
</div> </view>
<div class="Tit">{{ currentGG.goods_name }}</div> <view class="Tit">{{ currentGG.goods_name }}</view>
<div class="Msg">{{ currentGG.commodity_brief }}</div> <view class="Msg">{{ currentGG.commodity_brief }}</view>
<div class="GoodsMsg">商品详情</div>
<div class="Msg_Item"> <view class="fenge"></view>
<div class="Msg_ItemTit">商品编号</div>
<div class="Msg_ItemCon" @click="copys(currentGG.goods_no)"> <!-- 促销信息区域 -->
<view class="promotions-container">
<view class="promotion-item">
<view class="promotion-tag">优惠</view>
<view class="promotion-content promotion-content1">满100减10</view>
</view>
<view class="promotion-item">
<view class="promotion-tag">限购</view>
<view class="promotion-content">限购5件</view>
</view>
<view class="promotion-item">
<view class="promotion-tag">阶梯价</view>
<view class="promotion-content">1~9 9.5/;>10 8.0/</view>
</view>
<view class="promotion-item">
<view class="promotion-tag">满赠</view>
<view class="promotion-content">满5赠1满10赠3</view>
</view>
<view class="promotion-item">
<view class="promotion-tag">满减</view>
<view class="promotion-content">满100减5满200减20</view>
</view>
</view>
<view class="fenge"></view>
<view class="Msg_Item">
<view class="Msg_ItemTit">质检</view>
<view class="Msg_ItemCon">质检报告</view>
</view>
<view class="Msg_Item">
<view class="Msg_ItemTit">押金</view>
<view class="Msg_ItemCon">需另付押金:30.00(30天可退)</view>
</view>
<view class="Msg_Item">
<view class="Msg_ItemTit">配送</view>
<view class="Msg_ItemCon"> 12:00前下单,预计8月21日送达; </view>
</view>
<view class="fenge"></view>
<!-- 评价部分 -->
<view class="reviews-section">
<view class="reviews-header">
<h3>评价({{ comments.length }})</h3>
<view class="view-all" @click="showPopup">查看全部 ></view>
</view>
<view class="reviews-list" v-if="comments.length > 0">
<view
class="review-item"
v-for="(comment, index) in comments"
:key="index"
>
<view class="review-user">
<image :src="comment.avatar" class="user-avatar"></image>
<view class="user-info">
<view class="user-name">{{ comment.username }}</view>
</view>
<view class="review-time">{{ comment.time }}</view>
</view>
<view class="user-purchase">已购 {{ comment.product }}</view>
<view class="review-content">{{ comment.content }}</view>
<view class="review-images" v-if="comment.images.length > 0">
<image
:src="img"
class="review-img"
v-for="(img, idx) in comment.images"
:key="idx"
></image>
</view>
</view>
</view>
</view>
<view class="fenge"></view>
<h3 class="GoodsMsg">商品详情</h3>
<view class="Msg_Item">
<view class="Msg_ItemTit">商品编号</view>
<view class="Msg_ItemCon" @click="copys(currentGG.goods_no)">
{{ currentGG.goods_no }} {{ currentGG.goods_no }}
<image <image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_copy.png" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_copy.png"
></image> ></image>
</div> </view>
</div> </view>
<div class="Msg_Item"> <view class="Msg_Item">
<div class="Msg_ItemTit">规格说明</div> <view class="Msg_ItemTit">规格说明</view>
<div class="Msg_ItemCon">{{ currentGG.goods_spec }}</div> <view class="Msg_ItemCon">{{ currentGG.goods_spec }}</view>
</div> </view>
<div class="Msg_Item"> <view class="Msg_Item">
<div class="Msg_ItemTit">售卖单位</div> <view class="Msg_ItemTit">售卖单位</view>
<div class="Msg_ItemCon">{{ currentGG.goods_unit }}</div> <view class="Msg_ItemCon">{{ currentGG.goods_unit }}</view>
</div> </view>
<div class="GoosMsg"> <view class="GoosMsg">
<image <image
v-for="item in currentGG.goods_detail_pic" v-for="item in currentGG.goods_detail_pic"
:src="picUrl + item" :src="picUrl + item"
:key="item"
mode="widthFix" mode="widthFix"
></image> ></image>
</div> </view>
<view class="priceInfo">
<h3 class="priceInfo-title">价格说明</h3>
<view class="priceInfo-content">
<view>
<text class="priceInfo-content-title">划线价格</text>
指商品的厂商指导价正品零售价市面常见价或该商品曾经展示过的销售价等并非原价仅供参考
</view>
<view>
<text class="priceInfo-content-title">未划线价格</text>
指商品的实时价格不因表述的差异改变性质具体成交价格根据商品参加活动或使用优惠券等发生变化最终以订单结算价格为准
</view>
</view>
</view>
<!-- 底部购物车 --> <!-- 底部购物车 -->
<div class="Car"> <view class="Car">
<div class="car_left"> <view class="car_left">
<div class="share" @click="share"> <view class="share" @click="share">
<image <image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_share.png" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_share.png"
mode="widthFix" mode="widthFix"
></image> ></image>
分享 分享
</div> </view>
<div class="cars" @click="car"> <view class="cars" @click="car">
<u-badge <u-badge
numberType="limit" numberType="limit"
:type="type" :type="type"
@ -114,10 +207,10 @@
mode="widthFix" mode="widthFix"
></image> ></image>
购物车 购物车
</div> </view>
</div> </view>
<div <view
class="car_right" class="car_right"
v-if=" v-if="
!info.commodity_goods_info_list[currentGGIndex].cart_count || !info.commodity_goods_info_list[currentGGIndex].cart_count ||
@ -126,9 +219,9 @@
@click="addCar" @click="addCar"
> >
加入购物车 加入购物车
</div> </view>
<div <view
class="car_right" class="car_right"
v-if=" v-if="
info.commodity_goods_info_list[currentGGIndex].cart_count.count > 0 info.commodity_goods_info_list[currentGGIndex].cart_count.count > 0
@ -157,54 +250,136 @@
<u-icon name="plus" color="#FFFFFF" size="36" bold></u-icon> <u-icon name="plus" color="#FFFFFF" size="36" bold></u-icon>
</view> </view>
</u-number-box> </u-number-box>
</div> </view>
</div> </view>
<!-- 分享 --> <!-- 分享 -->
<div class="shadow" @click.stop="changeShadow" v-if="boxshadow1"> <view class="shadow" @click.stop="changeShadow" v-if="boxshadow1">
<div class="shadowBox1"> <view class="shadowBox1">
<div class="shadowBox1Item" @click="shareFriend"> <view class="shadowBox1Item" @click="shareFriend">
<image <image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_WX.png" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_WX.png"
mode="aspectFill" mode="aspectFill"
></image> ></image>
微信好友 微信好友
</div> </view>
<div class="shadowBox1Item" @click="openSave"> <view class="shadowBox1Item" @click="openSave">
<image <image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_saveImg.png" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_saveImg.png"
mode="aspectFill" mode="aspectFill"
></image> ></image>
生成海报 生成海报
</div> </view>
</div> </view>
</div> </view>
<!-- 海报 --> <!-- 海报 -->
<div class="shadow" @click="changeShadow2" v-if="boxshadow2"> <view class="shadow" @click="changeShadow2" v-if="boxshadow2">
<div class="shadowBox2"> <view class="shadowBox2">
<div class="shadowBox_img"> <view class="shadowBox_img">
<div class="boxshadow_tit">今日商品推荐</div> <view class="boxshadow_tit">今日商品推荐</view>
<div class="boxshadow_img"> <view class="boxshadow_img">
<image <image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_share_img.png" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_share_img.png"
> >
</image> </image>
</div> </view>
<div class="line"></div> <view class="line"></view>
<div class="shadowBoxInfo"> <view class="shadowBoxInfo">
<div class="shadowboxInfo_left">二维码</div> <view class="shadowboxInfo_left">二维码</view>
<div class="shadowboxInfo_right"> <view class="shadowboxInfo_right">
<div class="shadowboxInfo_right_1">正鲜生</div> <view class="shadowboxInfo_right_1">正鲜生</view>
<div class="shadowboxInfo_right_2"> <view class="shadowboxInfo_right_2">
长按识别小程序 <br /> 长按识别小程序 <br />
数量有限马上抢购 数量有限马上抢购
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<div class="shadowBox_btn" @click.stop="saveImg">保存海报</div> <view class="shadowBox_btn" @click.stop="saveImg">保存海报</view>
</div> </view>
</div> </view>
<!-- 评价 查看详情 -->
<u-popup
:show="show"
round="20rpx"
mode="bottom"
@close="close"
@open="open"
:z-index="10070"
>
<view class="reviews-section">
<view class="popup-header">
<h3 class="popup-header-h3">评价</h3>
<view class="popup-header-view" @click="close">取消</view>
</view>
<view class="temp">
<view class="temp1">
<img class="temp_img" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/pingjia.png" />
为你展示真实评价
</view>
<view class="temp1" @click="showSizePopup">
款式
<img class="temp_img1" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/kuanshi.png" />
</view>
</view>
<view class="reviews-list" v-if="comments.length > 0">
<view
class="review-item"
v-for="(comment, index) in comments"
:key="index"
>
<view class="review-user">
<image :src="comment.avatar" class="user-avatar"></image>
<view class="user-info">
<view class="user-name">{{ comment.username }}</view>
</view>
<view class="review-time">{{ comment.time }}</view>
</view>
<view class="user-purchase">已购 {{ comment.product }}</view>
<view class="review-content">{{ comment.content }}</view>
<view class="review-images" v-if="comment.images.length > 0">
<image
:src="img"
class="review-img"
v-for="(img, idx) in comment.images"
:key="idx"
></image>
</view>
</view>
</view>
</view>
</u-popup>
<!-- 选择款式 -->
<u-popup
:show="showSize"
round="20rpx"
mode="bottom"
@close="closeSize"
@open="open"
>
<view class="popup-header">
<h3 class="popup-header-h3">选择款式</h3>
<view class="popup-header-view" @click="closeSize">取消</view>
</view>
<view class="itemSize_top">
<image :src="changeImg" class="itemSize-img"></image>
<view class="itemSize_info">
<view class="itemSize_name">{{ changeName }}</view>
<view class="itemSize_price">{{ changePrice }}/</view>
</view>
</view>
<view
class="itemSize"
v-for="(item, index) in info.commodity_goods_info_list"
:key="item.id"
@click="changeGG(item, index)"
:class="index == currentGGIndex ? 'itemSize_active' : ''"
>
{{ item.goods_name }} {{ item.goods_spec }} / {{ item.goods_unit }}
</view>
</u-popup>
</view> </view>
</template> </template>
@ -231,6 +406,38 @@ export default {
currentGGIndex: "", //index currentGGIndex: "", //index
carOrderList: [], carOrderList: [],
//
showReviewPopup: false,
comments: [
{
avatar: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
username: "TP",
product: "库尔勒香梨 10kg/箱",
content:
"踏入这家位于街角的餐厅,木质门框与暖黄灯光交织出温馨氛围,墙面上手绘的食材插画画透着文艺气息,开放式厨房的设计让食客能看见厨师处理食材的全过程,第一印象便给人以干净与安心。",
images: ["https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png"],
time: "2025-03-01 11:24:20",
},
{
avatar: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
username: "TP",
product: "库尔勒香梨 10kg/箱",
content:
"踏入这家位于街角的餐厅木质门框与暖黄灯光交织出温馨氛围墙面上手绘的食材插_draw着文艺气息开放式厨房的设计让食客能看见厨师处理食材的全过程第一印象便给人以干净与安心。",
images: [
"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
],
time: "2025-03-01 11:24:20",
},
],
show: false,
showSize: false,
changeImg: "",
changeName: "",
changePrice: "",
}; };
}, },
methods: { methods: {
@ -340,6 +547,10 @@ export default {
this.info = res; this.info = res;
this.currentGG = res.commodity_goods_info_list[0]; this.currentGG = res.commodity_goods_info_list[0];
this.currentGGIndex = 0; this.currentGGIndex = 0;
this.changeImg = this.currentGG.commodity_pic[0]
this.changeName = this.currentGG.goods_alias
this.changePrice = this.currentGG.sales_price
}); });
}, },
@ -358,6 +569,7 @@ export default {
// //
changeGG(item, index) { changeGG(item, index) {
console.log("🚀 ~ changeGG ~ item:", item);
this.currentGG = item; this.currentGG = item;
this.currentGGIndex = index; this.currentGGIndex = index;
if (this.currentGG.cart_count) { if (this.currentGG.cart_count) {
@ -365,6 +577,9 @@ export default {
} else { } else {
this.currentGG.cart_count = { count: 0 }; this.currentGG.cart_count = { count: 0 };
} }
this.changeImg = item.commodity_pic[0]
this.changeName = item.goods_alias
this.changePrice = item.sales_price
}, },
car() { car() {
NavgateTo("../shopCar/index"); NavgateTo("../shopCar/index");
@ -430,7 +645,8 @@ export default {
user_id: uni.getStorageSync("userId"), user_id: uni.getStorageSync("userId"),
goods_id_and_count: [ goods_id_and_count: [
{ {
goods_id: this.info.commodity_goods_info_list[this.currentGGIndex].id, goods_id:
this.info.commodity_goods_info_list[this.currentGGIndex].id,
count: newValue.value, count: newValue.value,
}, },
], ],
@ -444,6 +660,22 @@ export default {
}); });
}); });
}, },
showPopup() {
this.show = true;
},
showSizePopup() {
this.showSize = true;
},
close() {
this.show = false;
},
closeSize() {
this.showSize = false;
},
}, },
onLoad(options) { onLoad(options) {
const itemObj = JSON.parse(decodeURIComponent(options.item)); const itemObj = JSON.parse(decodeURIComponent(options.item));
@ -472,6 +704,8 @@ export default {
request(apiArr.updateCar, "POST", { request(apiArr.updateCar, "POST", {
goods_id_and_count, goods_id_and_count,
}).then((res) => {
console.log("Cart updated on hide");
}); });
return; return;
}, },

View File

@ -158,6 +158,7 @@ page {
overflow: hidden; overflow: hidden;
position: relative; position: relative;
overflow-y: auto; overflow-y: auto;
margin-bottom: 150rpx;
} }
.CateInfo_tit { .CateInfo_tit {
@ -197,7 +198,28 @@ page {
height: 140rpx; height: 140rpx;
border-radius: 20rpx 20rpx 20rpx 20rpx; border-radius: 20rpx 20rpx 20rpx 20rpx;
overflow: hidden; overflow: hidden;
margin-right: 3rpx; margin-right: 15rpx;
position: relative;
}
.tag {
background-color: #ff7d00;
color: white;
font-size: 22rpx;
padding: 5rpx 10rpx;
border-radius: 20rpx 0 20rpx 20rpx;
}
.tag-img {
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
.tag-text {
display: inline-block;
vertical-align: middle;
margin-right: 20rpx; margin-right: 20rpx;
} }
@ -485,8 +507,12 @@ page {
.GGItem_Image { .GGItem_Image {
width: 120rpx; width: 120rpx;
height: 100rpx; height: 100rpx;
border-radius: 20rpx 20rpx 20rpx 20rpx; margin: 0 20rpx 20rpx 0;
margin-right: 20rpx; position: relative;
}
.GGItem_Image image{
border-radius: 20rpx;
} }
.GGItem_Con_Tit { .GGItem_Con_Tit {
@ -531,13 +557,13 @@ page {
bottom: 0; bottom: 0;
} }
.shadowBox1{ .shadowBox1 {
height: 250rpx; height: 250rpx;
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
} }
.shop_car{ .shop_car {
width: 140rpx; width: 140rpx;
height: 140rpx; height: 140rpx;
position: fixed; position: fixed;
@ -545,7 +571,8 @@ page {
bottom: 180rpx; bottom: 180rpx;
z-index: 10; z-index: 10;
} }
.shop_car image{
.shop_car image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }

View File

@ -139,7 +139,7 @@
<!-- 右下阴影 --> <!-- 右下阴影 -->
<div class="boxshadow2" v-if="cateListShow"></div> <div class="boxshadow2" v-if="cateListShow"></div>
<div class="CateInfo" v-for="(item, index) in tagList" :key="item.id"> <div class="CateInfo" v-for="item in tagList" :key="item.id">
<div class="CateInfo_tit"> <div class="CateInfo_tit">
{{ item.tag_name }} {{ item.tag_name }}
</div> </div>
@ -150,6 +150,14 @@
> >
<div class="CateInfo_Item_Box"> <div class="CateInfo_Item_Box">
<div class="CateInfo_Item_left" @click="goods(items)"> <div class="CateInfo_Item_left" @click="goods(items)">
<view
class="tag tag-img"
v-if="
!items.commodity_goods_info_list[1] &&
items.commodity_goods_info_list[0].is_same_day
"
>当日达</view
>
<image <image
:src="picUrl + items.commodity_pic" :src="picUrl + items.commodity_pic"
mode="aspectFill" mode="aspectFill"
@ -157,18 +165,22 @@
</div> </div>
<div class="CateInfo_Item_right" :class="GGshow ? 'noneBor' : ''"> <div class="CateInfo_Item_right" :class="GGshow ? 'noneBor' : ''">
<div class="CateInfo_Item_right_Tit" @click="goods(items)"> <div class="CateInfo_Item_right_Tit" @click="goods(items)">
<view
class="tag tag-text"
v-if="
!items.commodity_goods_info_list[1] &&
items.commodity_goods_info_list[0].is_same_day
"
>当日达</view
>
{{ items.commodity_name }} {{ items.commodity_name }}
</div> </div>
<div <div class="CateInfo_Item_right_subtit" @click="goods(items)">
class="CateInfo_Item_right_subtit"
@click="goods(items)"
>
{{ items.commodity_intro }} {{ items.commodity_intro }}
</div> </div>
<div class="CateInfo_Item_Money"> <div class="CateInfo_Item_Money">
<div class="CateInfo_Item_Money_left"> <div class="CateInfo_Item_Money_left">
<span></span {{ getPriceRange(items.commodity_goods_info_list) }}
>{{ items.commodity_goods_info_list[0].sales_price }}
</div> </div>
<div <div
class="CateInfo_Item_Money_right" class="CateInfo_Item_Money_right"
@ -231,16 +243,23 @@
<div <div
class="GGItem" class="GGItem"
v-for="ite in items.commodity_goods_info_list" v-for="ite in items.commodity_goods_info_list"
:key="ite.id"
@click="goods(items)" @click="goods(items)"
> >
<div class="GGItem_Image"> <div class="GGItem_Image">
<view class="tag tag-img" v-if="ite.is_same_day">当日达</view>
<image <image
:src="picUrl + ite.commodity_pic" :src="picUrl + ite.commodity_pic"
mode="aspectFill" mode="aspectFill"
></image> ></image>
</div> </div>
<div class="GGItem_Con"> <div class="GGItem_Con">
<div class="GGItem_Con_Tit">{{ ite.goods_name }}</div> <div class="GGItem_Con_Tit">
<view class="tag tag-text" v-if="ite.is_same_day"
>当日达</view
>
{{ ite.goods_name }}
</div>
<div class="GGItem_Con_Msg"> <div class="GGItem_Con_Msg">
<div class="GGItem_Con_Msg_left"> <div class="GGItem_Con_Msg_left">
<span></span>{{ ite.sales_price }} <span></span>{{ ite.sales_price }}
@ -286,7 +305,7 @@
</div> </div>
</div> </div>
<nav-footer :current="2" /> <!-- <nav-footer :current="3" /> -->
<div class="shop_car" @click="shopCar"> <div class="shop_car" @click="shopCar">
<u-badge <u-badge
@ -376,6 +395,8 @@ export default {
carNum: "", carNum: "",
goodsDetail: [], goodsDetail: [],
showTag: false, //
}; };
}, },
methods: { methods: {
@ -459,7 +480,6 @@ export default {
}); });
}); });
this.tagList = res.commodity_list; this.tagList = res.commodity_list;
console.log("🚀 ~ getGoodsList ~ this.tagList:", this.tagList)
}); });
}, },
@ -467,7 +487,9 @@ export default {
request(apiArr.getCar, "POST").then((res) => { request(apiArr.getCar, "POST").then((res) => {
console.log(res); console.log(res);
this.carNum = res.total; this.carNum = res.total;
this.goodsDetail = res.commodity_cart_list; //
this.goodsDetail = [].concat(res.same_day_cart_list, res.normal_cart_list)
.flatMap(supplier => supplier.commodity_cart_and_goods_model);
}); });
}, },
@ -504,6 +526,13 @@ export default {
}); });
}); });
}, },
getPriceRange(goodsList) {
if (!goodsList || goodsList.length === 0) return '¥0';
const prices = goodsList.map(item => Number(item.sales_price));
const minPrice = Math.min(...prices);
const maxPrice = Math.max(...prices);
return minPrice === maxPrice ? `${minPrice}` : `${minPrice} ~ ¥${maxPrice}`;
},
}, },
onLoad(options) { onLoad(options) {
const meun = menuButtonInfo(); const meun = menuButtonInfo();

View File

@ -29,11 +29,11 @@
<div class="goodsItem_left" @click="changeChecked(item, index)"> <div class="goodsItem_left" @click="changeChecked(item, index)">
<image <image
v-if="!item.checked" v-if="!item.checked"
src="http://192.168.0.172:5500/7.15/shop_checked1.png" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_check1.png"
></image> ></image>
<image <image
v-if="item.checked" v-if="item.checked"
src="http://192.168.0.172:5500/7.15/shop_checked2.png" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_check2.png"
></image> ></image>
</div> </div>
<div class="goodsItem_right"> <div class="goodsItem_right">

View File

@ -73,7 +73,7 @@
</view> </view>
</view> </view>
</view> </view>
<nav-footer /> <nav-footer :current="4"/>
</view> </view>
</template> </template>
@ -122,6 +122,8 @@ export default {
uni.removeStorageSync('is_shop'); uni.removeStorageSync('is_shop');
uni.removeStorageSync('shopId'); uni.removeStorageSync('shopId');
uni.removeStorageSync('order_dispatch_permission'); uni.removeStorageSync('order_dispatch_permission');
uni.removeStorageSync('work_order_permission');
const button = uni.createSelectorQuery().select('#hiddenLoginBtn'); const button = uni.createSelectorQuery().select('#hiddenLoginBtn');
button.boundingClientRect().exec(); button.boundingClientRect().exec();
@ -230,6 +232,7 @@ export default {
if (item) { if (item) {
const { community_worker } = res; const { community_worker } = res;
uni.setStorageSync('order_dispatch_permission', community_worker && community_worker[0].order_dispatch_permission == 1 || false); uni.setStorageSync('order_dispatch_permission', community_worker && community_worker[0].order_dispatch_permission == 1 || false);
uni.setStorageSync('work_order_permission', community_worker && community_worker[0].work_order_permission == 1 || false);
uni.setStorageSync('phone', res.account); uni.setStorageSync('phone', res.account);
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({

View File

@ -141,9 +141,17 @@ page {
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
.btn_view > .btn { .btn_view_btn {
margin: 40rpx 20rpx;
width: 300rpx; width: 300rpx;
height: 90rpx; height: 90rpx;
line-height: 90rpx;
text-align: center;
background: linear-gradient( 91deg, #FF7658 0%, #FF370B 100%);
border-radius: 100rpx 100rpx 100rpx 100rpx;
font-size: 36rpx;
color: #FFFFFF;
font-weight: 600;
} }
.btn { .btn {
margin: 40rpx auto 60rpx; margin: 40rpx auto 60rpx;

View File

@ -1,230 +1,204 @@
<template> <template>
<div class="container"> <view class="container">
<div <view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
class="searchBox" <view class="searchBox_add">
:style="{ height: localHeight + 'px', paddingTop: top + 'px' }" <view class="searchBox_left">
> <u-icon bold color="#000" size="40" name="arrow-left" @click="headerBackClick"></u-icon>
<div class="searchBox_add"> </view>
<div class="searchBox_left"> <view class="searchBox_mid">工单详情</view>
<u-icon <view class="searchBox_right"></view>
bold </view>
color="#000" </view>
size="40"
name="arrow-left"
@click="headerBackClick"
></u-icon>
</div>
<div class="searchBox_mid">工单详情</div>
<div class="searchBox_right"></div>
</div>
</div>
<div class="repairMsg"> <view class="repairMsg">
<div :class="['orderItemTit', statusType[info.status].style]"> <view :class="['orderItemTit', statusType[info.status].style]">
<div class="orderItemTit_left">工单编号{{ info.order_code }}</div> <view class="orderItemTit_left">工单编号{{ info.order_code }}</view>
<div class="orderItemTit_right">{{ statusType[info.status].desc }}</div> <view class="orderItemTit_right">{{ statusType[info.status].desc }}</view>
</div> </view>
<div class="row"> <view class="row">
<div class="row_label">小区房源名称</div> <view class="row_label">小区房源名称</view>
<div class="row_con">{{ info.room.name }}</div> <view class="row_con">{{ info.room.name }}</view>
</div> </view>
<div class="row"> <view class="row">
<div class="row_label">报修类型</div> <view class="row_label">报修类型</view>
<div class="row_con">{{ info.ac.category_name }}</div> <view class="row_con">{{ info.ac.category_name }}</view>
</div> </view>
<div class="row"> <view class="row">
<div class="row_label">问题描述</div> <view class="row_label">问题描述</view>
<div class="row_con">{{ info.problem_description }}</div> <view class="row_con">{{ info.problem_description }}</view>
</div> </view>
<div class="row"> <view class="row">
<div class="row_label">联系人</div> <view class="row_label">联系人</view>
<div class="row_con">{{ info.contact_name }}</div> <view class="row_con">{{ info.contact_name }}</view>
</div> </view>
<div class="row"> <view class="row">
<div class="row_label">联系电话</div> <view class="row_label">联系电话</view>
<div class="row_con">{{ info.contact_phone }}</div> <view class="row_con">{{ info.contact_phone }}</view>
</div> </view>
<div class="row"> <view class="row">
<div class="row_label">上门时间</div> <view class="row_label">上门时间</view>
<div class="row_con">{{ info.service_time }}</div> <view class="row_con">{{ info.service_time }}</view>
</div> </view>
</div> </view>
<div class="repairMsg"> <view class="repairMsg">
<div class="row"> <view class="row">
<div class="row_label df">图片</div> <view class="row_label df">图片</view>
<div class="row_con"> <view class="row_con">
<view v-if="info.imagesList && info.imagesList.length == 0">暂无图片</view> <view v-if="info.imagesList && info.imagesList.length == 0">暂无图片</view>
<image <image v-else v-for="(item, index) in info.imagesList" :key="index" :src="item" mode=""
v-else @click="handlerPreviewImageClick(item)">
v-for="(item, index) in info.imagesList"
:key="index"
:src="item"
mode=""
@click="handlerPreviewImageClick(item)"
>
</image> </image>
</div> </view>
</div> </view>
<div class="row"> <view class="row">
<div class="row_label df">视频</div> <view class="row_label df">视频</view>
<div class="row_con"> <view class="row_con">
<view v-if="info.videosList && info.videosList.length == 0">暂无视频</view> <view v-if="info.videosList && info.videosList.length == 0">暂无视频</view>
<div v-else v-for="(item, index) in info.videosList" :key="index" class="videoBOX"> <view v-else v-for="(item, index) in info.videosList" :key="index" class="videoBOX">
<video id="myVideo" :src="item" playsinline webkit-playsinline></video> <video id="myVideo" :src="item" playsinline webkit-playsinline></video>
</div> </view>
</div> </view>
</div> </view>
<div class="row" v-if="info.assign_time"> <view class="row" v-if="info.assign_time">
<div class="row_label">指派时间</div> <view class="row_label">指派时间</view>
<div class="row_con noneBor">{{ info.assign_time }}</div> <view class="row_con noneBor">{{ info.assign_time }}</view>
</div> </view>
</div> </view>
<!-- 维修状态非带指派 --> <!-- 维修状态非带指派 -->
<div class="repairMsg" v-if="info.status !== 1"> <view class="repairMsg" v-if="info.status !== 1">
<div class="row"> <view class="row">
<div class="row_label">维修师傅</div> <view class="row_label">维修师傅</view>
<div class="row_con">{{ info.repairman_worker.name }}</div> <view class="row_con">{{ info.repairman_worker.name }}</view>
</div> </view>
<div class="row"> <view class="row">
<div class="row_label">师傅手机号</div> <view class="row_label">师傅手机号</view>
<div class="row_con">{{ info.repairman_worker.mobile }}</div> <view class="row_con">{{ info.repairman_worker.mobile }}</view>
</div> </view>
<div class="row"> <view class="row">
<div class="row_label">师傅工号</div> <view class="row_label">师傅工号</view>
<div class="row_con noneBor">{{ info.repairman_worker.emp_no }}</div> <view class="row_con noneBor">{{ info.repairman_worker.emp_no }}</view>
</div> </view>
</div> </view>
<!-- 工单状态非带指派或者进行中 --> <!-- 工单状态非带指派或者进行中 -->
<div class="repairMsg" v-if="info.status !== 1 && info.status !== 2"> <view class="repairMsg" v-if="info.status !== 1 && info.status !== 2">
<div class="row"> <view class="row">
<div class="row_label df">维修图片</div> <view class="row_label df">维修图片</view>
<div class="row_con"> <view class="row_con">
<view v-if="info.repairImagesList && info.repairImagesList.length == 0">暂无图片</view> <view v-if="info.repairImagesList && info.repairImagesList.length == 0">暂无图片</view>
<image <image v-for="(item, index) in info.repairImagesList" :key="index" :src="item" mode=""
v-for="(item, index) in info.repairImagesList" @click="headerRepairImagesClick(item)" />
:key="index" </view>
:src="item" </view>
mode=""
@click="headerRepairImagesClick(item)"
/>
</div>
</div>
<div class="row"> <view class="row">
<div class="row_label df">维修视频</div> <view class="row_label df">维修视频</view>
<div class="row_con"> <view class="row_con">
<view v-if="info.repairVideosList && info.repairVideosList.length == 0">暂无视频</view> <view v-if="info.repairVideosList && info.repairVideosList.length == 0">暂无视频</view>
<div v-else v-for="(item, index) in info.repairVideosList" :key="index" class="videoBOX"> <view v-else v-for="(item, index) in info.repairVideosList" :key="index" class="videoBOX">
<video id="myVideo" :src="item" playsinline webkit-playsinline></video> <video id="myVideo" :src="item" playsinline webkit-playsinline></video>
</div> </view>
</div> </view>
</div> </view>
<div class="row"> <view class="row">
<div class="row_label">维修描述</div> <view class="row_label">维修描述</view>
<div class="row_con noneBor">{{ info.repair_description || '暂无描述' }}</div> <view class="row_con noneBor">{{ info.repair_description || '暂无描述' }}</view>
</div> </view>
</div> </view>
<div class="repairMsg" v-if="type === 'edit'"> <view class="repairMsg" v-if="type === 'edit'">
<div class="repairMedia"> <view class="repairMedia">
<div class="edit_row df"> <view class="edit_row df">
<div class="row_label">维修图片</div> <view class="row_label">维修图片</view>
<div class="row_con2"> <view class="row_con2">
<u-upload :fileList="imgList" name="imgList" @afterRead="afterReadImg" @delete="deletePic" multiple <u-upload :fileList="imgList" name="imgList" @afterRead="afterReadImg" @delete="deletePic" multiple
:maxCount="10"> :maxCount="10">
<div class="imgCon"> <view class="imgCon">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_imageImg.png" mode="widthFix"></image> <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_imageImg.png"
mode="widthFix"></image>
上传图片 上传图片
</div> </view>
</u-upload> </u-upload>
</div> </view>
</div> </view>
<div class="edit_row df"> <view class="edit_row df">
<div class="row_label">上传视频</div> <view class="row_label">上传视频</view>
<div class="row_con2"> <view class="row_con2">
<u-upload v-if="!videoList.url" :fileList="videoList" @afterRead="afterReadVideo" @delete="deleteVideo" name="videoList" <u-upload v-if="!videoList.url" :fileList="videoList" @afterRead="afterReadVideo" @delete="deleteVideo"
:maxCount="1" accept="video"> name="videoList" :maxCount="1" accept="video">
<div class="imgCon"> <view class="imgCon">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_videoImg.png" mode="widthFix"></image> <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_videoImg.png"
mode="widthFix"></image>
上传视频 上传视频
</div> </view>
</u-upload> </u-upload>
<div v-if="videoList.url" class="videoBOX"> <view v-if="videoList.url" class="videoBOX">
<video id="myVideo" :src="videoList.url" playsinline webkit-playsinline></video> <video id="myVideo" :src="videoList.url" playsinline webkit-playsinline></video>
<div class="mask" @click="playFullScreenVideo"> <view class="mask" @click="playFullScreenVideo">
<!-- <div class="mask_con"> <!-- <view class="mask_con">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_play.png" mode="widthFix"></image> <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_play.png" mode="widthFix"></image>
</div> --> </view> -->
<div class="mask_cancel" @click="cancels">删除</div> <view class="mask_cancel" @click="cancels">删除</view>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
</div> </view>
<div class="edit_row"> <view class="edit_row">
<div class="row_label">维修描述</div> <view class="row_label">维修描述</view>
<textarea placeholder="请输入维修描述" :value="repairRemarks" data-name="repairRemarks" @input="handlerInputClick" auto-height /> <textarea placeholder="请输入维修描述" :value="repairRemarks" data-name="repairRemarks" @input="handlerInputClick"
</div> auto-height />
</div> </view>
<div </view>
class="white_container" <view class="white_container" v-if="info.status == 2 && type === 'edit'" @click="headerChangeStateClick">
v-if="info.status == 2 && type === 'edit'" <view style="display: flex; justify-content: space-between">
@click="headerChangeStateClick" <view style="display: flex">
> <view class="white_label">工单状态</view>
<div style="display: flex; justify-content: space-between"> <view class="whit_desc">
<div style="display: flex">
<div class="white_label">工单状态</div>
<div class="whit_desc">
{{ orderState.desc }} {{ orderState.desc }}
</div> </view>
</div> </view>
<u-icon name="arrow-up" v-if="!orderSelect" /> <u-icon name="arrow-up" v-if="!orderSelect" />
<u-icon name="arrow-down" v-if="orderSelect" /> <u-icon name="arrow-down" v-if="orderSelect" />
</div> </view>
<view class="statePupop" v-if="orderSelect"> <view class="statePupop" v-if="orderSelect">
<view <view class="statePopop_label" v-for="(item, index) in orderStateList" :key="index"
class="statePopop_label" @click.stop="headerSelectClick(item)">{{ item.desc }}</view>
v-for="(item, index) in orderStateList" </view>
:key="index"
@click.stop="headerSelectClick(item)"
>{{ item.desc }}</view>
</view> </view>
</div>
<div class="btn_view" v-if="info.status == 1 && order_dispatch_permission"> <view class="btn_view">
<view class="btn" @click="headerTakeClick">接单</view> <view v-if="info.status == 1 && order_dispatch_permission">
<view class="btn" @click="headerSelectMasterClick">派单</view> <view class="btn_view_btn" @click="headerSelectMasterClick">派单</view>
</div> </view>
<view v-if="info.status == 1 && work_order_permission && allow_grab_order">
<view class="btn_view_btn" @click="headerTakeClick">接单</view>
</view>
</view>
<!-- 待派单状态 无派单权限按钮 --> <!-- 待派单状态 无派单权限按钮 -->
<div class="btn" v-else-if="info.status == 1" @click="headerTakeClick">接单</div> <!-- <view class="btn" v-else-if="info.status == 1" @click="headerTakeClick">接单</view> -->
<!-- 进行中状态编辑维修信息 --> <!-- 进行中状态编辑维修信息 -->
<div class="btn" v-if="info.status == 2" @click="headerEditClick"> <view class="btn" v-if="info.status == 2" @click="headerEditClick">
{{ type === "edit" ? "确定" : "编辑" }} {{ type === "edit" ? "确定" : "编辑" }}
</div> </view>
<u-popup <u-popup :show="show" @close="close" round="50rpx" style="height: 50%; overflow: hidden">
:show="show"
@close="close"
round="50rpx"
style="height: 50%; overflow: hidden"
>
<view class="master_popup"> <view class="master_popup">
<view class="master_popup_title"> <view class="master_popup_title">
<view></view> <view></view>
@ -238,20 +212,21 @@
<view class="master_popup_tabel_left"> <view class="master_popup_tabel_left">
<view class="master_popup_label"> <view class="master_popup_label">
<view class="label">师傅名称</view> <view class="label">师傅名称</view>
<view>{{item.name}}</view> <view>{{ item.name }}</view>
</view> </view>
<view class="master_popup_label"> <view class="master_popup_label">
<view class="label">师傅手机号</view> <view class="label">师傅手机号</view>
<view>{{ item.mobile }}</view> <view>{{ item.mobile }}</view>
</view> </view>
</view> </view>
<radio :value="item.worker_id" @click="headerRadioClick" :data-name="item.worker_id" :checked="checked === item.worker_id" /> <radio :value="item.worker_id" @click="headerRadioClick" :data-name="item.worker_id"
:checked="checked === item.worker_id" />
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</u-popup> </u-popup>
</div> </view>
</template> </template>
<script> <script>
@ -313,6 +288,9 @@ export default {
show: false, show: false,
communityMasterList: [], communityMasterList: [],
order_dispatch_permission: false, order_dispatch_permission: false,
work_order_permission: false,
allow_grab_order: false,
repairRemarks: '', // repairRemarks: '', //
imgList: [], imgList: [],
videoList: {}, videoList: {},
@ -352,8 +330,8 @@ export default {
}, },
// //
async afterReadImg(e){ async afterReadImg(e) {
const { file} = e; const { file } = e;
console.log(e); console.log(e);
file.forEach(item => { file.forEach(item => {
upload(item.url, res => { upload(item.url, res => {
@ -373,7 +351,7 @@ export default {
deletePic(e) { deletePic(e) {
this.imgList.splice(e.index, 1); this.imgList.splice(e.index, 1);
}, },
afterReadVideo(e){ afterReadVideo(e) {
uploadVideo(e.file.url, res => { uploadVideo(e.file.url, res => {
this.videoList = { this.videoList = {
url: picUrl + res.data.url, url: picUrl + res.data.url,
@ -421,7 +399,7 @@ export default {
}, },
// input // input
handlerInputClick(e) { handlerInputClick(e) {
const { name} = e.currentTarget.dataset; const { name } = e.currentTarget.dataset;
this[name] = e.detail.value this[name] = e.detail.value
}, },
@ -504,13 +482,18 @@ export default {
console.log("1111", options); console.log("1111", options);
const order_dispatch_permission = uni.getStorageSync('order_dispatch_permission'); const order_dispatch_permission = uni.getStorageSync('order_dispatch_permission');
this.order_dispatch_permission = order_dispatch_permission; this.order_dispatch_permission = order_dispatch_permission;
const work_order_permission = uni.getStorageSync('work_order_permission');
this.work_order_permission = work_order_permission;
const allow_grab_order = uni.getStorageSync('allow_grab_order');
this.allow_grab_order = allow_grab_order;
const meun = menuButtonInfo(); const meun = menuButtonInfo();
this.top = meun.top; this.top = meun.top;
this.localHeight = meun.height; this.localHeight = meun.height;
this.init(options.id); this.init(options.id);
}, },
onShow() {}, onShow() { },
}; };
</script> </script>

View File

@ -0,0 +1,115 @@
.container {
display: flex;
flex-direction: column;
/* min-height: 100vh; */
background-color: #ffffff;
}
.searchBox {
display: flex;
align-items: center;
/* position: absolute; */
left: 0;
z-index: 2;
}
.searchBox_add {
margin: 10rpx 20rpx;
display: flex;
align-items: center;
}
.top-image{
width: 50rpx;
height: 50rpx;
}
.emptyCommunity {
font-size: 28rpx;
color: #222222;
width: auto;
height: 44rpx;
padding: 5rpx 15rpx;
border-radius: 100rpx 100rpx 100rpx 100rpx;
display: flex;
align-items: center;
justify-content: center;
}
/* 背景图片区域 */
.bg-image-container {
position: relative;
width: 100%;
height: 500rpx;
overflow: hidden;
}
.bg-image {
width: 100%;
height: 100%;
}
.search-box {
position: absolute;
bottom: 50rpx;
left: 50%;
transform: translateX(-50%);
width: 80%;
height: 70rpx;
background-color: rgba(255, 255, 255, 0.9);
border-radius: 10rpx;
display: flex;
align-items: center;
justify-content: center;
}
.search-placeholder {
font-size: 26rpx;
color: #999999;
}
/* 工单台区域 */
.work-order-section {
display: grid;
grid-template-columns: repeat(3, 1fr);
/* 创建3列等宽的网格 */
}
.work-order-card {
width: 246rpx;
height: 200rpx;
background-color: #ffffff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border: 1rpx solid #f7f7f7;
}
.work-order-icon {
width: 100rpx;
height: 100rpx;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 10rpx;
}
.work-order-icon .iconfont {
color: #ffffff;
margin: 0;
}
.work-order-text {
font-size: 26rpx;
color: #333333;
font-weight: bold;
}
/* 适配不同屏幕尺寸 */
@media screen and (min-width: 768px) {
.container {
max-width: 768px;
margin: 0 auto;
}
}

View File

@ -0,0 +1,82 @@
<template>
<view class="container">
<view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
<view class="searchBox_add" @click="addCommunity">
<image class="top-image" src="http://localhost:8080/workOrder_community.png" mode="aspectFill"></image>
<view class="emptyCommunity">
{{ communityVal }}
</view>
</view>
</view>
<!-- 背景图片区域 -->
<view class="bg-image-container">
<image class="bg-image" src="http://localhost:8080/test.png" mode="aspectFill"></image>
<!-- <input class="search-box" placeholder='输入工单号进入工单' confirm-type='search' @input="searchInput"
@confirm="searchInput" :value="selectKeyWord" /> -->
<!-- <view class="search-box">
<text class="search-placeholder">输入工单号进入工单</text>
</view> -->
</view>
<view class="work-order-section">
<view v-for="(item, index) in 9" :key="index">
<view class="work-order-card" v-if="index == 0 && showWorkOrderSection"
@click="navigateToWorkOrderDashboard">
<image class="work-order-icon" src="http://localhost:8080/workOrder.png" mode="aspectFill" />
<text class="work-order-text">工单台</text>
</view>
<view class="work-order-card" v-else></view>
</view>
</view>
</view>
</template>
<script>
import {
request,
picUrl,
uniqueByField,
menuButtonInfo,
NavgateTo,
} from "../../../utils";
import { apiArr } from "../../../api/community";
export default {
data() {
return {
communityVal: "添加我的房产",
showWorkOrderSection: false
}
},
onLoad() {
const workOrderPermission = uni.getStorageSync('work_order_permission');
const orderDispatchPermission = uni.getStorageSync('order_dispatch_permission');
this.showWorkOrderSection = !(workOrderPermission === false && orderDispatchPermission === false);
},
async onShow() {
this.communityVal = uni.getStorageSync('changeCommData').name;
const params = {
community_id: uni.getStorageSync('changeCommData').id,
}
const res = await request(apiArr.communityInfo, "POST", params);
uni.setStorageSync('allow_grab_order', res.allow_grab_order == 1 ? true : false);
},
methods: {
addCommunity() {
NavgateTo("/packages/workOrderDashboard/myCommunity/index");
},
//
navigateToWorkOrderDashboard() {
uni.navigateTo({
url: '/packages/workOrderDashboard/index/index'
});
}
}
}
</script>
<style scoped>
/* 引入外部CSS文件 */
@import url("./index.css");
</style>

View File

@ -1,85 +1,85 @@
<template> <template>
<view class="box"> <view class="box">
<div class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }"> <view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
<div class="searchBox_add"> <view class="searchBox_add">
<div class="searchBox_left"> <view class="searchBox_left">
<u-icon bold color="#000" size="40" name="arrow-left" @click="headerBackClick"></u-icon> <u-icon bold color="#000" size="40" name="arrow-left" @click="headerBackClick"></u-icon>
</div> </view>
<div class="searchBox_mid">工作台</div> <view class="searchBox_mid">工单台</view>
<div class="searchBox_right"></div> <view class="searchBox_right"></view>
</div> </view>
</div> </view>
<div class="tabList"> <view class="tabList">
<div <view
:class="active == 1 ? 'tab active' : 'tab'" :class="active == 1 ? 'tab active' : 'tab'"
@click="headerTabsClick(1)" @click="headerTabsClick(1)"
> >
待指派 <span>({{awaitingNumb}})</span> 待指派 <span>({{awaitingNumb}})</span>
</div> </view>
<div <view
:class="active == 2 ? 'tab active' : 'tab'" :class="active == 2 ? 'tab active' : 'tab'"
@click="headerTabsClick(2)" @click="headerTabsClick(2)"
> >
进行中 <span>({{ underwayNum }})</span> 进行中 <span>({{ underwayNum }})</span>
</div> </view>
<div <view
:class="active == 4 ? 'tab active' : 'tab'" :class="active == 4 ? 'tab active' : 'tab'"
@click="headerTabsClick(4)" @click="headerTabsClick(4)"
> >
已作废 <span>({{ discardNum }})</span> 已作废 <span>({{ discardNum }})</span>
</div> </view>
<div <view
:class="active == 3 ? 'tab active' : 'tab'" :class="active == 3 ? 'tab active' : 'tab'"
@click="headerTabsClick(3)" @click="headerTabsClick(3)"
> >
已完成 <span>({{ doneNum }})</span> 已完成 <span>({{ doneNum }})</span>
</div> </view>
</div> </view>
<div class="orderList" v-for="(item, index) in list" :key="index"> <view class="orderList" v-for="(item, index) in list" :key="index">
<div class="orderItem" @click="handlerDetailClick(item.id)"> <view class="orderItem" @click="handlerDetailClick(item.id)">
<div :class="['orderItemTit', statusType[item.status].style]"> <view :class="['orderItemTit', statusType[item.status].style]">
<div class="orderItemTit_left">工单编号{{ item.order_code }}</div> <view class="orderItemTit_left">工单编号{{ item.order_code }}</view>
<div class="orderItemTit_right">{{ item.create_time }}</div> <view class="orderItemTit_right">{{ item.create_time }}</view>
</div> </view>
<div class="orderItem_row"> <view class="orderItem_row">
<div class="df"> <view class="df">
<div class="orderItem_row_label">小区房源名称</div> <view class="orderItem_row_label">小区房源名称</view>
<div class="orderItem_row_con">{{ item.room.name }}</div> <view class="orderItem_row_con">{{ item.room.name }}</view>
</div> </view>
<div :class="['orderItem_row_state', statusType[item.status].color]"> <view :class="['orderItem_row_state', statusType[item.status].color]">
{{ statusType[item.status].desc }} {{ statusType[item.status].desc }}
</div> </view>
</div> </view>
<div class="orderItem_row"> <view class="orderItem_row">
<div class="orderItem_row_label">报修类型</div> <view class="orderItem_row_label">报修类型</view>
<div class="orderItem_row_con">{{ item.ac.category_name }}</div> <view class="orderItem_row_con">{{ item.ac.category_name }}</view>
</div> </view>
<div class="orderItem_row"> <view class="orderItem_row">
<div class="orderItem_row_label">问题描述</div> <view class="orderItem_row_label">问题描述</view>
<div class="orderItem_row_con">{{ item.problem_description }}</div> <view class="orderItem_row_con">{{ item.problem_description }}</view>
</div> </view>
<div class="orderItem_row"> <view class="orderItem_row">
<div class="orderItem_row_label">上门时间</div> <view class="orderItem_row_label">上门时间</view>
<div class="orderItem_row_con">{{ item.service_time }}</div> <view class="orderItem_row_con">{{ item.service_time }}</view>
</div> </view>
<div class="orderItem_row"> <view class="orderItem_row">
<div class="orderItem_row_label">联系人</div> <view class="orderItem_row_label">联系人</view>
<div class="orderItem_row_con">{{ item.contact_name }}</div> <view class="orderItem_row_con">{{ item.contact_name }}</view>
</div> </view>
<div class="orderItem_row"> <view class="orderItem_row">
<div class="orderItem_row_label">联系人手机号</div> <view class="orderItem_row_label">联系人手机号</view>
<div class="orderItem_row_con">{{ item.contact_phone }}</div> <view class="orderItem_row_con">{{ item.contact_phone }}</view>
</div> </view>
</div> </view>
</div> </view>
</view> </view>
</template> </template>

View File

@ -0,0 +1,98 @@
page {
background-color: #f6f7fb;
padding: 0;
}
.container {
min-height: 100vh;
}
image {
width: 100%;
height: 100%;
}
.empty {
font-size: 28rpx;
color: #999999;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-top: 180rpx;
}
.empty image {
width: 340rpx;
height: 240rpx;
}
.addBtn {
width: 600rpx;
height: 90rpx;
background: linear-gradient(91deg, #FF7658 0%, #FF370B 100%);
border-radius: 100rpx 100rpx 100rpx 100rpx;
font-size: 36rpx;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
position: fixed;
left: 50%;
transform: translateX(-50%);
bottom: 100rpx;
}
.communityList {
padding: 0 20rpx;
background-color: #fff;
margin-top: 20rpx;
}
.communityItem {
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1rpx solid #EBEBEB;
padding: 30rpx 0;
}
.communityItem_left{
display: flex;
align-items: center;
}
.communityItem_left_img {
width: 160rpx;
height: 140rpx;
border-radius: 20rpx;
overflow: hidden;
margin-right: 30rpx;
}
.communityItem_left_msg{
flex: 1;
}
.communityItem_left_msg_tit {
font-size: 30rpx;
color: #222222;
}
.communityItem_left_msg_tit span {
color: #FF370B;
}
.communityItem_left_msg_msg {
font-size: 26rpx;
color: #999999;
}
.communityItem_right{
width: 34rpx;
height: 34rpx;
margin-left: 80rpx;
}
/* 最后一个 communityItem */
.communityItem:last-child {
border-bottom: none;
}

View File

@ -0,0 +1,100 @@
<template>
<view class="container">
<view class="empty" v-if="communityList.length == 0">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_newEmpty.png"
alt="" />
没有添加任何房产
</view>
<div class="communityList">
<div class="communityItem" v-for="item in communityList" :key="item.community_id"
@click="choseCommunity(item)">
<div class="communityItem_left">
<div class="communityItem_left_img">
<image :src="item.pic" mode="aspectFill"></image>
</div>
<div class="communityItem_left_msg">
<div class="communityItem_left_msg_tit">{{ item.name }}<span> {{ item.room_owner_list.length }}
</span></div>
<div class="communityItem_left_msg_msg">{{ item.addr }}</div>
</div>
</div>
<div class="communityItem_right">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_check1.png"
v-if="item.community_id != currentCommunity.id"></image>
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_check2.png"
v-if="item.community_id == currentCommunity.id"></image>
</div>
</div>
</div>
<!-- <div class="addBtn" @click="addCommunity">添加我的房产</div> -->
</view>
</template>
<script>
import {
request,
NavgateTo,
isPhone,
picUrl
} from '../../../utils';
import {
apiArr
} from '../../../api/community';
export default {
data() {
return {
communityList: [],
page_num: 1,
page_size: 10,
currentCommunity: {}
}
},
methods: {
addCommunity() {
NavgateTo("/packages/community/addCommunity/index")
},
async getList() {
await request(apiArr.commInfo, "POST", {
user_id: uni.getStorageSync('userId'),
longitude: uni.getStorageSync('location').lng,
latitude: uni.getStorageSync('location').lat,
page_num: this.page_num,
page_size: this.page_size
}).then(res => {
res.rows.forEach(item => {
item.pic = item.pic.startsWith('http') ? item.pic : picUrl + item.pic
});
this.communityList = res.rows.filter(item => item.front_end_display !== 1)
})
},
// toUpview(item) {
// uni.setStorageSync('changeCommData', { id: item.community_id, name: item.name });
// NavgateTo("/packages/community/index/index")
// },
choseCommunity(e) {
this.currentCommunity = e
uni.setStorageSync('changeCommData', { id: e.community_id, name: e.name });
uni.setStorageSync('currentCommunityAddr',e.addr);
uni.setStorageSync("isShowNav", e.room_owner_list[0].type)
NavgateTo("1")
},
},
onLoad(options) {
this.currentCommunity = uni.getStorageSync('changeCommData')
console.log(this.currentCommunity, 'currentCommunity');
this.getList();
},
onReachBottom() { },
}
</script>
<style>
@import url("./index.css");
</style>

View File

@ -95,6 +95,20 @@
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "guide/index",
"style": {
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#fff"
}
},
{
"path": "myCommunity/index",
"style": {
"navigationBarTitleText": "选择小区",
"navigationBarBackgroundColor": "#fff"
}
} }
] ]
}, },
@ -477,7 +491,7 @@
{ {
"path": "index/index", "path": "index/index",
"style": { "style": {
"navigationBarTitleText": "本地生活", "navigationBarTitleText": "",
"navigationBarBackgroundColor": "#fff" "navigationBarBackgroundColor": "#fff"
} }
}, },
@ -714,7 +728,14 @@
} }
}, },
{ {
"path": "noticeDetials/index", "path": "noticeManage/index",
"style": {
"navigationBarTitleText": "公告管理",
"navigationBarBackgroundColor": "#fff"
}
},
{
"path": "noticeDetails/index",
"style": { "style": {
"navigationBarTitleText": "公告详情", "navigationBarTitleText": "公告详情",
"navigationBarBackgroundColor": "#fff" "navigationBarBackgroundColor": "#fff"
@ -779,6 +800,12 @@
"style": { "style": {
"navigationBarTitleText": "选择自提点" "navigationBarTitleText": "选择自提点"
} }
},
{
"path": "evaluate/index",
"style": {
"navigationBarTitleText": "评价"
}
} }
] ]
} }

View File

@ -1,13 +1,46 @@
.container { .container {
background-color: #f9f9f9; background-color: #f9f9f9;
} }
.hot-word-container {
width: auto;
height: 50rpx;
overflow: hidden;
position: relative;
/* flex: 1; */
border-radius: 50rpx;
/* margin: 0 20rpx; */
}
.hot-word-scroll {
transition: transform 0.5s ease;
}
.hot-word-item {
height: 50rpx;
line-height: 50rpx;
padding: 0 15rpx;
color: #666;
}
.hot-word-item:active {
background-color: #f5f5f5;
}
.searchBox2 {
display: flex;
align-items: center;
}
.white_container { .white_container {
background: #FFFFFF; background: #FFFFFF;
padding: 0 20rpx; padding: 0 20rpx;
} }
page { page {
background-color: #FFFFFF; background-color: #FFFFFF;
} }
.grid_Pic { .grid_Pic {
width: 61.5rpx; width: 61.5rpx;
height: 63.14rpx; height: 63.14rpx;
@ -35,16 +68,79 @@ page {
margin-right: 10rpx; margin-right: 10rpx;
} }
.search2 {
padding: 20rpx 0;
}
.function-nav {
display: flex;
justify-content: space-around;
padding: 20rpx 0;
margin: 20rpx -20rpx 0 -20rpx;
background-color: #f7f6fb;
}
.function-item {
width: 200rpx;
height: 180rpx;
display: flex;
flex-direction: column;
align-items: center;
border-radius: 20rpx;
background-color: #fff;
}
.icon-box {
width: 120rpx;
height: 100rpx;
border-radius: 10rpx;
margin-top: 15rpx;
margin-bottom: 10rpx;
display: flex;
justify-content: center;
align-items: center;
}
.icon-box image {
width: 90rpx;
height: 90rpx;
}
.function-item text {
font-size: 28rpx;
color: #333;
}
.searchBox2 {
width: 100%;
height: 60rpx;
background-color: #f6f7fb;
border-radius: 100rpx 100rpx 100rpx 100rpx;
margin-right: 170rpx;
display: flex;
box-sizing: border-box;
align-items: center;
padding: 0 30rpx;
font-size: 26rpx;
}
.searchBox2 image {
width: 28rpx;
height: 28rpx;
margin-right: 16rpx;
}
.swiper { .swiper {
width: 710rpx; width: 710rpx;
height: 300rpx; height: 300rpx;
margin: 0 auto; margin: 0 auto;
margin-top: 30rpx; margin-top: 10rpx;
position: relative; position: relative;
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
} }
.swiper swiper{
.swiper swiper {
height: 100%; height: 100%;
} }
@ -108,6 +204,57 @@ page {
height: 100%; height: 100%;
} }
/* 广告横幅 */
.serverList1 {
width: 100%;
height: 450rpx;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
background-color: #fff;
margin-top: 20rpx;
padding: 15rpx;
}
.serverList1_left {
display: block;
width: 330rpx;
height: 450rpx;
margin-right: 17rpx;
}
.serverList1_left image {
height: 450rpx;
width: 330rpx;
object-fit: cover;
border-radius: 20rpx;
}
.serverList1_right {
width: 400rpx;
height: 450rpx;
}
.serverItemRight1 {
width: 365rpx;
height: 220rpx;
}
.serverItemRight1 image {
border-radius: 20rpx;
}
.serverItemRight2 {
width: 365rpx;
height: 220rpx;
margin-top: 10rpx;
}
.serverItemRight2 image {
border-radius: 20rpx;
}
.Tit { .Tit {
display: flex; display: flex;
align-items: center; align-items: center;
@ -117,6 +264,7 @@ page {
font-size: 36rpx; font-size: 36rpx;
color: #222222; color: #222222;
} }
.local { .local {
max-width: 414rpx; max-width: 414rpx;
overflow: hidden; overflow: hidden;
@ -124,14 +272,16 @@ page {
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.Tit_desc { .Tit_desc {
padding: 0 12rpx; padding: 0 12rpx;
height: 36rpx; height: 36rpx;
background: linear-gradient( 90deg, #FFA100 0%, #FF6A00 100%); background: linear-gradient(90deg, #FFA100 0%, #FF6A00 100%);
border-radius: 100rpx 100rpx 100rpx 100rpx; border-radius: 100rpx 100rpx 100rpx 100rpx;
font-weight: normal; font-weight: normal;
font-size: 26rpx; font-size: 26rpx;
color: #FFFFFF; color: #FFFFFF;
margin-left: 15rpx;
} }
.serverList { .serverList {
@ -154,6 +304,7 @@ page {
position: relative; position: relative;
margin-bottom: 12rpx; margin-bottom: 12rpx;
} }
.serverList_left { .serverList_left {
display: block; display: block;
width: 260rpx; width: 260rpx;
@ -161,7 +312,7 @@ page {
margin-right: 17rpx; margin-right: 17rpx;
} }
.serverList_left swiper{ .serverList_left swiper {
height: 100%; height: 100%;
} }
@ -171,6 +322,15 @@ page {
flex-wrap: wrap; flex-wrap: wrap;
} }
.serverList_right1 {
width: 48%;
}
.serverList_right2 {
width: 48%;
margin-left: 10rpx;
}
.serverItem1 { .serverItem1 {
background: linear-gradient(139deg, #FEF4F4 0%, #FEDCD2 100%); background: linear-gradient(139deg, #FEF4F4 0%, #FEDCD2 100%);
margin-right: 12rpx; margin-right: 12rpx;
@ -182,66 +342,68 @@ page {
.serverItem3 { .serverItem3 {
background: #F1FFEC; background: #F1FFEC;
margin-right: 12rpx; margin-right: 12rpx;
} }
.serverItem4 { .serverItem4 {
background: #F0FDFF; background: #F0FDFF;
} }
.serverItem5 { .serverItem5 {
background: #EFF7FF; background: #EFF7FF;
margin-right: 12rpx; margin-right: 12rpx;
} }
.serverItem6 { .serverItem6 {
background: linear-gradient( 180deg, #FFFFFF 0%, #FFEDF2 100%); background: linear-gradient(180deg, #FFFFFF 0%, #FFEDF2 100%);
} }
.serverItem1 image { .serverItem1 image {
position: absolute; position: absolute;
right: 12rpx; right: 0rpx;
top: 14rpx; bottom: 0rpx;
width: 103rpx; width: 120rpx;
height: 100rpx; height: 70rpx;
} }
.serverItem2 image { .serverItem2 image {
position: absolute; position: absolute;
right: 6rpx; right: 0rpx;
top: 8rpx; bottom: 0rpx;
width: 108rpx; width: 120rpx;
height: 108rpx; height: 70rpx;
} }
.serverItem3 image { .serverItem3 image {
width: 116rpx;
height: 83rpx;
position: absolute; position: absolute;
right: 0rpx; right: 0rpx;
top: 30rpx; bottom: 0rpx;
width: 120rpx;
height: 70rpx;
} }
.serverItem4 image { .serverItem4 image {
width: 130rpx;
height: 86rpx;
position: absolute;
top: 30rpx;
right: 11rpx;
}
.serverItem5 image {
width: 162rpx;
height: 93rpx;
position: absolute; position: absolute;
right: 0rpx; right: 0rpx;
top: 23rpx; bottom: 0rpx;
width: 120rpx;
height: 70rpx;
}
.serverItem5 image {
position: absolute;
right: 0rpx;
bottom: 0rpx;
width: 120rpx;
height: 70rpx;
} }
.serverItem6 image { .serverItem6 image {
width: 72rpx;
height: 72rpx;
position: absolute; position: absolute;
top: 30rpx; right: 0rpx;
right: 20rpx; bottom: 0rpx;
height: 70rpx;
width: 120rpx;
} }
.merchant { .merchant {
@ -250,7 +412,7 @@ background: linear-gradient( 180deg, #FFFFFF 0%, #FFEDF2 100%);
text-align: center; text-align: center;
width: 710rpx; width: 710rpx;
border-radius: 100rpx 100rpx 100rpx 100rpx; border-radius: 100rpx 100rpx 100rpx 100rpx;
background: linear-gradient( 91deg, #FF7658 0%, #FF370B 100%); background: linear-gradient(91deg, #FF7658 0%, #FF370B 100%);
font-weight: normal; font-weight: normal;
font-size: 36rpx; font-size: 36rpx;
color: #FFFFFF; color: #FFFFFF;
@ -260,16 +422,19 @@ background: linear-gradient( 180deg, #FFFFFF 0%, #FFEDF2 100%);
.padding_bottom32 { .padding_bottom32 {
padding-bottom: 32rpx; padding-bottom: 32rpx;
} }
.main { .main {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.list_pic { .list_pic {
width: 345rpx; width: 345rpx;
height: 345rpx; height: 345rpx;
margin-right: 20rpx; margin-right: 20rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.list_pic:nth-child(2n) { .list_pic:nth-child(2n) {
margin-right: 0; margin-right: 0;
} }
@ -281,3 +446,374 @@ background: linear-gradient( 180deg, #FFFFFF 0%, #FFEDF2 100%);
margin: 65rpx auto; margin: 65rpx auto;
text-align: center; text-align: center;
} }
/* 分类标签栏样式 */
.category-tabs {
background-color: #fff;
border-radius: 10rpx;
margin-top: 20rpx;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
overflow: hidden;
position: relative;
}
.tabs-container {
display: flex;
padding: 0 20rpx;
position: relative;
align-items: center;
}
.tabs-scroll {
height: 50rpx;
display: flex;
overflow-x: auto;
padding: 20rpx 0;
scrollbar-width: none;
-ms-overflow-style: none;
}
.tabs-scroll::-webkit-scrollbar {
display: none;
}
.tab-item {
padding: 0 20rpx;
margin-right: 20rpx;
font-size: 20rpx;
color: #333;
background-color: #ededed;
height: 50rpx;
line-height: 50rpx;
white-space: nowrap;
border-radius: 10rpx;
}
.tab-item.activeTab {
color: #ff6700;
background-color: #fff3e0;
}
.dropdown-btn {
width: 50rpx;
height: 50rpx;
display: flex;
align-items: center;
justify-content: center;
margin-left: 10rpx;
}
.dropdown-icon {
width: 50rpx;
height: 50rpx;
align-items: center;
transition: transform 0.3s ease;
}
.dropdown-icon.active {
transform: rotate(180deg);
}
/* 下拉分类列表样式 */
.category-dropdown {
background-color: #fff;
border-radius: 0 0 10rpx 10rpx;
box-shadow: 0 5rpx 15rpx rgba(0, 0, 0, 0.1);
padding: 20rpx;
position: relative;
z-index: 99;
width: 95%;
left: 0;
/* top: 88rpx; */
}
.dropdown-title {
font-size: 28rpx;
font-weight: bold;
color: #333;
margin-bottom: 20rpx;
padding-bottom: 15rpx;
border-bottom: 1rpx solid #eee;
}
.review-btn {
width: 80rpx;
height: 50rpx;
background-color: #ff6700;
color: #fff;
font-size: 26rpx;
text-align: center;
line-height: 50rpx;
border-radius: 8rpx;
margin-right: 10rpx;
align-self: center;
}
.category-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20rpx;
}
.category-grid-item {
padding: 20rpx;
text-align: center;
font-size: 24rpx;
color: #666;
background-color: #f5f5f5;
border-radius: 8rpx;
}
.category-grid-item.activeTab {
color: #ff6700;
background-color: #fff3e0;
font-weight: bold;
}
/* 店铺列表样式 */
.store-list-container {
background-color: #fff;
border-radius: 10rpx;
padding: 20rpx;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
position: relative;
}
.overlay {
position: absolute;
top: 90rpx;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 98;
}
.store-item {
display: flex;
padding: 20rpx 0;
border-bottom: 1rpx solid #f0f0f0;
}
.store-item:last-child {
border-bottom: none;
}
.store-image {
width: 180rpx;
height: 180rpx;
border-radius: 10rpx;
margin-right: 20rpx;
overflow: hidden;
}
.store-image image {
width: 100%;
height: 100%;
object-fit: cover;
}
.store-info {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.store-name {
font-size: 32rpx;
color: #333;
font-weight: bold;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.store-rating {
display: flex;
align-items: center;
margin: 10rpx 0;
}
.star-icon {
width: 24rpx;
height: 24rpx;
margin-right: 5rpx;
}
.rating-text {
font-size: 26rpx;
color: #ffb400;
margin-left: 5rpx;
}
.store-tags {
display: flex;
flex-wrap: wrap;
margin-bottom: 10rpx;
}
.tag {
background-color: #f5f5f5;
color: #666;
font-size: 24rpx;
padding: 5rpx 15rpx;
border-radius: 15rpx;
margin-right: 10rpx;
margin-bottom: 10rpx;
}
.store-address {
font-size: 26rpx;
color: #999;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: flex;
align-items: center;
}
.address-icon {
width: 24rpx;
height: 24rpx;
margin-right: 5rpx;
}
.store-distance {
font-size: 26rpx;
color: #999;
margin-top: 5rpx;
display: flex;
align-items: center;
}
.distance-icon {
width: 24rpx;
height: 24rpx;
margin-right: 5rpx;
}
.merchantList {
padding: 0 20rpx;
width: 100%;
box-sizing: border-box;
}
.merchantList2 {}
.merchantItem {
display: flex;
padding-top: 30px;
padding-bottom: 30rpx;
border-bottom: 1rpx solid #EBEBEB;
;
}
.merchantItem_left {
width: 180rpx;
height: 180rpx;
border-radius: 20rpx 20rpx 20rpx 20rpx;
overflow: hidden;
margin-right: 24rpx;
}
.merchantItem_left image {
width: 100%;
height: 100%;
}
.merchantItem_right {
flex: 1;
}
.merchantItem_right_tit {
display: flex;
align-items: center;
justify-content: space-between;
}
.merchantItem_right_tit_left {
font-size: 30rpx;
color: #222222;
}
.merchantItem_right_tit_right {
font-size: 24rpx;
color: #555555;
}
.merchantItem_right_con {
margin-top: 14rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.merchangtItem_tag {
font-size: 22rpx;
color: #555555;
padding: 5rpx 12rpx;
white-space: nowrap;
background: rgba(255, 81, 42, 0.1);
border-radius: 100rpx 100rpx 100rpx 100rpx;
display: inline-block;
margin-top: 20rpx;
margin-right: 10rpx;
}
.startList {
display: flex;
align-items: center;
}
.startList image {
width: 22rpx;
height: 22rpx;
margin-right: 3rpx;
}
.merchantItem_right_con_right {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 26rpx;
color: #000000;
}
.merchantItem_right_con_right image {
width: 32rpx;
height: 28.59rpx;
margin-bottom: 6rpx;
}
.merchantItem_right_add {
font-size: 24rpx;
color: #999999;
margin-top: 14rpx;
}
/* 加载更多样式 */
.loading {
display: inline-block;
width: 30rpx;
height: 30rpx;
border: 3rpx solid #f3f3f3;
border-top: 3rpx solid #3498db;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-right: 10rpx;
vertical-align: middle;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}

View File

@ -10,6 +10,47 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 功能导航区 -->
<view class="function-nav" v-if="showNav">
<view class="function-item" @click="goToShop">
<view class="icon-box">
<image class="iconImg" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/index_shop.png"
mode="widthFix" />
</view>
<text>店铺管理</text>
</view>
<view class="function-item" @click="goToOrder">
<view class="icon-box">
<image class="iconImg" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/index_order.png"
mode="widthFix" />
</view>
<text>供应商订单</text>
</view>
<view class="function-item" @click="goToWuye">
<view class="icon-box">
<image class="iconImg" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/index_wuye.png"
mode="widthFix" />
</view>
<text>物业管理</text>
</view>
</view>
<!-- 搜索框 -->
<view class="search2" v-if="isShowSearch">
<view class="searchBox2">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
mode="aspectFill"></image>
<view class="hot-word-container">
<view class="hot-word-scroll" :style="{ transform: 'translateY(' + scrollPosition + 'rpx)' }">
<view v-for="(word, index) in hotWord" :key="index" class="hot-word-item"
@click="handleHotWordClick(word)">
{{ word }}
</view>
</view>
</view>
<input class="search_input" placeholder='请输入内容' confirm-type='search' @input="searchInput"
@confirm="searchInput" :value="selectKeyWord" />
</view>
</view>
<!-- 轮播图 --> <!-- 轮播图 -->
<view class="swiper"> <view class="swiper">
<swiper @animationfinish="swipers" autoplay circular> <swiper @animationfinish="swipers" autoplay circular>
@ -19,8 +60,7 @@
</swiper> </swiper>
<view class="cirList"> <view class="cirList">
<view :class="['cir', currentIdx == index ? 'active' : '']" v-for="(item, index) in bannerList" <view :class="['cir', currentIdx == index ? 'active' : '']" v-for="(item, index) in bannerList" :key="index">
:key="index">
</view> </view>
</view> </view>
</view> </view>
@ -36,38 +76,134 @@
</view> </view>
</view> </view>
<!-- 广告横幅 -->
<view class="serverList1">
<view class="serverList1_left">
<!-- <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/index_ad_left.jpg" mode="aspectFit" /> -->
<image :src="serverLeft" mode="aspectFit" />
</view>
<view class="serverList1_right">
<view :class="['serverItemRight', `serverItemRight${index + 1}`]" @tap="headerServerClick(item)"
v-for="(item, index) in serverRightList" :key="index">
<image :src="item.pic_src" mode="" />
<!-- <view>{{ item.ad_position }}</view> -->
</view>
</view>
</view>
<view class="white_container margin_top20 padding_bottom32"> <view class="white_container margin_top20 padding_bottom32">
<view v-if="!currentCity.district" class="Tit">定位错误 未知区域</view> <view v-if="!currentCity.district" class="Tit">定位错误 未知区域</view>
<view v-else class="Tit"> <view v-else class="Tit">
<view class="local">{{ currentCity.district }}</view>附近 <view class="local">{{ currentCity.district }}</view>附近
<view class="Tit_desc">公积金补贴商户</view> <view class="Tit_desc">一刻钟便利生活圈</view>
</view> </view>
<view class="serverList"> <view class="serverList">
<view class="serverList_left"> <view class="serverList_left">
<swiper> <swiper>
<swiper-item v-for="(item, index) in homeLeftList" :key="index"> <swiper-item v-for="(item, index) in homeLeftList" :key="index" @click="headerServerClick(item)">
<image :src="item.pic_src" alt="" mode="aspectFit" /> <image :src="item.pic_src" alt="" mode="aspectFit" />
<!-- <view>{{ item.ad_position }}</view> -->
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
<view class="serverList_right"> <view class="serverList_right">
<view :class="['serverItem', `serverItem${index +1}` ]" @tap="headerServerClick(item)" v-for="(item, index) in homeRightList" :key="index"> <view class="serverList_right1">
<view :class="['serverItem', `serverItem${index + 1}`]" @click="headerServerClick2(item)"
v-for="(item, index) in homeRightList1" :key="index">
<view class="serverTit">{{ item.title }}</view>
<image v-if="item.pic_src" :src="item.pic_src" mode="" />
<!-- <view>{{ item.ad_position }}</view> -->
</view>
</view>
<view class="serverList_right2">
<view :class="['serverItem', `serverItem${index + 4}`]" @click="headerServerClick2(item)"
v-for="(item, index) in homeRightList2" :key="index">
<view class="serverTit">{{ item.title }}</view> <view class="serverTit">{{ item.title }}</view>
<image :src="item.pic_src" mode="" /> <image :src="item.pic_src" mode="" />
<!-- <view>{{ item.ad_position }}</view> -->
</view> </view>
</view> </view>
</view> </view>
<view class="merchant" @click="headershopEnterClick">商户申请入驻</view> </view>
<!-- <view class="merchant" @click="headershopEnterClick">商户申请入驻</view> -->
</view> </view>
<view class="white_container margin_top20 main padding_bottom32"> <!-- <view class="white_container margin_top20 main padding_bottom32">
<image v-for="(item, index) in bottomList" :key="index" class="list_pic" :src="item.pic_src" mode=""> <image v-for="(item, index) in bottomList" :key="index" class="list_pic" :src="item.pic_src" mode="">
</image> </image>
</view> -->
<!-- 分类标签栏 -->
<view class="category-tabs">
<view class="tabs-container">
<scroll-view scroll-x enable-flex class="tabs-scroll" :scroll-into-view="activeCategoryId">
<view class="tab-item" v-for="item in categoryList1" :key="item.id" :id="'category-' + item.id"
:class="{ activeTab: currentCategoryId === item.id }" @click="switchCategory(item.id)">
{{ item.cate_name }}
</view> </view>
</scroll-view>
<view class="dropdown-btn" :class="{ active: showDropdown }" @click="toggleDropdown">
<u-icon v-if="!showDropdown" name="arrow-down" class="dropdown-icon"></u-icon>
<u-icon v-else name="arrow-up" class="dropdown-icon active"></u-icon>
</view>
</view>
<!-- 分类下拉列表 -->
<view class="category-dropdown" v-if="showDropdown">
<view class="dropdown-title">商品分类</view>
<view class="category-grid">
<view class="category-grid-item" v-for="item in categoryList" :key="item.id"
:class="{ activeTab: currentCategoryId === item.id }" @click="selectCategoryFromDropdown(item.id)">
{{ item.cate_name }}
</view>
</view>
</view>
<!-- 商家列表展示 -->
<view class="merchantList" :class="{ merchantList2: merchatList.length < 3 }">
<view class="overlay" v-if="showDropdown"></view>
<view class="merchantItem" v-for="item in merchatList" :key="item.id" @click="Info(item)">
<view class="merchantItem_left">
<image :src="item.showImg" mode="aspectFill"></image>
</view>
<view class="merchantItem_right">
<view class="merchantItem_right_tit">
<view class="merchantItem_right_tit_left">
{{ item.merchant_name }}
</view>
<view class="merchantItem_right_tit_right">
{{ item.distances }}
</view>
</view>
<view class="merchantItem_right_con">
<view class="merchantItem_right_con_left">
<view class="startList">
<image v-for="index in 5" :key="index" :src="index < item.rating
? 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start1.png'
: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start2.png'
" mode="aspectFill"></image>
</view>
<view class="merchangtItem_tag" v-if="item.refund_property_fee_ratio">
买单返物业费
</view>
<view class="merchangtItem_tag" v-if="item.refund_user_points_ratio">
买单返积分
</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"
mode="aspectFill"></image>
点评
</view>
</view>
<view class="merchantItem_right_add">
{{ item.comAddress }}
</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>
@ -77,7 +213,8 @@
<script> <script>
import { import {
NavgateTo NavgateTo,
calculateDistance,
} from '../../utils/index'; } from '../../utils/index';
import { import {
@ -94,6 +231,11 @@ import {
apiArr as apiArr2 apiArr as apiArr2
} from '../../api/v2Home.js' } from '../../api/v2Home.js'
import {
apiArr as apiArr3
} from '../../api/v2User.js'
import { import {
apiArr as citys apiArr as citys
} from '../../api/area.js'; } from '../../api/area.js';
@ -107,6 +249,9 @@ export default {
}, //2. }, //2.
data() { data() {
return { return {
showNav: true,
isShowSearch: false,
loading: false, loading: false,
city: "", city: "",
qqmap_key: '', qqmap_key: '',
@ -130,19 +275,120 @@ export default {
homeLeftList: [],//广 homeLeftList: [],//广
homeRightList: [], // 广 homeRightList: [], // 广
homeRightList1: [], // 广
homeRightList2: [], // 广
bottomPageSize: 10, bottomPageSize: 10,
bottomPageNum: 1, bottomPageNum: 1,
bottomList: [], bottomList: [],
bottomTotal: 0, bottomTotal: 0,
flag: false, flag: false,
hotWord: [], //
scrollPosition: 0, //
scrollInterval: null, //
itemHeight: 50, //
// 1广
serverLeft: '',
// 1广
serverRightList: [],
//
categoryList1: [],
categoryList: [],
currentCategoryId: null,
showDropdown: false,
activeCategoryId: '',
merchatList: [], //
} }
}, },
methods: { methods: {
goToShop() {
uni.showModal({
title: '提示',
content: '此功能暂未开通!',
showCancel: false,
complete: (res) => {
if (res.cancel) {
}
}
})
},
goToOrder() {
uni.showModal({
title: '提示',
content: '此功能暂未开通!',
showCancel: false,
complete: (res) => {
if (res.cancel) {
}
}
})
},
async goToWuye() {
uni.removeStorageSync('order_dispatch_permission');
uni.removeStorageSync('work_order_permission');
const res = await request(apiArr3.getUserInfo, 'POST', {});
const { community_worker } = res;
uni.setStorageSync('order_dispatch_permission', community_worker && community_worker[0].order_dispatch_permission == 1 || false);
uni.setStorageSync('work_order_permission', community_worker && community_worker[0].work_order_permission == 1 || false);
uni.navigateTo({
url: '/packages/workOrderDashboard/guide/index'
})
},
swipers(e) { swipers(e) {
this.currentIdx = e.detail.current this.currentIdx = e.detail.current
}, },
//
handleHotWordClick(word) {
console.log('点击的热词:', word);
},
//
startScrollAnimation() {
//
if (this.scrollInterval) {
clearInterval(this.scrollInterval);
}
//
if (this.hotWord.length === 0) {
return;
}
let index = 0;
const totalHeight = this.hotWord.length * this.itemHeight;
const containerHeight = this.itemHeight; //
this.scrollInterval = setInterval(() => {
index++;
//
if (index * this.itemHeight >= totalHeight) {
this.scrollPosition = 0;
index = 0;
} else {
this.scrollPosition = -index * this.itemHeight;
}
}, 2000); // 2
},
//
stopScrollAnimation() {
if (this.scrollInterval) {
clearInterval(this.scrollInterval);
this.scrollInterval = null;
}
},
map() { map() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/shopcity/shopcity' url: '/pages/shopcity/shopcity'
@ -182,7 +428,7 @@ export default {
type: 'wgs84', type: 'wgs84',
success: (res) => { success: (res) => {
const latitude = userlocat ? userlocat.lat : res.latitude; const latitude = userlocat ? userlocat.lat : res.latitude;
const longitude = userlocat ? userlocat.lng :res.longitude; const longitude = userlocat ? userlocat.lng : res.longitude;
uni.request({ uni.request({
url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${latitude},${longitude}&key=${qqmap_key}&get_poi=0`, url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${latitude},${longitude}&key=${qqmap_key}&get_poi=0`,
success: async (res) => { success: async (res) => {
@ -202,19 +448,40 @@ export default {
uni.setStorageSync('location', preciseLocation); uni.setStorageSync('location', preciseLocation);
uni.setStorageSync('ad_code', ad_info.adcode); uni.setStorageSync('ad_code', ad_info.adcode);
// TODO: ad_code // TODO: ad_code
const [bannerList, homeLeftList, homeRightList, bottomList, buttonList] = await Promise.all([ const [bannerList, serverLeft, serverRightList, homeLeftList, homeRightList, bottomList, buttonList, categoryList] = await Promise.all([
this.getHomeBanner(),// this.getHomeBanner(),//
this.getServerLeft(), // 1广
this.getServerRight(), // 1广
this.getHomeMidLeft(), // this.getHomeMidLeft(), //
this.getHomeMidRight(), // this.getHomeMidRight(), //
// this.getHomeCenterTop(), // -
// this.getHomeCenter(), // -
// this.getHomeCenterBottom(), // -
// this.getHomeRightTop(), // -
// this.getHomeRightCenter(), // -
// this.getHomeRightBottom(), // -
// this.getHomePop() // this.getHomePop()
this.getHomeBottom(true), // 广 this.getHomeBottom(true), // 广
this.getButtonNum(), // this.getButtonNum(), //
this.getCateList(), //
]); ]);
this.bannerList = bannerList; this.bannerList = bannerList;
this.serverLeft = serverLeft;
this.serverRightList = serverRightList;
this.homeLeftList = homeLeftList; this.homeLeftList = homeLeftList;
this.homeRightList = homeRightList; this.homeRightList = homeRightList;
this.homeRightList1 = homeRightList.slice(0, 3);
this.homeRightList2 = homeRightList.slice(3, 6);
that.bottomList = bottomList; that.bottomList = bottomList;
this.tabList = buttonList; this.tabList = buttonList;
this.categoryList = categoryList;
this.categoryList1 = categoryList.slice(0, 5);
this.loading = true; this.loading = true;
uni.hideLoading(); uni.hideLoading();
}, },
@ -226,8 +493,20 @@ export default {
}); });
}, },
headerServerClick2(e) {
if (e.title == '更多') {
NavgateTo('/packages/localLife/index/index')
}
const cate_id = this.categoryList.find(item => item.cate_name == e.title)?.id;
if (cate_id) { this.switchCategory(cate_id) }
return
},
headerServerClick(e) { headerServerClick(e) {
console.log('当前点击内容', e); // const cate_id = this.categoryList.find(item => item.cate_name == e.title).id;
// this.switchCategory(cate_id)
// return
if (!e.link_url) { if (!e.link_url) {
this.NotOpen(); this.NotOpen();
return return
@ -244,7 +523,7 @@ export default {
// #endif // #endif
// #ifdef MP-WEIXIN || MP-ALIPAY || MP-BAIDU // #ifdef MP-WEIXIN || MP-ALIPAY || MP-BAIDU
if(e.appid) { if (e.appid) {
uni.navigateToMiniProgram({ uni.navigateToMiniProgram({
appId: e.appid, appId: e.appid,
path: e.link_url, path: e.link_url,
@ -256,7 +535,7 @@ export default {
console.log('打开成功', res) console.log('打开成功', res)
} }
}) })
}else{ } else {
NavgateTo(e.link_url) NavgateTo(e.link_url)
// NavgateTo('/packages/localLife/index/index') // NavgateTo('/packages/localLife/index/index')
} }
@ -330,7 +609,7 @@ export default {
} }
}, },
async getHomeMidLeft() { async getServerLeft() {
const res = await request(apiArr2.getHomeBanner, "POST", { const res = await request(apiArr2.getHomeBanner, "POST", {
ad_code: uni.getStorageSync('ad_code'), ad_code: uni.getStorageSync('ad_code'),
ad_position: 2, ad_position: 2,
@ -339,6 +618,50 @@ export default {
page_num: 1, page_num: 1,
page_size: 10 page_size: 10
}, { silent: false }); }, { silent: false });
if (res.rows.length) {
let filterRes = this.filterShowList(res?.rows, 1);
filterRes.forEach(item => {
item.pic_src = picUrl + item.pic_src
})
const itemUrl = filterRes[0].pic_src
return itemUrl
} else {
return []
}
},
async getServerRight() {
const rightList = []
for (let i = 3; i < 5; i++) {
const res = await request(apiArr2.getHomeBanner, "POST", {
ad_code: uni.getStorageSync('ad_code'),
ad_position: i,
longitude: uni.getStorageSync('location').lng,
latitude: uni.getStorageSync('location').lat,
page_num: 1,
page_size: 10
}, { silent: false });
if (res.rows.length) {
let filterRes = this.filterShowList(res?.rows, 1);
filterRes.forEach(item => {
item.pic_src = picUrl + item.pic_src
})
rightList.push(...filterRes)
}
}
return rightList
},
async getHomeMidLeft() {
const res = await request(apiArr2.getHomeBanner, "POST", {
ad_code: uni.getStorageSync('ad_code'),
ad_position: 5,
longitude: uni.getStorageSync('location').lng,
latitude: uni.getStorageSync('location').lat,
page_num: 1,
page_size: 10
}, { silent: false });
if (res.rows.length) { if (res.rows.length) {
let filterRes = this.filterShowList(res?.rows, 1); let filterRes = this.filterShowList(res?.rows, 1);
filterRes.forEach(item => { filterRes.forEach(item => {
@ -351,30 +674,160 @@ export default {
}, },
async getHomeMidRight() { async getHomeMidRight() {
const rightList = []
for (let i = 6; i < 12; i++) {
const res = await request(apiArr2.getHomeBanner, "POST", { const res = await request(apiArr2.getHomeBanner, "POST", {
ad_code: uni.getStorageSync('ad_code'), ad_code: uni.getStorageSync('ad_code'),
ad_position: 3, ad_position: i,
longitude: uni.getStorageSync('location').lng, longitude: uni.getStorageSync('location').lng,
latitude: uni.getStorageSync('location').lat, latitude: uni.getStorageSync('location').lat,
page_num: 1, page_num: 1,
page_size: 10 page_size: 10
}, { silent: false }); }, { silent: false });
if (res.rows.length) { if (res.rows.length) {
// let firstItem = res.rows[0];
// firstItem.pic_src = picUrl + firstItem.pic_src;
// rightList.push(firstItem);
let filterRes = this.filterShowList(res?.rows, 1); let filterRes = this.filterShowList(res?.rows, 1);
filterRes.forEach(item => { filterRes.forEach(item => {
item.pic_src = picUrl + item.pic_src item.pic_src = picUrl + item.pic_src
}) })
return filterRes.slice(0, 6) rightList.push(...filterRes)
} else { } else {
return [] rightList.push({
ad_position: i,
pic_src: ''
})
} }
}
return rightList
}, },
// async getHomeCenterTop() {
// const res = await request(apiArr2.getHomeBanner, "POST", {
// ad_code: uni.getStorageSync('ad_code'),
// ad_position: 6,
// longitude: uni.getStorageSync('location').lng,
// latitude: uni.getStorageSync('location').lat,
// page_num: 1,
// page_size: 10
// }, { silent: false });
// if (res.rows.length) {
// let filterRes = this.filterShowList(res?.rows, 1);
// filterRes.forEach(item => {
// item.pic_src = picUrl + item.pic_src
// })
// return filterRes.slice(0, 6)
// } else {
// return []
// }
// },
// async getHomeCenter() {
// const res = await request(apiArr2.getHomeBanner, "POST", {
// ad_code: uni.getStorageSync('ad_code'),
// ad_position: 7,
// longitude: uni.getStorageSync('location').lng,
// latitude: uni.getStorageSync('location').lat,
// page_num: 1,
// page_size: 10
// }, { silent: false });
// if (res.rows.length) {
// let filterRes = this.filterShowList(res?.rows, 1);
// filterRes.forEach(item => {
// item.pic_src = picUrl + item.pic_src
// })
// return filterRes.slice(0, 6)
// } else {
// return []
// }
// },
// async getHomeCenterBottom() {
// const res = await request(apiArr2.getHomeBanner, "POST", {
// ad_code: uni.getStorageSync('ad_code'),
// ad_position: 8,
// longitude: uni.getStorageSync('location').lng,
// latitude: uni.getStorageSync('location').lat,
// page_num: 1,
// page_size: 10
// }, { silent: false });
// if (res.rows.length) {
// let filterRes = this.filterShowList(res?.rows, 1);
// filterRes.forEach(item => {
// item.pic_src = picUrl + item.pic_src
// })
// return filterRes.slice(0, 6)
// } else {
// return []
// }
// },
// async getHomeRightTop() {
// const res = await request(apiArr2.getHomeBanner, "POST", {
// ad_code: uni.getStorageSync('ad_code'),
// ad_position: 9,
// longitude: uni.getStorageSync('location').lng,
// latitude: uni.getStorageSync('location').lat,
// page_num: 1,
// page_size: 10
// }, { silent: false });
// if (res.rows.length) {
// let filterRes = this.filterShowList(res?.rows, 1);
// filterRes.forEach(item => {
// item.pic_src = picUrl + item.pic_src
// })
// return filterRes.slice(0, 6)
// } else {
// return []
// }
// },
// async getHomeRightCenter() {
// const res = await request(apiArr2.getHomeBanner, "POST", {
// ad_code: uni.getStorageSync('ad_code'),
// ad_position: 10,
// longitude: uni.getStorageSync('location').lng,
// latitude: uni.getStorageSync('location').lat,
// page_num: 1,
// page_size: 10
// }, { silent: false });
// if (res.rows.length) {
// let filterRes = this.filterShowList(res?.rows, 1);
// filterRes.forEach(item => {
// item.pic_src = picUrl + item.pic_src
// })
// return filterRes.slice(0, 6)
// } else {
// return []
// }
// },
// async getHomeRightBottom() {
// const res = await request(apiArr2.getHomeBanner, "POST", {
// ad_code: uni.getStorageSync('ad_code'),
// ad_position: 11,
// longitude: uni.getStorageSync('location').lng,
// latitude: uni.getStorageSync('location').lat,
// page_num: 1,
// page_size: 10
// }, { silent: false });
// if (res.rows.length) {
// let filterRes = this.filterShowList(res?.rows, 1);
// filterRes.forEach(item => {
// item.pic_src = picUrl + item.pic_src
// })
// return filterRes.slice(0, 6)
// } else {
// return []
// }
// },
// //
async getHomePop() { async getHomePop() {
await request(apiArr2.getHomeBanner, "POST", { await request(apiArr2.getHomeBanner, "POST", {
ad_code: uni.getStorageSync('ad_code'), ad_code: uni.getStorageSync('ad_code'),
ad_position: 4, ad_position: 12,
longitude: uni.getStorageSync('location').lng, longitude: uni.getStorageSync('location').lng,
latitude: uni.getStorageSync('location').lat, latitude: uni.getStorageSync('location').lat,
page_num: 1, page_num: 1,
@ -411,8 +864,6 @@ export default {
return filterRes return filterRes
}, },
async getButtonNum() { async getButtonNum() {
const res = await request(apiArr2.getButtonNum, "POST", {}, { slice: false }); const res = await request(apiArr2.getButtonNum, "POST", {}, { slice: false });
this.rowNum = res.nav_row_num this.rowNum = res.nav_row_num
@ -441,6 +892,80 @@ export default {
} }
}, },
//
async getCateList() {
const res = await request(apiArr2.getCateList, "POST", {
}, { slice: false });
if (res.rows.length) {
this.currentCategoryId = res.rows[0].id
this.activeCategoryId = `category-${this.currentCategoryId}`
this.getMechantList()
return res.rows
} else {
return []
}
},
//
async getMechantList() {
let that = this;
await request(apiArr2.getMerchantList, "POST", {
merchant_cate_id: that.currentCategoryId,
page_num: that.page_num,
page_size: that.page_size,
}).then((res) => {
let latitude = uni.getStorageSync("location").lat;
let longitude = uni.getStorageSync("location").lng;
res.rows.forEach((item) => {
item.bigImg = item.album_images.split(",");
item.showImg = picUrl + item.album_images.split(",")[0];
const distanceInKm = calculateDistance(
latitude,
longitude,
item.latitude,
item.longitude
);
item.distances =
distanceInKm >= 1
? `${distanceInKm.toFixed(1)}km`
: `${(distanceInKm * 1000).toFixed(1)}m`;
if (item.ad) {
item.comAddress = item.ad.ad_name.replace(/,/g, "") + item.address;
} else {
item.comAddress = item.address;
}
});
res.rows.sort((a, b) => {
const valueA =
parseFloat(a.distances.replace("km", "").replace("m", "")) *
(a.distances.includes("km") ? 1000 : 1);
const valueB =
parseFloat(b.distances.replace("km", "").replace("m", "")) *
(b.distances.includes("km") ? 1000 : 1);
return valueA - valueB;
});
if (res.rows.length == this.page_size) {
this.page_num = this.page_num + 1;
this.flag = true;
} else {
this.flag = false;
}
this.merchatList = res.rows;
});
},
//
Info(e) {
uni.setStorageSync("merchantInfo", e);
NavgateTo("/packages/localLife/detail/index");
},
//
toJump(e) {
NavgateTo('/packages/localLife/comment/index');
},
/** /**
* 首页过滤方法 * 首页过滤方法
* @param {Array} list 请求地址 * @param {Array} list 请求地址
@ -450,14 +975,78 @@ export default {
filterShowList(list, type) { filterShowList(list, type) {
if (list && list.length == 0) return []; if (list && list.length == 0) return [];
return list.filter((item) => item.show_status == type); return list.filter((item) => item.show_status == type);
} },
async showSearch() {
const res = await request(apiArr.isShowSearch, "POST", {}, { slice: false });
this.isShowSearch = res.search_enable == 1
},
async getSearchVal() {
const res = await request(apiArr.hotWord, "POST", {}, { slice: false });
//
this.hotWord = res.search_hot_word.split(/[,]/)
},
switchCategory(id) {
this.currentCategoryId = id;
this.activeCategoryId = `category-${id}`;
this.getMechantList()
this.showDropdown = false;
},
toggleDropdown() {
this.showDropdown = !this.showDropdown;
//
if (this.showDropdown) {
uni.pageScrollTo({
scrollTop: 2500,
duration: 300
});
}
},
selectCategoryFromDropdown(id) {
this.switchCategory(id);
this.showDropdown = false;
}
}, },
onLoad(options) { onLoad(options) {
this.init() this.init()
const meun = menuButtonInfo(); const meun = menuButtonInfo();
this.top = meun.top; this.top = meun.top;
this.localHeight = meun.height; this.localHeight = meun.height;
this.showSearch()
this.getSearchVal()
this.showNav = uni.getStorageSync("isShowNav") != 1
},
onShow() {
//
this.startScrollAnimation();
},
onHide() {
//
this.stopScrollAnimation();
},
onUnload() {
//
this.stopScrollAnimation();
},
// hotWord
watch: {
hotWord: {
handler(newVal) {
if (newVal.length > 0) {
this.startScrollAnimation();
}
},
immediate: true
}
}, },
onShow() { onShow() {
this.flag = false this.flag = false

View File

@ -147,6 +147,8 @@ export default {
uni.removeStorageSync('is_shop'); uni.removeStorageSync('is_shop');
uni.removeStorageSync('shopId'); uni.removeStorageSync('shopId');
uni.removeStorageSync('order_dispatch_permission'); uni.removeStorageSync('order_dispatch_permission');
uni.removeStorageSync('work_order_permission');
uni.removeStorageSync('nickName'); uni.removeStorageSync('nickName');
uni.removeStorageSync('changeCommData'); uni.removeStorageSync('changeCommData');
console.error('用户拒绝授权:', event.detail.errMsg); console.error('用户拒绝授权:', event.detail.errMsg);
@ -159,6 +161,7 @@ export default {
}, { silent: false }).then(res => { }, { silent: false }).then(res => {
const { community_worker } = res; const { community_worker } = res;
uni.setStorageSync('order_dispatch_permission', community_worker && community_worker[0].order_dispatch_permission == 1 || false); uni.setStorageSync('order_dispatch_permission', community_worker && community_worker[0].order_dispatch_permission == 1 || false);
uni.setStorageSync('work_order_permission', community_worker && community_worker[0].work_order_permission == 1 || false);
uni.setStorageSync('nickName', res.nick_name); uni.setStorageSync('nickName', res.nick_name);
console.log(res) console.log(res)
}) })

View File

@ -215,7 +215,9 @@ export default {
mask: true mask: true
}) })
request(apiArr.getRegionList, 'POST', { request(apiArr.getRegionList, 'POST', {
short_name: keyword short_name: keyword,
ad_level: 2,
}, { silent: false }).then((res) => { }, { silent: false }).then((res) => {
console.log('搜索结果', res); console.log('搜索结果', res);
this.searchValue = keyword; this.searchValue = keyword;
@ -263,7 +265,10 @@ export default {
title: '加载中', title: '加载中',
mask: true mask: true
}) })
const res = await request(apiArr.getRegionList, 'POST', {}, { silent: false }); const params = {
ad_level:2
}
const res = await request(apiArr.getRegionList, 'POST', params, { silent: false });
// TODO: // TODO:
const newRes = res.rows.map((item) => { const newRes = res.rows.map((item) => {
return { return {

View File

@ -27,7 +27,7 @@
</view> </view>
<view class="section section1"> <view class="section section1">
<view class="section_label"> <view class="section_label">
<view>10010</view> <view>{{ userInfo.balance }}</view>
<view>积分</view> <view>积分</view>
</view> </view>
<view class="section_label"> <view class="section_label">
@ -232,6 +232,8 @@
uni.removeStorageSync('is_shop'); uni.removeStorageSync('is_shop');
uni.removeStorageSync('shopId'); uni.removeStorageSync('shopId');
uni.removeStorageSync('order_dispatch_permission'); uni.removeStorageSync('order_dispatch_permission');
uni.removeStorageSync('work_order_permission');
const button = uni.createSelectorQuery().select('#hiddenLoginBtn'); const button = uni.createSelectorQuery().select('#hiddenLoginBtn');
button.boundingClientRect().exec(); button.boundingClientRect().exec();
@ -372,6 +374,7 @@
if (item) { if (item) {
const { community_worker } = res; const { community_worker } = res;
uni.setStorageSync('order_dispatch_permission', community_worker && community_worker[0].order_dispatch_permission == 1 || false); uni.setStorageSync('order_dispatch_permission', community_worker && community_worker[0].order_dispatch_permission == 1 || false);
uni.setStorageSync('work_order_permission', community_worker && community_worker[0].work_order_permission == 1 || false);
uni.setStorageSync('phone', res.account); uni.setStorageSync('phone', res.account);
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({