商品浏览页构建上传1.1.0版本

This commit is contained in:
2026-08-03 13:34:03 +08:00
parent e423ab2d73
commit a091664cee
77 changed files with 1882 additions and 22045 deletions
+19 -4
View File
@@ -21,7 +21,7 @@ smart-engraving-miniapp/
│ ├── app.tsx # 应用入口(全局 ThemeProvider 挂载) │ ├── app.tsx # 应用入口(全局 ThemeProvider 挂载)
│ ├── app.scss # 全局样式(CSS 变量 + 主题工具类) │ ├── app.scss # 全局样式(CSS 变量 + 主题工具类)
│ ├── app.config.ts # 应用配置(页面路由、tabBar、window │ ├── app.config.ts # 应用配置(页面路由、tabBar、window
│ ├── custom-tab-bar/ # 自定义底部导航(4 tab:首页/设计清单/订单/我的) │ ├── custom-tab-bar/ # 自定义底部导航(5 tab:首页/商品/设计清单/订单/我的)
│ ├── types/ │ ├── types/
│ │ └── index.ts # TypeScript 类型定义(ProductCategory、DesignItem、OrderItem 等) │ │ └── index.ts # TypeScript 类型定义(ProductCategory、DesignItem、OrderItem 等)
│ ├── utils/ │ ├── utils/
@@ -35,6 +35,7 @@ smart-engraving-miniapp/
│ │ └── LoginModal/ # 登录弹窗(历史组件) │ │ └── LoginModal/ # 登录弹窗(历史组件)
│ └── pages/ │ └── pages/
│ ├── index/ # 首页(品类入口、成品轮播、搜索) │ ├── index/ # 首页(品类入口、成品轮播、搜索)
│ ├── shop/ # 商品浏览页(2列网格 + 沉浸式详情 overlay
│ ├── product/ # 商品详情页(轮播图 + 加入设计清单弹窗) │ ├── product/ # 商品详情页(轮播图 + 加入设计清单弹窗)
│ ├── diy/ # DIY 工作台(贴纸拖拽、缩放、碰撞检测) │ ├── diy/ # DIY 工作台(贴纸拖拽、缩放、碰撞检测)
│ ├── checkout/ # 设计效果确认页(收货地址 + 下单) │ ├── checkout/ # 设计效果确认页(收货地址 + 下单)
@@ -48,7 +49,7 @@ smart-engraving-miniapp/
│ ├── settings/ # 设置(个人信息、账号管理、退出登录) │ ├── settings/ # 设置(个人信息、账号管理、退出登录)
│ ├── agreement/ # 使用协议 │ ├── agreement/ # 使用协议
│ └── userDatabase/ # 账号管理(密码保护:zhihui2024) │ └── userDatabase/ # 账号管理(密码保护:zhihui2024)
├── src/icon/ # 19 个 icon PNG28~56px,打包到 dist/icon ├── src/icon/ # 20 个 icon PNG28~56px,打包到 dist/icon
├── src/img/ # 8 张产品实物压缩图(打包到 dist/img) ├── src/img/ # 8 张产品实物压缩图(打包到 dist/img)
├── package.json ├── package.json
├── tsconfig.json ├── tsconfig.json
@@ -60,6 +61,7 @@ smart-engraving-miniapp/
| 页面 | 路径 | 功能 | | 页面 | 路径 | 功能 |
|---|---|---| |---|---|---|
| 首页 | `/pages/index/index` | 品类入口、成品轮播、搜索框、热门品类网格 | | 首页 | `/pages/index/index` | 品类入口、成品轮播、搜索框、热门品类网格 |
| 商品浏览 | `/pages/shop/index` | 2列商品网格 → 点击卡片进入沉浸式详情 overlay(滚动视差 + 主题色联动)→ 底部 CTA 跳转购买页 |
| 商品详情 | `/pages/product/index` | 轮播图、单价/工期/尺寸、加入设计清单弹窗 | | 商品详情 | `/pages/product/index` | 轮播图、单价/工期/尺寸、加入设计清单弹窗 |
| DIY 工作台 | `/pages/diy/index` | 选品类→上传图片/相机→拖拽缩放→碰撞检测→预览下单 | | DIY 工作台 | `/pages/diy/index` | 选品类→上传图片/相机→拖拽缩放→碰撞检测→预览下单 |
| 设计效果确认 | `/pages/checkout/index` | 展示设计效果、选择/修改收货地址、确认下单 | | 设计效果确认 | `/pages/checkout/index` | 展示设计效果、选择/修改收货地址、确认下单 |
@@ -140,7 +142,7 @@ pages/
### Icon 系统(emoji 已完全移除) ### Icon 系统(emoji 已完全移除)
- 19 个 icon 存放在 `src/icon/`,构建时通过 `config/index.js` copy 到 `dist/icon/` - 19 个 icon 存放在 `src/icon/`,构建时通过 `config/index.js` copy 到 `dist/icon/`。新增「商品」tab 图标后共 20 个 icon
- 产品 icon 映射:`src/utils/productConfig.ts` 中每个产品有 `iconImg` 字段 - 产品 icon 映射:`src/utils/productConfig.ts` 中每个产品有 `iconImg` 字段
- 旧数据兼容:列表渲染时检测 `productIcon` 是否以 `/icon/` 开头,否则通过 `PRODUCT_ICON_MAP` 查映射表 - 旧数据兼容:列表渲染时检测 `productIcon` 是否以 `/icon/` 开头,否则通过 `PRODUCT_ICON_MAP` 查映射表
@@ -191,7 +193,7 @@ npm run dev:h5
2. **format**PNG → JPG 2. **format**PNG → JPG
3. **quality**JPG 质量 60% 3. **quality**JPG 质量 60%
- 执行一次即可:`node compress-images.js` - 执行一次即可:`node compress-images.js`
- 当前编译后 `dist/` 总大小约 **1.02 MB**,满足微信限制。 - 当前编译后 `dist/` 总大小约 **1.03 MB**(新增 1 个 icon 约 7KB,满足微信限制。
### ⚠️ 注意:压缩 ≠ 长期方案 ### ⚠️ 注意:压缩 ≠ 长期方案
@@ -216,6 +218,19 @@ npm run dev:h5
--- ---
## 最近更新记录(2026-08-02
### Batch 11 — 商品浏览页(Shop Page)沉浸式体验构建
| 序号 | 修改内容 |
|------|----------|
| 1 | **新增「商品」tab**:底部导航 4 tab → 5 tab(首页/商品/设计清单/订单/我的),`app.config.ts` + `custom-tab-bar` 同步扩展,新增 `/icon/商品.png` |
| 2 | **构建 `pages/shop/index.tsx`**:单页双容器结构——列表 2 列网格 + 固定 overlay 沉浸式详情;点击卡片当前页内过渡,不走页面跳转 |
| 3 | **滚动驱动视差动画**:Hero 图上下边缘裁剪 → 整图上滑退出 → `transition-band` 吸顶显现 → 内容区延迟上浮淡入;`ScrollView` + `scrollEventThrottle={16}` |
| 4 | **产品主题色联动**:每个产品新增 `tone: [r,g,b]`(5 产品 5 色调),详情页背景、渐变遮罩、CTA 栏、吸顶条实时跟随变换 |
| 5 | **商品文案升级**:5 个产品全部补充 `subtitle`/`story`/`scene`/`tags`/`specs`/`originalPrice`,电商级长文案展示 |
| 6 | **CTA 衔接现有链路**:底部悬浮毛玻璃栏「立即定制」跳转到原有 `/pages/product/index?id=xxx`,购买流程零改动 |
## 最近更新记录(2026-08-01 ## 最近更新记录(2026-08-01
### Batch 10 — 夜间模式适配 + 地址弹窗统一 + 空状态主题化 ### Batch 10 — 夜间模式适配 + 地址弹窗统一 + 空状态主题化
+1 -314
View File
File diff suppressed because one or more lines are too long
Vendored
+2 -1082
View File
File diff suppressed because one or more lines are too long
+29
View File
@@ -0,0 +1,29 @@
/**
* @license React
* react-reconciler-constants.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* react-reconciler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
{"pages":["pages/index/index","pages/product/index","pages/diy/index","pages/checkout/index","pages/designList/index","pages/orders/index","pages/profile/index","pages/service/index","pages/wordcloud/index","pages/orderDetail/index","pages/address/index","pages/settings/index","pages/agreement/index","pages/userDatabase/index"],"window":{"backgroundTextStyle":"light","navigationStyle":"custom","backgroundColor":"#ffffff"},"tabBar":{"custom":true,"list":[{"pagePath":"pages/index/index","text":"首页"},{"pagePath":"pages/designList/index","text":"设计清单"},{"pagePath":"pages/orders/index","text":"订单"},{"pagePath":"pages/profile/index","text":"我的"}]}} {"pages":["pages/index/index","pages/shop/index","pages/product/index","pages/diy/index","pages/checkout/index","pages/designList/index","pages/orders/index","pages/profile/index","pages/service/index","pages/wordcloud/index","pages/orderDetail/index","pages/address/index","pages/settings/index","pages/agreement/index","pages/userDatabase/index"],"window":{"backgroundTextStyle":"light","navigationStyle":"custom","backgroundColor":"#ffffff"},"tabBar":{"custom":true,"list":[{"pagePath":"pages/index/index","text":"首页"},{"pagePath":"pages/shop/index","text":"商品"},{"pagePath":"pages/designList/index","text":"设计清单"},{"pagePath":"pages/orders/index","text":"订单"},{"pagePath":"pages/profile/index","text":"我的"}]}}
+1 -2
View File
@@ -1,2 +1 @@
@import "./app-origin.wxss"; @import "./app-origin.wxss";@import "./common.wxss";
@import "./common.wxss";
+1 -640
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
+1 -41
View File
@@ -1,41 +1 @@
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ .theme-toggle{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;backdrop-filter:blur(8rpx);-webkit-backdrop-filter:blur(8rpx);background:rgba(0,0,0,.35);border:1rpx solid hsla(0,0%,100%,.25);border-radius:50%;bottom:150rpx;-webkit-box-shadow:0 4rpx 16rpx rgba(0,0,0,.2);box-shadow:0 4rpx 16rpx rgba(0,0,0,.2);display:-webkit-flex;display:-ms-flexbox;display:flex;height:80rpx;-webkit-justify-content:center;justify-content:center;left:24rpx;position:fixed;-webkit-transition:all .3s ease;transition:all .3s ease;width:80rpx;z-index:900}.theme-toggle:active{background:rgba(0,0,0,.5);-webkit-transform:scale(.92);-ms-transform:scale(.92);transform:scale(.92)}.theme-icon{font-size:36rpx;line-height:1}
!*** css ./node_modules/@tarojs/webpack5-runner/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[4]!./src/components/ThemeToggle/index.scss ***!
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.theme-toggle {
position: fixed;
left: 24rpx;
bottom: 150rpx;
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: rgba(0, 0, 0, 0.35);
backdrop-filter: blur(8rpx);
-webkit-backdrop-filter: blur(8rpx);
border: 1rpx solid rgba(255, 255, 255, 0.25);
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
z-index: 900;
-webkit-box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.2);
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.2);
-webkit-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.theme-toggle:active {
-webkit-transform: scale(0.92);
-ms-transform: scale(0.92);
transform: scale(0.92);
background: rgba(0, 0, 0, 0.5);
}
.theme-icon {
font-size: 36rpx;
line-height: 1;
}
+1 -8
View File
@@ -1,8 +1 @@
"use strict"; "use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[862],{},function(n){var t=function(t){return n(n.s=t)};n.O(0,[907,96],function(){return t(5838)});n.O()}]);
(wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["comp"],{},
/******/ function(__webpack_require__) { // webpackRuntimeModules
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
/******/ __webpack_require__.O(0, ["taro","vendors"], function() { return __webpack_exec__("./node_modules/@tarojs/webpack5-runner/dist/template/comp.js"); });
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ }
]);
+1 -94
View File
@@ -1,94 +1 @@
"use strict"; "use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[777],{653:function(n,e,t){var a=t(7842),c=t(118),i=t(758),o=t.n(i),s=t(4848),p=[{pagePath:"/pages/index/index",text:"\u9996\u9875",icon:"/icon/\u9996\u9875.png"},{pagePath:"/pages/shop/index",text:"\u5546\u54c1",icon:"/icon/\u5546\u54c1.png"},{pagePath:"/pages/designList/index",text:"\u8bbe\u8ba1\u6e05\u5355",icon:"/icon/\u8c03\u8272\u76d8.png"},{pagePath:"/pages/orders/index",text:"\u8ba2\u5355",icon:"/icon/\u5305\u88f9.png"},{pagePath:"/pages/profile/index",text:"\u6211\u7684",icon:"/icon/\u4e2a\u4eba.png"}];function r(){var n,e="/".concat((null===(n=o().getCurrentInstance().router)||void 0===n?void 0:n.path)||"pages/index/index"),t=function(n){o().switchTab({url:n})};return(0,s.jsx)(c.Ss,{className:"custom-tab-bar",children:p.map(function(n){var a=e===n.pagePath;return(0,s.jsxs)(c.Ss,{className:"tab-item ".concat(a?"active":""),onTap:function(){return t(n.pagePath)},children:[(0,s.jsx)(c._V,{className:"tab-icon-img ".concat(a?"active":""),src:n.icon,mode:"aspectFit"}),(0,s.jsx)(c.EY,{className:"tab-label",children:n.text})]},n.pagePath)})})}Component((0,a.createComponentConfig)(r,"custom-tab-bar/index"))}},function(n){var e=function(e){return n(n.s=e)};n.O(0,[907,96],function(){return e(653)});n.O()}]);
(wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["custom-tab-bar/index"],{
/***/ "./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=custom-tab-bar/index!./src/custom-tab-bar/index.tsx":
/*!**********************************************************************************************************************!*\
!*** ./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=custom-tab-bar/index!./src/custom-tab-bar/index.tsx ***!
\**********************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ CustomTabBar; }
/* harmony export */ });
/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tarojs/taro */ "./node_modules/@tarojs/taro/index.js");
/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/cjs/react-jsx-runtime.production.min.js");
var TABS = [{
pagePath: '/pages/index/index',
text: '首页',
icon: '/icon/首页.png'
}, {
pagePath: '/pages/designList/index',
text: '设计清单',
icon: '/icon/调色盘.png'
}, {
pagePath: '/pages/orders/index',
text: '订单',
icon: '/icon/包裹.png'
}, {
pagePath: '/pages/profile/index',
text: '我的',
icon: '/icon/个人.png'
}];
function CustomTabBar() {
var _Taro$getCurrentInsta;
var currentPath = "/".concat(((_Taro$getCurrentInsta = _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().getCurrentInstance().router) === null || _Taro$getCurrentInsta === void 0 ? void 0 : _Taro$getCurrentInsta.path) || 'pages/index/index');
var switchTab = function switchTab(url) {
_tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().switchTab({
url: url
});
};
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_2__.View, {
className: "custom-tab-bar",
children: TABS.map(function (tab) {
var isActive = currentPath === tab.pagePath;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_2__.View, {
className: "tab-item ".concat(isActive ? 'active' : ''),
onTap: function onTap() {
return switchTab(tab.pagePath);
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_2__.Image, {
className: "tab-icon-img ".concat(isActive ? 'active' : ''),
src: tab.icon,
mode: "aspectFit"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_2__.Text, {
className: "tab-label",
children: tab.text
})]
}, tab.pagePath);
})
});
}
/***/ }),
/***/ "./src/custom-tab-bar/index.tsx":
/*!**************************************!*\
!*** ./src/custom-tab-bar/index.tsx ***!
\**************************************/
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
/* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tarojs/runtime */ "./node_modules/@tarojs/runtime/dist/runtime.esm.js");
/* harmony import */ var _node_modules_tarojs_taro_loader_lib_entry_cache_js_name_custom_tab_bar_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !!../../node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=custom-tab-bar/index!./index.tsx */ "./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=custom-tab-bar/index!./src/custom-tab-bar/index.tsx");
var inst = Component((0,_tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__.createComponentConfig)(_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_custom_tab_bar_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__["default"], 'custom-tab-bar/index'))
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_custom_tab_bar_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ })
},
/******/ function(__webpack_require__) { // webpackRuntimeModules
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
/******/ __webpack_require__.O(0, ["taro","vendors"], function() { return __webpack_exec__("./src/custom-tab-bar/index.tsx"); });
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ }
]);
//# sourceMappingURL=index.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"custom-tab-bar/index.js","mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjDA;AACA;AACA;AACA;AACA","sources":["webpack://smart-engraving-miniapp/./src/custom-tab-bar/index.tsx?65a5","webpack://smart-engraving-miniapp/._src_custom-tab-bar_index.tsx"],"sourcesContent":["import { View, Text, Image } from '@tarojs/components';\nimport Taro from '@tarojs/taro';\nimport './index.scss';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nvar TABS = [{\n pagePath: '/pages/index/index',\n text: '首页',\n icon: '/icon/首页.png'\n}, {\n pagePath: '/pages/designList/index',\n text: '设计清单',\n icon: '/icon/调色盘.png'\n}, {\n pagePath: '/pages/orders/index',\n text: '订单',\n icon: '/icon/包裹.png'\n}, {\n pagePath: '/pages/profile/index',\n text: '我的',\n icon: '/icon/个人.png'\n}];\nexport default function CustomTabBar() {\n var _Taro$getCurrentInsta;\n var currentPath = \"/\".concat(((_Taro$getCurrentInsta = Taro.getCurrentInstance().router) === null || _Taro$getCurrentInsta === void 0 ? void 0 : _Taro$getCurrentInsta.path) || 'pages/index/index');\n var switchTab = function switchTab(url) {\n Taro.switchTab({\n url: url\n });\n };\n return /*#__PURE__*/_jsx(View, {\n className: \"custom-tab-bar\",\n children: TABS.map(function (tab) {\n var isActive = currentPath === tab.pagePath;\n return /*#__PURE__*/_jsxs(View, {\n className: \"tab-item \".concat(isActive ? 'active' : ''),\n onTap: function onTap() {\n return switchTab(tab.pagePath);\n },\n children: [/*#__PURE__*/_jsx(Image, {\n className: \"tab-icon-img \".concat(isActive ? 'active' : ''),\n src: tab.icon,\n mode: \"aspectFit\"\n }), /*#__PURE__*/_jsx(Text, {\n className: \"tab-label\",\n children: tab.text\n })]\n }, tab.pagePath);\n })\n });\n}","import { createComponentConfig } from '@tarojs/runtime'\nimport component from \"!!../../node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=custom-tab-bar/index!./index.tsx\"\nvar inst = Component(createComponentConfig(component, 'custom-tab-bar/index'))\n\nexport default component\n"],"names":[],"sourceRoot":""}
+1 -71
View File
@@ -1,71 +1 @@
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ .custom-tab-bar{-ms-flex-pack:distribute;-ms-flex-align:center;-webkit-align-items:center;align-items:center;background:#fff;border-top:3rpx dashed #a0c4ff;bottom:0;display:-webkit-flex;display:-ms-flexbox;display:flex;height:120rpx;-webkit-justify-content:space-around;justify-content:space-around;left:0;padding-bottom:env(safe-area-inset-bottom);position:fixed;right:0;z-index:1000}.tab-item{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center;padding:10rpx 20rpx;position:relative}.tab-icon-img{height:28rpx;margin-bottom:4rpx;opacity:.6;-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s;width:28rpx}.tab-item.active .tab-icon-img{opacity:1;-webkit-transform:scale(1.15);-ms-transform:scale(1.15);transform:scale(1.15)}.tab-label{color:#b08d8d;font-size:20rpx;-webkit-transition:color .2s;transition:color .2s}.tab-item.active .tab-label{color:#ff9a9e;font-weight:600}
!*** css ./node_modules/@tarojs/webpack5-runner/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[4]!./src/custom-tab-bar/index.scss ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.custom-tab-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 120rpx;
background: #ffffff;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-justify-content: space-around;
-ms-flex-pack: distribute;
justify-content: space-around;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
border-top: 3rpx dashed #A0C4FF;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
z-index: 1000;
}
.tab-item {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
padding: 10rpx 20rpx;
position: relative;
}
.tab-icon-img {
width: 28rpx;
height: 28rpx;
margin-bottom: 4rpx;
-webkit-transition: -webkit-transform 0.2s;
transition: -webkit-transform 0.2s;
transition: transform 0.2s;
transition: transform 0.2s, -webkit-transform 0.2s;
opacity: 0.6;
}
.tab-item.active .tab-icon-img {
-webkit-transform: scale(1.15);
-ms-transform: scale(1.15);
transform: scale(1.15);
opacity: 1;
}
.tab-label {
font-size: 20rpx;
color: #b08d8d;
-webkit-transition: color 0.2s;
transition: color 0.2s;
}
.tab-item.active .tab-label {
color: #ff9a9e;
font-weight: 600;
}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

+1 -351
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -211
View File
@@ -1,211 +1 @@
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ .address-page{padding:0 24rpx 24rpx}.back-btn{font-size:40rpx;padding:10rpx}.address-list{margin-top:20rpx}.address-card{margin-bottom:20rpx;padding:24rpx}.address-header{margin-bottom:20rpx}.address-user{-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-bottom:12rpx}.address-name{color:var(--text-primary);font-size:32rpx;font-weight:700;margin-right:16rpx}.address-phone{color:var(--text-secondary);font-size:28rpx}.default-tag{background:var(--accent-pink);border-radius:8rpx;color:#fff;font-size:20rpx;margin-left:12rpx;padding:2rpx 10rpx}.address-full{color:var(--text-secondary);font-size:28rpx;line-height:1.5}.address-actions{-ms-flex-pack:end;border-top:1rpx dashed rgba(0,0,0,.06);display:-webkit-flex;display:-ms-flexbox;display:flex;gap:24rpx;-webkit-justify-content:flex-end;justify-content:flex-end;padding-top:16rpx}.address-act{color:var(--accent-blue);font-size:26rpx}.address-act.delete{color:#ff6b6b}.address-form{max-width:600rpx;padding:40rpx;width:100%}.form-input{background:var(--bg-input);border:3rpx dashed var(--line-star);border-radius:16rpx;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--text-primary);font-size:28rpx;height:80rpx;margin-bottom:20rpx;padding:0 24rpx;width:100%}.form-picker{-ms-flex-align:center;-webkit-align-items:center;align-items:center;background:var(--bg-input);border:3rpx dashed var(--line-star);border-radius:16rpx;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:80rpx;margin-bottom:20rpx;padding:0 24rpx;width:100%}.form-picker-val{color:var(--text-primary);font-size:28rpx}.form-picker-ph{color:var(--text-secondary);font-size:28rpx}.form-row{-ms-flex-align:center;-ms-flex-pack:justify;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;justify-content:space-between;margin-bottom:32rpx}.form-label{color:var(--text-primary);font-size:28rpx}.checkbox{border:3rpx dashed var(--line-star);border-radius:10rpx;height:44rpx;width:44rpx}.checkbox.checked{background:var(--accent-pink);border-color:var(--accent-pink)}.form-actions{display:-webkit-flex;display:-ms-flexbox;display:flex;gap:20rpx}.form-actions .btn-gradient,.form-actions .btn-outline{-webkit-flex:1;-ms-flex:1;flex:1;padding:20rpx 0;text-align:center}.empty-state{-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:120rpx 40rpx;text-align:center}.empty-icon-img{height:48rpx;margin-bottom:24rpx;width:48rpx}.empty-text{color:var(--text-primary);font-size:32rpx;font-weight:700;margin-bottom:12rpx}.empty-sub{color:var(--text-secondary);font-size:26rpx}
!*** css ./node_modules/@tarojs/webpack5-runner/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[4]!./src/pages/address/index.scss ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@charset "UTF-8";
.address-page {
padding: 0 24rpx 24rpx;
}
.back-btn {
font-size: 40rpx;
padding: 10rpx;
}
.address-list {
margin-top: 20rpx;
}
.address-card {
padding: 24rpx;
margin-bottom: 20rpx;
}
.address-header {
margin-bottom: 20rpx;
}
.address-user {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
margin-bottom: 12rpx;
}
.address-name {
font-size: 32rpx;
font-weight: 700;
color: var(--text-primary);
margin-right: 16rpx;
}
.address-phone {
font-size: 28rpx;
color: var(--text-secondary);
}
.default-tag {
margin-left: 12rpx;
background: var(--accent-pink);
color: #fff;
font-size: 20rpx;
padding: 2rpx 10rpx;
border-radius: 8rpx;
}
.address-full {
font-size: 28rpx;
color: var(--text-secondary);
line-height: 1.5;
}
.address-actions {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-justify-content: flex-end;
-ms-flex-pack: end;
justify-content: flex-end;
gap: 24rpx;
padding-top: 16rpx;
border-top: 1rpx dashed rgba(0, 0, 0, 0.06);
}
.address-act {
font-size: 26rpx;
color: var(--accent-blue);
}
.address-act.delete {
color: #ff6b6b;
}
/* 表单弹窗 */
.address-form {
width: 100%;
max-width: 600rpx;
padding: 40rpx;
}
.form-input {
width: 100%;
height: 80rpx;
background: var(--bg-input);
border: 3rpx dashed var(--line-star);
border-radius: 16rpx;
padding: 0 24rpx;
font-size: 28rpx;
color: var(--text-primary);
margin-bottom: 20rpx;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.form-picker {
width: 100%;
height: 80rpx;
background: var(--bg-input);
border: 3rpx dashed var(--line-star);
border-radius: 16rpx;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
padding: 0 24rpx;
margin-bottom: 20rpx;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.form-picker-val {
font-size: 28rpx;
color: var(--text-primary);
}
.form-picker-ph {
font-size: 28rpx;
color: var(--text-secondary);
}
.form-row {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
margin-bottom: 32rpx;
}
.form-label {
font-size: 28rpx;
color: var(--text-primary);
}
.checkbox {
width: 44rpx;
height: 44rpx;
border: 3rpx dashed var(--line-star);
border-radius: 10rpx;
}
.checkbox.checked {
background: var(--accent-pink);
border-color: var(--accent-pink);
}
.form-actions {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
gap: 20rpx;
}
.form-actions .btn-outline,
.form-actions .btn-gradient {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
padding: 20rpx 0;
text-align: center;
}
/* 空状态(主题适配) */
.empty-state {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
padding: 120rpx 40rpx;
text-align: center;
}
.empty-icon-img {
width: 48rpx;
height: 48rpx;
margin-bottom: 24rpx;
}
.empty-text {
font-size: 32rpx;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 12rpx;
}
.empty-sub {
font-size: 26rpx;
color: var(--text-secondary);
}
+1 -94
View File
@@ -1,94 +1 @@
"use strict"; "use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[301],{6855:function(e,n,t){var a=t(7842),s=t(118),c=t(1268),r=t(9703),i=t(4848);function l(){var e=(0,r.wR)(),n=e.theme,t=[{title:"\u4e00\u3001\u7528\u6237\u6743\u8d23",content:"\u7528\u6237\u786e\u8ba4\u63d0\u4ea4\u7684\u8bbe\u8ba1\u5185\u5bb9\u4e0d\u4fb5\u72af\u7b2c\u4e09\u65b9\u77e5\u8bc6\u4ea7\u6743\uff0c\u5b9a\u5236\u5546\u54c1\u4e00\u7ecf\u786e\u8ba4\u4e0b\u5355\u5373\u8fdb\u5165\u751f\u4ea7\u6d41\u7a0b\uff0c\u975e\u8d28\u91cf\u95ee\u9898\u4e0d\u652f\u6301\u9000\u6362\u3002"},{title:"\u4e8c\u3001\u9690\u79c1\u4fdd\u62a4",content:"\u6211\u4eec\u4e25\u683c\u4fdd\u62a4\u7528\u6237\u4e2a\u4eba\u4fe1\u606f\uff0c\u5934\u50cf\u4e0e\u6635\u79f0\u4ec5\u7528\u4e8e\u63d0\u5347\u670d\u52a1\u4f53\u9a8c\uff0c\u4e0d\u4e0e\u7b2c\u4e09\u65b9\u5206\u4eab\u3002"},{title:"\u4e09\u3001\u552e\u540e\u8bf4\u660e",content:"\u6536\u5230\u5546\u54c1\u540e\u5982\u6709\u8d28\u91cf\u95ee\u9898\uff0c\u8bf7\u57287\u5929\u5185\u8054\u7cfb\u5ba2\u670d\uff0c\u6211\u4eec\u5c06\u4e3a\u60a8\u514d\u8d39\u91cd\u505a\u6216\u9000\u6b3e\u3002"},{title:"\u56db\u3001\u5b9a\u5236\u6d41\u7a0b",content:"1. \u9009\u62e9\u5546\u54c1\u54c1\u7c7b\u5e76\u52a0\u5165\u8bbe\u8ba1\u6e05\u5355\n2. \u5728DIY\u5de5\u4f5c\u53f0\u4e0a\u4f20\u56fe\u7247\u6216\u8f93\u5165\u6587\u5b57\n3. \u786e\u8ba4\u8bbe\u8ba1\u6548\u679c\u5e76\u63d0\u4ea4\u8ba2\u5355\n4. \u652f\u4ed8\u540e\u8fdb\u5165\u751f\u4ea7\uff0c\u7ea63-7\u4e2a\u5de5\u4f5c\u65e5\u53d1\u8d27\n5. \u7269\u6d41\u8ddf\u8e2a\u81f3\u786e\u8ba4\u6536\u8d27"}];return(0,i.jsx)(s.Ss,{className:"theme-".concat(n),children:(0,i.jsxs)(s.Ss,{className:"agreement-page",children:[(0,i.jsx)(c.A,{}),(0,i.jsxs)(s.Ss,{className:"agreement-content",children:[(0,i.jsx)(s.EY,{className:"agreement-title",children:"\u5b9a\u5236\u534f\u8bae"}),t.map(function(e,n){return(0,i.jsxs)(s.Ss,{className:"agreement-section",children:[(0,i.jsx)(s.EY,{className:"agreement-h3",children:e.title}),(0,i.jsx)(s.EY,{className:"agreement-p",children:e.content})]},n)})]})]})})}var o={navigationBarTitleText:"\u5b9a\u5236\u534f\u8bae"};Page((0,a.createPageConfig)(l,"pages/agreement/index",{root:{cn:[]}},o||{}))}},function(e){var n=function(n){return e(e.s=n)};e.O(0,[907,96,76],function(){return n(6855)});e.O()}]);
(wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["pages/agreement/index"],{
/***/ "./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/agreement/index!./src/pages/agreement/index.tsx":
/*!************************************************************************************************************************!*\
!*** ./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/agreement/index!./src/pages/agreement/index.tsx ***!
\************************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ AgreementPage; }
/* harmony export */ });
/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
/* harmony import */ var _components_ThemeToggle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../components/ThemeToggle */ "./src/components/ThemeToggle/index.tsx");
/* harmony import */ var _context_ThemeContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../context/ThemeContext */ "./src/context/ThemeContext.tsx");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/cjs/react-jsx-runtime.production.min.js");
function AgreementPage() {
var _useThemeContext = (0,_context_ThemeContext__WEBPACK_IMPORTED_MODULE_1__.useThemeContext)(),
theme = _useThemeContext.theme;
var SECTIONS = [{
title: '一、用户权责',
content: '用户确认提交的设计内容不侵犯第三方知识产权,定制商品一经确认下单即进入生产流程,非质量问题不支持退换。'
}, {
title: '二、隐私保护',
content: '我们严格保护用户个人信息,头像与昵称仅用于提升服务体验,不与第三方分享。'
}, {
title: '三、售后说明',
content: '收到商品后如有质量问题,请在7天内联系客服,我们将为您免费重做或退款。'
}, {
title: '四、定制流程',
content: "1. \u9009\u62E9\u5546\u54C1\u54C1\u7C7B\u5E76\u52A0\u5165\u8BBE\u8BA1\u6E05\u5355\n2. \u5728DIY\u5DE5\u4F5C\u53F0\u4E0A\u4F20\u56FE\u7247\u6216\u8F93\u5165\u6587\u5B57\n3. \u786E\u8BA4\u8BBE\u8BA1\u6548\u679C\u5E76\u63D0\u4EA4\u8BA2\u5355\n4. \u652F\u4ED8\u540E\u8FDB\u5165\u751F\u4EA7\uFF0C\u7EA63-7\u4E2A\u5DE5\u4F5C\u65E5\u53D1\u8D27\n5. \u7269\u6D41\u8DDF\u8E2A\u81F3\u786E\u8BA4\u6536\u8D27"
}];
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.View, {
className: "theme-".concat(theme),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.View, {
className: "agreement-page",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_components_ThemeToggle__WEBPACK_IMPORTED_MODULE_0__["default"], {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.View, {
className: "agreement-content",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.Text, {
className: "agreement-title",
children: "\u5B9A\u5236\u534F\u8BAE"
}), SECTIONS.map(function (sec, idx) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.View, {
className: "agreement-section",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.Text, {
className: "agreement-h3",
children: sec.title
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.Text, {
className: "agreement-p",
children: sec.content
})]
}, idx);
})]
})]
})
});
}
/***/ }),
/***/ "./src/pages/agreement/index.tsx":
/*!***************************************!*\
!*** ./src/pages/agreement/index.tsx ***!
\***************************************/
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
/* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tarojs/runtime */ "./node_modules/@tarojs/runtime/dist/runtime.esm.js");
/* harmony import */ var _node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_agreement_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !!../../../node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/agreement/index!./index.tsx */ "./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/agreement/index!./src/pages/agreement/index.tsx");
var config = {"navigationBarTitleText":"定制协议"};
var inst = Page((0,_tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__.createPageConfig)(_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_agreement_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__["default"], 'pages/agreement/index', {root:{cn:[]}}, config || {}))
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_agreement_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ })
},
/******/ function(__webpack_require__) { // webpackRuntimeModules
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
/******/ __webpack_require__.O(0, ["taro","vendors","common"], function() { return __webpack_exec__("./src/pages/agreement/index.tsx"); });
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ }
]);
//# sourceMappingURL=index.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"pages/agreement/index.js","mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://smart-engraving-miniapp/./src/pages/agreement/index.tsx?6fa1","webpack://smart-engraving-miniapp/._src_pages_agreement_index.tsx"],"sourcesContent":["import { View, Text } from '@tarojs/components';\nimport './index.scss';\nimport ThemeToggle from '../../components/ThemeToggle';\nimport { useThemeContext } from '../../context/ThemeContext';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport default function AgreementPage() {\n var _useThemeContext = useThemeContext(),\n theme = _useThemeContext.theme;\n var SECTIONS = [{\n title: '一、用户权责',\n content: '用户确认提交的设计内容不侵犯第三方知识产权,定制商品一经确认下单即进入生产流程,非质量问题不支持退换。'\n }, {\n title: '二、隐私保护',\n content: '我们严格保护用户个人信息,头像与昵称仅用于提升服务体验,不与第三方分享。'\n }, {\n title: '三、售后说明',\n content: '收到商品后如有质量问题,请在7天内联系客服,我们将为您免费重做或退款。'\n }, {\n title: '四、定制流程',\n content: \"1. \\u9009\\u62E9\\u5546\\u54C1\\u54C1\\u7C7B\\u5E76\\u52A0\\u5165\\u8BBE\\u8BA1\\u6E05\\u5355\\n2. \\u5728DIY\\u5DE5\\u4F5C\\u53F0\\u4E0A\\u4F20\\u56FE\\u7247\\u6216\\u8F93\\u5165\\u6587\\u5B57\\n3. \\u786E\\u8BA4\\u8BBE\\u8BA1\\u6548\\u679C\\u5E76\\u63D0\\u4EA4\\u8BA2\\u5355\\n4. \\u652F\\u4ED8\\u540E\\u8FDB\\u5165\\u751F\\u4EA7\\uFF0C\\u7EA63-7\\u4E2A\\u5DE5\\u4F5C\\u65E5\\u53D1\\u8D27\\n5. \\u7269\\u6D41\\u8DDF\\u8E2A\\u81F3\\u786E\\u8BA4\\u6536\\u8D27\"\n }];\n return /*#__PURE__*/_jsx(View, {\n className: \"theme-\".concat(theme),\n children: /*#__PURE__*/_jsxs(View, {\n className: \"agreement-page\",\n children: [/*#__PURE__*/_jsx(ThemeToggle, {}), /*#__PURE__*/_jsxs(View, {\n className: \"agreement-content\",\n children: [/*#__PURE__*/_jsx(Text, {\n className: \"agreement-title\",\n children: \"\\u5B9A\\u5236\\u534F\\u8BAE\"\n }), SECTIONS.map(function (sec, idx) {\n return /*#__PURE__*/_jsxs(View, {\n className: \"agreement-section\",\n children: [/*#__PURE__*/_jsx(Text, {\n className: \"agreement-h3\",\n children: sec.title\n }), /*#__PURE__*/_jsx(Text, {\n className: \"agreement-p\",\n children: sec.content\n })]\n }, idx);\n })]\n })]\n })\n });\n}","import { createPageConfig } from '@tarojs/runtime'\nimport component from \"!!../../../node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/agreement/index!./index.tsx\"\nvar config = {\"navigationBarTitleText\":\"定制协议\"};\n\n\nvar inst = Page(createPageConfig(component, 'pages/agreement/index', {root:{cn:[]}}, config || {}))\n\n\nexport default component\n"],"names":[],"sourceRoot":""}
+1 -39
View File
@@ -1,39 +1 @@
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ .agreement-page{padding:0 24rpx 24rpx}.agreement-title{color:var(--text-primary);display:block;font-size:40rpx;font-weight:800;margin-bottom:32rpx;padding-top:24rpx}.agreement-content{line-height:1.8;padding:40rpx 32rpx}.agreement-section{margin-bottom:32rpx}.agreement-h3{color:var(--text-primary);display:block;font-size:32rpx;font-weight:700;margin-bottom:16rpx}.agreement-p{color:var(--text-secondary);display:block;font-size:28rpx;line-height:1.8}
!*** css ./node_modules/@tarojs/webpack5-runner/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[4]!./src/pages/agreement/index.scss ***!
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.agreement-page {
padding: 0 24rpx 24rpx;
}
.agreement-title {
font-size: 40rpx;
font-weight: 800;
color: var(--text-primary);
display: block;
margin-bottom: 32rpx;
padding-top: 24rpx;
}
.agreement-content {
padding: 40rpx 32rpx;
line-height: 1.8;
}
.agreement-section {
margin-bottom: 32rpx;
}
.agreement-h3 {
font-size: 32rpx;
font-weight: 700;
color: var(--text-primary);
display: block;
margin-bottom: 16rpx;
}
.agreement-p {
font-size: 28rpx;
color: var(--text-secondary);
line-height: 1.8;
display: block;
}
+1 -389
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -279
View File
@@ -1,279 +1 @@
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ .checkout-page{padding:0 24rpx 24rpx}.back-btn{font-size:40rpx;padding:10rpx}.checkout-canvas{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:center;justify-content:center;padding:40rpx}.canvas-area{background:rgba(0,0,0,.03);border:2rpx dashed var(--line-star);overflow:hidden;position:relative}.checkout-image{height:100%;left:0;position:absolute;top:0;width:100%}.checkout-info{padding:24rpx}.info-row{-ms-flex-align:center;-ms-flex-pack:justify;-webkit-align-items:center;align-items:center;border-bottom:1rpx dashed rgba(0,0,0,.06);display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;justify-content:space-between;padding:20rpx 0}.info-row:last-child{border-bottom:none}.info-label{color:var(--text-secondary);font-size:28rpx}.info-value{color:var(--text-primary);font-size:28rpx;font-weight:500}.total-row{margin-top:8rpx;padding-top:24rpx}.info-total{color:var(--accent-pink);font-size:40rpx;font-weight:800}.checkout-address-card{padding:24rpx}.checkout-address-header{-ms-flex-align:center;-ms-flex-pack:justify;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;justify-content:space-between;margin-bottom:16rpx}.address-change{background:rgba(91,140,255,.08);border-radius:8rpx;padding:6rpx 16rpx}.change-text{color:var(--accent-blue);font-size:24rpx}.checkout-address-body{padding-top:8rpx}.addr-row{-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:16rpx;margin-bottom:8rpx}.addr-name{color:var(--text-primary);font-size:28rpx;font-weight:700}.addr-phone{color:var(--text-secondary);font-size:26rpx}.addr-detail{color:var(--text-secondary);font-size:26rpx;line-height:1.5}.checkout-address-empty{padding:32rpx 0;text-align:center}.empty-text{color:var(--text-secondary);font-size:26rpx}.addr-picker-header{-ms-flex-align:center;-ms-flex-pack:justify;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;justify-content:space-between;margin-bottom:20rpx}.addr-picker-title{color:var(--text-primary);font-size:32rpx;font-weight:700}.addr-picker-close{color:var(--text-secondary);font-size:28rpx;padding:8rpx}.addr-picker-list{-webkit-flex:1;-ms-flex:1;flex:1;overflow-y:auto}.addr-picker-item{border-bottom:1rpx dashed rgba(0,0,0,.05);padding:20rpx 16rpx}.addr-picker-item.active{background:rgba(91,140,255,.06);border-radius:12rpx}.addr-picker-row{-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:16rpx;margin-bottom:8rpx}.addr-picker-name{color:var(--text-primary);font-size:28rpx;font-weight:700}.addr-picker-phone{color:var(--text-secondary);font-size:26rpx}.addr-picker-default{border:1rpx solid var(--accent-pink);border-radius:6rpx;color:var(--accent-pink);font-size:22rpx;padding:2rpx 8rpx}.addr-picker-detail{color:var(--text-secondary);font-size:26rpx}.addr-picker-empty{color:var(--text-secondary);font-size:28rpx;padding:40rpx;text-align:center}.addr-picker-add{border:2rpx dashed var(--accent-blue);border-radius:12rpx;margin-top:16rpx;padding:20rpx;text-align:center}.addr-picker-add-text{color:var(--accent-blue);font-size:28rpx}.checkout-actions{background:var(--bg-card);border-top:var(--line-card);bottom:0;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:24rpx;left:0;padding:20rpx 32rpx calc(20rpx + env(safe-area-inset-bottom));position:fixed;right:0;z-index:500}.checkout-actions .btn-gradient,.checkout-actions .btn-outline{-webkit-flex:1;-ms-flex:1;flex:1;text-align:center}
!*** css ./node_modules/@tarojs/webpack5-runner/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[4]!./src/pages/checkout/index.scss ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@charset "UTF-8";
.checkout-page {
padding: 0 24rpx 24rpx;
}
.back-btn {
font-size: 40rpx;
padding: 10rpx;
}
/* 画布展示区 */
.checkout-canvas {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
padding: 40rpx;
}
.canvas-area {
position: relative;
overflow: hidden;
background: rgba(0, 0, 0, 0.03);
border: 2rpx dashed var(--line-star);
}
.checkout-image {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
/* 商品信息 */
.checkout-info {
padding: 24rpx;
}
.info-row {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
padding: 20rpx 0;
border-bottom: 1rpx dashed rgba(0, 0, 0, 0.06);
}
.info-row:last-child {
border-bottom: none;
}
.info-label {
font-size: 28rpx;
color: var(--text-secondary);
}
.info-value {
font-size: 28rpx;
color: var(--text-primary);
font-weight: 500;
}
.total-row {
padding-top: 24rpx;
margin-top: 8rpx;
}
.info-total {
font-size: 40rpx;
font-weight: 800;
color: var(--accent-pink);
}
/* 地址卡片 */
.checkout-address-card {
padding: 24rpx;
}
.checkout-address-header {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
margin-bottom: 16rpx;
}
.address-change {
padding: 6rpx 16rpx;
border-radius: 8rpx;
background: rgba(91, 140, 255, 0.08);
}
.change-text {
font-size: 24rpx;
color: var(--accent-blue);
}
.checkout-address-body {
padding-top: 8rpx;
}
.addr-row {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
gap: 16rpx;
margin-bottom: 8rpx;
}
.addr-name {
font-size: 28rpx;
font-weight: 700;
color: var(--text-primary);
}
.addr-phone {
font-size: 26rpx;
color: var(--text-secondary);
}
.addr-detail {
font-size: 26rpx;
color: var(--text-secondary);
line-height: 1.5;
}
.checkout-address-empty {
padding: 32rpx 0;
text-align: center;
}
.empty-text {
font-size: 26rpx;
color: var(--text-secondary);
}
/* 底部弹窗 — 地址选择(样式复用 app.scss 全局定义,移除非必要覆写) */
.addr-picker-header {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
margin-bottom: 20rpx;
}
.addr-picker-title {
font-size: 32rpx;
font-weight: 700;
color: var(--text-primary);
}
.addr-picker-close {
font-size: 28rpx;
color: var(--text-secondary);
padding: 8rpx;
}
.addr-picker-list {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
overflow-y: auto;
}
.addr-picker-item {
padding: 20rpx 16rpx;
border-bottom: 1rpx dashed rgba(0, 0, 0, 0.05);
}
.addr-picker-item.active {
background: rgba(91, 140, 255, 0.06);
border-radius: 12rpx;
}
.addr-picker-row {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
gap: 16rpx;
margin-bottom: 8rpx;
}
.addr-picker-name {
font-size: 28rpx;
font-weight: 700;
color: var(--text-primary);
}
.addr-picker-phone {
font-size: 26rpx;
color: var(--text-secondary);
}
.addr-picker-default {
font-size: 22rpx;
color: var(--accent-pink);
border: 1rpx solid var(--accent-pink);
padding: 2rpx 8rpx;
border-radius: 6rpx;
}
.addr-picker-detail {
font-size: 26rpx;
color: var(--text-secondary);
}
.addr-picker-empty {
padding: 40rpx;
text-align: center;
color: var(--text-secondary);
font-size: 28rpx;
}
.addr-picker-add {
margin-top: 16rpx;
padding: 20rpx;
text-align: center;
border: 2rpx dashed var(--accent-blue);
border-radius: 12rpx;
}
.addr-picker-add-text {
font-size: 28rpx;
color: var(--accent-blue);
}
/* 底部操作 */
.checkout-actions {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: var(--bg-card);
border-top: var(--line-card);
padding: 20rpx 32rpx calc(20rpx + env(safe-area-inset-bottom));
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
gap: 24rpx;
z-index: 500;
}
.checkout-actions .btn-outline,
.checkout-actions .btn-gradient {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
text-align: center;
}
+1 -277
View File
@@ -1,277 +1 @@
"use strict"; "use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[319],{3512:function(e,s,n){var a=n(7842),t=n(5544),c=n(118),i=n(758),l=n.n(i),d=n(6540),r=n(8594),o=n(5234),u=n(1268),g=n(9703),m=n(7723),x=n(4848),h=[{code:"all",label:"\u5168\u90e8"},{code:"toDesign",label:"\u5f85\u8bbe\u8ba1"},{code:"undesigned",label:"\u672a\u8bbe\u8ba1"},{code:"designing",label:"\u8bbe\u8ba1\u4e2d"},{code:"ordered",label:"\u5df2\u4e0b\u5355"}],b={undesigned:{label:"\u672a\u8bbe\u8ba1",cls:"badge-pink"},designing:{label:"\u8bbe\u8ba1\u4e2d",cls:"badge-blue"},ordered:{label:"\u5df2\u4e0b\u5355",cls:"badge-green"}};function j(){var e=(0,g.wR)(),s=e.theme,n=(0,d.useState)("all"),a=(0,t.A)(n,2),i=a[0],j=a[1],p=(0,d.useState)([]),N=(0,t.A)(p,2),f=N[0],S=N[1],v=(0,d.useCallback)(function(){S((0,r.p_)())},[]),E=(0,d.useCallback)(function(){var e=l().getStorageSync("designList:filter");e&&h.some(function(s){return s.code===e})&&(j(e),l().removeStorageSync("designList:filter")),v()},[v]);(0,d.useEffect)(function(){var e=l().getCurrentInstance().page;if(e){var s=e.onShow;e.onShow=function(){E(),s&&s.apply(this)}}E()},[E]);var Y="all"===i?f:"toDesign"===i?f.filter(function(e){return"undesigned"===e.status||"designing"===e.status}):f.filter(function(e){return e.status===i}),w=function(e){"ordered"!==e.status?l().navigateTo({url:"/pages/diy/index?source=designList&designId=".concat(e.id)}):l().showToast({title:"\u8be5\u5546\u54c1\u5df2\u4e0b\u5355\uff0c\u8bf7\u67e5\u770b\u8ba2\u5355",icon:"none"})};return(0,x.jsx)(c.Ss,{className:"theme-".concat(s),children:(0,x.jsx)(m.A,{children:(0,x.jsxs)(c.Ss,{className:"design-page",children:[(0,x.jsx)(u.A,{}),(0,x.jsxs)(c.Ss,{className:"page-header dashed-card mt-20",children:[(0,x.jsx)(c.Ss,{className:"star-badge"}),(0,x.jsx)(c.EY,{className:"page-title",children:"\u6211\u7684\u8bbe\u8ba1\u6e05\u5355"})]}),(0,x.jsx)(c.Ss,{className:"status-tabs",children:(0,x.jsx)(c.BM,{className:"tabs-scroll",scrollX:!0,children:h.map(function(e){return(0,x.jsxs)(c.Ss,{className:"tab-item ".concat(i===e.code?"active":""),onTap:function(){return j(e.code)},children:[(0,x.jsx)(c.EY,{className:"tab-label",children:e.label}),i===e.code&&(0,x.jsx)(c.Ss,{className:"tab-underline"})]},e.code)})})}),(0,x.jsxs)(c.BM,{className:"design-list",scrollY:!0,children:[Y.map(function(e){var s,n=b[e.status],a=null!==(s=e.productIcon)&&void 0!==s&&s.startsWith("/icon/")?e.productIcon:o.rj[e.productId]||"/icon/\u56db\u89d2\u661f.png";return(0,x.jsxs)(c.Ss,{className:"design-card dashed-card",children:[(0,x.jsx)(c.Ss,{className:"star-badge"}),(0,x.jsxs)(c.Ss,{className:"design-body",children:[(0,x.jsx)(c._V,{className:"design-icon-img",src:a,mode:"aspectFit"}),(0,x.jsxs)(c.Ss,{className:"design-info",children:[(0,x.jsxs)(c.Ss,{className:"design-title-row",children:[(0,x.jsx)(c.EY,{className:"design-name",children:e.productName}),(0,x.jsx)(c.EY,{className:"badge ".concat(n.cls),children:n.label})]}),(0,x.jsxs)(c.EY,{className:"design-meta",children:["\u6570\u91cf: ",e.count," \u4ef6 | \u5355\u4ef7: \xa5",e.unitPrice]}),(0,x.jsxs)(c.EY,{className:"design-total",children:["\u5c0f\u8ba1: \xa5",(e.unitPrice*e.count).toFixed(2)]})]})]}),(0,x.jsxs)(c.Ss,{className:"design-actions",children:["ordered"!==e.status&&(0,x.jsx)(c.Ss,{className:"btn-gradient design-btn",onTap:function(){return w(e)},children:(0,x.jsx)(c.EY,{children:"undesigned"===e.status?"\u5f00\u59cb\u8bbe\u8ba1":"\u7ee7\u7eed\u8bbe\u8ba1"})}),"ordered"===e.status&&(0,x.jsx)(c.Ss,{className:"btn-outline design-btn",onTap:function(){return l().switchTab({url:"/pages/orders/index"})},children:(0,x.jsx)(c.EY,{children:"\u67e5\u770b\u8ba2\u5355"})})]})]},e.id)}),0===Y.length&&(0,x.jsxs)(c.Ss,{className:"empty-state",children:[(0,x.jsx)(c._V,{className:"empty-icon-img",src:"/icon/\u8c03\u8272\u76d8.png",mode:"aspectFit"}),(0,x.jsx)(c.EY,{className:"empty-text",children:"\u8fd8\u6ca1\u6709\u8bbe\u8ba1\u6e05\u5355"}),(0,x.jsx)(c.EY,{className:"empty-sub",children:"\u53bb\u9996\u9875\u901b\u901b\uff0c\u627e\u5230\u559c\u6b22\u7684\u5b9a\u5236\u54c1"}),(0,x.jsx)(c.Ss,{className:"btn-gradient",onTap:function(){return l().switchTab({url:"/pages/index/index"})},children:(0,x.jsx)(c.EY,{children:"\u53bb\u901b\u901b"})})]})]}),(0,x.jsx)(c.Ss,{style:{height:"40px"}})]})})})}var p={};Page((0,a.createPageConfig)(j,"pages/designList/index",{root:{cn:[]}},p||{}))}},function(e){var s=function(s){return e(e.s=s)};e.O(0,[907,96,76],function(){return s(3512)});e.O()}]);
(wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["pages/designList/index"],{
/***/ "./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/designList/index!./src/pages/designList/index.tsx":
/*!**************************************************************************************************************************!*\
!*** ./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/designList/index!./src/pages/designList/index.tsx ***!
\**************************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ DesignListPage; }
/* harmony export */ });
/* harmony import */ var F_weixin_wordc_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tarojs/taro */ "./node_modules/@tarojs/taro/index.js");
/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "./node_modules/react/cjs/react.production.min.js");
/* harmony import */ var _utils_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/store */ "./src/utils/store.ts");
/* harmony import */ var _utils_productConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/productConfig */ "./src/utils/productConfig.ts");
/* harmony import */ var _components_ThemeToggle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../components/ThemeToggle */ "./src/components/ThemeToggle/index.tsx");
/* harmony import */ var _context_ThemeContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../context/ThemeContext */ "./src/context/ThemeContext.tsx");
/* harmony import */ var _components_LoginGuard__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/LoginGuard */ "./src/components/LoginGuard/index.tsx");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/cjs/react-jsx-runtime.production.min.js");
var STATUS_TABS = [{
code: 'all',
label: '全部'
}, {
code: 'toDesign',
label: '待设计'
}, {
code: 'undesigned',
label: '未设计'
}, {
code: 'designing',
label: '设计中'
}, {
code: 'ordered',
label: '已下单'
}];
var STATUS_STYLE = {
undesigned: {
label: '未设计',
cls: 'badge-pink'
},
designing: {
label: '设计中',
cls: 'badge-blue'
},
ordered: {
label: '已下单',
cls: 'badge-green'
}
};
function DesignListPage() {
var _useThemeContext = (0,_context_ThemeContext__WEBPACK_IMPORTED_MODULE_5__.useThemeContext)(),
theme = _useThemeContext.theme;
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)('all'),
_useState2 = (0,F_weixin_wordc_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_useState, 2),
activeTab = _useState2[0],
setActiveTab = _useState2[1];
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]),
_useState4 = (0,F_weixin_wordc_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_useState3, 2),
list = _useState4[0],
setList = _useState4[1];
var load = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
setList((0,_utils_store__WEBPACK_IMPORTED_MODULE_2__.getDesignList)());
}, []);
// 自动读取外部传入的筛选状态
var init = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
var filter = _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().getStorageSync('designList:filter');
if (filter && STATUS_TABS.some(function (t) {
return t.code === filter;
})) {
setActiveTab(filter);
_tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().removeStorageSync('designList:filter');
}
load();
}, [load]);
// 页面每次显示时刷新
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
var page = _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().getCurrentInstance().page;
if (page) {
var orig = page.onShow;
page.onShow = function () {
init();
if (orig) orig.apply(this);
};
}
init();
}, [init]);
var filtered = activeTab === 'all' ? list : activeTab === 'toDesign' ? list.filter(function (d) {
return d.status === 'undesigned' || d.status === 'designing';
}) : list.filter(function (d) {
return d.status === activeTab;
});
var goDesign = function goDesign(item) {
if (item.status === 'ordered') {
_tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().showToast({
title: '该商品已下单,请查看订单',
icon: 'none'
});
return;
}
_tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().navigateTo({
url: "/pages/diy/index?source=designList&designId=".concat(item.id)
});
};
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
className: "theme-".concat(theme),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_components_LoginGuard__WEBPACK_IMPORTED_MODULE_6__["default"], {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
className: "design-page",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_components_ThemeToggle__WEBPACK_IMPORTED_MODULE_4__["default"], {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
className: "page-header dashed-card mt-20",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
className: "star-badge"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
className: "page-title",
children: "\u6211\u7684\u8BBE\u8BA1\u6E05\u5355"
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
className: "status-tabs",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.ScrollView, {
className: "tabs-scroll",
scrollX: true,
children: STATUS_TABS.map(function (tab) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
className: "tab-item ".concat(activeTab === tab.code ? 'active' : ''),
onTap: function onTap() {
return setActiveTab(tab.code);
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
className: "tab-label",
children: tab.label
}), activeTab === tab.code && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
className: "tab-underline"
})]
}, tab.code);
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.ScrollView, {
className: "design-list",
scrollY: true,
children: [filtered.map(function (item) {
var _item$productIcon;
var style = STATUS_STYLE[item.status];
var iconSrc = (_item$productIcon = item.productIcon) !== null && _item$productIcon !== void 0 && _item$productIcon.startsWith('/icon/') ? item.productIcon : _utils_productConfig__WEBPACK_IMPORTED_MODULE_3__.PRODUCT_ICON_MAP[item.productId] || '/icon/四角星.png';
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
className: "design-card dashed-card",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
className: "star-badge"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
className: "design-body",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Image, {
className: "design-icon-img",
src: iconSrc,
mode: "aspectFit"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
className: "design-info",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
className: "design-title-row",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
className: "design-name",
children: item.productName
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
className: "badge ".concat(style.cls),
children: style.label
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
className: "design-meta",
children: ["\u6570\u91CF: ", item.count, " \u4EF6 | \u5355\u4EF7: \xA5", item.unitPrice]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
className: "design-total",
children: ["\u5C0F\u8BA1: \xA5", (item.unitPrice * item.count).toFixed(2)]
})]
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
className: "design-actions",
children: [item.status !== 'ordered' && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
className: "btn-gradient design-btn",
onTap: function onTap() {
return goDesign(item);
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
children: item.status === 'undesigned' ? '开始设计' : '继续设计'
})
}), item.status === 'ordered' && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
className: "btn-outline design-btn",
onTap: function onTap() {
return _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().switchTab({
url: '/pages/orders/index'
});
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
children: "\u67E5\u770B\u8BA2\u5355"
})
})]
})]
}, item.id);
}), filtered.length === 0 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
className: "empty-state",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Image, {
className: "empty-icon-img",
src: "/icon/\u8C03\u8272\u76D8.png",
mode: "aspectFit"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
className: "empty-text",
children: "\u8FD8\u6CA1\u6709\u8BBE\u8BA1\u6E05\u5355"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
className: "empty-sub",
children: "\u53BB\u9996\u9875\u901B\u901B\uFF0C\u627E\u5230\u559C\u6B22\u7684\u5B9A\u5236\u54C1"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
className: "btn-gradient",
onTap: function onTap() {
return _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().switchTab({
url: '/pages/index/index'
});
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
children: "\u53BB\u901B\u901B"
})
})]
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
style: {
height: '40px'
}
})]
})
})
});
}
/***/ }),
/***/ "./src/pages/designList/index.tsx":
/*!****************************************!*\
!*** ./src/pages/designList/index.tsx ***!
\****************************************/
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
/* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tarojs/runtime */ "./node_modules/@tarojs/runtime/dist/runtime.esm.js");
/* harmony import */ var _node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_designList_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !!../../../node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/designList/index!./index.tsx */ "./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/designList/index!./src/pages/designList/index.tsx");
var config = {};
var inst = Page((0,_tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__.createPageConfig)(_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_designList_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__["default"], 'pages/designList/index', {root:{cn:[]}}, config || {}))
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_designList_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ })
},
/******/ function(__webpack_require__) { // webpackRuntimeModules
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
/******/ __webpack_require__.O(0, ["taro","vendors","common"], function() { return __webpack_exec__("./src/pages/designList/index.tsx"); });
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ }
]);
//# sourceMappingURL=index.js.map
File diff suppressed because one or more lines are too long
+1 -168
View File
@@ -1,168 +1 @@
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ .design-page{padding:0 24rpx 24rpx}.status-tabs{margin:20rpx 0}.tabs-scroll{white-space:nowrap}.tab-item{display:inline-block;padding:20rpx 32rpx;position:relative}.tab-label{color:var(--text-secondary);font-size:28rpx;font-weight:500}.tab-item.active .tab-label{color:var(--accent-pink);font-weight:700}.tab-underline{background:var(--accent-pink);border-radius:2rpx;bottom:8rpx;height:4rpx;left:50%;position:absolute;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:40rpx}.design-list{padding-bottom:24rpx}.design-card{margin-bottom:20rpx;padding:28rpx}.design-body{-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:20rpx;margin-bottom:20rpx}.design-icon{-ms-flex-negative:0;-webkit-flex-shrink:0;flex-shrink:0;font-size:56rpx}.design-icon-img{-ms-flex-negative:0;-webkit-flex-shrink:0;flex-shrink:0;height:56rpx;width:56rpx}.design-info{-webkit-flex:1;-ms-flex:1;flex:1}.design-title-row{-ms-flex-align:center;-ms-flex-pack:justify;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;justify-content:space-between;margin-bottom:12rpx}.design-name{color:var(--text-primary);font-size:32rpx;font-weight:700}.design-meta{color:var(--text-secondary);display:block;font-size:24rpx;margin-bottom:8rpx}.design-total{color:var(--accent-pink);font-size:26rpx;font-weight:600}.design-actions{-ms-flex-pack:end;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:flex-end;justify-content:flex-end}.design-btn{font-size:26rpx;padding:16rpx 40rpx}.empty-state{-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:100rpx 40rpx;text-align:center}.empty-icon-img{height:56rpx;margin-bottom:24rpx;width:56rpx}.empty-text{color:var(--text-primary);font-size:32rpx;font-weight:700;margin-bottom:12rpx}.empty-sub{color:var(--text-secondary);font-size:26rpx;margin-bottom:32rpx}
!*** css ./node_modules/@tarojs/webpack5-runner/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[4]!./src/pages/designList/index.scss ***!
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@charset "UTF-8";
.design-page {
padding: 0 24rpx 24rpx;
}
/* 状态 Tab */
.status-tabs {
margin: 20rpx 0;
}
.tabs-scroll {
white-space: nowrap;
}
.tab-item {
display: inline-block;
padding: 20rpx 32rpx;
position: relative;
}
.tab-label {
font-size: 28rpx;
color: var(--text-secondary);
font-weight: 500;
}
.tab-item.active .tab-label {
color: var(--accent-pink);
font-weight: 700;
}
.tab-underline {
position: absolute;
bottom: 8rpx;
left: 50%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
width: 40rpx;
height: 4rpx;
background: var(--accent-pink);
border-radius: 2rpx;
}
/* 设计卡片列表 */
.design-list {
padding-bottom: 24rpx;
}
.design-card {
margin-bottom: 20rpx;
padding: 28rpx;
}
.design-body {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: flex-start;
-ms-flex-align: start;
align-items: flex-start;
gap: 20rpx;
margin-bottom: 20rpx;
}
.design-icon {
font-size: 56rpx;
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
}
.design-icon-img {
width: 56rpx;
height: 56rpx;
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
}
.design-info {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
}
.design-title-row {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
margin-bottom: 12rpx;
}
.design-name {
font-size: 32rpx;
font-weight: 700;
color: var(--text-primary);
}
.design-meta {
font-size: 24rpx;
color: var(--text-secondary);
display: block;
margin-bottom: 8rpx;
}
.design-total {
font-size: 26rpx;
font-weight: 600;
color: var(--accent-pink);
}
.design-actions {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-justify-content: flex-end;
-ms-flex-pack: end;
justify-content: flex-end;
}
.design-btn {
padding: 16rpx 40rpx;
font-size: 26rpx;
}
/* 空状态 */
.empty-state {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
padding: 100rpx 40rpx;
text-align: center;
}
.empty-icon-img {
width: 56rpx;
height: 56rpx;
margin-bottom: 24rpx;
}
.empty-text {
font-size: 32rpx;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 12rpx;
}
.empty-sub {
font-size: 26rpx;
color: var(--text-secondary);
margin-bottom: 32rpx;
}
+1 -597
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
+1 -340
View File
File diff suppressed because one or more lines are too long
+1 -255
View File
@@ -1,255 +1 @@
"use strict"; "use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[421],{7265:function(e,s,a){var c=a(7842),i=a(5544),r=a(118),t=a(758),l=a.n(t),n=a(6540),o=a(5234),m=a(1268),d=a(9703),h=a(4848),g=[{title:"\u6bd5\u4e1a\u7eaa\u5ff5\u7b14\u8bb0\u672c",desc:"\u5168\u73ed\u540d\u5b57\u7ec4\u6210\u6821\u5fbd",image:"/img/book_small/The1.jpg"},{title:"\u94dc\u8d28\u676f\u57ab",desc:"\u91d1\u5c5e\u8d28\u611f\u684c\u9762\u827a\u672f",image:"/img/cup/The1.jpg"},{title:"\u7af9\u5236\u7b14\u76d2",desc:"\u81ea\u7136\u7af9\u7eb9\u6587\u623f\u96c5\u5668",image:"/img/penbox/The1.jpg"},{title:"\u4e66\u672c\u578b\u706f",desc:"\u6e29\u6696\u5149\u5f71\u70b9\u4eae\u5fc3\u610f",image:"/img/booklight/The1.jpg"},{title:"\u60c5\u4fa3\u5b9a\u5236\u793c",desc:"\u4e24\u4e2a\u4eba\u7684\u540d\u5b57\u4ea4\u7ec7",image:"/img/book_big/The1.jpg"},{title:"\u4f01\u4e1a\u5e74\u4f1a\u793c",desc:"\u5458\u5de5\u540d\u5b57\u7ec4\u6210Logo",image:"/img/penbox/The2.jpg"}],p={"notebook-small":"/img/book_small/The1.jpg","notebook-large":"/img/book_big/The1.jpg",coaster:"/img/cup/The1.jpg",penbox:"/img/penbox/The1.jpg",booklamp:"/img/booklight/The1.jpg"};function x(){var e=(0,d.wR)(),s=e.theme,a=(0,n.useState)(""),c=(0,i.A)(a,2),t=c[0],x=c[1],j=function(e){l().navigateTo({url:"/pages/product/index?id=".concat(e)})},N=t.trim()?o.R6.filter(function(e){return e.name.includes(t)||e.desc.includes(t)}):o.R6,u=function(e){x(e.detail.value)};return(0,h.jsx)(r.Ss,{className:"theme-".concat(s),children:(0,h.jsxs)(r.Ss,{className:"index-page",children:[(0,h.jsx)(m.A,{}),(0,h.jsx)(r.Ss,{className:"header-bar",children:(0,h.jsx)(r.EY,{className:"header-title",children:"\u667a\u7ed8\u5fae\u523b"})}),(0,h.jsxs)(r.Ss,{className:"search-card dashed-card",children:[(0,h.jsx)(r.Ss,{className:"star-badge"}),(0,h.jsxs)(r.Ss,{className:"search-inner",children:[(0,h.jsx)(r._V,{className:"search-icon-img",src:"/icon/\u641c\u7d22.png",mode:"aspectFit"}),(0,h.jsx)(r.pd,{className:"search-input",type:"text",placeholder:"\u641c\u7d22\u5b9a\u5236\u54c1\u7c7b\uff1a\u7b14\u8bb0\u672c\u3001\u676f\u57ab\u3001\u4e66\u706f...",value:t,onInput:u,confirmType:"search"})]}),t.trim()&&(0,h.jsx)(r.Ss,{className:"search-result-hint",children:(0,h.jsx)(r.EY,{className:"hint-text",children:N.length>0?"\u627e\u5230 ".concat(N.length," \u4e2a\u76f8\u5173\u54c1\u7c7b"):"\u6ca1\u6709\u627e\u5230\u76f8\u5173\u54c1\u7c7b\uff0c\u8bd5\u8bd5\u770b\u5176\u4ed6\u5173\u952e\u8bcd"})})]}),(0,h.jsxs)(r.Ss,{className:"showcase-section mt-20",children:[(0,h.jsx)(r.EY,{className:"section-title",children:"\u5b9a\u5236\u6210\u54c1\u5c55\u793a"}),(0,h.jsx)(r.RC,{className:"showcase-swiper",indicatorColor:"#e0e0e0",indicatorActiveColor:"#ff9a9e",circular:!0,autoplay:!0,interval:3e3,duration:500,previousMargin:"40rpx",nextMargin:"40rpx",indicatorDots:!0,children:g.map(function(e,s){return(0,h.jsx)(r.wu,{className:"showcase-swiper-item",children:(0,h.jsxs)(r.Ss,{className:"showcase-swiper-card dashed-card",children:[(0,h.jsx)(r.Ss,{className:"star-badge"}),(0,h.jsx)(r.Ss,{className:"showcase-image-wrapper",children:(0,h.jsx)(r._V,{className:"showcase-real-img",src:e.image,mode:"aspectFill"})}),(0,h.jsxs)(r.Ss,{className:"showcase-text-area",children:[(0,h.jsxs)(r.Ss,{className:"showcase-info",children:[(0,h.jsx)(r.EY,{className:"showcase-title",children:e.title}),(0,h.jsx)(r.EY,{className:"showcase-desc",children:e.desc})]}),(0,h.jsx)(r.Ss,{className:"showcase-tag",children:"\u6210\u54c1\u6848\u4f8b"})]})]})},s)})})]}),(0,h.jsxs)(r.Ss,{className:"category-section mt-20",children:[(0,h.jsx)(r.EY,{className:"section-title",children:"\u70ed\u95e8\u54c1\u7c7b"}),(0,h.jsx)(r.Ss,{className:"category-grid",children:N.map(function(e){return(0,h.jsxs)(r.Ss,{className:"category-item dashed-card",onTap:function(){return j(e.id)},children:[(0,h.jsx)(r.Ss,{className:"star-badge"}),(0,h.jsx)(r.Ss,{className:"category-img-wrapper",children:(0,h.jsx)(r._V,{className:"category-img-real",src:p[e.id]||"/icon/\u56db\u89d2\u661f.png",mode:"aspectFill"})}),(0,h.jsx)(r.EY,{className:"category-name",children:e.name}),(0,h.jsx)(r.EY,{className:"category-desc",children:e.desc}),(0,h.jsxs)(r.EY,{className:"category-price",children:["\xa5",e.price," \u8d77"]})]},e.id)})}),0===N.length&&(0,h.jsxs)(r.Ss,{className:"empty-category dashed-card",children:[(0,h.jsx)(r._V,{className:"empty-icon-img",src:"/icon/\u641c\u7d22.png",mode:"aspectFit"}),(0,h.jsx)(r.EY,{className:"empty-text",children:"\u672a\u627e\u5230\u5339\u914d\u7684\u54c1\u7c7b"}),(0,h.jsx)(r.EY,{className:"empty-sub",children:"\u5c1d\u8bd5\u641c\u7d22\u201c\u7b14\u8bb0\u672c\u201d\u3001\u201c\u676f\u57ab\u201d\u7b49"})]})]}),(0,h.jsx)(r.Ss,{className:"safe-bottom-placeholder"})]})})}var j={};Page((0,c.createPageConfig)(x,"pages/index/index",{root:{cn:[]}},j||{}))}},function(e){var s=function(s){return e(e.s=s)};e.O(0,[907,96,76],function(){return s(7265)});e.O()}]);
(wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["pages/index/index"],{
/***/ "./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/index/index!./src/pages/index/index.tsx":
/*!****************************************************************************************************************!*\
!*** ./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/index/index!./src/pages/index/index.tsx ***!
\****************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ Index; }
/* harmony export */ });
/* harmony import */ var F_weixin_wordc_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tarojs/taro */ "./node_modules/@tarojs/taro/index.js");
/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "./node_modules/react/cjs/react.production.min.js");
/* harmony import */ var _utils_productConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/productConfig */ "./src/utils/productConfig.ts");
/* harmony import */ var _components_ThemeToggle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/ThemeToggle */ "./src/components/ThemeToggle/index.tsx");
/* harmony import */ var _context_ThemeContext__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../context/ThemeContext */ "./src/context/ThemeContext.tsx");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/cjs/react-jsx-runtime.production.min.js");
// 成品展示配图(从 img 里取对应实物图)
var SHOWCASE_LIST = [{
title: '毕业纪念笔记本',
desc: '全班名字组成校徽',
image: '/img/book_small/The1.jpg'
}, {
title: '铜质杯垫',
desc: '金属质感桌面艺术',
image: '/img/cup/The1.jpg'
}, {
title: '竹制笔盒',
desc: '自然竹纹文房雅器',
image: '/img/penbox/The1.jpg'
}, {
title: '书本型灯',
desc: '温暖光影点亮心意',
image: '/img/booklight/The1.jpg'
}, {
title: '情侣定制礼',
desc: '两个人的名字交织',
image: '/img/book_big/The1.jpg'
}, {
title: '企业年会礼',
desc: '员工名字组成Logo',
image: '/img/penbox/The2.jpg'
}];
// 品类对应的实物照片映射(首页卡片顶部大图)
var PRODUCT_IMG_MAP = {
'notebook-small': '/img/book_small/The1.jpg',
'notebook-large': '/img/book_big/The1.jpg',
'coaster': '/img/cup/The1.jpg',
'penbox': '/img/penbox/The1.jpg',
'booklamp': '/img/booklight/The1.jpg'
};
function Index() {
var _useThemeContext = (0,_context_ThemeContext__WEBPACK_IMPORTED_MODULE_4__.useThemeContext)(),
theme = _useThemeContext.theme;
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
_useState2 = (0,F_weixin_wordc_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6__["default"])(_useState, 2),
searchKey = _useState2[0],
setSearchKey = _useState2[1];
var navigateToProduct = function navigateToProduct(categoryId) {
_tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().navigateTo({
url: "/pages/product/index?id=".concat(categoryId)
});
};
var filteredCategories = searchKey.trim() ? _utils_productConfig__WEBPACK_IMPORTED_MODULE_2__.CATEGORIES.filter(function (c) {
return c.name.includes(searchKey) || c.desc.includes(searchKey);
}) : _utils_productConfig__WEBPACK_IMPORTED_MODULE_2__.CATEGORIES;
var handleSearch = function handleSearch(e) {
setSearchKey(e.detail.value);
};
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "theme-".concat(theme),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "index-page",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_components_ThemeToggle__WEBPACK_IMPORTED_MODULE_3__["default"], {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "header-bar",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.Text, {
className: "header-title",
children: "\u667A\u7ED8\u5FAE\u523B"
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "search-card dashed-card",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "star-badge"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "search-inner",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.Image, {
className: "search-icon-img",
src: "/icon/\u641C\u7D22.png",
mode: "aspectFit"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.Input, {
className: "search-input",
type: "text",
placeholder: "\u641C\u7D22\u5B9A\u5236\u54C1\u7C7B\uFF1A\u7B14\u8BB0\u672C\u3001\u676F\u57AB\u3001\u4E66\u706F...",
value: searchKey,
onInput: handleSearch,
confirmType: "search"
})]
}), searchKey.trim() && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "search-result-hint",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.Text, {
className: "hint-text",
children: filteredCategories.length > 0 ? "\u627E\u5230 ".concat(filteredCategories.length, " \u4E2A\u76F8\u5173\u54C1\u7C7B") : '没有找到相关品类,试试看其他关键词'
})
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "showcase-section mt-20",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.Text, {
className: "section-title",
children: "\u5B9A\u5236\u6210\u54C1\u5C55\u793A"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.Swiper, {
className: "showcase-swiper",
indicatorColor: "#e0e0e0",
indicatorActiveColor: "#ff9a9e",
circular: true,
autoplay: true,
interval: 3000,
duration: 500,
previousMargin: "40rpx",
nextMargin: "40rpx",
indicatorDots: true,
children: SHOWCASE_LIST.map(function (item, idx) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.SwiperItem, {
className: "showcase-swiper-item",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "showcase-swiper-card dashed-card",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "star-badge"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "showcase-image-wrapper",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.Image, {
className: "showcase-real-img",
src: item.image,
mode: "aspectFill"
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "showcase-text-area",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "showcase-info",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.Text, {
className: "showcase-title",
children: item.title
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.Text, {
className: "showcase-desc",
children: item.desc
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "showcase-tag",
children: "\u6210\u54C1\u6848\u4F8B"
})]
})]
})
}, idx);
})
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "category-section mt-20",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.Text, {
className: "section-title",
children: "\u70ED\u95E8\u54C1\u7C7B"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "category-grid",
children: filteredCategories.map(function (cat) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "category-item dashed-card",
onTap: function onTap() {
return navigateToProduct(cat.id);
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "star-badge"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "category-img-wrapper",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.Image, {
className: "category-img-real",
src: PRODUCT_IMG_MAP[cat.id] || '/icon/四角星.png',
mode: "aspectFill"
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.Text, {
className: "category-name",
children: cat.name
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.Text, {
className: "category-desc",
children: cat.desc
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.Text, {
className: "category-price",
children: ["\xA5", cat.price, " \u8D77"]
})]
}, cat.id);
})
}), filteredCategories.length === 0 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "empty-category dashed-card",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.Image, {
className: "empty-icon-img",
src: "/icon/\u641C\u7D22.png",
mode: "aspectFit"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.Text, {
className: "empty-text",
children: "\u672A\u627E\u5230\u5339\u914D\u7684\u54C1\u7C7B"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.Text, {
className: "empty-sub",
children: "\u5C1D\u8BD5\u641C\u7D22\u201C\u7B14\u8BB0\u672C\u201D\u3001\u201C\u676F\u57AB\u201D\u7B49"
})]
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_7__.View, {
className: "safe-bottom-placeholder"
})]
})
});
}
/***/ }),
/***/ "./src/pages/index/index.tsx":
/*!***********************************!*\
!*** ./src/pages/index/index.tsx ***!
\***********************************/
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
/* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tarojs/runtime */ "./node_modules/@tarojs/runtime/dist/runtime.esm.js");
/* harmony import */ var _node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_index_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !!../../../node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/index/index!./index.tsx */ "./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/index/index!./src/pages/index/index.tsx");
var config = {};
var inst = Page((0,_tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__.createPageConfig)(_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_index_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__["default"], 'pages/index/index', {root:{cn:[]}}, config || {}))
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_index_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ })
},
/******/ function(__webpack_require__) { // webpackRuntimeModules
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
/******/ __webpack_require__.O(0, ["taro","vendors","common"], function() { return __webpack_exec__("./src/pages/index/index.tsx"); });
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ }
]);
//# sourceMappingURL=index.js.map
-1
View File
File diff suppressed because one or more lines are too long
+1 -327
View File
@@ -1,327 +1 @@
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ .index-page{padding:0 24rpx 24rpx}.header-bar{-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;padding:20rpx 0 16rpx}.header-title{color:var(--text-primary);font-size:48rpx;font-weight:800;letter-spacing:4rpx}.search-card{padding:20rpx 24rpx}.search-inner{-ms-flex-align:center;-webkit-align-items:center;align-items:center;background:#f8f9fa;border:1rpx dashed rgba(0,0,0,.06);border-radius:40rpx;display:-webkit-flex;display:-ms-flexbox;display:flex;padding:16rpx 24rpx}.search-icon{font-size:28rpx;margin-right:16rpx}.search-icon-img{height:28rpx;margin-right:16rpx;width:28rpx}.search-input{background:transparent;border:none;color:var(--text-primary);-webkit-flex:1;-ms-flex:1;flex:1;font-size:28rpx;outline:none}.search-input::-webkit-input-placeholder{color:var(--text-secondary);font-size:26rpx}.search-input::-moz-placeholder{color:var(--text-secondary);font-size:26rpx}.search-input:-ms-input-placeholder{color:var(--text-secondary);font-size:26rpx}.search-input::-ms-input-placeholder{color:var(--text-secondary);font-size:26rpx}.search-input::placeholder{color:var(--text-secondary);font-size:26rpx}.search-result-hint{border-top:2rpx dashed var(--line-star);margin-top:16rpx;padding-top:16rpx}.hint-text{color:var(--text-secondary);font-size:24rpx}.showcase-section{margin-top:20rpx}.showcase-swiper{height:520rpx}.showcase-swiper-item{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:center;justify-content:center;padding:0 10rpx}.showcase-swiper-card{border-radius:24rpx;-webkit-box-shadow:var(--shadow-card);box-shadow:var(--shadow-card);-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;height:100%;overflow:hidden;width:100%}.showcase-image-wrapper{-ms-flex-align:center;-ms-flex-pack:center;-ms-flex-negative:0;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-shrink:0;flex-shrink:0;height:320rpx;-webkit-justify-content:center;justify-content:center;overflow:hidden;position:relative;width:100%}.showcase-real-img{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.showcase-text-area{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;background:var(--bg-card);display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center;padding:16rpx 20rpx;position:relative;text-align:center}.showcase-info .showcase-title{color:var(--text-primary);display:block;font-size:32rpx;font-weight:700;margin-bottom:8rpx}.showcase-info .showcase-desc{color:var(--text-secondary);display:block;font-size:24rpx}.showcase-tag{background:rgba(255,154,158,.9);border-radius:20rpx;color:#fff;font-size:20rpx;font-weight:600;padding:4rpx 16rpx;position:absolute;right:16rpx;top:16rpx;z-index:2}.category-section{margin-top:20rpx}.category-grid{display:grid;gap:20rpx;grid-template-columns:1fr 1fr}.category-item{-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;overflow:hidden;padding:0 0 24rpx;text-align:center;-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.category-item:active{-webkit-transform:scale(.96);-ms-transform:scale(.96);transform:scale(.96)}.category-img-wrapper{border-radius:16rpx;height:180rpx;margin-bottom:16rpx;overflow:hidden;position:relative;width:100%}.category-img-real{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.category-name{color:var(--text-primary);font-size:28rpx;font-weight:700;margin-bottom:8rpx}.category-desc{color:var(--text-secondary);font-size:22rpx}.category-price{color:var(--accent-pink);font-size:30rpx;font-weight:700;margin-top:8rpx}.empty-category{-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:60rpx 40rpx;text-align:center}.empty-icon-img{height:48rpx;margin-bottom:16rpx;width:48rpx}.empty-text{color:var(--text-primary);font-size:30rpx;font-weight:600;margin-bottom:8rpx}.empty-sub{color:var(--text-secondary);font-size:24rpx}.safe-bottom-placeholder{height:160rpx}
!*** css ./node_modules/@tarojs/webpack5-runner/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[4]!./src/pages/index/index.scss ***!
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@charset "UTF-8";
.index-page {
padding: 0 24rpx 24rpx;
}
/* 顶部标题栏 */
.header-bar {
padding: 20rpx 0 16rpx;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
}
.header-title {
font-size: 48rpx;
font-weight: 800;
color: var(--text-primary);
letter-spacing: 4rpx;
}
/* 搜索框卡片 */
.search-card {
padding: 20rpx 24rpx;
}
.search-inner {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
background: #f8f9fa;
border: 1rpx dashed rgba(0, 0, 0, 0.06);
border-radius: 40rpx;
padding: 16rpx 24rpx;
}
.search-icon {
font-size: 28rpx;
margin-right: 16rpx;
}
.search-icon-img {
width: 28rpx;
height: 28rpx;
margin-right: 16rpx;
}
.search-input {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
font-size: 28rpx;
color: var(--text-primary);
background: transparent;
border: none;
outline: none;
}
.search-input::-webkit-input-placeholder {
color: var(--text-secondary);
font-size: 26rpx;
}
.search-input::-moz-placeholder {
color: var(--text-secondary);
font-size: 26rpx;
}
.search-input:-ms-input-placeholder {
color: var(--text-secondary);
font-size: 26rpx;
}
.search-input::-ms-input-placeholder {
color: var(--text-secondary);
font-size: 26rpx;
}
.search-input::placeholder {
color: var(--text-secondary);
font-size: 26rpx;
}
.search-result-hint {
margin-top: 16rpx;
padding-top: 16rpx;
border-top: 2rpx dashed var(--line-star);
}
.hint-text {
font-size: 24rpx;
color: var(--text-secondary);
}
/* 成品展示轮播 */
.showcase-section {
margin-top: 20rpx;
}
.showcase-swiper {
height: 520rpx;
}
.showcase-swiper-item {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
padding: 0 10rpx;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.showcase-swiper-card {
width: 100%;
height: 100%;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
border-radius: 24rpx;
overflow: hidden;
-webkit-box-shadow: var(--shadow-card);
box-shadow: var(--shadow-card);
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.showcase-image-wrapper {
width: 100%;
height: 320rpx;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
overflow: hidden;
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
position: relative;
}
.showcase-real-img {
width: 100%;
height: 100%;
-o-object-fit: cover;
object-fit: cover;
}
.showcase-text-area {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
text-align: center;
background: var(--bg-card);
padding: 16rpx 20rpx;
position: relative;
}
.showcase-info .showcase-title {
font-size: 32rpx;
font-weight: 700;
color: var(--text-primary);
display: block;
margin-bottom: 8rpx;
}
.showcase-info .showcase-desc {
font-size: 24rpx;
color: var(--text-secondary);
display: block;
}
.showcase-tag {
position: absolute;
top: 16rpx;
right: 16rpx;
background: rgba(255, 154, 158, 0.9);
color: #ffffff;
font-size: 20rpx;
padding: 4rpx 16rpx;
border-radius: 20rpx;
font-weight: 600;
z-index: 2;
}
/* 热门品类 */
.category-section {
margin-top: 20rpx;
}
.category-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20rpx;
}
.category-item {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
text-align: center;
padding: 0 0 24rpx;
overflow: hidden;
-webkit-transition: -webkit-transform 0.2s;
transition: -webkit-transform 0.2s;
transition: transform 0.2s;
transition: transform 0.2s, -webkit-transform 0.2s;
}
.category-item:active {
-webkit-transform: scale(0.96);
-ms-transform: scale(0.96);
transform: scale(0.96);
}
/* 品类顶部实物照片 */
.category-img-wrapper {
width: 100%;
height: 180rpx;
overflow: hidden;
border-radius: 16rpx;
margin-bottom: 16rpx;
position: relative;
}
.category-img-real {
width: 100%;
height: 100%;
-o-object-fit: cover;
object-fit: cover;
}
.category-name {
font-size: 28rpx;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 8rpx;
}
.category-desc {
font-size: 22rpx;
color: var(--text-secondary);
}
.category-price {
font-size: 30rpx;
font-weight: 700;
color: var(--accent-pink);
margin-top: 8rpx;
}
/* 空状态 */
.empty-category {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
padding: 60rpx 40rpx;
text-align: center;
}
.empty-icon-img {
width: 48rpx;
height: 48rpx;
margin-bottom: 16rpx;
}
.empty-text {
font-size: 30rpx;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 8rpx;
}
.empty-sub {
font-size: 24rpx;
color: var(--text-secondary);
}
/* 底部安全区 */
.safe-bottom-placeholder {
height: 160rpx;
}
+1 -439
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -577
View File
File diff suppressed because one or more lines are too long
+1 -359
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -228
View File
@@ -1,228 +1 @@
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ .orders-page{min-height:100vh;padding:0 24rpx 24rpx}.page-header{margin:20rpx 0 0;padding:50rpx 32rpx 24rpx}.status-tabs{margin:20rpx 0}.tabs-scroll{white-space:nowrap}.tab-item{display:inline-block;padding:20rpx 32rpx;position:relative}.tab-label{color:#b08d8d;font-size:28rpx;font-weight:500}.tab-item.active .tab-label{color:#ff9a9e;font-weight:700}.tab-underline{background:#ff9a9e;border-radius:4rpx;bottom:8rpx;height:4rpx;left:50%;position:absolute;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:40rpx}.orders-list{padding:0}.order-card{margin-bottom:24rpx;padding:28rpx}.order-header{-ms-flex-pack:justify;-ms-flex-align:center;-webkit-align-items:center;align-items:center;border-bottom:2rpx dashed #fce4ec;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;justify-content:space-between;margin-bottom:20rpx;padding-bottom:20rpx}.order-date{color:#b08d8d;font-size:24rpx}.order-body{-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-bottom:20rpx}.order-icon-wrapper{-ms-flex-align:center;-ms-flex-pack:center;-ms-flex-negative:0;-webkit-align-items:center;align-items:center;background:-webkit-linear-gradient(315deg,#fff0f5,#e3f2fd);background:linear-gradient(135deg,#fff0f5,#e3f2fd);border-radius:16rpx;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-shrink:0;flex-shrink:0;height:120rpx;-webkit-justify-content:center;justify-content:center;margin-right:20rpx;width:120rpx}.order-icon{font-size:56rpx}.order-icon-img{height:56rpx;width:56rpx}.order-info{-webkit-flex:1;-ms-flex:1;flex:1}.order-product{color:#5c3a3a;display:block;font-size:30rpx;font-weight:700;margin-bottom:8rpx}.order-sku{color:#b08d8d;display:block;font-size:24rpx;margin-bottom:8rpx}.order-meta{color:#ccc;display:block;font-size:22rpx}.order-footer{border-top:2rpx dashed #fce4ec;padding-top:16rpx}.order-price-bar{-ms-flex-align:baseline;-ms-flex-pack:end;-webkit-align-items:baseline;align-items:baseline;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:flex-end;justify-content:flex-end;margin-bottom:20rpx}.price-label{color:#b08d8d;font-size:24rpx;margin-right:8rpx}.price-value{color:#ff6b81;font-size:36rpx;font-weight:800}.order-actions{-ms-flex-pack:end;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:16rpx;-webkit-justify-content:flex-end;justify-content:flex-end}.order-btn{border-radius:40rpx!important;font-size:26rpx!important;padding:14rpx 28rpx!important}.empty-state{-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:120rpx 40rpx}.empty-icon-img{height:56rpx;margin-bottom:24rpx;width:56rpx}.empty-text{color:var(--text-primary);font-size:36rpx;font-weight:700;margin-bottom:12rpx}.empty-sub{color:var(--text-secondary);font-size:28rpx;margin-bottom:40rpx}
!*** css ./node_modules/@tarojs/webpack5-runner/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[4]!./src/pages/orders/index.scss ***!
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@charset "UTF-8";
.orders-page {
padding: 0 24rpx 24rpx;
min-height: 100vh;
}
.page-header {
padding: 50rpx 32rpx 24rpx;
margin: 20rpx 0 0;
}
/* 状态Tab */
.status-tabs {
margin: 20rpx 0;
}
.tabs-scroll {
white-space: nowrap;
}
.tab-item {
display: inline-block;
padding: 20rpx 32rpx;
position: relative;
}
.tab-label {
font-size: 28rpx;
color: #b08d8d;
font-weight: 500;
}
.tab-item.active .tab-label {
color: #ff9a9e;
font-weight: 700;
}
.tab-underline {
position: absolute;
bottom: 8rpx;
left: 50%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
width: 40rpx;
height: 4rpx;
background: #ff9a9e;
border-radius: 4rpx;
}
/* 订单卡片 */
.orders-list {
padding: 0;
}
.order-card {
margin-bottom: 24rpx;
padding: 28rpx;
}
.order-header {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
padding-bottom: 20rpx;
border-bottom: 2rpx dashed #fce4ec;
margin-bottom: 20rpx;
}
.order-date {
font-size: 24rpx;
color: #b08d8d;
}
.order-body {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: flex-start;
-ms-flex-align: start;
align-items: flex-start;
margin-bottom: 20rpx;
}
.order-icon-wrapper {
width: 120rpx;
height: 120rpx;
background: -webkit-linear-gradient(315deg, #fff0f5 0%, #e3f2fd 100%);
background: linear-gradient(135deg, #fff0f5 0%, #e3f2fd 100%);
border-radius: 16rpx;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
margin-right: 20rpx;
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
}
.order-icon {
font-size: 56rpx;
}
.order-icon-img {
width: 56rpx;
height: 56rpx;
}
.order-info {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
}
.order-product {
font-size: 30rpx;
font-weight: 700;
color: #5c3a3a;
display: block;
margin-bottom: 8rpx;
}
.order-sku {
font-size: 24rpx;
color: #b08d8d;
display: block;
margin-bottom: 8rpx;
}
.order-meta {
font-size: 22rpx;
color: #ccc;
display: block;
}
.order-footer {
padding-top: 16rpx;
border-top: 2rpx dashed #fce4ec;
}
.order-price-bar {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: baseline;
-ms-flex-align: baseline;
align-items: baseline;
-webkit-justify-content: flex-end;
-ms-flex-pack: end;
justify-content: flex-end;
margin-bottom: 20rpx;
}
.price-label {
font-size: 24rpx;
color: #b08d8d;
margin-right: 8rpx;
}
.price-value {
font-size: 36rpx;
font-weight: 800;
color: #ff6b81;
}
.order-actions {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-justify-content: flex-end;
-ms-flex-pack: end;
justify-content: flex-end;
gap: 16rpx;
}
.order-btn {
padding: 14rpx 28rpx !important;
font-size: 26rpx !important;
border-radius: 40rpx !important;
}
/* 空状态 */
.empty-state {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
padding: 120rpx 40rpx;
}
.empty-icon-img {
width: 56rpx;
height: 56rpx;
margin-bottom: 24rpx;
}
.empty-text {
font-size: 36rpx;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 12rpx;
}
.empty-sub {
font-size: 28rpx;
color: var(--text-secondary);
margin-bottom: 40rpx;
}
+1 -335
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -298
View File
@@ -1,298 +1 @@
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ .product-page{padding:0 24rpx 184rpx}.back-btn{font-size:40rpx;padding:10rpx}.hero-section{margin-top:20rpx}.hero-swiper{height:400rpx}.hero-card{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;height:100%;-webkit-justify-content:center;justify-content:center;text-align:center}.hero-icon{font-size:100rpx;margin-bottom:16rpx}.hero-icon-img{height:100rpx;margin-bottom:16rpx;width:100rpx}.hero-name{color:var(--text-primary);font-size:36rpx;font-weight:700}.hero-image{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.info-section{padding:24rpx}.info-row{-ms-flex-align:center;-ms-flex-pack:justify;-webkit-align-items:center;align-items:center;border-bottom:1rpx dashed rgba(0,0,0,.06);display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;justify-content:space-between;padding:20rpx 0}.info-row:last-child{border-bottom:none}.info-label{color:var(--text-secondary);font-size:28rpx}.info-price{color:var(--accent-pink);font-size:40rpx;font-weight:800}.info-value{color:var(--text-primary);font-size:28rpx}.detail-section{padding:24rpx}.detail-text{color:var(--text-secondary);font-size:28rpx;line-height:1.8}.action-bar .price-summary{-ms-flex-negative:0;-webkit-flex-shrink:0;flex-shrink:0}.summary-label{color:var(--text-secondary);display:block;font-size:22rpx}.summary-price{color:var(--accent-pink);font-size:36rpx;font-weight:700}.modal-overlay{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;background:rgba(0,0,0,.5);bottom:0;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:center;justify-content:center;left:0;padding:48rpx;position:fixed;right:0;top:0;z-index:1000}.modal-card{max-width:600rpx;padding:40rpx;width:100%}.modal-title{color:var(--text-primary);display:block;font-size:36rpx;font-weight:700;margin-bottom:24rpx;text-align:center}.modal-product{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:16rpx;-webkit-justify-content:center;justify-content:center;margin-bottom:32rpx}.modal-icon{font-size:48rpx}.modal-icon-img{height:48rpx;width:48rpx}.modal-name{color:var(--text-primary);font-size:32rpx;font-weight:600}.quantity-row{-ms-flex-align:center;-ms-flex-pack:justify;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;justify-content:space-between;margin-bottom:32rpx}.qty-label{color:var(--text-secondary);font-size:28rpx}.qty-control{-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:24rpx}.qty-btn{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;background:var(--bg-input);border:var(--line-card);border-radius:12rpx;color:var(--text-primary);display:-webkit-flex;display:-ms-flexbox;display:flex;font-size:32rpx;font-weight:600;height:60rpx;-webkit-justify-content:center;justify-content:center;width:60rpx}.qty-num{color:var(--text-primary);font-size:32rpx;font-weight:700;min-width:48rpx;text-align:center}.modal-total{-ms-flex-align:center;-ms-flex-pack:justify;-webkit-align-items:center;align-items:center;border-top:1rpx dashed rgba(0,0,0,.06);display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;justify-content:space-between;margin-bottom:32rpx;padding-top:24rpx}.total-label{color:var(--text-secondary);font-size:28rpx}.total-price{color:var(--accent-pink);font-size:36rpx;font-weight:800}.modal-actions{display:-webkit-flex;display:-ms-flexbox;display:flex;gap:20rpx}.modal-actions .btn-gradient,.modal-actions .btn-outline{-webkit-flex:1;-ms-flex:1;flex:1;padding:20rpx 0}
!*** css ./node_modules/@tarojs/webpack5-runner/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[4]!./src/pages/product/index.scss ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@charset "UTF-8";
.product-page {
padding: 0 24rpx 24rpx;
padding-bottom: 184rpx;
/* 为底部 action-bar 留空 */
}
/* 返回按钮 */
.back-btn {
font-size: 40rpx;
padding: 10rpx;
}
/* Hero 轮播 */
.hero-section {
margin-top: 20rpx;
}
.hero-swiper {
height: 400rpx;
}
.hero-card {
height: 100%;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
text-align: center;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.hero-icon {
font-size: 100rpx;
margin-bottom: 16rpx;
}
.hero-icon-img {
width: 100rpx;
height: 100rpx;
margin-bottom: 16rpx;
}
.hero-name {
font-size: 36rpx;
font-weight: 700;
color: var(--text-primary);
}
.hero-image {
width: 100%;
height: 100%;
-o-object-fit: contain;
object-fit: contain;
}
/* 基本信息 */
.info-section {
padding: 24rpx;
}
.info-row {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
padding: 20rpx 0;
border-bottom: 1rpx dashed rgba(0, 0, 0, 0.06);
}
.info-row:last-child {
border-bottom: none;
}
.info-label {
font-size: 28rpx;
color: var(--text-secondary);
}
.info-price {
font-size: 40rpx;
font-weight: 800;
color: var(--accent-pink);
}
.info-value {
font-size: 28rpx;
color: var(--text-primary);
}
/* 详细介绍 */
.detail-section {
padding: 24rpx;
}
.detail-text {
font-size: 28rpx;
color: var(--text-secondary);
line-height: 1.8;
}
/* 底部操作栏 */
.action-bar .price-summary {
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
}
.summary-label {
font-size: 22rpx;
color: var(--text-secondary);
display: block;
}
.summary-price {
font-size: 36rpx;
font-weight: 700;
color: var(--accent-pink);
}
/* 弹窗 */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
z-index: 1000;
padding: 48rpx;
}
.modal-card {
width: 100%;
max-width: 600rpx;
padding: 40rpx;
}
.modal-title {
font-size: 36rpx;
font-weight: 700;
color: var(--text-primary);
text-align: center;
margin-bottom: 24rpx;
display: block;
}
.modal-product {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
gap: 16rpx;
margin-bottom: 32rpx;
}
.modal-icon {
font-size: 48rpx;
}
.modal-icon-img {
width: 48rpx;
height: 48rpx;
}
.modal-name {
font-size: 32rpx;
color: var(--text-primary);
font-weight: 600;
}
.quantity-row {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
margin-bottom: 32rpx;
}
.qty-label {
font-size: 28rpx;
color: var(--text-secondary);
}
.qty-control {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
gap: 24rpx;
}
.qty-btn {
width: 60rpx;
height: 60rpx;
border-radius: 12rpx;
background: var(--bg-input);
border: var(--line-card);
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
font-size: 32rpx;
color: var(--text-primary);
font-weight: 600;
}
.qty-num {
font-size: 32rpx;
font-weight: 700;
color: var(--text-primary);
min-width: 48rpx;
text-align: center;
}
.modal-total {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
margin-bottom: 32rpx;
padding-top: 24rpx;
border-top: 1rpx dashed rgba(0, 0, 0, 0.06);
}
.total-label {
font-size: 28rpx;
color: var(--text-secondary);
}
.total-price {
font-size: 36rpx;
font-weight: 800;
color: var(--accent-pink);
}
.modal-actions {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
gap: 20rpx;
}
.modal-actions .btn-outline,
.modal-actions .btn-gradient {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
padding: 20rpx 0;
}
+1 -525
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -360
View File
File diff suppressed because one or more lines are too long
+1 -231
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -155
View File
@@ -1,155 +1 @@
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ .service-page{min-height:100vh;padding:0 24rpx 24rpx}.page-header{margin:20rpx 0 0;padding:50rpx 32rpx 24rpx}.service-hero{-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:50rpx 40rpx;text-align:center}.service-hero-icon{height:56rpx;margin-bottom:20rpx;width:56rpx}.service-title{color:var(--text-primary);display:block;font-size:36rpx;font-weight:700;margin-bottom:12rpx}.service-desc{color:var(--text-secondary);display:block;font-size:24rpx;margin-bottom:32rpx}.service-btn{border-radius:50rpx!important;font-size:30rpx!important;padding:24rpx 56rpx!important}.contact-list{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:20rpx}.contact-item{-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;padding:28rpx 32rpx}.contact-icon{font-size:48rpx;margin-right:24rpx}.contact-icon-img{-ms-flex-negative:0;-webkit-flex-shrink:0;flex-shrink:0;height:32rpx;margin-right:24rpx;width:32rpx}.contact-info{-webkit-flex:1;-ms-flex:1;flex:1}.contact-label{color:var(--text-secondary);display:block;font-size:24rpx;margin-bottom:4rpx}.contact-value{color:var(--text-primary);font-size:30rpx;font-weight:600}.faq-card{margin-bottom:20rpx;padding:28rpx 32rpx}.faq-q{color:var(--text-primary);display:block;font-size:30rpx;font-weight:700;margin-bottom:12rpx}.faq-a{color:var(--text-secondary);font-size:26rpx;line-height:1.6}.enterprise-service{padding:32rpx}.enterprise-icon{height:28rpx;margin-right:12rpx;width:28rpx}.enterprise-title{color:var(--text-primary);display:block;font-size:30rpx;font-weight:700;margin-bottom:8rpx}.enterprise-desc{color:var(--text-secondary);display:block;font-size:24rpx;margin-bottom:24rpx}
!*** css ./node_modules/@tarojs/webpack5-runner/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[4]!./src/pages/service/index.scss ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@charset "UTF-8";
.service-page {
padding: 0 24rpx 24rpx;
min-height: 100vh;
}
.page-header {
padding: 50rpx 32rpx 24rpx;
margin: 20rpx 0 0;
}
/* 客服英雄区 */
.service-hero {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
text-align: center;
padding: 50rpx 40rpx;
}
.service-hero-icon {
width: 56rpx;
height: 56rpx;
margin-bottom: 20rpx;
}
.service-title {
font-size: 36rpx;
font-weight: 700;
color: var(--text-primary);
display: block;
margin-bottom: 12rpx;
}
.service-desc {
font-size: 24rpx;
color: var(--text-secondary);
display: block;
margin-bottom: 32rpx;
}
.service-btn {
padding: 24rpx 56rpx !important;
font-size: 30rpx !important;
border-radius: 50rpx !important;
}
/* 联系方式 */
.contact-list {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
gap: 20rpx;
}
.contact-item {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
padding: 28rpx 32rpx;
}
.contact-icon {
font-size: 48rpx;
margin-right: 24rpx;
}
.contact-icon-img {
width: 32rpx;
height: 32rpx;
margin-right: 24rpx;
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
}
.contact-info {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
}
.contact-label {
font-size: 24rpx;
color: var(--text-secondary);
display: block;
margin-bottom: 4rpx;
}
.contact-value {
font-size: 30rpx;
font-weight: 600;
color: var(--text-primary);
}
/* FAQ */
.faq-card {
margin-bottom: 20rpx;
padding: 28rpx 32rpx;
}
.faq-q {
font-size: 30rpx;
font-weight: 700;
color: var(--text-primary);
display: block;
margin-bottom: 12rpx;
}
.faq-a {
font-size: 26rpx;
color: var(--text-secondary);
line-height: 1.6;
}
/* 企业专属 */
.enterprise-service {
padding: 32rpx;
}
.enterprise-icon {
width: 28rpx;
height: 28rpx;
margin-right: 12rpx;
}
.enterprise-title {
font-size: 30rpx;
font-weight: 700;
color: var(--text-primary);
display: block;
margin-bottom: 8rpx;
}
.enterprise-desc {
font-size: 24rpx;
color: var(--text-secondary);
margin-bottom: 24rpx;
display: block;
}
+1 -309
View File
@@ -1,309 +1 @@
"use strict"; "use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[486],{7904:function(s,e,a){var n=a(7842),t=a(9379),c=a(5544),i=a(118),l=a(758),r=a.n(l),o=a(6540),d=a(1268),m=a(9703),u=a(8594),h=a(4848),x=[{label:"\u4e2a\u4eba\u4fe1\u606f",icon:"/icon/\u4e2a\u4eba.png",action:function(s){return s.setShowEdit(!0)}},{label:"\u8d26\u53f7\u7ba1\u7406",icon:"/icon/\u8d26\u53f7\u7ba1\u7406.png",action:function(){return r().navigateTo({url:"/pages/userDatabase/index"})}},{label:"\u5b9a\u5236\u534f\u8bae",icon:"/icon/\u5b9a\u5236\u534f\u8bae.png",action:function(){return r().navigateTo({url:"/pages/agreement/index"})}},{label:"\u5173\u4e8e\u6211\u4eec",icon:"/icon/\u5173\u4e8e\u6211\u4eec.png",action:function(){return r().showToast({title:"\u667a\u7ed8\u5fae\u523b v1.0",icon:"none"})}}];function g(){var s=(0,m.wR)(),e=s.theme,a=(0,o.useState)({}),n=(0,c.A)(a,2),l=n[0],g=n[1],p=(0,o.useState)(""),j=(0,c.A)(p,2),N=j[0],f=j[1],v=(0,o.useState)(""),S=(0,c.A)(v,2),b=S[0],w=S[1],E=(0,o.useState)(!1),T=(0,c.A)(E,2),Y=T[0],A=T[1],k=function(){var s=(0,u.ug)()||{};g(s),f(s.nickName||""),w(s.avatarUrl||"")};(0,o.useEffect)(function(){k()},[]);var y=function(){(0,u.iA)((0,t.A)((0,t.A)({},l),{},{nickName:N,avatarUrl:b})),r().showToast({title:"\u4fee\u6539\u6210\u529f",icon:"success"}),A(!1),k()},F=function(){r().showModal({title:"\u786e\u8ba4\u9000\u51fa",content:"\u9000\u51fa\u540e\u5c06\u6e05\u7a7a\u5f53\u524d\u767b\u5f55\u72b6\u6001\uff0c\u786e\u5b9a\u5417\uff1f",success:function(s){s.confirm&&((0,u.Hf)(),r().switchTab({url:"/pages/index/index"}))}})},U=function(s){w(s.detail.avatarUrl||"")};return(0,h.jsx)(i.Ss,{className:"theme-".concat(e),style:{minHeight:"100vh"},children:(0,h.jsxs)(i.Ss,{className:"settings-page",children:[(0,h.jsx)(d.A,{}),(0,h.jsxs)(i.Ss,{className:"page-header dashed-card mt-20",children:[(0,h.jsx)(i.Ss,{className:"star-badge"}),(0,h.jsxs)(i.Ss,{className:"flex-between",style:{width:"100%"},children:[(0,h.jsx)(i.EY,{className:"back-btn",onTap:function(){return r().navigateBack()},children:"\u2190"}),(0,h.jsx)(i.EY,{className:"page-title",children:"\u8bbe\u7f6e"}),(0,h.jsx)(i.Ss,{style:{width:"60px"}})]})]}),(0,h.jsx)(i.Ss,{className:"settings-user dashed-card mt-20",children:(0,h.jsxs)(i.Ss,{className:"flex-between",onTap:function(){return A(!0)},children:[(0,h.jsxs)(i.Ss,{className:"flex-center",children:[l.avatarUrl?(0,h.jsx)(i._V,{className:"settings-avatar",src:l.avatarUrl,mode:"aspectFill"}):(0,h.jsx)(i.Ss,{className:"settings-avatar-placeholder",children:(0,h.jsx)(i._V,{className:"settings-avatar-icon",src:"/icon/\u4e2a\u4eba.png",mode:"aspectFit"})}),(0,h.jsxs)(i.Ss,{style:{marginLeft:"20px"},children:[(0,h.jsx)(i.EY,{className:"settings-name",children:l.nickName||"\u672a\u767b\u5f55"}),(0,h.jsxs)(i.EY,{className:"settings-id",children:["ID: ",l.openid?l.openid.slice(-8):"---"]})]})]}),(0,h.jsx)(i.EY,{className:"arrow",children:"\u203a"})]})}),(0,h.jsx)(i.Ss,{className:"settings-list dashed-card mt-20",children:x.map(function(s,e){return(0,h.jsxs)(i.Ss,{className:"settings-item ".concat(e<x.length-1?"bordered":""),onTap:function(){return s.action({setShowEdit:A})},children:[(0,h.jsx)(i._V,{className:"settings-item-icon-img",src:s.icon,mode:"aspectFit"}),(0,h.jsx)(i.EY,{className:"settings-item-label",children:s.label}),(0,h.jsx)(i.EY,{className:"arrow",children:"\u203a"})]},e)})}),(null===l||void 0===l?void 0:l.openid)&&(0,h.jsx)(i.Ss,{className:"mt-20",children:(0,h.jsx)(i.Ss,{className:"btn-outline logout-btn",onTap:F,children:(0,h.jsx)(i.EY,{children:"\u9000\u51fa\u767b\u5f55"})})}),(0,h.jsx)(i.Ss,{style:{height:"40px"}}),Y&&(0,h.jsx)(i.Ss,{className:"modal-overlay",children:(0,h.jsxs)(i.Ss,{className:"modal-card dashed-card",children:[(0,h.jsx)(i.Ss,{className:"star-badge"}),(0,h.jsx)(i.EY,{className:"modal-title",children:"\u4fee\u6539\u4fe1\u606f"}),(0,h.jsx)(i.$n,{className:"avatar-btn",openType:"chooseAvatar",onChooseAvatar:U,children:b?(0,h.jsx)(i._V,{className:"avatar-img",src:b,mode:"aspectFill"}):(0,h.jsx)(i._V,{className:"avatar-placeholder-img",src:"/icon/\u4e2a\u4eba.png",mode:"aspectFit"})}),(0,h.jsx)(i.pd,{className:"nickname-input",placeholder:"\u8bf7\u8f93\u5165\u6635\u79f0",value:N,onInput:function(s){return f(s.detail.value)}}),(0,h.jsxs)(i.Ss,{className:"form-actions",children:[(0,h.jsx)(i.Ss,{className:"btn-outline",onTap:function(){return A(!1)},children:(0,h.jsx)(i.EY,{children:"\u53d6\u6d88"})}),(0,h.jsx)(i.Ss,{className:"btn-gradient",onTap:y,children:(0,h.jsx)(i.EY,{children:"\u4fdd\u5b58"})})]})]})})]})})}var p={navigationBarTitleText:"\u8bbe\u7f6e"};Page((0,n.createPageConfig)(g,"pages/settings/index",{root:{cn:[]}},p||{}))}},function(s){var e=function(e){return s(s.s=e)};s.O(0,[907,96,76],function(){return e(7904)});s.O()}]);
(wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["pages/settings/index"],{
/***/ "./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/settings/index!./src/pages/settings/index.tsx":
/*!**********************************************************************************************************************!*\
!*** ./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/settings/index!./src/pages/settings/index.tsx ***!
\**********************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ SettingsPage; }
/* harmony export */ });
/* harmony import */ var F_weixin_wordc_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
/* harmony import */ var F_weixin_wordc_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tarojs/taro */ "./node_modules/@tarojs/taro/index.js");
/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "./node_modules/react/cjs/react.production.min.js");
/* harmony import */ var _components_ThemeToggle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../components/ThemeToggle */ "./src/components/ThemeToggle/index.tsx");
/* harmony import */ var _context_ThemeContext__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../context/ThemeContext */ "./src/context/ThemeContext.tsx");
/* harmony import */ var _utils_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/store */ "./src/utils/store.ts");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/cjs/react-jsx-runtime.production.min.js");
var MENU = [{
label: '个人信息',
icon: '/icon/个人.png',
action: function action(s) {
return s.setShowEdit(true);
}
}, {
label: '账号管理',
icon: '/icon/账号管理.png',
action: function action() {
return _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().navigateTo({
url: '/pages/userDatabase/index'
});
}
}, {
label: '定制协议',
icon: '/icon/定制协议.png',
action: function action() {
return _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().navigateTo({
url: '/pages/agreement/index'
});
}
}, {
label: '关于我们',
icon: '/icon/关于我们.png',
action: function action() {
return _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().showToast({
title: '智绘微刻 v1.0',
icon: 'none'
});
}
}];
function SettingsPage() {
var _useThemeContext = (0,_context_ThemeContext__WEBPACK_IMPORTED_MODULE_3__.useThemeContext)(),
theme = _useThemeContext.theme;
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)({}),
_useState2 = (0,F_weixin_wordc_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6__["default"])(_useState, 2),
user = _useState2[0],
setUser = _useState2[1];
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
_useState4 = (0,F_weixin_wordc_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6__["default"])(_useState3, 2),
editName = _useState4[0],
setEditName = _useState4[1];
var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
_useState6 = (0,F_weixin_wordc_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6__["default"])(_useState5, 2),
editAvatar = _useState6[0],
setEditAvatar = _useState6[1];
var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
_useState8 = (0,F_weixin_wordc_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6__["default"])(_useState7, 2),
showEdit = _useState8[0],
setShowEdit = _useState8[1];
var loadUser = function loadUser() {
var u = (0,_utils_store__WEBPACK_IMPORTED_MODULE_4__.getUserInfo)() || {};
setUser(u);
setEditName(u.nickName || '');
setEditAvatar(u.avatarUrl || '');
};
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
loadUser();
}, []);
var handleSaveInfo = function handleSaveInfo() {
(0,_utils_store__WEBPACK_IMPORTED_MODULE_4__.setUserInfo)((0,F_weixin_wordc_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__["default"])((0,F_weixin_wordc_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__["default"])({}, user), {}, {
nickName: editName,
avatarUrl: editAvatar
}));
_tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().showToast({
title: '修改成功',
icon: 'success'
});
setShowEdit(false);
loadUser();
};
var handleLogout = function handleLogout() {
_tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().showModal({
title: '确认退出',
content: '退出后将清空当前登录状态,确定吗?',
success: function success(res) {
if (res.confirm) {
(0,_utils_store__WEBPACK_IMPORTED_MODULE_4__.clearUserInfo)();
_tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().switchTab({
url: '/pages/index/index'
});
}
}
});
};
var onChooseAvatar = function onChooseAvatar(e) {
setEditAvatar(e.detail.avatarUrl || '');
};
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
className: "theme-".concat(theme),
style: {
minHeight: '100vh'
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
className: "settings-page",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_components_ThemeToggle__WEBPACK_IMPORTED_MODULE_2__["default"], {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
className: "page-header dashed-card mt-20",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
className: "star-badge"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
className: "flex-between",
style: {
width: '100%'
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, {
className: "back-btn",
onTap: function onTap() {
return _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().navigateBack();
},
children: "\u2190"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, {
className: "page-title",
children: "\u8BBE\u7F6E"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
style: {
width: '60px'
}
})]
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
className: "settings-user dashed-card mt-20",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
className: "flex-between",
onTap: function onTap() {
return setShowEdit(true);
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
className: "flex-center",
children: [user.avatarUrl ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Image, {
className: "settings-avatar",
src: user.avatarUrl,
mode: "aspectFill"
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
className: "settings-avatar-placeholder",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Image, {
className: "settings-avatar-icon",
src: "/icon/\u4E2A\u4EBA.png",
mode: "aspectFit"
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
style: {
marginLeft: '20px'
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, {
className: "settings-name",
children: user.nickName || '未登录'
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, {
className: "settings-id",
children: ["ID: ", user.openid ? user.openid.slice(-8) : '---']
})]
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, {
className: "arrow",
children: "\u203A"
})]
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
className: "settings-list dashed-card mt-20",
children: MENU.map(function (item, idx) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
className: "settings-item ".concat(idx < MENU.length - 1 ? 'bordered' : ''),
onTap: function onTap() {
return item.action({
setShowEdit: setShowEdit
});
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Image, {
className: "settings-item-icon-img",
src: item.icon,
mode: "aspectFit"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, {
className: "settings-item-label",
children: item.label
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, {
className: "arrow",
children: "\u203A"
})]
}, idx);
})
}), (user === null || user === void 0 ? void 0 : user.openid) && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
className: "mt-20",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
className: "btn-outline logout-btn",
onTap: handleLogout,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, {
children: "\u9000\u51FA\u767B\u5F55"
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
style: {
height: '40px'
}
}), showEdit && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
className: "modal-overlay",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
className: "modal-card dashed-card",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
className: "star-badge"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, {
className: "modal-title",
children: "\u4FEE\u6539\u4FE1\u606F"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Button, {
className: "avatar-btn",
openType: "chooseAvatar",
onChooseAvatar: onChooseAvatar,
children: editAvatar ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Image, {
className: "avatar-img",
src: editAvatar,
mode: "aspectFill"
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Image, {
className: "avatar-placeholder-img",
src: "/icon/\u4E2A\u4EBA.png",
mode: "aspectFit"
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Input, {
className: "nickname-input",
placeholder: "\u8BF7\u8F93\u5165\u6635\u79F0",
value: editName,
onInput: function onInput(e) {
return setEditName(e.detail.value);
}
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
className: "form-actions",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
className: "btn-outline",
onTap: function onTap() {
return setShowEdit(false);
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, {
children: "\u53D6\u6D88"
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
className: "btn-gradient",
onTap: handleSaveInfo,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, {
children: "\u4FDD\u5B58"
})
})]
})]
})
})]
})
});
}
/***/ }),
/***/ "./src/pages/settings/index.tsx":
/*!**************************************!*\
!*** ./src/pages/settings/index.tsx ***!
\**************************************/
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
/* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tarojs/runtime */ "./node_modules/@tarojs/runtime/dist/runtime.esm.js");
/* harmony import */ var _node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_settings_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !!../../../node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/settings/index!./index.tsx */ "./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/settings/index!./src/pages/settings/index.tsx");
var config = {"navigationBarTitleText":"设置"};
var inst = Page((0,_tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__.createPageConfig)(_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_settings_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__["default"], 'pages/settings/index', {root:{cn:[]}}, config || {}))
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_settings_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ })
},
/******/ function(__webpack_require__) { // webpackRuntimeModules
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
/******/ __webpack_require__.O(0, ["taro","vendors","common"], function() { return __webpack_exec__("./src/pages/settings/index.tsx"); });
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ }
]);
//# sourceMappingURL=index.js.map
File diff suppressed because one or more lines are too long
+1 -100
View File
@@ -1,100 +1 @@
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ .settings-page{padding:0 24rpx 24rpx}.settings-user{padding:24rpx}.settings-avatar{border:3rpx dashed var(--line-star);border-radius:50%;height:100rpx;width:100rpx}.settings-avatar-placeholder{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;background:var(--bg-input);border:3rpx dashed var(--line-star);border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:100rpx;-webkit-justify-content:center;justify-content:center;padding:30rpx;width:100rpx}.settings-name{color:var(--text-primary);display:block;font-size:32rpx;font-weight:700;margin-bottom:8rpx}.settings-id{color:var(--text-secondary);font-size:24rpx}.arrow{color:var(--text-secondary);font-size:36rpx}.settings-list{padding:0 24rpx}.settings-item{-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;padding:28rpx 0}.settings-item.bordered{border-bottom:1rpx dashed rgba(0,0,0,.06)}.settings-item-icon-img{-ms-flex-negative:0;-webkit-flex-shrink:0;flex-shrink:0;height:32rpx;margin-right:16rpx;width:32rpx}.settings-item-label{color:var(--text-primary);-webkit-flex:1;-ms-flex:1;flex:1;font-size:30rpx}.logout-btn{border:3rpx dashed #ff6b6b;color:#ff6b6b;padding:24rpx 0;text-align:center}
!*** css ./node_modules/@tarojs/webpack5-runner/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[4]!./src/pages/settings/index.scss ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@charset "UTF-8";
.settings-page {
padding: 0 24rpx 24rpx;
}
.settings-user {
padding: 24rpx;
}
.settings-avatar {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
border: 3rpx dashed var(--line-star);
}
.settings-avatar-placeholder {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
background: var(--bg-input);
border: 3rpx dashed var(--line-star);
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
padding: 30rpx;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.settings-name {
font-size: 32rpx;
font-weight: 700;
color: var(--text-primary);
display: block;
margin-bottom: 8rpx;
}
.settings-id {
font-size: 24rpx;
color: var(--text-secondary);
}
.arrow {
font-size: 36rpx;
color: var(--text-secondary);
}
.settings-list {
padding: 0 24rpx;
}
.settings-item {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
padding: 28rpx 0;
}
.settings-item.bordered {
border-bottom: 1rpx dashed rgba(0, 0, 0, 0.06);
}
.settings-item-icon-img {
width: 32rpx;
height: 32rpx;
margin-right: 16rpx;
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
}
.settings-item-label {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
font-size: 30rpx;
color: var(--text-primary);
}
.logout-btn {
text-align: center;
padding: 24rpx 0;
color: #ff6b6b;
border: 3rpx dashed #ff6b6b;
}
/* 弹窗复用 address 弹窗和 profile 弹窗样式 */
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
{"usingComponents":{"comp":"../../comp"}}
+2
View File
@@ -0,0 +1,2 @@
<import src="../../base.wxml"/>
<template is="taro_tmpl" data="{{root:root}}" />
+1
View File
File diff suppressed because one or more lines are too long
+1 -317
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -246
View File
@@ -1,246 +1 @@
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ .udb-page{min-height:100vh;padding:0 24rpx 40rpx}.udb-lock-card{-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:60rpx 40rpx;text-align:center}.udb-lock-icon{font-size:80rpx;margin-bottom:24rpx}.udb-lock-title{color:var(--text-primary);display:block;font-size:36rpx;font-weight:700;margin-bottom:12rpx}.udb-lock-desc{color:var(--text-secondary);display:block;font-size:26rpx;margin-bottom:32rpx}.udb-password-input{background:var(--bg-input);border:2rpx solid var(--line-star);border-radius:16rpx;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--text-primary);font-size:30rpx;height:80rpx;margin-bottom:24rpx;padding:0 24rpx;text-align:center;width:100%}.udb-error{color:#e64340;display:block;font-size:24rpx;margin-bottom:20rpx}.udb-btn{font-size:30rpx;padding:20rpx 0;width:100%}.udb-toolbar{-ms-flex-pack:end;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:flex-end;justify-content:flex-end;margin:20rpx 0}.udb-add-btn{font-size:26rpx;padding:14rpx 28rpx}.udb-table{background:var(--bg-card);border:var(--line-card);border-radius:24rpx;overflow:hidden}.udb-row{-ms-flex-align:center;-webkit-align-items:center;align-items:center;border-bottom:1rpx solid rgba(0,0,0,.04);display:-webkit-flex;display:-ms-flexbox;display:flex;padding:20rpx 16rpx}.udb-row:last-child{border-bottom:none}.udb-header{background:var(--bg-input);padding:16rpx}.udb-header .udb-col{color:var(--text-primary);font-size:24rpx;font-weight:700}.udb-col{-ms-flex-negative:0;color:var(--text-secondary);-webkit-flex-shrink:0;flex-shrink:0;font-size:24rpx;overflow:hidden;padding:0 6rpx;text-overflow:ellipsis;white-space:nowrap}.col-nick{-webkit-flex:0 0 22%;-ms-flex:0 0 22%;flex:0 0 22%}.col-id{-webkit-flex:0 0 36%;-ms-flex:0 0 36%;flex:0 0 36%}.col-stats{-webkit-flex:0 0 18%;-ms-flex:0 0 18%;flex:0 0 18%;text-align:center}.col-action{-ms-flex-align:center;-ms-flex-pack:end;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;gap:12rpx;-webkit-justify-content:flex-end;justify-content:flex-end}.udb-row.active{background:rgba(91,140,255,.06)}.udb-link{background:rgba(91,140,255,.08);border-radius:8rpx;color:var(--accent-blue);font-size:22rpx;padding:6rpx 14rpx}.udb-danger{background:rgba(230,67,64,.08);color:#e64340}.udb-current{color:var(--accent-blue);font-size:22rpx;font-weight:600}.udb-empty{color:var(--text-secondary);font-size:28rpx;padding:40rpx;text-align:center}.udb-add-card{padding:48rpx 36rpx;width:80%}.udb-add-title{color:var(--text-primary);display:block;font-size:32rpx;font-weight:700;margin-bottom:24rpx;text-align:center}.udb-add-input{background:var(--bg-input);border:2rpx solid var(--line-star);border-radius:16rpx;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--text-primary);font-size:28rpx;height:80rpx;margin-bottom:32rpx;padding:0 24rpx;width:100%}.udb-add-actions{-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:20rpx}.udb-add-actions .btn-gradient,.udb-add-actions .btn-outline{-webkit-flex:1;-ms-flex:1;flex:1;padding:18rpx 0;text-align:center}
!*** css ./node_modules/@tarojs/webpack5-runner/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[4]!./src/pages/userDatabase/index.scss ***!
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@charset "UTF-8";
.udb-page {
padding: 0 24rpx 40rpx;
min-height: 100vh;
}
/* 锁屏验证 */
.udb-lock-card {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
padding: 60rpx 40rpx;
text-align: center;
}
.udb-lock-icon {
font-size: 80rpx;
margin-bottom: 24rpx;
}
.udb-lock-title {
font-size: 36rpx;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 12rpx;
display: block;
}
.udb-lock-desc {
font-size: 26rpx;
color: var(--text-secondary);
margin-bottom: 32rpx;
display: block;
}
.udb-password-input {
width: 100%;
height: 80rpx;
background: var(--bg-input);
border: 2rpx solid var(--line-star);
border-radius: 16rpx;
padding: 0 24rpx;
font-size: 30rpx;
color: var(--text-primary);
text-align: center;
margin-bottom: 24rpx;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.udb-error {
font-size: 24rpx;
color: #e64340;
margin-bottom: 20rpx;
display: block;
}
.udb-btn {
width: 100%;
padding: 20rpx 0;
font-size: 30rpx;
}
/* 工具栏 */
.udb-toolbar {
margin: 20rpx 0;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-justify-content: flex-end;
-ms-flex-pack: end;
justify-content: flex-end;
}
.udb-add-btn {
padding: 14rpx 28rpx;
font-size: 26rpx;
}
/* 数据表格 */
.udb-table {
background: var(--bg-card);
border: var(--line-card);
border-radius: 24rpx;
overflow: hidden;
}
.udb-row {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
padding: 20rpx 16rpx;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.04);
}
.udb-row:last-child {
border-bottom: none;
}
.udb-header {
background: var(--bg-input);
padding: 16rpx;
}
.udb-header .udb-col {
font-weight: 700;
font-size: 24rpx;
color: var(--text-primary);
}
.udb-col {
font-size: 24rpx;
color: var(--text-secondary);
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
padding: 0 6rpx;
}
.col-nick {
-webkit-flex: 0 0 22%;
-ms-flex: 0 0 22%;
flex: 0 0 22%;
}
.col-id {
-webkit-flex: 0 0 36%;
-ms-flex: 0 0 36%;
flex: 0 0 36%;
}
.col-stats {
-webkit-flex: 0 0 18%;
-ms-flex: 0 0 18%;
flex: 0 0 18%;
text-align: center;
}
.col-action {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: flex-end;
-ms-flex-pack: end;
justify-content: flex-end;
gap: 12rpx;
}
.udb-row.active {
background: rgba(91, 140, 255, 0.06);
}
.udb-link {
padding: 6rpx 14rpx;
border-radius: 8rpx;
font-size: 22rpx;
color: var(--accent-blue);
background: rgba(91, 140, 255, 0.08);
}
.udb-danger {
color: #e64340;
background: rgba(230, 67, 64, 0.08);
}
.udb-current {
font-size: 22rpx;
color: var(--accent-blue);
font-weight: 600;
}
.udb-empty {
padding: 40rpx;
text-align: center;
color: var(--text-secondary);
font-size: 28rpx;
}
/* 弹窗 */
.udb-add-card {
padding: 48rpx 36rpx;
width: 80%;
}
.udb-add-title {
font-size: 32rpx;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 24rpx;
display: block;
text-align: center;
}
.udb-add-input {
width: 100%;
height: 80rpx;
background: var(--bg-input);
border: 2rpx solid var(--line-star);
border-radius: 16rpx;
padding: 0 24rpx;
font-size: 28rpx;
color: var(--text-primary);
margin-bottom: 32rpx;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.udb-add-actions {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
gap: 20rpx;
}
.udb-add-actions .btn-outline,
.udb-add-actions .btn-gradient {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
padding: 18rpx 0;
text-align: center;
}
+1 -362
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -400
View File
File diff suppressed because one or more lines are too long
+1 -209
View File
@@ -1,209 +1 @@
/******/ (function() { // webpackBootstrap (function(){"use strict";var n={},t={};function r(e){var o=t[e];if(void 0!==o)return o.exports;var u=t[e]={exports:{}};return n[e](u,u.exports,r),u.exports}r.m=n,function(){var n=[];r.O=function(t,e,o,u){if(!e){var i=1/0;for(l=0;l<n.length;l++){e=n[l][0],o=n[l][1],u=n[l][2];for(var f=!0,c=0;c<e.length;c++)(!1&u||i>=u)&&Object.keys(r.O).every(function(n){return r.O[n](e[c])})?e.splice(c--,1):(f=!1,u<i&&(i=u));if(f){n.splice(l--,1);var a=o();void 0!==a&&(t=a)}}return t}u=u||0;for(var l=n.length;l>0&&n[l-1][2]>u;l--)n[l]=n[l-1];n[l]=[e,o,u]}}(),function(){r.n=function(n){var t=n&&n.__esModule?function(){return n["default"]}:function(){return n};return r.d(t,{a:t}),t}}(),function(){var n,t=Object.getPrototypeOf?function(n){return Object.getPrototypeOf(n)}:function(n){return n.__proto__};r.t=function(e,o){if(1&o&&(e=this(e)),8&o)return e;if("object"===typeof e&&e){if(4&o&&e.__esModule)return e;if(16&o&&"function"===typeof e.then)return e}var u=Object.create(null);r.r(u);var i={};n=n||[null,t({}),t([]),t(t)];for(var f=2&o&&e;"object"==typeof f&&!~n.indexOf(f);f=t(f))Object.getOwnPropertyNames(f).forEach(function(n){i[n]=function(){return e[n]}});return i["default"]=function(){return e},r.d(u,i),u}}(),function(){r.d=function(n,t){for(var e in t)r.o(t,e)&&!r.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:t[e]})}}(),function(){r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"===typeof window)return window}}()}(),function(){r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)}}(),function(){r.r=function(n){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})}}(),function(){var n={121:0};r.O.j=function(t){return 0===n[t]};var t=function(t,e){var o,u,i=e[0],f=e[1],c=e[2],a=0;if(i.some(function(t){return 0!==n[t]})){for(o in f)r.o(f,o)&&(r.m[o]=f[o]);if(c)var l=c(r)}for(t&&t(e);a<i.length;a++)u=i[a],r.o(n,u)&&n[u]&&n[u][0](),n[u]=0;return r.O(l)},e=wx["webpackJsonp"]=wx["webpackJsonp"]||[];e.forEach(t.bind(null,0)),e.push=t.bind(null,e.push.bind(e))}()})();
/******/ "use strict";
/******/ var __webpack_modules__ = ({});
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/chunk loaded */
/******/ !function() {
/******/ var deferred = [];
/******/ __webpack_require__.O = function(result, chunkIds, fn, priority) {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var chunkIds = deferred[i][0];
/******/ var fn = deferred[i][1];
/******/ var priority = deferred[i][2];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ var r = fn();
/******/ if (r !== undefined) result = r;
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/compat get default export */
/******/ !function() {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function() { return module['default']; } :
/******/ function() { return module; };
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/create fake namespace object */
/******/ !function() {
/******/ var getProto = Object.getPrototypeOf ? function(obj) { return Object.getPrototypeOf(obj); } : function(obj) { return obj.__proto__; };
/******/ var leafPrototypes;
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 16: return value when it's Promise-like
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = this(value);
/******/ if(mode & 8) return value;
/******/ if(typeof value === 'object' && value) {
/******/ if((mode & 4) && value.__esModule) return value;
/******/ if((mode & 16) && typeof value.then === 'function') return value;
/******/ }
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ var def = {};
/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
/******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
/******/ Object.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return value[key]; }; });
/******/ }
/******/ def['default'] = function() { return value; };
/******/ __webpack_require__.d(ns, def);
/******/ return ns;
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/global */
/******/ !function() {
/******/ __webpack_require__.g = (function() {
/******/ if (typeof globalThis === 'object') return globalThis;
/******/ try {
/******/ return this || new Function('return this')();
/******/ } catch (e) {
/******/ if (typeof window === 'object') return window;
/******/ }
/******/ })();
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ !function() {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ !function() {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "runtime": 0
/******/ };
/******/
/******/ // no chunk on demand loading
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ __webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = function(parentChunkLoadingFunction, data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1];
/******/ var runtime = data[2];
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ if(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ }
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/ var chunkLoadingGlobal = wx["webpackJsonp"] = wx["webpackJsonp"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ }();
/******/
/************************************************************************/
/******/
/******/
/******/ })()
;
//# sourceMappingURL=runtime.js.map
-1
View File
File diff suppressed because one or more lines are too long
+1 -9753
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
+2 -1235
View File
File diff suppressed because one or more lines are too long
+19
View File
@@ -0,0 +1,19 @@
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-1
View File
File diff suppressed because one or more lines are too long
+819
View File
@@ -0,0 +1,819 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<title>NICHE FRAGRANCE · 小众沙龙香水</title>
<style>
/* ============================================================
CSS Custom Properties & Reset
============================================================ */
:root {
--scroll-progress: 0;
--tone-r: 19; --tone-g: 11; --tone-b: 4;
--coral: #ff6b35;
--amber: #f7931e;
--title: #1a1a1a;
--body: #4a4a4a;
--muted: #999999;
--bg-light: #f5f5f5;
--shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
--shadow-md: 0 4px 20px rgba(0,0,0,0.08);
--radius: 12px;
--vh: 1vh;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
scroll-behavior: smooth;
overflow-x: hidden;
}
body {
background: var(--bg-light);
color: var(--title);
line-height: 1.5;
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
min-height: 100vh;
}
img { display: block; max-width: 100%; }
/* ============================================================
List Page
============================================================ */
#listPage {
position: fixed; inset: 0; z-index: 100;
background: var(--bg-light);
overflow-y: auto; -webkit-overflow-scrolling: touch;
transition: opacity 0.35s ease;
}
#listPage.fading { opacity: 0; pointer-events: none; }
.list-header {
position: sticky; top: 0; z-index: 10;
background: rgba(245,245,245,0.92);
backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
padding: calc(env(safe-area-inset-top, 16px) + 8px) 20px 12px;
text-align: center;
}
.list-header h1 {
font-size: 18px; font-weight: 700; letter-spacing: 0.5px;
background: linear-gradient(90deg, var(--coral), var(--amber));
-webkit-background-clip: text; -webkit-text-fill-color: transparent;
background-clip: text;
}
.list-header .subtitle { font-size: 12px; color: #999; margin-top: 2px; }
.product-grid {
display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
padding: 12px 16px;
padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 80px);
}
.product-card {
border-radius: var(--radius); overflow: hidden;
box-shadow: var(--shadow-sm); cursor: pointer;
transition: transform 0.15s ease, box-shadow 0.15s ease;
-webkit-tap-highlight-color: transparent; user-select: none;
}
.product-card:active { transform: scale(0.97); box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.product-card .card-img-wrap {
aspect-ratio: 3 / 4; overflow: hidden; background: #2a2218;
}
.product-card .card-img-wrap img {
width: 100%; height: 100%; object-fit: cover;
transition: transform 0.4s ease;
}
.product-card .card-info { padding: 10px 12px 12px; }
.product-card .card-name {
font-size: 14px; color: #e8e0d6; line-height: 1.4;
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
overflow: hidden; min-height: 39px;
}
.product-card .card-price {
font-family: "DIN Alternate", "Roboto", sans-serif;
font-size: 16px; font-weight: 700; color: var(--coral); margin-top: 6px;
}
.bottom-nav {
position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
background: rgba(255,255,255,0.95);
backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
display: flex; justify-content: space-around;
padding: 8px 0 calc(env(safe-area-inset-bottom, 0px) + 4px);
border-top: 1px solid rgba(0,0,0,0.06);
}
.nav-item {
display: flex; flex-direction: column; align-items: center; gap: 2px;
font-size: 11px; color: #999; cursor: pointer; padding: 4px 16px;
transition: color 0.2s; -webkit-tap-highlight-color: transparent;
}
.nav-item.active { color: var(--coral); }
.nav-item .nav-icon { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
/* ============================================================
FLIP Overlay
============================================================ */
#flipOverlay {
position: fixed; z-index: 200; pointer-events: none; overflow: hidden;
background: #000; will-change: transform, top, left, width, height;
}
#flipOverlay img { width: 100%; height: 100%; object-fit: cover; }
/* ============================================================
Detail Page — colors driven by --tone-r/g/b
============================================================ */
#detailPage {
display: none; position: relative;
background: rgb(var(--tone-r), var(--tone-g), var(--tone-b));
}
#detailPage.active { display: block; }
.back-btn {
position: fixed;
top: calc(env(safe-area-inset-top, 16px) + 12px); left: 16px;
z-index: 50; width: 40px; height: 40px; border-radius: 50%;
background: rgba(var(--tone-r), var(--tone-g), var(--tone-b), 0.35);
backdrop-filter: blur(16px) saturate(1.4);
-webkit-backdrop-filter: blur(16px) saturate(1.4);
border: 1px solid rgba(255,255,255,0.12);
box-shadow: 0 2px 16px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.08);
display: flex; align-items: center; justify-content: center;
cursor: pointer; -webkit-tap-highlight-color: transparent;
transition: transform 0.15s ease, opacity 0.3s ease, background 0.5s ease;
}
.back-btn:active { transform: scale(0.92); }
.back-btn svg { width: 20px; height: 20px; }
.back-btn svg line, .back-btn svg polyline { stroke: rgba(255,255,255,0.85); }
.hero-spacer { height: 65vh; height: calc(var(--vh, 1vh) * 65); }
.dark-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.dark-bg-img {
position: absolute; top: -10%; left: -10%; width: 120%; height: 120%;
object-fit: cover; filter: blur(60px) brightness(0.25);
}
.dark-bg-overlay {
position: absolute; inset: 0;
background: rgba(var(--tone-r), var(--tone-g), var(--tone-b), 0.45);
}
.hero-image {
position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
z-index: 3; overflow: hidden;
will-change: height, transform; pointer-events: none;
}
.hero-image img {
position: absolute; top: 0; left: 0; width: 100%;
height: 100vh; height: calc(var(--vh, 1vh) * 100);
object-fit: cover; object-position: center; display: block;
will-change: top;
}
.hero-img-wrap {
position: absolute; inset: 0;
-webkit-mask-image: linear-gradient(to bottom, black 0%, black calc(100% - 55px), transparent 100%);
mask-image: linear-gradient(to bottom, black 0%, black calc(100% - 55px), transparent 100%);
}
.hero-info {
position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
padding: 50px 20px 16px;
background: linear-gradient(to bottom,
rgba(var(--tone-r),var(--tone-g),var(--tone-b),0) 0%,
rgba(var(--tone-r),var(--tone-g),var(--tone-b),0.5) 30%,
rgba(var(--tone-r),var(--tone-g),var(--tone-b),0.85) 60%,
rgba(var(--tone-r),var(--tone-g),var(--tone-b),0.95) 100%);
opacity: var(--blur-opacity, 0); pointer-events: none;
display: flex; flex-direction: column; gap: 6px;
}
.hero-info-title {
font-size: 20px; font-weight: 700; line-height: 1.3;
background: linear-gradient(90deg, #ff6b35, #f7931e);
-webkit-background-clip: text; -webkit-text-fill-color: transparent;
background-clip: text;
}
.hero-info-subtitle { font-size: 12px; color: #b0a395; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-info-price-row { display: flex; align-items: baseline; gap: 8px; }
.hero-info-price { font-family: "DIN Alternate", "Roboto", sans-serif; font-size: 22px; font-weight: 700; color: #ff6b35; }
.hero-info-original { font-family: "DIN Alternate", "Roboto", sans-serif; font-size: 13px; color: #8a7e72; text-decoration: line-through; }
.transition-band {
position: sticky; top: 0; z-index: 2; margin-top: -1px;
background: rgba(var(--tone-r), var(--tone-g), var(--tone-b), 0.88);
backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
box-shadow: 0 4px 24px rgba(0,0,0,0.3); overflow: hidden; transition: none;
}
.band-inner { padding: 24px 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.band-title {
font-size: 22px; font-weight: 700; line-height: 1.3;
background: linear-gradient(90deg, #ff6b35, #f7931e);
-webkit-background-clip: text; -webkit-text-fill-color: transparent;
background-clip: text;
}
.band-subtitle { font-size: 13px; color: #b0a395; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.band-price-row { display: flex; align-items: baseline; gap: 10px; }
.band-price { font-family: "DIN Alternate", "Roboto", sans-serif; font-size: 24px; font-weight: 700; color: #ff6b35; }
.band-price-original { font-family: "DIN Alternate", "Roboto", sans-serif; font-size: 14px; color: #8a7e72; text-decoration: line-through; }
.detail-content {
position: relative; z-index: 1;
background: rgba(var(--tone-r), var(--tone-g), var(--tone-b), 0.85);
padding: 24px 20px 60px;
}
.detail-content section { margin-bottom: 32px; }
.detail-content h3 {
font-size: 18px; font-weight: 700; color: #f0e6d8;
margin: 20px 0 12px; position: relative; padding-left: 14px;
}
.detail-content h3::before {
content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px;
border-radius: 2px; background: linear-gradient(180deg, var(--coral), var(--amber));
}
.detail-content p { font-size: 15px; color: #c4b8a8; line-height: 1.75; margin-bottom: 10px; }
.detail-content .note-item { margin-bottom: 8px; padding-left: 4px; }
.detail-content .note-item strong { color: #f0e6d8; }
.detail-content .divider {
height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
margin: 28px 0;
}
.detail-content .spec-table { width: 100%; border-collapse: collapse; border-radius: 8px; overflow: hidden; font-size: 14px; }
.detail-content .spec-table th, .detail-content .spec-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.06); }
.detail-content .spec-table th { background: rgba(var(--tone-r), var(--tone-g), var(--tone-b), 0.5); color: #8a7e72; font-weight: 500; width: 35%; font-size: 13px; }
.detail-content .spec-table td { color: #e8e0d6; }
.detail-content .spec-table tr:last-child th, .detail-content .spec-table tr:last-child td { border-bottom: none; }
.detail-content .tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.detail-content .tag {
padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 500;
background: rgba(255,107,53,0.12); border: 1px solid rgba(255,107,53,0.2); color: #ff8c5a;
}
@media (min-width: 500px) {
body { display: flex; justify-content: center; }
#listPage, #detailPage { max-width: 430px; left: 50% !important; transform: translateX(-50%); }
#listPage { width: 430px; }
#detailPage { width: 430px; }
.bottom-nav { max-width: 430px; left: 50% !important; transform: translateX(-50%); }
}
</style>
</head>
<body>
<!-- ============================================================
LIST PAGE
============================================================ -->
<div id="listPage">
<div class="list-header">
<h1>NICHE FRAGRANCE</h1>
<div class="subtitle">小众沙龙香水集合店</div>
</div>
<div class="product-grid" id="productGrid"></div>
<nav class="bottom-nav">
<div class="nav-item active"><span class="nav-icon">&#x1F3E0;</span><span>首页</span></div>
<div class="nav-item"><span class="nav-icon">&#x1F50D;</span><span>发现</span></div>
<div class="nav-item"><span class="nav-icon">&#x1F6D2;</span><span>购物车</span></div>
<div class="nav-item"><span class="nav-icon">&#x1F464;</span><span>我的</span></div>
</nav>
</div>
<div id="flipOverlay"><img src="" alt=""></div>
<!-- ============================================================
DETAIL PAGE
============================================================ -->
<div id="detailPage">
<div class="dark-bg" id="darkBg">
<img src="" alt="" class="dark-bg-img" id="darkBgImg">
<div class="dark-bg-overlay"></div>
</div>
<button class="back-btn" id="backBtn" aria-label="返回">
<svg viewBox="0 0 24 24" fill="none" stroke="rgba(255,255,255,0.85)" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<polyline points="15 18 9 12 15 6"></polyline>
</svg>
</button>
<div class="hero-spacer"></div>
<div class="hero-image" id="heroImage">
<div class="hero-img-wrap">
<img src="" alt="" id="heroImg">
</div>
<div class="hero-info" id="heroInfo">
<div class="hero-info-title" id="heroInfoTitle"></div>
<div class="hero-info-subtitle" id="heroInfoSubtitle"></div>
<div class="hero-info-price-row">
<span class="hero-info-price" id="heroInfoPrice"></span>
<span class="hero-info-original" id="heroInfoOriginal"></span>
</div>
</div>
</div>
<div class="transition-band" id="transitionBand">
<div class="band-inner">
<div class="band-title" id="bandTitle"></div>
<div class="band-subtitle" id="bandSubtitle"></div>
<div class="band-price-row">
<span class="band-price" id="bandPrice"></span>
<span class="band-price-original" id="bandOriginal"></span>
</div>
</div>
</div>
<div class="detail-content" id="detailContent"></div>
</div>
<script>
(function() {
'use strict';
// ============================================================
// Product Data — 6 salon perfumes
// ============================================================
const products = [
{
id: 0, image: 'images/perfume1.jpg',
name: '琥珀之境 · 东方木质调沙龙香水',
subtitle: '法国格拉斯调香师手作 · 72小时留香 · 限定典藏版',
price: 1280, originalPrice: 1680,
tone: [19, 11, 4],
notes: {
top: '佛手柑、粉红胡椒、藏红花。如晨曦穿透薄雾,明亮而略带辛辣的唤醒。',
middle: '琥珀、乳香、鸢尾花。温暖树脂与花香交织,仿佛步入古老图书馆的午后。',
base: '乌木、檀香、麝香。深沉木质尾韵,在肌肤上留下72小时的低语,越夜越迷人。'
},
design: '灵感源自摩洛哥马拉喀什的日落时分。当最后一缕阳光穿透琥珀色的城墙,空气里弥漫着乳香与异域香料的气息。瓶身采用手工吹制玻璃,每一只纹理都独一无二。',
scene: '晚宴、商务洽谈、独处阅读。不建议在密闭小空间使用——它的气场需要呼吸的空间。',
tags: ['晚宴', '商务', '独处', '中性香', '限定典藏'],
specs: [
['容量', '50ml / 100ml'],
['浓度', 'Extrait de Parfum(香精级,25%精油浓度)'],
['产地', '法国格拉斯'],
['保质期', '开封后36个月'],
['适用性别', '中性香']
]
},
{
id: 1, image: 'images/perfume2.jpg',
name: '暗夜玫瑰 · 哥特玫瑰乌木香水',
subtitle: '暗黑浪漫主义 · 保加利亚玫瑰原精 · 哥特典藏',
price: 980, originalPrice: 1280,
tone: [34, 19, 26],
notes: {
top: '粉红胡椒、藏红花、苦艾酒。如同午夜钟声敲响时的一缕辛辣,瞬间攫取感官。',
middle: '保加利亚玫瑰原精、鸢尾根、肉桂。暗色花瓣层层绽放,甜中带苦的哥特式浪漫。',
base: '乌木、广藿香、安息香。烟熏木质基底如古堡石墙般冷峻,余韵绵长不绝。'
},
design: '灵感源自布拉格查理大桥下的午夜玫瑰园。哥特式拱门投下阴影,月光洒在深红色花瓣上。瓶身采用黑色玻璃与暗红珐琅镀层,触感如天鹅绒般细腻。',
scene: '晚宴、约会、独自漫步夜色。适合秋冬夜晚,不建议烈日下使用——黑暗才是它的主场。',
tags: ['晚宴', '约会', '秋冬', '女香偏中性'],
specs: [
['容量', '50ml / 100ml'],
['浓度', 'Eau de Parfum(淡香精,20%精油浓度)'],
['产地', '保加利亚 / 法国'],
['保质期', '开封后36个月'],
['适用性别', '女香偏中性']
]
},
{
id: 2, image: 'images/perfume3.jpg',
name: '白茶清欢 · 禅意白茶淡香水',
subtitle: '东方茶道美学 · 福鼎白毫银针萃取 · 侘寂之香',
price: 680, originalPrice: 880,
tone: [40, 27, 22],
notes: {
top: '佛手柑、苦橙叶、白松香。清晨第一缕阳光穿透茶山薄雾,清冽微苦的绿色序章。',
middle: '福鼎白毫银针萃取、茉莉、马黛茶。茶韵悠长,仿佛一壶刚沏好的白毫银针在案头袅袅生烟。',
base: '白麝香、雪松、琥珀木。干净温润的收束,如同茶席散去后杯底残留的余温。'
},
design: '灵感源自京都龙安寺的枯山水庭院。极简、留白、时间的痕迹。瓶身采用磨砂白瓷质感,触手温润如玉,盖子为天然竹节切片。',
scene: '独处阅读、茶道修习、日常通勤、瑜伽冥想。适合一年四季,不挑场合适配万物。',
tags: ['日常', '茶道', '冥想', '中性香', '四季通用'],
specs: [
['容量', '30ml / 50ml'],
['浓度', 'Eau de Toilette(淡香水,10%精油浓度)'],
['产地', '中国福鼎 / 法国调制'],
['保质期', '开封后24个月'],
['适用性别', '中性香']
]
},
{
id: 3, image: 'images/perfume4.jpg',
name: '深海之息 · 海洋水生调香水',
subtitle: '深海探索主题 · 海藻精华与龙涎香 · 极简蓝调',
price: 1580, originalPrice: 1980,
tone: [32, 38, 21],
notes: {
top: '佛手柑、海风醛、粉红胡椒。如同潜入海面瞬间溅起的咸涩水花,冷冽而清新。',
middle: '海藻精华、薰衣草、天竺葵。深邃海洋的气息层层递进,仿佛置身海底峡谷的幽蓝世界。',
base: '龙涎香、檀香木、苔藓。海底沉木般的温润尾韵,在皮肤上留下旷远的寂静。'
},
design: '灵感源自马里亚纳海沟的科学探索。压力、黑暗、未知之美。瓶身采用渐变深蓝玻璃,由浅至深模拟海洋深度,瓶盖为天然火山石纹理。',
scene: '夏日通勤、海滨度假、运动后补香。不建议冬日密闭空间使用——它需要空气流动的空间。',
tags: ['夏日', '海洋', '运动', '男香偏中性', '限量'],
specs: [
['容量', '50ml / 100ml'],
['浓度', 'Extrait de Parfum(香精级,22%精油浓度)'],
['产地', '法国布列塔尼'],
['保质期', '开封后36个月'],
['适用性别', '男香偏中性']
]
},
{
id: 4, image: 'images/perfume5.jpg',
name: '檀道 · 印度迈索尔檀香精粹',
subtitle: '古老檀香之路 · 迈索尔产区珍稀檀木 · 修行者之香',
price: 2180, originalPrice: 2680,
tone: [45, 15, 18],
notes: {
top: '藏红花、小豆蔻、黑胡椒。如同打开一只古老的印度香料木匣,辛辣与温暖扑面而来。',
middle: '迈索尔檀香精油、乳香、没药。寺庙深处千年檀木散发的神圣气息,静谧而深邃。',
base: '乌木、琥珀、麝香。檀香在皮肤上持续低语八小时以上,越夜越醇厚。'
},
design: '灵感源自印度迈索尔老山檀产区千年古寺的香火传承。每一滴精油都来自树龄30年以上的檀木心材。瓶身采用暗红檀木色漆面,配手工雕刻木盖。',
scene: '冥想修行、茶道品鉴、重要商务场合。这是一支需要静下心来品闻的香水——喧嚣不属于它。',
tags: ['冥想', '商务', '修行', '中性香', '典藏级'],
specs: [
['容量', '30ml / 50ml'],
['浓度', 'Extrait de Parfum(香精级,28%精油浓度)'],
['产地', '印度迈索尔 / 法国调制'],
['保质期', '开封后48个月'],
['适用性别', '中性香']
]
},
{
id: 5, image: 'images/perfume6.jpg',
name: '雨后花园 · 绿意花香调淡香水',
subtitle: '印象派花园美学 · 雨后湿润花瓣萃取 · 春日限定',
price: 760, originalPrice: 960,
tone: [31, 46, 49],
notes: {
top: '佛手柑、黑醋栗叶、薄荷。雨后第一缕阳光穿透叶片,水珠折射出七色光谱的清新。',
middle: '铃兰、小苍兰、白玫瑰。湿漉漉的花瓣在微风中轻轻摇曳,仿佛走进莫奈笔下的吉维尼花园。',
base: '白麝香、鸢尾根、苔藓。泥土与花瓣混合的湿润气息,宁静如雨后初晴的庭院角落。'
},
design: '灵感源自莫奈吉维尼花园的雨后清晨。光线、水珠、花瓣上的露水。瓶身采用磨砂浅绿色玻璃,如同被雨水冲刷过的叶片,瓶盖为黄铜材质模拟园艺工具。',
scene: '春日踏青、花园漫步、周末早午餐。适合春夏季白天,不建议隆重场合——它属于轻松时光。',
tags: ['春日', '花园', '清新', '女香', '限定'],
specs: [
['容量', '50ml / 100ml'],
['浓度', 'Eau de Toilette(淡香水,12%精油浓度)'],
['产地', '法国格拉斯'],
['保质期', '开封后24个月'],
['适用性别', '女香']
]
}
];
let activeProduct = products[0];
// ============================================================
// DOM refs
// ============================================================
const listPage = document.getElementById('listPage');
const detailPage = document.getElementById('detailPage');
const productGrid = document.getElementById('productGrid');
const flipOverlay = document.getElementById('flipOverlay');
const flipImg = flipOverlay.querySelector('img');
const heroImage = document.getElementById('heroImage');
const heroImgEl = document.getElementById('heroImg');
const heroInfo = document.getElementById('heroInfo');
const transitionBand = document.getElementById('transitionBand');
const detailContent = document.getElementById('detailContent');
const backBtn = document.getElementById('backBtn');
const darkBgImg = document.getElementById('darkBgImg');
let activeCard = null;
let activeCardRect = null;
let isDetailVisible = false;
let ticking = false;
let currentProgress = 0;
// ============================================================
// Color extraction from product image
// ============================================================
function applyTone(product) {
const [r, g, b] = product.tone;
const root = document.documentElement.style;
root.setProperty('--tone-r', r);
root.setProperty('--tone-g', g);
root.setProperty('--tone-b', b);
}
// ============================================================
// Render product cards
// ============================================================
function renderCards() {
productGrid.innerHTML = products.map((p, i) => `
<div class="product-card" data-index="${i}" style="background:rgba(${p.tone.join(',')},0.9)">
<div class="card-img-wrap">
<img src="${p.image}" alt="${p.name}">
</div>
<div class="card-info">
<div class="card-name">${p.name}</div>
<div class="card-price">¥${p.price.toLocaleString()}</div>
</div>
</div>
`).join('');
}
// ============================================================
// Render detail page content
// ============================================================
function renderDetailContent(product) {
return `
<section>
<h3>香调层次</h3>
<p class="note-item"><strong>前调</strong> — ${product.notes.top}</p>
<p class="note-item"><strong>中调</strong> — ${product.notes.middle}</p>
<p class="note-item"><strong>后调</strong> — ${product.notes.base}</p>
</section>
<div class="divider"></div>
<section>
<h3>设计理念</h3>
<p>${product.design}</p>
</section>
<div class="divider"></div>
<section>
<h3>使用场景</h3>
<p>${product.scene}</p>
<div class="tag-row">${product.tags.map(t => `<span class="tag">${t}</span>`).join('')}</div>
</section>
<div class="divider"></div>
<section>
<h3>规格参数</h3>
<table class="spec-table">
${product.specs.map(s => `<tr><th>${s[0]}</th><td>${s[1]}</td></tr>`).join('')}
</table>
</section>
<div class="bottom-spacer" style="height:100vh;min-height:600px;"></div>
`;
}
// ============================================================
// Populate detail page with product data
// ============================================================
function populateDetail(product) {
activeProduct = product;
applyTone(product);
// Hero
heroImgEl.src = product.image;
darkBgImg.src = product.image;
document.getElementById('heroInfoTitle').textContent = product.name;
document.getElementById('heroInfoSubtitle').textContent = product.subtitle;
document.getElementById('heroInfoPrice').textContent = '¥' + product.price.toLocaleString();
document.getElementById('heroInfoOriginal').textContent = '¥' + product.originalPrice.toLocaleString();
// Transition band
document.getElementById('bandTitle').textContent = product.name;
document.getElementById('bandSubtitle').textContent = product.subtitle;
document.getElementById('bandPrice').textContent = '¥' + product.price.toLocaleString();
document.getElementById('bandOriginal').textContent = '¥' + product.originalPrice.toLocaleString();
// Detail content
detailContent.innerHTML = renderDetailContent(product);
}
// ============================================================
// Utility
// ============================================================
function setVH() {
document.documentElement.style.setProperty('--vh', (window.innerHeight * 0.01) + 'px');
}
setVH();
window.addEventListener('resize', setVH);
window.addEventListener('orientationchange', () => setTimeout(setVH, 100));
function easeOut(t) { return 1 - Math.pow(1 - t, 3); }
function clamp(v, min, max) { return Math.min(Math.max(v, min), max); }
function lerp(a, b, t) { return a + (b - a) * t; }
// ============================================================
// Three-stage hero animation
// ============================================================
function updateHeroFromProgress(progress) {
const p = clamp(progress, 0, 1);
let topCrop, bottomCrop;
if (p <= 0.4) {
const t = easeOut(p / 0.4);
topCrop = lerp(0, 32, t);
bottomCrop = lerp(0, 38, t);
} else if (p <= 0.55) {
const t = (p - 0.4) / 0.15;
topCrop = lerp(32, 34, t);
bottomCrop = lerp(38, 41, t);
} else {
topCrop = 34; bottomCrop = 41;
}
let translateY;
if (p <= 0.4) {
translateY = 0;
} else if (p <= 0.7) {
translateY = lerp(0, -75, (p - 0.4) / 0.3);
} else {
translateY = -75;
}
let bandOpacity, bandBlur, bandHeight;
if (p <= 0.4) {
const t = easeOut(p / 0.4);
bandOpacity = t;
bandBlur = lerp(0, 20, t);
bandHeight = lerp(0, 140, t);
} else {
bandOpacity = 1; bandBlur = 20; bandHeight = 140;
}
let contentOpacity, contentTranslateY;
if (p <= 0.05) {
contentOpacity = 0; contentTranslateY = 60;
} else if (p <= 0.22) {
const t = (p - 0.05) / 0.17;
contentOpacity = t;
contentTranslateY = lerp(60, 0, easeOut(t));
} else {
contentOpacity = 1; contentTranslateY = 0;
}
const visibleHeight = 100 - topCrop - bottomCrop;
heroImage.style.height = `calc(var(--vh, 1vh) * ${visibleHeight})`;
heroImgEl.style.top = `-${topCrop}vh`;
heroImage.style.transform = `translateY(${translateY}vh)`;
heroInfo.style.setProperty('--blur-opacity', bandOpacity);
let bandShowOpacity;
if (p <= 0.55) { bandShowOpacity = 0; }
else if (p <= 0.7) { bandShowOpacity = (p - 0.55) / 0.15; }
else { bandShowOpacity = 1; }
transitionBand.style.opacity = bandShowOpacity;
transitionBand.style.height = bandHeight + 'px';
transitionBand.style.boxShadow = bandShowOpacity > 0.5 ? '0 4px 20px rgba(0,0,0,0.08)' : 'none';
detailContent.style.opacity = contentOpacity;
detailContent.style.transform = `translateY(${contentTranslateY}px)`;
backBtn.style.opacity = p > 0.15 ? 1 : clamp(1 - p / 0.15, 0, 1);
transitionBand.style.overflow = bandHeight > 100 ? 'visible' : 'hidden';
transitionBand.style.pointerEvents = bandShowOpacity < 0.3 ? 'none' : 'auto';
document.documentElement.style.setProperty('--scroll-progress', p);
currentProgress = p;
}
function onDetailScroll() {
if (!isDetailVisible) return;
if (!ticking) {
requestAnimationFrame(function() {
const scrollHeight = document.documentElement.scrollHeight - window.innerHeight;
if (scrollHeight <= 1) { updateHeroFromProgress(0); ticking = false; return; }
updateHeroFromProgress(clamp(window.scrollY / scrollHeight, 0, 1));
ticking = false;
});
ticking = true;
}
}
window.addEventListener('scroll', onDetailScroll, { passive: true });
// ============================================================
// FLIP Animation: List → Detail
// ============================================================
function openDetail(cardEl) {
if (isDetailVisible) return;
const idx = parseInt(cardEl.dataset.index);
const product = products[idx];
activeCard = cardEl;
const cardImg = cardEl.querySelector('.card-img-wrap');
activeCardRect = cardImg.getBoundingClientRect();
populateDetail(product);
flipImg.src = product.image;
flipOverlay.style.top = activeCardRect.top + 'px';
flipOverlay.style.left = activeCardRect.left + 'px';
flipOverlay.style.width = activeCardRect.width + 'px';
flipOverlay.style.height = activeCardRect.height + 'px';
flipOverlay.style.borderRadius = '12px';
flipOverlay.style.transform = 'scale(1)';
flipOverlay.style.opacity = '1';
flipOverlay.style.transition = 'none';
flipOverlay.style.display = 'block';
flipOverlay.style.zIndex = '200';
flipOverlay.offsetHeight;
const allCards = productGrid.querySelectorAll('.product-card');
allCards.forEach(c => { if (c !== cardEl) { c.style.transition = 'opacity 0.3s ease'; c.style.opacity = '0.3'; } });
cardEl.style.opacity = '0';
cardEl.style.transition = 'opacity 0.3s ease';
detailPage.classList.add('active');
detailPage.style.display = 'block';
window.scrollTo(0, 0);
updateHeroFromProgress(0);
requestAnimationFrame(function() {
flipOverlay.style.transition =
'top 0.45s cubic-bezier(0.25, 0.1, 0.25, 1), left 0.45s cubic-bezier(0.25, 0.1, 0.25, 1), width 0.45s cubic-bezier(0.25, 0.1, 0.25, 1), height 0.45s cubic-bezier(0.25, 0.1, 0.25, 1), border-radius 0.45s cubic-bezier(0.25, 0.1, 0.25, 1)';
flipOverlay.style.top = '0px'; flipOverlay.style.left = '0px';
flipOverlay.style.width = '100vw';
flipOverlay.style.height = 'calc(var(--vh, 1vh) * 100)';
flipOverlay.style.borderRadius = '0px';
});
setTimeout(function() {
flipOverlay.style.display = 'none';
listPage.style.display = 'none';
detailPage.classList.add('active');
isDetailVisible = true;
document.body.style.overflow = 'auto';
window.scrollTo(0, 0);
updateHeroFromProgress(0);
allCards.forEach(c => { c.style.opacity = ''; c.style.transition = ''; });
}, 480);
}
// ============================================================
// FLIP Animation: Detail → List
// ============================================================
function closeDetail() {
if (!isDetailVisible) return;
window.scrollTo({ top: 0, behavior: 'instant' });
updateHeroFromProgress(0);
flipImg.src = activeProduct.image;
flipOverlay.style.display = 'block';
flipOverlay.style.transition = 'none';
flipOverlay.style.top = '0px'; flipOverlay.style.left = '0px';
flipOverlay.style.width = '100vw';
flipOverlay.style.height = 'calc(var(--vh, 1vh) * 100)';
flipOverlay.style.borderRadius = '0px';
flipOverlay.style.transform = 'scale(1)';
flipOverlay.style.opacity = '1';
flipOverlay.style.zIndex = '200';
detailPage.classList.remove('active');
detailPage.style.display = 'none';
document.body.style.overflow = 'hidden';
isDetailVisible = false;
listPage.style.display = '';
var allCards = productGrid.querySelectorAll('.product-card');
allCards.forEach(c => { if (c !== activeCard) { c.style.opacity = '0.3'; c.style.transition = 'opacity 0.35s ease'; } });
if (activeCard) { activeCard.style.opacity = '0'; activeCard.style.transition = 'none'; }
if (activeCard) { activeCardRect = activeCard.querySelector('.card-img-wrap').getBoundingClientRect(); }
flipOverlay.offsetHeight;
requestAnimationFrame(function() {
var target = activeCardRect || { top: 100, left: 50, width: 150, height: 200 };
flipOverlay.style.transition =
'top 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), left 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), width 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), height 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), border-radius 0.4s cubic-bezier(0.25, 0.1, 0.25, 1)';
flipOverlay.style.top = target.top + 'px'; flipOverlay.style.left = target.left + 'px';
flipOverlay.style.width = target.width + 'px'; flipOverlay.style.height = target.height + 'px';
flipOverlay.style.borderRadius = '12px';
});
setTimeout(function() {
flipOverlay.style.display = 'none';
document.body.style.overflow = 'hidden';
if (activeCard) { activeCard.style.opacity = ''; activeCard.style.transition = ''; }
allCards.forEach(c => { c.style.opacity = ''; c.style.transition = ''; });
window.scrollTo(0, 0);
updateHeroFromProgress(0);
}, 430);
}
// ============================================================
// Event listeners
// ============================================================
productGrid.addEventListener('click', function(e) {
var card = e.target.closest('.product-card');
if (!card || isDetailVisible) return;
openDetail(card);
});
backBtn.addEventListener('click', closeDetail);
document.addEventListener('keydown', function(e) {
if (e.key === 'Escape' && isDetailVisible) closeDetail();
});
// ============================================================
// Init
// ============================================================
renderCards();
populateDetail(products[0]);
document.body.style.overflow = 'hidden';
flipOverlay.style.display = 'none';
updateHeroFromProgress(0);
})();
</script>
</body>
</html>
+73 -3
View File
@@ -1,7 +1,7 @@
# 智绘微刻小程序 — 交付总结 v10 # 智绘微刻小程序 — 交付总结 v11
> 本文档供**完全无上下文的新会话**阅读,记录各轮重构的完整交付成果。 > 本文档供**完全无上下文的新会话**阅读,记录各轮重构的完整交付成果。
> **日期**2026-08-01(第十修改,Batch 10 > **日期**2026-08-02(第十一批修改,Batch 11
> **项目目录**`F:\weixin_wordc\` > **项目目录**`F:\weixin_wordc\`
> **技术栈**Taro 3.6.31 + React 18 + TypeScript + SCSS > **技术栈**Taro 3.6.31 + React 18 + TypeScript + SCSS
@@ -354,7 +354,71 @@ pages/
--- ---
## 一、历史修改回顾(Batch 1~9 ## 一、历史修改回顾(Batch 1~10
### Batch 10Completed
夜间模式字体 + 地址弹窗统一 + 空状态主题适配。
### Batch 112026-08-02)— 商品浏览页(Shop Page)沉浸式体验构建 ✅
**背景**:参考 `ecommerce-demo.html` 的交互式商品页设计(FLIP 转场 + 滚动驱动多阶段视差 + 主题色联动),为小程序新增独立「商品」tab,承担"看图种草→沉浸式详情→跳转购买链路"的推 discover 职能。
| 序号 | 任务 | 状态 |
|------|------|------|
| 1 | **新增「商品」tab 入口**:底部导航从 4 tab 扩展为 5 tab(首页/商品/设计清单/订单/我的),新增 `/icon/商品.png` | ✅ 完成 |
| 2 | **构建 `pages/shop/index.tsx`**:单页双容器结构(列表层 + 固定 overlay 详情层),点击卡片不走页面跳转,在当前页内完成沉浸式过渡 | ✅ 完成 |
| 3 | **滚动驱动视差动画**:Hero 图上下边缘裁剪 → 整图上滑退出 → `transition-band` 吸顶显现 → 内容区延迟上浮淡入,全部绑定 `ScrollView` 进度 | ✅ 完成 |
| 4 | **产品主题色动态联动**:每个产品新增 `tone: [r,g,b]`,详情页背景、渐变遮罩、CTA 栏、吸顶条实时跟随产品色调变化(5 产品 5 色调) | ✅ 完成 |
| 5 | **商品文案全面升级**:为 5 个产品补充 `subtitle`/`story`/`scene`/`tags`/`specs`/`originalPrice`,实现电商级长文案展示 | ✅ 完成 |
| 6 | **底部 CTA 衔接现有购买链路**"立即定制"按钮 `navigateTo` 到原有 `/pages/product/index?id=xxx`,不破坏已有业务流 | ✅ 完成 |
**技术抉择与小程序适配**
| Demo 原版能力 | 小程序适配方案 | 原因 |
|---|---|---|
| FLIP 空间膨胀动画(卡片图直接膨胀到全屏)| B:卡片淡出 → Hero 淡入放大 | 小程序无实时 `getBoundingClientRect` FLIP 支持,且 `position: fixed` 在 ScrollView 内不稳定 |
| `window.scroll` 驱动全局视差 | `<ScrollView scrollY>``onScroll` 驱动 | 小程序页面级滚动不支持精细事件捕获,ScrollView 组件化更可控 |
| CSS `mask-image` 渐变透明 | 伪元素 `linear-gradient` 遮罩 | `mask-image` 在部分微信基础库/安卓机型支持不完整 |
| 统一深色沉浸式 | C:列表页走现有 Light/Dark 主题,详情 overlay 使用产品独立深色调 | 保持 tabBar / 状态栏在列表页与现有主题一致,详情页进入"画报模式" |
**文件变更**
| 文件 | 核心改动 |
|---|---|
| `src/pages/shop/index.tsx` | 新建:列表网格 + ScrollView 详情 overlay`useMemo` 滚动进度映射多阶段动画;底部 CTA 跳转现有商品页 |
| `src/pages/shop/index.scss` | 新建:2 列网格、Hero 固定层/裁剪/滑出、`transition-band` sticky、主题驱动色调、底部 CTA 毛玻璃栏 |
| `src/app.config.ts` | 新增 `pages/shop/index` 路由;tabBar `list` 改为 5 项(首页/商品/设计清单/订单/我的) |
| `src/custom-tab-bar/index.tsx` | 新增第 5 个 tab「商品」,`icon: '/icon/商品.png'` |
| `src/utils/productConfig.ts` | 5 个产品全面升级:新增 `subtitle` / `tone` / `story` / `scene` / `tags` / `specs` / `originalPrice`;文案电商化 |
| `src/types/index.ts` | `ProductCategory` 接口扩展 8 个新字段:`subtitle?` / `tone?` / `story?` / `scene?` / `tags?` / `specs?` / `originalPrice?` |
| `src/icon/商品.png` | 新增:底部导航「商品」tab 图标 |
**踩坑记录(新增)**
| 坑 | 现象 | 解法 |
|---|---|---|
| **小程序 inset 语法不支持** | SCSS 写 `inset: 0` 被直接透传,部分基础库不识别 | 显式写 `top: 0; left: 0; right: 0; bottom: 0` |
| **ScrollView 滚动事件不触发** | 默认 `scrollEventThrottle` 过大导致手感迟钝 | 显式声明 `scrollEventThrottle={16}` |
| **tabBar 被详情 overlay 遮挡** | `z-index: 200` 不够,`custom-tab-bar``z-index: 1000` | 详情 overlay 提升至 `z-index: 1200` |
| **纯色背景 fallback** | `inset` fallback 背景色叠加导致过渡不自然 | overlay 使用 `linear-gradient` 伪元素实现边缘软化,兼容性更好 |
**编译结果**`webpack 5.91.0 compiled successfully in ~22s`,0 报错。新增 icon 约 7KB,总包体积仍 < 2MB。
**最终累计完成统计**
| 批次 | 日期 | 完成项数 |
|------|------|---------|
| Batch 1 | 早期 | 12 项 |
| Batch 2 | 早期 | 12 项 |
| Batch 3 | 早期 | 6 项 |
| Batch 4 | 2026-07-27 | 3 项 |
| Batch 5 | 2026-07-28 19:47 | 6 项 |
| Batch 6 | 2026-07-28 22:03 | 5 项 |
| Batch 7 | 2026-07-29 17:10 | 3 项 |
| Batch 8 | 2026-07-29 晚间 | 4 项 |
| Batch 9 | 2026-07-29 晚间 | 4 项 |
| Batch 10 | 2026-08-01 | 3 项 |
| **Batch 11** | **2026-08-02** | **6 项** |
| **总计** | — | **64 项核心目标 ✅** |
---
### Batch 1(已完成) ### Batch 1(已完成)
全局主题切换、字体系统、tabBar重组、商品详情页、设计清单、效果确认页、后端技术栈文档。 全局主题切换、字体系统、tabBar重组、商品详情页、设计清单、效果确认页、后端技术栈文档。
@@ -383,4 +447,10 @@ Taro React 事件兼容修复:全量 `onClick` → `onTap`、Fragment 消除
### Batch 9Completed ### Batch 9Completed
emoji → icon 图片彻底收尾:productConfig 增加 `iconImg`、store 写入层修复、运行时旧数据映射兼容、商品详情页弹窗去 emoji。 emoji → icon 图片彻底收尾:productConfig 增加 `iconImg`、store 写入层修复、运行时旧数据映射兼容、商品详情页弹窗去 emoji。
### Batch 10Completed
夜间模式字体 + 地址弹窗统一 + 空状态主题适配。
### Batch 11Completed
商品浏览页(Shop Page)沉浸式体验:新增「商品」tab(5 tab 架构)、单页双容器浏览页、滚动驱动视差动画、产品主题色联动、电商级长文案升级。
--- ---
+2
View File
@@ -1,6 +1,7 @@
export default defineAppConfig({ export default defineAppConfig({
pages: [ pages: [
'pages/index/index', 'pages/index/index',
'pages/shop/index',
'pages/product/index', 'pages/product/index',
'pages/diy/index', 'pages/diy/index',
'pages/checkout/index', 'pages/checkout/index',
@@ -24,6 +25,7 @@ export default defineAppConfig({
custom: true, custom: true,
list: [ list: [
{ pagePath: 'pages/index/index', text: '首页' }, { pagePath: 'pages/index/index', text: '首页' },
{ pagePath: 'pages/shop/index', text: '商品' },
{ pagePath: 'pages/designList/index', text: '设计清单' }, { pagePath: 'pages/designList/index', text: '设计清单' },
{ pagePath: 'pages/orders/index', text: '订单' }, { pagePath: 'pages/orders/index', text: '订单' },
{ pagePath: 'pages/profile/index', text: '我的' } { pagePath: 'pages/profile/index', text: '我的' }
+1
View File
@@ -4,6 +4,7 @@ import './index.scss'
const TABS = [ const TABS = [
{ pagePath: '/pages/index/index', text: '首页', icon: '/icon/首页.png' }, { pagePath: '/pages/index/index', text: '首页', icon: '/icon/首页.png' },
{ pagePath: '/pages/shop/index', text: '商品', icon: '/icon/商品.png' },
{ pagePath: '/pages/designList/index', text: '设计清单', icon: '/icon/调色盘.png' }, { pagePath: '/pages/designList/index', text: '设计清单', icon: '/icon/调色盘.png' },
{ pagePath: '/pages/orders/index', text: '订单', icon: '/icon/包裹.png' }, { pagePath: '/pages/orders/index', text: '订单', icon: '/icon/包裹.png' },
{ pagePath: '/pages/profile/index', text: '我的', icon: '/icon/个人.png' } { pagePath: '/pages/profile/index', text: '我的', icon: '/icon/个人.png' }
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

+446
View File
@@ -0,0 +1,446 @@
/* ============================================================
Shop Page — 商品浏览页
结构:单页双容器(列表层 + 详情覆层)
============================================================ */
/* --- List Layer --- */
.shop-list {
padding: 0 24rpx 24rpx;
}
.shop-header {
text-align: center;
padding: 40rpx 0 24rpx;
}
.shop-header-title {
font-size: 40rpx;
font-weight: 800;
color: var(--text-primary);
letter-spacing: 4rpx;
display: block;
}
.shop-header-sub {
font-size: 24rpx;
color: var(--text-secondary);
margin-top: 8rpx;
display: block;
}
/* --- Product Grid (2-column) --- */
.shop-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20rpx;
}
.shop-card {
border-radius: 24rpx;
overflow: hidden;
background: var(--bg-card);
box-shadow: var(--shadow-card);
transition: transform 0.15s ease;
}
.shop-card:active {
transform: scale(0.97);
}
.shop-card-img-wrap {
aspect-ratio: 3 / 4;
overflow: hidden;
background: #2a2218;
}
.shop-card-img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.4s ease;
}
.shop-card-info {
padding: 16rpx 20rpx 20rpx;
}
.shop-card-name {
font-size: 26rpx;
color: #e8e0d6;
line-height: 1.4;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
min-height: 74rpx;
}
.shop-card-price {
font-size: 30rpx;
font-weight: 700;
color: #ff9a9e;
margin-top: 10rpx;
display: block;
}
/* ============================================================
Detail Overlay — fixed, full-screen, themed by product tone
============================================================ */
.shop-detail-view {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1200; /* sits above custom-tab-bar (z-index: 1000) */
opacity: 0;
transition: opacity 0.35s ease;
background: rgb(28, 22, 18);
}
.shop-detail-view.show {
opacity: 1;
}
/* --- Fixed Hero Area --- */
.shop-hero-fixed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 65vh; /* hero takes 65% viewport height */
z-index: 0;
overflow: hidden;
}
.shop-hero-clip {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
will-change: height, transform;
}
.shop-hero-img {
width: 100%;
height: 100%;
object-fit: cover;
will-change: top;
}
/* Bottom gradient mask: pseudo-mask approach (better x-compatibility) */
.shop-hero-overlay {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 55%;
pointer-events: none;
}
/* Hero info (title, price) anchored at bottom */
.shop-hero-info {
position: absolute;
bottom: 0;
left: 0;
right: 0;
z-index: 2;
padding: 80rpx 40rpx 24rpx;
display: flex;
flex-direction: column;
gap: 8rpx;
}
.shop-hero-title {
font-size: 40rpx;
font-weight: 700;
line-height: 1.3;
color: #f0e6d8;
}
.shop-hero-subtitle {
font-size: 22rpx;
color: #b0a395;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.shop-hero-price-row {
display: flex;
align-items: baseline;
gap: 16rpx;
margin-top: 6rpx;
}
.shop-hero-price {
font-size: 44rpx;
font-weight: 700;
color: #ff9a9e;
}
.shop-hero-original {
font-size: 26rpx;
color: #8a7e72;
text-decoration: line-through;
}
/* --- ScrollView Content Layer --- */
.shop-scroll {
position: relative;
z-index: 3;
}
.shop-content {
min-height: 100vh; /* ensure scrollability */
will-change: transform;
}
/* --- Transition Band (sticky-like top info) --- */
.shop-band {
position: -webkit-sticky;
position: sticky;
top: 0;
z-index: 4;
padding: 40rpx 40rpx 32rpx;
display: flex;
flex-direction: column;
gap: 10rpx;
transition: opacity 0.15s ease;
will-change: opacity;
}
.shop-band-title {
font-size: 44rpx;
font-weight: 700;
line-height: 1.3;
color: #f0e6d8;
}
.shop-band-subtitle {
font-size: 24rpx;
color: #b0a395;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.shop-band-price-row {
display: flex;
align-items: baseline;
gap: 16rpx;
margin-top: 6rpx;
}
.shop-band-price {
font-size: 48rpx;
font-weight: 700;
color: #ff9a9e;
}
.shop-band-original {
font-size: 26rpx;
color: #8a7e72;
text-decoration: line-through;
}
/* --- Detail Body --- */
.shop-detail-body {
padding: 32rpx 40rpx 60rpx;
will-change: opacity, transform;
}
.shop-section {
margin-bottom: 32rpx;
}
.shop-section-title {
font-size: 34rpx;
font-weight: 700;
color: #f0e6d8;
margin: 28rpx 0 20rpx;
display: block;
position: relative;
padding-left: 20rpx;
}
.shop-section-title::before {
content: '';
position: absolute;
left: 0;
top: 6rpx;
bottom: 6rpx;
width: 6rpx;
border-radius: 4rpx;
background: linear-gradient(180deg, #ff9a9e, #fecfef);
}
.shop-section-text {
font-size: 28rpx;
color: #c4b8a8;
line-height: 1.75;
display: block;
}
.shop-divider {
height: 2rpx;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
margin: 40rpx 0;
}
/* --- Tags --- */
.shop-tag-row {
display: flex;
flex-wrap: wrap;
gap: 16rpx;
margin: 20rpx 0;
}
.shop-tag {
padding: 10rpx 28rpx;
border-radius: 40rpx;
font-size: 22rpx;
font-weight: 500;
background: rgba(255, 154, 158, 0.12);
border: 1rpx solid rgba(255, 154, 158, 0.2);
display: inline-flex;
align-items: center;
justify-content: center;
}
.shop-tag-text {
color: #ff9a9e;
}
/* --- Spec Table --- */
.shop-spec-table {
width: 100%;
border-collapse: collapse;
border-radius: 16rpx;
overflow: hidden;
font-size: 26rpx;
}
.shop-spec-row {
display: flex;
padding: 20rpx 24rpx;
border-bottom: 1rpx solid rgba(255,255,255,0.06);
}
.shop-spec-row:last-child {
border-bottom: none;
}
.shop-spec-key {
width: 35%;
color: #8a7e72;
font-weight: 500;
font-size: 24rpx;
}
.shop-spec-val {
flex: 1;
color: #e8e0d6;
word-break: break-all;
}
.shop-bottom-spacer {
height: 200rpx;
}
/* --- Back Button --- */
.shop-back-btn {
position: fixed;
top: calc(env(safe-area-inset-top, 20px) + 20rpx);
left: 24rpx;
z-index: 50;
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: rgba(0, 0, 0, 0.35);
backdrop-filter: blur(16rpx) saturate(1.4);
-webkit-backdrop-filter: blur(16rpx) saturate(1.4);
border: 1rpx solid rgba(255,255,255,0.12);
box-shadow: 0 2rpx 16rpx rgba(0,0,0,0.25);
display: flex;
align-items: center;
justify-content: center;
transition: opacity 0.2s ease, transform 0.15s ease;
}
.shop-back-btn:active {
transform: scale(0.92);
}
.shop-back-arrow {
font-size: 36rpx;
color: rgba(255,255,255,0.85);
line-height: 1;
}
/* --- Bottom CTA Bar --- */
.shop-cta-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 60;
padding: 20rpx 32rpx calc(20rpx + env(safe-area-inset-bottom, 0px));
display: flex;
align-items: center;
justify-content: space-between;
gap: 24rpx;
backdrop-filter: blur(16rpx) saturate(1.2);
-webkit-backdrop-filter: blur(16rpx) saturate(1.2);
transition: background-color 0.4s ease;
}
.shop-cta-price-col {
display: flex;
align-items: baseline;
gap: 12rpx;
}
.shop-cta-price {
font-size: 40rpx;
font-weight: 700;
color: #ff9a9e;
}
.shop-cta-original {
font-size: 24rpx;
color: #8a7e72;
text-decoration: line-through;
}
.shop-cta-btn {
flex: 1;
max-width: 260rpx;
background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%);
color: #5c3a3a;
border-radius: 50rpx;
padding: 24rpx 48rpx;
font-size: 30rpx;
font-weight: 600;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.shop-cta-btn-text {
color: inherit;
font-weight: 600;
}
/* ============================================================
Responsive: container center on wide screens
============================================================ */
@media (min-width: 750rpx) {
.shop-page {
display: flex;
justify-content: center;
}
}
+350
View File
@@ -0,0 +1,350 @@
import { View, Text, Image, ScrollView } from '@tarojs/components'
import Taro, { hideTabBar, showTabBar } from '@tarojs/taro'
import { useState, useEffect, useCallback, useMemo } from 'react'
import './index.scss'
import { PRODUCTS } from '../../utils/productConfig'
import { ProductCategory } from '../../types'
import { useThemeContext } from '../../context/ThemeContext'
const clamp = (v: number, min: number, max: number) => Math.min(Math.max(v, min), max)
const lerp = (a: number, b: number, t: number) => a + (b - a) * t
const easeOut = (t: number) => 1 - Math.pow(1 - t, 3)
export default function ShopPage() {
const { theme } = useThemeContext()
const [winHeight, setWinHeight] = useState(667)
const [showDetail, setShowDetail] = useState(false)
const [detailVisible, setDetailVisible] = useState(false)
const [activeProduct, setActiveProduct] = useState<ProductCategory | null>(null)
const [progress, setProgress] = useState(0)
useEffect(() => {
try {
const info = Taro.getSystemInfoSync()
setWinHeight(info.windowHeight)
} catch (e) {
// fallback to safe default
}
}, [])
useEffect(() => {
if (showDetail && activeProduct) {
hideTabBar({ animation: true }).catch(() => {})
} else {
showTabBar({ animation: true }).catch(() => {})
}
}, [showDetail, activeProduct])
const openDetail = useCallback((product: ProductCategory) => {
setActiveProduct(product)
setShowDetail(true)
setProgress(0)
// Slight delay so CSS transition picks up from display:block
setTimeout(() => setDetailVisible(true), 50)
}, [])
const closeDetail = useCallback(() => {
setDetailVisible(false)
setTimeout(() => {
setShowDetail(false)
setActiveProduct(null)
setProgress(0)
}, 350)
}, [])
const goToProduct = useCallback(() => {
if (!activeProduct) return
Taro.navigateTo({ url: `/pages/product/index?id=${activeProduct.id}` })
}, [activeProduct])
const handleScroll = useCallback((e: any) => {
const st = e.detail?.scrollTop ?? 0
const total = winHeight * 1.2
const p = clamp(st / total, 0, 1)
setProgress(p)
}, [winHeight])
/* Scroll-progress → multi-stage hero & content animations */
const heroStyles = useMemo(() => {
const p = progress
// 1. Image crop insets (vh %)
let topCrop = 0, bottomCrop = 0
if (p <= 0.4) {
const t = easeOut(p / 0.4)
topCrop = lerp(0, 32, t)
bottomCrop = lerp(0, 38, t)
} else if (p <= 0.55) {
const t = (p - 0.4) / 0.15
topCrop = lerp(32, 34, t)
bottomCrop = lerp(38, 41, t)
} else {
topCrop = 34; bottomCrop = 41
}
// 2. Hero translateY
let translateY = 0
if (p <= 0.4) translateY = 0
else if (p <= 0.7) translateY = lerp(0, -75, (p - 0.4) / 0.3)
else translateY = -75
// 3. Hero bottom info opacity (always visible on open, fades after scroll)
let heroInfoOpacity = 1
if (p <= 0.35) heroInfoOpacity = 1
else if (p <= 0.48) heroInfoOpacity = clamp(1 - (p - 0.35) / 0.13, 0, 1)
else heroInfoOpacity = 0
// 4. Transition band opacity
let bandOpacity = 0
if (p <= 0.55) bandOpacity = 0
else if (p <= 0.7) bandOpacity = (p - 0.55) / 0.15
else bandOpacity = 1
// 5. Content reveal
let contentOpacity = 1, contentOffset = 0
if (p <= 0.05) { contentOpacity = 0; contentOffset = 60 }
else if (p <= 0.22) {
const t = (p - 0.05) / 0.17
contentOpacity = easeOut(t)
contentOffset = lerp(60, 0, easeOut(t))
}
// 6. Back button (fade out as hero scrolls)
let backBtnOpacity = 1
if (p <= 0.15) backBtnOpacity = clamp(1 - p / 0.15, 0, 1)
return {
topCrop,
bottomCrop,
translateY,
heroInfoOpacity,
bandOpacity,
contentOpacity,
contentOffset,
backBtnOpacity,
visibleHeight: 100 - topCrop - bottomCrop
}
}, [progress])
const tone = useMemo(() => activeProduct?.tone || [28, 22, 18], [activeProduct])
return (
<View className={`shop-page theme-${theme}`}>
{/* ============================================================
LIST LAYER — always in DOM so scroll position is preserved
============================================================ */}
<View className="shop-list">
<View className="shop-header">
<Text className="shop-header-title"></Text>
<Text className="shop-header-sub"></Text>
</View>
<View className="shop-grid">
{PRODUCTS.map(product => (
<View
key={product.id}
className="shop-card"
onTap={() => openDetail(product)}
>
<View className="shop-card-img-wrap">
<Image
className="shop-card-img"
src={product.images?.[0] || product.iconImg || ''}
mode="aspectFill"
lazyLoad
/>
</View>
<View
className="shop-card-info"
style={{
backgroundColor: `rgba(${product.tone?.[0] || 28}, ${product.tone?.[1] || 22}, ${product.tone?.[2] || 18}, 0.92)`
}}
>
<Text className="shop-card-name">{product.name}</Text>
<Text className="shop-card-price">¥{product.price}</Text>
</View>
</View>
))}
</View>
{/* TabBar spacer so list isn't obscured */}
<View style={{ height: '160px' }} />
</View>
{/* ============================================================
DETAIL LAYER — fixed overlay, single-page dual-container
============================================================ */}
{activeProduct && (
<View
className={`shop-detail-view ${detailVisible ? 'show' : ''}`}
style={{ display: showDetail ? 'block' : 'none' }}
>
{/* Fixed Hero */}
<View className="shop-hero-fixed">
<View
className="shop-hero-clip"
style={{
height: `${winHeight * heroStyles.visibleHeight / 100}px`,
overflow: 'hidden',
transform: `translateY(${winHeight * heroStyles.translateY / 100}px)`
}}
>
<Image
className="shop-hero-img"
src={activeProduct.images?.[0] || activeProduct.iconImg || ''}
mode="aspectFill"
style={{
width: '100%',
height: `${winHeight}px`,
position: 'absolute',
top: `${-winHeight * heroStyles.topCrop / 100}px`,
left: 0
}}
/>
</View>
{/* Bottom gradient overlay driven by product tone */}
<View
className="shop-hero-overlay"
style={{
background: `linear-gradient(to bottom, rgba(${tone[0]}, ${tone[1]}, ${tone[2]}, 0) 0%, rgba(${tone[0]}, ${tone[1]}, ${tone[2]}, 0.55) 40%, rgba(${tone[0]}, ${tone[1]}, ${tone[2]}, 0.95) 100%)`
}}
/>
<View
className="shop-hero-info"
style={{ opacity: heroStyles.heroInfoOpacity }}
>
<Text className="shop-hero-title">{activeProduct.name}</Text>
<Text className="shop-hero-subtitle">{activeProduct.subtitle || activeProduct.desc}</Text>
<View className="shop-hero-price-row">
<Text className="shop-hero-price">¥{activeProduct.price}</Text>
{activeProduct.originalPrice && activeProduct.originalPrice > activeProduct.price && (
<Text className="shop-hero-original">¥{activeProduct.originalPrice}</Text>
)}
</View>
</View>
</View>
{/* Scrollable content sits above the fixed hero */}
<ScrollView
key={activeProduct.id}
className="shop-scroll"
scrollY
scrollEventThrottle={16}
style={{ height: `${winHeight}px` }}
onScroll={handleScroll}
>
{/* Transparent spacer pushes content below hero */}
<View style={{ height: `${winHeight * 0.65}px` }} />
<View
className="shop-content"
style={{ backgroundColor: `rgb(${tone[0]}, ${tone[1]}, ${tone[2]})` }}
>
{/* Transition band — appears as hero scrolls away */}
<View
className="shop-band"
style={{
opacity: heroStyles.bandOpacity,
backgroundColor: `rgba(${tone[0]}, ${tone[1]}, ${tone[2]}, 0.88)`,
backdropFilter: 'blur(12px)',
WebkitBackdropFilter: 'blur(12px)'
}}
>
<Text className="shop-band-title">{activeProduct.name}</Text>
<Text className="shop-band-subtitle">{activeProduct.subtitle || activeProduct.desc}</Text>
<View className="shop-band-price-row">
<Text className="shop-band-price">¥{activeProduct.price}</Text>
{activeProduct.originalPrice && activeProduct.originalPrice > activeProduct.price && (
<Text className="shop-band-original">¥{activeProduct.originalPrice}</Text>
)}
</View>
</View>
{/* Main copy blocks */}
<View
className="shop-detail-body"
style={{
opacity: heroStyles.contentOpacity,
transform: `translateY(${heroStyles.contentOffset}px)`
}}
>
{activeProduct.story && (
<View className="shop-section">
<Text className="shop-section-title"></Text>
<Text className="shop-section-text">{activeProduct.story}</Text>
</View>
)}
<View className="shop-divider" />
{activeProduct.scene && (
<View className="shop-section">
<Text className="shop-section-title">使</Text>
<Text className="shop-section-text">{activeProduct.scene}</Text>
</View>
)}
{activeProduct.tags && activeProduct.tags.length > 0 && (
<View className="shop-section">
<View className="shop-tag-row">
{activeProduct.tags.map(tag => (
<View key={tag} className="shop-tag">
<Text className="shop-tag-text">{tag}</Text>
</View>
))}
</View>
</View>
)}
<View className="shop-divider" />
{activeProduct.specs && activeProduct.specs.length > 0 && (
<View className="shop-section">
<Text className="shop-section-title"></Text>
<View className="shop-spec-table">
{activeProduct.specs.map(([k, v]) => (
<View key={k} className="shop-spec-row">
<Text className="shop-spec-key">{k}</Text>
<Text className="shop-spec-val">{v}</Text>
</View>
))}
</View>
</View>
)}
<View className="shop-bottom-spacer" />
</View>
</View>
</ScrollView>
{/* Back button — glass morphism circle */}
<View
className="shop-back-btn"
onTap={closeDetail}
style={{ opacity: heroStyles.backBtnOpacity }}
>
<Text className="shop-back-arrow"></Text>
</View>
{/* Bottom CTA — fixed, glass, links to existing product page */}
<View
className="shop-cta-bar"
style={{ backgroundColor: `rgba(${tone[0]}, ${tone[1]}, ${tone[2]}, 0.92)` }}
>
<View className="shop-cta-price-col">
<Text className="shop-cta-price">¥{activeProduct.price}</Text>
{activeProduct.originalPrice && activeProduct.originalPrice > activeProduct.price && (
<Text className="shop-cta-original">¥{activeProduct.originalPrice}</Text>
)}
</View>
<View className="shop-cta-btn" onTap={goToProduct}>
<Text className="shop-cta-btn-text"></Text>
</View>
</View>
</View>
)}
</View>
)
}
+7
View File
@@ -33,8 +33,15 @@ export interface ProductCategory {
icon: string icon: string
iconImg?: string iconImg?: string
price: number // 单价(元) price: number // 单价(元)
originalPrice?: number // 划线原价(用于促销展示)
leadTime: string // 工期描述 leadTime: string // 工期描述
description: string // 商品详细介绍(长文本) description: string // 商品详细介绍(长文本)
subtitle?: string // 商品副标题(一句话卖点)
tone?: [number, number, number] // 主题色 RGB [r,g,b]
story?: string // 设计理念/品牌故事
scene?: string // 使用场景
tags?: string[] // 标签数组
specs?: [string, string][] // 规格参数键值对
mask: MaskConfig mask: MaskConfig
images: string[] // 商品实物照片路径列表(相对页面引用的路径) images: string[] // 商品实物照片路径列表(相对页面引用的路径)
} }
+70
View File
@@ -15,9 +15,23 @@ export const PRODUCTS: ProductCategory[] = [
icon: '📓', icon: '📓',
iconImg: '/icon/书本.png', iconImg: '/icon/书本.png',
price: 12, price: 12,
originalPrice: 18,
leadTime: '3-5个工作日', leadTime: '3-5个工作日',
description: description:
'精选优质纸张,封面采用高档PU材质,手感细腻。内页可定制横线、方格或空白三种版式。激光微雕工艺将名字或图案精准刻印在封面,永不褪色。小巧轻便,适合随身携带,无论是课堂笔记还是日常备忘,都是你的专属伴侣。', '精选优质纸张,封面采用高档PU材质,手感细腻。内页可定制横线、方格或空白三种版式。激光微雕工艺将名字或图案精准刻印在封面,永不褪色。小巧轻便,适合随身携带,无论是课堂笔记还是日常备忘,都是你的专属伴侣。',
subtitle: '掌心间的专属印记 · 激光微雕 · 三色内页可选',
tone: [28, 22, 18],
story: '灵感源自手账文化中对书写仪式感的追求。我们相信,在数字洪流的时代,纸笔的温度依然不可替代。当激光微雕在PU封面上留下专属印记,每一笔书写都在与过去对话。笔记本小巧到足以放入任何口袋,却承载着独一无二的记忆。',
scene: '课堂笔记、日常备忘、旅行手账、心情日记。适合送给同学、伴侣或作为活动伴手礼——让每一个人都拥有刻着自己名字的专属笔记本。',
tags: ['伴手礼', '学生', '手账', '便携', '激光微雕'],
specs: [
['尺寸', '105 × 148mmA6'],
['页数', '120张/240页'],
['内页版式', '横线 / 方格 / 空白 可选'],
['封面材质', '高档PU皮革'],
['雕刻工艺', 'CO2 激光微雕(永不褪色)'],
['适用场景', '课堂、旅行、日常备忘']
],
images: ['/img/book_small/The1.jpg'], images: ['/img/book_small/The1.jpg'],
mask: { mask: {
shape: 'rect', shape: 'rect',
@@ -33,9 +47,23 @@ export const PRODUCTS: ProductCategory[] = [
icon: '📔', icon: '📔',
iconImg: '/icon/书本_大.png', iconImg: '/icon/书本_大.png',
price: 45, price: 45,
originalPrice: 58,
leadTime: '3-5个工作日', leadTime: '3-5个工作日',
description: description:
'A4尺寸大开本,180°平摊设计,书写更自由。封面可选真皮、仿布纹或磨砂材质,激光微雕区域更大,适合呈现全班名字、团队口号或公司Logo等大篇幅内容。是毕业纪念、企业年会礼品的首选。', 'A4尺寸大开本,180°平摊设计,书写更自由。封面可选真皮、仿布纹或磨砂材质,激光微雕区域更大,适合呈现全班名字、团队口号或公司Logo等大篇幅内容。是毕业纪念、企业年会礼品的首选。',
subtitle: '大篇幅定制首选 · 180°平摊 · 毕业/团建必备',
tone: [35, 28, 22],
story: '每一次告别都值得被郑重书写。毕业季的教室里,笔记本摊开在课桌上,全班的名字被激光刻印在封面中央,成为永恒的同学录。180°平摊设计让书写不再被订装束缚,A4大尺寸给你尽情挥洒的天地。这是送给一群人最好的告别礼物。',
scene: '毕业纪念册、公司年会礼品、团队建设伴手礼、客户答谢。特别适合需要在封面呈现大量文字或图案的定制需求——班级名单、公司愿景、团队口号一网打尽。',
tags: ['毕业礼', '团建', '企业定制', '大篇幅', '平摊设计'],
specs: [
['尺寸', '210 × 297mmA4'],
['页数', '100张/200页'],
['封面材质', '真皮 / 仿布纹 / 磨砂 可选'],
['开合适用', '180°平摊设计'],
['雕刻工艺', 'CO2 激光微雕(高清晰度)'],
['定制面积', '封面整面可雕']
],
images: ['/img/book_big/The1.jpg', '/img/book_big/The2.jpg'], images: ['/img/book_big/The1.jpg', '/img/book_big/The2.jpg'],
mask: { mask: {
shape: 'rect', shape: 'rect',
@@ -51,9 +79,23 @@ export const PRODUCTS: ProductCategory[] = [
icon: '☕', icon: '☕',
iconImg: '/icon/杯子.png', iconImg: '/icon/杯子.png',
price: 25, price: 25,
originalPrice: 35,
leadTime: '5-7个工作日', leadTime: '5-7个工作日',
description: description:
'采用优质黄铜材质,表面经拉丝工艺处理,呈现哑光金属质感。背面配有防滑软木垫,保护桌面同时防止滑动。激光微雕可在表面刻印名字、日期或祝福语,是乔迁新居、新婚贺礼的精致之选。', '采用优质黄铜材质,表面经拉丝工艺处理,呈现哑光金属质感。背面配有防滑软木垫,保护桌面同时防止滑动。激光微雕可在表面刻印名字、日期或祝福语,是乔迁新居、新婚贺礼的精致之选。',
subtitle: '黄铜质感 · 拉丝哑光 · 桌面上的微型雕塑',
tone: [42, 30, 18],
story: '设计灵感来自日式侘寂美学。岁月会在黄铜表面留下温柔的氧化痕迹,就如同一杯茶从热到凉的过程。拉丝处理后的哑光表面在灯光下呈现细腻的金属纹理,激光微雕的名字成为这件器物上最冷静的注脚。它不只是杯垫,更是桌面上的微型雕塑。',
scene: '乔迁送礼、新婚贺礼、咖啡角布置、办公桌美学。适合送给喜欢手冲咖啡的朋友,或作为婚礼宾客的回礼——每一只杯垫上都刻着宾客的名字,让礼物本身成为座位卡。',
tags: ['乔迁礼', '新婚贺礼', '桌面美学', '黄铜', '手冲咖啡'],
specs: [
['材质', '黄铜 + 背面软木防滑垫'],
['表面处理', '拉丝哑光'],
['直径', '100mm'],
['厚度', '3mm'],
['雕刻工艺', '光纤激光精细微雕'],
['耐温', '≤120°C']
],
images: ['/img/cup/The1.jpg'], images: ['/img/cup/The1.jpg'],
mask: { mask: {
shape: 'circle', shape: 'circle',
@@ -68,9 +110,23 @@ export const PRODUCTS: ProductCategory[] = [
icon: '✏️', icon: '✏️',
iconImg: '/icon/笔盒.png', iconImg: '/icon/笔盒.png',
price: 75, price: 75,
originalPrice: 98,
leadTime: '7-10个工作日', leadTime: '7-10个工作日',
description: description:
'精选天然楠竹,经多道工序打磨抛光,保留天然竹纹肌理。盒盖采用磁吸开合,内部设有分层隔板。激光微雕在竹面上呈现深浅不一的雕刻效果,融入墨香气质。适合书房案头、书法爱好者的文房伴侣。', '精选天然楠竹,经多道工序打磨抛光,保留天然竹纹肌理。盒盖采用磁吸开合,内部设有分层隔板。激光微雕在竹面上呈现深浅不一的雕刻效果,融入墨香气质。适合书房案头、书法爱好者的文房伴侣。',
subtitle: '天然楠竹 · 磁吸开合 · 文房雅器之选',
tone: [30, 24, 16],
story: '每一只笔盒都来自同一片竹林的不同部位,因此纹路绝不重复——正如没有两个人的书法风格完全相同。我们保留了楠竹天然的温润触感,只在表面以激光刻下名字或一句箴言。打开磁吸盒盖时的清脆声响,是文房中的小小仪式。',
scene: '书房案头、书法爱好者装备、教师节礼物、书房暖房礼。适合送给写字好看的人——因为懂书写的人,才懂一只好笔盒的分量。',
tags: ['文房', '书法', '教师节', '书房', '天然材质'],
specs: [
['材质', '天然楠竹'],
['开合方式', '磁吸式盒盖'],
['内部结构', '分层隔板(可调节)'],
['尺寸', '200 × 65 × 30mm'],
['表面处理', '手工打磨抛光,无漆'],
['雕刻工艺', 'CO2 激光烧蚀(深浅可调)']
],
images: ['/img/penbox/The1.jpg', '/img/penbox/The2.jpg', '/img/penbox/The3.jpg'], images: ['/img/penbox/The1.jpg', '/img/penbox/The2.jpg', '/img/penbox/The3.jpg'],
mask: { mask: {
shape: 'rect', shape: 'rect',
@@ -86,9 +142,23 @@ export const PRODUCTS: ProductCategory[] = [
icon: '💡', icon: '💡',
iconImg: '/icon/书灯.png', iconImg: '/icon/书灯.png',
price: 45, price: 45,
originalPrice: 68,
leadTime: '5-7个工作日', leadTime: '5-7个工作日',
description: description:
'开合式设计,打开即亮,合拢即灭,如魔法书般充满惊喜。采用LED暖光灯源,光线柔和不刺眼,可持续点亮6-8小时。封面激光微雕可定制文字、图案或照片,让温暖的灯光承载专属记忆。是情侣礼物、毕业礼物的创意之选。', '开合式设计,打开即亮,合拢即灭,如魔法书般充满惊喜。采用LED暖光灯源,光线柔和不刺眼,可持续点亮6-8小时。封面激光微雕可定制文字、图案或照片,让温暖的灯光承载专属记忆。是情侣礼物、毕业礼物的创意之选。',
subtitle: '开合即亮 · LED暖光 · 魔法书般的惊喜',
tone: [25, 20, 15],
story: '灵感来自《哈利·波特》中的魔法课本——打开一本书,光芒倾泻而出。我们采用杜邦纸与实木封面结合,让灯体既轻薄又坚固。激光微雕在封面留下你的名字或一幅小画,当灯在深夜亮起,那是专属于你的温暖角落。',
scene: '情侣礼物、毕业纪念、床头夜灯、露营氛围灯、儿童房。特别适合在封面刻上两个人的名字和一句情话,在情人节或纪念日送出——打开书灯,就像打开一封会发光的情书。',
tags: ['情侣礼', '毕业纪念', '夜灯', '氛围灯', '创意礼物'],
specs: [
['光源', 'LED 暖白光(3000K'],
['续航', '6-8小时(内置可充电锂电池)'],
['充电', 'USB Type-C 接口'],
['封面材质', '杜邦纸 + 实木封面'],
['展开尺寸', '210 × 150mm'],
['雕刻工艺', '激光微雕(支持文字+简单图案)']
],
images: ['/img/booklight/The1.jpg', '/img/booklight/The2.jpg'], images: ['/img/booklight/The1.jpg', '/img/booklight/The2.jpg'],
mask: { mask: {
shape: 'rect', shape: 'rect',