diff --git a/api/community.js b/api/community.js index 53e01e5..fe9ec77 100644 --- a/api/community.js +++ b/api/community.js @@ -82,11 +82,16 @@ export function videoList(data) { }); } /**自己的视频列表*/ +export function deoList(id) { + return request.get(`community/show/${id}`); +} + export function myVideoList(id,data) { return request.get(`community/user/community_video/${id}`, data, { noAuth: true }); } + /**文章点赞*/ export function graphicStartApi(id, status) { return request.post(`community/start/${id}`, status); diff --git a/api/product.js b/api/product.js index 002e2d7..547c66e 100644 --- a/api/product.js +++ b/api/product.js @@ -13,6 +13,13 @@ import request from "@/utils/request.js"; * 获取商品详情 */ export const getProductDetailsAPI = (data) => request.get('micro/product_details', data) + +/** + *商品列表 + */ +export const spuInfo = (id,data) => request.get('product/spu/street/'+id, data) + + /** * 线下导入 */ diff --git a/components/WaterfallsFlow/WaterfallsFlow.vue b/components/WaterfallsFlow/WaterfallsFlow.vue index 9068f74..103fcdf 100644 --- a/components/WaterfallsFlow/WaterfallsFlow.vue +++ b/components/WaterfallsFlow/WaterfallsFlow.vue @@ -160,7 +160,7 @@ export default { }, // item点击 itemTap(item) { - // this.$emit('itemTap', item) + this.$emit('itemTap', item) }, // item点击 goShop(item) { diff --git a/components/WaterfallsFlow/WaterfallsFlowo.vue b/components/WaterfallsFlow/WaterfallsFlowo.vue index 5de9191..561592e 100644 --- a/components/WaterfallsFlow/WaterfallsFlowo.vue +++ b/components/WaterfallsFlow/WaterfallsFlowo.vue @@ -101,7 +101,7 @@ export default { if(this.mark < this.allList.length){ this.waterFall() } - console.log(this.rightList,this.leftList) + } }, immediate: true, @@ -169,7 +169,7 @@ export default { }, // item点击 itemTap(item) { - this.$emit('itemTap', item) + // this.$emit('itemTap', item) }, // item点击 goShop(item) { diff --git a/components/WaterfallsFlow/WaterfallsFlows.vue b/components/WaterfallsFlow/WaterfallsFlows.vue index 17e1e39..91429d2 100644 --- a/components/WaterfallsFlow/WaterfallsFlows.vue +++ b/components/WaterfallsFlow/WaterfallsFlows.vue @@ -26,7 +26,9 @@ @@ -83,7 +93,7 @@ margin-left: 21rpx; .tag-one { - + text-align: center; padding: 2rpx 9rpx; border-radius: 11rpx 11rpx 11rpx 11rpx; @@ -120,7 +130,8 @@ } } } -.relase { + + .relase { display: flex; margin-left: 21rpx; @@ -163,7 +174,7 @@ margin-left: 21rpx; margin-bottom: 25rpx; display: flex; - justify-content: space-between; + width: 280rpx; height: 39rpx; line-height: 39rpx; diff --git a/components/WaterfallsFlowItem/WaterfallsFlowItems.vue b/components/WaterfallsFlowItem/WaterfallsFlowItems.vue index 610937e..7e8b621 100644 --- a/components/WaterfallsFlowItem/WaterfallsFlowItems.vue +++ b/components/WaterfallsFlowItem/WaterfallsFlowItems.vue @@ -18,6 +18,9 @@ + \ No newline at end of file diff --git a/components/zbpSwiper.vue b/components/zbpSwiper.vue index 1737ea9..29c799f 100644 --- a/components/zbpSwiper.vue +++ b/components/zbpSwiper.vue @@ -5,7 +5,8 @@ - + + {{street}} @@ -69,12 +70,17 @@ location_Arr: { type: Object, default: () => ({}) - } + }, + show: { + type: Boolean, + default: false + }, }, data() { return { defaInd: [0, 0], street: '', + streeta: '', showPicker: false, styleConfig: [], columnData: [], @@ -91,26 +97,37 @@ interval: 2000, // 自动切换时间间隔 duration: 400 // 滑动动画时长 }, + } }, watch: { - street: { - handler(newVal, oldVal) { - this.street = newVal - }, + street(newval, val) { + // console.log(newval, val) + this.street = newval + // console.log(newval, val) } + }, created() { - this.getBanner() this.Area() }, mounted() { - this.appLocation() + uni.$on('init', function(data) { + console.log('init data ', data); + }); + let arr = uni.getStorageSync('ADRESS_LOCATION') + + if (arr.length > 0) { + + this.street = arr.split(',')[0] + } else { + this.appLocation() + } }, methods: { @@ -138,8 +155,12 @@ lat: latitude, long: longitude }).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 - Cache.set('ADRESS_LOCATION', this.street) + + }).catch(err => { uni.showToast({ title: err, @@ -148,7 +169,6 @@ }) }, fail: (err) => { - uni.showToast({ title: "获取定位超时", icon: 'none', @@ -158,10 +178,17 @@ }); }, confirm(e) { - this.street = e.value[1].name + this.showPicker = false this.$emit('selectPlce', e) - Cache.set('ADRESS_LOCATION', e.value[1].name) + this.$emit('change', e) + this.street = e.value[1].name + + uni.setStorageSync('ADRESS_LOCATION', + e.value[1].name + ',' + + + e.value[1].code + ) }, changeHandler(e) { const { @@ -282,6 +309,8 @@ height: 66.67rpx; margin-bottom: 26.32rpx; position: relative; + z-index: 9999; + // 位置 .place_wrapper { diff --git a/config/app.js b/config/app.js index d731782..4fe8295 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' @@ -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/pages/gather/gather.vue b/pages/gather/gather.vue index 24d18c3..314e6be 100644 --- a/pages/gather/gather.vue +++ b/pages/gather/gather.vue @@ -14,7 +14,7 @@ --> - + @@ -339,20 +339,7 @@ this.getUserInfo() this.appLocation() }, - watch: { - street: { - handler(newVal, oldVal) { - this.street = newVal - let arr = Cache.get('ADRESS_LOCATION') - console.log(arr,'2') - if (arr.length > 0) { - this.street=arr.split(',')[0] - - - } - }, - } - }, + onPullDownRefresh() { this.getUserInfo() uni.stopPullDownRefresh() @@ -416,7 +403,7 @@ }, confirm(e) { this.street = e.value[1].name - Cache.set('ADRESS_LOCATION', + uni.setStorageSync('ADRESS_LOCATION', e.value[1].name + ',' + e.value[1].name + ',' + e.value[1].code @@ -437,8 +424,12 @@ lat: latitude, long: longitude }).then(res => { - this.street = res.data.address_component.street - Cache.set('ADRESS_LOCATION', this.street) + 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.setStorageSync('ADRESS_LOCATION', + this.town + ',' + this.town + ',' + + this.street_id) }).catch(err => { uni.showToast({ title: err, @@ -465,7 +456,7 @@ document.body.scrollTop; // 滚动条滚动的距离 let scrollStep = scrollTop - this.oldScrollTop; - console.log("header 滚动距离 ", scrollTop); + // console.log("header 滚动距离 ", scrollTop); // 更新——滚动前,滚动条距文档顶部的距离 this.oldScrollTop = scrollTop; @@ -479,19 +470,19 @@ //滚动条到底部的条件 if (scrollTop + windowHeight == scrollHeight) { //你想做的事情 - console.log("header 你已经到底部了"); + // console.log("header 你已经到底部了"); } if (scrollStep < 0) { this.isFshow = false - console.log("header 滚动条向上滚动了!"); + // console.log("header 滚动条向上滚动了!"); } else { this.isFshow = true - console.log("header 滚动条向下滚动了!"); + // console.log("header 滚动条向下滚动了!"); } // 判断是否到了最顶部 if (scrollTop <= 0) { this.isFshow = false - console.log("header 到了最顶部") + // console.log("header 到了最顶部") } }, diff --git a/pages/index/index.vue b/pages/index/index.vue index 090216f..a5fc834 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,18 +1,16 @@