From 86f833dd0b68b37121717295d55f4d0d696cf718 Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Sat, 30 Oct 2021 22:48:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=B4=BB=E5=8A=A8=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=8F=92=E4=BB=B6+=E7=BB=86=E8=8A=82=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 2 +- pages.json | 16 +- pages/goods-category/goods-category.vue | 8 +- pages/index/index.vue | 138 ++++++--- pages/plugins/activity/detail/detail.css | 30 ++ pages/plugins/activity/detail/detail.vue | 173 ++++++++++++ pages/plugins/activity/index/index.css | 28 ++ pages/plugins/activity/index/index.vue | 263 ++++++++++++++++++ pages/plugins/seckill/index/index.vue | 6 +- pages/plugins/shop/index/index.vue | 9 +- .../signin/index-detail/index-detail.vue | 10 +- 11 files changed, 629 insertions(+), 54 deletions(-) create mode 100644 pages/plugins/activity/detail/detail.css create mode 100644 pages/plugins/activity/detail/detail.vue create mode 100644 pages/plugins/activity/index/index.css create mode 100644 pages/plugins/activity/index/index.vue diff --git a/App.vue b/App.vue index 021d11d5..a2223064 100644 --- a/App.vue +++ b/App.vue @@ -34,7 +34,7 @@ "/pages/user/user" ], // 请求地址 - request_url: 'https://dev.shopxo.vip/', + request_url: 'http://shopxo.com/', // 静态资源地址 static_url: 'https://d1.shopxo.vip/', // 基础信息 diff --git a/pages.json b/pages.json index 7cc4c28f..93efff2a 100644 --- a/pages.json +++ b/pages.json @@ -632,7 +632,21 @@ "enablePullDownRefresh": true, "navigationBarTitleText": "店铺收藏" } - } + }, + { + "path": "pages/plugins/activity/index/index", + "style": { + "enablePullDownRefresh": true, + "navigationBarTitleText": "所有活动" + } + }, + { + "path": "pages/plugins/activity/detail/detail", + "style": { + "enablePullDownRefresh": true, + "navigationBarTitleText": "活动详情" + } + } ], "subPackages": [], "globalStyle": { diff --git a/pages/goods-category/goods-category.vue b/pages/goods-category/goods-category.vue index d964d00f..70b090c7 100644 --- a/pages/goods-category/goods-category.vue +++ b/pages/goods-category/goods-category.vue @@ -13,7 +13,7 @@ - + {{v.name}} @@ -45,8 +45,7 @@ - + {{v.name}} @@ -61,12 +60,11 @@ {{floor.describe}} 更多 - - + {{vs.name}} diff --git a/pages/index/index.vue b/pages/index/index.vue index a7d307da..c8e0144d 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -31,7 +31,7 @@ {{common_shop_notice}} - + 限时秒杀 @@ -60,7 +60,40 @@ - + + + + + + + {{floor.title}} + {{floor.vice_title}} + 更多 + + + + + + {{kv}} + + + + + + + + + {{goods.title}} + {{currency_symbol}}{{goods.min_price}} + + + + + + + + + @@ -70,19 +103,17 @@ - + - {{floor.name}} - {{floor.describe}} + {{floor.name}} + {{floor.describe}} 更多 - + - - - {{icv.name}} - + + {{icv.name}} @@ -100,13 +131,42 @@ - - - - - + + + + + + + + {{floor.title}} + {{floor.vice_title}} + 更多 + + + + + + {{kv}} + + + + + + + + + {{goods.title}} + {{currency_symbol}}{{goods.min_price}} + + + + + + + + - + {{plugins_salerecords_data.base.home_bottom_title || '最新购买'}} @@ -142,14 +202,17 @@ - - - - - - - - + + + + + + + + + + + @@ -194,18 +257,20 @@ common_app_is_enable_search: 0, common_app_is_enable_answer: 0, common_app_is_header_nav_fixed: 0, - common_app_is_online_service: 0, + common_app_is_online_service: 0, + // 名称 + application_title: app.globalData.data.application_title, + // 顶部+搜索样式配置 + top_content_style: 'background-image: url("'+static_url+'nav-top.png");'+'padding-top:'+(parseInt(app.globalData.get_system_info('statusBarHeight'))+5)+'px;', + search_style: '', + search_is_fixed: 0, // 限时秒杀插件 plugins_seckill_is_valid: 0, plugins_seckill_data: null, // 购买记录插件 - plugins_salerecords_data: null, - // 顶部+搜索样式配置 - top_content_style: 'background-image: url("'+static_url+'nav-top.png");'+'padding-top:'+(parseInt(app.globalData.get_system_info('statusBarHeight'))+5)+'px;', - search_style: '', - search_is_fixed: 0, - // 名称 - application_title: app.globalData.data.application_title, + plugins_salerecords_data: null, + // 活动插件 + plugins_activity_data: null }; }, @@ -308,7 +373,8 @@ data_list_loding_status: data.data_list.length == 0 ? 0 : 3, plugins_seckill_data: data.plugins_seckill_data || null, plugins_seckill_is_valid: (data.plugins_seckill_data || null) != null && (data.plugins_seckill_data.is_valid || 0) == 1 ? 1 : 0, - plugins_salerecords_data: (data.plugins_salerecords_data || null) == null || data.plugins_salerecords_data.length <= 0 ? null : data.plugins_salerecords_data + plugins_salerecords_data: (data.plugins_salerecords_data || null) == null || data.plugins_salerecords_data.length <= 0 ? null : data.plugins_salerecords_data, + plugins_activity_data: (data.plugins_activity_data || null) == null || data.plugins_activity_data.length <= 0 ? null : data.plugins_activity_data }); // 导航购物车处理 @@ -320,7 +386,8 @@ } } else { this.setData({ - data_list_loding_status: 0, + data_list_loding_status: 0, + data_list_loding_msg: res.data.msg, data_bottom_line_status: true }); app.globalData.showToast(res.data.msg); @@ -329,7 +396,8 @@ fail: () => { uni.stopPullDownRefresh(); this.setData({ - data_list_loding_status: 2, + data_list_loding_status: 2, + data_list_loding_msg: '服务器请求出错', data_bottom_line_status: true, load_status: 1 }); diff --git a/pages/plugins/activity/detail/detail.css b/pages/plugins/activity/detail/detail.css new file mode 100644 index 00000000..31f2dd95 --- /dev/null +++ b/pages/plugins/activity/detail/detail.css @@ -0,0 +1,30 @@ +/** +* 基础 +*/ +.base-container { + padding: 50rpx 20rpx 50rpx 20rpx; +} +.base-container image { + width: 200rpx !important; + height: 200rpx !important; +} +.word-content .word-icon:not(:last-child) { + margin-right: 20rpx; +} + +/** +* 商品列表 +*/ +.data-list .item { + width: calc(50% - 50rpx); +} +.data-list .item:nth-child(2n) { + float: right; +} +.data-list .item:nth-child(2n+1) { + float: left; +} +.data-list .item image { + width: 100%; + height: 380rpx !important; +} \ No newline at end of file diff --git a/pages/plugins/activity/detail/detail.vue b/pages/plugins/activity/detail/detail.vue new file mode 100644 index 00000000..e13c1f17 --- /dev/null +++ b/pages/plugins/activity/detail/detail.vue @@ -0,0 +1,173 @@ + + + \ No newline at end of file diff --git a/pages/plugins/activity/index/index.css b/pages/plugins/activity/index/index.css new file mode 100644 index 00000000..be8bbe71 --- /dev/null +++ b/pages/plugins/activity/index/index.css @@ -0,0 +1,28 @@ +/** +* 分类导航 +*/ +.nav-list { + height: 80rpx; + line-height: 80rpx; +} + +/** +* 数据列表 +*/ +.scroll-box { + height: calc(100vh - 80rpx); +} +.data-list .item { + width: calc(50% - 10rpx); + margin-bottom: 20rpx; +} +.data-list .item:nth-child(2n) { + float: right; +} +.data-list .item:nth-child(2n+1) { + float: left; +} +.data-list .item image { + width: 100%; + height: 160rpx !important; +} \ No newline at end of file diff --git a/pages/plugins/activity/index/index.vue b/pages/plugins/activity/index/index.vue new file mode 100644 index 00000000..dfb293a8 --- /dev/null +++ b/pages/plugins/activity/index/index.vue @@ -0,0 +1,263 @@ + + + \ No newline at end of file diff --git a/pages/plugins/seckill/index/index.vue b/pages/plugins/seckill/index/index.vue index 4dd9c361..83659df2 100644 --- a/pages/plugins/seckill/index/index.vue +++ b/pages/plugins/seckill/index/index.vue @@ -39,6 +39,10 @@ + + + + @@ -135,7 +139,7 @@ is_valid: data.is_valid || 0, data_list_loding_msg: '', data_list_loding_status: 0, - data_bottom_line_status: true + data_bottom_line_status: ((data.goods || null) != null && data.goods.length > 0) }); } else { this.setData({ diff --git a/pages/plugins/shop/index/index.vue b/pages/plugins/shop/index/index.vue index f666940b..d3b2f508 100644 --- a/pages/plugins/shop/index/index.vue +++ b/pages/plugins/shop/index/index.vue @@ -21,8 +21,7 @@ {{item.describe}} 商品 {{item.goods_count}} - 销量 {{item.goods_sales_count}} - + 销量 {{item.goods_sales_count}} @@ -87,7 +86,7 @@ this.setData({ data_page: 1 }); - this.get_data(); + this.get_data_list(1); }, // 自定义分享 @@ -240,7 +239,7 @@ // 滚动加载 scroll_lower(e) { - this.get_data_list(); + this.get_data_list(1); }, // 导航事件 @@ -249,7 +248,7 @@ nav_active_value: e.currentTarget.dataset.value || 0, data_page: 1 }); - this.get_data_list(1); + this.get_data_list(11); } } }; diff --git a/pages/plugins/signin/index-detail/index-detail.vue b/pages/plugins/signin/index-detail/index-detail.vue index 104f3ff0..d0254096 100644 --- a/pages/plugins/signin/index-detail/index-detail.vue +++ b/pages/plugins/signin/index-detail/index-detail.vue @@ -166,7 +166,6 @@ methods: { // 获取数据 get_data() { - var self = this; uni.request({ url: app.globalData.get_request_url("detail", "index", "signin"), method: "POST", @@ -178,7 +177,7 @@ uni.stopPullDownRefresh(); if (res.data.code == 0) { var data = res.data.data; - self.setData({ + this.setData({ data_base: data.base || null, data: data.data || null, team_signin_data: data.team_signin_data || null, @@ -189,7 +188,7 @@ data_bottom_line_status: true }); } else { - self.setData({ + this.setData({ data_bottom_line_status: false, data_list_loding_status: 2, data_list_loding_msg: res.data.msg @@ -198,7 +197,7 @@ }, fail: () => { uni.stopPullDownRefresh(); - self.setData({ + this.setData({ data_bottom_line_status: false, data_list_loding_status: 2, data_list_loding_msg: '服务器请求出错' @@ -238,7 +237,6 @@ // 签到 coming_event(e) { if (this.is_already_coming != 1 && this.init()) { - var self = this; uni.showLoading({ title: "处理中..." }); @@ -259,7 +257,7 @@ }); this.get_data(); } else { - if (app.globalData.is_login_check(res.data, self, 'team_request')) { + if (app.globalData.is_login_check(res.data, this, 'team_request')) { app.globalData.showToast(res.data.msg); } }