diff --git a/src/App.vue b/src/App.vue
index 117e76b..4e430cc 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -176,11 +176,23 @@ export default {
.widget-item:first-child {
margin-top: 0;
}
+ .widget-item.input {
+ .picker,
+ .title {
+ position: relative;
+ top: 0;
+ left: 0;
+ }
+ .title {
+ padding: 0;
+ padding-left: 30rpx;
+ }
+ }
.widget-item {
position: relative;
display: flex;
justify-content: space-between;
- align-items: center;
+ align-items: flex-start;
width: 100%;
margin-top: 2rpx;
padding: 44rpx 30rpx;
@@ -237,6 +249,7 @@ export default {
font-weight: bold;
line-height: 30rpx;
color: #2d2d2d;
+ flex-shrink: 0;
}
.desc {
font-size: 28rpx;
@@ -268,7 +281,7 @@ export default {
line-height: 30rpx;
// input
.input-box {
- width: 500rpx;
+ width: 100%;
position: relative;
padding: 25rpx 0;
}
diff --git a/src/pages.json b/src/pages.json
index e4725f5..f88b31f 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -109,18 +109,6 @@
"navigationBarTitleText": "修改密码"
}
},
- {
- "path": "pages/address/address",
- "style": {
- "navigationBarTitleText": "地址管理"
- }
- },
- {
- "path": "pages/address/edit",
- "style": {
- "navigationBarTitleText": "新增地址"
- }
- },
{
"path": "pages/service/other/after-market",
"style": {
diff --git a/src/pages/address/address.vue b/src/pages/address/address.vue
deleted file mode 100644
index bfb5d14..0000000
--- a/src/pages/address/address.vue
+++ /dev/null
@@ -1,248 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- 默认
- {{ item.address }}
-
-
- {{ item.detail }}
-
-
- {{ item.name }}
- {{ item.mobile }}
-
-
-
-
-
-
-
-
-
-
- 获取微信收货地址
-
-
- 新增地址
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/pages/address/edit.vue b/src/pages/address/edit.vue
deleted file mode 100644
index 4be4a6d..0000000
--- a/src/pages/address/edit.vue
+++ /dev/null
@@ -1,224 +0,0 @@
-
-
-
-
-
-
-
-
- 服务地址
-
-
-
- {{ address ? address : "点击选择服务地址" }}
-
-
-
-
-
-
- 门牌号
-
-
-
-
-
-
-
- 联系人
-
-
-
-
-
-
-
- 性别
-
-
-
-
- 先生
-
-
- 女士
-
-
-
-
-
-
- 手机号码
-
-
-
-
-
-
-
- 设为默认地址
-
-
-
-
-
-
-
- 保存
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/pages/demand/demand.vue b/src/pages/demand/demand.vue
index afd00f5..c33f12f 100644
--- a/src/pages/demand/demand.vue
+++ b/src/pages/demand/demand.vue
@@ -58,7 +58,7 @@
@@ -105,23 +105,68 @@
+
+
+
+ 基本信息
+ (隐私信息完全保密)
+
+
+
+
+ 服务地址
+
+
+
+ {{ address.text ? address.text : "点击选择服务地址" }}
+
+
+
+
+
+
+ 门牌号
+
+
+
+
+
+
+
+ 联系人
+
+
+
+
+
+
+
+ 手机号码
+
+
+
+
+
+
-
- 选择报价方式
- (隐私信息完全保密)
-
-
-
-
-
- {{ addressText ? addressText : "请选择上门地址" }}
-
-
-
-
@@ -225,7 +270,14 @@ export default {
content: "",
cateId: 0,
uploadImages: [],
- addressText: "",
+ address: {
+ lng: 0.0,
+ lat: 0.0,
+ text: "",
+ detail: "",
+ name: "",
+ mobile: "",
+ },
date: "",
time: "",
insurance: false,
@@ -338,15 +390,16 @@ export default {
/**
* 选择地址
*/
- selectAddress() {
+ chooseLocation() {
const that = this;
- this.$utils.toPage("/pages/address/address?openType=choose&id=" + that.addressId, {
- events: {
- setAddress(address) {
- that.addressId = address.id;
- that.addressText = address.address + address.detail;
- },
+ uni.chooseLocation({
+ success({ name, address, longitude, latitude }) {
+ that.address.text = address;
+ that.address.detail = name;
+ that.address.lng = longitude;
+ that.address.lat = latitude;
},
+ fail(error) {},
});
},
/**
@@ -402,8 +455,11 @@ export default {
* 发布报价
*/
submit() {
- if (!this.addressId) {
- return this.$utils.toast("请选择地址");
+ if (this.address.text == "" || this.address.detail == "" || this.address.name == "") {
+ return this.$utils.toast("请完善地址信息");
+ }
+ if (!this.$test.mobile(this.address.mobile)) {
+ return this.$utils.toast("请填写正确的手机号码");
}
if (!this.date || !this.time) {
return this.$utils.toast("请选择时间和日期");
@@ -415,7 +471,14 @@ export default {
types: this.type,
desc: this.content,
img: this.uploadImages,
- addid: this.addressId,
+ address: {
+ address: this.address.text,
+ doorplate: this.address.detail,
+ name: this.address.name,
+ mobil: this.address.mobile,
+ lng: this.address.lng,
+ lat: this.address.lat,
+ },
times: datetime,
baoxian: this.insurance ? 1 : 0,
money: this.price,
@@ -579,21 +642,16 @@ export default {
}
}
.common-form-container.form-widget {
- margin-top: 22rpx;
.input-item {
height: auto;
padding: 0;
border-bottom: 0;
line-height: unset;
}
- .title-box {
- width: 100%;
- box-sizing: border-box;
- padding: 30rpx 0 0 30rpx;
- }
.input-box {
width: 100%;
padding-bottom: 0;
+ padding: 0;
}
.widget-item:first-child {
border-bottom: 1rpx solid #e8e7e7;
@@ -642,6 +700,37 @@ export default {
}
}
}
+.common-form-container.address {
+ width: 100%;
+ margin-top: 22rpx;
+ .title-box.title {
+ width: 100%;
+ font-weight: bold;
+ box-sizing: border-box;
+ }
+ .title-box {
+ font-weight: normal;
+ }
+ .input-box.map {
+ .address-text {
+ font-size: 28rpx;
+ line-height: 38rpx;
+ color: #c9c9c9;
+ box-sizing: border-box;
+ padding-right: 40rpx;
+ }
+ .address-text.active {
+ color: #000000;
+ }
+ .iconfont {
+ position: absolute;
+ top: 28rpx;
+ right: 0;
+ font-size: 35rpx;
+ color: #8194f2;
+ }
+ }
+}
.price-box {
.submit-price {
width: 100%;
diff --git a/src/pages/member/member.vue b/src/pages/member/member.vue
index 5ced632..15925a2 100644
--- a/src/pages/member/member.vue
+++ b/src/pages/member/member.vue
@@ -29,11 +29,6 @@