diff --git a/api/store.js b/api/store.js index 8226901..000a408 100644 --- a/api/store.js +++ b/api/store.js @@ -87,6 +87,15 @@ export function getCategoryList() { noAuth: true }); } +/** + * 获取商品分类列表 + * + */ +export function getCategoryIndexList() { + return request.get('store/product/category/index', {}, { + noAuth: true + }); +} /** * 获取产品列表 * @param object data diff --git a/components/WaterfallsFlowItem/WaterfallsFlowItem.vue b/components/WaterfallsFlowItem/WaterfallsFlowItem.vue index 4e29b61..010fe4d 100644 --- a/components/WaterfallsFlowItem/WaterfallsFlowItem.vue +++ b/components/WaterfallsFlowItem/WaterfallsFlowItem.vue @@ -6,9 +6,18 @@ - {{item.store_name}} - - {{item.price}} + {{item.store_name}} + + + + {{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}} + 领券 + 包邮 + + + {{item.price}} + ¥{{item.svip_price}} @@ -16,13 +25,6 @@ - - {{item.merchant.type_name}} - 自营 - {{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}} - 领券 - 包邮 - @@ -33,22 +35,23 @@ {{item.store_name}} - - ¥{{item.price}} - - - ¥{{item.svip_price}} - - - - - {{item.merchant.type_name}} - 自营 + + {{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}} 领券 包邮 + + ¥{{item.price}} + + + ¥{{item.svip_price}} + + + + {{item.rate}}评分 {{item.reply_count}}条评论 {{item.merchant.mer_name}} @@ -299,8 +302,10 @@ export default { border: 1px solid var(--view-theme); } .item_tags .tags_item.delivery{ - color: #FF9000; - border: 1px solid #FF9000; + // color: #FF9000; + // border: 1px solid #FF9000; + color: var(--view-theme); + border: 1px solid var(--view-theme); } .wf-page1 .text .money .ticket-big { display: flex; @@ -355,4 +360,8 @@ export default { margin-right: 10rpx; } } +.car{ + width: 40rpx; + height: 40rpx; +} diff --git a/components/recommend/index.vue b/components/recommend/index.vue index b4d1a17..4d46894 100644 --- a/components/recommend/index.vue +++ b/components/recommend/index.vue @@ -5,7 +5,7 @@ - + @@ -24,7 +24,7 @@ 综合线上大市场 - + @@ -36,7 +36,7 @@ - + {{item.name}} @@ -52,15 +52,6 @@ \ No newline at end of file diff --git a/pages/cloud_warehouse/specialty/specialty.vue b/pages/cloud_warehouse/specialty/specialty.vue new file mode 100644 index 0000000..10053ff --- /dev/null +++ b/pages/cloud_warehouse/specialty/specialty.vue @@ -0,0 +1,394 @@ + + + + \ No newline at end of file diff --git a/pages/index/component/homeComb.vue b/pages/index/component/homeComb.vue index aa2ea19..5cb8356 100644 --- a/pages/index/component/homeComb.vue +++ b/pages/index/component/homeComb.vue @@ -63,6 +63,9 @@ import { configMap } from '@/utils'; + import { + getGeocoder + } from "@/api/store.js" export default { name: 'homeComb', props: { @@ -188,6 +191,7 @@ }) }, mounted() { + this.getLocation(); let that = this; if (that.tabTitle.length > 0 && that.tabTitle[0]['value'] != '推荐') { that.tabTitle.unshift({ @@ -217,6 +221,65 @@ }) }, methods: { + // 选择位置 + changeMap() { + uni.navigateTo({ + url: `/pages/select_address_n/select_address_n`, + success: () => { + uni.$once('changeAddress', (e) => { + this.street = e.street.name; + this.town = e.street.name; + this.$store.commit('setAddress', { + street_id: e.street.code, + townName: this.town + }); + if (e.longitude) { + this.longitude = e.longitude; + this.latitude = e.latitude; + this.$store.commit('setLocation', { + lat: e.latitude, + long: e.longitude, + }); + } + }) + } + }) + }, + getLocation(){ + uni.getLocation({ + type: 'gcj02', + success: (res) => { + let latitude, longitude; + latitude = res.latitude.toString(); + longitude = res.longitude.toString(); + this.$store.commit('setLocation', { + lat: res.latitude.toFixed(6), + long: res.longitude.toFixed(6), + }); + getGeocoder({ + lat: latitude, + long: longitude + }).then(res => { + let town = res.data.address_reference.town.title + let street_id = street_id = res.data.address_reference.town.id + this.street = res.data.address_reference.town.title; + this.$store.commit('setAddress', { + street_id: street_id, + townName: town + }); + uni.$emit('getLocation_succees', { + street_id, + }) + }).catch(err => { + uni.showToast({ + title: err, + icon: 'none' + }) + this.street = '定位失败' + }) + } + }) + }, goDetail(url) { let urls = url.info[1].value this.$util.JumpPath(urls); diff --git a/pages/index/index.vue b/pages/index/index.vue index 85f49b4..b1a30d6 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -13,7 +13,6 @@ :dataConfig="homeCombData" :userInfo="userInfo" :isFixed="isFixed" :isScrolled="isScrolled" @changeDiy="changeDiy"> - @@ -89,8 +88,8 @@ - - + + {{ hotTitle }} @@ -784,7 +783,7 @@ if (item.name == 'menus') { that.isMenu = true; } - if (that.recommend_switch == 1) that.get_host_product() + if (that.recommend_switch == 1) that.loadGoods(); uni.pageScrollTo({ scrollTop: 0, }) @@ -996,6 +995,25 @@ that.loadTitle = '加载更多'; }); }, + /** + * 点击组件选项卡 + */ + changeRecommedTab(e){ + this.hotPage = 1; + this.hotScroll = true; + this.$set(this, 'hostProduct', []); + this.loadGoods(e); + }, + loadGoods(e=1){ + if(e==1) return this.get_host_product(); + if(e==2) return this.get_host_home({ + mer_id: 259 + }); + if(e==3) return this.get_host_home(); + if(e==4) return this.get_host_home({ + label_name: '名优特产' + }); + }, /** * 获取我的推荐 */ @@ -1005,7 +1023,7 @@ if (!that.hotScroll) return; if (that.hotLoading) return; that.hotLoading = true; - that.hotTitle = ''; + that.hotTitle = '加载中'; getProductHot(that.hotPage, that.hotLimit).then(res => { let list = res.data.list; let productList = that.$util.SplitArray(list, that.hostProduct); @@ -1017,6 +1035,32 @@ that.$set(that, 'hotPage', that.hotPage + 1); }); }, + /** + * 获取里海云仓, 云市场, 名优特产 + */ + get_host_home: function(query={}) { + let that = this; + let num = that.hotLimit; + if (!that.hotScroll) return; + if (that.hotLoading) return; + that.hotLoading = true; + that.hotTitle = '加载中'; + query.page = that.hotPage; + query.limit = that.hotLimit; + getProductslist({ + ...query + }).then(res => { + let list = res.data.list; + let productList = that.$util.SplitArray(list, that.hostProduct); + let hotScroll = list.length <= num && list.length != 0; + that.hotScroll = hotScroll; + that.hotLoading = false; + that.hotTitle = !hotScroll ? '已全部加载' : '加载更多'; + that.$set(that, 'hostProduct', productList); + that.$set(that, 'hotPage', that.hotPage + 1); + }); + }, + getCateData() { getCateData().then(res => { res.data.unshift({ @@ -1112,7 +1156,7 @@ onReachBottom() { if (this.recommend_switch == 1 && this.navIndex == 0) { // 首页加载更多 - this.get_host_product(); + this.loadGoods(this.$refs.recommendRef.currTabs || 1); } else if (this.navIndex == 1) { // 分类栏目加载更多 if (this.sortProduct.length > 0) { diff --git a/pages/select_address_n/select_address_n.nvue b/pages/select_address_n/select_address_n.nvue new file mode 100644 index 0000000..8ecb433 --- /dev/null +++ b/pages/select_address_n/select_address_n.nvue @@ -0,0 +1,414 @@ + + + + + \ No newline at end of file diff --git a/pages/users/order_list/index.vue b/pages/users/order_list/index.vue index bfb9fd9..1c0a8ac 100644 --- a/pages/users/order_list/index.vue +++ b/pages/users/order_list/index.vue @@ -566,6 +566,7 @@ groupOrderList({ page: that.page, limit: that.limit, + sale_type: 1 //1-零售, 2-批发 }).then(res => { that.isReady = true; let list = res.data.list || []; @@ -585,6 +586,7 @@ status: that.orderStatus - 1, page: that.page, limit: that.limit, + sale_type: 1 //1-零售, 2-批发 }).then(res => { let list = res.data.list || []; let loadend = list.length < that.limit; diff --git a/static/assets/car.png b/static/assets/car.png new file mode 100644 index 0000000..1fa2fbe Binary files /dev/null and b/static/assets/car.png differ diff --git a/static/images/1-001.png b/static/images/1-001.png deleted file mode 100644 index b9ca607..0000000 Binary files a/static/images/1-001.png and /dev/null differ diff --git a/static/images/1-002.png b/static/images/1-002.png deleted file mode 100644 index ad1bb96..0000000 Binary files a/static/images/1-002.png and /dev/null differ diff --git a/static/images/2-001.png b/static/images/2-001.png deleted file mode 100644 index bc6ca91..0000000 Binary files a/static/images/2-001.png and /dev/null differ diff --git a/static/images/2-002.png b/static/images/2-002.png deleted file mode 100644 index ae39093..0000000 Binary files a/static/images/2-002.png and /dev/null differ diff --git a/static/images/3-001.png b/static/images/3-001.png deleted file mode 100644 index 2c7ac27..0000000 Binary files a/static/images/3-001.png and /dev/null differ diff --git a/static/images/3-002.png b/static/images/3-002.png deleted file mode 100644 index c6bff0d..0000000 Binary files a/static/images/3-002.png and /dev/null differ diff --git a/static/images/4-001.png b/static/images/4-001.png deleted file mode 100644 index 0292c1b..0000000 Binary files a/static/images/4-001.png and /dev/null differ diff --git a/static/images/4-002.png b/static/images/4-002.png deleted file mode 100644 index d20175e..0000000 Binary files a/static/images/4-002.png and /dev/null differ diff --git a/static/images/5-001.png b/static/images/5-001.png deleted file mode 100644 index 72e2bf4..0000000 Binary files a/static/images/5-001.png and /dev/null differ diff --git a/static/images/5-002.png b/static/images/5-002.png deleted file mode 100644 index 7cbac51..0000000 Binary files a/static/images/5-002.png and /dev/null differ diff --git a/static/tabbar_icon/a-a.png b/static/tabbar_icon/a-a.png index cb2f5c9..58015da 100644 Binary files a/static/tabbar_icon/a-a.png and b/static/tabbar_icon/a-a.png differ diff --git a/static/tabbar_icon/a.png b/static/tabbar_icon/a.png index 752fbb2..bd978e3 100644 Binary files a/static/tabbar_icon/a.png and b/static/tabbar_icon/a.png differ diff --git a/static/tabbar_icon/b-a.png b/static/tabbar_icon/b-a.png index 01fb60d..609ea21 100644 Binary files a/static/tabbar_icon/b-a.png and b/static/tabbar_icon/b-a.png differ diff --git a/static/tabbar_icon/b.png b/static/tabbar_icon/b.png index 2549e1e..3cf4bb0 100644 Binary files a/static/tabbar_icon/b.png and b/static/tabbar_icon/b.png differ diff --git a/static/tabbar_icon/c-a.png b/static/tabbar_icon/c-a.png index 7d6f2cf..57d8430 100644 Binary files a/static/tabbar_icon/c-a.png and b/static/tabbar_icon/c-a.png differ diff --git a/static/tabbar_icon/c.png b/static/tabbar_icon/c.png index f896f6c..b829642 100644 Binary files a/static/tabbar_icon/c.png and b/static/tabbar_icon/c.png differ diff --git a/static/tabbar_icon/d-a.png b/static/tabbar_icon/d-a.png index 72cc533..21b46b1 100644 Binary files a/static/tabbar_icon/d-a.png and b/static/tabbar_icon/d-a.png differ diff --git a/static/tabbar_icon/d.png b/static/tabbar_icon/d.png index 6d081bd..6b6b36d 100644 Binary files a/static/tabbar_icon/d.png and b/static/tabbar_icon/d.png differ diff --git a/static/tabbar_icon/e-a.png b/static/tabbar_icon/e-a.png index ce3f075..b76a1ed 100644 Binary files a/static/tabbar_icon/e-a.png and b/static/tabbar_icon/e-a.png differ diff --git a/static/tabbar_icon/e.png b/static/tabbar_icon/e.png index 7c8ec8e..a372282 100644 Binary files a/static/tabbar_icon/e.png and b/static/tabbar_icon/e.png differ diff --git a/static/tabbar_icon/iconfont.css b/static/tabbar_icon/iconfont.css deleted file mode 100644 index 01f51bf..0000000 --- a/static/tabbar_icon/iconfont.css +++ /dev/null @@ -1,232 +0,0 @@ -@font-face { - font-family: "iconfont2"; - /* Project id 3861260 */ - src: url('//at.alicdn.com/t/c/font_3861260_kcyv21x2z6e.woff2?t=1683356048406') format('woff2'), - url('//at.alicdn.com/t/c/font_3861260_kcyv21x2z6e.woff?t=1683356048406') format('woff'), - url('//at.alicdn.com/t/c/font_3861260_kcyv21x2z6e.ttf?t=1683356048406') format('truetype'), - url('//at.alicdn.com/t/c/font_3861260_kcyv21x2z6e.svg?t=1683356048406#iconfont2') format('svg'); -} - -.iconfont2 { - font-family: "iconfont2" !important; - font-size: 16px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.custom-icona-zu2901:before { - content: "\e648"; -} - -.custom-iconoasa1:before { - content: "\e649"; -} - -.custom-icongengduo:before { - content: "\e64a"; -} - -.custom-iconyijian:before { - content: "\e644"; -} - -.custom-icongongzi:before { - content: "\e645"; -} - -.custom-iconwendang:before { - content: "\e646"; -} - -.custom-iconweixin:before { - content: "\e647"; -} - -.custom-iconoaha:before { - content: "\e634"; -} - -.custom-iconoamy:before { - content: "\e635"; -} - -.custom-iconoamya:before { - content: "\e63e"; -} - -.custom-iconoasa:before { - content: "\e63f"; -} - -.custom-iconoara:before { - content: "\e640"; -} - -.custom-iconoar:before { - content: "\e641"; -} - -.custom-iconoah:before { - content: "\e642"; -} - -.custom-iconoas:before { - content: "\e643"; -} - -.custom-iconhangye:before { - content: "\e636"; -} - -.custom-iconhangye-a:before { - content: "\e637"; -} - -.custom-iconxinwen:before { - content: "\e638"; -} - -.custom-icongonying:before { - content: "\e639"; -} - -.custom-icongonying-a:before { - content: "\e63a"; -} - -.custom-iconmy-a:before { - content: "\e63b"; -} - -.custom-iconxiaoxi-a:before { - content: "\e63c"; -} - -.custom-iconmy:before { - content: "\e63d"; -} - -.custom-iconchuang:before { - content: "\e631"; -} - -.custom-iconyouhuiquan:before { - content: "\e632"; -} - -.custom-iconmeishi:before { - content: "\e633"; -} - -.custom-iconsmfw:before { - content: "\e62c"; -} - -.custom-iconzxyy:before { - content: "\e62d"; -} - -.custom-iconzxjd:before { - content: "\e62e"; -} - -.custom-iconhtqd:before { - content: "\e62f"; -} - -.custom-iconzxsg:before { - content: "\e630"; -} - -.custom-iconhbxs:before { - content: "\e622"; -} - -.custom-iconmsgy:before { - content: "\e623"; -} - -.custom-iconylbj:before { - content: "\e624"; -} - -.custom-iconfwzx:before { - content: "\e625"; -} - -.custom-iconjypx:before { - content: "\e626"; -} - -.custom-iconshfw:before { - content: "\e627"; -} - -.custom-iconnfcp:before { - content: "\e628"; -} - -.custom-iconsczl:before { - content: "\e629"; -} - -.custom-iconscfw:before { - content: "\e62a"; -} - -.custom-iconwyly:before { - content: "\e62b"; -} - -.custom-iconmdtj:before { - content: "\e615"; -} - -.custom-iconxjjb:before { - content: "\e616"; -} - -.custom-iconcmtxl:before { - content: "\e617"; -} - -.custom-iconcunwu:before { - content: "\e618"; -} - -.custom-iconysdt:before { - content: "\e619"; -} - -.custom-icongsrz:before { - content: "\e61a"; -} - -.custom-icongstz:before { - content: "\e61b"; -} - -.custom-iconxzcg:before { - content: "\e61c"; -} - -.custom-iconcaiwu:before { - content: "\e61d"; -} - -.custom-iconshce:before { - content: "\e61e"; -} - -.custom-iconsqhf:before { - content: "\e61f"; -} - -.custom-iconxxlr:before { - content: "\e620"; -} - -.custom-icondangwu:before { - content: "\e621"; -} \ No newline at end of file diff --git a/static/tabbar_icon/top.png b/static/tabbar_icon/top.png deleted file mode 100644 index 9ef3842..0000000 Binary files a/static/tabbar_icon/top.png and /dev/null differ diff --git a/store/modules/app.js b/store/modules/app.js index f746db1..59003fe 100644 --- a/store/modules/app.js +++ b/store/modules/app.js @@ -18,7 +18,6 @@ import { import Cache from '../../utils/cache'; const state = { location: Cache.get('LOCATION_DATA', true) || {}, - address: Cache.get('address') || {}, token: Cache.get(LOGIN_STATUS) || null, uuid: uni.getStorageSync('uuid') || "", backgroundColor: "#fff", @@ -36,10 +35,6 @@ const mutations = { setLocation(state, data) { state.location = data Cache.set('LOCATION_DATA', data); - }, - SET_ADDRESS(state, data) { - state.address = data - Cache.set('address', data); }, LOGIN(state, opt) { state.token = opt.token; diff --git a/store/modules/index.js b/store/modules/index.js index ce881aa..6703754 100644 --- a/store/modules/index.js +++ b/store/modules/index.js @@ -8,6 +8,8 @@ // | Author: CRMEB Team // +---------------------------------------------------------------------- import app from "./app"; +import storage from "./storage.js"; export default { - app -}; + app, + storage +}; \ No newline at end of file diff --git a/store/modules/storage.js b/store/modules/storage.js new file mode 100644 index 0000000..a04455f --- /dev/null +++ b/store/modules/storage.js @@ -0,0 +1,53 @@ +import { + getUserInfo, + Appversion +} from "../../api/user.js"; +import { + LOGIN_STATUS, + UID, + USER_INFO +} from '../../config/cache'; +import Cache from '../../utils/cache'; + +const state = { + storage: {}, + location: uni.getStorageSync('S_location') || { + lat: null, + long: null, + }, + address: uni.getStorageSync('S_address') || { + street_id: '', + townName: '' + } +}; + +const mutations = { + setStorage(state, data) { + state.storage = data; + }, + setLocation(state, data){ + state.location.lat = data.lat; + state.location.long = data.long; + uni.setStorageSync('S_location', { + lat: data.lat, + long: data.long + }) + }, + setAddress(state, data){ + state.address.street_id = data.street_id; + state.address.townName = data.townName; + uni.setStorageSync('S_address', { + street_id: data.street_id, + townName: data.townName + }) + } +}; + +const actions = { +}; + +export default { + state, + mutations, + actions +}; \ No newline at end of file