From ec5c5db5ee4a6d10b058fa0ccef58072e19cd679 Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Tue, 15 Oct 2024 00:31:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=90=9C=E7=B4=A2=E5=BC=80?= =?UTF-8?q?=E5=A7=8B=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 11 +- common/css/page.css | 3 + components/cart/cart.vue | 114 ++++----- components/search/search.vue | 7 +- locale/en.json | 7 +- locale/zh.json | 7 +- pages.json | 12 + .../goods-search-start/goods-search-start.css | 10 + .../goods-search-start/goods-search-start.vue | 230 ++++++++++++++++++ pages/index/index.vue | 6 +- pages/plugins/blog/user-list/user-list.vue | 4 +- pages/plugins/coin/cash-list/cash-list.vue | 4 +- .../coin/recharge-list/recharge-list.vue | 4 +- 13 files changed, 342 insertions(+), 77 deletions(-) create mode 100644 pages/goods-search-start/goods-search-start.css create mode 100644 pages/goods-search-start/goods-search-start.vue diff --git a/App.vue b/App.vue index e71a163d..8ffd52d3 100644 --- a/App.vue +++ b/App.vue @@ -8,11 +8,11 @@ // 基础配置 // 数据接口请求地址 request_url: 'http://shopxo.com/', - // request_url:'https://new.shopxo.vip/', + // request_url:'https://new.shopxo.vip/', // 静态资源地址(如系统根目录不在public目录下面请在静态地址后面加public目录、如:https://d1.shopxo.vip/public/) static_url: 'http://shopxo.com/', - // static_url:'https://new.shopxo.vip/', + // static_url:'https://new.shopxo.vip/', // 系统类型(默认default、如额外独立小程序、可与程序分身插件实现不同主体小程序及支付独立) system_type: 'default', @@ -205,6 +205,9 @@ // apptabbar底部菜单角标数据 cache_tabbar_badge_key: 'cache_tabbar_badge_key', + // 搜索历史记录 + cache_search_history_key: 'cache_search_history_key', + // 默认用户头像 default_user_head_src: '/static/images/common/user.png', @@ -2877,14 +2880,14 @@ }, // 设置导航背景色和颜色 - set_navigation_bar_color(is_white = false) { + set_navigation_bar_color(is_white = null) { var color = '#000000'; var bg_color = '#ffffff'; var arr = [ 'pages/index/index', ]; var page = this.current_page(false); - if(is_white === true || (is_white === false && arr.indexOf(page) != -1)) { + if(is_white === true || (is_white === null && arr.indexOf(page) != -1)) { color = '#ffffff'; bg_color = '#000000'; } diff --git a/common/css/page.css b/common/css/page.css index 9e520873..98fb34d0 100644 --- a/common/css/page.css +++ b/common/css/page.css @@ -218,6 +218,9 @@ button:before { .dis-inline-block { display: inline-block !important; } +.dis-inline-grid { + display: inline-grid; +} .va-t { vertical-align: top; } diff --git a/components/cart/cart.vue b/components/cart/cart.vue index 5d649a26..8d7632b4 100644 --- a/components/cart/cart.vue +++ b/components/cart/cart.vue @@ -138,58 +138,58 @@ - - - - - - - - - - - - - - - {{ $t('common.del') }} - {{ $t('cart.cart.pxjwv8') }} - - - - {{ $t('buy.buy.wx78ju') }} - - {{ buy_currency_symbol }} - {{ total_price }} - - - - - - {{ $t('cart.cart.3kr74b') }}{{ buy_currency_symbol }}{{ preferential_price }} - - - - {{ $t('cart.cart.n76213') }}{{ buy_currency_symbol }}{{ increase_price }} - - - {{ $t('cart.cart.4tbj4s') }} - - - - - - - - - + + + + + + + + + + + + + + + {{ $t('common.del') }} + {{ $t('cart.cart.pxjwv8') }} + + + + {{ $t('buy.buy.wx78ju') }} + + {{ buy_currency_symbol }} + {{ total_price }} + + + + + + {{ $t('cart.cart.3kr74b') }}{{ buy_currency_symbol }}{{ preferential_price }} + + + + {{ $t('cart.cart.n76213') }}{{ buy_currency_symbol }}{{ increase_price }} + + + {{ $t('cart.cart.4tbj4s') }} + + + + + + + + + @@ -882,13 +882,13 @@ data_list_loding_status: temp_list.length == 0 ? 0 : this.data_list_loding_status, random_value: Math.random(), }); - app.globalData.showToast(type == 'delete' ? this.$t('user-list.user-list.kpn3fp') : this.$t('cart.cart.346c25'), 'success'); + app.globalData.showToast(type == 'delete' ? this.$t('common.del_success') : this.$t('cart.cart.346c25'), 'success'); // 选择处理 this.cart_selected_calculate(); } else { if (app.globalData.is_login_check(res.data)) { - app.globalData.showToast(type == 'delete' ? this.$t('user-list.user-list.649j60') : this.$t('cart.cart.21051p')); + app.globalData.showToast(type == 'delete' ? this.$t('common.del_fail') : this.$t('cart.cart.21051p')); } else { app.globalData.showToast(this.$t('common.sub_error_retry_tips')); } @@ -1408,9 +1408,9 @@ /** * 操作导航 - */ - .bottom-fixed-content { - height: 120rpx; + */ + .bottom-fixed-content { + height: 120rpx; } .cart-nav-base { width: calc(75% - 20rpx); diff --git a/components/search/search.vue b/components/search/search.vue index f69ff28b..8c28043d 100644 --- a/components/search/search.vue +++ b/components/search/search.vue @@ -168,7 +168,7 @@ }, // 搜索确认事件 - search_submit_confirm_event(e) { + search_submit_confirm_event() { // 是否验证必须要传值 if (this.propIsRequired && this.input_value === '') { app.globalData.showToast(this.$t('search.search.ic9b89')); @@ -182,6 +182,11 @@ // 进入搜索页面 app.globalData.url_open(this.propUrl + '?' + this.propFormName + '=' + this.input_value); } + }, + + // 搜索确认(外部调用直接跳转搜索) + search_submit_confirm(input_value = '') { + app.globalData.url_open(this.propUrl + '?' + this.propFormName + '=' + input_value); }, // icon事件 diff --git a/locale/en.json b/locale/en.json index 6e531845..ef86d665 100644 --- a/locale/en.json +++ b/locale/en.json @@ -15,6 +15,8 @@ "add": "Add", "del": "Delete", "del_record": "Delete record", + "del_success": "Delete successful", + "del_fail": "Delete failed", "edit": "Edit", "link": "Link", "gift": "Gift", @@ -77,6 +79,7 @@ "login": "Login", "paytips": "Secure payment", "goods-search": "Product search", + "goods-search-start": "Product search", "goods-detail": "Product details", "goods-comment": "Product evaluation", "user-address": "My address", @@ -765,9 +768,7 @@ }, "user-list": { "user-list": { - "yhvl2q": "Are you sure you want to delete this post?", - "kpn3fp": "Delete successful", - "649j60": "Delete failed" + "yhvl2q": "Are you sure you want to delete this post?" } }, "shop": { diff --git a/locale/zh.json b/locale/zh.json index 7ba71397..aa887736 100644 --- a/locale/zh.json +++ b/locale/zh.json @@ -15,6 +15,8 @@ "add": "新增", "del": "删除", "del_record": "删除记录", + "del_success": "删除成功", + "del_fail": "删除失败", "edit": "编辑", "link": "链接", "gift": "礼物", @@ -77,6 +79,7 @@ "login": "登录", "paytips": "安全支付", "goods-search": "商品搜索", + "goods-search-start": "商品搜索", "goods-detail": "商品详情", "goods-comment": "商品评价", "user-address": "我的地址", @@ -759,9 +762,7 @@ }, "user-list": { "user-list": { - "yhvl2q": "确定要删除这条帖子吗?", - "kpn3fp": "删除成功", - "649j60": "删除失败" + "yhvl2q": "确定要删除这条帖子吗?" } }, "shop": { diff --git a/pages.json b/pages.json index b5672453..4fe20027 100644 --- a/pages.json +++ b/pages.json @@ -154,6 +154,18 @@ } ] }, + { + "root": "pages/goods-search-start", + "pages": [ + { + "path": "goods-search-start", + "style": { + "enablePullDownRefresh": true, + "navigationBarTitleText": "" + } + } + ] + }, { "root": "pages/goods-comment", "pages": [ diff --git a/pages/goods-search-start/goods-search-start.css b/pages/goods-search-start/goods-search-start.css new file mode 100644 index 00000000..e2b6d6a3 --- /dev/null +++ b/pages/goods-search-start/goods-search-start.css @@ -0,0 +1,10 @@ +.ranking-list .ranking-item { + width: 65%; +} +.ranking-list .goods-list .goods-image { + width: 100rpx; + height: 100rpx; +} +.ranking-list .goods-list .goods-title { + width: calc(100% - 120rpx); +} \ No newline at end of file diff --git a/pages/goods-search-start/goods-search-start.vue b/pages/goods-search-start/goods-search-start.vue new file mode 100644 index 00000000..d1304d2b --- /dev/null +++ b/pages/goods-search-start/goods-search-start.vue @@ -0,0 +1,230 @@ + + + diff --git a/pages/index/index.vue b/pages/index/index.vue index 47ad868e..9c635a20 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -64,11 +64,11 @@ - + @onicon="search_icon_event" propIcon="icon-scan" :propIsIconOnEvent="true" - > + > diff --git a/pages/plugins/blog/user-list/user-list.vue b/pages/plugins/blog/user-list/user-list.vue index 9245ab1e..4b1346da 100644 --- a/pages/plugins/blog/user-list/user-list.vue +++ b/pages/plugins/blog/user-list/user-list.vue @@ -253,10 +253,10 @@ this.setData({ data: temp_list, }); - app.globalData.showToast(this.$t('user-list.user-list.kpn3fp'), 'success'); + app.globalData.showToast(this.$t('common.del_success'), 'success'); } else { if (app.globalData.is_login_check(res.data)) { - app.globalData.showToast(this.$t('user-list.user-list.649j60')); + app.globalData.showToast(this.$t('common.del_fail')); } else { app.globalData.showToast(this.$t('common.sub_error_retry_tips')); } diff --git a/pages/plugins/coin/cash-list/cash-list.vue b/pages/plugins/coin/cash-list/cash-list.vue index 86930df9..30f43f57 100644 --- a/pages/plugins/coin/cash-list/cash-list.vue +++ b/pages/plugins/coin/cash-list/cash-list.vue @@ -470,11 +470,11 @@ this.setData({ data_page: 1, }); - app.globalData.showToast(this.$t('user-list.user-list.kpn3fp'), 'success'); + app.globalData.showToast(this.$t('common.del_success'), 'success'); this.get_data_list(1); } else { if (app.globalData.is_login_check(res.data)) { - app.globalData.showToast(this.$t('user-list.user-list.649j60')); + app.globalData.showToast(this.$t('common.del_fail')); } else { app.globalData.showToast(this.$t('common.sub_error_retry_tips')); } diff --git a/pages/plugins/coin/recharge-list/recharge-list.vue b/pages/plugins/coin/recharge-list/recharge-list.vue index e7953f0f..e053f674 100644 --- a/pages/plugins/coin/recharge-list/recharge-list.vue +++ b/pages/plugins/coin/recharge-list/recharge-list.vue @@ -471,11 +471,11 @@ this.setData({ data_page: 1, }); - app.globalData.showToast(this.$t('user-list.user-list.kpn3fp'), 'success'); + app.globalData.showToast(this.$t('common.del_success'), 'success'); this.get_data_list(1); } else { if (app.globalData.is_login_check(res.data)) { - app.globalData.showToast(this.$t('user-list.user-list.649j60')); + app.globalData.showToast(this.$t('common.del_fail')); } else { app.globalData.showToast(this.$t('common.sub_error_retry_tips')); }