From b0a396f9bdf800c51a171574ca54ed6888439655 Mon Sep 17 00:00:00 2001
From: yangdanqi <0027013580@iwhalecloud.com>
Date: Wed, 27 Apr 2022 10:00:39 +0800
Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E7=A0=94=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/js/data.js | 268 ++++++++---
common/js/glogalFun.js | 5 +-
components/multi-level-nav/vertical-nav.vue | 185 +++++++
pages.json | 8 +-
pages/index/index.vue | 12 +-
pages/my/edit-address.vue | 75 +--
pages/my/my-address.vue | 23 +-
pages/my/my-operator.vue | 2 +-
pages/order/order-detail.vue | 192 +++++---
pages/product/product-pick.vue | 1 +
pages/publish/publish-task.vue | 509 ++++++++++++++++++++
style/blue/blue-topic.css | 47 +-
style/default.css | 22 +-
13 files changed, 1157 insertions(+), 192 deletions(-)
create mode 100644 components/multi-level-nav/vertical-nav.vue
create mode 100644 pages/publish/publish-task.vue
diff --git a/common/js/data.js b/common/js/data.js
index 13b4d3d..9ed9870 100644
--- a/common/js/data.js
+++ b/common/js/data.js
@@ -1179,14 +1179,32 @@ const myAddressList = [{
id: 1,
person2Contact: '卢翰',
phone: '18928799765',
- area: ['广西壮族自治区', '梧桐洲', '藤县'],
+ area: [{
+ id: 1,
+ name: '广西壮族自治区'
+ }, {
+ id: 2,
+ name: '梧桐洲'
+ }, {
+ id: 3,
+ name: '藤县'
+ }],
address: '同心镇同心村同心路88号',
isDefault: true
}, {
id: 2,
person2Contact: '卢翰',
phone: '12434455432',
- area: ['广西壮族自治区', '梧桐洲', '藤县'],
+ area: [{
+ id: 1,
+ name: '广西壮族自治区'
+ }, {
+ id: 2,
+ name: '梧桐洲'
+ }, {
+ id: 3,
+ name: '藤县'
+ }],
address: '同心镇同心村同心路88号',
isDefault: false
}]
@@ -1255,7 +1273,7 @@ const myOperator = {
}]
}
-const myOperaMembers = {
+const myOperaMembers = {
totalMembers: 1,
members: [{
id: 1,
@@ -1300,41 +1318,41 @@ const certificationInfo = {
idCardImgList: [],
licenseImgList: []
}
-
-const servDetail = {
- taskTraceLine: [{
- time: '2022-01-09 16:45:28',
- action: '上门'
- }, {
- time: '2022-01-07 16:45:28',
- action: '预约时间'
- }],
- mainServOrder: {
- servTitle: '清洗-空调',
- orderTag: ['挂机', '到付试单', '到付款单'],
- address: '北京市东城区东华街道0.1到付+0.1代收',
- person2Contact: {
- name: '杨先生',
- phone: '12222233222'
- },
- bookTime: '2022-01-07 16:45:28',
- boodTime: '2022-01-07 16:45:28',
- doorTime: '2022-01-07 16:45:28',
- taskPrice: '-5.91',
- gratuityRecord: [{
- type: '服务费',
- price: '-3.00'
- }, {
- type: '加急费',
- price: '-3.00'
- }]
- },
+
+const servDetail = {
+ taskTraceLine: [{
+ time: '2022-01-09 16:45:28',
+ action: '上门'
+ }, {
+ time: '2022-01-07 16:45:28',
+ action: '预约时间'
+ }],
+ mainServOrder: {
+ servTitle: '清洗-空调',
+ orderTag: ['挂机', '到付试单', '到付款单'],
+ address: '北京市东城区东华街道0.1到付+0.1代收',
+ person2Contact: {
+ name: '杨先生',
+ phone: '12222233222'
+ },
+ bookTime: '2022-01-07 16:45:28',
+ boodTime: '2022-01-07 16:45:28',
+ doorTime: '2022-01-07 16:45:28',
+ taskPrice: '-5.91',
+ gratuityRecord: [{
+ type: '服务费',
+ price: '-3.00'
+ }, {
+ type: '加急费',
+ price: '-3.00'
+ }]
+ },
product: {
id: 1,
// indexPath: '0-0',
picUrl: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big20000.jpg',
name: '空调挂机柜机清洗服务',
- comments: '高温清洗拆洗空调部分挂机柜机',
+ comments: '高温清洗拆洗空调部分挂机柜机',
pickedNum: 1,
salePrice: 199,
price: 250,
@@ -1353,30 +1371,156 @@ const servDetail = {
pickedNum: 1,
toServNum: 1
}]
- },
- finishRecord: [{
- finishTime: '2022-08-18 16:45:28',
- finishList: [{
- id: 101,
- // indexPath: '0-0-0',
- name: '直径5.5mm黑色5米价',
- pickedNum: 1,
- servedNum: 1
- }]
- }, {
- finishTime: '2022-08-20 16:45:28',
- finishList: [{
- id: 102,
- // indexPath: '0-0-1',
- name: '直径6.5mm黑色5米价',
- pickedNum: 1,
- servedNum: 1
- }]
- }],
- talkMsgNum: 1,
- serialCode: '20211007859098945',
- createTime: '2021-10-07 16:15:46'
-}
+ },
+ finishRecord: [{
+ finishTime: '2022-08-18 16:45:28',
+ finishList: [{
+ id: 101,
+ // indexPath: '0-0-0',
+ name: '直径5.5mm黑色5米价',
+ pickedNum: 1,
+ servedNum: 1
+ }]
+ }, {
+ finishTime: '2022-08-20 16:45:28',
+ finishList: [{
+ id: 102,
+ // indexPath: '0-0-1',
+ name: '直径6.5mm黑色5米价',
+ pickedNum: 1,
+ servedNum: 1
+ }]
+ }],
+ talkMsgNum: 1,
+ serialCode: '20211007859098945',
+ createTime: '2021-10-07 16:15:46'
+}
+
+const servCategory = [{
+ id: 0,
+ name: '家具服务',
+ children: [{
+ id: 10,
+ name: '某家具服务1'
+ }, {
+ id: 11,
+ name: '某家具服务2'
+ }, {
+ id: 12,
+ name: '某家具服务3'
+ }]
+}, {
+ id: 1,
+ name: '一级类目',
+ children: [{
+ id: 20,
+ name: '二级类目1'
+ }, {
+ id: 21,
+ name: '二级类目2'
+ }, {
+ id: 22,
+ name: '二级类目3'
+ }]
+}]
+
+const categoryList = [{
+ id: 1,
+ name: '家电清洗',
+ children: [{
+ pId: 1,
+ id: 2,
+ name: '空调',
+ children: [{
+ id: 3,
+ name: '单台清洗'
+ }, {
+ id: 4,
+ name: '套餐清洗'
+ }, {
+ id: 5,
+ name: '空调加氧'
+ }]
+ }, {
+ pId: 1,
+ id: 6,
+ name: '烟灶',
+ children: [{
+ id: 7,
+ name: '单台清洗'
+ }, {
+ id: 8,
+ name: '套餐清洗'
+ }]
+ }]
+}, {
+ id: 9,
+ name: '衣物洗护',
+ children: [{
+ pId: 9,
+ id: 10,
+ name: '丝绸服装',
+ children: [{
+ id: 11,
+ name: '单件清洗'
+ }, {
+ id: 12,
+ name: '套餐清洗'
+ }]
+ }, {
+ pId: 9,
+ id: 14,
+ name: '呢绒服装',
+ children: [{
+ id: 15,
+ name: '单件清洗'
+ }]
+ }]
+}, {
+ id: 16,
+ name: 'Tab3',
+ children: [{
+ id: 17,
+ name: 'Tab3-0',
+ children: [{
+ id: 18,
+ name: 'Tab3-0-0'
+ }, {
+ id: 19,
+ name: 'Tab3-0-1'
+ }]
+ }]
+}, {
+ id: 20,
+ name: 'Tab4',
+ children: [{
+ id: 21,
+ name: 'Tab4-0',
+ children: [{
+ id: 22,
+ name: 'Tab4-0-0'
+ }, {
+ id: 23,
+ name: 'Tab4-0-1'
+ }]
+ }]
+}]
+
+const areaList = [[{
+ id: 100,
+ name: '广东'
+}, {
+ id: 101,
+ name: '海南'
+}], [{
+ id: 200,
+ name: '广州'
+}], [{
+ id: 300,
+ name: '天河'
+}]]
+
+const defaultAddress = null;
export default {
swiperList,
@@ -1397,7 +1541,11 @@ export default {
ordersFinish,
myAddressList,
myOperator,
- certificationInfo,
- myOperaMembers,
- servDetail
+ certificationInfo,
+ myOperaMembers,
+ servDetail,
+ servCategory,
+ categoryList,
+ areaList,
+ defaultAddress
}
diff --git a/common/js/glogalFun.js b/common/js/glogalFun.js
index 8fc7079..554f158 100644
--- a/common/js/glogalFun.js
+++ b/common/js/glogalFun.js
@@ -1,3 +1,6 @@
export default {
- CONFIRM: 'confirmCallback'
+ CONFIRM: 'confirmCallback',
+ VERTICAL_NAV_GET_ITEM: 'verticalNavGetItem',
+ VERTICAL_NAV_SEARCH: 'verticalNavSearch',
+ CHOOSE_ADDRESS: 'chooseAddress'
}
diff --git a/components/multi-level-nav/vertical-nav.vue b/components/multi-level-nav/vertical-nav.vue
new file mode 100644
index 0000000..6431143
--- /dev/null
+++ b/components/multi-level-nav/vertical-nav.vue
@@ -0,0 +1,185 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+ {{type.name}}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages.json b/pages.json
index 12b1661..9c5a2b4 100644
--- a/pages.json
+++ b/pages.json
@@ -1,6 +1,7 @@
{
"pages": [{
- "path": "pages/index/index"
+ "path": "pages/index/index"
+ // "path": "components/multi-level-nav/vertical-nav"
}],
"subPackages": [{
"root": "pages/order/",
@@ -39,6 +40,11 @@
}, {
"path": "serv-detail"
}]
+ }, {
+ "root":"pages/publish/",
+ "pages": [{
+ "path": "publish-task"
+ }]
}],
// "pages": [{
// "path": "pages/my/serv-detail"
diff --git a/pages/index/index.vue b/pages/index/index.vue
index c186137..72d4e34 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -12,7 +12,7 @@
-
+
发布任务
公司、家居家政雇佣上门服务
@@ -62,7 +62,7 @@
import index from '@/pages/index/home.vue';
import workerCircle from '@/pages/index/worker-home.vue';
import personalCenter from '@/pages/index/my-home.vue';
- import publishHome from '@/pages/index/publish-home.vue';
+ // import publishHome from '@/pages/index/publish-home.vue';
export default {
components: {
@@ -70,7 +70,7 @@
index,
workerCircle,
personalCenter,
- publishHome
+ // publishHome
},
data() {
return {
@@ -105,6 +105,12 @@
},
hidePublish() {
this.isShowPublish = false;
+ },
+ showPage(url) {
+ console.log(url)
+ uni.navigateTo({
+ url: url
+ })
}
}
}
diff --git a/pages/my/edit-address.vue b/pages/my/edit-address.vue
index a402035..2a2e9c5 100644
--- a/pages/my/edit-address.vue
+++ b/pages/my/edit-address.vue
@@ -18,11 +18,11 @@
- 地址选择
-
-
- {{formData.area[0]}},{{formData.area[1]}},{{formData.area[2]}}
-
+ 地址选择
+
+
+ {{areaList[0][multiIndex[0]].name}},{{areaList[1][multiIndex[1]].name}},{{areaList[2][multiIndex[2]].name}}
+
@@ -30,7 +30,7 @@
详细地址
-
+
默认地址
@@ -47,38 +47,59 @@
diff --git a/pages/my/my-operator.vue b/pages/my/my-operator.vue
index e520f88..5a977f0 100644
--- a/pages/my/my-operator.vue
+++ b/pages/my/my-operator.vue
@@ -41,7 +41,7 @@
-
+
{{item.title}}
diff --git a/pages/order/order-detail.vue b/pages/order/order-detail.vue
index 22974c8..0e82b3d 100644
--- a/pages/order/order-detail.vue
+++ b/pages/order/order-detail.vue
@@ -6,38 +6,68 @@
订单确认
-
-
+
+
+
+
+
+ {{areaObj.name}}
+
+
+ {{defaultAddress.address}}
+
+ {{defaultAddress.person2Contact}}
+ {{defaultAddress.phone}}
+
+
+
+
+
+
+
+
+
+
选择服务地址
选择
+
+
+
预约时间
- 请选择上门时间
+
+ {{doorTime}}
+
+ 请选择上门时间
+
选择的为期望上门时间,稍后工程师将与你确认具体上门时间
-
-
-
-
-
- {{item.shopName}}
-
-
-
-
-
-
-
+
+
+
+
+
+ {{item.shopName}}
+
+
+
+
+
+
+
+
+
-
-
- 发票信息
-
-
-
-
-
- 备注留言
-
-
-
-
-
-
- 为保障您的权益,请在平台内交易,师傅服务离开后发生损坏或退款以及售后质保,平台可为您追责!
-
-
-
-
- 共计
- {{formInfo.totalPrice}}
-
- 确定
+
+
+
+
+ 发票信息
+
+
+
+
+
+ 备注留言
+
+
+
+
+
+
+ 为保障您的权益,请在平台内交易,师傅服务离开后发生损坏或退款以及售后质保,平台可为您追责!
+
+
+
+
+ 共计
+ {{formInfo.totalPrice}}
+
+ 确定
@@ -102,42 +132,74 @@
columnTitleArr: ['购买型号', '购买数量'],
pickedProductList: [],
formInfo: {
- payWay: 'online',
- comments: '',
+ payWay: 'online',
+ comments: '',
totalPrice: 0
- }
+ },
+ defaultAddress: null,
+ doorTime: null
}
},
onLoad() {
this.loadData();
+ this.bindEvent();
+ },
+ onUnload() {
+ this.offBindEvent();
},
methods: {
async loadData() {
this.pickedProductList = await this.$api.data('pickedProductList');
+ this.defaultAddress = await this.$api.data('defaultAddress');
+ },
+ bindEvent() {
+ uni.$on(this.$globalFun.CHOOSE_ADDRESS, this.chooseAddress);
+ },
+ offBindEvent() {
+ uni.$off(this.$globalFun.CHOOSE_ADDRESS);
},
changePayWay(e) {
this.formInfo.payWay = e.detail.value;
- },
- inputComments(e) {
- this.comments = e.detail.value
},
+ inputComments(e) {
+ this.comments = e.detail.value
+ },
+ showAddress2Choose() {
+ uni.navigateTo({
+ url: '/pages/my/my-address?chooseMode=true'
+ })
+ },
+ chooseAddress(addressInfo) {
+ this.defaultAddress = addressInfo;
+ },
+ changeDoorTime(value) {
+ this.doorTime = value;
+ }
},
}
-
diff --git a/pages/product/product-pick.vue b/pages/product/product-pick.vue
index 81d7bf8..a440ed4 100644
--- a/pages/product/product-pick.vue
+++ b/pages/product/product-pick.vue
@@ -119,6 +119,7 @@
.certern-height-with-scroll {
height: 600rpx;
+ margin-bottom: calc(100rpx - constant(safe-area-inset-bottom)/2);
margin-bottom: calc(100rpx - env(safe-area-inset-bottom)/2);
}
diff --git a/pages/publish/publish-task.vue b/pages/publish/publish-task.vue
new file mode 100644
index 0000000..965ac7c
--- /dev/null
+++ b/pages/publish/publish-task.vue
@@ -0,0 +1,509 @@
+
+
+
+
+ 返回
+ 发布任务
+
+
+
+
+
+ {{stepName}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{areaObj.name}}
+
+
+ {{defaultAddress.address}}
+
+ {{defaultAddress.person2Contact}}
+ {{defaultAddress.phone}}
+
+
+
+
+
+
+
+
+
+
+
+
+ 选择服务地址
+
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{formData.expectPrice}}
+
+ {{formData.category.name}}/规格:{{formData.spec}}({{formData.publishNum}}个)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/style/blue/blue-topic.css b/style/blue/blue-topic.css
index bc78715..1a63859 100644
--- a/style/blue/blue-topic.css
+++ b/style/blue/blue-topic.css
@@ -1,8 +1,8 @@
-.line-default {
- color: #aaaaaa;
-}
-
-.line-main-color,
+.line-default {
+ color: #aaaaaa;
+}
+
+.line-main-color,
.text-main-color {
color: #0081ff;
}
@@ -20,20 +20,25 @@
.bg-gradual-color {
background-image: linear-gradient(45deg, #0081ff, #1cbbb4);
color: #ffffff;
+}
+
+switch.main-color[checked] .wx-switch-input,
+checkbox.main-color[checked] .wx-checkbox-input,
+radio.main-color[checked] .wx-radio-input,
+switch.main-color.checked .uni-switch-input,
+checkbox.main-color.checked .uni-checkbox-input,
+radio.main-color.checked .uni-radio-input {
+ background-color: #0081ff !important;
+ border-color: #0081ff !important;
+ color: #ffffff !important;
+}
+
+.oper-bar button:last-child {
+ background-color: #0081ff;
+ color: #ffffff;
+}
+
+.cu-list.menu>.cu-item.bg-main-color.light {
+ color: #0081ff;
+ background-color: #cce6ff;
}
-
-switch.main-color[checked] .wx-switch-input,
-checkbox.main-color[checked] .wx-checkbox-input,
-radio.main-color[checked] .wx-radio-input,
-switch.main-color.checked .uni-switch-input,
-checkbox.main-color.checked .uni-checkbox-input,
-radio.main-color.checked .uni-radio-input {
- background-color: #0081ff !important;
- border-color: #0081ff !important;
- color: #ffffff !important;
-}
-
-.oper-bar button:last-child {
- background-color: #0081ff;
- color: #ffffff;
-}
\ No newline at end of file
diff --git a/style/default.css b/style/default.css
index 9e5f7dd..b45085c 100644
--- a/style/default.css
+++ b/style/default.css
@@ -1,5 +1,6 @@
-.margin-bottom-with-bar {
- margin-bottom: calc(120rpx + env(safe-area-inset-bottom) / 2)
+.margin-bottom-with-bar {
+ margin-bottom: calc(120rpx + constant(safe-area-inset-bottom) / 2);
+ margin-bottom: calc(120rpx + env(safe-area-inset-bottom) / 2);
}
.fixed-bottom-bar {
@@ -7,7 +8,9 @@
width: 100% !important;
bottom: 0 !important;
margin-bottom: 0 !important;
- z-index: 98;
+ z-index: 98;
+ padding-bottom: constant(safe-area-inset-bottom / 2) !important; /*兼容 IOS<11.2*/
+ padding-bottom: env(safe-area-inset-bottom / 2) !important; /*兼容 IOS>11.2*/
}
.cu-bar.tabbar.border .action checkbox {
@@ -47,7 +50,7 @@
}
.cu-form-group .title {
- flex-basis: 23%;
+ flex-basis: 24%;
text-align: justify;
padding-right: 30rpx;
font-size: 30rpx;
@@ -72,7 +75,7 @@
font-size: 28rpx;
color: #555;
padding-right: 20rpx;
-}
+}
.uni-forms-item__inner {
display: flex !important;
@@ -82,4 +85,13 @@
.is-input-border {
border: none !important;
+}
+
+.dialog-close {
+ display: none !important;
+}
+
+.cu-form-group textarea {
+ margin: 0 0 20rpx 0 !important;
+ padding: 20rpx !important;
}