From b07248d07b07f99b830f2d70e5526a73d2684012 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com>
Date: Thu, 16 Nov 2023 21:42:01 +0800
Subject: [PATCH 1/7] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3=E5=AF=B9?=
=?UTF-8?q?=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 20 +++----
pages/my/edit/edit.vue | 133 ++++++++++++++++++++++++++++++++---------
pages/my/my.vue | 41 +++++++------
service/request.js | 25 +++++---
4 files changed, 155 insertions(+), 64 deletions(-)
diff --git a/pages.json b/pages.json
index 31eb97f..8e4147a 100644
--- a/pages.json
+++ b/pages.json
@@ -172,17 +172,17 @@
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
+ }, {
+ "path": "pages/my/edit/edit",
+ "style": {
+ "navigationBarTitleText": "修改个人信息",
+ "navigationBarTextStyle": "white",
+ "navigationBarBackgroundColor": "#339967",
+ "enablePullDownRefresh": false
+ }
+
}
- ,{
- "path" : "pages/my/edit/edit",
- "style" :
- {
- "navigationBarTitleText": "修改个人信息",
- "enablePullDownRefresh": false
- }
-
- }
- ],
+ ],
"tabBar": {
"color": "#CCCCCC",
"borderStyle": "white",
diff --git a/pages/my/edit/edit.vue b/pages/my/edit/edit.vue
index f448e44..fa9a520 100644
--- a/pages/my/edit/edit.vue
+++ b/pages/my/edit/edit.vue
@@ -1,69 +1,146 @@
-
+
-
+
+
+
+
+
+
+
+
+ 提交
-
+
+
+ .u-button {
+ width: 644rpx !important;
+ height: 86rpx !important;
+ background: #0EBB5B;
+ border-radius: 20rpx !important;
+ }
+
\ No newline at end of file
diff --git a/pages/my/my.vue b/pages/my/my.vue
index bbb5e5d..81bd79b 100644
--- a/pages/my/my.vue
+++ b/pages/my/my.vue
@@ -7,8 +7,10 @@
{{username}}
- 账号:{{account}}
-
+ 账号:{{account}}
+
+
+
@@ -43,8 +45,8 @@
data() {
return {
src: 'https://cdn.uviewui.com/uview/album/2.jpg',
- account: '',
- username: '',
+ account: '123',
+ username: '用户名',
isLoad: true
}
},
@@ -54,8 +56,9 @@
return
}
this.isLoad = true
- this.$data.account = wx.getStorageSync('account')
- this.$data.username = wx.getStorageSync('nickname')
+ // this.$data.account = wx.getStorageSync('account')
+ // this.$data.username = wx.getStorageSync('nickname')
+ this.getInfo()
},
methods: {
reOnLoad() {
@@ -86,17 +89,22 @@
url: '/pages/Partnerships/Partnerships'
})
},
- toEdit(){
+ toEdit() {
uni.navigateTo({
- url:'/pages/my/edit/edit'
+ url: '/pages/my/edit/edit'
+ })
+ },
+ //---------页面调用接口示例------------
+ getInfo() {
+ this.$api.getUser().then(res => {
+ console.log('userInfo', res);
+ var data = res.data.data
+ if (data) {
+ this.src = uni.getStorageSync('img_url') + data.avatar
+ this.username = data.nickname
+ }
})
}
- //---------页面调用接口示例------------
- // getInfo() {
- // this.$api.getUserInfo().then(res => {
- // console.log('userInfo', res);
- // })
- // }
}
}
@@ -134,9 +142,8 @@
font-weight: 1rpx;
display: flex;
}
- .edit-icon{
-
- }
+
+ .edit-icon {}
}
\ No newline at end of file
diff --git a/service/request.js b/service/request.js
index a83e178..b1d58ab 100644
--- a/service/request.js
+++ b/service/request.js
@@ -130,7 +130,7 @@ const apiService = {
serverHost,
imgUrl: 'https://spsp.feashow.com/',
key: 'ZRKBZ-Q7FWL-GVZPK-MCRBU-4XFB5-ATBDB',
- uploadImgUrl: serverHost + `/upload/image/`,
+ uploadImgUrl: serverHost + '/upload/image/',
//登录接口
login(data) {
const url = '/login/mnpLogin'
@@ -211,27 +211,34 @@ const apiService = {
resolve(service.get(url))
})
},
+ //获取个人信息
+ getUser() {
+ const url = '/center/userinfo'
+ return new Promise((resolve, reject) => {
+ resolve(service.get(url))
+ })
+ },
//修改个人信息
- editPersonInfo(data){
+ editPersonInfo(data) {
const url = `center/userupdate`
- return new Promise((resolve,reject) => {
- resolve(service.putWithFormData(url,data))
+ return new Promise((resolve, reject) => {
+ resolve(service.post(url, data))
})
},
//获取我的匹配
- getMyMatch(){
+ getMyMatch() {
const url = `/center/match/`
- return new Promise((resolve,reject) => {
+ return new Promise((resolve, reject) => {
resolve(service.get(url))
})
},
//获取行业和业态
- getClassList(pid){
+ getClassList(pid) {
const url = `/home/classlist/?pid=${pid}`
- return new Promise((resolve,reject) => {
+ return new Promise((resolve, reject) => {
resolve(service.post(url))
})
- }
+ },
}
export {
apiService,
From dc57ab9ade1a8e904b47243258b7f280ca7c279f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com>
Date: Thu, 16 Nov 2023 21:44:31 +0800
Subject: [PATCH 2/7] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E5=A4=B4=E5=83=8F=E5=A4=A7=E5=B0=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/my/my.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pages/my/my.vue b/pages/my/my.vue
index 81bd79b..32beca2 100644
--- a/pages/my/my.vue
+++ b/pages/my/my.vue
@@ -4,7 +4,7 @@
-
+
{{username}}
账号:{{account}}
From 590ffc1d46d20cdb9911fd2e3fb0d596c44d3cd1 Mon Sep 17 00:00:00 2001
From: hot777zz <912275990@qq.com>
Date: Fri, 17 Nov 2023 00:38:54 +0800
Subject: [PATCH 3/7] =?UTF-8?q?=E6=A2=81=E8=88=AA=EF=BC=9A=E5=8F=91?=
=?UTF-8?q?=E5=B8=83=E9=A1=B5=E8=8E=B7=E5=8F=96=E4=B8=9A=E6=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../publishTransfer/publishTransfer.vue | 63 ++++++++++++++-----
1 file changed, 46 insertions(+), 17 deletions(-)
diff --git a/pages/publish/publishTransfer/publishTransfer.vue b/pages/publish/publishTransfer/publishTransfer.vue
index a868970..07a75a4 100644
--- a/pages/publish/publishTransfer/publishTransfer.vue
+++ b/pages/publish/publishTransfer/publishTransfer.vue
@@ -12,7 +12,7 @@
请选择所属区域
-
+
@@ -21,21 +21,21 @@
-
- 请选择行业类型
+
+ {{form.trade}}
-
+
-
+
- 请选择行业业态
+ {{form.karma}}
-
+
-
+
@@ -79,8 +79,8 @@
title: '',
region: '',
place: '',
- trade: '',
- karma: '',
+ trade: '请选择行业',
+ karma: '请选择业态',
size: '',
rent: '',
sell: '',
@@ -88,9 +88,10 @@
call: '',
introduce: ''
},
- columns: [
-
- ],
+ Classcolumns: [],
+ ClassCheckId:'',
+ Karmacolumns: [],
+ pid:[],
show1: false,
show2: false,
show3: false,
@@ -181,8 +182,8 @@
})
},
changeAddress(e) {
- console.log('changeAddress', e);
- // this.getAddressList(e)
+ // console.log('changeAddress', e);
+ this.getAddressList(e)
},
getAddressList(value) {
var that = this
@@ -199,9 +200,37 @@
}
})
},
+ tradeConfirm(e){
+ this.show2 = false
+ this.form.trade = e.value[0]
+ this.ClassCheckId = this.pid[e.indexs[0]]
+ this.$api.getClassList(this.ClassCheckId).then(res => {
+ // console.log(res);
+ this.Karmacolumns = res.data.data.map((item) => {
+ return item = item.name
+ })
+ })
+ },
+ karmaConfirm(e){
+ this.show3 = false
+ this.form.karma = e.value[0]
+ }
},
onReady() {
this.$refs.uForm.setRules(this.rules)
+
+ },
+ onLoad() {
+ this.$api.getClassList().then(res =>{
+ // console.log(res.data.data.length);
+ this.Classcolumns = res.data.data.map((item) => {
+ return item = item.name
+ })
+ this.pid = res.data.data.map((item) => {
+ return item = item.id
+ })
+
+ })
}
}
From 0c1998d09edc524644082626d9310b68ab919e77 Mon Sep 17 00:00:00 2001
From: dengj <209192278@qq.com>
Date: Fri, 17 Nov 2023 10:53:17 +0800
Subject: [PATCH 4/7] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=E8=8E=B7=E5=8F=96?=
=?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/my/edit/edit.vue | 9 +++------
pages/my/my.vue | 10 +++++-----
2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/pages/my/edit/edit.vue b/pages/my/edit/edit.vue
index fa9a520..cf30d09 100644
--- a/pages/my/edit/edit.vue
+++ b/pages/my/edit/edit.vue
@@ -25,7 +25,7 @@
data() {
return {
Info: {
- avatar: [],
+ avatar: '',
username: '',
avatarUrl: ''
}
@@ -36,10 +36,9 @@
getUserInfo() {
this.$api.getUser().then(res => {
const data = res.data.data
- console.log('头像昵称', res);
if (data) {
- this.avatar = this.$api.imgUrl + data.avatar
- this.avatarUrl = '/' + data.avatar
+ this.Info.avatar = this.$api.imgUrl + data.avatar
+ this.avatarUrl = data.avatar
this.Info.username = data.nickname
}
}).finally(_ => {})
@@ -98,8 +97,6 @@
},
onLoad() {
let that = this
- this.$data.Info.username = wx.getStorageSync('nickname')
- this.$data.Info.avatar = wx.getStorageSync('avatar')
this.getUserInfo()
}
}
diff --git a/pages/my/my.vue b/pages/my/my.vue
index 32beca2..b3583a0 100644
--- a/pages/my/my.vue
+++ b/pages/my/my.vue
@@ -56,9 +56,6 @@
return
}
this.isLoad = true
- // this.$data.account = wx.getStorageSync('account')
- // this.$data.username = wx.getStorageSync('nickname')
- this.getInfo()
},
methods: {
reOnLoad() {
@@ -68,6 +65,9 @@
return
}
this.isLoad = true
+ if(this.isLoad){
+ this.getInfo()
+ }
},
failToLoad() {
uni.reLaunch({
@@ -97,11 +97,11 @@
//---------页面调用接口示例------------
getInfo() {
this.$api.getUser().then(res => {
- console.log('userInfo', res);
var data = res.data.data
if (data) {
- this.src = uni.getStorageSync('img_url') + data.avatar
+ this.src = this.$api.imgUrl + data.avatar
this.username = data.nickname
+ this.account = data.sn
}
})
}
From 1259f1a4c8e082594ae4719fb15386332ac847bc Mon Sep 17 00:00:00 2001
From: dengj <209192278@qq.com>
Date: Fri, 17 Nov 2023 13:11:30 +0800
Subject: [PATCH 5/7] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=E7=82=B9=E5=87=BB?=
=?UTF-8?q?=E8=BD=AE=E6=92=AD=E5=9B=BE=E8=B7=B3=E8=BD=AC=E5=88=B0=E8=AF=A6?=
=?UTF-8?q?=E6=83=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/InputAndSwiper/InputAndSwiper.vue | 17 +++++++++++------
pages/detail/detail.vue | 18 +++++++++++++-----
pages/index/index.vue | 6 +++++-
3 files changed, 29 insertions(+), 12 deletions(-)
diff --git a/components/InputAndSwiper/InputAndSwiper.vue b/components/InputAndSwiper/InputAndSwiper.vue
index 0b1ba5f..478d6b2 100644
--- a/components/InputAndSwiper/InputAndSwiper.vue
+++ b/components/InputAndSwiper/InputAndSwiper.vue
@@ -13,7 +13,8 @@
-
+ currentNum = e.current"
+ @click="handleSwiperList(currentNum==''?0:currentNum,bannerURL)" />
@@ -38,19 +39,23 @@
},
data() {
return {
- position: uni.getStorageSync('city')+uni.getStorageSync('district').slice(0, 2)
+ position: uni.getStorageSync('city') + uni.getStorageSync('district').slice(0, 2),
+ currentNum: ''
};
},
options: {
styleIsolation: 'shared', // 解除样式隔离
},
created() {
- if (this.type !== '0') {
- // this.open()
- }
},
methods: {
-
+ //点击轮播图
+ handleSwiperList(currentNum, bannerURL) {
+ const item=bannerURL[currentNum]
+ uni.navigateTo({
+ url: item.link+`?id=${item.param}&type=${item.type}`
+ })
+ },
}
}
diff --git a/pages/detail/detail.vue b/pages/detail/detail.vue
index 0c2aef0..9a909d1 100644
--- a/pages/detail/detail.vue
+++ b/pages/detail/detail.vue
@@ -94,9 +94,9 @@
},
data() {
return {
- shopInfo:{
+ // shopInfo:{
- }
+ // }
}
},
@@ -112,9 +112,17 @@
}
},
onLoad: function(options) {
- const shopInfomation = JSON.parse(decodeURIComponent(options.shopInfo))
- console.log(shopInfomation);
- this.shopInfo = shopInfomation
+ // const shopInfomation = JSON.parse(decodeURIComponent(options.shopInfo))
+ // console.log(shopInfomation);
+ // this.shopInfo = shopInfomation
+ console.log('detail',options);
+ //点击轮播图跳转详情, 传递的参数id, type
+ if(options.id){
+
+ }
+ if(options.type){
+
+ }
}
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index bb38c7c..4d6255d 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -55,7 +55,11 @@
methods: {
getBanner() {
this.$api.getBanner().then(res => {
- this.swiperList = res.data.data.map(item => this.$api.imgUrl + item.img)
+ res.data.data.forEach(item=>{
+ item.img =this.$api.imgUrl + item.img
+ })
+ this.swiperList = res.data.data
+ // .map(item => this.$api.imgUrl + item.img)
})
},
getNotice() {
From 789dc3c1fbc039dffd02d4ee9ff70ed5b9e47da5 Mon Sep 17 00:00:00 2001
From: dengj <209192278@qq.com>
Date: Fri, 17 Nov 2023 17:51:22 +0800
Subject: [PATCH 6/7] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=E8=AF=A6=E6=83=85?=
=?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=8F=8A=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/detail/detail.vue | 252 ++++++++++++++++++++----------------
service/request.js | 10 +-
static/shoplist/service.png | Bin 0 -> 5221 bytes
static/shoplist/share.png | Bin 0 -> 4237 bytes
4 files changed, 146 insertions(+), 116 deletions(-)
create mode 100644 static/shoplist/service.png
create mode 100644 static/shoplist/share.png
diff --git a/pages/detail/detail.vue b/pages/detail/detail.vue
index 9a909d1..2089b20 100644
--- a/pages/detail/detail.vue
+++ b/pages/detail/detail.vue
@@ -1,183 +1,215 @@
-
+
- {{shopInfo.title}}
+ {{shopInfo.tt}}
-
- 22
- 租金
-
-
- 22
- 转让费
-
-
- 22
- 面积
-
-
+
+ {{shopInfo.zujin}}元/月
+ 租金
+
+
+ {{shopInfo.zhuanrangfei}}万元
+ 转让费
+
+
+ {{shopInfo.mianji}}m²
+ 面积
+
+
-
+
- 行业:
- 区域:
- 地址:
+ 行业:{{shopInfo.trade1}}
+ 区域:{{shopInfo.area1}}
+ 地址:{{shopInfo.adress}}
-
-
+
+
-
-
+
-
-
+
+
-
+
-
- 分享
-
-
-
- 客服
+
+
-
+
打电话
+
+
+
+ 是否拨打该联系人电话?
+
+
-
+
-
+
+
\ No newline at end of file
diff --git a/pages/publish/publishInvestment/publishInvestment.vue b/pages/publish/publishInvestment/publishInvestment.vue
index 81cfadd..6160647 100644
--- a/pages/publish/publishInvestment/publishInvestment.vue
+++ b/pages/publish/publishInvestment/publishInvestment.vue
@@ -3,50 +3,57 @@
- 发布项目图片({{ShopInfomation.count}}/5)
+ 发布房源图片({{ShopInfomation.count}}/5)
+
+
+
+
+
+
+
+ {{form.region}}
+ 请选择所属区域
-
-
-
-
- 请选择所属区域
-
-
-
-
-
-
-
-
-
- 请选择行业类型
-
-
-
-
-
-
- 请选择行业业态
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 发布
-
+
+
+
+
+
+
+ {{form.trade}}
+ 请选择行业
+
+
+
+
+
+
+ {{form.karma}}
+ 请选择业态
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 发布
+
@@ -54,53 +61,202 @@
export default {
data() {
return {
- regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[],
- ShopInfomation:{
- city:'',
- area:'',
- count:0,
-
+ regionColumns: [JSON.parse(uni.getStorageSync('regionList'))] || [],
+ ShopInfomation: {
+ city: '',
+ area: '',
+ count: 0,
+
},
-
- form:{
- title:''
+
+ form: {
+ title: '',
+ region: '',
+ place: '',
+ trade: '',
+ karma: '',
+ size: '',
+ rent: '',
+ sell: '',
+ name: '',
+ call: '',
+ introduce: ''
+ },
+ Classcolumns: [],
+ ClassCheckId:'',
+ Karmacolumns: [],
+ pid:[],
+ show1: false,
+ show2: false,
+ show3: false,
+ rules: {
+ 'title': [{
+ required: true,
+ message: '请输入标题',
+ trigger: ['change', 'blur']
+ }],
+ 'trade': [{
+ required: true,
+ message: '请选择行业',
+ trigger: ['change', 'blur']
+ }],
+ 'region': [{
+ required: true,
+ message: '请选择地区',
+ trigger: ['change', 'blur']
+ }],
+ 'karma': [{
+ required: true,
+ message: '请选择业态',
+ trigger: ['change', 'blur']
+ }],
+ 'name': [{
+ required: true,
+ message: '请输入姓名',
+ trigger: ['change', 'blur']
+ }],
+ 'sell': [{
+ required: true,
+ message: '请输入转让金',
+ trigger: ['change', 'blur']
+ }],
+ 'introduce': [{
+ required: true,
+ message: '请输入介绍',
+ trigger: ['change', 'blur']
+ }],
+ 'size': [{
+ required: true,
+ message: '请输入面积',
+ trigger: ['change', 'blur']
+ }],
+ 'rent': [{
+ required: true,
+ message: '请输入租金',
+ trigger: ['change', 'blur']
+ }],
+ 'place': [{
+ required: true,
+ message: '请输入地址',
+ trigger: ['change', 'blur']
+ }],
+ 'call':[{
+ required: true,
+ message: '请输入电话号码',
+ },
+ {
+ validator: (rule, value, callback) => {
+ if(value) {
+ return this.$u.test.mobile(value);
+ } else {
+ return true
+ }
+ },
+ message: '号码不正确',
+ trigger: ['change','blur'],
+ }]
+
},
- columns:[
- ],
- show1:false,
- show2:false,
- show3:false,
}
-
},
methods: {
- confirmArea(e) {
- this.ShopInfomation.city = e.value[0]
- this.ShopInfomation.area = e.value[1]
- this.show1 = false
- },
- submit(){
- console.log('提交');
+ handleSearchAddress() {
+ uni.navigateTo({
+ url: '/pages/publish/chooseAddress/chooseAddress'
+ })
+ },
+ changeAddress(e) {
+ // console.log('changeAddress', e);
+ this.getAddressList(e)
+ },
+ getAddressList(value) {
+ var that = this
+ uni.request({
+ url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=' + value + '&key=' +
+ that.$api.key,
+ success(res) {
+ console.log('diz', res.data.result.location);
+ console.log('lat', res.data.result.location.lat);
+ console.log('lng', res.data.result.location.lng);
+ },
+ fail(err) {
+ console.log('请求区域失败:', err);
+ }
+ })
+ },
+ submit() {
+ this.$refs.uForm.validate().then(res => {
+ console.log("提交表单信息:" + JSON.stringify(this.form))
+ uni.$u.toast('发布成功')
+ // 调用服务端入表接口W
+ }).catch(errors => {
+ console.log("失败信息:" + JSON.stringify(errors))
+ // uni.$u.toast('校验失败')
+ })
+ },
+ tradeConfirm(e){
+ this.show2 = false
+ this.form.trade = e.value[0]
+ this.ClassCheckId = this.pid[e.indexs[0]]
+ this.$api.getClassList(this.ClassCheckId).then(res => {
+ // console.log(res);
+ this.Karmacolumns = res.data.data.map((item) => {
+ return item = item.name
+ })
+ })
+ },
+ karmaConfirm(e){
+ this.show3 = false
+ this.form.karma = e.value[0]
+ },
+ regionConfirm(e){
+ this.show1 = false
+ this.form.region = e.value[0]
+ },
+ },
+ onReady() {
+ this.$refs.uForm.setRules(this.rules)
+
+ },
+ onLoad() {
+ this.$api.getClassList().then(res =>{
+ // console.log(res.data.data.length);
+ this.Classcolumns = res.data.data.map((item) => {
+ return item = item.name
+ })
+ this.pid = res.data.data.map((item) => {
+ return item = item.id
+ })
+
+ })
+ },
+ computed:{
+ isChecked(index){
+ if(index.length > 0)
+ return true;
+ else
+ return false;
}
}
}
+
\ No newline at end of file
diff --git a/pages/publish/publishRent/publishRent.vue b/pages/publish/publishRent/publishRent.vue
index 425d647..6670fde 100644
--- a/pages/publish/publishRent/publishRent.vue
+++ b/pages/publish/publishRent/publishRent.vue
@@ -6,40 +6,45 @@
发布店铺图片({{ShopInfomation.count}}/5)
-
-
+
+
-
- 请选择所属区域
+
+ {{form.region}}
+ 请选择所属区域
+
-
+
-
+
-
-
+
+
-
- 请选择行业类型
+
+ {{form.trade}}
+ 请选择店铺行业
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
@@ -60,14 +65,79 @@
},
- form:{
- title:''
+ form: {
+ title: '',
+ region: '',
+ place: '',
+ trade: '',
+ size: '',
+ rent: '',
+ name: '',
+ call: '',
+ introduce: ''
},
- columns:[
- ],
+ Classcolumns:[],
show1:false,
show2:false,
show3:false,
+ rules: {
+ 'title': [{
+ required: true,
+ message: '请输入标题',
+ trigger: ['change', 'blur']
+ }],
+ 'trade': [{
+ required: true,
+ message: '请选择行业',
+ trigger: ['change', 'blur']
+ }],
+ 'region': [{
+ required: true,
+ message: '请选择地区',
+ trigger: ['change', 'blur']
+ }],
+ 'name': [{
+ required: true,
+ message: '请输入姓名',
+ trigger: ['change', 'blur']
+ }],
+ 'introduce': [{
+ required: true,
+ message: '请输入介绍',
+ trigger: ['change', 'blur']
+ }],
+ 'size': [{
+ required: true,
+ message: '请输入面积',
+ trigger: ['change', 'blur']
+ }],
+ 'rent': [{
+ required: true,
+ message: '请输入租金',
+ trigger: ['change', 'blur']
+ }],
+ 'place': [{
+ required: true,
+ message: '请输入地址',
+ trigger: ['change', 'blur']
+ }],
+ 'call':[{
+ required: true,
+ message: '请输入电话号码',
+ },
+ {
+ validator: (rule, value, callback) => {
+ if(value) {
+ return this.$u.test.mobile(value);
+ } else {
+ return true
+ }
+ },
+ message: '号码不正确',
+ trigger: ['change','blur'],
+ }]
+
+ },
}
},
@@ -77,10 +147,37 @@
this.ShopInfomation.area = e.value[1]
this.show1 = false
},
- submit(){
- console.log('提交');
+ submit() {
+ this.$refs.uForm.validate().then(res => {
+ console.log("提交表单信息:" + JSON.stringify(this.form))
+ uni.$u.toast('发布成功')
+ // 调用服务端入表接口W
+ }).catch(errors => {
+ console.log("失败信息:" + JSON.stringify(errors))
+ // uni.$u.toast('校验失败')
+ })
+ },
+ tradeConfirm(e){
+ this.show2 = false
+ this.form.trade = e.value[0]
+ },
+ regionConfirm(e){
+ this.show1 = false
+ this.form.region = e.value[0]
}
- }
+ },
+ onLoad() {
+ this.$api.getClassList().then(res =>{
+ // console.log(res.data.data.length);
+ this.Classcolumns = res.data.data.map((item) => {
+ return item = item.name
+ })
+ })
+ },
+ onReady() {
+ this.$refs.uForm.setRules(this.rules)
+
+ },
}
@@ -123,7 +220,12 @@
font-weight:1px;
color: #c1c4c7;
}
-
+ .checkedtext{
+ margin-top: 5rpx;
+ font-size: 28rpx;
+ font-weight: 1px;
+ border-style: none;
+ }
.picker{
display: flex;
justify-content: space-between;
diff --git a/pages/publish/publishTransfer/publishTransfer.vue b/pages/publish/publishTransfer/publishTransfer.vue
index 07a75a4..05c6906 100644
--- a/pages/publish/publishTransfer/publishTransfer.vue
+++ b/pages/publish/publishTransfer/publishTransfer.vue
@@ -10,19 +10,22 @@
- 请选择所属区域
+ {{form.region}}
+ 请选择所属区域
+
+ v-model="form.region" @confirm="regionConfirm">
- {{form.trade}}
+ {{form.trade}}
+ 请选择店铺行业
@@ -30,7 +33,8 @@
v-model="form.trade" @confirm="tradeConfirm">
- {{form.karma}}
+ {{form.karma}}
+ 请选择店铺业态
@@ -67,7 +71,7 @@
export default {
data() {
return {
- // regionColumns: [JSON.parse(uni.getStorageSync('regionList'))] || [],
+ regionColumns: [JSON.parse(uni.getStorageSync('regionList'))] || [],
ShopInfomation: {
city: '',
area: '',
@@ -79,8 +83,8 @@
title: '',
region: '',
place: '',
- trade: '请选择行业',
- karma: '请选择业态',
+ trade: '',
+ karma: '',
size: '',
rent: '',
sell: '',
@@ -214,7 +218,11 @@
karmaConfirm(e){
this.show3 = false
this.form.karma = e.value[0]
- }
+ },
+ regionConfirm(e){
+ this.show1 = false
+ this.form.region = e.value[0]
+ },
},
onReady() {
this.$refs.uForm.setRules(this.rules)
@@ -231,6 +239,14 @@
})
})
+ },
+ computed:{
+ isChecked(index){
+ if(index.length > 0)
+ return true;
+ else
+ return false;
+ }
}
}
@@ -279,7 +295,12 @@
font-weight: 1px;
color: #c1c4c7;
}
-
+ .checkedtext{
+ margin-top: 5rpx;
+ font-size: 28rpx;
+ font-weight: 1px;
+ border-style: none;
+ }
.picker {
display: flex;
justify-content: space-between;