From da17f1ac7ff5fa87410320f930b985cc4a4514ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=97=9C=E8=A1=80=E9=BE=99=E5=B8=85?= <1493694146@qq.com> Date: Mon, 11 Sep 2023 23:50:14 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8A=9B=E7=89=A9=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/nongKe/cloud_entrepot/indexa.vue | 1015 ++++++++++++++++++++++++ 1 file changed, 1015 insertions(+) create mode 100644 pages/nongKe/cloud_entrepot/indexa.vue diff --git a/pages/nongKe/cloud_entrepot/indexa.vue b/pages/nongKe/cloud_entrepot/indexa.vue new file mode 100644 index 0000000..d8d8b7d --- /dev/null +++ b/pages/nongKe/cloud_entrepot/indexa.vue @@ -0,0 +1,1015 @@ + + + + + \ No newline at end of file From 99ef4d1da631554432dc868776a682053f4e095f Mon Sep 17 00:00:00 2001 From: THK3121 Date: Tue, 12 Sep 2023 10:07:27 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=B4=AD=E7=89=A9=E8=BD=A6=E6=80=BB?= =?UTF-8?q?=E4=BB=B7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/nongKe/cloud_entrepot/index.vue | 22 +++++++++++++++------- pages/nongKe/cloud_entrepot/indexa.vue | 7 ++++++- pages/order_addcart/order_addcart.vue | 6 +++--- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/pages/nongKe/cloud_entrepot/index.vue b/pages/nongKe/cloud_entrepot/index.vue index 1d3f8ae..9e98c52 100644 --- a/pages/nongKe/cloud_entrepot/index.vue +++ b/pages/nongKe/cloud_entrepot/index.vue @@ -88,13 +88,14 @@ - + + - + @@ -150,7 +151,7 @@ - + @@ -159,7 +160,7 @@ - + @@ -194,7 +195,6 @@ - { + console.log(res) + this.totalMoney = 0 this.cartList = res.data.list - this.cartList[0].list.forEach(e => { - this.totalMoney = this.totalMoney + Number(e.productAttr.price) * e.cart_num + this.cartList.forEach(e => { + this.totalMoney += e.list[0].cart_num * e.list[0].productAttr.price + // console.log(e.list[0].cart_num, e.list[0].productAttr.price) + // return + // console.log(e.list[0].cart_num, e.productAttr[0].price) + // this.totalMoney = this.totalMoney + Number(e.productAttr.price) * e.cart_num + // console.log(e.productAttr.price, e.cart_num) }) }) getCartCounts().then(res => { diff --git a/pages/nongKe/cloud_entrepot/indexa.vue b/pages/nongKe/cloud_entrepot/indexa.vue index d8d8b7d..7b9facc 100644 --- a/pages/nongKe/cloud_entrepot/indexa.vue +++ b/pages/nongKe/cloud_entrepot/indexa.vue @@ -26,7 +26,8 @@ - {{town}}里海云仓 + + {{a}} @@ -273,6 +274,7 @@ data() { let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13'; return { + a: "", trnList: [], act_cart: false, appInfo: {}, @@ -467,6 +469,9 @@ }, addcart(i) { let that = this + console.log((this.$refs.jia[i])) + this.a = this.$refs.jia[i] + return uni.createSelectorQuery().in(this).select(`.act_class${i}`).boundingClientRect(data1 => { that.trnList[i].left = this.cartTagInfo.left - data1.left + 'px'; that.trnList[i].bottom = this.cartTagInfo.top - data1.top + 'px'; diff --git a/pages/order_addcart/order_addcart.vue b/pages/order_addcart/order_addcart.vue index d04eb0f..0a859e7 100644 --- a/pages/order_addcart/order_addcart.vue +++ b/pages/order_addcart/order_addcart.vue @@ -1218,9 +1218,9 @@ padding: 0 30rpx; box-sizing: border-box; border-top: 1px solid #eee; - bottom: 98rpx; - bottom: calc(98rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/ - bottom: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/ + bottom: 40px; + bottom: calc(40px + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/ + bottom: calc(40px + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/ } .shoppingCart .footer.on { From 8deeb65dc81a1945038a52ed8e364826b879d350 Mon Sep 17 00:00:00 2001 From: THK3121 Date: Tue, 12 Sep 2023 10:55:43 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/app.js | 4 +- main.js | 81 +++++++++++++++------------ pages.json | 1 + pages/nongKe/cloud_entrepot/index.vue | 49 +++++++++++----- pages/order_addcart/order_addcart.vue | 6 +- 5 files changed, 89 insertions(+), 52 deletions(-) diff --git a/config/app.js b/config/app.js index adddc06..f79ddf7 100644 --- a/config/app.js +++ b/config/app.js @@ -24,8 +24,8 @@ if (process.env.NODE_ENV === "development") { // httpApiThree = 'baseUrlTest' // h5跨域配置 // #endif } else if (process.env.NODE_ENV === 'production') { - httpApi = 'https://shop.lihaink.cn' // 生产 - // httpApi = "https://crmeb-test.shop.lihaink.cn" + // httpApi = 'https://shop.lihaink.cn' // 生产 + httpApi = "https://crmeb-test.shop.lihaink.cn" httpApiTwo = 'https://nk.lihaink.cn' // 生产 httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产 } diff --git a/main.js b/main.js index 304c9fe..c99b17d 100644 --- a/main.js +++ b/main.js @@ -12,7 +12,9 @@ import App from './App' import store from './store' import Cache from './utils/cache' import util from 'utils/util' -import { HTTP_REQUEST_URL } from '@/config/app'; +import { + HTTP_REQUEST_URL +} from '@/config/app'; import skeleton from './components/skeleton/index.vue' import BaseMoney from './components/BaseMoney.vue'; import uView from '@/uni_modules/uview-ui' @@ -23,59 +25,63 @@ Vue.prototype.$util = util; Vue.prototype.$Cache = Cache; Vue.prototype.$eventHub = new Vue(); Vue.config.productionTip = false -Vue.prototype.$bus = new Vue(); +Vue.prototype.$bus = new Vue(); // #ifdef H5 -import { parseQuery } from "./utils"; +import { + parseQuery +} from "./utils"; import Auth from './libs/wechat'; -import { SPREAD } from './config/cache'; +import { + SPREAD +} from './config/cache'; // import wx from '@/node_modules/jweixin-module/lib/index' var __s = document.createElement('script'); __s.src = HTTP_REQUEST_URL + "/api/script"; document.head.appendChild(__s); Vue.prototype.$wechat = Auth; let cookieName = "VCONSOLE", - query = parseQuery(), - urlSpread = query["spread"], - vconsole = query[cookieName.toLowerCase()], - md5Crmeb = "b14d1e9baeced9bb7525ab19ee35f2d2", //CRMEB MD5 加密开启vconsole模式 - md5UnCrmeb = "3dca2162c4e101b7656793a1af20295c"; //UN_CREMB MD5 加密关闭vconsole模式 + query = parseQuery(), + urlSpread = query["spread"], + vconsole = query[cookieName.toLowerCase()], + md5Crmeb = "b14d1e9baeced9bb7525ab19ee35f2d2", //CRMEB MD5 加密开启vconsole模式 + md5UnCrmeb = "3dca2162c4e101b7656793a1af20295c"; //UN_CREMB MD5 加密关闭vconsole模式 if (urlSpread !== undefined) { - var spread = Cache.get(SPREAD); - urlSpread = parseInt(urlSpread); - if (!Number.isNaN(urlSpread) && spread !== urlSpread) { - Cache.set("spread", urlSpread || 0); - } else if (spread === 0 || typeof spread !== "number") { - Cache.set("spread", urlSpread || 0); - } + var spread = Cache.get(SPREAD); + urlSpread = parseInt(urlSpread); + if (!Number.isNaN(urlSpread) && spread !== urlSpread) { + Cache.set("spread", urlSpread || 0); + } else if (spread === 0 || typeof spread !== "number") { + Cache.set("spread", urlSpread || 0); + } } if (vconsole !== undefined) { - if (vconsole === md5UnCrmeb && Cache.has(cookieName)) - Cache.clear(cookieName); + if (vconsole === md5UnCrmeb && Cache.has(cookieName)) + Cache.clear(cookieName); } else vconsole = Cache.get(cookieName); import VConsole from './components/vconsole.min.js' if (vconsole !== undefined && vconsole === md5Crmeb) { - Cache.set(cookieName, md5Crmeb, 3600); - let vConsole = new VConsole(); + Cache.set(cookieName, md5Crmeb, 3600); + let vConsole = new VConsole(); } // 注册全局防抖指令 Vue.directive('debounce', { - inserted: (el, binding) => { - let debounceTime = binding.value || 2000 - let timer - el.addEventListener('click', e => { - el.style.pointerEvents = 'none'; - if (!el.disabled) { - timer = setTimeout(() => { - el.style.pointerEvents = 'auto' - }, debounceTime) - } - }, true) - } + inserted: (el, binding) => { + let debounceTime = binding.value || 2000 + let timer + el.addEventListener('click', e => { + el.style.pointerEvents = 'none'; + if (!el.disabled) { + timer = setTimeout(() => { + el.style.pointerEvents = 'auto' + }, debounceTime) + } + }, true) + } }) // if(!!!Auth.isAndroid() && Auth.isWeixin()){ @@ -86,12 +92,17 @@ Vue.directive('debounce', { // #endif +let appInfo = uni.getSystemInfo().then(res => { + Vue.prototype.$appInfo = res[1]; +}); + + App.mpType = 'app' const app = new Vue({ - ...App, - store, - Cache + ...App, + store, + Cache }) app.$mount(); \ No newline at end of file diff --git a/pages.json b/pages.json index ebb21d7..1862c49 100644 --- a/pages.json +++ b/pages.json @@ -260,6 +260,7 @@ "path": "cloud_entrepot/index", "style": { "navigationStyle": "custom", + "navigationBarTitleText": "里海云仓", "enablePullDownRefresh": true } diff --git a/pages/nongKe/cloud_entrepot/index.vue b/pages/nongKe/cloud_entrepot/index.vue index 9e98c52..a04503e 100644 --- a/pages/nongKe/cloud_entrepot/index.vue +++ b/pages/nongKe/cloud_entrepot/index.vue @@ -86,12 +86,15 @@ height="998.83rpx"> --> - + + + + @@ -230,12 +233,8 @@ - - - - @@ -312,15 +311,12 @@ }, onLoad(e) { this.cartFn() - uni.getSystemInfo({ - success: (res) => { - this.winHeight = res.windowHeight - this.appInfo = res.safeAreaInsets - }, - }); + this.appInfo = this.$appInfo.safeAreaInsets + this.winHeight = this.$appInfo.windowHeight this.street_code = e.street this.town = e.town this.getCloundShop() + // console.log(this.appInfo, "手机信息") }, // 分页 // onReachBottom() { @@ -551,6 +547,33 @@ z-index: 99999999; } + .swiper_item { + display: flex; + justify-content: space-around; + transition: .5s; + padding: 40rpx; + // transform: scale(1.2); + } + + .swiper_item_act { + transform: scale(1.2); + } + + // .swiper_item:hover {} + + + // .swiper_item { + // transform: scale(1.2); + // } + + .swiper_b { + transition: 1s; + } + + // .swiper_b:active { + // transform: scale(1.5); + // } + .act_cart { transition: 0.5s; transform: scale(1.1); diff --git a/pages/order_addcart/order_addcart.vue b/pages/order_addcart/order_addcart.vue index 0a859e7..2c6f8b5 100644 --- a/pages/order_addcart/order_addcart.vue +++ b/pages/order_addcart/order_addcart.vue @@ -113,8 +113,8 @@ {{loadTitle}} - + @@ -215,6 +215,7 @@ }, data() { return { + appInfo: null, loading: false, //是否加载中 loadend: false, //是否加载完毕 loadTitle: '加载更多', //提示语 @@ -274,6 +275,7 @@ }, onShow: function() { + this.appInfo = this.$appInfo.safeAreaInsets let that = this let routes = getCurrentPages(); let curRoute = routes[routes.length - 1].route