Merge branch 'lj'

This commit is contained in:
LuoShijie
2023-11-19 23:14:11 +08:00
15 changed files with 510 additions and 101 deletions

View File

@@ -3,7 +3,7 @@
<view class="yzr" v-if="showStyle === 2">
<u-image src="/static/cjal/anl_tu.png" width="156rpx" height="156rpx"></u-image>
</view>
<view class="list-container">
<view class="list-container" @click="enterDetail()">
<view class="text-area">
<u-text style="font-weight: 500;" :text="shopInfo.tt" :lines="2" ></u-text>
@@ -141,6 +141,18 @@
},
methods: {
enterDetail() {
// console.log("进入详情页面");
const query = this.$u.queryParams({
id: this.shopInfo.id,
type: this.shopInfo.type,
search: 1
})
console.log("query", query);
uni.navigateTo({
url: '/pages/detail/detail' + `${query}`
})
},
handleEdit(searchid) {
// TODO 完成页面跳转
console.log("点击了编辑ID为", searchid);
@@ -221,6 +233,7 @@
flex-direction: column;
justify-content: space-between;
width: 100%;
>text {
font-size: 14px;
}

View File

@@ -1,7 +1,8 @@
<template>
<view>
<ShowShopListItem v-for="item in shopInfoList" :key="shopid" :shopInfo="item" :is-adshow="isADshow"
:adlinkPath="adlinkPath" :show-style="showStyle" :is-edit="isEdit" @delItem="handleDel"></ShowShopListItem>
:adlinkPath="adlinkPath" :show-style="showStyle" :is-edit="isEdit" @delItem="handleDel"
@updateItem="hanldeUpdate"></ShowShopListItem>
</view>
</template>
@@ -71,6 +72,9 @@
},
methods: {
hanldeUpdate(shopid) {
this.$emit('updateItem', shopid)
},
handleDel(shopid) {
console.log("删除了商铺", shopid);
this.$emit('delItem', shopid)

View File

@@ -150,6 +150,7 @@
handleEdit(shopid) {
// TODO 完成页面跳转
console.log("点击了编辑ID为", shopid);
this.$emit('updateItem', shopid)
},
handleDel(shopid) {
// 需完善删除请求

View File

@@ -60,7 +60,7 @@
{
"path": "pages/detail/detail",
"style": {
"navigationBarTitleText": "商详情",
"navigationBarTitleText": "商详情",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#339967",
"enablePullDownRefresh": false

View File

@@ -1,6 +1,6 @@
<template>
<view class="detail" ref="viewref">
<view class="swiper">
<view class="swiper" v-if="search">
<u-swiper :list="shopInfo.pics" height="500rpx" radius="0"></u-swiper>
</view>
<view class="sub-detail u-flex">
@@ -30,7 +30,7 @@
<view class="location-detail">
<text>行业{{shopInfo.trade1}}</text>
<text>区域{{shopInfo.area1}}</text>
<text>地址{{shopInfo.adress}}</text>
<text v-if="search">地址{{shopInfo.adress}}</text>
</view>
<view class="bgc">
@@ -68,7 +68,7 @@
</u-modal>
</view>
</view>
<view class="bug-figure">
<view v-if="search" class="bug-figure">
</view>
</view>
@@ -79,11 +79,17 @@
data() {
return {
shopInfo: {},
showM: false
showM: false,
search: true
}
},
onLoad: function(options) {
console.log('detail', options);
if (options.search == "1") {
this.search = false
} else {
this.search = true
}
//点击轮播图跳转详情, 传递的参数id, type
if (options.id !== undefined && options.type !== undefined) {
this.getDetail(options.type, options.id)

View File

@@ -1,15 +1,10 @@
<template>
<view class="marginLR10">
<view class="head-img">
<u-image
:src="headimg"
width=100%
height=200rpx
radius="10px"
></u-image>
</view>
<!-- <view class="head-img">
<u-image :src="headimg" width=100% height=200rpx radius="10px"></u-image>
</view> -->
<view>
<SearchShopList :show-style="2"></SearchShopList>
<SearchShopList :show-style="2" :searchInfoList="shopInfoList"></SearchShopList>
</view>
</view>
</template>
@@ -19,10 +14,20 @@
data() {
return {
headimg: "https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg",
shopInfoList: [],
}
},
onLoad() {
this.getInfo()
},
methods: {
getInfo() {
this.$api.getSuccList().then(res => {
this.shopListLength = res.data.data.length
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
console.log(this.shopInfoList);
})
}
}
}
</script>
@@ -31,14 +36,15 @@
page {
background-color: #f8f8f8;
}
.marginLR10 {
margin: 0 10px;
}
.head-img {
margin-top: 10rpx;
width: 100%;
height: 200rpx;
border-radius: 10px;
}
</style>
</style>

View File

@@ -10,65 +10,108 @@
</view>
</view>
</view>
<view>
<DropDown></DropDown>
<DropDown @getQueryInfo="getShopList"></DropDown>
</view>
<view class="marginLR10">
<ShowShopList :showStyle="2" :adlinkPath = "adlinkPath" :listType="3"/>
<ShowShopList :showStyle="2" :adlinkPath="adlinkPath" :listType="3" :shopInfoList="shopInfoList" />
</view>
</view>
</template>
<script>
import DropDownItem from "@/components/DropDown/DropDownItem.vue"
export default {
components: {
DropDownItem
},
data() {
return {
adlinkPath: "/pages/publish/publishRent/publishRent"
adlinkPath: "/pages/publish/publishRent/publishRent",
shopInfoList: [],
pageSize: 5,
pageNum: 1,
customQuery: {},
shopListLength: '',
}
},
onReachBottom() {
if (this.shopInfoList.length !== 0) {
this.pageNum++
this.getShopList()
console.log("触底加载");
}
},
onLoad() {
this.getShopList()
},
methods: {
getShopList(q) {
let query = this.getQueryInfo(q)
console.log("listquery", query);
this.$api.getShopList(query).then(res => {
this.shopListLength = res.data.data.length
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
console.log(this.shopInfoList);
})
},
getQueryInfo(query) {
console.log("getQueryInfo", query);
const q = this.$u.queryParams({
type: 3,
pageSize: this.pageSize,
pageNum: this.pageNum,
...query
})
this.customQuery = q
return q
},
}
}
</script>
<style lang="scss">
page{
page {
background-color: #F8F8F8;
}
.marginLR10{
.marginLR10 {
margin: 0 10px;
}
.search-box-bg{
.search-box-bg {
width: 100%;
position: relative;
z-index: 3;
background-color: #F8F8F8;
.bug-fix {
transform: translateY(-20rpx);
width: 100%;
height: 20rpx;
}
.search-box {
position: relative;
z-index: 2;
left: 50%;
width: 84.6%;
transform: translateX(-50%);
.search-box-input {
border-radius: 12rpx;
background-color: #fff;
opacity: 0.85;
.u-border {
border: none;
.u-input__content {
height: 62rpx;
border-radius: 12rpx;
background-color: #fff;
.u-input__content__field-wrapper__field {
font-size: 26rpx !important;
}
@@ -77,5 +120,4 @@
}
}
}
</style>
</style>

View File

@@ -10,65 +10,108 @@
</view>
</view>
</view>
<view>
<DropDown></DropDown>
<DropDown @getQueryInfo="getShopList"></DropDown>
</view>
<view class="marginLR10">
<ShowShopList :showStyle="2" :adlinkPath="adlinkPath" :listType="4"/>
<ShowShopList :showStyle="2" :adlinkPath="adlinkPath" :listType="4" :shopInfoList="shopInfoList" />
</view>
</view>
</template>
<script>
import DropDownItem from "@/components/DropDown/DropDownItem.vue"
export default {
components: {
DropDownItem
},
data() {
return {
adlinkPath: "/pages/publish/publishInvestment/publishInvestment"
adlinkPath: "/pages/publish/publishInvestment/publishInvestment",
shopInfoList: [],
pageSize: 5,
pageNum: 1,
customQuery: {},
shopListLength: '',
}
},
onReachBottom() {
if (this.shopInfoList.length !== 0) {
this.pageNum++
this.getShopList()
console.log("触底加载");
}
},
onLoad() {
this.getShopList()
},
methods: {
getShopList(q) {
let query = this.getQueryInfo(q)
console.log("listquery", query);
this.$api.getShopList(query).then(res => {
this.shopListLength = res.data.data.length
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
console.log(this.shopInfoList);
})
},
getQueryInfo(query) {
console.log("getQueryInfo", query);
const q = this.$u.queryParams({
type: 4,
pageSize: this.pageSize,
pageNum: this.pageNum,
...query
})
this.customQuery = q
return q
},
}
}
</script>
<style lang="scss">
page{
page {
background-color: #F8F8F8;
}
.marginLR10{
.marginLR10 {
margin: 0 10px;
}
.search-box-bg{
.search-box-bg {
width: 100%;
position: relative;
z-index: 3;
background-color: #F8F8F8;
.bug-fix {
transform: translateY(-20rpx);
width: 100%;
height: 20rpx;
}
.search-box {
position: relative;
z-index: 2;
left: 50%;
width: 84.6%;
transform: translateX(-50%);
.search-box-input {
border-radius: 12rpx;
background-color: #fff;
opacity: 0.85;
.u-border {
border: none;
.u-input__content {
height: 62rpx;
border-radius: 12rpx;
background-color: #fff;
.u-input__content__field-wrapper__field {
font-size: 26rpx !important;
}
@@ -77,5 +120,4 @@
}
}
}
</style>
</style>

View File

@@ -10,65 +10,107 @@
</view>
</view>
</view>
<view>
<DropDown></DropDown>
<DropDown @getQueryInfo="getShopList"></DropDown>
</view>
<view class="marginLR10">
<SearchShopList :showStyle="1"/>
<SearchShopList :showStyle="1" :searchInfoList="searchInfoList" />
</view>
</view>
</template>
<script>
import DropDownItem from "@/components/DropDown/DropDownItem.vue"
export default {
components: {
DropDownItem
},
data() {
return {
pageSize: 5,
pageNum: 1,
searchInfoList: [],
customQuery: {},
searchListLength: '',
}
},
onReachBottom() {
if (this.searchListLength !== 0) {
this.pageNum++
this.getShopList()
console.log("触底加载");
}
},
created() {
this.getShopList()
},
methods: {
getShopList(q) {
let query = this.getQueryInfo(q)
console.log("listquery", query);
this.$api.getShopList(query).then(res => {
this.searchListLength = res.data.data.length
this.searchInfoList = [...this.searchInfoList, ...res.data.data]
console.log(this.searchInfoList);
})
},
getQueryInfo(query) {
console.log("getQueryInfo", query);
const q = this.$u.queryParams({
type: 2,
pageSize: this.pageSize,
pageNum: this.pageNum,
...query
})
this.customQuery = q
return q
},
}
}
</script>
<style lang="scss">
page{
page {
background-color: #F8F8F8;
}
.marginLR10{
.marginLR10 {
margin: 0 10px;
}
.search-box-bg{
.search-box-bg {
width: 100%;
position: relative;
z-index: 3;
background-color: #F8F8F8;
.bug-fix {
transform: translateY(-20rpx);
width: 100%;
height: 20rpx;
}
.search-box {
position: relative;
z-index: 2;
left: 50%;
width: 84.6%;
transform: translateX(-50%);
.search-box-input {
border-radius: 12rpx;
background-color: #fff;
opacity: 0.85;
.u-border {
border: none;
.u-input__content {
height: 62rpx;
border-radius: 12rpx;
background-color: #fff;
.u-input__content__field-wrapper__field {
font-size: 26rpx !important;
}
@@ -77,5 +119,4 @@
}
}
}
</style>
</style>

View File

@@ -10,65 +10,108 @@
</view>
</view>
</view>
<view>
<DropDown></DropDown>
<DropDown @getQueryInfo="getShopList"></DropDown>
</view>
<view class="marginLR10">
<ShowShopList :showStyle="1"/>
<ShowShopList :showStyle="1" :shopInfoList="shopInfoList" />
</view>
</view>
</template>
<script>
import DropDownItem from "@/components/DropDown/DropDownItem.vue"
export default {
components: {
DropDownItem
},
data() {
return {
shopInfoList: [],
pageSize: 5,
pageNum: 1,
customQuery: {},
shopListLength: '',
}
},
onReachBottom() {
if (this.shopInfoList.length !== 0) {
this.pageNum++
this.getShopList()
console.log("触底加载");
}
},
onLoad() {
this.getShopList()
},
methods: {
getShopList(q) {
let query = this.getQueryInfo(q)
console.log("listquery", query);
this.$api.getShopList(query).then(res => {
this.shopListLength = res.data.data.length
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
console.log(this.shopInfoList);
})
},
getQueryInfo(query) {
console.log("getQueryInfo", query);
const q = this.$u.queryParams({
type: 1,
pageSize: this.pageSize,
pageNum: this.pageNum,
...query
})
this.customQuery = q
return q
},
}
}
</script>
<style lang="scss">
page{
page {
background-color: #F8F8F8;
}
.marginLR10{
.marginLR10 {
margin: 0 10px;
}
.search-box-bg{
.search-box-bg {
width: 100%;
position: relative;
z-index: 3;
background-color: #F8F8F8;
.bug-fix {
transform: translateY(-20rpx);
width: 100%;
height: 20rpx;
}
.search-box {
position: relative;
z-index: 2;
left: 50%;
width: 84.6%;
transform: translateX(-50%);
.search-box-input {
border-radius: 12rpx;
background-color: #fff;
opacity: 0.85;
.u-border {
border: none;
.u-input__content {
height: 62rpx;
border-radius: 12rpx;
background-color: #fff;
.u-input__content__field-wrapper__field {
font-size: 26rpx !important;
}
@@ -77,5 +120,4 @@
}
}
}
</style>
</style>

View File

@@ -7,7 +7,7 @@
</u-form-item>
<u-form-item label="区域" label-position="top" border-bottom="true" right-icon="arrow-right" prop="region"
label-width="auto">
<text @click="show1 = true" class="checkedtext" v-if="form.region.length>0">{{form.region}}</text>
<text @click="show1 = true" class="checkedtext" v-if="form.region">{{form.region}}</text>
<text @click="show1 = true" class="checktext" v-else>请选择所属区域</text>
<view class="arrow-icon">
@@ -18,7 +18,7 @@
</u-form-item>
<u-form-item label="行业" label-position="top" border-bottom="true" class="picker" label-width="auto"
prop="business">
<text @click="show2 = true" class="checkedtext" v-if="form.business.length>0">{{form.business}}</text>
<text @click="show2 = true" class="checkedtext" v-if="form.business">{{form.business}}</text>
<text @click="show2 = true" class="checktext" v-else>请选择行业</text>
<view class="arrow-icon">
<u-icon name="arrow-right" size="30px" @click="show2 = true"></u-icon>
@@ -28,7 +28,7 @@
</u-form-item>
<u-form-item label="业态" label-position="top" border-bottom="true" label-width="auto" prop="commercialForm">
<text @click="choosecommercialForm" class="checkedtext"
v-if="form.commercialForm.length>0">{{form.commercialForm}}</text>
v-if="form.commercialForm">{{form.commercialForm}}</text>
<text @click="choosecommercialForm" class="checktext" v-else>请选择业态</text>
<view class="arrow-icon">
<u-icon name="arrow-right" size="30px" @click="choosecommercialForm"></u-icon>
@@ -160,6 +160,28 @@
}
},
methods: {
getDetail(type, id) {
console.log('type, id', type, id);
this.$api.getShopDetail(type, id).then(res => {
console.log(',re', res);
const data = res.data.data
if (res.data.code == 1) {
this.form = {
title: data.tt,
region: data.area1,
business: data.trade1,
commercialForm: data.trade2,
area: data.mianji,
transferFee: data.zhuanrangfei,
rent: data.zujin,
contactPerson: data.lianxiren,
phone: data.mobile,
details: data.content,
id: id
}
}
})
},
preview(e) {
console.log('预览', e);
},
@@ -170,11 +192,14 @@
},
submit() {
this.$refs.uForm.validate().then(res => {
console.log("提交表单信息:", this.form)
console.log("提交表单信息:", this.form, this.form.id)
this.$api.publishAddress(this.form).then(res => {
console.log('发布找店地址', res);
if (res.data.code == 1) {
uni.$u.toast('发布成功')
uni.$u.toast(res.data.msg)
uni.reLaunch({
url: '/pages/my/my'
})
} else {
uni.$u.toast(res.data.msg)
}
@@ -229,7 +254,16 @@
this.$refs.uForm.setRules(this.rules)
},
onLoad() {
onLoad(options) {
console.log('修改找店地址', options);
if (options.item) {
console.log('修改');
if (options.id) {
this.getDetail(2, options.id)
}
} else {
console.log('发布');
}
this.getRegionList()
this.$api.getClassList().then(res => {
// console.log(res.data.data.length);

View File

@@ -215,7 +215,7 @@
if (this.fileList1.length > 0) {
this.fileList1.map(item => {
const url = item.url
temp.push(url.replace(this.imgUrl + '/', ''))
temp.push(url.replace(this.$api.imgUrl, ''))
})
}
if (this.form.latitude && this.form.longitude) {
@@ -232,7 +232,10 @@
this.$api.publishInvestment(data).then(res => {
console.log(res);
if (res.data.code == 1) {
uni.$u.toast('发布成功')
uni.$u.toast(res.data.msg)
uni.reLaunch({
url: '/pages/my/my'
})
} else {
uni.$u.toast(res.data.msg)
}
@@ -305,12 +308,58 @@
this.show1 = false
this.form.region = e.value[0]
},
getDetail(type, id) {
console.log('type, id', type, id);
this.$api.getShopDetail(type, id).then(res => {
console.log(',re', res);
const data = res.data.data
if (res.data.code == 1) {
this.form = {
title: data.tt,
region: data.area1,
address: data.adress,
business: data.trade1,
area: data.mianji,
rent: data.zujin,
phone: data.mobile,
contactPerson: data.lianxiren,
details: data.content,
// images: data.pics,
id: id,
longitude: data.lng,
latitude: data.lat,
}
var arr = [];
var arr1 = [];
let obj = {}
arr = data.pics.split(",")
arr.map(item => {
obj = this.$api.imgUrl + item
arr1.push(obj)
})
data.pics = arr1
this.fileList1 = data.pics.map(item => {
return {
url: item
}
})
}
})
},
},
onReady() {
this.$refs.uForm.setRules(this.rules)
},
onLoad() {
onLoad(options) {
if (options.item) {
console.log('修改');
if (options.id) {
this.getDetail(4, options.id)
}
} else {
console.log('发布');
}
this.getRegionList()
this.$api.getClassList().then(res => {
// console.log(res.data.data.length);

View File

@@ -230,7 +230,7 @@
if (this.fileList1.length > 0) {
this.fileList1.map(item => {
const url = item.url
temp.push(url.replace(this.imgUrl + '/', ''))
temp.push(url.replace(this.$api.imgUrl, ''))
})
}
if (this.form.latitude && this.form.longitude) {
@@ -247,7 +247,10 @@
this.$api.publishRent(data).then(res => {
console.log('发布店铺出租', res);
if (res.data.code == 1) {
uni.$u.toast('发布成功')
uni.$u.toast(res.data.msg)
uni.reLaunch({
url: '/pages/my/my'
})
} else {
uni.$u.toast(res.data.msg)
}
@@ -319,12 +322,61 @@
this.show1 = false
this.form.region = e.value[0]
},
getDetail(type, id) {
console.log('type, id', type, id);
this.$api.getShopDetail(type, id).then(res => {
console.log(',re', res);
const data = res.data.data
if (res.data.code == 1) {
this.form = {
title: data.tt,
region: data.area1,
address: data.adress,
business: data.trade1,
commercial: data.trade2,
area: data.mianji,
rent: data.zujin,
transferFee: data.zhuanrangfei,
mobile: data.mobile,
content: data.content,
// images: data.pics,
id: id,
contact: data.lianxiren,
longitude: data.lng,
latitude: data.lat,
}
var arr = [];
var arr1 = [];
let obj = {}
arr = data.pics.split(",")
arr.map(item => {
obj = this.$api.imgUrl + item
arr1.push(obj)
})
data.pics = arr1
this.fileList1 = data.pics.map(item => {
return {
url: item
}
})
}
})
},
},
onReady() {
this.$refs.uForm.setRules(this.rules)
},
onLoad() {
onLoad(options) {
console.log('修改出租', options);
if (options.item) {
console.log('修改');
if (options.id) {
this.getDetail(3, options.id)
}
} else {
console.log('发布');
}
this.$api.getClassList().then(res => {
// console.log(res.data.data.length);
this.Classcolumns = res.data.data.map((item) => {

View File

@@ -15,7 +15,7 @@
</u-form-item>
<u-form-item label="区域" label-position="top" border-bottom="true" right-icon="arrow-right" prop="region"
label-width="auto">
<text @click="show1 = true" class="checkedtext" v-if="form.region.length>0">{{form.region}}</text>
<text @click="show1 = true" class="checkedtext" v-if="form.region">{{form.region}}</text>
<text @click="show1 = true" class="checktext" v-else>请选择所属区域</text>
<view class="arrow-icon">
<u-icon name="arrow-right" size="30px" @click="show1 = true"></u-icon>
@@ -29,7 +29,7 @@
</u-form-item>
<u-form-item label="行业" label-position="top" border-bottom="true" class="picker" label-width="auto"
prop="business">
<text @click="show2 = true" class="checkedtext" v-if="form.business.length>0">{{form.business}}</text>
<text @click="show2 = true" class="checkedtext" v-if="form.business">{{form.business}}</text>
<text @click="show2 = true" class="checktext" v-else>请选择店铺行业</text>
<view class="arrow-icon">
<u-icon name="arrow-right" size="30px" @click="show2 = true"></u-icon>
@@ -38,7 +38,7 @@
:columns="[Classcolumns]" v-model="form.business" @confirm="tradeConfirm"></u-picker>
</u-form-item>
<u-form-item label="业态" label-position="top" border-bottom="true" label-width="auto" prop="commercial">
<text @click="chooseCommercial" class="checkedtext" v-if="form.commercial.length>0">{{form.commercial}}</text>
<text @click="chooseCommercial" class="checkedtext" v-if="form.commercial">{{form.commercial}}</text>
<text @click="chooseCommercial" class="checktext" v-else>请选择店铺业态</text>
<view class="arrow-icon">
<u-icon name="arrow-right" size="30px" @click="chooseCommercial"></u-icon>
@@ -235,7 +235,9 @@
if (this.fileList1.length > 0) {
this.fileList1.map(item => {
const url = item.url
temp.push(url.replace(this.imgUrl + '/', ''))
console.log('url', url, this.$api.imgUrl);
temp.push(url.replace(this.$api.imgUrl, ''))
})
}
console.log('images---', temp.join(','));
@@ -249,12 +251,14 @@
...this.form,
images: temp.join(',')
}
console.log('提交表单信息', data);
// console.log("提交表单信息:" + JSON.stringify(this.form))
console.log('提交表单信息', data, this.form);
this.$api.publishTransfer(data).then(res => {
console.log('发布店铺转让', res);
if (res.data.code == 1) {
uni.$u.toast('发布成功')
uni.$u.toast(res.data.msg)
uni.reLaunch({
url: '/pages/my/my'
})
} else {
uni.$u.toast(res.data.msg)
}
@@ -300,6 +304,7 @@
uni.$u.toast('请先选择区域')
return false
}
var that = this
uni.request({
url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=' + that.form.region + value + '&key=' +
@@ -339,11 +344,60 @@
this.show1 = false
this.form.region = e.value[0]
},
getDetail(type, id) {
console.log('type, id', type, id);
this.$api.getShopDetail(type, id).then(res => {
console.log(',re', res);
const data = res.data.data
if (res.data.code == 1) {
this.form = {
title: data.tt,
region: data.area1,
address: data.adress,
business: data.trade1,
commercial: data.trade2,
area: data.mianji,
rent: data.zujin,
transferFee: data.zhuanrangfei,
mobile: data.mobile,
content: data.content,
// images: data.pics,
id: id,
contact: data.lianxiren,
longitude: data.lng,
latitude: data.lat,
}
var arr = [];
var arr1 = [];
let obj = {}
arr = data.pics.split(",")
arr.map(item => {
obj = this.$api.imgUrl + item
arr1.push(obj)
})
data.pics = arr1
this.fileList1 = data.pics.map(item => {
return {
url: item
}
})
}
})
},
},
onReady() {
this.$refs.uForm.setRules(this.rules)
},
onLoad() {
onLoad(options) {
console.log('修改转让', options);
if (options.item) {
console.log('修改');
if (options.id) {
this.getDetail(1, options.id)
}
} else {
console.log('发布');
}
this.getRegionList()
this.$api.getClassList().then(res => {
// console.log(res.data.data.length);

View File

@@ -8,15 +8,15 @@
</view>
</view>
<view class="content">
<ShowShopList v-if="listId == 0" :isEdit="true" :showStyle="1" :shopInfoList="searchInfoList"
@delItem="handleDel"></ShowShopList>
<ShowShopList v-if="listId == 0" :isEdit="true" :showStyle="1" :shopInfoList="searchInfoList" @delItem="handleDel"
@updateItem="handleUpdate1"></ShowShopList>
<SearchShopList v-if="listId == 1" :searchInfoList="searchInfoList" :is-edit="true" :showStyle="1"
@delItem="handleDel" @updateItem="handleUpdate">
@delItem="handleDel" @updateItem="handleUpdate2">
</SearchShopList>
<ShowShopList v-if="listId == 3" :is-edit="true" :showStyle="2" :shopInfoList="searchInfoList"
@delItem="handleDel"></ShowShopList>
@delItem="handleDel" @updateItem="handleUpdate3"></ShowShopList>
<ShowShopList v-if="listId == 2" :is-edit="true" :showStyle="2" :shopInfoList="searchInfoList"
@delItem="handleDel"></ShowShopList>
@delItem="handleDel" @updateItem="handleUpdate4"></ShowShopList>
<ShowShopList v-if="listId == 4" :showStyle="0" :shopInfoList="matchList"></ShowShopList>
</view>
</view>
@@ -49,12 +49,33 @@
}
},
methods: {
handleUpdate(searchid) {
handleUpdate1(searchid) {
console.log('页面更新');
// uni.navigateTo({
// url: '/pages/publishAddress/publishAddress?item=update_item' + '&index=' +
// tabCurrent
// })
uni.navigateTo({
url: '/pages/publish/publishTransfer/publishTransfer?item=' + 1 + '&id=' +
searchid
})
},
handleUpdate2(searchid) {
console.log('页面更新');
uni.navigateTo({
url: '/pages/publish/publishAddress/publishAddress?item=' + 2 + '&id=' +
searchid
})
},
handleUpdate3(searchid) {
console.log('页面更新');
uni.navigateTo({
url: '/pages/publish/publishInvestment/publishInvestment?item=' + 3 + '&id=' +
searchid
})
},
handleUpdate4(searchid) {
console.log('页面更新');
uni.navigateTo({
url: '/pages/publish/publishRent/publishRent?item=' + 4 + '&id=' +
searchid
})
},
handleDel(shopid) {
console.log('页面删除', this.listId + 1, shopid);
@@ -116,6 +137,8 @@
}
},
onLoad: function(option) {
console.log('option', option.listId);
this.listId = option.listId
wx.setNavigationBarTitle({
title: option.titletext
})