梁航:更新页面请求和样式

This commit is contained in:
hot777zz
2023-11-15 16:19:22 +08:00
parent 63d39a021e
commit b0a49dc67d
4 changed files with 128 additions and 106 deletions

View File

@@ -17,7 +17,9 @@
"delay" : 0
},
/* */
"modules": {},
"modules" : {
"OAuth" : {}
},
/* */
"distribute" : {
/* android */
@@ -43,7 +45,14 @@
/* ios */
"ios" : {},
/* SDK */
"sdkConfigs": {}
"sdkConfigs" : {
"oauth" : {
"weixin" : {
"appid" : "wxda178d12ae834c45",
"UniversalLinks" : ""
}
}
}
}
},
/* */

View File

@@ -30,12 +30,14 @@
data() {
return {
src: 'https://cdn.uviewui.com/uview/album/2.jpg',
account:'123456',
username:'用户名',
account:'',
username:'未登录',
code:''
}
},
onLoad() {
// this.getInfo()
},
methods: {
topublished(title){
@@ -52,13 +54,8 @@
uni.navigateTo({
url:'/pages/Partnerships/Partnerships'
})
}
//---------页面调用接口示例------------
// getInfo() {
// this.$api.getUserInfo().then(res => {
// console.log('userInfo', res);
// })
// }
},
}
}
</script>

View File

@@ -2,7 +2,7 @@
<view class="form">
<u-form :model="form" ref="uForm">
<view class="upload">
<u-upload max-count="5" upload-icon="photo"></u-upload>
<u-upload max-count="5" upload-icon="photo" :preview-full-image="true" :action="action"></u-upload>
<text class="count">发布房源图片({{ShopInfomation.count}}/5)</text>
</view>
@@ -10,7 +10,8 @@
<u-input v-model="form.title" placeholder="请输入标题以便吸引人的注意哦" placeholder-class="input-class" border="none"></u-input>
</u-form-item>
<u-form-item label="区域" label-position="top" border-bottom="true" right-icon="arrow-right" prop="region">
<text @click="show1 = true" class="checktext">请选择所属区域</text>
<text @click="show1 = true" class="checktext" v-if="form.region.length == 0">请选择所属区域</text>
<text @click="show1 = true" class="checkedtext" v-if="form.region.length > 0">{{form.region}}</text>
<view class="arrow-icon">
<u-icon name="arrow-right" size="30px"></u-icon>
</view>
@@ -20,14 +21,16 @@
<u-input v-model="form.place" placeholder="请输入店铺地址" placeholder-class="input-class" border="none" ></u-input>
</u-form-item>
<u-form-item label="行业" label-position="top" border-bottom="true" class="picker">
<text @click="show2 = true" class="checktext">请选择行业类型</text>
<text @click="show2 = true" class="checktext" v-if="form.trade.length == 0">请选择行业类型</text>
<text @click="show2 = true" class="checkedtext" v-if="form.trade.length > 0">{{form.trade}}</text>
<view class="arrow-icon">
<u-icon name="arrow-right" size="30px"></u-icon>
</view>
<u-picker mode="region" :show="show2" :closeOnClickOverlay="true" @close="show2 = false" v-model="form.trade"></u-picker>
</u-form-item>
<u-form-item label="业态" label-position="top" border-bottom="true">
<text @click="show3 = true" class="checktext">请选择行业业态</text>
<text @click="show3 = true" class="checktext" v-if="form.karma.length == 0">请选择行业业态</text>
<text @click="show3 = true" class="checkedtext" v-if="form.karma.length > 0">{{form.karma}}</text>
<view class="arrow-icon">
<u-icon name="arrow-right" size="30px"></u-icon>
</view>
@@ -62,13 +65,7 @@
export default {
data() {
return {
ShopInfomation:{
city:'',
area:'',
count:0,
},
action:'http://spsp.feashow.cn/api/upload/image/',
form:{
title:'',
region:'',
@@ -121,13 +118,21 @@
console.log("失败信息:" + JSON.stringify(errors))
// uni.$u.toast('校验失败')
})
},
getTradeInfo(){
this.$api.getTradeInfo().then(res=>{
console.log(res);
})
}
},
onReady() {
this.$refs.uForm.setRules(this.rules)
},
onLoad() {
this.getTradeInfo()
}
}
</script>
@@ -170,6 +175,11 @@
font-weight:1px;
color: #c1c4c7;
}
.checkedtext{
margin-top: 5rpx;
font-size: 30rpx;
font-weight:1px;
}
.picker{
display: flex;

View File

@@ -1,4 +1,4 @@
const serverHost = ''//http://xx.xxx.xx
const serverHost = 'http://spsp.feashow.cn/api'//http://xx.xxx.xx
const service = {
get(url, data) {
@@ -174,6 +174,12 @@ const apiService = {
resolve(service.putWithFormData(url, data))
})
},
getTradeInfo(data){
const url = `/home/classlist?pid=0/`
return new Promise((resolve,reject) =>{
resolve(service.post(url, data))
})
}
}
export {
apiService,