供销综合云市场

This commit is contained in:
THK3121 2023-09-18 19:06:36 +08:00
parent cbecd61c64
commit 31a5da396b
9 changed files with 407 additions and 63 deletions

View File

@ -215,7 +215,7 @@
},
onShow() {
let that = this
// H5
if (this.$store.state.app.token) {
@ -244,7 +244,7 @@
// #endif
},
mounted() {
},
methods: {

View File

@ -67,14 +67,14 @@
type: Boolean,
default: false
},
location_Arr: {
type: Object,
default: () => ({})
},
town: {
type: String,
default: false
},
// location_Arr: {
// type: Object,
// default: () => ({})
// },
// town: {
// type: String,
// default: false
// },
},
data() {
@ -130,7 +130,7 @@
},
selectLocation() {
this.isSelectPlace ? this.showPicker = true : ''
console.log(this.columnData)
},
confirm(e) {

View File

@ -9,8 +9,8 @@ let httpApiThree
// 网络接口修改此字符 小程序域名要求https
// let httpApi = 'http://192.168.31.110:8324' // 测试
if (process.env.NODE_ENV === "development") {
// httpApi = 'https://shop.lihaink.cn' // 生产
httpApi = "https://crmeb-test.shop.lihaink.cn"
// httpApi = 'https://shop.lihaink.cn' // 生产
httpApi = "https://crmeb-test.shop.lihaink.cn"
// httpApi = "http://192.168.0.222"
// httpApi = "http://192.168.0.108:8325"
// httpApi = 'http://192.168.0.108:8325'

View File

@ -128,26 +128,25 @@
"enablePullDownRefresh": false
}
}, {
"path": "uni_modules/guyue-updater/pages/updater",
"style": {
"app-plus": {
"animationDuration": 200,
"animationType": "fade-in",
"background": "transparent",
"backgroundColorTop": "transparent",
"bounce": "none",
"popGesture": "none",
"scrollIndicator": false,
"titleNView": false
},
"backgroundColor": "transparent",
"disableScroll": true,
"navigationStyle": "custom"
}
}
,{
"path": "uni_modules/guyue-updater/pages/updater",
"style": {
"app-plus": {
"animationDuration": 200,
"animationType": "fade-in",
"background": "transparent",
"backgroundColorTop": "transparent",
"bounce": "none",
"popGesture": "none",
"scrollIndicator": false,
"titleNView": false
},
"backgroundColor": "transparent",
"disableScroll": true,
"navigationStyle": "custom"
}
}
],
],
"subPackages": [{
"root": "pages/goods_cate",
"name": "goods_cate",
@ -1625,7 +1624,7 @@
"iconPath": "static/tabbar_icon/c.png",
"selectedIconPath": "static/tabbar_icon/c-a.png",
"text": "发布"
},
{
"pagePath": "pages/supply_chains/supply_chains",
@ -1641,7 +1640,7 @@
"text": "我的"
}
]

View File

@ -19,23 +19,54 @@
<view class="" v-if="cloudList.length>0">
<view class="">
<!-- <view :style="`height: ${appInfo.top}px;background-color: red;z-index: 99999;`"></view> -->
<!-- <transition name="fade"> -->
<view :class="{'head':true,'show':showtit}" style="padding-top: var(--status-bar-height);"
v-if="showtit">
<view style="display: flex;align-items: center;">
<u--image :showLoading="true" src="/static/images/LHYC/FH.png" width="50.82rpx"
height="50.82rpx" @click='goBack'></u--image>
<view class="head_tit">
{{town}}里海云仓
<view style="padding-top: var(--status-bar-height);" v-if="showtit">
<view :class="{'head':true,'show':showtit}">
<view style="display: flex;align-items: center;">
<u--image :showLoading="true" src="/static/images/LHYC/FH.png" width="50.82rpx"
height="50.82rpx" @click='goBack'></u--image>
<view class="head_tit">
{{town}}里海云仓
</view>
<view style="margin-left: 20rpx;" @click="showSelect=true">
<u--image :showLoading="true" src="/static/images/GXSC/XL.png" width="33.29rpx"
height="33.29rpx"></u--image>
</view>
</view>
<view class="" style="display: flex;align-items: center;">
<view style="display: flex;align-items: center;" @click="showPicker=!showPicker">
<u--image :showLoading="true" src="/static/images/GXSC/DW.png" width="50.82rpx"
height="50.82rpx"></u--image>
<view class="town_name">{{street}}</view>
</view>
<view class="head_r" @click="showPop=true">
<u--image :showLoading="true" src="/static/images/LHYC/QB.png" width="50.82rpx"
height="50.82rpx"></u--image>
<text>全部</text>
</view>
</view>
</view>
<view class="head_r" @click="showPop=true">
<u--image :showLoading="true" src="/static/images/LHYC/QB.png" width="50.82rpx"
height="50.82rpx"></u--image>
<text>全部</text>
<view class="selected-list" v-show="showSelect">
<div class="triangle-up"></div>
<view class="selected-li"
@click="navgo(`/pages/nongKe/supply_chain/supplier?type_id=10&street_id=${street_code}&townName=${street}`)">
供销综合云市场 <text></text>
</view>
<view class="">
供销综合云商品
</view>
<!-- SDFSDF -->
</view>
</view>
<!-- </transition> -->
<!-- <transition name="fade"> -->
<!-- 滚动 -->
@ -175,7 +206,7 @@
<view class="info">
<u--image :showLoading="true" src="/static/images/noCart.png" width="400.09rpx"
height="400.09rpx"></u--image>
<view class="" style="text-align: center;">
<view class="" style="text-align: center;color:#999">
暂无商品
</view>
</view>
@ -251,7 +282,7 @@
<u--image :showLoading="true" src="/static/images/noCart.png" width="400.09rpx"
height="400.09rpx"></u--image>
<view class="" style="text-align: center;">
<view class="" style="text-align: center;color:#999">
当前区域暂无云仓
</view>
</view>
@ -315,7 +346,8 @@
<u-picker :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm" @cancel="showPicker = false"
@change="changeHandler" keyName="name"></u-picker>
@ -350,13 +382,27 @@
import {
goShopDetail
} from '@/libs/order.js'
// 7200 = 8 = 80000 8616
import {
postCartAdd,
} from '@/api/store.js';
import authorize from '@/components/Authorize';
import {
getArea,
getStreet
} from '@/api/article.js';
import {
getIndexData,
getDiy
} from '@/api/api.js'
import {
getGeocoder
} from '@/api/store.js';
import {
mapGetters
} from "vuex";
} from 'vuex'
import Cache from '@/utils/cache';
export default {
components: {
authorize,
@ -368,6 +414,8 @@
},
showPicker: false,
columnData: [],
skusize: 0,
skuNumber: 1,
showcartpop: false,
@ -383,10 +431,12 @@
isEmpty: false,
winHeight: 0,
cloudList: [],
street: '',
street_code: '',
totalMoney: 0,
town: '',
list: [1, 1, 1, 1, 1],
showSelect: false,
showPop: false,
keyword: "",
showLoading: false,
@ -430,6 +480,8 @@
this.street_code = e.street
this.town = e.town
this.getCloundShop()
this.street = e.town
this.Area()
// console.log(this.appInfo, "")
},
onShow() {
@ -522,6 +574,102 @@
// },
methods: {
swiperClick(item) {
const url = item.info[1].value
uni.navigateTo({
url: url
})
},
selectLocation() {
this.isSelectPlace ? this.showPicker = true : ''
console.log(this.columnData)
},
confirm(e) {
this.showPicker = false
this.$emit('selectPlce', e)
this.$emit('change', e)
this.street = e.value[1].name
this.$nextTick(() => {
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
})
this.street_code = e.value[1].code
this.getCloundShop()
},
changeHandler(e) {
const {
columnIndex,
value,
values,
index,
picker = this.$refs.uPicker
} = e;
if (columnIndex === 0) {
getStreet({
area_code: value[0]['code']
}).then(res => {
picker.setColumnValues(1, res.data);
});
}
},
Area() {
getArea({
city_code: 510500
}).then(res => {
this.$refs.uPicker.setColumnValues(0, res.data);
this.Street(res.data[0]['code']);
});
},
Street(code) {
getStreet({
area_code: code
}).then(res => {
this.$refs.uPicker.setColumnValues(1, res.data);
});
},
swiperChange(e) {
let {
current,
source
} = e.detail;
if (source === 'autoplay' || source === 'touch') {
this.bgColor = this.swiper.url[e.detail.current]['img']
this.$emit('kkchange', this.bgColor)
}
},
//
objToArr(data) {
let obj = Object.keys(data).sort();
let m = obj.map(key => data[key]);
return m;
},
async getBanner(id) {
let that = this;
const {
data
} = await getDiy({
id: 0
})
that.styleConfig = that.objToArr(data.value);
/* 循环数组得到数据*/
that.styleConfig.forEach((item, index, arr) => {
if (item.name == 'headerSerch' || item.name == 'homeComb') {
if (item.name == 'homeComb') {
that.swiper.url = item.swiperConfig.list
}
}
})
this.bgColor = this.swiper.url[0].img
},
skusizechange(i) {
this.skusize = i
@ -786,6 +934,34 @@
}
}
.selected-list {
padding: 24rpx 14rpx;
border-radius: 10.51rpx 10.51rpx 10.51rpx 10.51rpx;
background-color: #fff;
position: absolute;
left: 100rpx;
font-size: 29.79rpx;
z-index: 9999;
top: 100rpx;
.triangle-up {
width: 0;
height: 0;
border-left: 10rpx solid transparent;
border-right: 10rpx solid transparent;
border-bottom: 10rpx solid white;
position: absolute;
top: -10rpx;
}
.selected-li {
margin-bottom: 35rpx;
}
}
.sku {
padding: 20rpx;
@ -1019,7 +1195,7 @@
margin-left: 20rpx;
font-size: 40rpx;
// font-weight: 700;
transform: skewX(-10deg);
// transform: skewX(-10deg);
}
@ -1029,7 +1205,7 @@
.head {
position: fixed;
z-index: 100;
z-index: 999;
color: white;
display: flex;
justify-content: space-between;
@ -1068,6 +1244,10 @@
}
.town_name {
margin-right: 20rpx;
}
.goods_list {
min-height: 95vh;
padding: 0 10rpx;

View File

@ -14,29 +14,51 @@
<view class="back" @click='backjJump()' style="margin-right: 17rpx;">
<view class="iconfont icon-xiangzuo" style="color: #333333;"></view>
</view>
<view class="" style="font-size: 40rpx;font-weight: 700;transform: skewX(-10deg);">
<view class="" style="font-size: 40rpx;font-weight: 700;">
供销综合云市场
</view>
<view style="margin-left: 20rpx;" @click="showSelect=true">
<u--image :showLoading="true" src="/static/images/GXSC/XL.png" width="33.29rpx"
height="33.29rpx"></u--image>
</view>
<!-- <view style="margin-left: 20rpx;">
<u--image :showLoading="true" src="/static/images/GXSC/SL.png" width="33.29rpx"
height="33.29rpx"></u--image>
</view> -->
</view>
<view style="position: relative;width: 289.14rpx;">
<!-- <view style="position: relative;width: 289.14rpx;">
<u-search borderColor="#FF6D20" bgColor="white" @change="test" :showAction="false"
placeholder="请输入..." v-model="sotreParam.keyword" class="serch_cls"></u-search>
<u--image @tap="searchSubmit" class="img_cls" :showLoading="true"
src="/static/images/GXSC/SS.png" width="115.65rpx" height="56.82rpx"></u--image>
</view>
<view class='iconfont search-right'
@click="goMap(`/pages/nongKe/supply_chain/maps?street_id=${street_id}`)">
</view> -->
<view class='iconfont search-right' style="display: flex;align-items: center;"
@click="showPicker=!showPicker">
<u--image :showLoading="true" src="/static/images/GXSC/DW.png" width="50.82rpx"
height="50.82rpx"></u--image>
<view class="town_name">{{street}}</view>
</view>
</view>
<view class="selected-list" v-show="showSelect">
<div class="triangle-up"></div>
<view class="selected-li">
供销综合云市场 <text></text>
</view>
<view class=""
@click="navGoto(`/pages/nongKe/cloud_entrepot/index?street=${street_id}&town=${street}`)">
供销综合云商品
</view>
<!-- SDFSDF -->
</view>
</view>
<view class="content">
<view style="background-color: red;height: 10px">
<view style="height: 10px">
</view>
<view class="hot_serch">
@ -274,6 +296,11 @@
<image :src="image"></image>
<image src="@/static/images/guanbi.png" class="guanbi" @click="close"></image>
</u-popup>
<view class="">
<u-picker :defaultIndex=" defaInd" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
</view>
</view>
</view>
@ -303,6 +330,18 @@
configMap
} from '@/utils';
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
import {
getArea,
getStreet
} from '@/api/article.js';
import {
getIndexData,
getDiy
} from '@/api/api.js'
import Cache from '@/utils/cache';
const app = getApp();
export default {
components: {
@ -312,6 +351,8 @@
},
data() {
return {
defaInd: [0, 0],
columnData: [],
imgList: [
"/static/images/GXSC/BBY.png",
"/static/images/GXSC/NYSC.png",
@ -331,6 +372,7 @@
"/static/images/GXSC/JDMS.png",
],
street_id: "",
showSelect: false,
price: 0,
stock: 0,
nows: false,
@ -348,6 +390,8 @@
downKey: 0,
downStatus: false,
menuList: [],
street: "",
showPicker: false,
//
downMenu: [{
title: '默认',
@ -406,6 +450,7 @@
onLoad(options) {
// console.log(options);
this.street_id = options.street_id
this.street = options.townName
this.product_type = options.product_type ?? 0
if (options.street_id != undefined) {
this.sotreParam.street_id = options.street_id
@ -424,7 +469,7 @@
supMenuApi().then(res => {
this.menuList = res.data
})
this.Area()
},
computed: {
downMenus: function() {
@ -445,6 +490,96 @@
}, mapGetters(['viewColor'])),
},
methods: {
selectLocation() {
this.isSelectPlace ? this.showPicker = true : ''
},
confirm(e) {
this.showPicker = false
this.$emit('selectPlce', e)
this.$emit('change', e)
console.log(e)
this.street = e.value[1].name
this.$nextTick(() => {
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
})
this.sotreParam.street_id = e.value[1].code
this.street_id = e.value[1].code
this.storeMerchantList()
},
changeHandler(e) {
const {
columnIndex,
value,
values,
index,
picker = this.$refs.uPicker
} = e;
if (columnIndex === 0) {
getStreet({
area_code: value[0]['code']
}).then(res => {
picker.setColumnValues(1, res.data);
});
}
},
Area() {
getArea({
city_code: 510500
}).then(res => {
this.$refs.uPicker.setColumnValues(0, res.data);
this.Street(res.data[0]['code']);
});
},
Street(code) {
getStreet({
area_code: code
}).then(res => {
this.$refs.uPicker.setColumnValues(1, res.data);
});
},
swiperChange(e) {
let {
current,
source
} = e.detail;
if (source === 'autoplay' || source === 'touch') {
this.bgColor = this.swiper.url[e.detail.current]['img']
this.$emit('kkchange', this.bgColor)
}
},
//
objToArr(data) {
let obj = Object.keys(data).sort();
let m = obj.map(key => data[key]);
return m;
},
async getBanner(id) {
let that = this;
const {
data
} = await getDiy({
id: 0
})
that.styleConfig = that.objToArr(data.value);
/* 循环数组得到数据*/
that.styleConfig.forEach((item, index, arr) => {
if (item.name == 'headerSerch' || item.name == 'homeComb') {
if (item.name == 'homeComb') {
that.swiper.url = item.swiperConfig.list
}
}
})
this.bgColor = this.swiper.url[0].img
},
test() {
if (this.sotreParam.keyword.length > 3) {
this.sotreParam.keyword.slice(0, 3)
@ -462,6 +597,11 @@
url
})
},
navGoto(url) {
uni.redirectTo({
url
})
},
navGo(id) {
uni.navigateTo({
url: `/pages/nongKe/supply_chain/supplierA?type_id=10&merchant_category_id=${id}&street_id=${this.street_id}`
@ -644,7 +784,7 @@
// console.log(rqData)
storeMerchantList(rqData).then(res => {
this.count = res.data.count
this.storeList = this.storeList.concat(res.data.list)
this.storeList = (res.data.list)
this.loading = false
this.loadingIcon = false
})
@ -674,7 +814,7 @@
this.rightBox = true
},
//
confirm(data) {
confirm1(data) {
let arr1 = [],
arr2 = []
if (data.storeTypeArr.length == 0) {
@ -1086,6 +1226,31 @@
margin-left: 10rpx;
}
.selected-list {
padding: 24rpx 14rpx;
border-radius: 10.51rpx 10.51rpx 10.51rpx 10.51rpx;
background-color: #fff;
position: absolute;
left: 100rpx;
font-size: 29.79rpx;
.triangle-up {
width: 0;
height: 0;
border-left: 10rpx solid transparent;
border-right: 10rpx solid transparent;
border-bottom: 10rpx solid white;
position: absolute;
top: -10rpx;
}
.selected-li {
margin-bottom: 35rpx;
}
}
.store-wrapper {
margin-top: 235rpx;
border-top: 1px solid #F6F6F6;

View File

@ -24,7 +24,7 @@
<view class="list">
<navigator hover-class="none"
:url="`/pages/nongKe/supply_chain/supplier?type_id=10&street_id=${street_id}`">
:url="`/pages/nongKe/supply_chain/supplier?type_id=10&street_id=${street_id}&townName=${town}`">
<view class="list-m">
<image src="@/static/images/f6.png" mode="aspectFit"></image>
<view class="list-title">

BIN
static/images/GXSC/SL.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
static/images/GXSC/XL.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB