From 2d73c2fe46875a3fa9f79d3e7ea0625c7206321b Mon Sep 17 00:00:00 2001 From: lifizer <913626195@qq.com> Date: Sat, 23 Sep 2023 18:13:26 +0800 Subject: [PATCH] =?UTF-8?q?Feat(=E6=97=B6=E4=BB=A4=E5=B0=9D=E9=B2=9C):?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 32 +- api/join.js | 21 +- api/product.js | 23 +- api/public.js | 6 +- api/wenwan.js | 4 +- assets/css/style.less | 144 ++++---- assets/script/global.js | 16 + components/chose-city/chose-city.vue | 6 +- config/index.js | 8 +- main.js | 61 +--- pages.json | 60 ++-- pages/Loading/index.vue | 227 ++++++------ pages/authorization/index.vue | 14 +- pages/cloud/haveFun.vue | 43 +-- pages/home/index.vue | 359 ++----------------- pages/order/OrderSubmission/index.vue | 6 +- pages/order/ReturnList/index.vue | 39 +- pages/shop/GoodsCon/index.vue | 16 +- pagesInn/inn/innHome.vue | 260 ++++++-------- pagesInn/inn/innInfoDetail.vue | 495 ++++++-------------------- pagesInn/inn/innInfoDetail_bak.vue | 387 ++++++++++++++++++++ pkg_join/views/index.vue | 123 +++---- pkg_join/views/shop.vue | 161 ++++++++- pkg_join/views/supplier.vue | 189 ++++++++-- pkg_join/views/wholesaler.vue | 416 ++++++++++++++++++++++ pkg_product/views/giftList.vue | 174 +++++++-- pkg_product/views/giftList_bak.vue | 160 +++++++++ pkg_product/views/giftList_debug.vue | 217 +++++++++++ pkg_product/views/healthList.vue | 164 ++++----- pkg_product/views/season.vue | 201 +++++++++++ pkg_product/views/seasonList.vue | 194 ++++++++++ pkg_product/views/seckill.vue | 36 +- utils/index.js | 8 +- utils/util.js | 24 ++ wenwan/views/store.vue | 87 ++--- 35 files changed, 2834 insertions(+), 1547 deletions(-) create mode 100644 pagesInn/inn/innInfoDetail_bak.vue create mode 100644 pkg_join/views/wholesaler.vue create mode 100644 pkg_product/views/giftList_bak.vue create mode 100644 pkg_product/views/giftList_debug.vue create mode 100644 pkg_product/views/season.vue create mode 100644 pkg_product/views/seasonList.vue create mode 100644 utils/util.js diff --git a/App.vue b/App.vue index 248b708..d2204fc 100644 --- a/App.vue +++ b/App.vue @@ -1,15 +1,15 @@ diff --git a/api/join.js b/api/join.js index 4da2e56..4e51580 100644 --- a/api/join.js +++ b/api/join.js @@ -23,28 +23,39 @@ export function getShopInfo() { return request.get("/merchantApply/info", {}, {login: true}) } +// 4-采购批发商 +export function getWholesaler() { + return request.get("/merchantApply/info/wholesaler", {}, {login: true}) +} + // 提交店铺入驻申请 -export function saveShop(hotelInfo, partnerId) { - let param = {hotelInfo}; +export function saveShop(hotelInfo, captcha, partnerId) { + let param = {hotelInfo, captcha: hotelInfo.captcha}; if (partnerId && partnerId.length > 0) param.partnerId = partnerId; return request.post("/merchantApply/hotel/submit", param, {login: true}) } // 提交特产供应商入驻申请 export function saveSupplier(hotelInfo, supplierInfo, partnerId) { - let param = {hotelInfo, supplierInfo}; + let param = {hotelInfo, supplierInfo, captcha: supplierInfo.captcha}; if (partnerId && partnerId.length > 0) param.partnerId = partnerId; return request.post("/merchantApply/goodSupplier/submit", param, {login: true}) } // 提交文玩供应商入驻申请 export function saveWenwanSupplier(hotelInfo, supplierInfo, partnerId) { - let param = {hotelInfo, supplierInfo}; + let param = {hotelInfo, supplierInfo, captcha: supplierInfo.captcha}; if (partnerId && partnerId.length > 0) param.partnerId = partnerId; return request.post("/merchantApply/wenwanSupplier/submit", param, {login: true}) } +// 提交采购批发商入驻申请 +export function saveWholesaler(wholesalerInfo) { + let param = {wholesalerInfo, captcha: wholesalerInfo.captcha}; + return request.post("/merchantApply/wholesaler/submit", param, {login: true}) +} + // 撤销入驻申请 export function removeApply() { return request.post("/merchantApply/revoke") -} \ No newline at end of file +} diff --git a/api/product.js b/api/product.js index 69efb6a..6d5b439 100644 --- a/api/product.js +++ b/api/product.js @@ -15,7 +15,7 @@ export function wellnessPlaceList(param) { } /** - * 定制礼品首页 + * 特色礼品首页 * */ export function customizedGift() { return request.get("/customizedGift/index", {}, {login: true}) @@ -41,3 +41,24 @@ export function getStoryList(page) { export function getStoryDetail(id) { return request.get("/countyFamous/content/" + id, {}, {login: true}) } + +/** + * 时令尝鲜首页 + * */ +export function seasonHomeData() { + return request.get("/seasonalFood/index", {}, {login: true}) +} + +/** + * 时令尝鲜 + * */ +export function getSeason(id) { + return request.get("/seasonalFood/content/" + id, {}, {login: true}) +} + +/** + * 时令尝鲜 + * */ +export function getSeasonPoster(id) { + return request.get("/seasonalFood/poster/" + id, {}, {login: true}) +} \ No newline at end of file diff --git a/api/public.js b/api/public.js index 11b5338..13dd3d6 100644 --- a/api/public.js +++ b/api/public.js @@ -1,5 +1,9 @@ import request from "@/utils/request"; +export function getSplashScreen() { + return request.get("/splashScreen") +} + /** * 首页 * @returns {*} @@ -199,4 +203,4 @@ export function userUnionId() { // 获取分享图片 export function getShareImage() { return request.get("/shareImage", {}, {login: false}) -} \ No newline at end of file +} diff --git a/api/wenwan.js b/api/wenwan.js index f2a57af..a7d5a91 100644 --- a/api/wenwan.js +++ b/api/wenwan.js @@ -12,10 +12,10 @@ export function fetchStore(page, cityName, name) { /** * 获取商品城市列表 - * @param type 类型:0、特产;1、文玩;2、七彩云上;3、定制礼品;4、康养食材;5、千县名品;6、景点门票 + * @param type 类型:0、特产;1、文玩;2、七彩云上;3、特色礼品;4、康养食材;5、千县名品;6、景点门票 * */ export function fetchCity(type) { return request.get(`/wenwan/cityList/${type}`, {}, { login: true }) -} \ No newline at end of file +} diff --git a/assets/css/style.less b/assets/css/style.less index 054e923..cc317ad 100644 --- a/assets/css/style.less +++ b/assets/css/style.less @@ -3,16 +3,16 @@ page { } // ios底部安全距离-padding -.savepadding{ - padding-bottom: constant(safe-area-inset-bottom); - padding-bottom: env(safe-area-inset-bottom); - box-sizing: content-box; +.savepadding { + padding-bottom: constant(safe-area-inset-bottom); + padding-bottom: env(safe-area-inset-bottom); + box-sizing: content-box; } // ios底部安全距离-bottom -.savebottom{ - bottom: constant(safe-area-inset-bottom); - bottom: env(safe-area-inset-bottom); +.savebottom { + bottom: constant(safe-area-inset-bottom); + bottom: env(safe-area-inset-bottom); } .newsList .newsSwitch .van-hairline--top-bottom::after { @@ -323,7 +323,7 @@ page { padding-bottom: 0.25*100rpx; } -.evaluateWtapper .evaluateItem~.evaluateItem { +.evaluateWtapper .evaluateItem ~ .evaluateItem { border-top: 1px solid #f5f5f5; } @@ -630,7 +630,7 @@ page { margin-top: 0.36*100rpx; } -.product-window .productWinList .item~.item { +.product-window .productWinList .item ~ .item { margin-top: 0.36*100rpx; } @@ -991,7 +991,7 @@ page { opacity: 1; } -.swiper .swiper-pagination-bullet~.swiper-pagination-bullet { +.swiper .swiper-pagination-bullet ~ .swiper-pagination-bullet { margin-left: 0.12*100rpx; } @@ -1215,14 +1215,14 @@ page { flex: 1; box-sizing: border-box; height: 0.64*100rpx; - background-color: rgba(255,255,255,0.2); + background-color: rgba(255, 255, 255, 0.2); // border-radius: 0.5*100rpx; padding: 0 0.28*100rpx; font-size: 0.28*100rpx; color: #fff; - border:1px solid rgba(255,255,255,1); - border-radius:10*2rpx; + border: 1px solid rgba(255, 255, 255, 1); + border-radius: 10*2rpx; } .index .header .qr { @@ -1307,8 +1307,8 @@ page { box-shadow: 0 0.1*100rpx 0.3*100rpx #f5f5f5; -moz-box-shadow: 0 0.1*100rpx 0.3*100rpx #f5f5f5; -o-box-shadow: 0 0.1*100rpx 0.3*100rpx #f5f5f5; - background:rgba(255,86,74,0.1); - border-radius:0px 20*2rpx 20*2rpx 20*2rpx; + background: rgba(255, 86, 74, 0.1); + border-radius: 0px 20*2rpx 20*2rpx 20*2rpx; } .index .news .pictrue { @@ -1440,7 +1440,7 @@ page { } } -.index .wrapper.hot+.wrapper { +.index .wrapper.hot + .wrapper { border-top: 0; } @@ -1563,7 +1563,7 @@ page { opacity: 0.3; } -.index .wrapper .boutique .swiper-pagination-bullet~.swiper-pagination-bullet { +.index .wrapper .boutique .swiper-pagination-bullet ~ .swiper-pagination-bullet { margin-left: 0.1*100rpx; } @@ -1628,7 +1628,7 @@ page { text-align: left; } -.index .hotList .list .item~.item { +.index .hotList .list .item ~ .item { margin-left: 0.23*100rpx; } @@ -1740,7 +1740,8 @@ page { height: 350rpx; } -.index .wrapper .newProducts {} +.index .wrapper .newProducts { +} .index .wrapper.hot .newProducts .newProductsItem { width: 2.4*100rpx; @@ -1769,7 +1770,8 @@ page { flex: 0 2.4*100rpx; } -.index .wrapper .newProducts:nth-last-child(1) {} +.index .wrapper .newProducts:nth-last-child(1) { +} .index .wrapper .newProducts .img-box { width: 100%; @@ -2214,15 +2216,15 @@ page { } -.shoppingCart .footer-content{ - padding: 0 0.3*100rpx; - margin-left: 0.3*100rpx; - margin-right: 0.3*100rpx; - height: 0.96*100rpx; - box-sizing: border-box; +.shoppingCart .footer-content { + padding: 0 0.3*100rpx; + margin-left: 0.3*100rpx; + margin-right: 0.3*100rpx; + height: 0.96*100rpx; + box-sizing: border-box; - background:linear-gradient(139deg,rgba(255,149,141,1) 0%,rgba(255,92,138,1) 100%); - border-radius:0.48*100rpx; + background: linear-gradient(139deg, rgba(255, 149, 141, 1) 0%, rgba(255, 92, 138, 1) 100%); + border-radius: 0.48*100rpx; } @@ -2263,7 +2265,7 @@ page { text-align: center; } -.shoppingCart .footer .button .bnt~.bnt { +.shoppingCart .footer .button .bnt ~ .bnt { margin-left: 0.17*100rpx; } @@ -2371,7 +2373,7 @@ page { } -.user .wrapper .nav .item~.item:after { +.user .wrapper .nav .item ~ .item:after { position: absolute; content: ''; left: 0; @@ -2728,22 +2730,22 @@ page { font-size: 0.28*100rpx; } -.product-con .footer .bnt>view { +.product-con .footer .bnt > view { width: 2.22*100rpx; text-align: center; line-height: 0.76*100rpx; } //.product-con .footer .bnt .joinCart { - // border-radius: 0.5*100rpx 0 0 0.5*100rpx; - // background-image: linear-gradient(to right, #fea10f 0%, #fea10f 100%); - // background-image: -moz-linear-gradient(to right, #eb3729 0%, #eb3729 100%); +// border-radius: 0.5*100rpx 0 0 0.5*100rpx; +// background-image: linear-gradient(to right, #fea10f 0%, #fea10f 100%); +// background-image: -moz-linear-gradient(to right, #eb3729 0%, #eb3729 100%); //} //.product-con .footer .bnt .buy { - // border-radius: 0 0.5*100rpx 0.5*100rpx 0; - // background-image: linear-gradient(to right, #eb3729 0%, #eb3729 100%); - // background-image: -moz-linear-gradient(to right, #eb3729 0%, #eb3729 100%); +// border-radius: 0 0.5*100rpx 0.5*100rpx 0; +// background-image: linear-gradient(to right, #eb3729 0%, #eb3729 100%); +// background-image: -moz-linear-gradient(to right, #eb3729 0%, #eb3729 100%); //} /*订单提交*/ @@ -2910,7 +2912,7 @@ page { color: #282828; } -.order-submission .moneyList .item~.item { +.order-submission .moneyList .item ~ .item { margin-top: 0.2*100rpx; } @@ -3263,7 +3265,7 @@ page { border: 1px solid #444; } -.my-order .list .item .bottom .bnt~.bnt { +.my-order .list .item .bottom .bnt ~ .bnt { margin-left: 0.17*100rpx; } @@ -3384,7 +3386,7 @@ page { color: #282828; } -.order-details .wrapper .item~.item { +.order-details .wrapper .item ~ .item { margin-top: 0.2*100rpx; } @@ -3446,7 +3448,7 @@ page { border: 1px solid #444; } -.order-details .footer .bnt~.bnt { +.order-details .footer .bnt ~ .bnt { margin-left: 0.18*100rpx; } @@ -3622,7 +3624,7 @@ page { color: #282828; } -.payment-status .wrapper .item~.item { +.payment-status .wrapper .item ~ .item { margin-top: 0.2*100rpx; } @@ -4277,7 +4279,7 @@ page { margin: 0.13*100rpx auto 0 auto; } -.bargain .goodsDetails~.goodsDetails { +.bargain .goodsDetails ~ .goodsDetails { margin-bottom: 0.5*100rpx; } @@ -4452,7 +4454,7 @@ page { border: 1px solid #ddd; } -.bargain-record .item .bottom .bnt~.bnt { +.bargain-record .item .bottom .bnt ~ .bnt { margin-left: 0.18*100rpx; } @@ -4764,7 +4766,7 @@ page { background-color: #e93323; } -.product-con .superior .slider-banner .swiper-container-horizontal>.swiper-pagination-bullets { +.product-con .superior .slider-banner .swiper-container-horizontal > .swiper-pagination-bullets { bottom: 0; } @@ -5061,7 +5063,7 @@ page { padding: 0.48*100rpx 0.3*100rpx 0.65*100rpx 0.3*100rpx; } -.evaluate-con .score .item~.item { +.evaluate-con .score .item ~ .item { margin-top: 0.25*100rpx; } @@ -5074,7 +5076,7 @@ page { color: #aaa; } -.evaluate-con .score .item .starsList .iconfont~.iconfont { +.evaluate-con .score .item .starsList .iconfont ~ .iconfont { margin-left: 0.2*100rpx; } @@ -5091,9 +5093,10 @@ page { } .evaluate-con .score .textarea textarea { + box-sizing: border-box; font-size: 0.28*100rpx; padding: 0.38*100rpx 0.3*100rpx 0 0.3*100rpx; - width: 100%; + width: 690rpx !important; height: 1.6*100rpx; } @@ -5749,7 +5752,7 @@ page { text-align: center; } -.cash-withdrawal .nav .item~.item { +.cash-withdrawal .nav .item ~ .item { border-left: 1px solid #f0f0f0; } @@ -5914,7 +5917,7 @@ page { background-color: #fff; } -.promoter-order .list .item .listn .itenm~.itenm { +.promoter-order .list .item .listn .itenm ~ .itenm { margin-top: 0.12*100rpx; } @@ -6468,7 +6471,7 @@ page { background-color: #efc58f; } -.flash-sale .timeLsit .item~.item { +.flash-sale .timeLsit .item ~ .item { border-left: 1px solid #e3b06e; } @@ -6524,7 +6527,8 @@ page { color: #fc4141; } -.flash-sale .countDown .text {} +.flash-sale .countDown .text { +} .flash-sale .list.on { margin-top: 2.02*100rpx; @@ -6785,7 +6789,7 @@ page { color: #282828; } -.newsList .nav .item~.item { +.newsList .nav .item ~ .item { margin-left: 0.46*100rpx; } @@ -6968,7 +6972,7 @@ page { font-weight: bold; } -.register .whiteBg .title .item~.item { +.register .whiteBg .title .item ~ .item { margin-left: 0.85*100rpx; } @@ -7134,7 +7138,7 @@ page { height: 1.85*100rpx; } -.pos-order-goods .goods~.goods { +.pos-order-goods .goods ~ .goods { border-top: 1px dashed #e5e5e5; } @@ -7388,7 +7392,7 @@ page { width: 100%; } -.pos-order-list .list .item~.item { +.pos-order-list .list .item ~ .item { margin-top: 0.24*100rpx; } @@ -7464,7 +7468,7 @@ page { text-align: center; } -.pos-order-list .list .item .operation .order .items~.items { +.pos-order-list .list .item .operation .order .items ~ .items { border-top: 1px solid #f5f5f5; } @@ -7479,7 +7483,7 @@ page { line-height: 0.6*100rpx; } -.pos-order-list .list .item .operation .bnt~.bnt { +.pos-order-list .list .item .operation .bnt ~ .bnt { margin-left: 0.14*100rpx; } @@ -7604,7 +7608,7 @@ page { line-height: 0.77*100rpx; } -.pos-order-details .footer .more .order .item~.item { +.pos-order-details .footer .more .order .item ~ .item { border-top: 1px solid #f5f5f5; } @@ -7711,7 +7715,7 @@ page { margin-left: 0.13*100rpx; } -.deliver-goods .wrapper .item .mode .goods~.goods { +.deliver-goods .wrapper .item .mode .goods ~ .goods { margin-left: 0.3*100rpx; } @@ -7981,11 +7985,11 @@ page { border-top: 0.01*100rpx solid #eee; } -.yd-confirm-ft>a { +.yd-confirm-ft > a { color: #e93323; } -.yd-confirm-ft>a.primary { +.yd-confirm-ft > a.primary { border-left: 0.01*100rpx solid #eee; color: #e93323; } @@ -8043,7 +8047,8 @@ page { line-height: 0.9*100rpx; } -.swiper-wrapper {} +.swiper-wrapper { +} .posterCanvasWarp { position: relative; @@ -8097,6 +8102,7 @@ rich-text { -webkit-box-orient: vertical; transition: all linear 0.2s; } + /* ================== flex布局(colorui里面也有相关基础样式) ==================== */ @@ -8176,18 +8182,20 @@ rich-text { } // v4 custom -.v4-nodata{ +.v4-nodata { display: flex; flex-direction: column; align-items: center; margin-top: 60rpx; - image{ + + image { width: 200rpx; - height:188rpx; + height: 188rpx; margin-bottom: 20rpx; } - .text{ - color:#999; + + .text { + color: #999; font-size: 28rpx; } } diff --git a/assets/script/global.js b/assets/script/global.js index 1d3cc3a..77f4c04 100644 --- a/assets/script/global.js +++ b/assets/script/global.js @@ -42,6 +42,22 @@ export default { }) }, + goSupplierMini() { + uni.navigateToMiniProgram({ + appId: "wx9ca93d1f2a9c8156", + path: "pages/auth/login", + success(msg){ + console.log("success",msg) + }, + fail(err){ + console.log("fail",err) + }, + complete(msg){ + console.log("complete",msg) + } + }) + }, + diffSSS: (date) => { if (typeof date !== "string") return 0; date = date.substring(0, 19); diff --git a/components/chose-city/chose-city.vue b/components/chose-city/chose-city.vue index d58c20b..72dd320 100644 --- a/components/chose-city/chose-city.vue +++ b/components/chose-city/chose-city.vue @@ -21,7 +21,8 @@ - 当前定位:{{ location }} + 当前定位:{{ location }} + 暂无特产 暂无店铺 - 暂无景点 + 暂无景点 {{ item.cityName }} @@ -171,6 +172,7 @@ export default { }, select(item) { if (this.type === 0 && item.hasData === 0) return; + if ((this.type === 1 || this.type === 2) && item.hasShop === 0) return; uni.setStorageSync("cityName", item.cityName) switch (this.type) { diff --git a/config/index.js b/config/index.js index 42c9cfd..49c37ec 100644 --- a/config/index.js +++ b/config/index.js @@ -1,11 +1,11 @@ export const VUE_APP_API_URL = "https://shop.xdd618.com/api"; // export const VUE_APP_API_URL = "https://www.xdd618.com/api"; -export const SERVICE_API_URL = "https://service-test.xdd618.com/api"; -// export const SERVICE_API_URL = "https://service.xdd618.com/api"; +// export const SERVICE_API_URL = "https://service-test.xdd618.com/api"; +export const SERVICE_API_URL = "https://service.xdd618.com/api"; -export const SOCKET_URL = "wss://service-test.xdd618.com/ws"; -// export const SOCKET_URL = "wss://service.xdd618.com/ws"; +// export const SOCKET_URL = "wss://service-test.xdd618.com/ws"; +export const SOCKET_URL = "wss://service.xdd618.com/ws"; export const VUE_APP_RESOURCES_URL = "https://www.xdd618.com/api/file/pic"; export const STATIC_RESOURCE_URL = "https://resource.xdd618.com/image" diff --git a/main.js b/main.js index 491f3c2..3805ca1 100644 --- a/main.js +++ b/main.js @@ -14,69 +14,10 @@ import { VUE_APP_RESOURCES_URL, WX_LIVE_APPID } from "@/config"; -import uView from '@/uni_modules/uview-ui' +import uView from "uview-ui"; Vue.use(uView); Vue.mixin(mixin) -uni.$u.setConfig({ - // 修改$u.config对象的属性 - config: { - // 修改默认单位为rpx,相当于执行 uni.$u.config.unit = 'rpx' - unit: 'rpx' - }, - // 修改$u.props对象的属性 - props: { - // 修改radio组件的size参数的默认值,相当于执行 uni.$u.props.radio.size = 30 - radio: { - size: 30, - labelSize: 30, - iconSize: 25 - }, - icon: { - size: 40, - fontSize: 30 - }, - picker: { - fontSize: 30 - }, - button: { - fontSize: 30, - iconSize: 30 - }, - navbar: { - leftIconSize: 40, - titleStyle: { - fontSize: '30rpx' - } - }, - tabbar: { - size: 30 - }, - tabs: { - lineWidth: 40 - }, - search: { - searchIconSize: 40 - }, - codeInput: { - size: 60 - }, - calendar: { - rowHeight: 112 - }, - empty: { - textSize: 28 - }, - checkbox: { - fontSize: 30, - size: 30, - labelSize: 24, - iconSize: 30 - } - // 其他组件属性配置 - // ...... - } -}) // 注册全局组件 diff --git a/pages.json b/pages.json index edb8feb..28f2352 100644 --- a/pages.json +++ b/pages.json @@ -104,12 +104,12 @@ "navigationBarTitleText": "404" } }, -// { -// "path": "pages/cloud/cloud", -// "style": { -// "navigationBarTitleText": "七彩云上" -// } -// }, + // { + // "path": "pages/cloud/cloud", + // "style": { + // "navigationBarTitleText": "七彩云上" + // } + // }, { "path": "pages/cloud/haveFun", "style": { @@ -524,7 +524,7 @@ { "path": "inn/innInfoDetail", "style": { - "navigationStyle": "custom" + "navigationBarTitleText": "资讯详情" } }, { @@ -578,6 +578,12 @@ "style": { "navigationBarTitleText": "供应商入驻" } + }, + { + "path": "views/wholesaler", + "style": { + "navigationBarTitleText": "采购批发商入驻" + } } ] }, @@ -604,7 +610,7 @@ { "path": "views/giftList", "style": { - "navigationBarTitleText": "定制礼品", + "navigationBarTitleText": "特色礼品", "onReachBottomDistance": 100 } }, @@ -651,6 +657,18 @@ "navigationBarTextStyle": "white", "navigationBarBackgroundColor": "#FF564A" } + }, + { + "path": "views/seasonList", + "style": { + "navigationBarTitleText": "时令尝鲜" + } + }, + { + "path": "views/season", + "style": { + "navigationBarTitleText": "时令尝鲜" + } } ] }, @@ -869,25 +887,25 @@ "condition": { "current": 0, "list": [ - { - "name": "文玩店铺", - "path": "wenwan/views/store", - "query": "scene=id%3D74%26partnerId%3D5659" - }, - { - "name": "普通店铺", - "path": "pagesInn/inn/innHome", - "query": "scene=id%3D74%26partnerId%3D5659" - }, { "name": "商品详情", "path": "pages/shop/GoodsCon/index", - "query": "scene=id%3D289%26partnerId%3D5675" + "query": "id=369" }, { "name": "DEBUG", - "path": "pkg_product/views/giftList", - "query": "" + "path": "pages/shop/ShoppingCart/index", + "query": "id=297" + }, + { + "name": "No.8", + "path": "pages/shop/GoodsEvaluate/index", + "query": "id=eb30f8a98b1c4952addbdccb1d37533d" + }, + { + "name": "时令尝鲜", + "path": "pkg_product/views/season", + "query": "id=20" } ] } diff --git a/pages/Loading/index.vue b/pages/Loading/index.vue index 65d2b1d..33a3b90 100644 --- a/pages/Loading/index.vue +++ b/pages/Loading/index.vue @@ -1,144 +1,115 @@ diff --git a/pages/authorization/index.vue b/pages/authorization/index.vue index bea1e33..baa2f97 100644 --- a/pages/authorization/index.vue +++ b/pages/authorization/index.vue @@ -30,7 +30,7 @@ 《用户协议及隐私政策》 - + @@ -41,7 +41,7 @@ 请完善您的头像和昵称 - { - this.doneRedirect() + if (res.status === 200) { + this.doneRedirect(); + } else { + uni.showToast({ + title: res.msg, + icon: "none", + duration: 5000 + }) + } }).catch(error => { uni.showToast({ title: error, diff --git a/pages/cloud/haveFun.vue b/pages/cloud/haveFun.vue index 794fd43..c100c24 100644 --- a/pages/cloud/haveFun.vue +++ b/pages/cloud/haveFun.vue @@ -18,6 +18,7 @@ export default { this.getMapData(); getHotelTypeList().then(({data}) => { this.typeList = data; + console.log("getHotelTypeList") this.search(); }); }, @@ -27,6 +28,7 @@ export default { if (memCityName.length) { this.cityName = memCityName; uni.removeStorageSync("cityName") + console.log("memCityName if") this.search(); } }, @@ -56,45 +58,6 @@ export default { } }, - // getCurAddress() { - // let that = this; - // //定位 - // uni.showLoading({ - // title: '定位中...' - // }); - // - // uni.getLocation({ - // type: 'wgs84', - // success: function (res) { - // let latitude = res.latitude; - // let longitude = res.longitude; - // - // // #ifndef H5 - // uni.request({ - // url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=' + latitude + ',' + longitude + - // '&key=' + config.key, - // success: function (res) { - // uni.hideLoading(); - // - // that.cityName = res.data.result.ad_info.city; - // //定位成功刷新数据 - // that.search() - // }, - // fail: function () { - // uni.hideLoading(); - // }, - // complete: function () { - // } - // }); - // // #endif - // }, - // fail: function (err) { - // console.log("test",err) - // uni.hideLoading(); - // } - // }); - // }, - tapType(index) { if (this.typeIndex === index) return; this.typeIndex = index; @@ -338,4 +301,4 @@ export default { background-color: rgba(0, 0, 0, 0) !important; } } - \ No newline at end of file + diff --git a/pages/home/index.vue b/pages/home/index.vue index 284a3a0..c15b2c6 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -3,17 +3,7 @@ - - - - - - - - - - - + @@ -21,12 +11,11 @@ 客服 - - + - @@ -41,10 +30,6 @@ style="flex-wrap: nowrap;position: absolute;left: 0;bottom: 0;right: 0;background: rgba(0,0,0,0.6);padding: 10rpx 32rpx;"> - - @@ -61,11 +46,6 @@ - - @@ -85,31 +65,10 @@ + - - - - - - - - - - - - - 最新 - {{ item.info }} - - - - - - - - @@ -246,9 +205,6 @@ v-if="item.productPrice">¥{{ item.productPrice }} - @@ -310,7 +266,6 @@ - diff --git a/pagesInn/inn/innInfoDetail_bak.vue b/pagesInn/inn/innInfoDetail_bak.vue new file mode 100644 index 0000000..bdc084a --- /dev/null +++ b/pagesInn/inn/innInfoDetail_bak.vue @@ -0,0 +1,387 @@ + + + + + diff --git a/pkg_join/views/index.vue b/pkg_join/views/index.vue index a9d735d..d9a39f3 100644 --- a/pkg_join/views/index.vue +++ b/pkg_join/views/index.vue @@ -2,28 +2,22 @@ - - - - - - - - - - + + + - - - + + + diff --git a/pkg_product/views/giftList.vue b/pkg_product/views/giftList.vue index e9aa55e..c707759 100644 --- a/pkg_product/views/giftList.vue +++ b/pkg_product/views/giftList.vue @@ -1,40 +1,57 @@ @@ -77,8 +94,6 @@ export default { let that = this; // 此时mescroll会携带page的参数: let pageNum = mescroll.num; // 页码, 默认从1开始 - console.log(pageNum,"test") - let timer = setInterval(() => { if (that.asideList.length > 0) { @@ -107,7 +122,7 @@ export default { }); }); } - },500) + }, 500) } }) ], @@ -140,9 +155,18 @@ export default { .pkg-product-list { min-height: 100vh; box-sizing: border-box; - padding-top: 20rpx; background: #fff; + .fixed-header { + position: fixed; + top: 0; + left: 0; + width: 100%; + padding: 18rpx 0; + background: #fff; + z-index: 9; + } + .search-box { margin-top: 14rpx; } @@ -152,5 +176,93 @@ export default { top: 472rpx; height: calc(100vh - 472rpx); } + + .fixed-aside { + position: fixed; + width: 194rpx; + left: 0; + top: 472rpx; + bottom: 0 !important; + box-sizing: border-box; + border-top: 2rpx solid #D2D2D2; + border-right: 2rpx solid #DADCE0; + background-color: #fff; + overflow-y: auto; + overflow-x: hidden; + overflow-scrolling: touch; + + .item { + height: 94rpx; + box-sizing: border-box; + border-bottom: 2rpx solid #D2D2D2; + color: #033333; + + text { + font-size: 28rpx; + } + } + + .active { + border-left: 6rpx solid #FD574B; + color: #FD574B; + font-weight: bold; + } + } + + .conter { + margin-left: 194rpx; + margin-top: 472rpx; + border-top: 2rpx solid #D2D2D2; + + .empty { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + + image { + width: 280rpx; + height: 280rpx; + } + + view { + color: gray; + font-size: 24rpx; + } + } + + .item { + position: relative; + width: 242rpx; + height: 376rpx; + box-sizing: border-box; + margin: 20rpx 0 0 20rpx; + + .cover { + width: 242rpx; + height: 242rpx; + margin-bottom: 8rpx; + border-radius: 8rpx; + } + + .name { + color: #333; + font-size: 26rpx; + line-height: 36rpx; + } + + .price { + position: absolute; + bottom: 4rpx; + color: #DA0000; + font-size: 28rpx; + line-height: 36rpx; + } + } + + .item-store { + height: 336rpx; + } + } } diff --git a/pkg_product/views/giftList_bak.vue b/pkg_product/views/giftList_bak.vue new file mode 100644 index 0000000..82a0cc1 --- /dev/null +++ b/pkg_product/views/giftList_bak.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/pkg_product/views/giftList_debug.vue b/pkg_product/views/giftList_debug.vue new file mode 100644 index 0000000..8c8a05d --- /dev/null +++ b/pkg_product/views/giftList_debug.vue @@ -0,0 +1,217 @@ + + + + + diff --git a/pkg_product/views/healthList.vue b/pkg_product/views/healthList.vue index ec2114a..44c9806 100644 --- a/pkg_product/views/healthList.vue +++ b/pkg_product/views/healthList.vue @@ -37,27 +37,30 @@ - - - - - - {{ item.content }} - - - {{ item.name }} - - - - - - {{ item.storeName }} - ¥{{ item.price }} + + + + + {{ item.content }} + + + {{ item.name }} + + + + {{ item.storeName }} + ¥{{ item.price }} + - + + + + @@ -67,80 +70,34 @@ import {fetchCity} from "@/api/wenwan"; import {wellnessFood, wellnessPlaceList} from "@/api/product"; import {getProducts} from "@/api/store"; -import MescrollMixins from "@/mixins/mescroll-mixins"; -import MescrollBody from "@/components/mescroll-uni/mescroll-body"; export default { name: "healthList", - components: { - MescrollBody - }, data() { return { webUrl: this.$VUE_APP_RESOURCES_URL, tabIndex: 0, keyword: "", page: 1, + listHeight: "auto", + bannerList: [], asideList: [], asideIndex: 0, dataList: [], // 列表数据 - - upOption: { - noMoreSize: 10, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5 - auto: true, - empty: { - tip: '暂无数据' // 提示 - } - }, - downOption: { - auto: false - } } }, - mixins: [ - MescrollMixins({ - getPageData(mescroll) { - let that = this; - // 此时mescroll会携带page的参数: - let pageNum = mescroll.num; // 页码, 默认从1开始 - - let timer = setInterval(() => { - if (that.asideList.length > 0) { - clearInterval(timer); - - let param = { - page: pageNum, - limit: 10, - keyword: that.keyword, - provinceId: that.asideList.length > 0 ? that.asideList[that.asideIndex].provinceId : "" - } - - if (mescroll.num === 1) { - that.dataList = []; - } - if (that.tabIndex === 0) { - wellnessPlaceList(param).then(({data}) => { - that.dataList = that.dataList.concat(data); - mescroll.endSuccess(data.length); - }); - } else { - param.isWellnessFood = 1; - getProducts(param).then(({data}) => { - that.dataList = that.dataList.concat(data); - mescroll.endSuccess(data.length); - }); - } - } - }, 500) - } - }) - ], onLoad() { - wellnessFood().then(({data}) => this.bannerList = data.banner); - fetchCity(4).then(({data}) => this.asideList = data.group); + this.init(); }, methods: { + init() { + wellnessFood().then(({data}) => this.bannerList = data.banner); + fetchCity(4).then(({data}) => { + this.asideList = data.group; + this.search(); + }); + }, changeTab(index) { if (this.asideList.length === 0) return; if (index === this.tabIndex) return; @@ -148,17 +105,11 @@ export default { this.tabIndex = index; this.search(); }, - search() { - if (this.asideList.length === 0) return; - //触发加载请求 - this.mescroll.scrollTo(0, 0); - this.mescroll && this.mescroll.resetUpScroll(false); - }, - asideTap(index) { - this.asideIndex = index; + onLower() { + this.page++; this.search(); }, - fetchData() { + search() { let param = { page: this.page, limit: 10, @@ -167,19 +118,41 @@ export default { } if (this.tabIndex === 0) { wellnessPlaceList(param).then(({data}) => { - for (let i = 0; i < data.length; i++) { - this.dataList.push(data[i]); - } + this.handleData(data); }); } else { param.isWellnessFood = 1; getProducts(param).then(({data}) => { - for (let i = 0; i < data.length; i++) { - this.dataList.push(data[i]); - } + this.handleData(data); }); } }, + handleData(data){ + let that = this; + if (this.page === 1) { + this.dataList = []; + } + this.dataList = this.dataList.concat(data); + uni.getSystemInfo({ + success: function (res) { + let len = that.dataList.length; + let {windowHeight} = res; + console.log("test data",windowHeight) + that.listHeight = "auto"; + if (windowHeight > 600 && len > 4) { + that.listHeight = "100%"; + } + if (windowHeight <= 600 && len > 2) { + that.listHeight = "100%"; + } + } + }); + }, + asideTap(index) { + this.asideIndex = index; + this.page = 1; + this.search(); + }, goStore(id) { uni.navigateTo({ url: "/pagesInn/inn/innHome?id=" + id @@ -198,7 +171,8 @@ export default { @import "@/assets/css/product.less"; .pkg-product-list { - min-height: 100vh; + height: 100vh; + overflow-y: hidden; box-sizing: border-box; padding-top: 16rpx; background: #fff; @@ -241,6 +215,16 @@ export default { color: #333; } } + + .img-nodata{ + position: relative; + top: 50%; + left: 50%; + transform: translate(-50%,-50%); + width: 360rpx; + height: 360rpx; + vertical-align: middle; + } } } diff --git a/pkg_product/views/season.vue b/pkg_product/views/season.vue new file mode 100644 index 0000000..f2a4162 --- /dev/null +++ b/pkg_product/views/season.vue @@ -0,0 +1,201 @@ + + + + + \ No newline at end of file diff --git a/pkg_product/views/seasonList.vue b/pkg_product/views/seasonList.vue new file mode 100644 index 0000000..338034c --- /dev/null +++ b/pkg_product/views/seasonList.vue @@ -0,0 +1,194 @@ + + + + + \ No newline at end of file diff --git a/pkg_product/views/seckill.vue b/pkg_product/views/seckill.vue index a9430cc..a016834 100644 --- a/pkg_product/views/seckill.vue +++ b/pkg_product/views/seckill.vue @@ -1,12 +1,9 @@