工作台新增我的店铺类型,完成名优特产 、特色文旅、当地美食等界面及功能并从供应首页进入

This commit is contained in:
jia 2023-09-04 18:07:00 +08:00
parent 8bad9a7c96
commit 9a3937e987
8 changed files with 1237 additions and 59 deletions

View File

@ -31,7 +31,7 @@
indicator-active-color="#fff">
<block v-for="(item,index) in swiper['url']" :key="index">
<swiper-item class="swi_item" @click="swiperClick(item)">
<u--image :showLoading="true" :src="item.img" width="724rpx" height="259rpx" mode="aspectFill">
<u--image :showLoading="true" :src="item.img" width="724rpx" height="259rpx" mode="aspectFit">
</u--image>
</swiper-item>
</block>
@ -115,9 +115,6 @@
},
mounted() {
uni.$on('add', (res) => {
this.street = res.split(',')[0]
})
this.$bus.$on('value-updated', (newValue) => {
//
this.street = newValue.split(',')[0]
@ -142,17 +139,12 @@
this.$emit('selectPlce', e)
this.$emit('change', e)
this.street = e.value[1].name
// this.$nextTick(() => {
// uni.$emit('add', e.value[1].name + ',' + e.value[1].code)
// this.$bus.$emit('value-updated',
// e.value[1].name + ',' +
// e.value[1].code);
// })
this.$nextTick(() => {
this.$bus.$emit('value-updated',e.value[1].name + ',' +e.value[1].code);
})
uni.$emit('add', e.value[1].name + ',' + e.value[1].code)
this.$bus.$emit('value-updated',
e.value[1].name + ',' +
e.value[1].code);
},
changeHandler(e) {

View File

@ -216,6 +216,16 @@
"navigationStyle": "custom"
}
},
{
"path": "supply_chain/suppliers",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#e93323",
"navigationStyle": "custom"
}
}, {
"path": "supply_chain/maps",
"style": {

View File

@ -559,9 +559,10 @@
limit: this.sotreParam.limit,
order: this.sotreParam.order,
category_id: this.sotreParam.category_id,
type_id: 10
type_id: this.sotreParam.type_id
}
console.log(this.sotreParam.category_id)
if (this.latitude) {
serachData.location = this.latitude + ',' + this.longitude
}
@ -576,7 +577,7 @@
this.storeList = this.storeList.concat(res.data.list)
this.count = res.data.count
this.loading = false
console.log(this.storeList);
})
},
//
@ -682,6 +683,7 @@
},
//
confirm2(data) {
let arr1 = [],
arr2 = []
if (data.storeTypeArr.length == 0) {

View File

@ -16,10 +16,10 @@
</view>
<zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" :town='street' @kkchange='kkchange'></zbpSwiper>
<u-empty :show="jurisdiction" marginTop="260" mode="permission" :text="emptyText"
<u-empty :show="jurisdiction" mode="permission" :text="emptyText"
icon="http://cdn.uviewui.com/uview/empty/permission.png"></u-empty>
<view class="business com special_work">
<view class="title project">
<view class="business com special_work" v-if='jurisdiction==false'>
<view class="title project" >
<view>更多功能</view>
<view class="edit" @click="editFlag = !editFlag">{{editFlag?'完成':'编辑'}}</view>
</view>
@ -57,6 +57,7 @@
<view class="" v-if='jurisdiction==false&&isShow==false'>
<emptyPage title="暂无信息"></emptyPage>
</view>
</view>
@ -168,6 +169,10 @@
this.getUserInfo()
uni.stopPullDownRefresh()
},
beforeDestroy () {
//
this.$bus.$off('value-updated')
},
mounted() {
if (this.street.length <= 0) {
this.appLocation()
@ -333,11 +338,11 @@
},
confirm(e) {
this.street = e.value[1].name
uni.setStorageSync('ADRESS_LOCATION',
e.value[1].name + ',' + e.value[1].name + ',' +
e.value[1].code
)
this.$nextTick(() => {
this.$bus.$emit('value-updated',e.value[1].name + ',' +e.value[1].code);
})
this.showPicker = false
},
appLocation() {
@ -357,7 +362,10 @@
let town = res.data.address_reference.town.title
let street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street
uni.$emit('add', this.street + ',' + street_id)
this.$nextTick(() => {
this.$bus.$emit('value-updated',this.street + ',' +street_id);
})
}).catch(err => {
uni.showToast({

View File

@ -44,22 +44,22 @@
<view :class="[index%2==0?'goods_item':'goods_items']" @click="gogogo(item)">
<view class="kk" v-if="index%2==0">
<image :src="item.image[0]" mode="aspectFill" style="width:'365rpx';height:251rpx">
<image :src="item.image[0]" mode="aspectFit" style="width:'365rpx';height:251rpx">
</image>
</view>
<view style="width:'365rpx';height:336rpx" v-else>
<image :src="item.image[0]" mode="aspectFill" style="width:'365rpx';height:336rpx">
<image :src="item.image[0]" mode="aspectFit" style="width:'365rpx';height:336rpx">
</image>
</view>
<view class="goods_item_img" v-if="item.video_link.length>0">
<image src="@/static/images/sp.png" mode="aspectFill"></image>
<image src="@/static/images/sp.png" mode="aspectFit"></image>
</view>
<view class="botm">
<view class="title">{{item.title}}</view>
<view class="goods_info flex_a_c">
<view class="l_info flex_a_c">
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
mode="aspectFill" class="g_img"></image>
mode="aspectFit" class="g_img"></image>
<view class="g_name">{{item.author && item.author.nickname}}</view>
</view>
<view class="nice_box" @click.stop="giveStart(item)">
@ -85,14 +85,14 @@
</view>
<view class="goods_item_img" v-if="item.video_link.length>0">
<image src="@/static/images/sp.png" mode="aspectFill"></image>
<image src="@/static/images/sp.png" mode="aspectFit"></image>
</view>
<view class="botm">
<view class="title">{{item.title}}</view>
<view class="goods_info flex_a_c">
<view class="l_info flex_a_c">
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
mode="aspectFill" class="g_img"></image>
mode="aspectFit" class="g_img"></image>
<view class="g_name">{{item.author && item.author.nickname}}</view>
</view>
<view class="nice_box" @click.stop="giveStart(item)">
@ -401,11 +401,11 @@
confirm(e) {
this.street = e.value[1].name
uni.setStorageSync('ADRESS_LOCATION',
e.value[1].name + ',' +
e.value[1].code
)
uni.$emit('init', 1);
this.$nextTick(() => {
this.$bus.$emit('value-updated',e.value[1].name + ',' +e.value[1].code);
})
this.showPicker = false
},
changeHandler(e) {
@ -543,10 +543,12 @@
}).then(res => {
let town = res.data.address_reference.town.title
let street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street
uni.$emit('add',town+','+street_id)
this.$nextTick(() => {
this.$bus.$emit('value-updated',this.street + ',' +street_id);
})
}).catch(err => {
uni.showToast({
title: err,

File diff suppressed because it is too large Load Diff

View File

@ -95,7 +95,7 @@
</view>
<view class="list-con">
<view class="list-con-left">
<view class="list-con-left" @click="navaction(0)">
<!-- <view class="list-con-title">
<view class="con-titlea">
名优特产
@ -106,8 +106,8 @@
</view> -->
<image src="@/static/images/f5.png" mode="aspectFit"></image>
</view>
<view class="list-con-right">
<view class="con-right" style="margin-bottom: 20rpx;">
<view class="list-con-right" >
<view class="con-right" style="margin-bottom: 20rpx;" @click="navaction(1)">
<!-- <view class="list-con-title">
<view class="con-titlea">
当地美食
@ -118,7 +118,7 @@
</view> -->
<image src="@/static/images/f7.png" mode="aspectFit"></image>
</view>
<view class="con-right">
<view class="con-right" @click="navaction(2)">
<!-- <view class="list-con-title">
<view class="con-titlea">
特色文旅
@ -258,7 +258,7 @@
},
onLoad() {
this.list()
this.list()
this.Area()
@ -280,7 +280,7 @@ this.list()
onReachBottom() {
if (this.status == 'nomore') return;
this.status = 'loading';
this.where.page = ++this.where.page;
this.list()
},
@ -305,6 +305,7 @@ this.list()
}
},
// #ifdef APP-PLUS
onPageScroll(e) {
@ -325,20 +326,27 @@ this.list()
// #endif
methods: {
navaction(val) {
uni.navigateTo({
url: '/pages/nongKe/supply_chain/suppliers?id=' + val
})
},
//
list(id) {
if(id){
if (id) {
spuInfo(id, this.where1).then(res => {
// console.log(res)
this.cateGoods = res.data.list
})
}else{
getProductHot(1,10).then(res => {
} else {
getProductHot(1, 10).then(res => {
// console.log(res)
this.cateGoods = res.data.list
})
}
},
scrolling() {
//
@ -401,11 +409,11 @@ this.list()
this.street = e.value[1].name
this.street_id = e.value[1].code
this.town = e.value[1].name
uni.setStorageSync('ADRESS_LOCATION',
e.value[1].name + ',' + e.value[1].name + ',' +
e.value[1].code
)
this.$nextTick(() => {
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
})
this.showPicker = false
},
changeHandler(e) {
@ -510,9 +518,11 @@ this.list()
this.town = res.data.address_reference.town.title
this.street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street
uni.$emit('add', this.street + ',' + this.street_id)
// uni.setStorageSync('ADRESS_LOCATION',
// this.town + ',' + this.street_id)
this.$nextTick(() => {
this.$bus.$emit('value-updated', this.street + ',' + this
.street_id);
})
this.list(this.street_id)
}).catch(err => {
uni.showToast({

View File

@ -49,17 +49,27 @@
<view class='name'>{{items.cart_info.productAttr.price}}</view>
<view class='name'>x {{items.product_num}}</view>
</view>
<!-- <view class="totalfooter">
<!-- <view class="totalfooter">
<view class='bnt b-color' v-if="items.is_imported == 0 && item.orderProduct.length > 1"
@click="importshop(items.order_id,items.product_id,items.product_sku)">
立即导入</view>
</view> -->
</view>
<view class="totalfooter">
<view class="totalfooter" v-if="items.is_imported == 1 ">
<view class='bnt b-color'>
已导入</view>
</view>
<view class="totalfooter" v-else>
<view class='bnt b-color'
@click="importshop(item.order_id,item.orderProduct[indexs].product_id,item.orderProduct[indexs].product_sku)">
立即导入</view>
</view>
<!-- <view class="totalfooter">
<view class='bnt b-color'
@click="importshop(item.order_id,item.orderProduct[indexs].product_id,item.orderProduct[indexs].product_sku)">
立即导入</view>
</view>
</view> -->
</view>
</block>
</view>