作者 “关晓峰”

FIX

... ... @@ -37,7 +37,7 @@
<view class=" flexBox" :style="isBtn ? 'align-items: baseline;' : '' " >
<view class="tips" v-if="isBtn" style="width: 70%;">
{{info.province}} {{info.province !=='' ? '-' : ''}} {{info.city}} {{(info.city !=='' && !isBtn) ? '-' : ''}} <text v-if="!isBtn">距您{{info.distance || '0'}}km</text>
{{info.province}} {{info.province !=='' ? '-' : ''}} {{info.city}} {{(info.city !=='' && !isBtn) ? '-' : ''}} <text v-if="!isBtn">距您{{info.distance || '0'}}m</text>
</view>
<view class="font" style="justify-content: flex-end; " :style="!isBtn ? 'width: 100%' : ''">
<text>{{info.price}}</text>
... ... @@ -86,7 +86,7 @@
</view>
<view class="flexBox" v-if="!isBtn" style="padding-bottom: 16rpx;">
<view class="tips">
{{info.province}} - {{info.city}} -距您{{info.distance || '0'}}km
{{info.province}} - {{info.city}} -距您{{info.distance || '0'}}m
</view>
<view class="tips">
{{info.createtime_text}}
... ... @@ -108,7 +108,7 @@
<u-button type="primary" size="small" text="重新发布" ></u-button>
</view>
</view>
</view>
</view>
</view>
... ... @@ -147,7 +147,7 @@
},
goPublish(url){
uni.navigateTo({
url:`/pages/sellAndBuy/hire?val=${this.info.type==3 ? 1 : 2}`
url:`/pages/sellAndBuy/hire?val=${this.info.type==3 ? 1 : 2}&info=${JSON.stringify(this.info)}`
})
},
goPrice(){
... ...
<template>
<view>
<view class="listBox" :style="info.tag_list.length == 0 ? 'max-height: 234rpx; min-height: 0;' : ''" @click="goDetail">
<view class="listBox_top" style="justify-content: space-between;">
<view class="listBox" :style="info.tag_list.length == 0 ? 'max-height: 234rpx; min-height: 0;' : ''" >
<view class="listBox_top" style="justify-content: space-between;" @click="goDetail">
<view class="listBox_top" style="width: 50vw;">
<view class="box1" style="margin-right: 24rpx;">
<image src="../../static/need.png" style="width: 68rpx; height: 40rpx;" v-if="info.type == 2" mode=""></image>
... ... @@ -11,21 +11,25 @@
{{info.category.name + info.brand.name + info.xinghao.name}}
</view>
</view>
<view class="font oneh" style="width: 30vw;" v-if="info.price && info.price !== ''">
<view v-if="isBtn">
<p style="font-size: 28rpx; color: #3375D8;" v-if="info.status == 2">已发布</p>
<p style="font-size: 28rpx; color: #3375D8;" v-if="info.status == 1">审核中</p>
<p style="font-size: 28rpx; color: #E63D27;" v-if="info.status == 3">已拒绝</p>
<p style="font-size: 28rpx; color: #000000;" v-if="info.status == 4">已关闭</p>
</view>
<view class="font oneh" style="width: 30vw;" v-else-if="info.price && info.price !== ''">
<!-- <text>{{info.price}}</text> -->
<text>**</text>
<text style="font-size: 26rpx;">{{info.category.price_unit}}/{{info.category.day_unit}}</text>
</view>
</view>
<view class="listBox_top" style="justify-content: space-between; margin-top: 28rpx; margin-bottom: 46rpx;" v-if="info.tag_list.length > 0" >
<view class="listBox_top" style="justify-content: space-between; margin-top: 28rpx; margin-bottom: 46rpx;" v-if="info.tag_list.length > 0" @click="goDetail">
<view class="listBox_top" >
<view style="margin: 0 5rpx" v-for="item in info.tag_list">
<u-tag :text="item.name" plain size="mini" type="info"></u-tag>
</view>
</view>
</view>
<view class="tips" v-if="isBtn" style="margin-top: 28rpx;">
{{info.province}} - {{info.city}} - {{info.region}}-距您{{info.distance || '0'}}km
... ... @@ -44,15 +48,15 @@
</view>
<view class="flexBox" style="justify-content: flex-end !important; padding-bottom: 16rpx;" v-else>
<view style="display: flex;">
<view class="" v-if="info.status == 1 || info.status == 2">
<view class="" v-if="info.status == 1 || info.status == 2 || info.status == 3">
<u-button type="info" size="small" text="关闭信息" @click="close"></u-button>
</view>
<view class="" style="margin-right: 16rpx;" v-if="info.status == 3 || info.status == 1">
<view class="" style="margin-right: 16rpx;" v-if="info.status == 2 ">
<u-button type="primary" size="small" style="margin: 0 16rpx;" text="修改信息" @click="goPublish1"></u-button>
</view>
<view class="" v-else-if="info.status == 4">
<u-button type="primary" size="small" text="重新发布" @click="goNeeds(info.type)"></u-button>
</view>w
</view>
</view>
</view>
... ... @@ -109,7 +113,7 @@
},
goNeeds(type) {
uni.navigateTo({
url: `/pages/sellAndBuy/hub?val=${type}`
url: `/pages/sellAndBuy/hub?val=${type}&info=${JSON.stringify(this.info)}`
})
}
}
... ...
... ... @@ -31,7 +31,7 @@
<view class="boxs" style="padding: 0 24rpx; justify-content: space-evenly">
<view class="item" v-for="item in list.slice(0,3)"
@click="goRot('/pages/subPages/moreSearch',item.name)">
@click="goSearch(item)">
<view class="imgbtn">
<image :src="item.icon_url" class="img" mode=""></image>
</view>
... ... @@ -125,6 +125,12 @@
}
},
methods: {
goSearch(item){
uni.navigateTo({
url: `/pages/subPages/moreSearch?val=${item.name}&valId=${item.id}`
})
this.show = false
},
// 标题文字居中
getWxTitleTop() {
let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
... ...
... ... @@ -7,7 +7,7 @@
style="width: 80rpx; height: 80rpx;margin-right:16rpx" mode=""></image>
<image src="/static/icon/1815.png" v-else-if="item.type == 2"
style="width: 80rpx; height: 80rpx;margin-right:16rpx" mode=""></image>
<image src="/static/image/1813.png" v-else style="width: 80rpx; height: 80rpx;margin-right:16rpx"
<image src="/static/icon/Group 1813@2x.png" v-else style="width: 80rpx; height: 80rpx;margin-right:16rpx"
mode=""></image>
</view>
<view style="display: flex;flex-direction: column;width: 100%;">
... ...
... ... @@ -62,7 +62,7 @@
<view style="margin-bottom: 30rpx;">
<text>确定退出登录吗?</text>
</view>
<view class="" style="display: flex; align-items: center;justify-content: space-evenly;">
<view class="" style="display: flex; align-items: center;justify-content: space-evenly; margin-bottom: 40rpx;">
<view class="" style="margin-right: 20rpx;">
<u-button size="small" text="取消" type="info" @click="close()"></u-button>
</view>
... ...
... ... @@ -2,17 +2,19 @@
<view style="background-color: white; height: 100%;">
<view v-if="!result" class="">
<view class="top">
<image src="http://equiphappy.shs.broing.cn/assets/miniprogram/bg3.png" style="height: 432rpx;width: 100%;" mode=""></image>
<image src="http://equiphappy.shs.broing.cn/assets/miniprogram/bg3.png"
style="height: 432rpx;width: 100%;" mode=""></image>
</view>
<view class="" style="padding: 32rpx;background-color: white;">
<u--form labelPosition="left" :model="model1" :rules="rules" ref="uForm">
<u-form-item label="设备信息" labelWidth="200rpx" prop="userInfo.name" borderBottom ref="item1" @click="goChoose">
<u-form-item label="设备信息" labelWidth="200rpx" prop="userInfo.name" borderBottom ref="item1"
@click="goChoose">
<u--input v-model="model1.userInfo.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.address" borderBottom
@click="goMap" ref="item1">
<u-form-item label="设备停放地" labelWidth="200rpx" prop="userInfo.address" borderBottom @click="goMap"
ref="item1">
<u--input v-model="model1.userInfo.address" disabled disabledColor="#ffffff" placeholder="请选择"
border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
... ... @@ -29,8 +31,7 @@
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-form-item label="出厂年限" labelWidth="200rpx" prop="userInfo.year" borderBottom ref="item1">
<u--input v-model="model1.userInfo.year" border="none"></u--input>
</u-form-item>
<u-form-item label="表显小时数" labelWidth="200rpx" prop="userInfo.hours" borderBottom ref="item1">
... ... @@ -39,16 +40,19 @@
</u--form>
<view class="" style="width: 60%;margin-top: 50rpx;display: flex;justify-content: center;margin-left: 20%;">
<view class=""
style="width: 60%;margin-top: 50rpx;display: flex;justify-content: center;margin-left: 20%;">
<u-button shape="circle" text="开始估价" color="linear-gradient(to right, #46BAEC,#2F67D3)"
@click="submit"></u-button>
</view>
</view>
</view>
<view v-else class="rBox">
<image src="../../static/right.png" style="width: 128rpx;margin: 182rpx 0 48rpx 0;height: 128rpx;" mode=""></image>
<image src="../../static/right.png" style="width: 128rpx;margin: 182rpx 0 48rpx 0;height: 128rpx;" mode="">
</image>
<p class="title">提交成功</p>
<p style="margin: 24rpx 0 162rpx 0; color: #00000066;font-size: 28rpx;font-weight: 400;"> 平台将3个工作日内联系您,为您进行价格评估</p>
<p style="margin: 24rpx 0 162rpx 0; color: #00000066;font-size: 28rpx;font-weight: 400;">
平台将3个工作日内联系您,为您进行价格评估</p>
<view class="" style="width: 40%;">
<u-button text="返回首页" @click="goIndex"></u-button>
</view>
... ... @@ -66,10 +70,10 @@
userInfo: {
name: '',
year: '',
hours:'',
address:'',
brand_name:'',
xh_name:''
hours: '',
address: '',
brand_name: '',
xh_name: ''
},
},
actions: [{
... ... @@ -93,11 +97,11 @@
}
},
methods: {
goChoose(){
goChoose() {
uni.navigateTo({
url: '/pages/subPages/more?val=2'
})
},
},
goLogo() {
uni.navigateTo({
url: '/pages/sellAndBuy/logo'
... ... @@ -108,10 +112,10 @@
url: '/pages/sellAndBuy/chooseNum'
})
},
goMap(){
goMap() {
let that = this
uni.chooseLocation({
success: function (res) {
success: function(res) {
console.log('位置名称:' + res.name);
console.log('详细地址:' + res.address);
console.log('纬度:' + res.latitude);
... ... @@ -122,8 +126,8 @@
that.model1.userInfo.lng = res.longitude
}
});
},
submit() {
let p = {
... ... @@ -139,10 +143,10 @@
res => {
uni.showToast({
title: res.msg,
icon:'none'
icon: 'none'
})
if(res.code == 1){
if (res.code == 1) {
let pagearr = getCurrentPages(); //获取应用页面栈
let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息
console.log('option:', currentPage) //获取页面传递的信息
... ... @@ -154,9 +158,9 @@
url: '/pages/index/buy'
})
}, 1000)
}
}).catch(err => {
uni.showToast({
title: err.msg
... ... @@ -171,63 +175,62 @@
this.model1.userInfo.sex = e.name
this.$refs.uForm.validateField('userInfo.sex')
},
onShow() {
let pagearr = getCurrentPages(); //获取应用页面栈
let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息
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() {
this.result = true
},
goIndex(){
goIndex() {
uni.reLaunch({
url:'/pages/index/buy'
url: '/pages/index/buy'
})
}
},
onReady() {
//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
// 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
this.model1.userInfo.category_id = currentPage.$vm.category_id || currentPage.$vm.model1.userInfo.category.id
this.model1.userInfo.name = currentPage.$vm.name || currentPage.$vm.model1.userInfo.category.name
this.model1.userInfo.brand_id = currentPage.$vm.brand_id || currentPage.$vm.model1.userInfo.brand.id
this.model1.userInfo.brand_name = currentPage.$vm.brand_name || currentPage.$vm.model1.userInfo.brand.id
this.model1.userInfo.xinghao_id = currentPage.$vm.xh_id || currentPage.$vm.model1.userInfo.xinghao.id
this.model1.userInfo.xh_name = currentPage.$vm.xh_name || currentPage.$vm.model1.userInfo.xinghao.name
this.model1.userInfo.year = currentPage.$vm.model1.userInfo.year
this.model1.userInfo.hours = currentPage.$vm.model1.userInfo.hours
console.log(this.model1.userInfo);
},
onLoad(option) {
let token = uni.getStorageSync('token')
if (token) {
console.log(option);
let info = JSON.parse(option.info)
this.model1.userInfo = info
this.model1.userInfo.name = info.brand.name
console.log(this.model1.userInfo);
} else {
uni.showToast({
title: '请登陆后重试',
icon: 'none'
onReady() {
//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
// this.$refs.uForm.setRules(this.rules)
},
onLoad(option) {
let token = uni.getStorageSync('token')
if (token) {
console.log(option);
let info = JSON.parse(option.info)
this.model1.userInfo = info
this.model1.userInfo.name = info.category.name
this.model1.userInfo.brand_id = info.brand.id
this.model1.userInfo.brand_name = info.brand.name
this.model1.userInfo.xinghao_id = info.xinghao.id
this.model1.userInfo.xh_name = info.xinghao.name
console.log(this.model1.userInfo);
} else {
uni.showToast({
title: '请登陆后重试',
icon: 'none'
})
setTimeout(() => {
uni.redirectTo({
url: '/pages/index/login'
})
setTimeout(() => {
uni.redirectTo({
url: '/pages/index/login'
})
}, 2000)
}
},
}, 2000)
}
},
}
</script>
... ...
... ... @@ -74,7 +74,13 @@
}
},
onLoad(option) {
uni.$u.http.get(`/api/index/xinghao_list?category_id=${option.category_id}&brand_id=${option.brand_id}`).then(
let brand_id = ''
let category_id = ''
if(option && option.category_id !== 'undefined' && option.brand_id !== 'undefined'){
brand_id = option.brand_id
category_id = option.category_id
}
uni.$u.http.get(`/api/index/xinghao_list?category_id=${category_id}&brand_id=${brand_id}`).then(
res => {
// this.indexList = res.data.word
this.itemArr = res.data.data
... ...
... ... @@ -60,10 +60,10 @@
<image src="../../static/Group 193@2x.png" style="width: 40rpx;height: 24rpx;" mode=""></image>
</view>
</u-form-item>
<u-form-item label="设备预算" labelWidth="200rpx" prop="userInfo.price" borderBottom
<u-form-item label="设备预算" labelWidth="200rpx" prop="userInfo.price" borderBottom
ref="item1">
<view class="flexb" style="width: 100%;">
<u--input v-model="model1.userInfo.price" border="none" ></u--input>
<u--input v-model="model1.userInfo.price" border="none" placeholder="0" ></u--input>
<text>{{model1.userInfo.price_unit || '万元'}}</text>
</view>
</u-form-item>
... ... @@ -96,7 +96,7 @@
name: '',
xh_name: '',
region: '',
price: 0,
price: '',
day: '',
lat: '',
lng: ''
... ... @@ -166,12 +166,15 @@
let pagearr = getCurrentPages(); //获取应用页面栈
let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息
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
this.model1.userInfo.category_id = currentPage.$vm.category_id || currentPage.$vm.model1.userInfo.category.id
this.model1.userInfo.name = currentPage.$vm.name || currentPage.$vm.model1.userInfo.category.name
this.model1.userInfo.brand_id = currentPage.$vm.brand_id || currentPage.$vm.model1.userInfo.brand.id
this.model1.userInfo.brand_name = currentPage.$vm.brand_name || currentPage.$vm.model1.userInfo.brand.id
this.model1.userInfo.xinghao_id = currentPage.$vm.xh_id || currentPage.$vm.model1.userInfo.xinghao.id
this.model1.userInfo.xh_name = currentPage.$vm.xh_name || currentPage.$vm.model1.userInfo.xinghao.name
console.log(this.model1.userInfo);
},
methods: {
... ... @@ -192,7 +195,7 @@
},
submit() {
if(this.model1.userInfo.price == 0){
if(this.model1.userInfo.price && this.model1.userInfo.price==0){
uni.showToast({
title:'设备预算需大于0',
icon:'none'
... ... @@ -273,12 +276,12 @@
},
goLogo() {
uni.navigateTo({
url: '/pages/sellAndBuy/logo'
url: '/pages/sellAndBuy/logo?category_id=' + this.model1.userInfo.category_id
})
},
goNum() {
uni.navigateTo({
url: '/pages/sellAndBuy/chooseNum'
url: `/pages/sellAndBuy/chooseNum?category_id=${this.model1.userInfo.category_id}&brand_id=${this.model1.userInfo.brand_id}`
})
}
}
... ...
... ... @@ -79,7 +79,11 @@
},
onLoad(option) {
console.log(option);
uni.$u.http.get(`/api/index/brand_list?category_id=${option.category_id}`).then(res => {
let category_id = ''
if(option && option.category_id !== 'undefined'){
category_id = option.category_id
}
uni.$u.http.get(`/api/index/brand_list?category_id=${category_id}`).then(res => {
console.log(res);
this.indexList = res.data.word;
this.itemArr = res.data.list
... ...
... ... @@ -3,8 +3,8 @@
<view class="box" v-for="(item,index) in fileList">
<u-upload :fileList="item.url" @afterRead="(event) => afterRead(event,item,index)" @delete="(event) => deletePic(event,index)"
width="200rpx" height="200rpx" name="1" multiple :maxCount="1">
<image :src="imggList[index].url"
mode="widthFix" style="width: 220rpx;height:220rpx;"></image>
<!-- <image :src="imggList[index].url"
mode="widthFix" style="width: 220rpx;height:220rpx;"></image> -->
</u-upload>
<!-- <u-upload ref="uUpload" :action="action" :auto-upload="true" ></u-upload> -->
... ... @@ -27,7 +27,6 @@
data() {
return {
action: config.baseUrl + '/api/common/upload',
fileList1: [],
imggList:[],
info: {},
flag: null,
... ... @@ -113,14 +112,16 @@
url: item.pic
}
})
this.fileList = res.data[0].image_arr.map(item => {
return{
title: item.value,
url:[
]
}
})
if(this.fileList.length == 0){
this.fileList = res.data[0].image_arr.map(item => {
return{
title: item.value,
url:[
]
}
})
}
}).catch(err => {
uni.showToast({
... ... @@ -128,7 +129,7 @@
})
})
// this.fileList = JSON.parse(this.info.images_json)
// console.log(this.fileList);
// console.log(this.fileList);
// let arr
// this.fileList.forEach((item,index) => {
// this.fileList[index] = Object.keys(item).map(val => ({
... ...
... ... @@ -3,25 +3,33 @@
<image src="../../static/img-brand@2x.png" style="width: 100%; height: 438rpx;" mode=""></image>
<view class="box">
<view class="" style="padding: 32rpx; background: white;position: relative;">
<u--form labelPosition="left" :model="info" :rules="rules" ref="uForm">
<u-form-item label="公司名称" labelWidth="200rpx" prop="userInfo.name" borderBottom ref="item1">
<u--form labelPosition="left" :model="info" ref="uForm">
<u-form-item label="公司名称" labelWidth="200rpx" borderBottom ref="item1">
<u--input v-model="info.name" placeholder="请输入公司名称" border="none"></u--input>
</u-form-item>
<u-form-item label="公司类型" labelWidth="200rpx" prop="userInfo.contract_name" borderBottom
<u-form-item label="公司类型" labelWidth="200rpx" borderBottom
ref="item1">
<u--input v-model="info.contract_name" placeholder="请选择公司类型" border="none"></u--input>
<picker @change="bindPickerChange" :value="index" :range="array">
<view class="" style="display: flex; align-items: center; justify-content: space-between; " :style="flag ? '' : 'color: #0d101366;'">
<view class="uni-input">{{info.cateName}}</view>
<u-icon slot="right" name="arrow-right"></u-icon>
</view>
</picker>
</u-form-item>
<u-form-item label="主营产品" labelWidth="200rpx" prop="userInfo.product_ids" borderBottom ref="item1">
<u--input v-model="info.product_ids" placeholder="请选择主营产品" border="none"></u--input>
<u-form-item label="主营产品" labelWidth="200rpx" borderBottom ref="item1" @click="goChoose">
<u--input v-model="info.name1" disabled placeholder="请选择主营产品" disabledColor="#ffffffeb"
border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="营业执照" labelWidth="200rpx" prop="userInfo.product_ids" borderBottom ref="item1">
<u-form-item label="营业执照" labelWidth="200rpx" borderBottom ref="item1">
<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple
:maxCount="1" width="250" height="150">
<image src="/static/img-zhizhao@2x.png" mode="widthFix" style="width: 250px;height: 150px;">
</image>
</u-upload>
</u-form-item>
<u-form-item label="公司资质" labelWidth="200rpx" prop="userInfo.product_ids" borderBottom ref="item1">
<u-form-item label="公司资质" labelWidth="200rpx" borderBottom ref="item1">
<u-upload :fileList="fileList2" @afterRead="afterRead" @delete="deletePic" name="2" multiple
:maxCount="1" width="250" height="150">
<image src="/static/img-zhizhao@2x(1).png" mode="widthFix"
... ... @@ -42,22 +50,65 @@
export default {
data() {
return {
info:{},
info:{
name1:'',
cateName:'请选择公司类型'
},
flag:false,
action: config.baseUrl + '/api/common/upload',
fileList1: [],
fileList2: [],
array:[],
array1:[]
}
},
onShow() {
let pagearr = getCurrentPages(); //获取应用页面栈
let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息
console.log('option:', currentPage) //获取页面传递的信息
this.model1.userInfo.category_id = currentPage.$vm.category_id || (this.model1.userInfo.category && this.model1.userInfo.category.id) || ''
this.model1.userInfo.name = currentPage.$vm.name || (this.model1.userInfo.category && this.model1.userInfo.category.name) || ''
this.info.product_ids = currentPage.$vm.category_id || ''
this.info.name1 = currentPage.$vm.name || ''
},
onLoad() {
uni.$u.http.get('/api/common/company_category').then(res => {
console.log(res);
this.array1 = res.data
this.array = res.data.map(item => {
return item.name
})
})
},
methods: {
goChoose() {
uni.navigateTo({
url: '/pages/subPages/more?val=2'
})
},
bindPickerChange(e){
console.log(e);
this.flag = true;
this.info.cateName = this.array1[e.detail.value].name
this.info.type_id = this.array1[e.detail.value].id
},
submit(){
console.log(this.info);
console.log(this.fileList1);
let p = {
...this.info,
business_license: this.fileList1[0] && this.fileList1[0].url || '',
company_qualifications: this.fileList2[0] && this.fileList2[0].url || '',
}
delete p.name1
delete p.cateName
uni.$u.http.post('/api/common/join',p).then(res => {
console.log(res);
uni.showToast({
title: res.msg,
icon:'none'
})
}).catch(err => {
})
},
goChoose(){
uni.navigateTo({
... ... @@ -100,6 +151,9 @@
formData: {
user: 'test'
},
header: {
token: uni.getStorageSync('token')
},
success: (res) => {
setTimeout(() => {
resolve(JSON.parse(res.data).data.fullurl)
... ...
... ... @@ -130,7 +130,7 @@
</view>
</view>
<p style="color: #000000e6;font-size: 32rpx;font-weight: 500;margin-bottom: 24rpx;">相似设备</p>
<view class="" v-if="resList && resList.length>0">
<view class="" v-if="resList && resList.length>0" style="padding-bottom: 100px;">
<view class="" v-for="item in resList ">
<item :info="item" :isBtn="false" v-if="item.type == 3 || item.type == 4"></item>
<item-sell v-else :info="item"></item-sell>
... ...
... ... @@ -28,12 +28,12 @@
获取验证码
</view>
<view class="scode" @click="code" v-else>
{{newcode}}
{{newcode}}s
</view>
</view>
</view>
<view class="barbtn">
保存
<view class="" style="margin-top: 60rpx;">
<u-button style="width: 80%;" text="保存" type="primary" @click="submit"></u-button>
</view>
<!-- <view style="background-color: white;padding: 24rpx;">
<u--form labelPosition="left" :model="model1" :rules="rules" ref="uForm">
... ... @@ -119,6 +119,11 @@
})
}, 1500)
}
}).catch(err => {
uni.showToast({
title:err.msg,
icon: 'none'
})
})
},
code() {
... ... @@ -137,6 +142,10 @@
event: 'changemobile'
}).then(res => {
console.log(res);
uni.showToast({
title: res.msg,
icon: 'none'
})
if (res.code == 1) {
this.iscode = false
this.interval = setInterval(() => {
... ... @@ -149,6 +158,11 @@
}
uni.hideLoading()
}).catch(err => {
uni.showToast({
title:err.msg,
icon: 'none'
})
})
},
codeChange(text) {
... ... @@ -166,7 +180,10 @@
}
</script>
<style lang="scss">
<style lang="scss" scoped>
/deep/ .u-button{
width: 90%!important;
}
.page {
background-color: #F5F7FA;
}
... ...
... ... @@ -235,6 +235,7 @@
lat: '',
lng: '',
region: '',
keywordId:'',
lat: '',
lng: '',
brand_name: '',
... ... @@ -265,7 +266,7 @@
},
goPP() {
uni.navigateTo({
url: "/pages/sellAndBuy/logo"
url: '/pages/sellAndBuy/logo?category_id=' + this.keywordId
})
},
goQy() {
... ... @@ -285,7 +286,7 @@
},
goXh() {
uni.navigateTo({
url: "/pages/sellAndBuy/chooseNum"
url: `/pages/sellAndBuy/chooseNum?category_id=${this.keywordId || ''}&brand_id=${this.brand_id || ''}`
})
},
del() {
... ... @@ -328,7 +329,9 @@
},
choose(e,item){
console.log(item);
this.keyword = (item.name || item)
this.keywordId = (item.id || item)
this.flag = true
this.getList()
},
... ... @@ -361,8 +364,9 @@
},
onLoad(option) {
console.log(option);
if(option && option.val !== '' && option.val !== "undefined"){
if(option && option.val !== '' && option.val !== "undefined" && option.valId !== '' && option.valId !== "undefined"){
this.keyword = option && option.val || ''
this.keywordId = option && option.valId || ''
this.flag = true
}
this.getList()
... ...