From 31a5da396bff5982256d076248c88a66ea0bb292 Mon Sep 17 00:00:00 2001 From: THK3121 Date: Mon, 18 Sep 2023 19:06:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E9=94=80=E7=BB=BC=E5=90=88=E4=BA=91?= =?UTF-8?q?=E5=B8=82=E5=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 4 +- components/zbpSwiper.vue | 18 +- config/app.js | 4 +- pages.json | 41 +++-- pages/nongKe/cloud_entrepot/index.vue | 218 ++++++++++++++++++++++--- pages/nongKe/supply_chain/supplier.vue | 183 ++++++++++++++++++++- pages/supply_chains/supply_chains.vue | 2 +- static/images/GXSC/SL.png | Bin 0 -> 1306 bytes static/images/GXSC/XL.png | Bin 0 -> 1329 bytes 9 files changed, 407 insertions(+), 63 deletions(-) create mode 100644 static/images/GXSC/SL.png create mode 100644 static/images/GXSC/XL.png 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 0000000000000000000000000000000000000000..7b1663cd84f6577f43c90ee7c872a5747b85d896 GIT binary patch literal 1306 zcmeAS@N?(olHy`uVBq!ia0vp^J|N7&1|*M957Y)yjKx9jP7LeL$-HD>V7cPy;uum9 z_x5INwoIxB`-kFrH;=Z7i^b3dXk@G*{I2RFlnjylyv^BEE} zIhu^m6ia*5EJ>L6{I0vpdZq*29TssVZ7x?_j%;UqV48fUpZVg386_z|`MsJMWtPP-^}SaWYO2(l31~GdgYGfcCKYx%ccgs+?>(0 z`=Z&;`wR&OB_4mz+}C%Rhj&fX+OVlX>4Js%2iNUWSajK?WMW5@*GhN6j|L1jkp|DK z1ke87mv1#MSDwk4u{bu|x^HsQ+mpAA1^0G#td~x%JNbL}^U8AO1KOz$r1=YQ|3KlRLI>oxbOLGKw3tXo^D^sBprkJYi@VA{Go zV`kRNQTEepH-FlYr{ej^M}Q^1$ZY*qyM~VWN{`+JF5u#hF%rVXVrU4FGbt#R;ZL$%B;R@x@(t$Yep@*_r^`P3v`}O z`)ON!u4V4JC1>w%y>_`{$DL=B%M~(eS+x%_HDr5EI>YMtVJ&Z4u9|DG*V6L`Zx+qIq#a=7>855#6Gd%DTaowCK5x1rF!IPNlwJSojmd-y?{%p%Hd8MkZ-w!Y4 z{oQ8*a;Cq)$7yp~*KLVf%iQbsxSEg2JbGn_oW@kI=K_WI6)sk>U5=7>J2JU4!llHr zYf*Fav0E&s?$ynaSBdgZ(3}?ZN|{09dCXOLfx@yI>ywPOsJiUg?|XS3Z_@+gyk_&y zvCX21j0eg+C&}m*|Cu>hVCHu6<@~=Y0j`;ZW5}Ah?^Hocwb4_T$_6jE+S_Mzmf!X?xz9 zlfm6gTxpSUN5vJ1&)dKDl{;(*TG=z*Yv~vF89V>aIbFT){r-f_w%Hrjq#p0guveOA zdTdYP<^z6buVig~d^4Z*^y}BJ)vsNFVdQ&MBb@0LzzDfdBvi literal 0 HcmV?d00001 diff --git a/static/images/GXSC/XL.png b/static/images/GXSC/XL.png new file mode 100644 index 0000000000000000000000000000000000000000..c32307572d037e763df385bc5c91593c99531efc GIT binary patch literal 1329 zcmb7E{a2C)7=1BHWz#e)5#dyZm}#kpB9|XaeAQIMLKn_2sJ7II9FiTi6ht$Oq?S>B zkHn8-31LQq%%n6)Ct4b`FsI3MW|`Yb=LeEwe?reW&%Ni|`@=oY{oyG-ND8xoAz=Uj z*n}Sd$z~@0zgFwasJ?N?!%PqsIg9{E`%&)z0Qx>042sQ4o+*!{W4?1x4=A-IVzjes z?YIc;S~e!WecMA+fZdAS0k1XmmuwEQA5q#ba77;9auOcDT12`Plyj_NGTWT77^H)% z?eTLP;00$g(aJ%an=#do8kdDnn;5IJ*()DcUmEb-L{E!nWIh6l7=l_5IX>3j6XV{H zZj9<0zY~fm1!8vD!f8YcqSE(^%~Lb7mX;Q{SSWPprDT{`x4a=AB~^+;2Z*I zE;_RKfWg$MBI*Y(@Dwk|v~*?Y_~4^erw!{QUXV5O8zhkt|(9Af5JT zHin?mnoK4folbAV_Y_Io9bn3nc%wVuuaA$kgC6#52C<4+V+WwxX&uFGZ)-Cyc6WDE zJJ)5zel9L9b`A>-?O&q`mh5wRfGm0&Ub!sE&#qaxN1is-iNMp@DJdy=EEY?ReJ9#u zFc_B31+pRbjru>6VcfB*s3e_=C_CDsnDQ0mUk|rRmcDw=n#fp+uIwrpbl^X&M5&dj zz0uE{wD0Fz&HAz7oH&)IDCza^aAgvex~jR)$(zQyxrMQmZ*BlTvAt;Jh?6u+QM)DZ zx{!cBA=eY-@$I^3MDzeNXV>OsKCd%uCq~k!T-yRw1Id94mtg_~gsdt~RPcmfxfsSa3G;xGE znDzK$RYknbTgNjcQ5#-FA99GI+}6$xS&TJ*%3a;%5+BqRV=Z3^1|!p|wett=@2?E$ z8n`NgsLnWq;Diwq&ZJL?jGG4)ex*H$gs$M(81M&LK$9H5o+Fh?L+@^^AWy>qMc~a^ zs(5=&9rbzQtMFql0re8h(^`8x_zs4jD zQl90Z)G0Y{n`;DhJ9oP*7w{(U>4eGqaWXsRM*DOUFNLO|OEg1wQz!%GFr-VKfVa(B z_;EK<`6kM-<}W2Li+M$s6L@v!^9H01ni~qXfpegKWWhiEme2B1;n~BK7C**ODoRH@ zfuvj70OS#>|A5~}e|t%Z_qI{t*~?rVg@$EX?p=ul@1#mbr|z{*E|8n%{9P)BUck*K zP~vjYJ=gy^EhJC2uu}^!33z?RA=b}zahn2b$ZLv6bTv?r<{;G%C-Zp4?o1!znfUt zesR+d;YCubucjj30=M>o^z0zBip861a9>nacmOirsmsRvHFW$3fu&PwoPcMe`>YD+L`3C~wAtX>rpmF~LDMx2a literal 0 HcmV?d00001