diff --git a/App.vue b/App.vue index 951f3f5..ccf1435 100644 --- a/App.vue +++ b/App.vue @@ -215,7 +215,7 @@ }, onShow() { - + let that = this // 记录H5和公众号 if (this.$store.state.app.token) { @@ -244,7 +244,7 @@ // #endif }, mounted() { - + }, methods: { diff --git a/components/zbpSwiper.vue b/components/zbpSwiper.vue index a0a1e90..1197dc4 100644 --- a/components/zbpSwiper.vue +++ b/components/zbpSwiper.vue @@ -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) { diff --git a/config/app.js b/config/app.js index 8036f9b..adddc06 100644 --- a/config/app.js +++ b/config/app.js @@ -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' diff --git a/pages.json b/pages.json index de765b2..7575445 100644 --- a/pages.json +++ b/pages.json @@ -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": "我的" } ] - + diff --git a/pages/nongKe/cloud_entrepot/index.vue b/pages/nongKe/cloud_entrepot/index.vue index 2b81a0b..1a4ab2a 100644 --- a/pages/nongKe/cloud_entrepot/index.vue +++ b/pages/nongKe/cloud_entrepot/index.vue @@ -19,23 +19,54 @@ - - - - - - - {{town}}里海云仓 + + + + + + + {{town}}里海云仓 + + + + + + + + {{street}} + + + + 全部 + + + + + - - - 全部 + + +
+ + 供销综合云市场 + + + 供销综合云商品 + +
+ + + + + @@ -175,7 +206,7 @@ - + 暂无商品 @@ -251,7 +282,7 @@ - + 当前区域暂无云仓 @@ -315,7 +346,8 @@ - + @@ -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; diff --git a/pages/nongKe/supply_chain/supplier.vue b/pages/nongKe/supply_chain/supplier.vue index 1a8578b..8e9ccef 100644 --- a/pages/nongKe/supply_chain/supplier.vue +++ b/pages/nongKe/supply_chain/supplier.vue @@ -14,29 +14,51 @@ - + 供销综合云市场 + + + + - + + + + {{street}} + +
+ + 供销综合云市场 + + + 供销综合云商品 + + +
+
- + @@ -274,6 +296,11 @@ + + + + @@ -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; diff --git a/pages/supply_chains/supply_chains.vue b/pages/supply_chains/supply_chains.vue index 9f4d616..d2f1f08 100644 --- a/pages/supply_chains/supply_chains.vue +++ b/pages/supply_chains/supply_chains.vue @@ -24,7 +24,7 @@ + :url="`/pages/nongKe/supply_chain/supplier?type_id=10&street_id=${street_id}&townName=${town}`"> diff --git a/static/images/GXSC/SL.png b/static/images/GXSC/SL.png new file mode 100644 index 0000000..7b1663c Binary files /dev/null and b/static/images/GXSC/SL.png differ diff --git a/static/images/GXSC/XL.png b/static/images/GXSC/XL.png new file mode 100644 index 0000000..c323075 Binary files /dev/null and b/static/images/GXSC/XL.png differ