作者 “关晓峰”

fix; bug

... ... @@ -20,7 +20,7 @@
<image src="@/static/image/Rectangle 16.png"
style="height: 300rpx;width: 100vw; position: absolute;top:0;z-index: -1;" mode=""></image>
<view class="boxs" style="padding: 0 24rpx; justify-content: space-evenly">
<view class="item" v-for="item in list.slice(0,3)" @click="goRot(item.route)">
<view class="item" v-for="item in list.slice(0,3)" @click="goRot('/pages/subPages/moreSearch',item.name)">
<image :src="item.icon_url" class="img" mode=""></image>
<p style="font-size: 24rpx; margin-top: 16rpx;">{{item.name}}</p>
</view>
... ... @@ -64,13 +64,13 @@
@click="goRot('/pages/sellAndBuy/hire','2')" mode=""></image>
<view class="flexBox">
<view class="box1 flexBox" style="justify-content: center;margin-right: 5%;padding: 0 5rpx;"
@click="goRot('/pages/sellAndBuy/hub')">
@click="goRot('/pages/sellAndBuy/hub', '3')">
<image src="../../static/image/fabu/Group 188@2x.png"
style="width: 64rpx;height: 64rpx; margin-right: 16rpx;" mode=""></image>
设备求租
</view>
<view class="box1 flexBox" style="justify-content: center;padding: 0 5rpx;"
@click="goRot('/pages/sellAndBuy/hub')">
@click="goRot('/pages/sellAndBuy/hub', '4')">
<image src="../../static/image/fabu/Group 187@2x.png"
style="width: 64rpx;height: 64rpx; margin-right: 16rpx;" mode=""></image>
设备求购
... ...
... ... @@ -9,7 +9,7 @@ height: 188rpx;" mode=""></image>
<view style="display: flex;flex-direction: column;width: 100%;">
<view class=" flexB" style="margin-bottom: 10rpx;">
<p style="color: #0d1013e6;font-size: 32rpx;font-weight: 500;">{{item.title}}</p>
<p class="font">19:30</p>
<p class="font">{{formattedDate(item.createtime)}}</p>
</view>
<view class="flexB">
<p class="one font">{{item.content}}</p>
... ... @@ -28,7 +28,14 @@ height: 188rpx;" mode=""></image>
}
},
methods: {
formattedDate(timestamp){
const date = new Date(timestamp);
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
const formattedDate = `${year}-${month}-${day}`;
return formattedDate
}
},
onLoad() {
uni.$u.http.post('/api/message/msg_list',{
... ...
... ... @@ -98,10 +98,10 @@
</view>
<view class="flexBox" style="justify-content: space-between;margin:24rpx ;">
<view class="flexBox">
<view class="" style="margin-right: 32rpx; color: #00000066;font-size: 40rpx;font-weight: 500;" :class="active == '求租' ? 'activeB' : ''" @click="goSearch(1)">
<view class="" style="margin-right: 32rpx; color: #00000066;font-size: 40rpx;font-weight: 500;" :class="active == '求租' ? 'activeB' : ''" @click="goSearch(2)">
求租
</view>
<view class="" style=" color: #00000066;font-size: 40rpx;font-weight: 500;" :class="active == '求购' ? 'activeB' : ''" @click="goSearch(2)">
<view class="" style=" color: #00000066;font-size: 40rpx;font-weight: 500;" :class="active == '求购' ? 'activeB' : ''" @click="goSearch(1)">
求购
</view>
</view>
... ...
... ... @@ -17,6 +17,18 @@
border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="设备品牌" labelWidth="200rpx" prop="userInfo.brand_name" borderBottom
@click="goLogo" ref="item1">
<u--input v-model="model1.userInfo.brand_name" disabled disabledColor="#ffffff"
placeholder="请选择" border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="设备型号" labelWidth="200rpx" prop="userInfo.xh_name" borderBottom @click="goNum"
ref="item1">
<u--input v-model="model1.userInfo.xh_name" disabled disabledColor="#ffffff" placeholder="请选择"
border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="出厂年限" labelWidth="200rpx" prop="userInfo.year" borderBottom
ref="item1">
<u--input v-model="model1.userInfo.year" border="none"></u--input>
... ... @@ -55,7 +67,9 @@
name: '',
year: '',
hours:'',
address:''
address:'',
brand_name:'',
xh_name:''
},
},
actions: [{
... ... @@ -84,6 +98,16 @@
url: '/pages/subPages/more?val=2'
})
},
goLogo() {
uni.navigateTo({
url: '/pages/sellAndBuy/logo'
})
},
goNum() {
uni.navigateTo({
url: '/pages/sellAndBuy/chooseNum'
})
},
goMap(){
let that = this
uni.chooseLocation({
... ... @@ -145,6 +169,10 @@
console.log('option:', currentPage) //获取页面传递的信息
this.model1.userInfo.category_id = currentPage.$vm.category_id
this.model1.userInfo.name = currentPage.$vm.name
this.model1.userInfo.brand_id = currentPage.$vm.brand_id
this.model1.userInfo.brand_name = currentPage.$vm.brand_name
this.model1.userInfo.xinghao_id = currentPage.$vm.xh_id
this.model1.userInfo.xh_name = currentPage.$vm.xh_name
console.log(this.model1.userInfo);
},
goUpload() {
... ... @@ -158,7 +186,17 @@
},
onReady() {
//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
this.$refs.uForm.setRules(this.rules)
// this.$refs.uForm.setRules(this.rules)
},
onShow() {
let pagearr = getCurrentPages(); //获取应用页面栈
let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息
console.log('option:', currentPage) //获取页面传递的信息
this.model1.userInfo.brand_id = currentPage.$vm.brand_id
this.model1.userInfo.brand_name = currentPage.$vm.brand_name
this.model1.userInfo.xinghao_id = currentPage.$vm.xh_id
this.model1.userInfo.xh_name = currentPage.$vm.xh_name
console.log(this.model1.userInfo);
},
onLoad(option) {
console.log(option);
... ...
... ... @@ -2,8 +2,20 @@
<view style="background-color: #f7f8faff;">
<view style="display: flex;justify-content: center;">
<u-tabs :list="list1" @click="click"></u-tabs>
<view style="display: flex;justify-content: space-evenly; margin: 64rpx 0; ">
<!-- <u-tabs :list="list1" @change="click"></u-tabs> -->
<view class="" style=" opacity: 0.4000000059604645;
color: #000000e6;
font-size: 32rpx;
font-weight: 600;" :class="active == 1 ? 'activeB' : ''" @click="click(1)">
发布求租
</view>
<view class="" style=" opacity: 0.4000000059604645;
color: #000000e6;
font-size: 32rpx;
font-weight: 600;" :class="active == 2 ? 'activeB' : ''" @click="click(2)">
发布求购
</view>
</view>
<view class="box">
<view class="" style="padding: 32rpx;">
... ... @@ -59,7 +71,7 @@
data() {
return {
showTime: false,
nav: '发布求租',
active: 1,
list1: [{
name: '发布求租',
}, {
... ... @@ -107,7 +119,13 @@
},
onLoad(option) {
console.log(option);
let info = JSON.parse(option.info)
if(option && option.val){
if(option.val === "4"){
console.log(option.val);
this.active = 2
}
}
let info = JSON.parse(option && option.info)
this.model1.userInfo = info
this.model1.userInfo.name = info.brand.name
... ... @@ -190,7 +208,7 @@
})
},
click(item) {
this.nav = item.name
this.active = item
this.model1.userInfo = {
brand_name: '',
name: '',
... ... @@ -237,4 +255,12 @@
width: 92%;
margin-left: 4%;
}
.activeB{
color: #000000e6!important;
opacity: 1!important;
font-size: 44rpx!important;
font-weight: 600!important;
padding-bottom: 15rpx;
border-bottom: 1px solid #3375D8;
}
</style>
\ No newline at end of file
... ...
... ... @@ -78,10 +78,11 @@
}
},
onLoad(option) {
console.log(option);
console.log(option.val);
this.flag = option.val
if(option.info){
this.info = JSON.parse(option.info)
this.fileList = JSON.parse(info.images_json)
this.fileList = JSON.parse(this.info.images_json)
console.log(this.fileList);
}
uni.$u.http.get('/api/equip/equip_image').then(res => {
... ... @@ -98,7 +99,6 @@
// })
// this.fileList = this.fileList.flat(Infinity)
// console.log(this.fileList);
this.flag = option.val
},
methods: {
submit() {
... ...
... ... @@ -34,8 +34,8 @@
</view>
</view>
<view class="flexB">
<view class="boxb" v-for="item in historyList" @click="(e) => choose(e,item)">
<view class="flexB" style="flex-wrap: wrap;">
<view class="boxb" style="margin-bottom: 10rpx;" v-for="item in historyList" @click="(e) => choose(e,item)">
{{item}}
</view>
</view>
... ... @@ -362,7 +362,12 @@
})
}
},
onLoad() {
onLoad(option) {
console.log(option);
if(option && option.val !== '' && option.val !== "undefined"){
this.keyword = option && option.val || ''
this.flag = true
}
this.getList()
this.getHot()
this.historyList = JSON.parse(uni.getStorageSync('content') || '[]')
... ...