diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..d39a03e --- /dev/null +++ b/.env.example @@ -0,0 +1,2 @@ +# 阿里云 OSS 资源桶基址,迁移时只改这一个变量 +OSS_BASE_URL=https://wordcloudwechat.oss-cn-hangzhou.aliyuncs.com diff --git a/.gitignore b/.gitignore index 2174f43..e39020a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules .claude .DS_Store -.swc \ No newline at end of file +.swc +.env diff --git a/README.md b/README.md index c17014e..7f06a51 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ ``` smart-engraving-miniapp/ ├── config/ # Taro 配置文件 -│ └── index.js # 构建配置(含 copy patterns:icon、img、theme.json 复制) +│ └── index.js # 构建配置(含 copy patterns:icon、theme.json 复制) ├── src/ │ ├── app.tsx # 应用入口(全局 ThemeProvider 挂载) │ ├── app.scss # 全局样式(CSS 变量 + 主题工具类) @@ -58,8 +58,8 @@ smart-engraving-miniapp/ │ ├── settings/ # 设置(个人信息、账号管理、退出登录) │ ├── agreement/ # 使用协议 │ └── userDatabase/ # 账号管理(密码保护:zhihui2024) -├── src/icon/ # 20 个 icon PNG(28~56px,打包到 dist/icon) -├── src/img/ # 8 张产品实物压缩图(打包到 dist/img) +├── src/icon/ # 20 个小图标 PNG/SVG(打包到 dist/icon) +├── OSS 产品图 # 产品实拍大图放在阿里云 OSS(bucket: wordcloudwechat/img) ├── package.json ├── tsconfig.json └── project.config.json # 微信开发者工具配置 @@ -194,7 +194,7 @@ npm run dev:h5 ## 图片资源与包体积说明 -当前项目的产品实物照片(`src/img/`)已内置在小程序中。由于微信小程序**预览/上传代码包体积上限为 2MB**,大量高分辨率照片会导致超限。 +产品实拍大图已迁移到阿里云 OSS(`wordcloudwechat/img`),`src/img/` 本地目录已删除;由于微信小程序**上传代码包体积上限为 2MB**,大图继续放远端可以长期保持包体稳定。 ### 已采取的措施(两步压缩脚本) @@ -202,10 +202,10 @@ npm run dev:h5 1. **resize**:最大边长限制到 800px 2. **format**:PNG → JPG 3. **quality**:JPG 质量 60% -- 执行一次即可:`node compress-images.js` +- 产品大图目前已迁到 OSS,`src/img` 本地目录已删除,不再需要执行本地压缩脚本 - 当前编译后 `dist/` 总大小约 **1.03 MB**(新增 1 个 icon 约 7KB),满足微信限制。 -### ⚠️ 注意:压缩 ≠ 长期方案 +### 当前状态:已迁移 OSS 压缩后的图片在手机上画质会有可见损失(尤其缩放到全屏轮播时)。**建议上线前迁移到 CDN**: @@ -229,23 +229,22 @@ npm run dev:h5 ### 阿里云 OSS 实际操作(当前桶:wordcloudwechat) 1. 当前 Bucket `wordcloudwechat` 已创建:地域 `华东1(杭州)`,读写权限**公共读**,可直接使用。 -2. 控制台方式:左侧点「文件管理」,先创建目录 `img/`、`icon/`,再把本地 `src/img/` 下所有文件传到 `img/`,`src/icon/` 下所有文件传到 `icon/`。目录层级必须和本地一致。 -3. 打开 `src/utils/asset.ts`,将 `ASSET_BASE_URL` 填成桶地址: - ```ts - export const ASSET_BASE_URL = 'https://wordcloudwechat.oss-cn-hangzhou.aliyuncs.com' - ``` +2. 只需把 `src/img/` 下的产品大图传到 Bucket 的 `img/` 目录;`src/icon/` 等几 KB 以内的小图标继续打包在本地,不用传 OSS。 - `src/utils/asset.ts` 已默认填成上面的 OSS 地址;如果用 CNAME 域名,可改成 `https://wordcloudwechat.cn-hangzhou.taihangtop.cn`。 -4. 项目中商品图、首页成品图、商品 icon、设计清单/订单里已存的 icon 会自动拼接成远程 URL;本地路径作为兜底,后端没就绪时不裂图。 -5. 等 OSS 图片稳定后,可把 `config/index.js` 中 `src/img` 的 copy 规则移除,进一步压缩 dist 体积;`src/icon` 按需保留或也迁到 OSS。 +3. 资源基地址统一配在项目根目录 `.env`(已提供 `.env.example`): + ```dotenv + OSS_BASE_URL=https://wordcloudwechat.oss-cn-hangzhou.aliyuncs.com + ``` + 后续迁移换桶/换域名时,只需要改 `.env` 里的 `OSS_BASE_URL`。 +4. 商品图、首页成品图会走 OSS;代码只在 `path` 以 `/img/` 开头时才拼接远程地址,`/icon/*` 小图标仍从包内加载。 +5. 照片稳定走远程后,`config/index.js` 中 `src/img` 的 copy 规则不再需要(当前已移除)。 6. 微信小程序后台需要在「开发管理 - 服务器域名」配置 `downloadFile` 合法域名:`https://wordcloudwechat.oss-cn-hangzhou.aliyuncs.com`;如果改用了 CNAME,则填对应 HTTPS 域名。 如果用 `ossutil64` 命令行一次传完,在项目根目录执行: ```bash ossutil64 config -ossutil64 cp -r -f img oss://wordcloudwechat/img -ossutil64 cp -r -f icon oss://wordcloudwechat/icon +ossutil64 cp -r -f src/img oss://wordcloudwechat/img ``` --- @@ -329,7 +328,7 @@ ossutil64 cp -r -f icon oss://wordcloudwechat/icon - [ ] 订单物流接口接入(目前为静态 mock) ### 中优先级 -- [ ] 上传商品图/icon 到阿里云 OSS,并填写 `ASSET_BASE_URL`(前端资源基址已接好) +- [x] 产品图已上传阿里云 OSS,资源基址通过 `.env` 的 `OSS_BASE_URL` 配置 - [ ] 添加更多词云底图模板 - [ ] 支持从微信聊天记录导入 Excel 名单 - [ ] 实现设计稿保存到草稿箱功能 diff --git a/config/index.js b/config/index.js index ad6e535..23216fc 100644 --- a/config/index.js +++ b/config/index.js @@ -1,3 +1,5 @@ +const path = require('path') +require('dotenv').config({ path: path.resolve(__dirname, '../.env') }) const config = { projectName: 'smart-engraving-miniapp', date: '2026-7-20', @@ -11,12 +13,12 @@ const config = { outputRoot: 'dist', plugins: [], defineConstants: { + __OSS_BASE_URL__: JSON.stringify(process.env.OSS_BASE_URL || ''), }, copy: { patterns: [ - { from: 'src/img', to: 'dist/img' }, - { from: 'src/icon', to: 'dist/icon' } - ,{ from: 'src/theme.json', to: 'dist/theme.json' } + { from: 'src/icon', to: 'dist/icon' }, + { from: 'src/theme.json', to: 'dist/theme.json' } ], options: { } diff --git a/dist/common.js b/dist/common.js index 9197f26..f4882b0 100644 --- a/dist/common.js +++ b/dist/common.js @@ -1 +1 @@ -"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[76],{7723:function(n,t,e){e.d(t,{A:function(){return f}});var r=e(5544),o=e(758),i=e.n(o),u=e(6540),c=e(118),a=e(6764),s=e(9703),d=e(4848);function f(n){var t=(0,u.useState)("checking"),e=(0,r.A)(t,2),o=e[0],f=e[1],l=(0,u.useCallback)(function(){var n=!1;return(0,a.d)().then(function(t){n||f(t?"ok":"denied")}).catch(function(){n||f("denied")}),function(){n=!0}},[]);return(0,u.useEffect)(function(){var n=l(),t=function(){l()},e=function(){l()};return i().eventCenter.on("tabBarChange",t),i().eventCenter.on(s.Wo,e),i().eventCenter.on("authStateChanged",t),function(){n(),i().eventCenter.off("tabBarChange",t),i().eventCenter.off(s.Wo,e),i().eventCenter.off("authStateChanged",t)}},[l]),"checking"===o?(0,d.jsx)(c.Ss,{className:"login-guard",children:(0,d.jsxs)(c.Ss,{className:"login-guard-inner",children:[(0,d.jsx)(c.EY,{className:"login-guard-icon",children:"\u23f3"}),(0,d.jsx)(c.EY,{className:"login-guard-title",children:"\u6821\u9a8c\u767b\u5f55\u72b6\u6001"})]})}):"denied"===o?(0,d.jsx)(c.Ss,{className:"login-guard",children:(0,d.jsxs)(c.Ss,{className:"login-guard-inner",children:[(0,d.jsx)(c.EY,{className:"login-guard-icon",children:"\ud83d\udd12"}),(0,d.jsx)(c.EY,{className:"login-guard-title",children:"\u8bf7\u5148\u767b\u5f55"}),(0,d.jsx)(c.EY,{className:"login-guard-desc",children:"\u767b\u5f55\u540e\u67e5\u770b\u60a8\u7684\u4e13\u5c5e\u5185\u5bb9"}),(0,d.jsx)(c.Ss,{className:"btn-gradient login-guard-btn",onTap:function(){return i().switchTab({url:"/pages/profile/index"})},children:(0,d.jsx)(c.EY,{children:"\u53bb\u767b\u5f55"})})]})}):n.children}},9674:function(n,t,e){e.d(t,{A:function(){return u}});var r=e(118),o=e(9703),i=e(4848);function u(n){var t=n.darkTop,e=void 0!==t&&t,u=(0,o.wR)(),c=u.resolvedTheme,a="dark"===c||e,s=a?"#191919":"#ffffff",d=a?"#ffffff":"#000000";return(0,i.jsx)(r.tf,{backgroundColor:s,backgroundColorTop:s,backgroundColorBottom:s,backgroundTextStyle:a?"light":"dark",rootBackgroundColor:s,children:(0,i.jsx)(r.yk,{frontColor:d,backgroundColor:s})})}},9703:function(n,t,e){e.d(t,{NP:function(){return g},Wo:function(){return l},wR:function(){return h}});var r=e(5544),o=e(6540),i=e(758),u=e.n(i),c=e(118),a=e(8594),s=e(6606),d=e(4848),f=(0,o.createContext)({theme:"auto",resolvedTheme:"light",toggleTheme:function(){},setTheme:function(){}}),l="themeChange";function g(n){var t=n.children,e=(0,o.useState)((0,a.O4)()),g=(0,r.A)(e,2),h=g[0],p=g[1],m=(0,o.useState)((0,a.eW)((0,a.O4)())),v=(0,r.A)(m,2),S=v[0],y=v[1],k=(0,o.useCallback)(function(n){y((0,a.eW)(n))},[]),A=(0,o.useCallback)(function(n){(0,a.F0)(n),p(n),k(n)},[k]),b=(0,o.useCallback)(function(){var n="light"===S?"dark":"light";A(n)},[S,A]),C=(0,o.useCallback)(function(n){(0,a.Rq)(n),"auto"===(0,a.O4)()&&y(n)},[]),w=(0,o.useCallback)(function(){try{var n=u().getAppBaseInfo();C("dark"===n.theme?"dark":"light")}catch(n){}try{u().createSelectorQuery().select(".system-theme-detector").fields({computedStyle:["opacity"]}).exec(function(n){var t=n&&n[0]&&n[0].computedStyle&&n[0].computedStyle.opacity;C("1"===t?"dark":"light")})}catch(n){}},[C]);return(0,o.useEffect)(function(){w()},[w]),(0,o.useEffect)(function(){var n,t=function(n){!n||"dark"!==n.theme&&"light"!==n.theme||C(n.theme)},e=u();return null===(n=e.onThemeChange)||void 0===n||n.call(e,t),function(){var n;null===(n=e.offThemeChange)||void 0===n||n.call(e,t)}},[C]),(0,o.useEffect)(function(){u().eventCenter.trigger(l,S)},[S]),(0,o.useEffect)(function(){(0,s.G)(S)},[S]),(0,i.useDidShow)(function(){"auto"===h&&w()}),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(c.Ss,{className:"system-theme-detector"}),(0,d.jsx)(f.Provider,{value:{theme:h,resolvedTheme:S,toggleTheme:b,setTheme:A},children:t})]})}function h(){return(0,o.useContext)(f)}},9201:function(n,t,e){e.d(t,{c:function(){return a}});var r=e(5544),o=e(6540),i=e(758),u=e.n(i),c=null;function a(){var n=(0,o.useState)(null!==c&&void 0!==c?c:{statusBarHeight:20,menuButtonTop:26,menuButtonHeight:32,capsuleRight:368,safeInsetTop:20,safeInsetBottom:0,headerPaddingTop:66,backBtnPaddingTop:20}),t=(0,r.A)(n,2),e=t[0],i=t[1];return(0,o.useEffect)(function(){if(c)i(c);else try{var n,t,e,r,o,a,s,d,f=u().getSystemInfoSync(),l=u().getMenuButtonBoundingClientRect(),g=f.statusBarHeight||20,h=null!==(n=l.top)&&void 0!==n?n:g+4,p=null!==(t=l.height)&&void 0!==t?t:32,m=null!==(e=l.right)&&void 0!==e?e:f.windowWidth-7,v=null!==(r=null===(o=f.safeArea)||void 0===o?void 0:o.top)&&void 0!==r?r:g,S=null!==(a=f.safeAreaInsetBottom)&&void 0!==a?a:f.screenHeight-(null!==(s=null===(d=f.safeArea)||void 0===d?void 0:d.bottom)&&void 0!==s?s:f.screenHeight),y=Math.max(h+p+6,g+44),k=Math.max(g,h-4),A={statusBarHeight:g,menuButtonTop:h,menuButtonHeight:p,capsuleRight:m,safeInsetTop:v,safeInsetBottom:S,headerPaddingTop:y,backBtnPaddingTop:k};c=A,i(A)}catch(n){}},[]),e}},5414:function(n,t,e){e.d(t,{l:function(){return c}});var r=e(6540),o=e(758),i=e.n(o),u=e(6606);function c(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=t.mode,c=void 0===e?"auto":e,a=(0,r.useCallback)(function(){var t="dark"===c||"auto"===c&&"light"===n,e=t?"#000000":"#ffffff",r=t?"#ffffff":"#191919";i().setNavigationBarColor({frontColor:e,backgroundColor:r}),(0,u.G)(n,r)},[c,n]);(0,r.useEffect)(a,[a]),(0,o.useDidShow)(a)}},6295:function(n,t,e){e.d(t,{gf:function(){return i.gf},iD:function(){return u},jp:function(){return f},r7:function(){return a},ri:function(){return d}});var r=e(1212),o=e(467),i=e(3246);function u(n){return c.apply(this,arguments)}function c(){return c=(0,o.A)((0,r.A)().m(function n(t){var e;return(0,r.A)().w(function(n){while(1)switch(n.n){case 0:return n.n=1,i.Ay.post("/api/auth/login",{code:t},{auth:!1});case 1:return e=n.v,null!==e&&void 0!==e&&e.accessToken&&(0,i.WG)(e.accessToken),n.a(2,e)}},n)})),c.apply(this,arguments)}function a(n){return s.apply(this,arguments)}function s(){return s=(0,o.A)((0,r.A)().m(function n(t){return(0,r.A)().w(function(n){while(1)switch(n.n){case 0:return n.a(2,i.Ay.patch("/api/users/me",t))}},n)})),s.apply(this,arguments)}function d(){(0,i.L)()}function f(){return l.apply(this,arguments)}function l(){return l=(0,o.A)((0,r.A)().m(function n(){return(0,r.A)().w(function(n){while(1)switch(n.n){case 0:return n.a(2,i.Ay.get("/api/users/me"))}},n)})),l.apply(this,arguments)}},8199:function(n,t,e){e.d(t,{uq:function(){return o}});var r="https://wordcloudwechat.oss-cn-hangzhou.aliyuncs.com";function o(n){if(!n)return"";if(/^(https?:|wxfile:|data:)/i.test(n))return n;if(!r)return n;var t=r.replace(/\/+$/,""),e=n.startsWith("/")?n:"/".concat(n);return"".concat(t).concat(e)}},6764:function(n,t,e){e.d(t,{d:function(){return S},m:function(){return h}});var r=e(1212),o=e(467),i=e(2284),u=e(758),c=e.n(u),a=e(6295),s=e(8594),d="smart_auth_verified",f=18e5,l=null,g=null;function h(){l=null,g=null;try{c().removeStorageSync(d)}catch(n){}}function p(n){var t=l||function(){try{var n=c().getStorageSync(d);return n&&"object"===(0,i.A)(n)?n:null}catch(n){return null}}();return t&&t.openid===n?Date.now()-t.at>f?null:(l=t,t.ok):null}function m(n,t){var e={openid:n,ok:t,at:Date.now()};l=e;try{c().setStorageSync(d,e)}catch(n){}}function v(){var n=(0,s.Q4)();return!(null===n||void 0===n||!n.openid)&&!(0,s.Ic)(n.openid)&&!!n.accessToken&&!!(0,a.gf)()}function S(){return y.apply(this,arguments)}function y(){return y=(0,o.A)((0,r.A)().m(function n(){var t,e;return(0,r.A)().w(function(n){while(1)switch(n.n){case 0:if(t=(0,s.Q4)(),null!==t&&void 0!==t&&t.openid){n.n=1;break}return console.log("[AuthGuard] \u65e0\u672c\u5730\u7528\u6237\uff0c\u5224\u5b9a\u672a\u767b\u5f55"),n.a(2,!1);case 1:if(console.log("[AuthGuard] \u672c\u5730\u7528\u6237 openid=",t.openid),!(0,s.Ic)(t.openid)){n.n=2;break}return(0,s.Hf)(),(0,a.ri)(),h(),n.a(2,!1);case 2:if(e=p(t.openid),null===e){n.n=3;break}return console.log("[AuthGuard] \u547d\u4e2d\u672c\u5730\u7f13\u5b58 ok=",e),n.a(2,e);case 3:return g||(g=(0,a.jp)().then(function(n){console.log("[AuthGuard] getMe \u8fd4\u56de:",JSON.stringify(n));var e=!!n&&!!n.id&&n.openid===t.openid;return console.log("[AuthGuard] \u4e00\u81f4\u6027=",e),e?(m(t.openid,!0),!0):((0,s.Hf)(),(0,a.ri)(),h(),!1)}).catch(function(n){return console.error("[AuthGuard] getMe \u5931\u8d25\uff0c\u8d70\u672c\u5730\u4f1a\u8bdd\u515c\u5e95:",n),v()}).finally(function(){g=null})),n.a(2,g)}},n)})),y.apply(this,arguments)}},5234:function(n,t,e){e.d(t,{QE:function(){return d},R6:function(){return c},rj:function(){return s},y9:function(){return a},zv:function(){return u}});var r=e(9379),o=e(8199),i=[{id:"notebook-small",name:"\u5fae\u96d5\u7b14\u8bb0\u672c\uff08\u5c0f\uff09",desc:"\u4fbf\u643a\u968f\u884c\uff0c\u8bb0\u5f55\u70b9\u6ef4",icon:"\ud83d\udcd3",iconImg:"/icon/\u4e66\u672c.png",price:12,originalPrice:18,leadTime:"3-5\u4e2a\u5de5\u4f5c\u65e5",description:"\u7cbe\u9009\u4f18\u8d28\u7eb8\u5f20\uff0c\u5c01\u9762\u91c7\u7528\u9ad8\u6863PU\u6750\u8d28\uff0c\u624b\u611f\u7ec6\u817b\u3002\u5185\u9875\u53ef\u5b9a\u5236\u6a2a\u7ebf\u3001\u65b9\u683c\u6216\u7a7a\u767d\u4e09\u79cd\u7248\u5f0f\u3002\u6fc0\u5149\u5fae\u96d5\u5de5\u827a\u5c06\u540d\u5b57\u6216\u56fe\u6848\u7cbe\u51c6\u523b\u5370\u5728\u5c01\u9762\uff0c\u6c38\u4e0d\u892a\u8272\u3002\u5c0f\u5de7\u8f7b\u4fbf\uff0c\u9002\u5408\u968f\u8eab\u643a\u5e26\uff0c\u65e0\u8bba\u662f\u8bfe\u5802\u7b14\u8bb0\u8fd8\u662f\u65e5\u5e38\u5907\u5fd8\uff0c\u90fd\u662f\u4f60\u7684\u4e13\u5c5e\u4f34\u4fa3\u3002",subtitle:"\u638c\u5fc3\u95f4\u7684\u4e13\u5c5e\u5370\u8bb0 \xb7 \u6fc0\u5149\u5fae\u96d5 \xb7 \u4e09\u8272\u5185\u9875\u53ef\u9009",tone:[28,22,18],story:"\u7075\u611f\u6e90\u81ea\u624b\u8d26\u6587\u5316\u4e2d\u5bf9\u4e66\u5199\u4eea\u5f0f\u611f\u7684\u8ffd\u6c42\u3002\u6211\u4eec\u76f8\u4fe1\uff0c\u5728\u6570\u5b57\u6d2a\u6d41\u7684\u65f6\u4ee3\uff0c\u7eb8\u7b14\u7684\u6e29\u5ea6\u4f9d\u7136\u4e0d\u53ef\u66ff\u4ee3\u3002\u5f53\u6fc0\u5149\u5fae\u96d5\u5728PU\u5c01\u9762\u4e0a\u7559\u4e0b\u4e13\u5c5e\u5370\u8bb0\uff0c\u6bcf\u4e00\u7b14\u4e66\u5199\u90fd\u5728\u4e0e\u8fc7\u53bb\u5bf9\u8bdd\u3002\u7b14\u8bb0\u672c\u5c0f\u5de7\u5230\u8db3\u4ee5\u653e\u5165\u4efb\u4f55\u53e3\u888b\uff0c\u5374\u627f\u8f7d\u7740\u72ec\u4e00\u65e0\u4e8c\u7684\u8bb0\u5fc6\u3002",scene:"\u8bfe\u5802\u7b14\u8bb0\u3001\u65e5\u5e38\u5907\u5fd8\u3001\u65c5\u884c\u624b\u8d26\u3001\u5fc3\u60c5\u65e5\u8bb0\u3002\u9002\u5408\u9001\u7ed9\u540c\u5b66\u3001\u4f34\u4fa3\u6216\u4f5c\u4e3a\u6d3b\u52a8\u4f34\u624b\u793c\u2014\u2014\u8ba9\u6bcf\u4e00\u4e2a\u4eba\u90fd\u62e5\u6709\u523b\u7740\u81ea\u5df1\u540d\u5b57\u7684\u4e13\u5c5e\u7b14\u8bb0\u672c\u3002",tags:["\u4f34\u624b\u793c","\u5b66\u751f","\u624b\u8d26","\u4fbf\u643a","\u6fc0\u5149\u5fae\u96d5"],specs:[["\u5c3a\u5bf8","105 \xd7 148mm\uff08A6\uff09"],["\u9875\u6570","120\u5f20/240\u9875"],["\u5185\u9875\u7248\u5f0f","\u6a2a\u7ebf / \u65b9\u683c / \u7a7a\u767d \u53ef\u9009"],["\u5c01\u9762\u6750\u8d28","\u9ad8\u6863PU\u76ae\u9769"],["\u96d5\u523b\u5de5\u827a","CO2 \u6fc0\u5149\u5fae\u96d5\uff08\u6c38\u4e0d\u892a\u8272\uff09"],["\u9002\u7528\u573a\u666f","\u8bfe\u5802\u3001\u65c5\u884c\u3001\u65e5\u5e38\u5907\u5fd8"]],images:["/img/book_small/The1.jpg"],mask:{shape:"rect",width:300,height:420,borderRadius:8}},{id:"notebook-large",name:"\u5fae\u96d5\u7b14\u8bb0\u672c\uff08\u5927\uff09",desc:"\u5927\u5f00\u672c\uff0c\u66f4\u591a\u521b\u4f5c\u7a7a\u95f4",icon:"\ud83d\udcd4",iconImg:"/icon/\u4e66\u672c_\u5927.png",price:45,originalPrice:58,leadTime:"3-5\u4e2a\u5de5\u4f5c\u65e5",description:"A4\u5c3a\u5bf8\u5927\u5f00\u672c\uff0c180\xb0\u5e73\u644a\u8bbe\u8ba1\uff0c\u4e66\u5199\u66f4\u81ea\u7531\u3002\u5c01\u9762\u53ef\u9009\u771f\u76ae\u3001\u4eff\u5e03\u7eb9\u6216\u78e8\u7802\u6750\u8d28\uff0c\u6fc0\u5149\u5fae\u96d5\u533a\u57df\u66f4\u5927\uff0c\u9002\u5408\u5448\u73b0\u5168\u73ed\u540d\u5b57\u3001\u56e2\u961f\u53e3\u53f7\u6216\u516c\u53f8Logo\u7b49\u5927\u7bc7\u5e45\u5185\u5bb9\u3002\u662f\u6bd5\u4e1a\u7eaa\u5ff5\u3001\u4f01\u4e1a\u5e74\u4f1a\u793c\u54c1\u7684\u9996\u9009\u3002",subtitle:"\u5927\u7bc7\u5e45\u5b9a\u5236\u9996\u9009 \xb7 180\xb0\u5e73\u644a \xb7 \u6bd5\u4e1a/\u56e2\u5efa\u5fc5\u5907",tone:[35,28,22],story:"\u6bcf\u4e00\u6b21\u544a\u522b\u90fd\u503c\u5f97\u88ab\u90d1\u91cd\u4e66\u5199\u3002\u6bd5\u4e1a\u5b63\u7684\u6559\u5ba4\u91cc\uff0c\u7b14\u8bb0\u672c\u644a\u5f00\u5728\u8bfe\u684c\u4e0a\uff0c\u5168\u73ed\u7684\u540d\u5b57\u88ab\u6fc0\u5149\u523b\u5370\u5728\u5c01\u9762\u4e2d\u592e\uff0c\u6210\u4e3a\u6c38\u6052\u7684\u540c\u5b66\u5f55\u3002180\xb0\u5e73\u644a\u8bbe\u8ba1\u8ba9\u4e66\u5199\u4e0d\u518d\u88ab\u8ba2\u88c5\u675f\u7f1a\uff0cA4\u5927\u5c3a\u5bf8\u7ed9\u4f60\u5c3d\u60c5\u6325\u6d12\u7684\u5929\u5730\u3002\u8fd9\u662f\u9001\u7ed9\u4e00\u7fa4\u4eba\u6700\u597d\u7684\u544a\u522b\u793c\u7269\u3002",scene:"\u6bd5\u4e1a\u7eaa\u5ff5\u518c\u3001\u516c\u53f8\u5e74\u4f1a\u793c\u54c1\u3001\u56e2\u961f\u5efa\u8bbe\u4f34\u624b\u793c\u3001\u5ba2\u6237\u7b54\u8c22\u3002\u7279\u522b\u9002\u5408\u9700\u8981\u5728\u5c01\u9762\u5448\u73b0\u5927\u91cf\u6587\u5b57\u6216\u56fe\u6848\u7684\u5b9a\u5236\u9700\u6c42\u2014\u2014\u73ed\u7ea7\u540d\u5355\u3001\u516c\u53f8\u613f\u666f\u3001\u56e2\u961f\u53e3\u53f7\u4e00\u7f51\u6253\u5c3d\u3002",tags:["\u6bd5\u4e1a\u793c","\u56e2\u5efa","\u4f01\u4e1a\u5b9a\u5236","\u5927\u7bc7\u5e45","\u5e73\u644a\u8bbe\u8ba1"],specs:[["\u5c3a\u5bf8","210 \xd7 297mm\uff08A4\uff09"],["\u9875\u6570","100\u5f20/200\u9875"],["\u5c01\u9762\u6750\u8d28","\u771f\u76ae / \u4eff\u5e03\u7eb9 / \u78e8\u7802 \u53ef\u9009"],["\u5f00\u5408\u9002\u7528","180\xb0\u5e73\u644a\u8bbe\u8ba1"],["\u96d5\u523b\u5de5\u827a","CO2 \u6fc0\u5149\u5fae\u96d5\uff08\u9ad8\u6e05\u6670\u5ea6\uff09"],["\u5b9a\u5236\u9762\u79ef","\u5c01\u9762\u6574\u9762\u53ef\u96d5"]],images:["/img/book_big/The1.jpg","/img/book_big/The2.jpg"],mask:{shape:"rect",width:340,height:480,borderRadius:8}},{id:"coaster",name:"\u94dc\u8d28\u676f\u57ab",desc:"\u91d1\u5c5e\u8d28\u611f\uff0c\u684c\u9762\u827a\u672f",icon:"\u2615",iconImg:"/icon/\u676f\u5b50.png",price:25,originalPrice:35,leadTime:"5-7\u4e2a\u5de5\u4f5c\u65e5",description:"\u91c7\u7528\u4f18\u8d28\u9ec4\u94dc\u6750\u8d28\uff0c\u8868\u9762\u7ecf\u62c9\u4e1d\u5de5\u827a\u5904\u7406\uff0c\u5448\u73b0\u54d1\u5149\u91d1\u5c5e\u8d28\u611f\u3002\u80cc\u9762\u914d\u6709\u9632\u6ed1\u8f6f\u6728\u57ab\uff0c\u4fdd\u62a4\u684c\u9762\u540c\u65f6\u9632\u6b62\u6ed1\u52a8\u3002\u6fc0\u5149\u5fae\u96d5\u53ef\u5728\u8868\u9762\u523b\u5370\u540d\u5b57\u3001\u65e5\u671f\u6216\u795d\u798f\u8bed\uff0c\u662f\u4e54\u8fc1\u65b0\u5c45\u3001\u65b0\u5a5a\u8d3a\u793c\u7684\u7cbe\u81f4\u4e4b\u9009\u3002",subtitle:"\u9ec4\u94dc\u8d28\u611f \xb7 \u62c9\u4e1d\u54d1\u5149 \xb7 \u684c\u9762\u4e0a\u7684\u5fae\u578b\u96d5\u5851",tone:[42,30,18],story:"\u8bbe\u8ba1\u7075\u611f\u6765\u81ea\u65e5\u5f0f\u4f98\u5bc2\u7f8e\u5b66\u3002\u5c81\u6708\u4f1a\u5728\u9ec4\u94dc\u8868\u9762\u7559\u4e0b\u6e29\u67d4\u7684\u6c27\u5316\u75d5\u8ff9\uff0c\u5c31\u5982\u540c\u4e00\u676f\u8336\u4ece\u70ed\u5230\u51c9\u7684\u8fc7\u7a0b\u3002\u62c9\u4e1d\u5904\u7406\u540e\u7684\u54d1\u5149\u8868\u9762\u5728\u706f\u5149\u4e0b\u5448\u73b0\u7ec6\u817b\u7684\u91d1\u5c5e\u7eb9\u7406\uff0c\u6fc0\u5149\u5fae\u96d5\u7684\u540d\u5b57\u6210\u4e3a\u8fd9\u4ef6\u5668\u7269\u4e0a\u6700\u51b7\u9759\u7684\u6ce8\u811a\u3002\u5b83\u4e0d\u53ea\u662f\u676f\u57ab\uff0c\u66f4\u662f\u684c\u9762\u4e0a\u7684\u5fae\u578b\u96d5\u5851\u3002",scene:"\u4e54\u8fc1\u9001\u793c\u3001\u65b0\u5a5a\u8d3a\u793c\u3001\u5496\u5561\u89d2\u5e03\u7f6e\u3001\u529e\u516c\u684c\u7f8e\u5b66\u3002\u9002\u5408\u9001\u7ed9\u559c\u6b22\u624b\u51b2\u5496\u5561\u7684\u670b\u53cb\uff0c\u6216\u4f5c\u4e3a\u5a5a\u793c\u5bbe\u5ba2\u7684\u56de\u793c\u2014\u2014\u6bcf\u4e00\u53ea\u676f\u57ab\u4e0a\u90fd\u523b\u7740\u5bbe\u5ba2\u7684\u540d\u5b57\uff0c\u8ba9\u793c\u7269\u672c\u8eab\u6210\u4e3a\u5ea7\u4f4d\u5361\u3002",tags:["\u4e54\u8fc1\u793c","\u65b0\u5a5a\u8d3a\u793c","\u684c\u9762\u7f8e\u5b66","\u9ec4\u94dc","\u624b\u51b2\u5496\u5561"],specs:[["\u6750\u8d28","\u9ec4\u94dc + \u80cc\u9762\u8f6f\u6728\u9632\u6ed1\u57ab"],["\u8868\u9762\u5904\u7406","\u62c9\u4e1d\u54d1\u5149"],["\u76f4\u5f84","100mm"],["\u539a\u5ea6","3mm"],["\u96d5\u523b\u5de5\u827a","\u5149\u7ea4\u6fc0\u5149\u7cbe\u7ec6\u5fae\u96d5"],["\u8010\u6e29","\u2264120\xb0C"]],images:["/img/cup/The1.jpg"],mask:{shape:"circle",width:280,height:280}},{id:"penbox",name:"\u7af9\u5236\u7b14\u76d2",desc:"\u81ea\u7136\u7af9\u7eb9\uff0c\u6587\u623f\u96c5\u5668",icon:"\u270f\ufe0f",iconImg:"/icon/\u7b14\u76d2.png",price:75,originalPrice:98,leadTime:"7-10\u4e2a\u5de5\u4f5c\u65e5",description:"\u7cbe\u9009\u5929\u7136\u6960\u7af9\uff0c\u7ecf\u591a\u9053\u5de5\u5e8f\u6253\u78e8\u629b\u5149\uff0c\u4fdd\u7559\u5929\u7136\u7af9\u7eb9\u808c\u7406\u3002\u76d2\u76d6\u91c7\u7528\u78c1\u5438\u5f00\u5408\uff0c\u5185\u90e8\u8bbe\u6709\u5206\u5c42\u9694\u677f\u3002\u6fc0\u5149\u5fae\u96d5\u5728\u7af9\u9762\u4e0a\u5448\u73b0\u6df1\u6d45\u4e0d\u4e00\u7684\u96d5\u523b\u6548\u679c\uff0c\u878d\u5165\u58a8\u9999\u6c14\u8d28\u3002\u9002\u5408\u4e66\u623f\u6848\u5934\u3001\u4e66\u6cd5\u7231\u597d\u8005\u7684\u6587\u623f\u4f34\u4fa3\u3002",subtitle:"\u5929\u7136\u6960\u7af9 \xb7 \u78c1\u5438\u5f00\u5408 \xb7 \u6587\u623f\u96c5\u5668\u4e4b\u9009",tone:[30,24,16],story:"\u6bcf\u4e00\u53ea\u7b14\u76d2\u90fd\u6765\u81ea\u540c\u4e00\u7247\u7af9\u6797\u7684\u4e0d\u540c\u90e8\u4f4d\uff0c\u56e0\u6b64\u7eb9\u8def\u7edd\u4e0d\u91cd\u590d\u2014\u2014\u6b63\u5982\u6ca1\u6709\u4e24\u4e2a\u4eba\u7684\u4e66\u6cd5\u98ce\u683c\u5b8c\u5168\u76f8\u540c\u3002\u6211\u4eec\u4fdd\u7559\u4e86\u6960\u7af9\u5929\u7136\u7684\u6e29\u6da6\u89e6\u611f\uff0c\u53ea\u5728\u8868\u9762\u4ee5\u6fc0\u5149\u523b\u4e0b\u540d\u5b57\u6216\u4e00\u53e5\u7bb4\u8a00\u3002\u6253\u5f00\u78c1\u5438\u76d2\u76d6\u65f6\u7684\u6e05\u8106\u58f0\u54cd\uff0c\u662f\u6587\u623f\u4e2d\u7684\u5c0f\u5c0f\u4eea\u5f0f\u3002",scene:"\u4e66\u623f\u6848\u5934\u3001\u4e66\u6cd5\u7231\u597d\u8005\u88c5\u5907\u3001\u6559\u5e08\u8282\u793c\u7269\u3001\u4e66\u623f\u6696\u623f\u793c\u3002\u9002\u5408\u9001\u7ed9\u5199\u5b57\u597d\u770b\u7684\u4eba\u2014\u2014\u56e0\u4e3a\u61c2\u4e66\u5199\u7684\u4eba\uff0c\u624d\u61c2\u4e00\u53ea\u597d\u7b14\u76d2\u7684\u5206\u91cf\u3002",tags:["\u6587\u623f","\u4e66\u6cd5","\u6559\u5e08\u8282","\u4e66\u623f","\u5929\u7136\u6750\u8d28"],specs:[["\u6750\u8d28","\u5929\u7136\u6960\u7af9"],["\u5f00\u5408\u65b9\u5f0f","\u78c1\u5438\u5f0f\u76d2\u76d6"],["\u5185\u90e8\u7ed3\u6784","\u5206\u5c42\u9694\u677f\uff08\u53ef\u8c03\u8282\uff09"],["\u5c3a\u5bf8","200 \xd7 65 \xd7 30mm"],["\u8868\u9762\u5904\u7406","\u624b\u5de5\u6253\u78e8\u629b\u5149\uff0c\u65e0\u6f06"],["\u96d5\u523b\u5de5\u827a","CO2 \u6fc0\u5149\u70e7\u8680\uff08\u6df1\u6d45\u53ef\u8c03\uff09"]],images:["/img/penbox/The1.jpg","/img/penbox/The2.jpg","/img/penbox/The3.jpg"],mask:{shape:"rect",width:320,height:160,borderRadius:12}},{id:"booklamp",name:"\u4e66\u672c\u578b\u706f",desc:"\u6e29\u6696\u5149\u5f71\uff0c\u70b9\u4eae\u5fc3\u610f",icon:"\ud83d\udca1",iconImg:"/icon/\u4e66\u706f.png",price:45,originalPrice:68,leadTime:"5-7\u4e2a\u5de5\u4f5c\u65e5",description:"\u5f00\u5408\u5f0f\u8bbe\u8ba1\uff0c\u6253\u5f00\u5373\u4eae\uff0c\u5408\u62e2\u5373\u706d\uff0c\u5982\u9b54\u6cd5\u4e66\u822c\u5145\u6ee1\u60ca\u559c\u3002\u91c7\u7528LED\u6696\u5149\u706f\u6e90\uff0c\u5149\u7ebf\u67d4\u548c\u4e0d\u523a\u773c\uff0c\u53ef\u6301\u7eed\u70b9\u4eae6-8\u5c0f\u65f6\u3002\u5c01\u9762\u6fc0\u5149\u5fae\u96d5\u53ef\u5b9a\u5236\u6587\u5b57\u3001\u56fe\u6848\u6216\u7167\u7247\uff0c\u8ba9\u6e29\u6696\u7684\u706f\u5149\u627f\u8f7d\u4e13\u5c5e\u8bb0\u5fc6\u3002\u662f\u60c5\u4fa3\u793c\u7269\u3001\u6bd5\u4e1a\u793c\u7269\u7684\u521b\u610f\u4e4b\u9009\u3002",subtitle:"\u5f00\u5408\u5373\u4eae \xb7 LED\u6696\u5149 \xb7 \u9b54\u6cd5\u4e66\u822c\u7684\u60ca\u559c",tone:[25,20,15],story:"\u7075\u611f\u6765\u81ea\u300a\u54c8\u5229\xb7\u6ce2\u7279\u300b\u4e2d\u7684\u9b54\u6cd5\u8bfe\u672c\u2014\u2014\u6253\u5f00\u4e00\u672c\u4e66\uff0c\u5149\u8292\u503e\u6cfb\u800c\u51fa\u3002\u6211\u4eec\u91c7\u7528\u675c\u90a6\u7eb8\u4e0e\u5b9e\u6728\u5c01\u9762\u7ed3\u5408\uff0c\u8ba9\u706f\u4f53\u65e2\u8f7b\u8584\u53c8\u575a\u56fa\u3002\u6fc0\u5149\u5fae\u96d5\u5728\u5c01\u9762\u7559\u4e0b\u4f60\u7684\u540d\u5b57\u6216\u4e00\u5e45\u5c0f\u753b\uff0c\u5f53\u706f\u5728\u6df1\u591c\u4eae\u8d77\uff0c\u90a3\u662f\u4e13\u5c5e\u4e8e\u4f60\u7684\u6e29\u6696\u89d2\u843d\u3002",scene:"\u60c5\u4fa3\u793c\u7269\u3001\u6bd5\u4e1a\u7eaa\u5ff5\u3001\u5e8a\u5934\u591c\u706f\u3001\u9732\u8425\u6c1b\u56f4\u706f\u3001\u513f\u7ae5\u623f\u3002\u7279\u522b\u9002\u5408\u5728\u5c01\u9762\u523b\u4e0a\u4e24\u4e2a\u4eba\u7684\u540d\u5b57\u548c\u4e00\u53e5\u60c5\u8bdd\uff0c\u5728\u60c5\u4eba\u8282\u6216\u7eaa\u5ff5\u65e5\u9001\u51fa\u2014\u2014\u6253\u5f00\u4e66\u706f\uff0c\u5c31\u50cf\u6253\u5f00\u4e00\u5c01\u4f1a\u53d1\u5149\u7684\u60c5\u4e66\u3002",tags:["\u60c5\u4fa3\u793c","\u6bd5\u4e1a\u7eaa\u5ff5","\u591c\u706f","\u6c1b\u56f4\u706f","\u521b\u610f\u793c\u7269"],specs:[["\u5149\u6e90","LED \u6696\u767d\u5149\uff083000K\uff09"],["\u7eed\u822a","6-8\u5c0f\u65f6\uff08\u5185\u7f6e\u53ef\u5145\u7535\u9502\u7535\u6c60\uff09"],["\u5145\u7535","USB Type-C \u63a5\u53e3"],["\u5c01\u9762\u6750\u8d28","\u675c\u90a6\u7eb8 + \u5b9e\u6728\u5c01\u9762"],["\u5c55\u5f00\u5c3a\u5bf8","210 \xd7 150mm"],["\u96d5\u523b\u5de5\u827a","\u6fc0\u5149\u5fae\u96d5\uff08\u652f\u6301\u6587\u5b57+\u7b80\u5355\u56fe\u6848\uff09"]],images:["/img/booklight/The1.jpg","/img/booklight/The2.jpg"],mask:{shape:"rect",width:320,height:240,borderRadius:4}}],u=i.map(function(n){return(0,r.A)((0,r.A)({},n),{},{images:(n.images||[]).map(function(n){return(0,o.uq)(n)}),iconImg:(0,o.uq)(n.iconImg)})}),c=u,a=function(n){return u.find(function(t){return t.id===n})},s={"notebook-small":(0,o.uq)("/icon/\u4e66\u672c.png"),"notebook-large":(0,o.uq)("/icon/\u4e66\u672c_\u5927.png"),coaster:(0,o.uq)("/icon/\u676f\u5b50.png"),penbox:(0,o.uq)("/icon/\u7b14\u76d2.png"),booklamp:(0,o.uq)("/icon/\u4e66\u706f.png")};function d(n){return null!==n&&void 0!==n&&n.iconImg?(0,o.uq)(n.iconImg):null!==n&&void 0!==n&&n.id?(0,o.uq)(s[n.id]||"/icon/\u56db\u89d2\u661f.png"):(0,o.uq)("/icon/\u56db\u89d2\u661f.png")}},3246:function(n,t,e){e.d(t,{L:function(){return g},Sy:function(){return d},WG:function(){return l},gf:function(){return f}});var r=e(1212),o=e(9379),i=e(467),u=e(758),c=e.n(u),a="https://wxbackend.tokenleaping.com",s="smart_access_token";function d(){try{c().hideLoading()}catch(n){}}function f(){try{return c().getStorageSync(s)||""}catch(n){return""}}function l(n){c().setStorageSync(s,n)}function g(){try{c().removeStorageSync(s)}catch(n){}}function h(n){return p.apply(this,arguments)}function p(){return p=(0,i.A)((0,r.A)().m(function n(t){var e,i,u,s,d,l,h,p,v,S,y,k,A,b=arguments;return(0,r.A)().w(function(n){while(1)switch(n.p=n.n){case 0:return e=b.length>1&&void 0!==b[1]?b[1]:{},i=e.method,u=void 0===i?"GET":i,s=e.data,d=e.headers,l=void 0===d?{}:d,h=e.auth,p=void 0===h||h,v=f(),S=(0,o.A)((0,o.A)({"Content-Type":"application/json"},p&&v?{Authorization:"Bearer ".concat(v)}:{}),l),n.p=1,n.n=2,c().request({url:"".concat(a).concat(t),method:u,data:s,header:S});case 2:y=n.v,n.n=4;break;case 3:throw n.p=3,n.v,new Error("\u7f51\u7edc\u5f02\u5e38\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5");case 4:if(401!==y.statusCode){n.n=5;break}throw g(),null===(k=m)||void 0===k||k(),new Error("\u767b\u5f55\u5df2\u8fc7\u671f\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55");case 5:if(A=y.data,!A||"number"!==typeof A.code||0===A.code){n.n=6;break}throw new Error(A.message||"\u8bf7\u6c42\u5931\u8d25");case 6:return n.a(2,A&&"number"===typeof A.code?A.data:A)}},n,null,[[1,3]])})),p.apply(this,arguments)}var m=null;var v={get:function(n,t){return h(n,(0,o.A)((0,o.A)({},t),{},{method:"GET"}))},post:function(n,t,e){return h(n,(0,o.A)((0,o.A)({},e),{},{method:"POST",data:t}))},put:function(n,t,e){return h(n,(0,o.A)((0,o.A)({},e),{},{method:"PUT",data:t}))},patch:function(n,t,e){return h(n,(0,o.A)((0,o.A)({},e),{},{method:"PATCH",data:t}))},del:function(n,t){return h(n,(0,o.A)((0,o.A)({},t),{},{method:"DELETE"}))}};t.Ay=v},8594:function(n,t,e){e.d(t,{E1:function(){return Z},EB:function(){return X},F0:function(){return F},Fu:function(){return G},Hf:function(){return w},IU:function(){return L},Ic:function(){return g},O4:function(){return Y},Q1:function(){return x},Q4:function(){return A},Re:function(){return J},Rq:function(){return Q},ab:function(){return V},cY:function(){return R},eW:function(){return z},hG:function(){return E},i5:function(){return W},iA:function(){return T},iZ:function(){return j},kg:function(){return I},kh:function(){return H},n7:function(){return O},p_:function(){return q},uF:function(){return B},ug:function(){return _},yU:function(){return $}});var r=e(9379),o=e(436),i=e(758),u=e.n(i),c=e(5234),a=e(8199),s=e(6764),d="smart_theme",f="smart_user_info",l="smart_active_openid";function g(n){return!!n&&(n.startsWith("mock_")||n.startsWith("mock-"))}function h(){var n=A(),t=(null===n||void 0===n?void 0:n.openid)||u().getStorageSync(l)||"_guest_";return u().setStorageSync(l,t),t}function p(n){var t=h();return"".concat(n,"_").concat(t)}var m="smart_user_registry",v="zhihui2024";function S(){try{return u().getStorageSync(m)||[]}catch(n){return[]}}function y(n){var t=S();t.includes(n)||(t.push(n),u().setStorageSync(m,t))}function k(n){var t=S().filter(function(t){return t!==n});u().setStorageSync(m,t)}function A(){try{return u().getStorageSync(f)}catch(n){return null}}function b(n){var t;u().setStorageSync(f,n),null!==n&&void 0!==n&&n.openid&&(u().setStorageSync(l,n.openid),u().setStorageSync("user_info_".concat(n.openid),n),y(n.openid)),(0,s.m)(),null===(t=u().eventCenter)||void 0===t||t.trigger("authStateChanged",{openid:(null===n||void 0===n?void 0:n.openid)||""})}function C(n){try{var t=u().getStorageSync("user_info_".concat(n));if(t)return t}catch(n){}var e=A();return(null===e||void 0===e?void 0:e.openid)===n?e:null}function w(){var n;u().removeStorageSync(f),u().removeStorageSync(l),(0,s.m)(),null===(n=u().eventCenter)||void 0===n||n.trigger("authStateChanged",{openid:""})}function T(n){b(n)}function _(){return A()}function x(){var n=S();return n.map(function(n){var t=C(n),e=N(n),r=P(n);return{openid:n,nickName:(null===t||void 0===t?void 0:t.nickName)||"\u672a\u77e5\u7528\u6237",avatarUrl:(null===t||void 0===t?void 0:t.avatarUrl)||"",loginAt:(null===t||void 0===t?void 0:t.loginAt)||0,designCount:e.length,orderCount:r.length}})}function I(n,t){var e="mock_"+Date.now().toString(36)+"_"+Math.random().toString(36).slice(2,6),r={openid:e,nickName:n||"\u5fae\u4fe1\u7528\u6237",avatarUrl:t||"",loginAt:Date.now()};return b(r),r}function j(n){var t=C(n);return!!t&&(u().setStorageSync(f,t),u().setStorageSync(l,n),!0)}function E(n){u().removeStorageSync("user_info_".concat(n)),u().removeStorageSync("design_list_".concat(n)),u().removeStorageSync("order_list_".concat(n)),u().removeStorageSync("address_list_".concat(n)),k(n);var t=A();(null===t||void 0===t?void 0:t.openid)===n&&w()}function B(n){return n===v}function D(n,t){return"".concat(n,"_").concat(t)}function N(n){try{return u().getStorageSync(D("design_list",n))||[]}catch(n){return[]}}function P(n){try{return u().getStorageSync(D("order_list",n))||[]}catch(n){return[]}}function q(){try{return u().getStorageSync(p("design_list"))||[]}catch(n){return[]}}function G(n){u().setStorageSync(p("design_list"),n)}function R(n,t){var e=q(),r=(0,a.uq)((null===n||void 0===n?void 0:n.iconImg)||c.rj[null===n||void 0===n?void 0:n.id]||"/icon/\u56db\u89d2\u661f.png"),i={id:"DSG"+Date.now(),productId:n.id,productName:n.name,productIcon:r,unitPrice:n.price,count:t,status:"undesigned",createdAt:(new Date).toISOString().slice(0,10)};return G([].concat((0,o.A)(e),[i])),i}function W(n,t){var e=q(),o=e.findIndex(function(t){return t.id===n});-1!==o&&(e[o]=(0,r.A)((0,r.A)({},e[o]),t),G(e))}function H(n){var t=q().filter(function(t){return!n.includes(t.id)});G(t)}function O(){try{return u().getStorageSync(p("order_list"))||[]}catch(n){return[]}}function U(n){u().setStorageSync(p("order_list"),n)}function L(n){var t,e=q(),r=O(),i=e.find(function(t){return t.id===n});if(!i)return null;var u=null!==(t=i.productIcon)&&void 0!==t&&t.startsWith("/icon/")||/^https?:/i.test(i.productIcon||"")?i.productIcon:c.rj[i.productId]||"/icon/\u56db\u89d2\u661f.png",s=(0,a.uq)(u),d={id:"ORD"+Date.now().toString().slice(-9),productName:i.productName,productIcon:s,statusCode:"pending",date:(new Date).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).replace(/\//g,"-"),price:"\xa5"+(i.unitPrice*i.count).toFixed(2),count:i.count,sku:"".concat(i.productName," \xd7 ").concat(i.count)},f=e.findIndex(function(t){return t.id===n});return-1!==f&&(e[f].status="ordered",e[f].orderId=d.id),G(e),U([d].concat((0,o.A)(r))),d}function Y(){try{return u().getStorageSync(d)||"auto"}catch(n){return"auto"}}function F(n){u().setStorageSync(d,n)}var M=null;function Q(n){M=n}function z(n){if("auto"===n){if(M)return M;try{var t=u().getAppBaseInfo();if("dark"===t.theme||"light"===t.theme)return t.theme}catch(n){}return"light"}return n}function J(){try{return u().getStorageSync(p("address_list"))||[]}catch(n){return[]}}function K(n){u().setStorageSync(p("address_list"),n)}function Z(n){var t=J(),e=(0,r.A)((0,r.A)({},n),{},{id:"ADR"+Date.now()});return e.isDefault&&t.forEach(function(n){n.isDefault=!1}),K([e].concat((0,o.A)(t))),e}function $(n,t){var e=J(),o=e.findIndex(function(t){return t.id===n});-1!==o&&(t.isDefault&&e.forEach(function(n){n.isDefault=!1}),e[o]=(0,r.A)((0,r.A)({},e[o]),t),K(e))}function V(n){var t=J().filter(function(t){return t.id!==n});K(t)}function X(){return J().find(function(n){return n.isDefault})}},6606:function(n,t,e){e.d(t,{G:function(){return u}});var r=e(758),o=e.n(r);function i(n){return"dark"===n?"#191919":"#ffffff"}function u(n,t){var e=null!==t&&void 0!==t?t:i(n);o().setBackgroundColor({backgroundColor:e,backgroundColorTop:e,backgroundColorBottom:e}),o().setBackgroundTextStyle({textStyle:"dark"===n?"light":"dark"})}}}]); \ No newline at end of file +"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[76],{7723:function(n,t,e){e.d(t,{A:function(){return f}});var r=e(5544),o=e(758),i=e.n(o),u=e(6540),c=e(118),a=e(6764),s=e(9703),d=e(4848);function f(n){var t=(0,u.useState)("checking"),e=(0,r.A)(t,2),o=e[0],f=e[1],l=(0,u.useCallback)(function(){var n=!1;return(0,a.d)().then(function(t){n||f(t?"ok":"denied")}).catch(function(){n||f("denied")}),function(){n=!0}},[]);return(0,u.useEffect)(function(){var n=l(),t=function(){l()},e=function(){l()};return i().eventCenter.on("tabBarChange",t),i().eventCenter.on(s.Wo,e),i().eventCenter.on("authStateChanged",t),function(){n(),i().eventCenter.off("tabBarChange",t),i().eventCenter.off(s.Wo,e),i().eventCenter.off("authStateChanged",t)}},[l]),"checking"===o?(0,d.jsx)(c.Ss,{className:"login-guard",children:(0,d.jsxs)(c.Ss,{className:"login-guard-inner",children:[(0,d.jsx)(c.EY,{className:"login-guard-icon",children:"\u23f3"}),(0,d.jsx)(c.EY,{className:"login-guard-title",children:"\u6821\u9a8c\u767b\u5f55\u72b6\u6001"})]})}):"denied"===o?(0,d.jsx)(c.Ss,{className:"login-guard",children:(0,d.jsxs)(c.Ss,{className:"login-guard-inner",children:[(0,d.jsx)(c.EY,{className:"login-guard-icon",children:"\ud83d\udd12"}),(0,d.jsx)(c.EY,{className:"login-guard-title",children:"\u8bf7\u5148\u767b\u5f55"}),(0,d.jsx)(c.EY,{className:"login-guard-desc",children:"\u767b\u5f55\u540e\u67e5\u770b\u60a8\u7684\u4e13\u5c5e\u5185\u5bb9"}),(0,d.jsx)(c.Ss,{className:"btn-gradient login-guard-btn",onTap:function(){return i().switchTab({url:"/pages/profile/index"})},children:(0,d.jsx)(c.EY,{children:"\u53bb\u767b\u5f55"})})]})}):n.children}},9674:function(n,t,e){e.d(t,{A:function(){return u}});var r=e(118),o=e(9703),i=e(4848);function u(n){var t=n.darkTop,e=void 0!==t&&t,u=(0,o.wR)(),c=u.resolvedTheme,a="dark"===c||e,s=a?"#191919":"#ffffff",d=a?"#ffffff":"#000000";return(0,i.jsx)(r.tf,{backgroundColor:s,backgroundColorTop:s,backgroundColorBottom:s,backgroundTextStyle:a?"light":"dark",rootBackgroundColor:s,children:(0,i.jsx)(r.yk,{frontColor:d,backgroundColor:s})})}},9703:function(n,t,e){e.d(t,{NP:function(){return g},Wo:function(){return l},wR:function(){return h}});var r=e(5544),o=e(6540),i=e(758),u=e.n(i),c=e(118),a=e(8594),s=e(6606),d=e(4848),f=(0,o.createContext)({theme:"auto",resolvedTheme:"light",toggleTheme:function(){},setTheme:function(){}}),l="themeChange";function g(n){var t=n.children,e=(0,o.useState)((0,a.O4)()),g=(0,r.A)(e,2),h=g[0],p=g[1],m=(0,o.useState)((0,a.eW)((0,a.O4)())),v=(0,r.A)(m,2),S=v[0],y=v[1],k=(0,o.useCallback)(function(n){y((0,a.eW)(n))},[]),A=(0,o.useCallback)(function(n){(0,a.F0)(n),p(n),k(n)},[k]),b=(0,o.useCallback)(function(){var n="light"===S?"dark":"light";A(n)},[S,A]),C=(0,o.useCallback)(function(n){(0,a.Rq)(n),"auto"===(0,a.O4)()&&y(n)},[]),w=(0,o.useCallback)(function(){try{var n=u().getAppBaseInfo();C("dark"===n.theme?"dark":"light")}catch(n){}try{u().createSelectorQuery().select(".system-theme-detector").fields({computedStyle:["opacity"]}).exec(function(n){var t=n&&n[0]&&n[0].computedStyle&&n[0].computedStyle.opacity;C("1"===t?"dark":"light")})}catch(n){}},[C]);return(0,o.useEffect)(function(){w()},[w]),(0,o.useEffect)(function(){var n,t=function(n){!n||"dark"!==n.theme&&"light"!==n.theme||C(n.theme)},e=u();return null===(n=e.onThemeChange)||void 0===n||n.call(e,t),function(){var n;null===(n=e.offThemeChange)||void 0===n||n.call(e,t)}},[C]),(0,o.useEffect)(function(){u().eventCenter.trigger(l,S)},[S]),(0,o.useEffect)(function(){(0,s.G)(S)},[S]),(0,i.useDidShow)(function(){"auto"===h&&w()}),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(c.Ss,{className:"system-theme-detector"}),(0,d.jsx)(f.Provider,{value:{theme:h,resolvedTheme:S,toggleTheme:b,setTheme:A},children:t})]})}function h(){return(0,o.useContext)(f)}},9201:function(n,t,e){e.d(t,{c:function(){return a}});var r=e(5544),o=e(6540),i=e(758),u=e.n(i),c=null;function a(){var n=(0,o.useState)(null!==c&&void 0!==c?c:{statusBarHeight:20,menuButtonTop:26,menuButtonHeight:32,capsuleRight:368,safeInsetTop:20,safeInsetBottom:0,headerPaddingTop:66,backBtnPaddingTop:20}),t=(0,r.A)(n,2),e=t[0],i=t[1];return(0,o.useEffect)(function(){if(c)i(c);else try{var n,t,e,r,o,a,s,d,f=u().getSystemInfoSync(),l=u().getMenuButtonBoundingClientRect(),g=f.statusBarHeight||20,h=null!==(n=l.top)&&void 0!==n?n:g+4,p=null!==(t=l.height)&&void 0!==t?t:32,m=null!==(e=l.right)&&void 0!==e?e:f.windowWidth-7,v=null!==(r=null===(o=f.safeArea)||void 0===o?void 0:o.top)&&void 0!==r?r:g,S=null!==(a=f.safeAreaInsetBottom)&&void 0!==a?a:f.screenHeight-(null!==(s=null===(d=f.safeArea)||void 0===d?void 0:d.bottom)&&void 0!==s?s:f.screenHeight),y=Math.max(h+p+6,g+44),k=Math.max(g,h-4),A={statusBarHeight:g,menuButtonTop:h,menuButtonHeight:p,capsuleRight:m,safeInsetTop:v,safeInsetBottom:S,headerPaddingTop:y,backBtnPaddingTop:k};c=A,i(A)}catch(n){}},[]),e}},5414:function(n,t,e){e.d(t,{l:function(){return c}});var r=e(6540),o=e(758),i=e.n(o),u=e(6606);function c(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=t.mode,c=void 0===e?"auto":e,a=(0,r.useCallback)(function(){var t="dark"===c||"auto"===c&&"light"===n,e=t?"#000000":"#ffffff",r=t?"#ffffff":"#191919";i().setNavigationBarColor({frontColor:e,backgroundColor:r}),(0,u.G)(n,r)},[c,n]);(0,r.useEffect)(a,[a]),(0,o.useDidShow)(a)}},6295:function(n,t,e){e.d(t,{gf:function(){return i.gf},iD:function(){return u},jp:function(){return f},r7:function(){return a},ri:function(){return d}});var r=e(1212),o=e(467),i=e(3246);function u(n){return c.apply(this,arguments)}function c(){return c=(0,o.A)((0,r.A)().m(function n(t){var e;return(0,r.A)().w(function(n){while(1)switch(n.n){case 0:return n.n=1,i.Ay.post("/api/auth/login",{code:t},{auth:!1});case 1:return e=n.v,null!==e&&void 0!==e&&e.accessToken&&(0,i.WG)(e.accessToken),n.a(2,e)}},n)})),c.apply(this,arguments)}function a(n){return s.apply(this,arguments)}function s(){return s=(0,o.A)((0,r.A)().m(function n(t){return(0,r.A)().w(function(n){while(1)switch(n.n){case 0:return n.a(2,i.Ay.patch("/api/users/me",t))}},n)})),s.apply(this,arguments)}function d(){(0,i.L)()}function f(){return l.apply(this,arguments)}function l(){return l=(0,o.A)((0,r.A)().m(function n(){return(0,r.A)().w(function(n){while(1)switch(n.n){case 0:return n.a(2,i.Ay.get("/api/users/me"))}},n)})),l.apply(this,arguments)}},8199:function(n,t,e){e.d(t,{uq:function(){return o}});var r="https://wordcloudwechat.oss-cn-hangzhou.aliyuncs.com";function o(n){if(!n)return"";if(/^(https?:|wxfile:|data:)/i.test(n))return n;if(!r)return n;var t=r.replace(/\/+$/,"");if(!n.startsWith("/img/"))return n;var e=n.startsWith("/")?n:"/".concat(n);return"".concat(t).concat(e)}},6764:function(n,t,e){e.d(t,{d:function(){return S},m:function(){return h}});var r=e(1212),o=e(467),i=e(2284),u=e(758),c=e.n(u),a=e(6295),s=e(8594),d="smart_auth_verified",f=18e5,l=null,g=null;function h(){l=null,g=null;try{c().removeStorageSync(d)}catch(n){}}function p(n){var t=l||function(){try{var n=c().getStorageSync(d);return n&&"object"===(0,i.A)(n)?n:null}catch(n){return null}}();return t&&t.openid===n?Date.now()-t.at>f?null:(l=t,t.ok):null}function m(n,t){var e={openid:n,ok:t,at:Date.now()};l=e;try{c().setStorageSync(d,e)}catch(n){}}function v(){var n=(0,s.Q4)();return!(null===n||void 0===n||!n.openid)&&!(0,s.Ic)(n.openid)&&!!n.accessToken&&!!(0,a.gf)()}function S(){return y.apply(this,arguments)}function y(){return y=(0,o.A)((0,r.A)().m(function n(){var t,e;return(0,r.A)().w(function(n){while(1)switch(n.n){case 0:if(t=(0,s.Q4)(),null!==t&&void 0!==t&&t.openid){n.n=1;break}return console.log("[AuthGuard] \u65e0\u672c\u5730\u7528\u6237\uff0c\u5224\u5b9a\u672a\u767b\u5f55"),n.a(2,!1);case 1:if(console.log("[AuthGuard] \u672c\u5730\u7528\u6237 openid=",t.openid),!(0,s.Ic)(t.openid)){n.n=2;break}return(0,s.Hf)(),(0,a.ri)(),h(),n.a(2,!1);case 2:if(e=p(t.openid),null===e){n.n=3;break}return console.log("[AuthGuard] \u547d\u4e2d\u672c\u5730\u7f13\u5b58 ok=",e),n.a(2,e);case 3:return g||(g=(0,a.jp)().then(function(n){console.log("[AuthGuard] getMe \u8fd4\u56de:",JSON.stringify(n));var e=!!n&&!!n.id&&n.openid===t.openid;return console.log("[AuthGuard] \u4e00\u81f4\u6027=",e),e?(m(t.openid,!0),!0):((0,s.Hf)(),(0,a.ri)(),h(),!1)}).catch(function(n){return console.error("[AuthGuard] getMe \u5931\u8d25\uff0c\u8d70\u672c\u5730\u4f1a\u8bdd\u515c\u5e95:",n),v()}).finally(function(){g=null})),n.a(2,g)}},n)})),y.apply(this,arguments)}},5234:function(n,t,e){e.d(t,{QE:function(){return d},R6:function(){return c},rj:function(){return s},y9:function(){return a},zv:function(){return u}});var r=e(9379),o=e(8199),i=[{id:"notebook-small",name:"\u5fae\u96d5\u7b14\u8bb0\u672c\uff08\u5c0f\uff09",desc:"\u4fbf\u643a\u968f\u884c\uff0c\u8bb0\u5f55\u70b9\u6ef4",icon:"\ud83d\udcd3",iconImg:"/icon/\u4e66\u672c.png",price:12,originalPrice:18,leadTime:"3-5\u4e2a\u5de5\u4f5c\u65e5",description:"\u7cbe\u9009\u4f18\u8d28\u7eb8\u5f20\uff0c\u5c01\u9762\u91c7\u7528\u9ad8\u6863PU\u6750\u8d28\uff0c\u624b\u611f\u7ec6\u817b\u3002\u5185\u9875\u53ef\u5b9a\u5236\u6a2a\u7ebf\u3001\u65b9\u683c\u6216\u7a7a\u767d\u4e09\u79cd\u7248\u5f0f\u3002\u6fc0\u5149\u5fae\u96d5\u5de5\u827a\u5c06\u540d\u5b57\u6216\u56fe\u6848\u7cbe\u51c6\u523b\u5370\u5728\u5c01\u9762\uff0c\u6c38\u4e0d\u892a\u8272\u3002\u5c0f\u5de7\u8f7b\u4fbf\uff0c\u9002\u5408\u968f\u8eab\u643a\u5e26\uff0c\u65e0\u8bba\u662f\u8bfe\u5802\u7b14\u8bb0\u8fd8\u662f\u65e5\u5e38\u5907\u5fd8\uff0c\u90fd\u662f\u4f60\u7684\u4e13\u5c5e\u4f34\u4fa3\u3002",subtitle:"\u638c\u5fc3\u95f4\u7684\u4e13\u5c5e\u5370\u8bb0 \xb7 \u6fc0\u5149\u5fae\u96d5 \xb7 \u4e09\u8272\u5185\u9875\u53ef\u9009",tone:[28,22,18],story:"\u7075\u611f\u6e90\u81ea\u624b\u8d26\u6587\u5316\u4e2d\u5bf9\u4e66\u5199\u4eea\u5f0f\u611f\u7684\u8ffd\u6c42\u3002\u6211\u4eec\u76f8\u4fe1\uff0c\u5728\u6570\u5b57\u6d2a\u6d41\u7684\u65f6\u4ee3\uff0c\u7eb8\u7b14\u7684\u6e29\u5ea6\u4f9d\u7136\u4e0d\u53ef\u66ff\u4ee3\u3002\u5f53\u6fc0\u5149\u5fae\u96d5\u5728PU\u5c01\u9762\u4e0a\u7559\u4e0b\u4e13\u5c5e\u5370\u8bb0\uff0c\u6bcf\u4e00\u7b14\u4e66\u5199\u90fd\u5728\u4e0e\u8fc7\u53bb\u5bf9\u8bdd\u3002\u7b14\u8bb0\u672c\u5c0f\u5de7\u5230\u8db3\u4ee5\u653e\u5165\u4efb\u4f55\u53e3\u888b\uff0c\u5374\u627f\u8f7d\u7740\u72ec\u4e00\u65e0\u4e8c\u7684\u8bb0\u5fc6\u3002",scene:"\u8bfe\u5802\u7b14\u8bb0\u3001\u65e5\u5e38\u5907\u5fd8\u3001\u65c5\u884c\u624b\u8d26\u3001\u5fc3\u60c5\u65e5\u8bb0\u3002\u9002\u5408\u9001\u7ed9\u540c\u5b66\u3001\u4f34\u4fa3\u6216\u4f5c\u4e3a\u6d3b\u52a8\u4f34\u624b\u793c\u2014\u2014\u8ba9\u6bcf\u4e00\u4e2a\u4eba\u90fd\u62e5\u6709\u523b\u7740\u81ea\u5df1\u540d\u5b57\u7684\u4e13\u5c5e\u7b14\u8bb0\u672c\u3002",tags:["\u4f34\u624b\u793c","\u5b66\u751f","\u624b\u8d26","\u4fbf\u643a","\u6fc0\u5149\u5fae\u96d5"],specs:[["\u5c3a\u5bf8","105 \xd7 148mm\uff08A6\uff09"],["\u9875\u6570","120\u5f20/240\u9875"],["\u5185\u9875\u7248\u5f0f","\u6a2a\u7ebf / \u65b9\u683c / \u7a7a\u767d \u53ef\u9009"],["\u5c01\u9762\u6750\u8d28","\u9ad8\u6863PU\u76ae\u9769"],["\u96d5\u523b\u5de5\u827a","CO2 \u6fc0\u5149\u5fae\u96d5\uff08\u6c38\u4e0d\u892a\u8272\uff09"],["\u9002\u7528\u573a\u666f","\u8bfe\u5802\u3001\u65c5\u884c\u3001\u65e5\u5e38\u5907\u5fd8"]],images:["/img/book_small/The1.jpg"],mask:{shape:"rect",width:300,height:420,borderRadius:8}},{id:"notebook-large",name:"\u5fae\u96d5\u7b14\u8bb0\u672c\uff08\u5927\uff09",desc:"\u5927\u5f00\u672c\uff0c\u66f4\u591a\u521b\u4f5c\u7a7a\u95f4",icon:"\ud83d\udcd4",iconImg:"/icon/\u4e66\u672c_\u5927.png",price:45,originalPrice:58,leadTime:"3-5\u4e2a\u5de5\u4f5c\u65e5",description:"A4\u5c3a\u5bf8\u5927\u5f00\u672c\uff0c180\xb0\u5e73\u644a\u8bbe\u8ba1\uff0c\u4e66\u5199\u66f4\u81ea\u7531\u3002\u5c01\u9762\u53ef\u9009\u771f\u76ae\u3001\u4eff\u5e03\u7eb9\u6216\u78e8\u7802\u6750\u8d28\uff0c\u6fc0\u5149\u5fae\u96d5\u533a\u57df\u66f4\u5927\uff0c\u9002\u5408\u5448\u73b0\u5168\u73ed\u540d\u5b57\u3001\u56e2\u961f\u53e3\u53f7\u6216\u516c\u53f8Logo\u7b49\u5927\u7bc7\u5e45\u5185\u5bb9\u3002\u662f\u6bd5\u4e1a\u7eaa\u5ff5\u3001\u4f01\u4e1a\u5e74\u4f1a\u793c\u54c1\u7684\u9996\u9009\u3002",subtitle:"\u5927\u7bc7\u5e45\u5b9a\u5236\u9996\u9009 \xb7 180\xb0\u5e73\u644a \xb7 \u6bd5\u4e1a/\u56e2\u5efa\u5fc5\u5907",tone:[35,28,22],story:"\u6bcf\u4e00\u6b21\u544a\u522b\u90fd\u503c\u5f97\u88ab\u90d1\u91cd\u4e66\u5199\u3002\u6bd5\u4e1a\u5b63\u7684\u6559\u5ba4\u91cc\uff0c\u7b14\u8bb0\u672c\u644a\u5f00\u5728\u8bfe\u684c\u4e0a\uff0c\u5168\u73ed\u7684\u540d\u5b57\u88ab\u6fc0\u5149\u523b\u5370\u5728\u5c01\u9762\u4e2d\u592e\uff0c\u6210\u4e3a\u6c38\u6052\u7684\u540c\u5b66\u5f55\u3002180\xb0\u5e73\u644a\u8bbe\u8ba1\u8ba9\u4e66\u5199\u4e0d\u518d\u88ab\u8ba2\u88c5\u675f\u7f1a\uff0cA4\u5927\u5c3a\u5bf8\u7ed9\u4f60\u5c3d\u60c5\u6325\u6d12\u7684\u5929\u5730\u3002\u8fd9\u662f\u9001\u7ed9\u4e00\u7fa4\u4eba\u6700\u597d\u7684\u544a\u522b\u793c\u7269\u3002",scene:"\u6bd5\u4e1a\u7eaa\u5ff5\u518c\u3001\u516c\u53f8\u5e74\u4f1a\u793c\u54c1\u3001\u56e2\u961f\u5efa\u8bbe\u4f34\u624b\u793c\u3001\u5ba2\u6237\u7b54\u8c22\u3002\u7279\u522b\u9002\u5408\u9700\u8981\u5728\u5c01\u9762\u5448\u73b0\u5927\u91cf\u6587\u5b57\u6216\u56fe\u6848\u7684\u5b9a\u5236\u9700\u6c42\u2014\u2014\u73ed\u7ea7\u540d\u5355\u3001\u516c\u53f8\u613f\u666f\u3001\u56e2\u961f\u53e3\u53f7\u4e00\u7f51\u6253\u5c3d\u3002",tags:["\u6bd5\u4e1a\u793c","\u56e2\u5efa","\u4f01\u4e1a\u5b9a\u5236","\u5927\u7bc7\u5e45","\u5e73\u644a\u8bbe\u8ba1"],specs:[["\u5c3a\u5bf8","210 \xd7 297mm\uff08A4\uff09"],["\u9875\u6570","100\u5f20/200\u9875"],["\u5c01\u9762\u6750\u8d28","\u771f\u76ae / \u4eff\u5e03\u7eb9 / \u78e8\u7802 \u53ef\u9009"],["\u5f00\u5408\u9002\u7528","180\xb0\u5e73\u644a\u8bbe\u8ba1"],["\u96d5\u523b\u5de5\u827a","CO2 \u6fc0\u5149\u5fae\u96d5\uff08\u9ad8\u6e05\u6670\u5ea6\uff09"],["\u5b9a\u5236\u9762\u79ef","\u5c01\u9762\u6574\u9762\u53ef\u96d5"]],images:["/img/book_big/The1.jpg","/img/book_big/The2.jpg"],mask:{shape:"rect",width:340,height:480,borderRadius:8}},{id:"coaster",name:"\u94dc\u8d28\u676f\u57ab",desc:"\u91d1\u5c5e\u8d28\u611f\uff0c\u684c\u9762\u827a\u672f",icon:"\u2615",iconImg:"/icon/\u676f\u5b50.png",price:25,originalPrice:35,leadTime:"5-7\u4e2a\u5de5\u4f5c\u65e5",description:"\u91c7\u7528\u4f18\u8d28\u9ec4\u94dc\u6750\u8d28\uff0c\u8868\u9762\u7ecf\u62c9\u4e1d\u5de5\u827a\u5904\u7406\uff0c\u5448\u73b0\u54d1\u5149\u91d1\u5c5e\u8d28\u611f\u3002\u80cc\u9762\u914d\u6709\u9632\u6ed1\u8f6f\u6728\u57ab\uff0c\u4fdd\u62a4\u684c\u9762\u540c\u65f6\u9632\u6b62\u6ed1\u52a8\u3002\u6fc0\u5149\u5fae\u96d5\u53ef\u5728\u8868\u9762\u523b\u5370\u540d\u5b57\u3001\u65e5\u671f\u6216\u795d\u798f\u8bed\uff0c\u662f\u4e54\u8fc1\u65b0\u5c45\u3001\u65b0\u5a5a\u8d3a\u793c\u7684\u7cbe\u81f4\u4e4b\u9009\u3002",subtitle:"\u9ec4\u94dc\u8d28\u611f \xb7 \u62c9\u4e1d\u54d1\u5149 \xb7 \u684c\u9762\u4e0a\u7684\u5fae\u578b\u96d5\u5851",tone:[42,30,18],story:"\u8bbe\u8ba1\u7075\u611f\u6765\u81ea\u65e5\u5f0f\u4f98\u5bc2\u7f8e\u5b66\u3002\u5c81\u6708\u4f1a\u5728\u9ec4\u94dc\u8868\u9762\u7559\u4e0b\u6e29\u67d4\u7684\u6c27\u5316\u75d5\u8ff9\uff0c\u5c31\u5982\u540c\u4e00\u676f\u8336\u4ece\u70ed\u5230\u51c9\u7684\u8fc7\u7a0b\u3002\u62c9\u4e1d\u5904\u7406\u540e\u7684\u54d1\u5149\u8868\u9762\u5728\u706f\u5149\u4e0b\u5448\u73b0\u7ec6\u817b\u7684\u91d1\u5c5e\u7eb9\u7406\uff0c\u6fc0\u5149\u5fae\u96d5\u7684\u540d\u5b57\u6210\u4e3a\u8fd9\u4ef6\u5668\u7269\u4e0a\u6700\u51b7\u9759\u7684\u6ce8\u811a\u3002\u5b83\u4e0d\u53ea\u662f\u676f\u57ab\uff0c\u66f4\u662f\u684c\u9762\u4e0a\u7684\u5fae\u578b\u96d5\u5851\u3002",scene:"\u4e54\u8fc1\u9001\u793c\u3001\u65b0\u5a5a\u8d3a\u793c\u3001\u5496\u5561\u89d2\u5e03\u7f6e\u3001\u529e\u516c\u684c\u7f8e\u5b66\u3002\u9002\u5408\u9001\u7ed9\u559c\u6b22\u624b\u51b2\u5496\u5561\u7684\u670b\u53cb\uff0c\u6216\u4f5c\u4e3a\u5a5a\u793c\u5bbe\u5ba2\u7684\u56de\u793c\u2014\u2014\u6bcf\u4e00\u53ea\u676f\u57ab\u4e0a\u90fd\u523b\u7740\u5bbe\u5ba2\u7684\u540d\u5b57\uff0c\u8ba9\u793c\u7269\u672c\u8eab\u6210\u4e3a\u5ea7\u4f4d\u5361\u3002",tags:["\u4e54\u8fc1\u793c","\u65b0\u5a5a\u8d3a\u793c","\u684c\u9762\u7f8e\u5b66","\u9ec4\u94dc","\u624b\u51b2\u5496\u5561"],specs:[["\u6750\u8d28","\u9ec4\u94dc + \u80cc\u9762\u8f6f\u6728\u9632\u6ed1\u57ab"],["\u8868\u9762\u5904\u7406","\u62c9\u4e1d\u54d1\u5149"],["\u76f4\u5f84","100mm"],["\u539a\u5ea6","3mm"],["\u96d5\u523b\u5de5\u827a","\u5149\u7ea4\u6fc0\u5149\u7cbe\u7ec6\u5fae\u96d5"],["\u8010\u6e29","\u2264120\xb0C"]],images:["/img/cup/The1.jpg"],mask:{shape:"circle",width:280,height:280}},{id:"penbox",name:"\u7af9\u5236\u7b14\u76d2",desc:"\u81ea\u7136\u7af9\u7eb9\uff0c\u6587\u623f\u96c5\u5668",icon:"\u270f\ufe0f",iconImg:"/icon/\u7b14\u76d2.png",price:75,originalPrice:98,leadTime:"7-10\u4e2a\u5de5\u4f5c\u65e5",description:"\u7cbe\u9009\u5929\u7136\u6960\u7af9\uff0c\u7ecf\u591a\u9053\u5de5\u5e8f\u6253\u78e8\u629b\u5149\uff0c\u4fdd\u7559\u5929\u7136\u7af9\u7eb9\u808c\u7406\u3002\u76d2\u76d6\u91c7\u7528\u78c1\u5438\u5f00\u5408\uff0c\u5185\u90e8\u8bbe\u6709\u5206\u5c42\u9694\u677f\u3002\u6fc0\u5149\u5fae\u96d5\u5728\u7af9\u9762\u4e0a\u5448\u73b0\u6df1\u6d45\u4e0d\u4e00\u7684\u96d5\u523b\u6548\u679c\uff0c\u878d\u5165\u58a8\u9999\u6c14\u8d28\u3002\u9002\u5408\u4e66\u623f\u6848\u5934\u3001\u4e66\u6cd5\u7231\u597d\u8005\u7684\u6587\u623f\u4f34\u4fa3\u3002",subtitle:"\u5929\u7136\u6960\u7af9 \xb7 \u78c1\u5438\u5f00\u5408 \xb7 \u6587\u623f\u96c5\u5668\u4e4b\u9009",tone:[30,24,16],story:"\u6bcf\u4e00\u53ea\u7b14\u76d2\u90fd\u6765\u81ea\u540c\u4e00\u7247\u7af9\u6797\u7684\u4e0d\u540c\u90e8\u4f4d\uff0c\u56e0\u6b64\u7eb9\u8def\u7edd\u4e0d\u91cd\u590d\u2014\u2014\u6b63\u5982\u6ca1\u6709\u4e24\u4e2a\u4eba\u7684\u4e66\u6cd5\u98ce\u683c\u5b8c\u5168\u76f8\u540c\u3002\u6211\u4eec\u4fdd\u7559\u4e86\u6960\u7af9\u5929\u7136\u7684\u6e29\u6da6\u89e6\u611f\uff0c\u53ea\u5728\u8868\u9762\u4ee5\u6fc0\u5149\u523b\u4e0b\u540d\u5b57\u6216\u4e00\u53e5\u7bb4\u8a00\u3002\u6253\u5f00\u78c1\u5438\u76d2\u76d6\u65f6\u7684\u6e05\u8106\u58f0\u54cd\uff0c\u662f\u6587\u623f\u4e2d\u7684\u5c0f\u5c0f\u4eea\u5f0f\u3002",scene:"\u4e66\u623f\u6848\u5934\u3001\u4e66\u6cd5\u7231\u597d\u8005\u88c5\u5907\u3001\u6559\u5e08\u8282\u793c\u7269\u3001\u4e66\u623f\u6696\u623f\u793c\u3002\u9002\u5408\u9001\u7ed9\u5199\u5b57\u597d\u770b\u7684\u4eba\u2014\u2014\u56e0\u4e3a\u61c2\u4e66\u5199\u7684\u4eba\uff0c\u624d\u61c2\u4e00\u53ea\u597d\u7b14\u76d2\u7684\u5206\u91cf\u3002",tags:["\u6587\u623f","\u4e66\u6cd5","\u6559\u5e08\u8282","\u4e66\u623f","\u5929\u7136\u6750\u8d28"],specs:[["\u6750\u8d28","\u5929\u7136\u6960\u7af9"],["\u5f00\u5408\u65b9\u5f0f","\u78c1\u5438\u5f0f\u76d2\u76d6"],["\u5185\u90e8\u7ed3\u6784","\u5206\u5c42\u9694\u677f\uff08\u53ef\u8c03\u8282\uff09"],["\u5c3a\u5bf8","200 \xd7 65 \xd7 30mm"],["\u8868\u9762\u5904\u7406","\u624b\u5de5\u6253\u78e8\u629b\u5149\uff0c\u65e0\u6f06"],["\u96d5\u523b\u5de5\u827a","CO2 \u6fc0\u5149\u70e7\u8680\uff08\u6df1\u6d45\u53ef\u8c03\uff09"]],images:["/img/penbox/The1.jpg","/img/penbox/The2.jpg","/img/penbox/The3.jpg"],mask:{shape:"rect",width:320,height:160,borderRadius:12}},{id:"booklamp",name:"\u4e66\u672c\u578b\u706f",desc:"\u6e29\u6696\u5149\u5f71\uff0c\u70b9\u4eae\u5fc3\u610f",icon:"\ud83d\udca1",iconImg:"/icon/\u4e66\u706f.png",price:45,originalPrice:68,leadTime:"5-7\u4e2a\u5de5\u4f5c\u65e5",description:"\u5f00\u5408\u5f0f\u8bbe\u8ba1\uff0c\u6253\u5f00\u5373\u4eae\uff0c\u5408\u62e2\u5373\u706d\uff0c\u5982\u9b54\u6cd5\u4e66\u822c\u5145\u6ee1\u60ca\u559c\u3002\u91c7\u7528LED\u6696\u5149\u706f\u6e90\uff0c\u5149\u7ebf\u67d4\u548c\u4e0d\u523a\u773c\uff0c\u53ef\u6301\u7eed\u70b9\u4eae6-8\u5c0f\u65f6\u3002\u5c01\u9762\u6fc0\u5149\u5fae\u96d5\u53ef\u5b9a\u5236\u6587\u5b57\u3001\u56fe\u6848\u6216\u7167\u7247\uff0c\u8ba9\u6e29\u6696\u7684\u706f\u5149\u627f\u8f7d\u4e13\u5c5e\u8bb0\u5fc6\u3002\u662f\u60c5\u4fa3\u793c\u7269\u3001\u6bd5\u4e1a\u793c\u7269\u7684\u521b\u610f\u4e4b\u9009\u3002",subtitle:"\u5f00\u5408\u5373\u4eae \xb7 LED\u6696\u5149 \xb7 \u9b54\u6cd5\u4e66\u822c\u7684\u60ca\u559c",tone:[25,20,15],story:"\u7075\u611f\u6765\u81ea\u300a\u54c8\u5229\xb7\u6ce2\u7279\u300b\u4e2d\u7684\u9b54\u6cd5\u8bfe\u672c\u2014\u2014\u6253\u5f00\u4e00\u672c\u4e66\uff0c\u5149\u8292\u503e\u6cfb\u800c\u51fa\u3002\u6211\u4eec\u91c7\u7528\u675c\u90a6\u7eb8\u4e0e\u5b9e\u6728\u5c01\u9762\u7ed3\u5408\uff0c\u8ba9\u706f\u4f53\u65e2\u8f7b\u8584\u53c8\u575a\u56fa\u3002\u6fc0\u5149\u5fae\u96d5\u5728\u5c01\u9762\u7559\u4e0b\u4f60\u7684\u540d\u5b57\u6216\u4e00\u5e45\u5c0f\u753b\uff0c\u5f53\u706f\u5728\u6df1\u591c\u4eae\u8d77\uff0c\u90a3\u662f\u4e13\u5c5e\u4e8e\u4f60\u7684\u6e29\u6696\u89d2\u843d\u3002",scene:"\u60c5\u4fa3\u793c\u7269\u3001\u6bd5\u4e1a\u7eaa\u5ff5\u3001\u5e8a\u5934\u591c\u706f\u3001\u9732\u8425\u6c1b\u56f4\u706f\u3001\u513f\u7ae5\u623f\u3002\u7279\u522b\u9002\u5408\u5728\u5c01\u9762\u523b\u4e0a\u4e24\u4e2a\u4eba\u7684\u540d\u5b57\u548c\u4e00\u53e5\u60c5\u8bdd\uff0c\u5728\u60c5\u4eba\u8282\u6216\u7eaa\u5ff5\u65e5\u9001\u51fa\u2014\u2014\u6253\u5f00\u4e66\u706f\uff0c\u5c31\u50cf\u6253\u5f00\u4e00\u5c01\u4f1a\u53d1\u5149\u7684\u60c5\u4e66\u3002",tags:["\u60c5\u4fa3\u793c","\u6bd5\u4e1a\u7eaa\u5ff5","\u591c\u706f","\u6c1b\u56f4\u706f","\u521b\u610f\u793c\u7269"],specs:[["\u5149\u6e90","LED \u6696\u767d\u5149\uff083000K\uff09"],["\u7eed\u822a","6-8\u5c0f\u65f6\uff08\u5185\u7f6e\u53ef\u5145\u7535\u9502\u7535\u6c60\uff09"],["\u5145\u7535","USB Type-C \u63a5\u53e3"],["\u5c01\u9762\u6750\u8d28","\u675c\u90a6\u7eb8 + \u5b9e\u6728\u5c01\u9762"],["\u5c55\u5f00\u5c3a\u5bf8","210 \xd7 150mm"],["\u96d5\u523b\u5de5\u827a","\u6fc0\u5149\u5fae\u96d5\uff08\u652f\u6301\u6587\u5b57+\u7b80\u5355\u56fe\u6848\uff09"]],images:["/img/booklight/The1.jpg","/img/booklight/The2.jpg"],mask:{shape:"rect",width:320,height:240,borderRadius:4}}],u=i.map(function(n){return(0,r.A)((0,r.A)({},n),{},{images:(n.images||[]).map(function(n){return(0,o.uq)(n)}),iconImg:(0,o.uq)(n.iconImg)})}),c=u,a=function(n){return u.find(function(t){return t.id===n})},s={"notebook-small":(0,o.uq)("/icon/\u4e66\u672c.png"),"notebook-large":(0,o.uq)("/icon/\u4e66\u672c_\u5927.png"),coaster:(0,o.uq)("/icon/\u676f\u5b50.png"),penbox:(0,o.uq)("/icon/\u7b14\u76d2.png"),booklamp:(0,o.uq)("/icon/\u4e66\u706f.png")};function d(n){return null!==n&&void 0!==n&&n.iconImg?(0,o.uq)(n.iconImg):null!==n&&void 0!==n&&n.id?(0,o.uq)(s[n.id]||"/icon/\u56db\u89d2\u661f.png"):(0,o.uq)("/icon/\u56db\u89d2\u661f.png")}},3246:function(n,t,e){e.d(t,{L:function(){return g},Sy:function(){return d},WG:function(){return l},gf:function(){return f}});var r=e(1212),o=e(9379),i=e(467),u=e(758),c=e.n(u),a="https://wxbackend.tokenleaping.com",s="smart_access_token";function d(){try{c().hideLoading()}catch(n){}}function f(){try{return c().getStorageSync(s)||""}catch(n){return""}}function l(n){c().setStorageSync(s,n)}function g(){try{c().removeStorageSync(s)}catch(n){}}function h(n){return p.apply(this,arguments)}function p(){return p=(0,i.A)((0,r.A)().m(function n(t){var e,i,u,s,d,l,h,p,v,S,y,k,A,b=arguments;return(0,r.A)().w(function(n){while(1)switch(n.p=n.n){case 0:return e=b.length>1&&void 0!==b[1]?b[1]:{},i=e.method,u=void 0===i?"GET":i,s=e.data,d=e.headers,l=void 0===d?{}:d,h=e.auth,p=void 0===h||h,v=f(),S=(0,o.A)((0,o.A)({"Content-Type":"application/json"},p&&v?{Authorization:"Bearer ".concat(v)}:{}),l),n.p=1,n.n=2,c().request({url:"".concat(a).concat(t),method:u,data:s,header:S});case 2:y=n.v,n.n=4;break;case 3:throw n.p=3,n.v,new Error("\u7f51\u7edc\u5f02\u5e38\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5");case 4:if(401!==y.statusCode){n.n=5;break}throw g(),null===(k=m)||void 0===k||k(),new Error("\u767b\u5f55\u5df2\u8fc7\u671f\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55");case 5:if(A=y.data,!A||"number"!==typeof A.code||0===A.code){n.n=6;break}throw new Error(A.message||"\u8bf7\u6c42\u5931\u8d25");case 6:return n.a(2,A&&"number"===typeof A.code?A.data:A)}},n,null,[[1,3]])})),p.apply(this,arguments)}var m=null;var v={get:function(n,t){return h(n,(0,o.A)((0,o.A)({},t),{},{method:"GET"}))},post:function(n,t,e){return h(n,(0,o.A)((0,o.A)({},e),{},{method:"POST",data:t}))},put:function(n,t,e){return h(n,(0,o.A)((0,o.A)({},e),{},{method:"PUT",data:t}))},patch:function(n,t,e){return h(n,(0,o.A)((0,o.A)({},e),{},{method:"PATCH",data:t}))},del:function(n,t){return h(n,(0,o.A)((0,o.A)({},t),{},{method:"DELETE"}))}};t.Ay=v},8594:function(n,t,e){e.d(t,{E1:function(){return Z},EB:function(){return X},F0:function(){return F},Fu:function(){return G},Hf:function(){return w},IU:function(){return L},Ic:function(){return g},O4:function(){return Y},Q1:function(){return x},Q4:function(){return A},Re:function(){return J},Rq:function(){return Q},ab:function(){return V},cY:function(){return R},eW:function(){return z},hG:function(){return E},i5:function(){return W},iA:function(){return T},iZ:function(){return j},kg:function(){return I},kh:function(){return H},n7:function(){return O},p_:function(){return q},uF:function(){return B},ug:function(){return _},yU:function(){return $}});var r=e(9379),o=e(436),i=e(758),u=e.n(i),c=e(5234),a=e(8199),s=e(6764),d="smart_theme",f="smart_user_info",l="smart_active_openid";function g(n){return!!n&&(n.startsWith("mock_")||n.startsWith("mock-"))}function h(){var n=A(),t=(null===n||void 0===n?void 0:n.openid)||u().getStorageSync(l)||"_guest_";return u().setStorageSync(l,t),t}function p(n){var t=h();return"".concat(n,"_").concat(t)}var m="smart_user_registry",v="zhihui2024";function S(){try{return u().getStorageSync(m)||[]}catch(n){return[]}}function y(n){var t=S();t.includes(n)||(t.push(n),u().setStorageSync(m,t))}function k(n){var t=S().filter(function(t){return t!==n});u().setStorageSync(m,t)}function A(){try{return u().getStorageSync(f)}catch(n){return null}}function b(n){var t;u().setStorageSync(f,n),null!==n&&void 0!==n&&n.openid&&(u().setStorageSync(l,n.openid),u().setStorageSync("user_info_".concat(n.openid),n),y(n.openid)),(0,s.m)(),null===(t=u().eventCenter)||void 0===t||t.trigger("authStateChanged",{openid:(null===n||void 0===n?void 0:n.openid)||""})}function C(n){try{var t=u().getStorageSync("user_info_".concat(n));if(t)return t}catch(n){}var e=A();return(null===e||void 0===e?void 0:e.openid)===n?e:null}function w(){var n;u().removeStorageSync(f),u().removeStorageSync(l),(0,s.m)(),null===(n=u().eventCenter)||void 0===n||n.trigger("authStateChanged",{openid:""})}function T(n){b(n)}function _(){return A()}function x(){var n=S();return n.map(function(n){var t=C(n),e=N(n),r=P(n);return{openid:n,nickName:(null===t||void 0===t?void 0:t.nickName)||"\u672a\u77e5\u7528\u6237",avatarUrl:(null===t||void 0===t?void 0:t.avatarUrl)||"",loginAt:(null===t||void 0===t?void 0:t.loginAt)||0,designCount:e.length,orderCount:r.length}})}function I(n,t){var e="mock_"+Date.now().toString(36)+"_"+Math.random().toString(36).slice(2,6),r={openid:e,nickName:n||"\u5fae\u4fe1\u7528\u6237",avatarUrl:t||"",loginAt:Date.now()};return b(r),r}function j(n){var t=C(n);return!!t&&(u().setStorageSync(f,t),u().setStorageSync(l,n),!0)}function E(n){u().removeStorageSync("user_info_".concat(n)),u().removeStorageSync("design_list_".concat(n)),u().removeStorageSync("order_list_".concat(n)),u().removeStorageSync("address_list_".concat(n)),k(n);var t=A();(null===t||void 0===t?void 0:t.openid)===n&&w()}function B(n){return n===v}function D(n,t){return"".concat(n,"_").concat(t)}function N(n){try{return u().getStorageSync(D("design_list",n))||[]}catch(n){return[]}}function P(n){try{return u().getStorageSync(D("order_list",n))||[]}catch(n){return[]}}function q(){try{return u().getStorageSync(p("design_list"))||[]}catch(n){return[]}}function G(n){u().setStorageSync(p("design_list"),n)}function R(n,t){var e=q(),r=(0,a.uq)((null===n||void 0===n?void 0:n.iconImg)||c.rj[null===n||void 0===n?void 0:n.id]||"/icon/\u56db\u89d2\u661f.png"),i={id:"DSG"+Date.now(),productId:n.id,productName:n.name,productIcon:r,unitPrice:n.price,count:t,status:"undesigned",createdAt:(new Date).toISOString().slice(0,10)};return G([].concat((0,o.A)(e),[i])),i}function W(n,t){var e=q(),o=e.findIndex(function(t){return t.id===n});-1!==o&&(e[o]=(0,r.A)((0,r.A)({},e[o]),t),G(e))}function H(n){var t=q().filter(function(t){return!n.includes(t.id)});G(t)}function O(){try{return u().getStorageSync(p("order_list"))||[]}catch(n){return[]}}function U(n){u().setStorageSync(p("order_list"),n)}function L(n){var t,e=q(),r=O(),i=e.find(function(t){return t.id===n});if(!i)return null;var u=null!==(t=i.productIcon)&&void 0!==t&&t.startsWith("/icon/")||/^https?:/i.test(i.productIcon||"")?i.productIcon:c.rj[i.productId]||"/icon/\u56db\u89d2\u661f.png",s=(0,a.uq)(u),d={id:"ORD"+Date.now().toString().slice(-9),productName:i.productName,productIcon:s,statusCode:"pending",date:(new Date).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).replace(/\//g,"-"),price:"\xa5"+(i.unitPrice*i.count).toFixed(2),count:i.count,sku:"".concat(i.productName," \xd7 ").concat(i.count)},f=e.findIndex(function(t){return t.id===n});return-1!==f&&(e[f].status="ordered",e[f].orderId=d.id),G(e),U([d].concat((0,o.A)(r))),d}function Y(){try{return u().getStorageSync(d)||"auto"}catch(n){return"auto"}}function F(n){u().setStorageSync(d,n)}var M=null;function Q(n){M=n}function z(n){if("auto"===n){if(M)return M;try{var t=u().getAppBaseInfo();if("dark"===t.theme||"light"===t.theme)return t.theme}catch(n){}return"light"}return n}function J(){try{return u().getStorageSync(p("address_list"))||[]}catch(n){return[]}}function K(n){u().setStorageSync(p("address_list"),n)}function Z(n){var t=J(),e=(0,r.A)((0,r.A)({},n),{},{id:"ADR"+Date.now()});return e.isDefault&&t.forEach(function(n){n.isDefault=!1}),K([e].concat((0,o.A)(t))),e}function $(n,t){var e=J(),o=e.findIndex(function(t){return t.id===n});-1!==o&&(t.isDefault&&e.forEach(function(n){n.isDefault=!1}),e[o]=(0,r.A)((0,r.A)({},e[o]),t),K(e))}function V(n){var t=J().filter(function(t){return t.id!==n});K(t)}function X(){return J().find(function(n){return n.isDefault})}},6606:function(n,t,e){e.d(t,{G:function(){return u}});var r=e(758),o=e.n(r);function i(n){return"dark"===n?"#191919":"#ffffff"}function u(n,t){var e=null!==t&&void 0!==t?t:i(n);o().setBackgroundColor({backgroundColor:e,backgroundColorTop:e,backgroundColorBottom:e}),o().setBackgroundTextStyle({textStyle:"dark"===n?"light":"dark"})}}}]); \ No newline at end of file diff --git a/dist/custom-tab-bar/index.js b/dist/custom-tab-bar/index.js index 0461171..ce99fe9 100644 --- a/dist/custom-tab-bar/index.js +++ b/dist/custom-tab-bar/index.js @@ -1 +1 @@ -"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[777],{653:function(n,e,t){var a=t(7842),i=t(5544),c=t(118),o=t(758),r=t.n(o),s=t(6540),u=t(8594),l=t(9703),v=t(6606),g=t(4848),f=[{pagePath:"/pages/index/index",label:"\u9996\u9875",icon:"/icon/\u9996\u9875.svg",iconActive:"/icon/\u9996\u9875-fill.svg"},{pagePath:"/pages/shop/index",label:"\u5546\u54c1",icon:"/icon/\u5546\u54c1.svg",iconActive:"/icon/\u5546\u54c1-fill.svg"},{pagePath:"/pages/designList/index",label:"\u8bbe\u8ba1\u6e05\u5355",icon:"/icon/\u8c03\u8272\u76d8.svg",iconActive:"/icon/\u8c03\u8272\u76d8-fill.svg"},{pagePath:"/pages/orders/index",label:"\u8ba2\u5355",icon:"/icon/\u5305\u88f9.svg",iconActive:"/icon/\u5305\u88f9-fill.svg"},{pagePath:"/pages/profile/index",label:"\u6211\u7684",icon:"/icon/\u4e2a\u4eba.svg",iconActive:"/icon/\u4e2a\u4eba-fill.svg"}];function p(n){var e=f.findIndex(function(e){return n.endsWith(e.pagePath)});return f[e>=0?e:0].pagePath}function d(){var n,e=(null===(n=r().getCurrentInstance().router)||void 0===n?void 0:n.path)||"pages/index/index";return p(e)}function h(){var n=(0,s.useState)((0,u.eW)((0,u.O4)())),e=(0,i.A)(n,2),t=e[0],a=e[1],o=(0,s.useState)(d),h=(0,i.A)(o,2),b=h[0],x=h[1];(0,s.useEffect)(function(){var n=function(n){return a(n)};return r().eventCenter.on(l.Wo,n),function(){r().eventCenter.off(l.Wo,n)}},[]),(0,s.useEffect)(function(){var n=function(n){var e;x(p(n||(null===(e=r().getCurrentInstance().router)||void 0===e?void 0:e.path)||"pages/index/index"))};return r().eventCenter.on("tabBarChange",n),function(){r().eventCenter.off("tabBarChange",n)}},[]),(0,s.useEffect)(function(){(0,v.G)(t)},[t]);var m=function(n){var e;x(p(n)),r().switchTab({url:n}),null===(e=r().eventCenter)||void 0===e||e.trigger("tabBarChange",n)};return(0,g.jsx)(c.Ss,{className:"custom-tab-bar theme-".concat(t),children:f.map(function(n){var e=n.pagePath===b;return(0,g.jsxs)(c.Ss,{className:"tab-item ".concat(e?"active":""),onTap:function(){return m(n.pagePath)},children:[(0,g.jsx)(c._V,{className:"tab-icon-img ".concat(e?"active":""),src:e?n.iconActive:n.icon,mode:"aspectFit"}),(0,g.jsx)(c.EY,{className:"tab-label",children:n.label})]},n.pagePath)})})}Component((0,a.createComponentConfig)(h,"custom-tab-bar/index"))}},function(n){var e=function(e){return n(n.s=e)};n.O(0,[907,96,76],function(){return e(653)});n.O()}]); \ No newline at end of file +"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[777],{653:function(n,e,t){var a=t(7842),i=t(5544),c=t(118),o=t(758),r=t.n(o),u=t(6540),s=t(8594),l=t(9703),v=t(6606),g=t(8199),f=t(4848),p=[{pagePath:"/pages/index/index",label:"\u9996\u9875",icon:(0,g.uq)("/icon/\u9996\u9875.svg"),iconActive:(0,g.uq)("/icon/\u9996\u9875-fill.svg")},{pagePath:"/pages/shop/index",label:"\u5546\u54c1",icon:(0,g.uq)("/icon/\u5546\u54c1.svg"),iconActive:(0,g.uq)("/icon/\u5546\u54c1-fill.svg")},{pagePath:"/pages/designList/index",label:"\u8bbe\u8ba1\u6e05\u5355",icon:(0,g.uq)("/icon/\u8c03\u8272\u76d8.svg"),iconActive:(0,g.uq)("/icon/\u8c03\u8272\u76d8-fill.svg")},{pagePath:"/pages/orders/index",label:"\u8ba2\u5355",icon:(0,g.uq)("/icon/\u5305\u88f9.svg"),iconActive:(0,g.uq)("/icon/\u5305\u88f9-fill.svg")},{pagePath:"/pages/profile/index",label:"\u6211\u7684",icon:(0,g.uq)("/icon/\u4e2a\u4eba.svg"),iconActive:(0,g.uq)("/icon/\u4e2a\u4eba-fill.svg")}];function d(n){var e=p.findIndex(function(e){return n.endsWith(e.pagePath)});return p[e>=0?e:0].pagePath}function h(){var n,e=(null===(n=r().getCurrentInstance().router)||void 0===n?void 0:n.path)||"pages/index/index";return d(e)}function b(){var n=(0,u.useState)((0,s.eW)((0,s.O4)())),e=(0,i.A)(n,2),t=e[0],a=e[1],o=(0,u.useState)(h),g=(0,i.A)(o,2),b=g[0],x=g[1];(0,u.useEffect)(function(){var n=function(n){return a(n)};return r().eventCenter.on(l.Wo,n),function(){r().eventCenter.off(l.Wo,n)}},[]),(0,u.useEffect)(function(){var n=function(n){var e;x(d(n||(null===(e=r().getCurrentInstance().router)||void 0===e?void 0:e.path)||"pages/index/index"))};return r().eventCenter.on("tabBarChange",n),function(){r().eventCenter.off("tabBarChange",n)}},[]),(0,u.useEffect)(function(){(0,v.G)(t)},[t]);var m=function(n){var e;x(d(n)),r().switchTab({url:n}),null===(e=r().eventCenter)||void 0===e||e.trigger("tabBarChange",n)};return(0,f.jsx)(c.Ss,{className:"custom-tab-bar theme-".concat(t),children:p.map(function(n){var e=n.pagePath===b;return(0,f.jsxs)(c.Ss,{className:"tab-item ".concat(e?"active":""),onTap:function(){return m(n.pagePath)},children:[(0,f.jsx)(c._V,{className:"tab-icon-img ".concat(e?"active":""),src:e?n.iconActive:n.icon,mode:"aspectFit"}),(0,f.jsx)(c.EY,{className:"tab-label",children:n.label})]},n.pagePath)})})}Component((0,a.createComponentConfig)(b,"custom-tab-bar/index"))}},function(n){var e=function(e){return n(n.s=e)};n.O(0,[907,96,76],function(){return e(653)});n.O()}]); \ No newline at end of file diff --git a/dist/img/book_big/The1.jpg b/dist/img/book_big/The1.jpg deleted file mode 100644 index 2f9873b..0000000 Binary files a/dist/img/book_big/The1.jpg and /dev/null differ diff --git a/dist/img/book_big/The2.jpg b/dist/img/book_big/The2.jpg deleted file mode 100644 index 5184387..0000000 Binary files a/dist/img/book_big/The2.jpg and /dev/null differ diff --git a/dist/img/book_small/The1.jpg b/dist/img/book_small/The1.jpg deleted file mode 100644 index a2e4de7..0000000 Binary files a/dist/img/book_small/The1.jpg and /dev/null differ diff --git a/dist/img/booklight/The1.jpg b/dist/img/booklight/The1.jpg deleted file mode 100644 index 136cf81..0000000 Binary files a/dist/img/booklight/The1.jpg and /dev/null differ diff --git a/dist/img/cup/The1.jpg b/dist/img/cup/The1.jpg deleted file mode 100644 index 8993474..0000000 Binary files a/dist/img/cup/The1.jpg and /dev/null differ diff --git a/dist/img/penbox/The1.jpg b/dist/img/penbox/The1.jpg deleted file mode 100644 index a64b1fe..0000000 Binary files a/dist/img/penbox/The1.jpg and /dev/null differ diff --git a/dist/img/penbox/The2.jpg b/dist/img/penbox/The2.jpg deleted file mode 100644 index fc1aca5..0000000 Binary files a/dist/img/penbox/The2.jpg and /dev/null differ diff --git a/dist/img/penbox/The3.jpg b/dist/img/penbox/The3.jpg deleted file mode 100644 index 89d9639..0000000 Binary files a/dist/img/penbox/The3.jpg and /dev/null differ diff --git a/dist/pages/address/index.js b/dist/pages/address/index.js index b59cbb7..5881a93 100644 --- a/dist/pages/address/index.js +++ b/dist/pages/address/index.js @@ -1 +1 @@ -"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[81],{8807:function(e,s,a){var n=a(7842),c=a(5544),t=a(118),l=a(758),r=a.n(l),i=a(6540),d=a(8594),o=a(9703),m=a(9201),u=a(5414),h=a(9674),x=a(4848);function p(){var e=(0,o.wR)(),s=(e.theme,e.resolvedTheme),a=(0,m.c)();(0,u.l)(s);var n=(0,i.useState)([]),l=(0,c.A)(n,2),p=l[0],j=l[1],f=(0,i.useState)(null),N=(0,c.A)(f,2),S=N[0],g=N[1],v=(0,i.useState)(!1),b=(0,c.A)(v,2),E=b[0],Y=b[1],T=(0,i.useState)(""),w=(0,c.A)(T,2),y=w[0],k=w[1],A=(0,i.useState)(""),C=(0,c.A)(A,2),D=C[0],P=C[1],I=(0,i.useState)([]),B=(0,c.A)(I,2),J=B[0],M=B[1],O=(0,i.useState)(""),R=(0,c.A)(O,2),F=R[0],L=R[1],U=(0,i.useState)(!1),V=(0,c.A)(U,2),_=V[0],q=V[1],z=function(){return j((0,d.Re)())};(0,i.useEffect)(function(){z()},[]);var G=function(){k(""),P(""),M([]),L(""),q(!1),g(null)},H=function(){G(),Y(!0)},K=function(e){g(e),k(e.name),P(e.phone),M(e.region),L(e.detail),q(e.isDefault),Y(!0)},Q=function(e){r().showModal({title:"\u786e\u8ba4\u5220\u9664",content:"\u5220\u9664\u540e\u5c06\u65e0\u6cd5\u6062\u590d\u8be5\u5730\u5740",success:function(s){s.confirm&&((0,d.ab)(e),z())}})},W=function(e){var s="".concat(e.name," ").concat(e.phone,"\n").concat(e.region.join(" ")," ").concat(e.detail);r().setClipboardData({data:s})},X=function(){if(y.trim()&&D.trim()&&0!==J.length&&F.trim()){var e={name:y,phone:D,region:J,detail:F,isDefault:_};S?(0,d.yU)(S.id,e):(0,d.E1)(e),r().showToast({title:"\u4fdd\u5b58\u6210\u529f",icon:"success"}),Y(!1),G(),z()}else r().showToast({title:"\u8bf7\u586b\u5199\u5b8c\u6574\u4fe1\u606f",icon:"none"})},Z=function(e){M(e.detail.value||[])};return(0,x.jsxs)(t.Ss,{className:"theme-".concat(s),children:[(0,x.jsx)(h.A,{}),(0,x.jsxs)(t.Ss,{className:"address-page",children:[(0,x.jsxs)(t.Ss,{className:"page-header dashed-card mt-20",style:{marginTop:"".concat(a.headerPaddingTop,"px")},children:[(0,x.jsx)(t.Ss,{className:"star-badge"}),(0,x.jsxs)(t.Ss,{className:"flex-between",style:{width:"100%"},children:[(0,x.jsx)(t.EY,{className:"back-btn",onTap:function(){return r().navigateBack()},children:"\u2190"}),(0,x.jsx)(t.EY,{className:"page-title",children:"\u6536\u8d27\u5730\u5740"}),(0,x.jsx)(t.Ss,{style:{width:"60px"}})]})]}),(0,x.jsxs)(t.Ss,{className:"address-list",children:[p.map(function(e){return(0,x.jsxs)(t.Ss,{className:"address-card dashed-card",children:[(0,x.jsxs)(t.Ss,{className:"address-header",children:[(0,x.jsxs)(t.Ss,{className:"address-user",children:[(0,x.jsx)(t.EY,{className:"address-name",children:e.name}),(0,x.jsx)(t.EY,{className:"address-phone",children:e.phone}),e.isDefault&&(0,x.jsx)(t.Ss,{className:"default-tag",children:(0,x.jsx)(t.EY,{children:"\u9ed8\u8ba4"})})]}),(0,x.jsxs)(t.EY,{className:"address-full",children:[e.region.join(" ")," ",e.detail]})]}),(0,x.jsxs)(t.Ss,{className:"address-actions",children:[(0,x.jsx)(t.EY,{className:"address-act",onTap:function(){return K(e)},children:"\u270f\ufe0f \u7f16\u8f91"}),(0,x.jsx)(t.EY,{className:"address-act",onTap:function(){return W(e)},children:"\ud83d\udccb \u590d\u5236"}),(0,x.jsx)(t.EY,{className:"address-act delete",onTap:function(){return Q(e.id)},children:"\ud83d\uddd1\ufe0f \u5220\u9664"})]})]},e.id)}),0===p.length&&(0,x.jsxs)(t.Ss,{className:"empty-state",children:[(0,x.jsx)(t._V,{className:"empty-icon-img",src:"/icon/\u5730\u5740.png",mode:"aspectFit"}),(0,x.jsx)(t.EY,{className:"empty-text",children:"\u8fd8\u6ca1\u6709\u6536\u8d27\u5730\u5740"}),(0,x.jsx)(t.EY,{className:"empty-sub",children:"\u70b9\u51fb\u4e0b\u65b9\u6309\u94ae\u6dfb\u52a0\u65b0\u5730\u5740"})]})]}),(0,x.jsx)(t.Ss,{className:"safe-bottom-placeholder"}),(0,x.jsx)(t.Ss,{className:"action-bar",children:(0,x.jsx)(t.Ss,{className:"btn-gradient",onTap:H,children:(0,x.jsx)(t.EY,{children:"\u65b0\u589e\u6536\u8d27\u5730\u5740"})})}),E&&(0,x.jsx)(t.Ss,{className:"modal-overlay",children:(0,x.jsxs)(t.Ss,{className:"modal-card dashed-card address-form",children:[(0,x.jsx)(t.Ss,{className:"star-badge"}),(0,x.jsx)(t.EY,{className:"modal-title",children:S?"\u7f16\u8f91\u5730\u5740":"\u65b0\u589e\u5730\u5740"}),(0,x.jsx)(t.pd,{className:"form-input",placeholder:"\u6536\u8d27\u4eba\u59d3\u540d",value:y,onInput:function(e){return k(e.detail.value)}}),(0,x.jsx)(t.pd,{className:"form-input",placeholder:"\u624b\u673a\u53f7\u7801",type:"number",value:D,onInput:function(e){return P(e.detail.value)}}),(0,x.jsx)(t.LC,{mode:"region",value:J,onChange:Z,children:(0,x.jsx)(t.Ss,{className:"form-picker",children:(0,x.jsx)(t.EY,{className:J.length?"form-picker-val":"form-picker-ph",children:J.length?J.join(" / "):"\u9009\u62e9\u7701 / \u5e02 / \u533a"})})}),(0,x.jsx)(t.pd,{className:"form-input",placeholder:"\u8be6\u7ec6\u5730\u5740\uff1a\u8857\u9053\u3001\u95e8\u724c\u53f7",value:F,onInput:function(e){return L(e.detail.value)}}),(0,x.jsxs)(t.Ss,{className:"form-row",onTap:function(){return q(!_)},children:[(0,x.jsx)(t.EY,{className:"form-label",children:"\u8bbe\u4e3a\u9ed8\u8ba4\u5730\u5740"}),(0,x.jsx)(t.Ss,{className:"checkbox ".concat(_?"checked":"")})]}),(0,x.jsxs)(t.Ss,{className:"form-actions",children:[(0,x.jsx)(t.Ss,{className:"btn-outline",onTap:function(){Y(!1),G()},children:(0,x.jsx)(t.EY,{children:"\u53d6\u6d88"})}),(0,x.jsx)(t.Ss,{className:"btn-gradient",onTap:X,children:(0,x.jsx)(t.EY,{children:"\u4fdd\u5b58"})})]})]})})]})]})}var j={navigationStyle:"custom",enablePageMeta:!0,navigationBarTitleText:"\u6536\u8d27\u5730\u5740"};Page((0,n.createPageConfig)(p,"pages/address/index",{root:{cn:[]}},j||{}))}},function(e){var s=function(s){return e(e.s=s)};e.O(0,[907,96,76],function(){return s(8807)});e.O()}]); \ No newline at end of file +"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[81],{8807:function(e,s,a){var n=a(7842),c=a(5544),t=a(118),l=a(758),r=a.n(l),i=a(6540),d=a(8594),o=a(9703),m=a(9201),u=a(5414),h=a(9674),x=a(8199),p=a(4848);function j(){var e=(0,o.wR)(),s=(e.theme,e.resolvedTheme),a=(0,m.c)();(0,u.l)(s);var n=(0,i.useState)([]),l=(0,c.A)(n,2),j=l[0],f=l[1],N=(0,i.useState)(null),S=(0,c.A)(N,2),g=S[0],v=S[1],b=(0,i.useState)(!1),E=(0,c.A)(b,2),Y=E[0],T=E[1],w=(0,i.useState)(""),y=(0,c.A)(w,2),k=y[0],A=y[1],C=(0,i.useState)(""),D=(0,c.A)(C,2),P=D[0],I=D[1],B=(0,i.useState)([]),J=(0,c.A)(B,2),M=J[0],O=J[1],R=(0,i.useState)(""),q=(0,c.A)(R,2),F=q[0],L=q[1],U=(0,i.useState)(!1),V=(0,c.A)(U,2),_=V[0],z=V[1],G=function(){return f((0,d.Re)())};(0,i.useEffect)(function(){G()},[]);var H=function(){A(""),I(""),O([]),L(""),z(!1),v(null)},K=function(){H(),T(!0)},Q=function(e){v(e),A(e.name),I(e.phone),O(e.region),L(e.detail),z(e.isDefault),T(!0)},W=function(e){r().showModal({title:"\u786e\u8ba4\u5220\u9664",content:"\u5220\u9664\u540e\u5c06\u65e0\u6cd5\u6062\u590d\u8be5\u5730\u5740",success:function(s){s.confirm&&((0,d.ab)(e),G())}})},X=function(e){var s="".concat(e.name," ").concat(e.phone,"\n").concat(e.region.join(" ")," ").concat(e.detail);r().setClipboardData({data:s})},Z=function(){if(k.trim()&&P.trim()&&0!==M.length&&F.trim()){var e={name:k,phone:P,region:M,detail:F,isDefault:_};g?(0,d.yU)(g.id,e):(0,d.E1)(e),r().showToast({title:"\u4fdd\u5b58\u6210\u529f",icon:"success"}),T(!1),H(),G()}else r().showToast({title:"\u8bf7\u586b\u5199\u5b8c\u6574\u4fe1\u606f",icon:"none"})},$=function(e){O(e.detail.value||[])};return(0,p.jsxs)(t.Ss,{className:"theme-".concat(s),children:[(0,p.jsx)(h.A,{}),(0,p.jsxs)(t.Ss,{className:"address-page",children:[(0,p.jsxs)(t.Ss,{className:"page-header dashed-card mt-20",style:{marginTop:"".concat(a.headerPaddingTop,"px")},children:[(0,p.jsx)(t.Ss,{className:"star-badge"}),(0,p.jsxs)(t.Ss,{className:"flex-between",style:{width:"100%"},children:[(0,p.jsx)(t.EY,{className:"back-btn",onTap:function(){return r().navigateBack()},children:"\u2190"}),(0,p.jsx)(t.EY,{className:"page-title",children:"\u6536\u8d27\u5730\u5740"}),(0,p.jsx)(t.Ss,{style:{width:"60px"}})]})]}),(0,p.jsxs)(t.Ss,{className:"address-list",children:[j.map(function(e){return(0,p.jsxs)(t.Ss,{className:"address-card dashed-card",children:[(0,p.jsxs)(t.Ss,{className:"address-header",children:[(0,p.jsxs)(t.Ss,{className:"address-user",children:[(0,p.jsx)(t.EY,{className:"address-name",children:e.name}),(0,p.jsx)(t.EY,{className:"address-phone",children:e.phone}),e.isDefault&&(0,p.jsx)(t.Ss,{className:"default-tag",children:(0,p.jsx)(t.EY,{children:"\u9ed8\u8ba4"})})]}),(0,p.jsxs)(t.EY,{className:"address-full",children:[e.region.join(" ")," ",e.detail]})]}),(0,p.jsxs)(t.Ss,{className:"address-actions",children:[(0,p.jsx)(t.EY,{className:"address-act",onTap:function(){return Q(e)},children:"\u270f\ufe0f \u7f16\u8f91"}),(0,p.jsx)(t.EY,{className:"address-act",onTap:function(){return X(e)},children:"\ud83d\udccb \u590d\u5236"}),(0,p.jsx)(t.EY,{className:"address-act delete",onTap:function(){return W(e.id)},children:"\ud83d\uddd1\ufe0f \u5220\u9664"})]})]},e.id)}),0===j.length&&(0,p.jsxs)(t.Ss,{className:"empty-state",children:[(0,p.jsx)(t._V,{className:"empty-icon-img",src:(0,x.uq)("/icon/\u5730\u5740.png"),mode:"aspectFit"}),(0,p.jsx)(t.EY,{className:"empty-text",children:"\u8fd8\u6ca1\u6709\u6536\u8d27\u5730\u5740"}),(0,p.jsx)(t.EY,{className:"empty-sub",children:"\u70b9\u51fb\u4e0b\u65b9\u6309\u94ae\u6dfb\u52a0\u65b0\u5730\u5740"})]})]}),(0,p.jsx)(t.Ss,{className:"safe-bottom-placeholder"}),(0,p.jsx)(t.Ss,{className:"action-bar",children:(0,p.jsx)(t.Ss,{className:"btn-gradient",onTap:K,children:(0,p.jsx)(t.EY,{children:"\u65b0\u589e\u6536\u8d27\u5730\u5740"})})}),Y&&(0,p.jsx)(t.Ss,{className:"modal-overlay",children:(0,p.jsxs)(t.Ss,{className:"modal-card dashed-card address-form",children:[(0,p.jsx)(t.Ss,{className:"star-badge"}),(0,p.jsx)(t.EY,{className:"modal-title",children:g?"\u7f16\u8f91\u5730\u5740":"\u65b0\u589e\u5730\u5740"}),(0,p.jsx)(t.pd,{className:"form-input",placeholder:"\u6536\u8d27\u4eba\u59d3\u540d",value:k,onInput:function(e){return A(e.detail.value)}}),(0,p.jsx)(t.pd,{className:"form-input",placeholder:"\u624b\u673a\u53f7\u7801",type:"number",value:P,onInput:function(e){return I(e.detail.value)}}),(0,p.jsx)(t.LC,{mode:"region",value:M,onChange:$,children:(0,p.jsx)(t.Ss,{className:"form-picker",children:(0,p.jsx)(t.EY,{className:M.length?"form-picker-val":"form-picker-ph",children:M.length?M.join(" / "):"\u9009\u62e9\u7701 / \u5e02 / \u533a"})})}),(0,p.jsx)(t.pd,{className:"form-input",placeholder:"\u8be6\u7ec6\u5730\u5740\uff1a\u8857\u9053\u3001\u95e8\u724c\u53f7",value:F,onInput:function(e){return L(e.detail.value)}}),(0,p.jsxs)(t.Ss,{className:"form-row",onTap:function(){return z(!_)},children:[(0,p.jsx)(t.EY,{className:"form-label",children:"\u8bbe\u4e3a\u9ed8\u8ba4\u5730\u5740"}),(0,p.jsx)(t.Ss,{className:"checkbox ".concat(_?"checked":"")})]}),(0,p.jsxs)(t.Ss,{className:"form-actions",children:[(0,p.jsx)(t.Ss,{className:"btn-outline",onTap:function(){T(!1),H()},children:(0,p.jsx)(t.EY,{children:"\u53d6\u6d88"})}),(0,p.jsx)(t.Ss,{className:"btn-gradient",onTap:Z,children:(0,p.jsx)(t.EY,{children:"\u4fdd\u5b58"})})]})]})})]})]})}var f={navigationStyle:"custom",enablePageMeta:!0,navigationBarTitleText:"\u6536\u8d27\u5730\u5740"};Page((0,n.createPageConfig)(j,"pages/address/index",{root:{cn:[]}},f||{}))}},function(e){var s=function(s){return e(e.s=s)};e.O(0,[907,96,76],function(){return s(8807)});e.O()}]); \ No newline at end of file diff --git a/dist/pages/designList/index.js b/dist/pages/designList/index.js index ddc8ad9..de7062b 100644 --- a/dist/pages/designList/index.js +++ b/dist/pages/designList/index.js @@ -1 +1 @@ -"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(8199),h=n(9703),g=n(9201),m=n(5414),x=n(7723),b=n(9674),p=n(4848),j=[{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"}],f={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 S(){var e=(0,h.wR)(),s=e.resolvedTheme,n=(0,g.c)();(0,m.l)(s);var a=(0,d.useState)("all"),i=(0,t.A)(a,2),S=i[0],N=i[1],w=(0,d.useState)([]),v=(0,t.A)(w,2),T=v[0],E=v[1],Y=(0,d.useState)(!1),y=(0,t.A)(Y,2),k=y[0],A=y[1],z=(0,d.useState)(new Set),I=(0,t.A)(z,2),P=I[0],B=I[1],C=(0,d.useCallback)(function(){E((0,r.p_)())},[]),L=(0,d.useCallback)(function(){var e=l().getStorageSync("designList:filter");e&&j.some(function(s){return s.code===e})&&(N(e),l().removeStorageSync("designList:filter")),C()},[C]);(0,d.useEffect)(function(){var e=l().getCurrentInstance().page;if(e){var s=e.onShow;e.onShow=function(){L(),s&&s.apply(this)}}L()},[L]);var M="all"===S?T:"toDesign"===S?T.filter(function(e){return"undesigned"===e.status||"designing"===e.status}):T.filter(function(e){return e.status===S}),F=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"})},_=function(e){var s=new Set(P);s.has(e)?s.delete(e):s.add(e),B(s)},D=function(){P.size===M.length?B(new Set):B(new Set(M.map(function(e){return e.id})))},J=function(){0!==P.size&&l().showModal({title:"\u786e\u8ba4\u5220\u9664",content:"\u786e\u5b9a\u5220\u9664\u9009\u4e2d\u7684 ".concat(P.size," \u4e2a\u6761\u76ee\u5417\uff1f"),success:function(e){e.confirm&&((0,r.kh)(Array.from(P)),B(new Set),A(!1),C())}})},O=function(){k?(A(!1),B(new Set)):A(!0)};return(0,p.jsxs)(c.Ss,{className:"theme-".concat(s),children:[(0,p.jsx)(b.A,{}),(0,p.jsx)(x.A,{children:(0,p.jsxs)(c.Ss,{className:"design-page",children:[(0,p.jsx)(c.Ss,{className:"page-header dashed-card mt-20",style:{marginTop:"".concat(n.headerPaddingTop,"px")},children:(0,p.jsxs)(c.Ss,{className:"flex-between",style:{width:"100%"},children:[(0,p.jsx)(c.EY,{className:"back-btn",onTap:function(){return l().navigateBack()},children:"\u2190"}),(0,p.jsx)(c.EY,{className:"page-title",children:"\u6211\u7684\u8bbe\u8ba1\u6e05\u5355"}),(0,p.jsx)(c.EY,{className:"manage-btn",onTap:O,children:k?"\u5b8c\u6210":"\u7ba1\u7406"})]})}),(0,p.jsx)(c.Ss,{className:"status-tabs",children:(0,p.jsx)(c.BM,{className:"tabs-scroll",scrollX:!0,children:j.map(function(e){return(0,p.jsxs)(c.Ss,{className:"tab-item ".concat(S===e.code?"active":""),onTap:function(){return N(e.code)},children:[(0,p.jsx)(c.EY,{className:"tab-label",children:e.label}),S===e.code&&(0,p.jsx)(c.Ss,{className:"tab-underline"})]},e.code)})})}),k&&(0,p.jsx)(c.Ss,{className:"batch-bar dashed-card",children:(0,p.jsxs)(c.Ss,{className:"flex-between",style:{width:"100%"},children:[(0,p.jsxs)(c.Ss,{className:"batch-select-all",onTap:D,children:[(0,p.jsx)(c.Ss,{className:"batch-checkbox ".concat(P.size===M.length&&M.length>0?"checked":"")}),(0,p.jsxs)(c.EY,{className:"batch-text",children:["\u5168\u9009 (",P.size,"/",M.length,")"]})]}),(0,p.jsx)(c.Ss,{className:"batch-delete ".concat(P.size>0?"active":""),onTap:J,children:(0,p.jsx)(c.EY,{children:"\u5220\u9664"})})]})}),(0,p.jsxs)(c.BM,{className:"design-list",scrollY:!0,children:[M.map(function(e){var s,n=f[e.status],a=null!==(s=e.productIcon)&&void 0!==s&&s.startsWith("/icon/")||/^https?:/i.test(e.productIcon||"")?e.productIcon:o.rj[e.productId]||"/icon/\u56db\u89d2\u661f.png",t=(0,u.uq)(a),i=P.has(e.id);return(0,p.jsxs)(c.Ss,{className:"design-card dashed-card ".concat(i?"selected":""),onTap:function(){return k?_(e.id):void 0},children:[(0,p.jsxs)(c.Ss,{className:"design-body",children:[k&&(0,p.jsx)(c.Ss,{className:"batch-checkbox ".concat(i?"checked":"")}),(0,p.jsx)(c._V,{className:"design-icon-img",src:t,mode:"aspectFit"}),(0,p.jsxs)(c.Ss,{className:"design-info",children:[(0,p.jsxs)(c.Ss,{className:"design-title-row",children:[(0,p.jsx)(c.EY,{className:"design-name",children:e.productName}),(0,p.jsx)(c.EY,{className:"badge ".concat(n.cls),children:n.label})]}),(0,p.jsxs)(c.EY,{className:"design-meta",children:["\u6570\u91cf: ",e.count," \u4ef6 | \u5355\u4ef7: \xa5",e.unitPrice]}),(0,p.jsxs)(c.EY,{className:"design-total",children:["\u5c0f\u8ba1: \xa5",(e.unitPrice*e.count).toFixed(2)]})]})]}),!k&&(0,p.jsxs)(c.Ss,{className:"design-actions",children:["ordered"!==e.status&&(0,p.jsx)(c.Ss,{className:"btn-gradient design-btn",onTap:function(){return F(e)},children:(0,p.jsx)(c.EY,{children:"undesigned"===e.status?"\u5f00\u59cb\u8bbe\u8ba1":"\u7ee7\u7eed\u8bbe\u8ba1"})}),"ordered"===e.status&&(0,p.jsx)(c.Ss,{className:"btn-outline design-btn",onTap:function(){return l().switchTab({url:"/pages/orders/index"})},children:(0,p.jsx)(c.EY,{children:"\u67e5\u770b\u8ba2\u5355"})})]})]},e.id)}),0===M.length&&(0,p.jsxs)(c.Ss,{className:"empty-state",children:[(0,p.jsx)(c._V,{className:"empty-icon-img",src:"/icon/\u8c03\u8272\u76d8.png",mode:"aspectFit"}),(0,p.jsx)(c.EY,{className:"empty-text",children:"\u8fd8\u6ca1\u6709\u8bbe\u8ba1\u6e05\u5355"}),(0,p.jsx)(c.EY,{className:"empty-sub",children:"\u53bb\u9996\u9875\u901b\u901b\uff0c\u627e\u5230\u559c\u6b22\u7684\u5b9a\u5236\u54c1"}),(0,p.jsx)(c.Ss,{className:"btn-gradient",onTap:function(){return l().switchTab({url:"/pages/index/index"})},children:(0,p.jsx)(c.EY,{children:"\u53bb\u901b\u901b"})})]})]}),(0,p.jsx)(c.Ss,{style:{height:"40px"}})]})})]})}var N={navigationStyle:"custom",enablePageMeta:!0,navigationBarTitleText:"\u8bbe\u8ba1\u6e05\u5355"};Page((0,a.createPageConfig)(S,"pages/designList/index",{root:{cn:[]}},N||{}))}},function(e){var s=function(s){return e(e.s=s)};e.O(0,[907,96,76],function(){return s(3512)});e.O()}]); \ No newline at end of file +"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(8199),h=n(9703),g=n(9201),m=n(5414),x=n(7723),b=n(9674),p=n(4848),j=[{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"}],f={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 S(){var e=(0,h.wR)(),s=e.resolvedTheme,n=(0,g.c)();(0,m.l)(s);var a=(0,d.useState)("all"),i=(0,t.A)(a,2),S=i[0],N=i[1],w=(0,d.useState)([]),v=(0,t.A)(w,2),T=v[0],E=v[1],Y=(0,d.useState)(!1),y=(0,t.A)(Y,2),k=y[0],A=y[1],z=(0,d.useState)(new Set),I=(0,t.A)(z,2),P=I[0],B=I[1],C=(0,d.useCallback)(function(){E((0,r.p_)())},[]),L=(0,d.useCallback)(function(){var e=l().getStorageSync("designList:filter");e&&j.some(function(s){return s.code===e})&&(N(e),l().removeStorageSync("designList:filter")),C()},[C]);(0,d.useEffect)(function(){var e=l().getCurrentInstance().page;if(e){var s=e.onShow;e.onShow=function(){L(),s&&s.apply(this)}}L()},[L]);var M="all"===S?T:"toDesign"===S?T.filter(function(e){return"undesigned"===e.status||"designing"===e.status}):T.filter(function(e){return e.status===S}),F=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"})},_=function(e){var s=new Set(P);s.has(e)?s.delete(e):s.add(e),B(s)},q=function(){P.size===M.length?B(new Set):B(new Set(M.map(function(e){return e.id})))},D=function(){0!==P.size&&l().showModal({title:"\u786e\u8ba4\u5220\u9664",content:"\u786e\u5b9a\u5220\u9664\u9009\u4e2d\u7684 ".concat(P.size," \u4e2a\u6761\u76ee\u5417\uff1f"),success:function(e){e.confirm&&((0,r.kh)(Array.from(P)),B(new Set),A(!1),C())}})},J=function(){k?(A(!1),B(new Set)):A(!0)};return(0,p.jsxs)(c.Ss,{className:"theme-".concat(s),children:[(0,p.jsx)(b.A,{}),(0,p.jsx)(x.A,{children:(0,p.jsxs)(c.Ss,{className:"design-page",children:[(0,p.jsx)(c.Ss,{className:"page-header dashed-card mt-20",style:{marginTop:"".concat(n.headerPaddingTop,"px")},children:(0,p.jsxs)(c.Ss,{className:"flex-between",style:{width:"100%"},children:[(0,p.jsx)(c.EY,{className:"back-btn",onTap:function(){return l().navigateBack()},children:"\u2190"}),(0,p.jsx)(c.EY,{className:"page-title",children:"\u6211\u7684\u8bbe\u8ba1\u6e05\u5355"}),(0,p.jsx)(c.EY,{className:"manage-btn",onTap:J,children:k?"\u5b8c\u6210":"\u7ba1\u7406"})]})}),(0,p.jsx)(c.Ss,{className:"status-tabs",children:(0,p.jsx)(c.BM,{className:"tabs-scroll",scrollX:!0,children:j.map(function(e){return(0,p.jsxs)(c.Ss,{className:"tab-item ".concat(S===e.code?"active":""),onTap:function(){return N(e.code)},children:[(0,p.jsx)(c.EY,{className:"tab-label",children:e.label}),S===e.code&&(0,p.jsx)(c.Ss,{className:"tab-underline"})]},e.code)})})}),k&&(0,p.jsx)(c.Ss,{className:"batch-bar dashed-card",children:(0,p.jsxs)(c.Ss,{className:"flex-between",style:{width:"100%"},children:[(0,p.jsxs)(c.Ss,{className:"batch-select-all",onTap:q,children:[(0,p.jsx)(c.Ss,{className:"batch-checkbox ".concat(P.size===M.length&&M.length>0?"checked":"")}),(0,p.jsxs)(c.EY,{className:"batch-text",children:["\u5168\u9009 (",P.size,"/",M.length,")"]})]}),(0,p.jsx)(c.Ss,{className:"batch-delete ".concat(P.size>0?"active":""),onTap:D,children:(0,p.jsx)(c.EY,{children:"\u5220\u9664"})})]})}),(0,p.jsxs)(c.BM,{className:"design-list",scrollY:!0,children:[M.map(function(e){var s,n=f[e.status],a=null!==(s=e.productIcon)&&void 0!==s&&s.startsWith("/icon/")||/^https?:/i.test(e.productIcon||"")?e.productIcon:o.rj[e.productId]||"/icon/\u56db\u89d2\u661f.png",t=(0,u.uq)(a),i=P.has(e.id);return(0,p.jsxs)(c.Ss,{className:"design-card dashed-card ".concat(i?"selected":""),onTap:function(){return k?_(e.id):void 0},children:[(0,p.jsxs)(c.Ss,{className:"design-body",children:[k&&(0,p.jsx)(c.Ss,{className:"batch-checkbox ".concat(i?"checked":"")}),(0,p.jsx)(c._V,{className:"design-icon-img",src:t,mode:"aspectFit"}),(0,p.jsxs)(c.Ss,{className:"design-info",children:[(0,p.jsxs)(c.Ss,{className:"design-title-row",children:[(0,p.jsx)(c.EY,{className:"design-name",children:e.productName}),(0,p.jsx)(c.EY,{className:"badge ".concat(n.cls),children:n.label})]}),(0,p.jsxs)(c.EY,{className:"design-meta",children:["\u6570\u91cf: ",e.count," \u4ef6 | \u5355\u4ef7: \xa5",e.unitPrice]}),(0,p.jsxs)(c.EY,{className:"design-total",children:["\u5c0f\u8ba1: \xa5",(e.unitPrice*e.count).toFixed(2)]})]})]}),!k&&(0,p.jsxs)(c.Ss,{className:"design-actions",children:["ordered"!==e.status&&(0,p.jsx)(c.Ss,{className:"btn-gradient design-btn",onTap:function(){return F(e)},children:(0,p.jsx)(c.EY,{children:"undesigned"===e.status?"\u5f00\u59cb\u8bbe\u8ba1":"\u7ee7\u7eed\u8bbe\u8ba1"})}),"ordered"===e.status&&(0,p.jsx)(c.Ss,{className:"btn-outline design-btn",onTap:function(){return l().switchTab({url:"/pages/orders/index"})},children:(0,p.jsx)(c.EY,{children:"\u67e5\u770b\u8ba2\u5355"})})]})]},e.id)}),0===M.length&&(0,p.jsxs)(c.Ss,{className:"empty-state",children:[(0,p.jsx)(c._V,{className:"empty-icon-img",src:(0,u.uq)("/icon/\u8c03\u8272\u76d8.png"),mode:"aspectFit"}),(0,p.jsx)(c.EY,{className:"empty-text",children:"\u8fd8\u6ca1\u6709\u8bbe\u8ba1\u6e05\u5355"}),(0,p.jsx)(c.EY,{className:"empty-sub",children:"\u53bb\u9996\u9875\u901b\u901b\uff0c\u627e\u5230\u559c\u6b22\u7684\u5b9a\u5236\u54c1"}),(0,p.jsx)(c.Ss,{className:"btn-gradient",onTap:function(){return l().switchTab({url:"/pages/index/index"})},children:(0,p.jsx)(c.EY,{children:"\u53bb\u901b\u901b"})})]})]}),(0,p.jsx)(c.Ss,{style:{height:"40px"}})]})})]})}var N={navigationStyle:"custom",enablePageMeta:!0,navigationBarTitleText:"\u8bbe\u8ba1\u6e05\u5355"};Page((0,a.createPageConfig)(S,"pages/designList/index",{root:{cn:[]}},N||{}))}},function(e){var s=function(s){return e(e.s=s)};e.O(0,[907,96,76],function(){return s(3512)});e.O()}]); \ No newline at end of file diff --git a/dist/pages/index/index.js b/dist/pages/index/index.js index ce89b03..9a8acc3 100644 --- a/dist/pages/index/index.js +++ b/dist/pages/index/index.js @@ -1 +1 @@ -"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[421],{7265:function(e,s,a){var c=a(7842),i=a(5544),t=a(118),r=a(758),n=a.n(r),l=a(6540),o=a(5234),m=a(8199),d=a(9703),h=a(9201),g=a(5414),p=a(9674),x=a(4848),j=[{title:"\u6bd5\u4e1a\u7eaa\u5ff5\u7b14\u8bb0\u672c",desc:"\u5168\u73ed\u540d\u5b57\u7ec4\u6210\u6821\u5fbd",image:(0,m.uq)("/img/book_small/The1.jpg")},{title:"\u94dc\u8d28\u676f\u57ab",desc:"\u91d1\u5c5e\u8d28\u611f\u684c\u9762\u827a\u672f",image:(0,m.uq)("/img/cup/The1.jpg")},{title:"\u7af9\u5236\u7b14\u76d2",desc:"\u81ea\u7136\u7af9\u7eb9\u6587\u623f\u96c5\u5668",image:(0,m.uq)("/img/penbox/The1.jpg")},{title:"\u4e66\u672c\u578b\u706f",desc:"\u6e29\u6696\u5149\u5f71\u70b9\u4eae\u5fc3\u610f",image:(0,m.uq)("/img/booklight/The1.jpg")},{title:"\u60c5\u4fa3\u5b9a\u5236\u793c",desc:"\u4e24\u4e2a\u4eba\u7684\u540d\u5b57\u4ea4\u7ec7",image:(0,m.uq)("/img/book_big/The1.jpg")},{title:"\u4f01\u4e1a\u5e74\u4f1a\u793c",desc:"\u5458\u5de5\u540d\u5b57\u7ec4\u6210Logo",image:(0,m.uq)("/img/penbox/The2.jpg")}],u={"notebook-small":(0,m.uq)("/img/book_small/The1.jpg"),"notebook-large":(0,m.uq)("/img/book_big/The1.jpg"),coaster:(0,m.uq)("/img/cup/The1.jpg"),penbox:(0,m.uq)("/img/penbox/The1.jpg"),booklamp:(0,m.uq)("/img/booklight/The1.jpg")};function N(){var e=(0,d.wR)(),s=(e.theme,e.resolvedTheme),a=(0,h.c)();(0,g.l)(s);var c=(0,l.useState)(""),r=(0,i.A)(c,2),m=r[0],N=r[1],b=function(e){n().navigateTo({url:"/pages/product/index?id=".concat(e)})},S=m.trim()?o.R6.filter(function(e){return e.name.includes(m)||e.desc.includes(m)}):o.R6,w=function(e){N(e.detail.value)};return(0,x.jsxs)(t.Ss,{className:"theme-".concat(s),children:[(0,x.jsx)(p.A,{}),(0,x.jsxs)(t.Ss,{className:"index-page",children:[(0,x.jsx)(t.Ss,{className:"header-bar",style:{paddingTop:"".concat(a.headerPaddingTop,"px")},children:(0,x.jsx)(t.EY,{className:"header-title",children:"\u667a\u7ed8\u5fae\u523b"})}),(0,x.jsxs)(t.Ss,{className:"search-card dashed-card",children:[(0,x.jsx)(t.Ss,{className:"star-badge"}),(0,x.jsxs)(t.Ss,{className:"search-inner",children:[(0,x.jsx)(t._V,{className:"search-icon-img",src:"/icon/\u641c\u7d22.png",mode:"aspectFit"}),(0,x.jsx)(t.pd,{className:"search-input",type:"text",placeholder:"\u641c\u7d22\u5b9a\u5236\u54c1\u7c7b\uff1a\u7b14\u8bb0\u672c\u3001\u676f\u57ab\u3001\u4e66\u706f...",value:m,onInput:w,confirmType:"search"})]}),m.trim()&&(0,x.jsx)(t.Ss,{className:"search-result-hint",children:(0,x.jsx)(t.EY,{className:"hint-text",children:S.length>0?"\u627e\u5230 ".concat(S.length," \u4e2a\u76f8\u5173\u54c1\u7c7b"):"\u6ca1\u6709\u627e\u5230\u76f8\u5173\u54c1\u7c7b\uff0c\u8bd5\u8bd5\u770b\u5176\u4ed6\u5173\u952e\u8bcd"})})]}),(0,x.jsxs)(t.Ss,{className:"showcase-section mt-20",children:[(0,x.jsx)(t.EY,{className:"section-title",children:"\u5b9a\u5236\u6210\u54c1\u5c55\u793a"}),(0,x.jsx)(t.RC,{className:"showcase-swiper",indicatorColor:"#e0e0e0",indicatorActiveColor:"#ff9a9e",circular:!0,autoplay:!0,interval:3e3,duration:500,previousMargin:"40rpx",nextMargin:"40rpx",indicatorDots:!0,children:j.map(function(e,s){return(0,x.jsx)(t.wu,{className:"showcase-swiper-item",children:(0,x.jsxs)(t.Ss,{className:"showcase-swiper-card dashed-card",children:[(0,x.jsx)(t.Ss,{className:"star-badge"}),(0,x.jsx)(t.Ss,{className:"showcase-image-wrapper",children:(0,x.jsx)(t._V,{className:"showcase-real-img",src:e.image,mode:"aspectFill"})}),(0,x.jsxs)(t.Ss,{className:"showcase-text-area",children:[(0,x.jsxs)(t.Ss,{className:"showcase-info",children:[(0,x.jsx)(t.EY,{className:"showcase-title",children:e.title}),(0,x.jsx)(t.EY,{className:"showcase-desc",children:e.desc})]}),(0,x.jsx)(t.Ss,{className:"showcase-tag",children:"\u6210\u54c1\u6848\u4f8b"})]})]})},s)})})]}),(0,x.jsxs)(t.Ss,{className:"category-section mt-20",children:[(0,x.jsx)(t.EY,{className:"section-title",children:"\u70ed\u95e8\u54c1\u7c7b"}),(0,x.jsx)(t.Ss,{className:"category-grid",children:S.map(function(e){return(0,x.jsxs)(t.Ss,{className:"category-item dashed-card",onTap:function(){return b(e.id)},children:[(0,x.jsx)(t.Ss,{className:"star-badge"}),(0,x.jsx)(t.Ss,{className:"category-img-wrapper",children:(0,x.jsx)(t._V,{className:"category-img-real",src:u[e.id]||"/icon/\u56db\u89d2\u661f.png",mode:"aspectFill"})}),(0,x.jsx)(t.EY,{className:"category-name",children:e.name}),(0,x.jsx)(t.EY,{className:"category-desc",children:e.desc}),(0,x.jsxs)(t.EY,{className:"category-price",children:["\xa5",e.price," \u8d77"]})]},e.id)})}),0===S.length&&(0,x.jsxs)(t.Ss,{className:"empty-category dashed-card",children:[(0,x.jsx)(t._V,{className:"empty-icon-img",src:"/icon/\u641c\u7d22.png",mode:"aspectFit"}),(0,x.jsx)(t.EY,{className:"empty-text",children:"\u672a\u627e\u5230\u5339\u914d\u7684\u54c1\u7c7b"}),(0,x.jsx)(t.EY,{className:"empty-sub",children:"\u5c1d\u8bd5\u641c\u7d22\u201c\u7b14\u8bb0\u672c\u201d\u3001\u201c\u676f\u57ab\u201d\u7b49"})]})]}),(0,x.jsx)(t.Ss,{className:"safe-bottom-placeholder"})]})]})}var b={navigationStyle:"custom",enablePageMeta:!0,navigationBarTitleText:"\u667a\u7ed8\u5fae\u523b"};Page((0,c.createPageConfig)(N,"pages/index/index",{root:{cn:[]}},b||{}))}},function(e){var s=function(s){return e(e.s=s)};e.O(0,[907,96,76],function(){return s(7265)});e.O()}]); \ No newline at end of file +"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[421],{7265:function(e,s,a){var c=a(7842),i=a(5544),t=a(118),r=a(758),n=a.n(r),l=a(6540),o=a(5234),m=a(8199),d=a(9703),h=a(9201),g=a(5414),p=a(9674),x=a(4848),u=[{title:"\u6bd5\u4e1a\u7eaa\u5ff5\u7b14\u8bb0\u672c",desc:"\u5168\u73ed\u540d\u5b57\u7ec4\u6210\u6821\u5fbd",image:(0,m.uq)("/img/book_small/The1.jpg")},{title:"\u94dc\u8d28\u676f\u57ab",desc:"\u91d1\u5c5e\u8d28\u611f\u684c\u9762\u827a\u672f",image:(0,m.uq)("/img/cup/The1.jpg")},{title:"\u7af9\u5236\u7b14\u76d2",desc:"\u81ea\u7136\u7af9\u7eb9\u6587\u623f\u96c5\u5668",image:(0,m.uq)("/img/penbox/The1.jpg")},{title:"\u4e66\u672c\u578b\u706f",desc:"\u6e29\u6696\u5149\u5f71\u70b9\u4eae\u5fc3\u610f",image:(0,m.uq)("/img/booklight/The1.jpg")},{title:"\u60c5\u4fa3\u5b9a\u5236\u793c",desc:"\u4e24\u4e2a\u4eba\u7684\u540d\u5b57\u4ea4\u7ec7",image:(0,m.uq)("/img/book_big/The1.jpg")},{title:"\u4f01\u4e1a\u5e74\u4f1a\u793c",desc:"\u5458\u5de5\u540d\u5b57\u7ec4\u6210Logo",image:(0,m.uq)("/img/penbox/The2.jpg")}],j={"notebook-small":(0,m.uq)("/img/book_small/The1.jpg"),"notebook-large":(0,m.uq)("/img/book_big/The1.jpg"),coaster:(0,m.uq)("/img/cup/The1.jpg"),penbox:(0,m.uq)("/img/penbox/The1.jpg"),booklamp:(0,m.uq)("/img/booklight/The1.jpg")};function N(){var e=(0,d.wR)(),s=(e.theme,e.resolvedTheme),a=(0,h.c)();(0,g.l)(s);var c=(0,l.useState)(""),r=(0,i.A)(c,2),N=r[0],b=r[1],S=function(e){n().navigateTo({url:"/pages/product/index?id=".concat(e)})},w=N.trim()?o.R6.filter(function(e){return e.name.includes(N)||e.desc.includes(N)}):o.R6,T=function(e){b(e.detail.value)};return(0,x.jsxs)(t.Ss,{className:"theme-".concat(s),children:[(0,x.jsx)(p.A,{}),(0,x.jsxs)(t.Ss,{className:"index-page",children:[(0,x.jsx)(t.Ss,{className:"header-bar",style:{paddingTop:"".concat(a.headerPaddingTop,"px")},children:(0,x.jsx)(t.EY,{className:"header-title",children:"\u667a\u7ed8\u5fae\u523b"})}),(0,x.jsxs)(t.Ss,{className:"search-card dashed-card",children:[(0,x.jsx)(t.Ss,{className:"star-badge"}),(0,x.jsxs)(t.Ss,{className:"search-inner",children:[(0,x.jsx)(t._V,{className:"search-icon-img",src:(0,m.uq)("/icon/\u641c\u7d22.png"),mode:"aspectFit"}),(0,x.jsx)(t.pd,{className:"search-input",type:"text",placeholder:"\u641c\u7d22\u5b9a\u5236\u54c1\u7c7b\uff1a\u7b14\u8bb0\u672c\u3001\u676f\u57ab\u3001\u4e66\u706f...",value:N,onInput:T,confirmType:"search"})]}),N.trim()&&(0,x.jsx)(t.Ss,{className:"search-result-hint",children:(0,x.jsx)(t.EY,{className:"hint-text",children:w.length>0?"\u627e\u5230 ".concat(w.length," \u4e2a\u76f8\u5173\u54c1\u7c7b"):"\u6ca1\u6709\u627e\u5230\u76f8\u5173\u54c1\u7c7b\uff0c\u8bd5\u8bd5\u770b\u5176\u4ed6\u5173\u952e\u8bcd"})})]}),(0,x.jsxs)(t.Ss,{className:"showcase-section mt-20",children:[(0,x.jsx)(t.EY,{className:"section-title",children:"\u5b9a\u5236\u6210\u54c1\u5c55\u793a"}),(0,x.jsx)(t.RC,{className:"showcase-swiper",indicatorColor:"#e0e0e0",indicatorActiveColor:"#ff9a9e",circular:!0,autoplay:!0,interval:3e3,duration:500,previousMargin:"40rpx",nextMargin:"40rpx",indicatorDots:!0,children:u.map(function(e,s){return(0,x.jsx)(t.wu,{className:"showcase-swiper-item",children:(0,x.jsxs)(t.Ss,{className:"showcase-swiper-card dashed-card",children:[(0,x.jsx)(t.Ss,{className:"star-badge"}),(0,x.jsx)(t.Ss,{className:"showcase-image-wrapper",children:(0,x.jsx)(t._V,{className:"showcase-real-img",src:e.image,mode:"aspectFill"})}),(0,x.jsxs)(t.Ss,{className:"showcase-text-area",children:[(0,x.jsxs)(t.Ss,{className:"showcase-info",children:[(0,x.jsx)(t.EY,{className:"showcase-title",children:e.title}),(0,x.jsx)(t.EY,{className:"showcase-desc",children:e.desc})]}),(0,x.jsx)(t.Ss,{className:"showcase-tag",children:"\u6210\u54c1\u6848\u4f8b"})]})]})},s)})})]}),(0,x.jsxs)(t.Ss,{className:"category-section mt-20",children:[(0,x.jsx)(t.EY,{className:"section-title",children:"\u70ed\u95e8\u54c1\u7c7b"}),(0,x.jsx)(t.Ss,{className:"category-grid",children:w.map(function(e){return(0,x.jsxs)(t.Ss,{className:"category-item dashed-card",onTap:function(){return S(e.id)},children:[(0,x.jsx)(t.Ss,{className:"star-badge"}),(0,x.jsx)(t.Ss,{className:"category-img-wrapper",children:(0,x.jsx)(t._V,{className:"category-img-real",src:j[e.id]||(0,m.uq)("/icon/\u56db\u89d2\u661f.png"),mode:"aspectFill"})}),(0,x.jsx)(t.EY,{className:"category-name",children:e.name}),(0,x.jsx)(t.EY,{className:"category-desc",children:e.desc}),(0,x.jsxs)(t.EY,{className:"category-price",children:["\xa5",e.price," \u8d77"]})]},e.id)})}),0===w.length&&(0,x.jsxs)(t.Ss,{className:"empty-category dashed-card",children:[(0,x.jsx)(t._V,{className:"empty-icon-img",src:(0,m.uq)("/icon/\u641c\u7d22.png"),mode:"aspectFit"}),(0,x.jsx)(t.EY,{className:"empty-text",children:"\u672a\u627e\u5230\u5339\u914d\u7684\u54c1\u7c7b"}),(0,x.jsx)(t.EY,{className:"empty-sub",children:"\u5c1d\u8bd5\u641c\u7d22\u201c\u7b14\u8bb0\u672c\u201d\u3001\u201c\u676f\u57ab\u201d\u7b49"})]})]}),(0,x.jsx)(t.Ss,{className:"safe-bottom-placeholder"})]})]})}var b={navigationStyle:"custom",enablePageMeta:!0,navigationBarTitleText:"\u667a\u7ed8\u5fae\u523b"};Page((0,c.createPageConfig)(N,"pages/index/index",{root:{cn:[]}},b||{}))}},function(e){var s=function(s){return e(e.s=s)};e.O(0,[907,96,76],function(){return s(7265)});e.O()}]); \ No newline at end of file diff --git a/dist/pages/orderDetail/index.js b/dist/pages/orderDetail/index.js index 51e5d20..aba662f 100644 --- a/dist/pages/orderDetail/index.js +++ b/dist/pages/orderDetail/index.js @@ -1 +1 @@ -"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[154],{6382:function(s,e,a){var c=a(7842),d=a(9379),l=a(5544),i=a(118),n=a(758),r=a.n(n),t=a(6540),m=a(9703),o=a(9201),h=a(5414),x=a(9674),j=a(8594),N=a(5234),u=a(8199),p=a(4848);function S(){var s,e,a,c=(0,m.wR)(),n=(c.theme,c.resolvedTheme),S=(0,o.c)();(0,h.l)(n);var g=null===(s=r().getCurrentInstance().router)||void 0===s?void 0:s.params,E=(null===g||void 0===g?void 0:g.orderId)||"",Y=(0,t.useState)(null),v=(0,l.A)(Y,2),f=v[0],k=v[1],b=(0,t.useState)(null),w=(0,l.A)(b,2),T=w[0],C=w[1],y=(0,t.useState)(!1),A=(0,l.A)(y,2),I=A[0],P=A[1],F=(0,t.useState)([]),B=(0,l.A)(F,2),V=B[0],_=B[1];(0,t.useEffect)(function(){var s=(0,j.n7)(),e=s.find(function(s){return s.id===E});e&&(k(e),e.address?C(e.address):C((0,j.EB)())),_((0,j.Re)())},[E]);var D=function(s){C(s),P(!1);var e=(0,j.n7)(),a=e.findIndex(function(s){return s.id===E});a>=0&&(e[a]=(0,d.A)((0,d.A)({},e[a]),{},{address:s})),r().showToast({title:"\u5730\u5740\u5df2\u66f4\u6539",icon:"success"})};return f?(0,p.jsxs)(i.Ss,{className:"theme-".concat(n),children:[(0,p.jsx)(x.A,{}),(0,p.jsxs)(i.Ss,{className:"order-detail-page",children:[(0,p.jsxs)(i.Ss,{className:"page-header dashed-card mt-20",style:{marginTop:"".concat(S.headerPaddingTop,"px")},children:[(0,p.jsx)(i.Ss,{className:"star-badge"}),(0,p.jsxs)(i.Ss,{className:"flex-between",style:{width:"100%"},children:[(0,p.jsx)(i.EY,{className:"back-btn",onTap:function(){return r().navigateBack()},children:"\u2190"}),(0,p.jsx)(i.EY,{className:"page-title",children:"\u8ba2\u5355\u8be6\u60c5"}),(0,p.jsx)(i.Ss,{style:{width:"60px"}})]})]}),(0,p.jsxs)(i.Ss,{className:"status-banner dashed-card mt-20",children:[(0,p.jsx)(i.Ss,{className:"star-badge"}),(0,p.jsxs)(i.EY,{className:"status-text",children:["pending"===f.statusCode&&"\u5f85\u4ed8\u6b3e","paid"===f.statusCode&&"\u5f85\u53d1\u8d27","shipping"===f.statusCode&&"\u5f85\u6536\u8d27","done"===f.statusCode&&"\u5df2\u5b8c\u6210"]}),(0,p.jsxs)(i.EY,{className:"status-desc",children:["pending"===f.statusCode&&"\u8bf7\u572830\u5206\u949f\u5185\u5b8c\u6210\u652f\u4ed8","paid"===f.statusCode&&"\u5546\u54c1\u6b63\u5728\u6253\u5305\u4e2d\uff0c\u5373\u5c06\u53d1\u8d27","shipping"===f.statusCode&&"\u5feb\u9012\u8fd0\u8f93\u4e2d\uff0c\u8bf7\u6ce8\u610f\u67e5\u6536","done"===f.statusCode&&"\u4ea4\u6613\u5df2\u5b8c\u6210\uff0c\u611f\u8c22\u60e0\u987e"]})]}),("shipping"===f.statusCode||"done"===f.statusCode)&&(0,p.jsxs)(i.Ss,{className:"logistics-card dashed-card mt-20",children:[(0,p.jsx)(i.Ss,{className:"star-badge"}),(0,p.jsxs)(i.Ss,{className:"logistics-header",children:[(0,p.jsxs)(i.Ss,{className:"flex-center",children:[(0,p.jsx)(i._V,{className:"card-icon-img",src:"/icon/\u5305\u88f9.png",mode:"aspectFit"}),(0,p.jsx)(i.EY,{className:"logistics-title",children:"\u7269\u6d41\u4fe1\u606f"})]}),(0,p.jsx)(i.EY,{className:"logistics-num",children:"\u5355\u53f7: SF1234567890"})]}),(0,p.jsxs)(i.Ss,{className:"timeline",children:[(0,p.jsxs)(i.Ss,{className:"timeline-item active",children:[(0,p.jsx)(i.Ss,{className:"timeline-dot"}),(0,p.jsxs)(i.Ss,{className:"timeline-content",children:[(0,p.jsx)(i.EY,{className:"timeline-status",children:"\u8fd0\u8f93\u4e2d"}),(0,p.jsx)(i.EY,{className:"timeline-time",children:"2024-01-15 14:30"}),(0,p.jsx)(i.EY,{className:"timeline-desc",children:"\u3010\u5317\u4eac\u5e02\u3011\u5feb\u4ef6\u5df2\u5230\u8fbe\u5317\u4eac\u671d\u9633\u8f6c\u8fd0\u4e2d\u5fc3"})]})]}),(0,p.jsxs)(i.Ss,{className:"timeline-item",children:[(0,p.jsx)(i.Ss,{className:"timeline-dot"}),(0,p.jsxs)(i.Ss,{className:"timeline-content",children:[(0,p.jsx)(i.EY,{className:"timeline-status",children:"\u5df2\u53d1\u8d27"}),(0,p.jsx)(i.EY,{className:"timeline-time",children:"2024-01-15 09:00"}),(0,p.jsx)(i.EY,{className:"timeline-desc",children:"\u3010\u6df1\u5733\u5e02\u3011\u5546\u5bb6\u5df2\u53d1\u8d27\uff0c\u7b49\u5f85\u63fd\u6536"})]})]}),(0,p.jsxs)(i.Ss,{className:"timeline-item",children:[(0,p.jsx)(i.Ss,{className:"timeline-dot"}),(0,p.jsxs)(i.Ss,{className:"timeline-content",children:[(0,p.jsx)(i.EY,{className:"timeline-status",children:"\u5df2\u4e0b\u5355"}),(0,p.jsx)(i.EY,{className:"timeline-time",children:"2024-01-14 20:15"}),(0,p.jsx)(i.EY,{className:"timeline-desc",children:"\u8ba2\u5355\u5df2\u751f\u6210\uff0c\u7b49\u5f85\u5546\u5bb6\u53d1\u8d27"})]})]})]})]}),(0,p.jsxs)(i.Ss,{className:"product-card dashed-card mt-20",children:[(0,p.jsx)(i.Ss,{className:"star-badge"}),(0,p.jsxs)(i.Ss,{className:"product-row",children:[(0,p.jsx)(i.Ss,{className:"product-icon-wrapper",children:(0,p.jsx)(i._V,{className:"product-icon-img",src:(0,u.uq)(null!==(e=f.productIcon)&&void 0!==e&&e.startsWith("/icon/")||/^https?:/i.test(f.productIcon||"")?f.productIcon:N.rj[f.productId]||"/icon/\u56db\u89d2\u661f.png"),mode:"aspectFit"})}),(0,p.jsxs)(i.Ss,{className:"product-info",children:[(0,p.jsx)(i.EY,{className:"product-name",children:f.productName}),(0,p.jsx)(i.EY,{className:"product-sku",children:f.sku})]})]}),(0,p.jsxs)(i.Ss,{className:"price-row",children:[(0,p.jsx)(i.EY,{className:"price-label",children:"\u5b9e\u4ed8\u6b3e"}),(0,p.jsx)(i.EY,{className:"price-value",children:f.price})]})]}),(0,p.jsxs)(i.Ss,{className:"address-card dashed-card mt-20",children:[(0,p.jsx)(i.Ss,{className:"star-badge"}),(0,p.jsxs)(i.Ss,{className:"address-header",children:[(0,p.jsxs)(i.Ss,{className:"flex-center",children:[(0,p.jsx)(i._V,{className:"card-icon-img",src:"/icon/\u5730\u5740.png",mode:"aspectFit"}),(0,p.jsx)(i.EY,{className:"address-title",children:"\u6536\u8d27\u5730\u5740"})]}),(0,p.jsx)(i.Ss,{className:"address-change",onTap:function(){return P(!0)},children:(0,p.jsx)(i.EY,{className:"change-text",children:"\u66f4\u6539\u6536\u8d27\u5730\u5740"})})]}),T?(0,p.jsxs)(i.Ss,{className:"address-body",children:[(0,p.jsxs)(i.Ss,{className:"address-row",children:[(0,p.jsx)(i.EY,{className:"address-name",children:T.name}),(0,p.jsx)(i.EY,{className:"address-phone",children:T.phone})]}),(0,p.jsxs)(i.EY,{className:"address-detail",children:[null===(a=T.region)||void 0===a?void 0:a.join(" ")," ",T.detail]})]}):(0,p.jsx)(i.Ss,{className:"address-empty",children:(0,p.jsx)(i.EY,{children:"\u6682\u65e0\u6536\u8d27\u5730\u5740\uff0c\u8bf7\u5148\u6dfb\u52a0"})})]}),(0,p.jsxs)(i.Ss,{className:"meta-card dashed-card mt-20",children:[(0,p.jsx)(i.Ss,{className:"star-badge"}),(0,p.jsx)(i.EY,{className:"meta-title",children:"\u8ba2\u5355\u4fe1\u606f"}),(0,p.jsxs)(i.Ss,{className:"meta-row",children:[(0,p.jsx)(i.EY,{className:"meta-label",children:"\u8ba2\u5355\u7f16\u53f7"}),(0,p.jsx)(i.EY,{className:"meta-value",children:f.id})]}),(0,p.jsxs)(i.Ss,{className:"meta-row",children:[(0,p.jsx)(i.EY,{className:"meta-label",children:"\u521b\u5efa\u65f6\u95f4"}),(0,p.jsx)(i.EY,{className:"meta-value",children:f.date})]}),(0,p.jsxs)(i.Ss,{className:"meta-row",children:[(0,p.jsx)(i.EY,{className:"meta-label",children:"\u6570\u91cf"}),(0,p.jsxs)(i.EY,{className:"meta-value",children:[f.count," \u4ef6"]})]})]}),(0,p.jsx)(i.Ss,{style:{height:"40px"}}),I&&(0,p.jsx)(i.Ss,{className:"modal-overlay",style:{alignItems:"flex-end",justifyContent:"flex-end"},children:(0,p.jsxs)(i.Ss,{className:"addr-picker-sheet dashed-card",children:[(0,p.jsxs)(i.Ss,{className:"addr-picker-header",children:[(0,p.jsx)(i.EY,{className:"addr-picker-title",children:"\u9009\u62e9\u6536\u8d27\u5730\u5740"}),(0,p.jsx)(i.EY,{className:"addr-picker-close",onTap:function(){return P(!1)},children:"\u2715"})]}),(0,p.jsxs)(i.Ss,{className:"addr-picker-list",children:[V.map(function(s){var e;return(0,p.jsxs)(i.Ss,{className:"addr-picker-item ".concat((null===T||void 0===T?void 0:T.id)===s.id?"active":""),onTap:function(){return D(s)},children:[(0,p.jsxs)(i.Ss,{className:"addr-picker-row",children:[(0,p.jsx)(i.EY,{className:"addr-picker-name",children:s.name}),(0,p.jsx)(i.EY,{className:"addr-picker-phone",children:s.phone}),s.isDefault&&(0,p.jsx)(i.EY,{className:"addr-picker-default",children:"\u9ed8\u8ba4"})]}),(0,p.jsxs)(i.EY,{className:"addr-picker-detail",children:[null===(e=s.region)||void 0===e?void 0:e.join(" ")," ",s.detail]})]},s.id)}),0===V.length&&(0,p.jsx)(i.Ss,{className:"addr-picker-empty",children:(0,p.jsx)(i.EY,{children:"\u6682\u65e0\u5730\u5740\uff0c\u8bf7\u5148\u6dfb\u52a0\u6536\u8d27\u5730\u5740"})})]}),(0,p.jsx)(i.Ss,{className:"addr-picker-add",onTap:function(){P(!1),r().navigateTo({url:"/pages/address/index"})},children:(0,p.jsx)(i.EY,{className:"addr-picker-add-text",children:"+ \u65b0\u5efa\u6536\u8d27\u5730\u5740"})})]})})]})]}):(0,p.jsxs)(i.Ss,{className:"theme-".concat(n),children:[(0,p.jsx)(x.A,{}),(0,p.jsx)(i.Ss,{className:"order-detail-page",children:(0,p.jsx)(i.Ss,{className:"page-header dashed-card mt-20",style:{marginTop:"".concat(S.headerPaddingTop,"px")},children:(0,p.jsx)(i.EY,{className:"page-title",children:"\u8ba2\u5355\u4e0d\u5b58\u5728"})})})]})}var g={navigationStyle:"custom",enablePageMeta:!0,navigationBarTitleText:"\u8ba2\u5355\u8be6\u60c5"};Page((0,c.createPageConfig)(S,"pages/orderDetail/index",{root:{cn:[]}},g||{}))}},function(s){var e=function(e){return s(s.s=e)};s.O(0,[907,96,76],function(){return e(6382)});s.O()}]); \ No newline at end of file +"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[154],{6382:function(s,e,a){var c=a(7842),d=a(9379),l=a(5544),i=a(118),n=a(758),r=a.n(n),t=a(6540),m=a(9703),o=a(9201),h=a(5414),x=a(9674),j=a(8594),N=a(5234),u=a(8199),p=a(4848);function S(){var s,e,a,c=(0,m.wR)(),n=(c.theme,c.resolvedTheme),S=(0,o.c)();(0,h.l)(n);var g=null===(s=r().getCurrentInstance().router)||void 0===s?void 0:s.params,E=(null===g||void 0===g?void 0:g.orderId)||"",Y=(0,t.useState)(null),v=(0,l.A)(Y,2),f=v[0],k=v[1],b=(0,t.useState)(null),w=(0,l.A)(b,2),T=w[0],C=w[1],y=(0,t.useState)(!1),A=(0,l.A)(y,2),I=A[0],P=A[1],F=(0,t.useState)([]),q=(0,l.A)(F,2),B=q[0],V=q[1];(0,t.useEffect)(function(){var s=(0,j.n7)(),e=s.find(function(s){return s.id===E});e&&(k(e),e.address?C(e.address):C((0,j.EB)())),V((0,j.Re)())},[E]);var _=function(s){C(s),P(!1);var e=(0,j.n7)(),a=e.findIndex(function(s){return s.id===E});a>=0&&(e[a]=(0,d.A)((0,d.A)({},e[a]),{},{address:s})),r().showToast({title:"\u5730\u5740\u5df2\u66f4\u6539",icon:"success"})};return f?(0,p.jsxs)(i.Ss,{className:"theme-".concat(n),children:[(0,p.jsx)(x.A,{}),(0,p.jsxs)(i.Ss,{className:"order-detail-page",children:[(0,p.jsxs)(i.Ss,{className:"page-header dashed-card mt-20",style:{marginTop:"".concat(S.headerPaddingTop,"px")},children:[(0,p.jsx)(i.Ss,{className:"star-badge"}),(0,p.jsxs)(i.Ss,{className:"flex-between",style:{width:"100%"},children:[(0,p.jsx)(i.EY,{className:"back-btn",onTap:function(){return r().navigateBack()},children:"\u2190"}),(0,p.jsx)(i.EY,{className:"page-title",children:"\u8ba2\u5355\u8be6\u60c5"}),(0,p.jsx)(i.Ss,{style:{width:"60px"}})]})]}),(0,p.jsxs)(i.Ss,{className:"status-banner dashed-card mt-20",children:[(0,p.jsx)(i.Ss,{className:"star-badge"}),(0,p.jsxs)(i.EY,{className:"status-text",children:["pending"===f.statusCode&&"\u5f85\u4ed8\u6b3e","paid"===f.statusCode&&"\u5f85\u53d1\u8d27","shipping"===f.statusCode&&"\u5f85\u6536\u8d27","done"===f.statusCode&&"\u5df2\u5b8c\u6210"]}),(0,p.jsxs)(i.EY,{className:"status-desc",children:["pending"===f.statusCode&&"\u8bf7\u572830\u5206\u949f\u5185\u5b8c\u6210\u652f\u4ed8","paid"===f.statusCode&&"\u5546\u54c1\u6b63\u5728\u6253\u5305\u4e2d\uff0c\u5373\u5c06\u53d1\u8d27","shipping"===f.statusCode&&"\u5feb\u9012\u8fd0\u8f93\u4e2d\uff0c\u8bf7\u6ce8\u610f\u67e5\u6536","done"===f.statusCode&&"\u4ea4\u6613\u5df2\u5b8c\u6210\uff0c\u611f\u8c22\u60e0\u987e"]})]}),("shipping"===f.statusCode||"done"===f.statusCode)&&(0,p.jsxs)(i.Ss,{className:"logistics-card dashed-card mt-20",children:[(0,p.jsx)(i.Ss,{className:"star-badge"}),(0,p.jsxs)(i.Ss,{className:"logistics-header",children:[(0,p.jsxs)(i.Ss,{className:"flex-center",children:[(0,p.jsx)(i._V,{className:"card-icon-img",src:(0,u.uq)("/icon/\u5305\u88f9.png"),mode:"aspectFit"}),(0,p.jsx)(i.EY,{className:"logistics-title",children:"\u7269\u6d41\u4fe1\u606f"})]}),(0,p.jsx)(i.EY,{className:"logistics-num",children:"\u5355\u53f7: SF1234567890"})]}),(0,p.jsxs)(i.Ss,{className:"timeline",children:[(0,p.jsxs)(i.Ss,{className:"timeline-item active",children:[(0,p.jsx)(i.Ss,{className:"timeline-dot"}),(0,p.jsxs)(i.Ss,{className:"timeline-content",children:[(0,p.jsx)(i.EY,{className:"timeline-status",children:"\u8fd0\u8f93\u4e2d"}),(0,p.jsx)(i.EY,{className:"timeline-time",children:"2024-01-15 14:30"}),(0,p.jsx)(i.EY,{className:"timeline-desc",children:"\u3010\u5317\u4eac\u5e02\u3011\u5feb\u4ef6\u5df2\u5230\u8fbe\u5317\u4eac\u671d\u9633\u8f6c\u8fd0\u4e2d\u5fc3"})]})]}),(0,p.jsxs)(i.Ss,{className:"timeline-item",children:[(0,p.jsx)(i.Ss,{className:"timeline-dot"}),(0,p.jsxs)(i.Ss,{className:"timeline-content",children:[(0,p.jsx)(i.EY,{className:"timeline-status",children:"\u5df2\u53d1\u8d27"}),(0,p.jsx)(i.EY,{className:"timeline-time",children:"2024-01-15 09:00"}),(0,p.jsx)(i.EY,{className:"timeline-desc",children:"\u3010\u6df1\u5733\u5e02\u3011\u5546\u5bb6\u5df2\u53d1\u8d27\uff0c\u7b49\u5f85\u63fd\u6536"})]})]}),(0,p.jsxs)(i.Ss,{className:"timeline-item",children:[(0,p.jsx)(i.Ss,{className:"timeline-dot"}),(0,p.jsxs)(i.Ss,{className:"timeline-content",children:[(0,p.jsx)(i.EY,{className:"timeline-status",children:"\u5df2\u4e0b\u5355"}),(0,p.jsx)(i.EY,{className:"timeline-time",children:"2024-01-14 20:15"}),(0,p.jsx)(i.EY,{className:"timeline-desc",children:"\u8ba2\u5355\u5df2\u751f\u6210\uff0c\u7b49\u5f85\u5546\u5bb6\u53d1\u8d27"})]})]})]})]}),(0,p.jsxs)(i.Ss,{className:"product-card dashed-card mt-20",children:[(0,p.jsx)(i.Ss,{className:"star-badge"}),(0,p.jsxs)(i.Ss,{className:"product-row",children:[(0,p.jsx)(i.Ss,{className:"product-icon-wrapper",children:(0,p.jsx)(i._V,{className:"product-icon-img",src:(0,u.uq)(null!==(e=f.productIcon)&&void 0!==e&&e.startsWith("/icon/")||/^https?:/i.test(f.productIcon||"")?f.productIcon:N.rj[f.productId]||"/icon/\u56db\u89d2\u661f.png"),mode:"aspectFit"})}),(0,p.jsxs)(i.Ss,{className:"product-info",children:[(0,p.jsx)(i.EY,{className:"product-name",children:f.productName}),(0,p.jsx)(i.EY,{className:"product-sku",children:f.sku})]})]}),(0,p.jsxs)(i.Ss,{className:"price-row",children:[(0,p.jsx)(i.EY,{className:"price-label",children:"\u5b9e\u4ed8\u6b3e"}),(0,p.jsx)(i.EY,{className:"price-value",children:f.price})]})]}),(0,p.jsxs)(i.Ss,{className:"address-card dashed-card mt-20",children:[(0,p.jsx)(i.Ss,{className:"star-badge"}),(0,p.jsxs)(i.Ss,{className:"address-header",children:[(0,p.jsxs)(i.Ss,{className:"flex-center",children:[(0,p.jsx)(i._V,{className:"card-icon-img",src:(0,u.uq)("/icon/\u5730\u5740.png"),mode:"aspectFit"}),(0,p.jsx)(i.EY,{className:"address-title",children:"\u6536\u8d27\u5730\u5740"})]}),(0,p.jsx)(i.Ss,{className:"address-change",onTap:function(){return P(!0)},children:(0,p.jsx)(i.EY,{className:"change-text",children:"\u66f4\u6539\u6536\u8d27\u5730\u5740"})})]}),T?(0,p.jsxs)(i.Ss,{className:"address-body",children:[(0,p.jsxs)(i.Ss,{className:"address-row",children:[(0,p.jsx)(i.EY,{className:"address-name",children:T.name}),(0,p.jsx)(i.EY,{className:"address-phone",children:T.phone})]}),(0,p.jsxs)(i.EY,{className:"address-detail",children:[null===(a=T.region)||void 0===a?void 0:a.join(" ")," ",T.detail]})]}):(0,p.jsx)(i.Ss,{className:"address-empty",children:(0,p.jsx)(i.EY,{children:"\u6682\u65e0\u6536\u8d27\u5730\u5740\uff0c\u8bf7\u5148\u6dfb\u52a0"})})]}),(0,p.jsxs)(i.Ss,{className:"meta-card dashed-card mt-20",children:[(0,p.jsx)(i.Ss,{className:"star-badge"}),(0,p.jsx)(i.EY,{className:"meta-title",children:"\u8ba2\u5355\u4fe1\u606f"}),(0,p.jsxs)(i.Ss,{className:"meta-row",children:[(0,p.jsx)(i.EY,{className:"meta-label",children:"\u8ba2\u5355\u7f16\u53f7"}),(0,p.jsx)(i.EY,{className:"meta-value",children:f.id})]}),(0,p.jsxs)(i.Ss,{className:"meta-row",children:[(0,p.jsx)(i.EY,{className:"meta-label",children:"\u521b\u5efa\u65f6\u95f4"}),(0,p.jsx)(i.EY,{className:"meta-value",children:f.date})]}),(0,p.jsxs)(i.Ss,{className:"meta-row",children:[(0,p.jsx)(i.EY,{className:"meta-label",children:"\u6570\u91cf"}),(0,p.jsxs)(i.EY,{className:"meta-value",children:[f.count," \u4ef6"]})]})]}),(0,p.jsx)(i.Ss,{style:{height:"40px"}}),I&&(0,p.jsx)(i.Ss,{className:"modal-overlay",style:{alignItems:"flex-end",justifyContent:"flex-end"},children:(0,p.jsxs)(i.Ss,{className:"addr-picker-sheet dashed-card",children:[(0,p.jsxs)(i.Ss,{className:"addr-picker-header",children:[(0,p.jsx)(i.EY,{className:"addr-picker-title",children:"\u9009\u62e9\u6536\u8d27\u5730\u5740"}),(0,p.jsx)(i.EY,{className:"addr-picker-close",onTap:function(){return P(!1)},children:"\u2715"})]}),(0,p.jsxs)(i.Ss,{className:"addr-picker-list",children:[B.map(function(s){var e;return(0,p.jsxs)(i.Ss,{className:"addr-picker-item ".concat((null===T||void 0===T?void 0:T.id)===s.id?"active":""),onTap:function(){return _(s)},children:[(0,p.jsxs)(i.Ss,{className:"addr-picker-row",children:[(0,p.jsx)(i.EY,{className:"addr-picker-name",children:s.name}),(0,p.jsx)(i.EY,{className:"addr-picker-phone",children:s.phone}),s.isDefault&&(0,p.jsx)(i.EY,{className:"addr-picker-default",children:"\u9ed8\u8ba4"})]}),(0,p.jsxs)(i.EY,{className:"addr-picker-detail",children:[null===(e=s.region)||void 0===e?void 0:e.join(" ")," ",s.detail]})]},s.id)}),0===B.length&&(0,p.jsx)(i.Ss,{className:"addr-picker-empty",children:(0,p.jsx)(i.EY,{children:"\u6682\u65e0\u5730\u5740\uff0c\u8bf7\u5148\u6dfb\u52a0\u6536\u8d27\u5730\u5740"})})]}),(0,p.jsx)(i.Ss,{className:"addr-picker-add",onTap:function(){P(!1),r().navigateTo({url:"/pages/address/index"})},children:(0,p.jsx)(i.EY,{className:"addr-picker-add-text",children:"+ \u65b0\u5efa\u6536\u8d27\u5730\u5740"})})]})})]})]}):(0,p.jsxs)(i.Ss,{className:"theme-".concat(n),children:[(0,p.jsx)(x.A,{}),(0,p.jsx)(i.Ss,{className:"order-detail-page",children:(0,p.jsx)(i.Ss,{className:"page-header dashed-card mt-20",style:{marginTop:"".concat(S.headerPaddingTop,"px")},children:(0,p.jsx)(i.EY,{className:"page-title",children:"\u8ba2\u5355\u4e0d\u5b58\u5728"})})})]})}var g={navigationStyle:"custom",enablePageMeta:!0,navigationBarTitleText:"\u8ba2\u5355\u8be6\u60c5"};Page((0,c.createPageConfig)(S,"pages/orderDetail/index",{root:{cn:[]}},g||{}))}},function(s){var e=function(e){return s(s.s=e)};s.O(0,[907,96,76],function(){return e(6382)});s.O()}]); \ No newline at end of file diff --git a/dist/pages/orders/index.js b/dist/pages/orders/index.js index 1ce9c4b..13f2579 100644 --- a/dist/pages/orders/index.js +++ b/dist/pages/orders/index.js @@ -1 +1 @@ -"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[402],{2307:function(e,s,a){var n=a(7842),r=a(5544),t=a(118),c=a(758),o=a.n(c),l=a(6540),i=a(8594),d=a(8199),u=a(9703),h=a(9201),p=a(5414),m=a(7723),x=a(9674),g=a(4848),b=[{code:"all",label:"\u5168\u90e8"},{code:"pending",label:"\u5f85\u4ed8\u6b3e"},{code:"paid",label:"\u5f85\u53d1\u8d27"},{code:"shipping",label:"\u5f85\u6536\u8d27"},{code:"done",label:"\u5df2\u5b8c\u6210"}],j={pending:{label:"\u5f85\u4ed8\u6b3e",badge:"badge-pink"},paid:{label:"\u5f85\u53d1\u8d27",badge:"badge-blue"},shipping:{label:"\u5f85\u6536\u8d27",badge:"badge-blue"},done:{label:"\u5df2\u5b8c\u6210",badge:"badge-green"},cancelled:{label:"\u5df2\u53d6\u6d88",badge:"badge-gray"}};function f(){var e=(0,u.wR)(),s=(e.theme,e.resolvedTheme),a=(0,h.c)();(0,p.l)(s);var n=(0,l.useState)("all"),c=(0,r.A)(n,2),f=c[0],N=c[1],S=(0,l.useState)([]),v=(0,r.A)(S,2),E=v[0],Y=v[1],T=function(){return Y((0,i.n7)())};(0,l.useEffect)(T,[]),(0,l.useEffect)(function(){var e=function(){var e=o().getStorageSync("orders:filter");e&&b.some(function(s){return s.code===e})&&(N(e),o().removeStorageSync("orders:filter")),T()};e();var s=o().getCurrentInstance().page;if(s){var a=s.onShow;s.onShow=function(){e(),a&&a.apply(this)}}},[]),(0,l.useEffect)(function(){var e,s;return null===(e=o().eventCenter)||void 0===e||null===(s=e.once)||void 0===s||s.call(e,"orders:refresh",T),T(),function(){var e,s;null===(e=o().eventCenter)||void 0===e||null===(s=e.off)||void 0===s||s.call(e,"orders:refresh",T)}},[]);var w="all"===f?E:E.filter(function(e){return e.statusCode===f}),y=function(e){o().navigateTo({url:"/pages/orderDetail/index?orderId=".concat(e.id)})};return(0,g.jsxs)(t.Ss,{className:"theme-".concat(s),children:[(0,g.jsx)(x.A,{}),(0,g.jsx)(m.A,{children:(0,g.jsxs)(t.Ss,{className:"orders-page",children:[(0,g.jsxs)(t.Ss,{className:"page-header dashed-card mt-20",style:{marginTop:"".concat(a.headerPaddingTop,"px")},children:[(0,g.jsx)(t.Ss,{className:"star-badge"}),(0,g.jsx)(t.EY,{className:"page-title",children:"\u6211\u7684\u8ba2\u5355"})]}),(0,g.jsx)(t.Ss,{className:"status-tabs",children:(0,g.jsx)(t.BM,{className:"tabs-scroll",scrollX:!0,children:b.map(function(e){return(0,g.jsxs)(t.Ss,{className:"tab-item ".concat(f===e.code?"active":""),onTap:function(){return N(e.code)},children:[(0,g.jsx)(t.EY,{className:"tab-label",children:e.label}),f===e.code&&(0,g.jsx)(t.Ss,{className:"tab-underline"})]},e.code)})})}),(0,g.jsxs)(t.BM,{className:"orders-list",scrollY:!0,children:[w.map(function(e){var s,a=j[e.statusCode]||j.pending,n=null!==(s=e.productIcon)&&void 0!==s&&s.startsWith("/icon/")||/^https?:/i.test(e.productIcon||"")?e.productIcon:"/icon/\u56db\u89d2\u661f.png",r=(0,d.uq)(n);return(0,g.jsxs)(t.Ss,{className:"order-card dashed-card",onTap:function(){return y(e)},children:[(0,g.jsx)(t.Ss,{className:"star-badge"}),(0,g.jsxs)(t.Ss,{className:"order-header",children:[(0,g.jsx)(t.EY,{className:"order-date",children:e.date}),(0,g.jsx)(t.EY,{className:"badge ".concat(a.badge),children:a.label})]}),(0,g.jsxs)(t.Ss,{className:"order-body",children:[(0,g.jsx)(t.Ss,{className:"order-icon-wrapper",children:(0,g.jsx)(t._V,{className:"order-icon-img",src:r,mode:"aspectFit"})}),(0,g.jsxs)(t.Ss,{className:"order-info",children:[(0,g.jsx)(t.EY,{className:"order-product",children:e.productName}),(0,g.jsx)(t.EY,{className:"order-sku",children:e.sku}),(0,g.jsxs)(t.EY,{className:"order-meta",children:["\u6570\u91cf: ",e.count," \u4ef6 | ",e.id]})]})]}),(0,g.jsxs)(t.Ss,{className:"order-footer",children:[(0,g.jsxs)(t.Ss,{className:"order-price-bar",children:[(0,g.jsx)(t.EY,{className:"price-label",children:"\u5b9e\u4ed8\u6b3e"}),(0,g.jsx)(t.EY,{className:"price-value",children:e.price})]}),(0,g.jsxs)(t.Ss,{className:"order-actions",children:["pending"===e.statusCode&&(0,g.jsx)(t.Ss,{className:"btn-gradient order-btn",children:(0,g.jsx)(t.EY,{children:"\u7acb\u5373\u4ed8\u6b3e"})}),"paid"===e.statusCode&&(0,g.jsx)(t.Ss,{className:"btn-outline order-btn",children:(0,g.jsx)(t.EY,{children:"\u50ac\u53d1\u8d27"})}),"shipping"===e.statusCode&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(t.Ss,{className:"btn-outline order-btn",onTap:function(e){e.stopPropagation(),o().showToast({title:"\u67e5\u770b\u7269\u6d41",icon:"none"})},children:(0,g.jsx)(t.EY,{children:"\u67e5\u770b\u7269\u6d41"})}),(0,g.jsx)(t.Ss,{className:"btn-gradient order-btn",onTap:function(e){e.stopPropagation(),o().showToast({title:"\u786e\u8ba4\u6536\u8d27",icon:"none"})},children:(0,g.jsx)(t.EY,{children:"\u786e\u8ba4\u6536\u8d27"})})]}),"done"===e.statusCode&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(t.Ss,{className:"btn-outline order-btn",onTap:function(e){e.stopPropagation(),o().showToast({title:"\u7533\u8bf7\u552e\u540e",icon:"none"})},children:(0,g.jsx)(t.EY,{children:"\u7533\u8bf7\u552e\u540e"})}),(0,g.jsx)(t.Ss,{className:"btn-gradient order-btn",onTap:function(e){e.stopPropagation(),o().showToast({title:"\u518d\u6765\u4e00\u5355",icon:"none"})},children:(0,g.jsx)(t.EY,{children:"\u518d\u6765\u4e00\u5355"})})]}),(0,g.jsx)(t.Ss,{className:"btn-outline order-btn",onTap:function(s){s.stopPropagation(),y(e)},children:(0,g.jsx)(t.EY,{children:"\u8be6\u60c5"})})]})]})]},e.id)}),0===w.length&&(0,g.jsxs)(t.Ss,{className:"empty-state",children:[(0,g.jsx)(t._V,{className:"empty-icon-img",src:"/icon/\u5305\u88f9.png",mode:"aspectFit"}),(0,g.jsx)(t.EY,{className:"empty-text",children:"\u6682\u65e0\u8ba2\u5355"}),(0,g.jsx)(t.EY,{className:"empty-sub",children:"\u53bb\u9996\u9875\u5f00\u59cb\u5b9a\u5236\u5427"}),(0,g.jsx)(t.Ss,{className:"btn-gradient",onTap:function(){return o().switchTab({url:"/pages/index/index"})},children:(0,g.jsx)(t.EY,{children:"\u53bb\u5b9a\u5236"})})]})]}),(0,g.jsx)(t.Ss,{style:{height:"40px"}})]})})]})}var N={navigationStyle:"custom",enablePageMeta:!0,navigationBarTitleText:"\u8ba2\u5355\u5217\u8868"};Page((0,n.createPageConfig)(f,"pages/orders/index",{root:{cn:[]}},N||{}))}},function(e){var s=function(s){return e(e.s=s)};e.O(0,[907,96,76],function(){return s(2307)});e.O()}]); \ No newline at end of file +"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[402],{2307:function(e,s,a){var n=a(7842),r=a(5544),t=a(118),c=a(758),o=a.n(c),l=a(6540),i=a(8594),d=a(8199),u=a(9703),h=a(9201),p=a(5414),m=a(7723),x=a(9674),g=a(4848),b=[{code:"all",label:"\u5168\u90e8"},{code:"pending",label:"\u5f85\u4ed8\u6b3e"},{code:"paid",label:"\u5f85\u53d1\u8d27"},{code:"shipping",label:"\u5f85\u6536\u8d27"},{code:"done",label:"\u5df2\u5b8c\u6210"}],j={pending:{label:"\u5f85\u4ed8\u6b3e",badge:"badge-pink"},paid:{label:"\u5f85\u53d1\u8d27",badge:"badge-blue"},shipping:{label:"\u5f85\u6536\u8d27",badge:"badge-blue"},done:{label:"\u5df2\u5b8c\u6210",badge:"badge-green"},cancelled:{label:"\u5df2\u53d6\u6d88",badge:"badge-gray"}};function f(){var e=(0,u.wR)(),s=(e.theme,e.resolvedTheme),a=(0,h.c)();(0,p.l)(s);var n=(0,l.useState)("all"),c=(0,r.A)(n,2),f=c[0],N=c[1],S=(0,l.useState)([]),v=(0,r.A)(S,2),E=v[0],Y=v[1],T=function(){return Y((0,i.n7)())};(0,l.useEffect)(T,[]),(0,l.useEffect)(function(){var e=function(){var e=o().getStorageSync("orders:filter");e&&b.some(function(s){return s.code===e})&&(N(e),o().removeStorageSync("orders:filter")),T()};e();var s=o().getCurrentInstance().page;if(s){var a=s.onShow;s.onShow=function(){e(),a&&a.apply(this)}}},[]),(0,l.useEffect)(function(){var e,s;return null===(e=o().eventCenter)||void 0===e||null===(s=e.once)||void 0===s||s.call(e,"orders:refresh",T),T(),function(){var e,s;null===(e=o().eventCenter)||void 0===e||null===(s=e.off)||void 0===s||s.call(e,"orders:refresh",T)}},[]);var w="all"===f?E:E.filter(function(e){return e.statusCode===f}),y=function(e){o().navigateTo({url:"/pages/orderDetail/index?orderId=".concat(e.id)})};return(0,g.jsxs)(t.Ss,{className:"theme-".concat(s),children:[(0,g.jsx)(x.A,{}),(0,g.jsx)(m.A,{children:(0,g.jsxs)(t.Ss,{className:"orders-page",children:[(0,g.jsxs)(t.Ss,{className:"page-header dashed-card mt-20",style:{marginTop:"".concat(a.headerPaddingTop,"px")},children:[(0,g.jsx)(t.Ss,{className:"star-badge"}),(0,g.jsx)(t.EY,{className:"page-title",children:"\u6211\u7684\u8ba2\u5355"})]}),(0,g.jsx)(t.Ss,{className:"status-tabs",children:(0,g.jsx)(t.BM,{className:"tabs-scroll",scrollX:!0,children:b.map(function(e){return(0,g.jsxs)(t.Ss,{className:"tab-item ".concat(f===e.code?"active":""),onTap:function(){return N(e.code)},children:[(0,g.jsx)(t.EY,{className:"tab-label",children:e.label}),f===e.code&&(0,g.jsx)(t.Ss,{className:"tab-underline"})]},e.code)})})}),(0,g.jsxs)(t.BM,{className:"orders-list",scrollY:!0,children:[w.map(function(e){var s,a=j[e.statusCode]||j.pending,n=null!==(s=e.productIcon)&&void 0!==s&&s.startsWith("/icon/")||/^https?:/i.test(e.productIcon||"")?e.productIcon:"/icon/\u56db\u89d2\u661f.png",r=(0,d.uq)(n);return(0,g.jsxs)(t.Ss,{className:"order-card dashed-card",onTap:function(){return y(e)},children:[(0,g.jsx)(t.Ss,{className:"star-badge"}),(0,g.jsxs)(t.Ss,{className:"order-header",children:[(0,g.jsx)(t.EY,{className:"order-date",children:e.date}),(0,g.jsx)(t.EY,{className:"badge ".concat(a.badge),children:a.label})]}),(0,g.jsxs)(t.Ss,{className:"order-body",children:[(0,g.jsx)(t.Ss,{className:"order-icon-wrapper",children:(0,g.jsx)(t._V,{className:"order-icon-img",src:r,mode:"aspectFit"})}),(0,g.jsxs)(t.Ss,{className:"order-info",children:[(0,g.jsx)(t.EY,{className:"order-product",children:e.productName}),(0,g.jsx)(t.EY,{className:"order-sku",children:e.sku}),(0,g.jsxs)(t.EY,{className:"order-meta",children:["\u6570\u91cf: ",e.count," \u4ef6 | ",e.id]})]})]}),(0,g.jsxs)(t.Ss,{className:"order-footer",children:[(0,g.jsxs)(t.Ss,{className:"order-price-bar",children:[(0,g.jsx)(t.EY,{className:"price-label",children:"\u5b9e\u4ed8\u6b3e"}),(0,g.jsx)(t.EY,{className:"price-value",children:e.price})]}),(0,g.jsxs)(t.Ss,{className:"order-actions",children:["pending"===e.statusCode&&(0,g.jsx)(t.Ss,{className:"btn-gradient order-btn",children:(0,g.jsx)(t.EY,{children:"\u7acb\u5373\u4ed8\u6b3e"})}),"paid"===e.statusCode&&(0,g.jsx)(t.Ss,{className:"btn-outline order-btn",children:(0,g.jsx)(t.EY,{children:"\u50ac\u53d1\u8d27"})}),"shipping"===e.statusCode&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(t.Ss,{className:"btn-outline order-btn",onTap:function(e){e.stopPropagation(),o().showToast({title:"\u67e5\u770b\u7269\u6d41",icon:"none"})},children:(0,g.jsx)(t.EY,{children:"\u67e5\u770b\u7269\u6d41"})}),(0,g.jsx)(t.Ss,{className:"btn-gradient order-btn",onTap:function(e){e.stopPropagation(),o().showToast({title:"\u786e\u8ba4\u6536\u8d27",icon:"none"})},children:(0,g.jsx)(t.EY,{children:"\u786e\u8ba4\u6536\u8d27"})})]}),"done"===e.statusCode&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(t.Ss,{className:"btn-outline order-btn",onTap:function(e){e.stopPropagation(),o().showToast({title:"\u7533\u8bf7\u552e\u540e",icon:"none"})},children:(0,g.jsx)(t.EY,{children:"\u7533\u8bf7\u552e\u540e"})}),(0,g.jsx)(t.Ss,{className:"btn-gradient order-btn",onTap:function(e){e.stopPropagation(),o().showToast({title:"\u518d\u6765\u4e00\u5355",icon:"none"})},children:(0,g.jsx)(t.EY,{children:"\u518d\u6765\u4e00\u5355"})})]}),(0,g.jsx)(t.Ss,{className:"btn-outline order-btn",onTap:function(s){s.stopPropagation(),y(e)},children:(0,g.jsx)(t.EY,{children:"\u8be6\u60c5"})})]})]})]},e.id)}),0===w.length&&(0,g.jsxs)(t.Ss,{className:"empty-state",children:[(0,g.jsx)(t._V,{className:"empty-icon-img",src:(0,d.uq)("/icon/\u5305\u88f9.png"),mode:"aspectFit"}),(0,g.jsx)(t.EY,{className:"empty-text",children:"\u6682\u65e0\u8ba2\u5355"}),(0,g.jsx)(t.EY,{className:"empty-sub",children:"\u53bb\u9996\u9875\u5f00\u59cb\u5b9a\u5236\u5427"}),(0,g.jsx)(t.Ss,{className:"btn-gradient",onTap:function(){return o().switchTab({url:"/pages/index/index"})},children:(0,g.jsx)(t.EY,{children:"\u53bb\u5b9a\u5236"})})]})]}),(0,g.jsx)(t.Ss,{style:{height:"40px"}})]})})]})}var N={navigationStyle:"custom",enablePageMeta:!0,navigationBarTitleText:"\u8ba2\u5355\u5217\u8868"};Page((0,n.createPageConfig)(f,"pages/orders/index",{root:{cn:[]}},N||{}))}},function(e){var s=function(s){return e(e.s=s)};e.O(0,[907,96,76],function(){return s(2307)});e.O()}]); \ No newline at end of file diff --git a/dist/pages/profile/index.js b/dist/pages/profile/index.js index 6b2a50e..a5f8f97 100644 --- a/dist/pages/profile/index.js +++ b/dist/pages/profile/index.js @@ -1 +1 @@ -"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[481],{2579:function(e,s,a){var n=a(7842),i=a(1212),t=a(467),r=a(5544),c=a(118),l=a(758),o=a.n(l),d=a(6540),u=a(8594),p=a(9703),g=a(9201),m=a(5414),h=a(9674),x=a(6295),f=a(3246),v=a(4848),j={"\u6211\u7684\u8bbe\u8ba1":"/icon/\u8c03\u8272\u76d8.png","\u8bcd\u4e91\u751f\u6210":"/icon/\u8bcd\u4e91\u751f\u6210.png","\u6536\u8d27\u5730\u5740":"/icon/\u5730\u5740.png","\u8054\u7cfb\u5ba2\u670d":"/icon/\u7535\u8bdd.png","\u4f7f\u7528\u5e2e\u52a9":"/icon/\u4f7f\u7528\u5e2e\u52a9.png","\u8bbe\u7f6e":"/icon/\u8bbe\u7f6e.png"},N=[{key:"toDesign",label:"\u5f85\u8bbe\u8ba1",icon:"/icon/\u4e09\u89d2\u5c3a.png"},{key:"pending",label:"\u5f85\u4ed8\u6b3e",icon:"/icon/\u56db\u89d2\u661f.png"},{key:"paid",label:"\u5f85\u53d1\u8d27",icon:"/icon/\u5305\u88f9.png"},{key:"shipping",label:"\u5f85\u6536\u8d27",icon:"/icon/\u676f\u5b50.png"},{key:"done",label:"\u5df2\u5b8c\u6210",icon:"/icon/\u4e66\u672c.png"}],S=[{label:"\u6211\u7684\u8bbe\u8ba1",path:"/pages/designList/index"},{label:"\u8bcd\u4e91\u751f\u6210",path:"/pages/wordcloud/index"},{label:"\u6536\u8d27\u5730\u5740",path:"/pages/address/index"},{label:"\u8054\u7cfb\u5ba2\u670d",path:"/pages/service/index"},{label:"\u4f7f\u7528\u5e2e\u52a9",path:"/pages/agreement/index"},{label:"\u8bbe\u7f6e",path:"/pages/settings/index"}],b=function(){};function k(){var e=(0,p.wR)(),s=(e.theme,e.resolvedTheme),a=(0,g.c)();(0,m.l)(s);var n=(0,d.useState)(!1),k=(0,r.A)(n,2),T=k[0],w=k[1],y=(0,d.useState)({nickName:"",avatarUrl:""}),A=(0,r.A)(y,2),E=A[0],Y=A[1],U=(0,d.useState)(!1),F=(0,r.A)(U,2),P=F[0],_=F[1],D=(0,d.useState)("entry"),V=(0,r.A)(D,2),L=V[0],C=V[1],J=(0,d.useState)(""),O=(0,r.A)(J,2),B=O[0],H=O[1],I=(0,d.useState)(""),M=(0,r.A)(I,2),R=M[0],W=M[1],$=(0,d.useState)(!1),q=(0,r.A)($,2),z=q[0],G=q[1],K=(0,d.useState)({toDesign:0,pending:0,paid:0,shipping:0,done:0}),Q=(0,r.A)(K,2),X=Q[0],Z=Q[1],ee=function(){var e=(0,u.n7)(),s=(0,u.p_)();Z({toDesign:s.filter(function(e){return"undesigned"===e.status||"designing"===e.status}).length,pending:e.filter(function(e){return"pending"===e.statusCode}).length,paid:e.filter(function(e){return"paid"===e.statusCode}).length,shipping:e.filter(function(e){return"shipping"===e.statusCode}).length,done:e.filter(function(e){return"done"===e.statusCode}).length})},se=function(){var e=(0,u.ug)();null!==e&&void 0!==e&&e.openid?(w(!0),Y({nickName:e.nickName||"",avatarUrl:e.avatarUrl||""})):(w(!1),Y({nickName:"",avatarUrl:""})),ee()};(0,l.useDidShow)(function(){se()});var ae=function(){C("entry"),H(""),W(""),_(!0)},ne=function(){return _(!1)},ie=function(e){G(!1),(0,f.Sy)(),o().showToast({title:e,icon:"none"})},te=function(e,s,a,n){var i={openid:s,nickName:a||"\u5fae\u4fe1\u7528\u6237",avatarUrl:n||"",accessToken:e,loginAt:Date.now()};(0,u.iA)(i),Y({nickName:i.nickName,avatarUrl:i.avatarUrl}),w(!0),_(!1),C("entry"),G(!1),(0,f.Sy)(),o().showToast({title:"\u767b\u5f55\u6210\u529f",icon:"success"})},re=function(){var e=(0,t.A)((0,i.A)().m(function e(){var s,a,n,t,r,c;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!z){e.n=1;break}return e.a(2);case 1:return console.log("[Profile] \u767b\u5f55\u6309\u94ae\u88ab\u70b9\u51fb\uff0c\u5f00\u59cb\u767b\u5f55\u6d41\u7a0b"),G(!0),o().showLoading({title:"\u767b\u5f55\u4e2d",mask:!0}),e.p=2,e.n=3,o().login();case 3:return s=e.v,console.log("[Profile] wx.login \u6210\u529f\uff0ccode=",s.code),e.n=4,(0,x.iD)(s.code);case 4:if(a=e.v,console.log("[Profile] \u540e\u7aef /auth/login \u8fd4\u56de:",JSON.stringify(a)),null!==a&&void 0!==a&&a.accessToken){e.n=5;break}return ie("\u767b\u5f55\u5931\u8d25\uff0c\u672a\u62ff\u5230 token"),e.a(2);case 5:return n="",e.p=6,e.n=7,(0,x.jp)();case 7:t=e.v,n=(null===t||void 0===t?void 0:t.openid)||"",e.n=9;break;case 8:e.p=8,e.v,n="";case 9:if(n){e.n=10;break}return ie("\u767b\u5f55\u5f02\u5e38\uff0c\u8bf7\u91cd\u8bd5"),e.a(2);case 10:if(r=a.isNewUser||!a.nickname||!a.avatar,!r){e.n=11;break}return H(a.nickname||""),W(a.avatar||""),(0,f.Sy)(),G(!1),C("fill"),o().showToast({title:"\u8bf7\u8bbe\u7f6e\u5934\u50cf\u548c\u6635\u79f0",icon:"none"}),e.a(2);case 11:te(a.accessToken,n,a.nickname||"",a.avatar||""),e.n=13;break;case 12:e.p=12,c=e.v,console.error("[Profile] \u767b\u5f55\u6d41\u7a0b\u51fa\u9519:",c),ie((null===c||void 0===c?void 0:c.message)||"\u540e\u7aef\u8fde\u63a5\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u7f51\u7edc");case 13:return e.a(2)}},e,null,[[6,8],[2,12]])}));return function(){return e.apply(this,arguments)}}(),ce=function(){var e=(0,t.A)((0,i.A)().m(function e(){var s,a,n,t;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!z){e.n=1;break}return e.a(2);case 1:return G(!0),o().showLoading({title:"\u4fdd\u5b58\u4e2d",mask:!0}),e.p=2,e.n=3,(0,x.r7)({nickname:B||void 0,avatar:R||void 0});case 3:return s="",e.p=4,e.n=5,(0,x.jp)();case 5:a=e.v,s=(null===a||void 0===a?void 0:a.openid)||"",e.n=7;break;case 6:e.p=6,e.v,s="";case 7:if(s){e.n=8;break}return ie("\u4fdd\u5b58\u5f02\u5e38\uff0c\u8bf7\u91cd\u8bd5"),e.a(2);case 8:n=(0,u.ug)(),te((null===n||void 0===n?void 0:n.accessToken)||(0,x.gf)(),s,B,R),e.n=10;break;case 9:e.p=9,t=e.v,console.error("[Profile] \u4fdd\u5b58\u8d44\u6599\u51fa\u9519:",t),ie((null===t||void 0===t?void 0:t.message)||"\u4fdd\u5b58\u5931\u8d25");case 10:return e.a(2)}},e,null,[[4,6],[2,9]])}));return function(){return e.apply(this,arguments)}}(),le=function(e){W(e.detail.avatarUrl||"")},oe=function(e){switch(o().hideToast(),e){case"toDesign":o().setStorageSync("designList:filter","toDesign"),o().switchTab({url:"/pages/designList/index"});break;case"pending":o().setStorageSync("orders:filter","pending"),o().switchTab({url:"/pages/orders/index"});break;case"paid":o().setStorageSync("orders:filter","paid"),o().switchTab({url:"/pages/orders/index"});break;case"shipping":o().setStorageSync("orders:filter","shipping"),o().switchTab({url:"/pages/orders/index"});break;case"done":o().setStorageSync("orders:filter","done"),o().switchTab({url:"/pages/orders/index"});break}},de=function(e,s){if(o().hideToast(),!T&&(e.includes("designList")||e.includes("orders")))return o().showToast({title:"\u8bf7\u5148\u767b\u5f55",icon:"none"}),void _(!0);"\u8054\u7cfb\u5ba2\u670d"!==s?e.startsWith("/pages/")&&(e.includes("designList")||e.includes("orders")?o().switchTab({url:e,fail:function(e){console.error("switchTab fail",e),o().showToast({title:"\u8df3\u8f6c\u5931\u8d25",icon:"none"})}}):o().navigateTo({url:e,fail:function(e){console.error("navigateTo fail",e),o().showToast({title:"\u8df3\u8f6c\u5931\u8d25",icon:"none"})}})):o().navigateTo({url:"/pages/service/index",fail:function(e){console.error("navigateTo service fail",e),o().showToast({title:"\u8df3\u8f6c\u5931\u8d25",icon:"none"})}})};return(0,v.jsxs)(c.Ss,{className:"theme-".concat(s),style:{minHeight:"100vh"},children:[(0,v.jsx)(h.A,{}),(0,v.jsxs)(c.Ss,{className:"profile-page",children:[(0,v.jsxs)(c.Ss,{className:"profile-header dashed-card mt-20",style:{marginTop:"".concat(a.headerPaddingTop,"px")},children:[(0,v.jsx)(c.Ss,{className:"star-badge"}),(0,v.jsxs)(c.Ss,{className:"user-info",children:[T&&E.avatarUrl?(0,v.jsx)(c._V,{className:"avatar",src:E.avatarUrl,mode:"aspectFill"}):(0,v.jsx)(c.Ss,{className:"avatar-placeholder",onTap:ae,children:(0,v.jsx)(c._V,{className:"avatar-icon-img",src:"/icon/\u4e2a\u4eba.png",mode:"aspectFit"})}),(0,v.jsxs)(c.Ss,{className:"user-meta",children:[(0,v.jsx)(c.EY,{className:"user-name",onTap:T?b:ae,children:T?E.nickName:"\u70b9\u51fb\u767b\u5f55"}),(0,v.jsx)(c.EY,{className:"user-level",children:T?"\u667a\u7ed8\u5fae\u523b\u4f1a\u5458":"\u6388\u6743\u5fae\u4fe1\uff0c\u5f00\u542f\u4e13\u5c5e\u5b9a\u5236"})]})]}),(0,v.jsxs)(c.Ss,{className:"status-grid",children:[(0,v.jsx)(c.Ss,{className:"status-row row2",children:N.slice(0,2).map(function(e){return(0,v.jsxs)(c.Ss,{className:"status-group",children:[(0,v.jsxs)(c.Ss,{className:"status-item",onTap:function(){return oe(e.key)},children:[(0,v.jsx)(c._V,{className:"status-icon-img",src:e.icon,mode:"aspectFit"}),(0,v.jsx)(c.EY,{className:"status-num",children:X[e.key]}),(0,v.jsx)(c.EY,{className:"status-label",children:e.label})]}),(0,v.jsx)(c.Ss,{className:"status-divider"})]},e.key)})}),(0,v.jsx)(c.Ss,{className:"status-divider-h"}),(0,v.jsx)(c.Ss,{className:"status-row row3",children:N.slice(2).map(function(e,s){return(0,v.jsxs)(c.Ss,{className:"status-group",children:[(0,v.jsxs)(c.Ss,{className:"status-item",onTap:function(){return oe(e.key)},children:[(0,v.jsx)(c._V,{className:"status-icon-img",src:e.icon,mode:"aspectFit"}),(0,v.jsx)(c.EY,{className:"status-num",children:X[e.key]}),(0,v.jsx)(c.EY,{className:"status-label",children:e.label})]}),s<2&&(0,v.jsx)(c.Ss,{className:"status-divider"})]},e.key)})})]})]}),(0,v.jsxs)(c.Ss,{className:"mt-20",children:[(0,v.jsx)(c.EY,{className:"section-title",children:"\u5e38\u7528\u529f\u80fd"}),(0,v.jsx)(c.Ss,{className:"menu-grid",children:S.map(function(e,s){return(0,v.jsxs)(c.Ss,{className:"menu-card dashed-card",onTap:function(){return de(e.path,e.label)},children:[(0,v.jsx)(c.Ss,{className:"star-badge"}),(0,v.jsx)(c._V,{className:"menu-icon-img",src:j[e.label],mode:"aspectFit"}),(0,v.jsx)(c.EY,{className:"menu-label",children:e.label})]},s)})})]}),(0,v.jsxs)(c.Ss,{className:"enterprise-section dashed-card mt-20",children:[(0,v.jsx)(c.Ss,{className:"star-badge"}),(0,v.jsxs)(c.Ss,{className:"flex-between",children:[(0,v.jsxs)(c.Ss,{className:"flex-column",children:[(0,v.jsxs)(c.Ss,{className:"flex-center",children:[(0,v.jsx)(c._V,{className:"enterprise-icon",src:"/icon/\u4f01\u4e1a\u6279\u91cf\u5b9a\u5236.png",mode:"aspectFit"}),(0,v.jsx)(c.EY,{className:"enterprise-title",children:"\u4f01\u4e1a\u6279\u91cf\u5b9a\u5236"})]}),(0,v.jsx)(c.EY,{className:"enterprise-desc",children:"\u5e74\u4f1a\u793c\u54c1\u3001\u5165\u804c\u7eaa\u5ff5\u3001\u56e2\u5efa\u4f34\u624b\u793c"})]}),(0,v.jsx)(c.Ss,{className:"btn-gradient enterprise-btn",children:(0,v.jsx)(c.EY,{children:"\u7acb\u5373\u54a8\u8be2"})})]})]}),(0,v.jsx)(c.Ss,{style:{height:"40px"}}),P&&(0,v.jsx)(c.Ss,{className:"modal-overlay",children:(0,v.jsxs)(c.Ss,{className:"login-card dashed-card",children:[(0,v.jsx)(c.Ss,{className:"star-badge"}),(0,v.jsx)(c.EY,{className:"login-title",children:"\u767b\u5f55\u667a\u7ed8\u5fae\u523b"}),"entry"===L?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(c.EY,{className:"login-desc",children:"\u767b\u5f55\u540e\u540c\u6b65\u60a8\u7684\u8bbe\u8ba1\u6e05\u5355\u548c\u8ba2\u5355"}),(0,v.jsxs)(c.Ss,{className:"login-actions",children:[(0,v.jsx)(c.Ss,{className:"btn-outline",onTap:ne,children:(0,v.jsx)(c.EY,{children:"\u53d6\u6d88"})}),(0,v.jsx)(c.Ss,{className:"btn-gradient",onTap:re,children:(0,v.jsx)(c.EY,{children:"\u5fae\u4fe1\u767b\u5f55"})})]})]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(c.EY,{className:"login-desc",children:"\u8bf7\u8bbe\u7f6e\u60a8\u7684\u5934\u50cf\u548c\u6635\u79f0"}),(0,v.jsx)(c.$n,{className:"avatar-btn",openType:"chooseAvatar",onChooseAvatar:le,children:R?(0,v.jsx)(c._V,{className:"avatar-img",src:R,mode:"aspectFill"}):(0,v.jsx)(c._V,{className:"avatar-placeholder-img",src:"/icon/\u4e2a\u4eba.png",mode:"aspectFit"})}),(0,v.jsx)(c.pd,{type:"nickname",className:"nickname-input",placeholder:"\u8bf7\u8f93\u5165\u6635\u79f0",value:B,onInput:function(e){return H(e.detail.value)}}),(0,v.jsxs)(c.Ss,{className:"login-actions",children:[(0,v.jsx)(c.Ss,{className:"btn-outline",onTap:ne,children:(0,v.jsx)(c.EY,{children:"\u53d6\u6d88"})}),(0,v.jsx)(c.Ss,{className:"btn-gradient",onTap:ce,children:(0,v.jsx)(c.EY,{children:"\u4fdd\u5b58"})})]})]})]})})]})]})}var T={navigationStyle:"custom",enablePageMeta:!0,navigationBarTitleText:"\u4e2a\u4eba\u4e2d\u5fc3"};Page((0,n.createPageConfig)(k,"pages/profile/index",{root:{cn:[]}},T||{}))}},function(e){var s=function(s){return e(e.s=s)};e.O(0,[907,96,76],function(){return s(2579)});e.O()}]); \ No newline at end of file +"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[481],{2579:function(e,s,a){var n=a(7842),i=a(1212),t=a(467),r=a(5544),c=a(118),l=a(758),o=a.n(l),d=a(6540),u=a(8594),p=a(9703),g=a(9201),m=a(5414),h=a(9674),x=a(6295),f=a(3246),v=a(8199),j=a(4848),N={"\u6211\u7684\u8bbe\u8ba1":(0,v.uq)("/icon/\u8c03\u8272\u76d8.png"),"\u8bcd\u4e91\u751f\u6210":(0,v.uq)("/icon/\u8bcd\u4e91\u751f\u6210.png"),"\u6536\u8d27\u5730\u5740":(0,v.uq)("/icon/\u5730\u5740.png"),"\u8054\u7cfb\u5ba2\u670d":(0,v.uq)("/icon/\u7535\u8bdd.png"),"\u4f7f\u7528\u5e2e\u52a9":(0,v.uq)("/icon/\u4f7f\u7528\u5e2e\u52a9.png"),"\u8bbe\u7f6e":(0,v.uq)("/icon/\u8bbe\u7f6e.png")},S=[{key:"toDesign",label:"\u5f85\u8bbe\u8ba1",icon:(0,v.uq)("/icon/\u4e09\u89d2\u5c3a.png")},{key:"pending",label:"\u5f85\u4ed8\u6b3e",icon:(0,v.uq)("/icon/\u56db\u89d2\u661f.png")},{key:"paid",label:"\u5f85\u53d1\u8d27",icon:(0,v.uq)("/icon/\u5305\u88f9.png")},{key:"shipping",label:"\u5f85\u6536\u8d27",icon:(0,v.uq)("/icon/\u676f\u5b50.png")},{key:"done",label:"\u5df2\u5b8c\u6210",icon:(0,v.uq)("/icon/\u4e66\u672c.png")}],b=[{label:"\u6211\u7684\u8bbe\u8ba1",path:"/pages/designList/index"},{label:"\u8bcd\u4e91\u751f\u6210",path:"/pages/wordcloud/index"},{label:"\u6536\u8d27\u5730\u5740",path:"/pages/address/index"},{label:"\u8054\u7cfb\u5ba2\u670d",path:"/pages/service/index"},{label:"\u4f7f\u7528\u5e2e\u52a9",path:"/pages/agreement/index"},{label:"\u8bbe\u7f6e",path:"/pages/settings/index"}],k=function(){};function T(){var e=(0,p.wR)(),s=(e.theme,e.resolvedTheme),a=(0,g.c)();(0,m.l)(s);var n=(0,d.useState)(!1),T=(0,r.A)(n,2),w=T[0],y=T[1],A=(0,d.useState)({nickName:"",avatarUrl:""}),E=(0,r.A)(A,2),Y=E[0],q=E[1],U=(0,d.useState)(!1),F=(0,r.A)(U,2),P=F[0],_=F[1],D=(0,d.useState)("entry"),V=(0,r.A)(D,2),L=V[0],C=V[1],J=(0,d.useState)(""),O=(0,r.A)(J,2),B=O[0],H=O[1],I=(0,d.useState)(""),M=(0,r.A)(I,2),R=M[0],W=M[1],$=(0,d.useState)(!1),z=(0,r.A)($,2),G=z[0],K=z[1],Q=(0,d.useState)({toDesign:0,pending:0,paid:0,shipping:0,done:0}),X=(0,r.A)(Q,2),Z=X[0],ee=X[1],se=function(){var e=(0,u.n7)(),s=(0,u.p_)();ee({toDesign:s.filter(function(e){return"undesigned"===e.status||"designing"===e.status}).length,pending:e.filter(function(e){return"pending"===e.statusCode}).length,paid:e.filter(function(e){return"paid"===e.statusCode}).length,shipping:e.filter(function(e){return"shipping"===e.statusCode}).length,done:e.filter(function(e){return"done"===e.statusCode}).length})},ae=function(){var e=(0,u.ug)();null!==e&&void 0!==e&&e.openid?(y(!0),q({nickName:e.nickName||"",avatarUrl:e.avatarUrl||""})):(y(!1),q({nickName:"",avatarUrl:""})),se()};(0,l.useDidShow)(function(){ae()});var ne=function(){C("entry"),H(""),W(""),_(!0)},ie=function(){return _(!1)},te=function(e){K(!1),(0,f.Sy)(),o().showToast({title:e,icon:"none"})},re=function(e,s,a,n){var i={openid:s,nickName:a||"\u5fae\u4fe1\u7528\u6237",avatarUrl:n||"",accessToken:e,loginAt:Date.now()};(0,u.iA)(i),q({nickName:i.nickName,avatarUrl:i.avatarUrl}),y(!0),_(!1),C("entry"),K(!1),(0,f.Sy)(),o().showToast({title:"\u767b\u5f55\u6210\u529f",icon:"success"})},ce=function(){var e=(0,t.A)((0,i.A)().m(function e(){var s,a,n,t,r,c;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!G){e.n=1;break}return e.a(2);case 1:return console.log("[Profile] \u767b\u5f55\u6309\u94ae\u88ab\u70b9\u51fb\uff0c\u5f00\u59cb\u767b\u5f55\u6d41\u7a0b"),K(!0),o().showLoading({title:"\u767b\u5f55\u4e2d",mask:!0}),e.p=2,e.n=3,o().login();case 3:return s=e.v,console.log("[Profile] wx.login \u6210\u529f\uff0ccode=",s.code),e.n=4,(0,x.iD)(s.code);case 4:if(a=e.v,console.log("[Profile] \u540e\u7aef /auth/login \u8fd4\u56de:",JSON.stringify(a)),null!==a&&void 0!==a&&a.accessToken){e.n=5;break}return te("\u767b\u5f55\u5931\u8d25\uff0c\u672a\u62ff\u5230 token"),e.a(2);case 5:return n="",e.p=6,e.n=7,(0,x.jp)();case 7:t=e.v,n=(null===t||void 0===t?void 0:t.openid)||"",e.n=9;break;case 8:e.p=8,e.v,n="";case 9:if(n){e.n=10;break}return te("\u767b\u5f55\u5f02\u5e38\uff0c\u8bf7\u91cd\u8bd5"),e.a(2);case 10:if(r=a.isNewUser||!a.nickname||!a.avatar,!r){e.n=11;break}return H(a.nickname||""),W(a.avatar||""),(0,f.Sy)(),K(!1),C("fill"),o().showToast({title:"\u8bf7\u8bbe\u7f6e\u5934\u50cf\u548c\u6635\u79f0",icon:"none"}),e.a(2);case 11:re(a.accessToken,n,a.nickname||"",a.avatar||""),e.n=13;break;case 12:e.p=12,c=e.v,console.error("[Profile] \u767b\u5f55\u6d41\u7a0b\u51fa\u9519:",c),te((null===c||void 0===c?void 0:c.message)||"\u540e\u7aef\u8fde\u63a5\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u7f51\u7edc");case 13:return e.a(2)}},e,null,[[6,8],[2,12]])}));return function(){return e.apply(this,arguments)}}(),le=function(){var e=(0,t.A)((0,i.A)().m(function e(){var s,a,n,t;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!G){e.n=1;break}return e.a(2);case 1:return K(!0),o().showLoading({title:"\u4fdd\u5b58\u4e2d",mask:!0}),e.p=2,e.n=3,(0,x.r7)({nickname:B||void 0,avatar:R||void 0});case 3:return s="",e.p=4,e.n=5,(0,x.jp)();case 5:a=e.v,s=(null===a||void 0===a?void 0:a.openid)||"",e.n=7;break;case 6:e.p=6,e.v,s="";case 7:if(s){e.n=8;break}return te("\u4fdd\u5b58\u5f02\u5e38\uff0c\u8bf7\u91cd\u8bd5"),e.a(2);case 8:n=(0,u.ug)(),re((null===n||void 0===n?void 0:n.accessToken)||(0,x.gf)(),s,B,R),e.n=10;break;case 9:e.p=9,t=e.v,console.error("[Profile] \u4fdd\u5b58\u8d44\u6599\u51fa\u9519:",t),te((null===t||void 0===t?void 0:t.message)||"\u4fdd\u5b58\u5931\u8d25");case 10:return e.a(2)}},e,null,[[4,6],[2,9]])}));return function(){return e.apply(this,arguments)}}(),oe=function(e){W(e.detail.avatarUrl||"")},de=function(e){switch(o().hideToast(),e){case"toDesign":o().setStorageSync("designList:filter","toDesign"),o().switchTab({url:"/pages/designList/index"});break;case"pending":o().setStorageSync("orders:filter","pending"),o().switchTab({url:"/pages/orders/index"});break;case"paid":o().setStorageSync("orders:filter","paid"),o().switchTab({url:"/pages/orders/index"});break;case"shipping":o().setStorageSync("orders:filter","shipping"),o().switchTab({url:"/pages/orders/index"});break;case"done":o().setStorageSync("orders:filter","done"),o().switchTab({url:"/pages/orders/index"});break}},ue=function(e,s){if(o().hideToast(),!w&&(e.includes("designList")||e.includes("orders")))return o().showToast({title:"\u8bf7\u5148\u767b\u5f55",icon:"none"}),void _(!0);"\u8054\u7cfb\u5ba2\u670d"!==s?e.startsWith("/pages/")&&(e.includes("designList")||e.includes("orders")?o().switchTab({url:e,fail:function(e){console.error("switchTab fail",e),o().showToast({title:"\u8df3\u8f6c\u5931\u8d25",icon:"none"})}}):o().navigateTo({url:e,fail:function(e){console.error("navigateTo fail",e),o().showToast({title:"\u8df3\u8f6c\u5931\u8d25",icon:"none"})}})):o().navigateTo({url:"/pages/service/index",fail:function(e){console.error("navigateTo service fail",e),o().showToast({title:"\u8df3\u8f6c\u5931\u8d25",icon:"none"})}})};return(0,j.jsxs)(c.Ss,{className:"theme-".concat(s),style:{minHeight:"100vh"},children:[(0,j.jsx)(h.A,{}),(0,j.jsxs)(c.Ss,{className:"profile-page",children:[(0,j.jsxs)(c.Ss,{className:"profile-header dashed-card mt-20",style:{marginTop:"".concat(a.headerPaddingTop,"px")},children:[(0,j.jsx)(c.Ss,{className:"star-badge"}),(0,j.jsxs)(c.Ss,{className:"user-info",children:[w&&Y.avatarUrl?(0,j.jsx)(c._V,{className:"avatar",src:Y.avatarUrl,mode:"aspectFill"}):(0,j.jsx)(c.Ss,{className:"avatar-placeholder",onTap:ne,children:(0,j.jsx)(c._V,{className:"avatar-icon-img",src:(0,v.uq)("/icon/\u4e2a\u4eba.png"),mode:"aspectFit"})}),(0,j.jsxs)(c.Ss,{className:"user-meta",children:[(0,j.jsx)(c.EY,{className:"user-name",onTap:w?k:ne,children:w?Y.nickName:"\u70b9\u51fb\u767b\u5f55"}),(0,j.jsx)(c.EY,{className:"user-level",children:w?"\u667a\u7ed8\u5fae\u523b\u4f1a\u5458":"\u6388\u6743\u5fae\u4fe1\uff0c\u5f00\u542f\u4e13\u5c5e\u5b9a\u5236"})]})]}),(0,j.jsxs)(c.Ss,{className:"status-grid",children:[(0,j.jsx)(c.Ss,{className:"status-row row2",children:S.slice(0,2).map(function(e){return(0,j.jsxs)(c.Ss,{className:"status-group",children:[(0,j.jsxs)(c.Ss,{className:"status-item",onTap:function(){return de(e.key)},children:[(0,j.jsx)(c._V,{className:"status-icon-img",src:e.icon,mode:"aspectFit"}),(0,j.jsx)(c.EY,{className:"status-num",children:Z[e.key]}),(0,j.jsx)(c.EY,{className:"status-label",children:e.label})]}),(0,j.jsx)(c.Ss,{className:"status-divider"})]},e.key)})}),(0,j.jsx)(c.Ss,{className:"status-divider-h"}),(0,j.jsx)(c.Ss,{className:"status-row row3",children:S.slice(2).map(function(e,s){return(0,j.jsxs)(c.Ss,{className:"status-group",children:[(0,j.jsxs)(c.Ss,{className:"status-item",onTap:function(){return de(e.key)},children:[(0,j.jsx)(c._V,{className:"status-icon-img",src:e.icon,mode:"aspectFit"}),(0,j.jsx)(c.EY,{className:"status-num",children:Z[e.key]}),(0,j.jsx)(c.EY,{className:"status-label",children:e.label})]}),s<2&&(0,j.jsx)(c.Ss,{className:"status-divider"})]},e.key)})})]})]}),(0,j.jsxs)(c.Ss,{className:"mt-20",children:[(0,j.jsx)(c.EY,{className:"section-title",children:"\u5e38\u7528\u529f\u80fd"}),(0,j.jsx)(c.Ss,{className:"menu-grid",children:b.map(function(e,s){return(0,j.jsxs)(c.Ss,{className:"menu-card dashed-card",onTap:function(){return ue(e.path,e.label)},children:[(0,j.jsx)(c.Ss,{className:"star-badge"}),(0,j.jsx)(c._V,{className:"menu-icon-img",src:N[e.label],mode:"aspectFit"}),(0,j.jsx)(c.EY,{className:"menu-label",children:e.label})]},s)})})]}),(0,j.jsxs)(c.Ss,{className:"enterprise-section dashed-card mt-20",children:[(0,j.jsx)(c.Ss,{className:"star-badge"}),(0,j.jsxs)(c.Ss,{className:"flex-between",children:[(0,j.jsxs)(c.Ss,{className:"flex-column",children:[(0,j.jsxs)(c.Ss,{className:"flex-center",children:[(0,j.jsx)(c._V,{className:"enterprise-icon",src:(0,v.uq)("/icon/\u4f01\u4e1a\u6279\u91cf\u5b9a\u5236.png"),mode:"aspectFit"}),(0,j.jsx)(c.EY,{className:"enterprise-title",children:"\u4f01\u4e1a\u6279\u91cf\u5b9a\u5236"})]}),(0,j.jsx)(c.EY,{className:"enterprise-desc",children:"\u5e74\u4f1a\u793c\u54c1\u3001\u5165\u804c\u7eaa\u5ff5\u3001\u56e2\u5efa\u4f34\u624b\u793c"})]}),(0,j.jsx)(c.Ss,{className:"btn-gradient enterprise-btn",children:(0,j.jsx)(c.EY,{children:"\u7acb\u5373\u54a8\u8be2"})})]})]}),(0,j.jsx)(c.Ss,{style:{height:"40px"}}),P&&(0,j.jsx)(c.Ss,{className:"modal-overlay",children:(0,j.jsxs)(c.Ss,{className:"login-card dashed-card",children:[(0,j.jsx)(c.Ss,{className:"star-badge"}),(0,j.jsx)(c.EY,{className:"login-title",children:"\u767b\u5f55\u667a\u7ed8\u5fae\u523b"}),"entry"===L?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(c.EY,{className:"login-desc",children:"\u767b\u5f55\u540e\u540c\u6b65\u60a8\u7684\u8bbe\u8ba1\u6e05\u5355\u548c\u8ba2\u5355"}),(0,j.jsxs)(c.Ss,{className:"login-actions",children:[(0,j.jsx)(c.Ss,{className:"btn-outline",onTap:ie,children:(0,j.jsx)(c.EY,{children:"\u53d6\u6d88"})}),(0,j.jsx)(c.Ss,{className:"btn-gradient",onTap:ce,children:(0,j.jsx)(c.EY,{children:"\u5fae\u4fe1\u767b\u5f55"})})]})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(c.EY,{className:"login-desc",children:"\u8bf7\u8bbe\u7f6e\u60a8\u7684\u5934\u50cf\u548c\u6635\u79f0"}),(0,j.jsx)(c.$n,{className:"avatar-btn",openType:"chooseAvatar",onChooseAvatar:oe,children:R?(0,j.jsx)(c._V,{className:"avatar-img",src:R,mode:"aspectFill"}):(0,j.jsx)(c._V,{className:"avatar-placeholder-img",src:(0,v.uq)("/icon/\u4e2a\u4eba.png"),mode:"aspectFit"})}),(0,j.jsx)(c.pd,{type:"nickname",className:"nickname-input",placeholder:"\u8bf7\u8f93\u5165\u6635\u79f0",value:B,onInput:function(e){return H(e.detail.value)}}),(0,j.jsxs)(c.Ss,{className:"login-actions",children:[(0,j.jsx)(c.Ss,{className:"btn-outline",onTap:ie,children:(0,j.jsx)(c.EY,{children:"\u53d6\u6d88"})}),(0,j.jsx)(c.Ss,{className:"btn-gradient",onTap:le,children:(0,j.jsx)(c.EY,{children:"\u4fdd\u5b58"})})]})]})]})})]})]})}var w={navigationStyle:"custom",enablePageMeta:!0,navigationBarTitleText:"\u4e2a\u4eba\u4e2d\u5fc3"};Page((0,n.createPageConfig)(T,"pages/profile/index",{root:{cn:[]}},w||{}))}},function(e){var s=function(s){return e(e.s=s)};e.O(0,[907,96,76],function(){return s(2579)});e.O()}]); \ No newline at end of file diff --git a/dist/pages/service/index.js b/dist/pages/service/index.js index 1780a61..fdd533d 100644 --- a/dist/pages/service/index.js +++ b/dist/pages/service/index.js @@ -1 +1 @@ -"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[248],{5942:function(s,e,a){var c=a(7842),n=a(118),t=a(758),i=a.n(t),r=a(9703),l=a(9201),d=a(5414),m=a(9674),o=a(4848),x=[{q:"\u5b9a\u5236\u5468\u671f\u9700\u8981\u591a\u4e45\uff1f",a:"\u901a\u5e38\u4e0b\u5355\u540e3-5\u4e2a\u5de5\u4f5c\u65e5\u5185\u53d1\u8d27\uff0c\u6279\u91cf\u8ba2\u5355\uff0850\u4ef6\u4ee5\u4e0a\uff09\u53ef\u80fd\u9700\u89817-10\u4e2a\u5de5\u4f5c\u65e5\u3002"},{q:"\u53ef\u4ee5\u4fee\u6539\u8bbe\u8ba1\u7a3f\u5417\uff1f",a:"\u751f\u4ea7\u524d\u53ef\u968f\u65f6\u5728\u8bbe\u8ba1\u5de5\u4f5c\u53f0\u4fee\u6539\u3002\u786e\u8ba4\u4e0b\u5355\u540e\u8fdb\u5165\u6392\u961f\u751f\u4ea7\u9636\u6bb5\uff0c\u4e0d\u53ef\u518d\u4fee\u6539\u3002"},{q:"\u652f\u6301\u9000\u6b3e/\u552e\u540e\u5417\uff1f",a:"\u975e\u8d28\u91cf\u95ee\u9898\u5b9a\u5236\u5546\u54c1\u4e0d\u652f\u63017\u5929\u65e0\u7406\u7531\u9000\u6b3e\u3002\u5982\u6536\u5230\u5546\u54c1\u6709\u7834\u635f\u6216\u96d5\u523b\u7f3a\u9677\uff0c\u8bf7\u5728\u7b7e\u653648\u5c0f\u65f6\u5185\u8054\u7cfb\u5ba2\u670d\u5904\u7406\u3002"},{q:"\u53ef\u4ee5\u5f00\u53d1\u7968\u5417\uff1f",a:"\u652f\u6301\u5f00\u5177\u589e\u503c\u7a0e\u666e\u901a\u53d1\u7968\u3002\u8bf7\u5728\u4e0b\u5355\u65f6\u586b\u5199\u53d1\u7968\u4fe1\u606f\uff0c\u6216\u8054\u7cfb\u5ba2\u670d\u8865\u5f00\u3002"}];function h(){var s=(0,r.wR)(),e=(s.theme,s.resolvedTheme),a=(0,l.c)();return(0,d.l)(e),(0,o.jsxs)(n.Ss,{className:"theme-".concat(e),style:{minHeight:"100vh"},children:[(0,o.jsx)(m.A,{}),(0,o.jsxs)(n.Ss,{className:"service-page",children:[(0,o.jsxs)(n.Ss,{className:"page-header dashed-card mt-20",style:{marginTop:"".concat(a.headerPaddingTop,"px")},children:[(0,o.jsx)(n.Ss,{className:"star-badge"}),(0,o.jsx)(n.EY,{className:"page-title",children:"\u8054\u7cfb\u5ba2\u670d"})]}),(0,o.jsxs)(n.Ss,{className:"service-hero dashed-card mt-20",children:[(0,o.jsx)(n.Ss,{className:"star-badge"}),(0,o.jsx)(n._V,{className:"service-hero-icon",src:"/icon/\u7535\u8bdd.png",mode:"aspectFit"}),(0,o.jsx)(n.EY,{className:"service-title",children:"\u667a\u7ed8\u5fae\u523b\u5ba2\u670d\u4e2d\u5fc3"}),(0,o.jsx)(n.EY,{className:"service-desc",children:"\u5de5\u4f5c\u65e5 09:00 - 18:00 \u5728\u7ebf\u4e3a\u60a8\u670d\u52a1"}),(0,o.jsx)(n.Ss,{className:"btn-gradient service-btn",onTap:function(){return i().showToast({title:"\u8df3\u8f6c\u5ba2\u670d\u4f1a\u8bdd",icon:"none"})},children:(0,o.jsx)(n.EY,{children:"\u53d1\u8d77\u54a8\u8be2"})})]}),(0,o.jsxs)(n.Ss,{className:"mt-20",children:[(0,o.jsx)(n.EY,{className:"section-title",children:"\u8054\u7cfb\u65b9\u5f0f"}),(0,o.jsxs)(n.Ss,{className:"contact-list",children:[(0,o.jsxs)(n.Ss,{className:"contact-item dashed-card",children:[(0,o.jsx)(n.Ss,{className:"star-badge"}),(0,o.jsx)(n._V,{className:"contact-icon-img",src:"/icon/\u7535\u8bdd.png",mode:"aspectFit"}),(0,o.jsxs)(n.Ss,{className:"contact-info",children:[(0,o.jsx)(n.EY,{className:"contact-label",children:"\u5ba2\u670d\u7535\u8bdd"}),(0,o.jsx)(n.EY,{className:"contact-value",children:"400-XXX-XXXX"})]})]}),(0,o.jsxs)(n.Ss,{className:"contact-item dashed-card",onTap:function(){return i().setClipboardData({data:"smart_engraving"})},children:[(0,o.jsx)(n.Ss,{className:"star-badge"}),(0,o.jsx)(n._V,{className:"contact-icon-img",src:"/icon/\u8bcd\u4e91\u751f\u6210.png",mode:"aspectFit"}),(0,o.jsxs)(n.Ss,{className:"contact-info",children:[(0,o.jsx)(n.EY,{className:"contact-label",children:"\u5ba2\u670d\u5fae\u4fe1"}),(0,o.jsx)(n.EY,{className:"contact-value",children:"smart_engraving\uff08\u70b9\u51fb\u590d\u5236\uff09"})]})]}),(0,o.jsxs)(n.Ss,{className:"contact-item dashed-card",children:[(0,o.jsx)(n.Ss,{className:"star-badge"}),(0,o.jsx)(n._V,{className:"contact-icon-img",src:"/icon/\u4f7f\u7528\u5e2e\u52a9.png",mode:"aspectFit"}),(0,o.jsxs)(n.Ss,{className:"contact-info",children:[(0,o.jsx)(n.EY,{className:"contact-label",children:"\u5546\u52a1\u90ae\u7bb1"}),(0,o.jsx)(n.EY,{className:"contact-value",children:"biz@smart-engraving.com"})]})]})]})]}),(0,o.jsxs)(n.Ss,{className:"mt-20",children:[(0,o.jsx)(n.EY,{className:"section-title",children:"\u5e38\u89c1\u95ee\u9898"}),x.map(function(s,e){return(0,o.jsxs)(n.Ss,{className:"faq-card dashed-card",children:[(0,o.jsx)(n.Ss,{className:"star-badge"}),(0,o.jsxs)(n.EY,{className:"faq-q",children:["Q: ",s.q]}),(0,o.jsxs)(n.EY,{className:"faq-a",children:["A: ",s.a]})]},e)})]}),(0,o.jsxs)(n.Ss,{className:"enterprise-service dashed-card mt-20 mb-20",children:[(0,o.jsx)(n.Ss,{className:"star-badge"}),(0,o.jsxs)(n.Ss,{className:"flex-center",children:[(0,o.jsx)(n._V,{className:"enterprise-icon",src:"/icon/\u4f01\u4e1a\u6279\u91cf\u5b9a\u5236.png",mode:"aspectFit"}),(0,o.jsx)(n.EY,{className:"enterprise-title",children:"\u4f01\u4e1a\u4e13\u5c5e\u5ba2\u6237\u7ecf\u7406"})]}),(0,o.jsx)(n.EY,{className:"enterprise-desc",children:"\u6279\u91cf\u8ba2\u5355\uff0850\u4ef6\u4ee5\u4e0a\uff09\u4eab\u4e13\u5c5e\u62a5\u4ef7\u3001\u4f18\u5148\u6392\u4ea7\u3001\u4e13\u4eba\u5bf9\u63a5"}),(0,o.jsx)(n.Ss,{className:"btn-outline enterprise-btn",children:(0,o.jsx)(n.EY,{children:"\u9884\u7ea6\u4f01\u4e1a\u54a8\u8be2"})})]}),(0,o.jsx)(n.Ss,{style:{height:"40px"}})]})]})}var j={navigationStyle:"custom",enablePageMeta:!0,navigationBarTitleText:"\u5ba2\u670d\u4e2d\u5fc3"};Page((0,c.createPageConfig)(h,"pages/service/index",{root:{cn:[]}},j||{}))}},function(s){var e=function(e){return s(s.s=e)};s.O(0,[907,96,76],function(){return e(5942)});s.O()}]); \ No newline at end of file +"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[248],{5942:function(s,e,a){var c=a(7842),n=a(118),t=a(758),i=a.n(t),r=a(9703),l=a(9201),d=a(5414),m=a(9674),o=a(8199),x=a(4848),h=[{q:"\u5b9a\u5236\u5468\u671f\u9700\u8981\u591a\u4e45\uff1f",a:"\u901a\u5e38\u4e0b\u5355\u540e3-5\u4e2a\u5de5\u4f5c\u65e5\u5185\u53d1\u8d27\uff0c\u6279\u91cf\u8ba2\u5355\uff0850\u4ef6\u4ee5\u4e0a\uff09\u53ef\u80fd\u9700\u89817-10\u4e2a\u5de5\u4f5c\u65e5\u3002"},{q:"\u53ef\u4ee5\u4fee\u6539\u8bbe\u8ba1\u7a3f\u5417\uff1f",a:"\u751f\u4ea7\u524d\u53ef\u968f\u65f6\u5728\u8bbe\u8ba1\u5de5\u4f5c\u53f0\u4fee\u6539\u3002\u786e\u8ba4\u4e0b\u5355\u540e\u8fdb\u5165\u6392\u961f\u751f\u4ea7\u9636\u6bb5\uff0c\u4e0d\u53ef\u518d\u4fee\u6539\u3002"},{q:"\u652f\u6301\u9000\u6b3e/\u552e\u540e\u5417\uff1f",a:"\u975e\u8d28\u91cf\u95ee\u9898\u5b9a\u5236\u5546\u54c1\u4e0d\u652f\u63017\u5929\u65e0\u7406\u7531\u9000\u6b3e\u3002\u5982\u6536\u5230\u5546\u54c1\u6709\u7834\u635f\u6216\u96d5\u523b\u7f3a\u9677\uff0c\u8bf7\u5728\u7b7e\u653648\u5c0f\u65f6\u5185\u8054\u7cfb\u5ba2\u670d\u5904\u7406\u3002"},{q:"\u53ef\u4ee5\u5f00\u53d1\u7968\u5417\uff1f",a:"\u652f\u6301\u5f00\u5177\u589e\u503c\u7a0e\u666e\u901a\u53d1\u7968\u3002\u8bf7\u5728\u4e0b\u5355\u65f6\u586b\u5199\u53d1\u7968\u4fe1\u606f\uff0c\u6216\u8054\u7cfb\u5ba2\u670d\u8865\u5f00\u3002"}];function j(){var s=(0,r.wR)(),e=(s.theme,s.resolvedTheme),a=(0,l.c)();return(0,d.l)(e),(0,x.jsxs)(n.Ss,{className:"theme-".concat(e),style:{minHeight:"100vh"},children:[(0,x.jsx)(m.A,{}),(0,x.jsxs)(n.Ss,{className:"service-page",children:[(0,x.jsxs)(n.Ss,{className:"page-header dashed-card mt-20",style:{marginTop:"".concat(a.headerPaddingTop,"px")},children:[(0,x.jsx)(n.Ss,{className:"star-badge"}),(0,x.jsx)(n.EY,{className:"page-title",children:"\u8054\u7cfb\u5ba2\u670d"})]}),(0,x.jsxs)(n.Ss,{className:"service-hero dashed-card mt-20",children:[(0,x.jsx)(n.Ss,{className:"star-badge"}),(0,x.jsx)(n._V,{className:"service-hero-icon",src:(0,o.uq)("/icon/\u7535\u8bdd.png"),mode:"aspectFit"}),(0,x.jsx)(n.EY,{className:"service-title",children:"\u667a\u7ed8\u5fae\u523b\u5ba2\u670d\u4e2d\u5fc3"}),(0,x.jsx)(n.EY,{className:"service-desc",children:"\u5de5\u4f5c\u65e5 09:00 - 18:00 \u5728\u7ebf\u4e3a\u60a8\u670d\u52a1"}),(0,x.jsx)(n.Ss,{className:"btn-gradient service-btn",onTap:function(){return i().showToast({title:"\u8df3\u8f6c\u5ba2\u670d\u4f1a\u8bdd",icon:"none"})},children:(0,x.jsx)(n.EY,{children:"\u53d1\u8d77\u54a8\u8be2"})})]}),(0,x.jsxs)(n.Ss,{className:"mt-20",children:[(0,x.jsx)(n.EY,{className:"section-title",children:"\u8054\u7cfb\u65b9\u5f0f"}),(0,x.jsxs)(n.Ss,{className:"contact-list",children:[(0,x.jsxs)(n.Ss,{className:"contact-item dashed-card",children:[(0,x.jsx)(n.Ss,{className:"star-badge"}),(0,x.jsx)(n._V,{className:"contact-icon-img",src:(0,o.uq)("/icon/\u7535\u8bdd.png"),mode:"aspectFit"}),(0,x.jsxs)(n.Ss,{className:"contact-info",children:[(0,x.jsx)(n.EY,{className:"contact-label",children:"\u5ba2\u670d\u7535\u8bdd"}),(0,x.jsx)(n.EY,{className:"contact-value",children:"400-XXX-XXXX"})]})]}),(0,x.jsxs)(n.Ss,{className:"contact-item dashed-card",onTap:function(){return i().setClipboardData({data:"smart_engraving"})},children:[(0,x.jsx)(n.Ss,{className:"star-badge"}),(0,x.jsx)(n._V,{className:"contact-icon-img",src:(0,o.uq)("/icon/\u8bcd\u4e91\u751f\u6210.png"),mode:"aspectFit"}),(0,x.jsxs)(n.Ss,{className:"contact-info",children:[(0,x.jsx)(n.EY,{className:"contact-label",children:"\u5ba2\u670d\u5fae\u4fe1"}),(0,x.jsx)(n.EY,{className:"contact-value",children:"smart_engraving\uff08\u70b9\u51fb\u590d\u5236\uff09"})]})]}),(0,x.jsxs)(n.Ss,{className:"contact-item dashed-card",children:[(0,x.jsx)(n.Ss,{className:"star-badge"}),(0,x.jsx)(n._V,{className:"contact-icon-img",src:(0,o.uq)("/icon/\u4f7f\u7528\u5e2e\u52a9.png"),mode:"aspectFit"}),(0,x.jsxs)(n.Ss,{className:"contact-info",children:[(0,x.jsx)(n.EY,{className:"contact-label",children:"\u5546\u52a1\u90ae\u7bb1"}),(0,x.jsx)(n.EY,{className:"contact-value",children:"biz@smart-engraving.com"})]})]})]})]}),(0,x.jsxs)(n.Ss,{className:"mt-20",children:[(0,x.jsx)(n.EY,{className:"section-title",children:"\u5e38\u89c1\u95ee\u9898"}),h.map(function(s,e){return(0,x.jsxs)(n.Ss,{className:"faq-card dashed-card",children:[(0,x.jsx)(n.Ss,{className:"star-badge"}),(0,x.jsxs)(n.EY,{className:"faq-q",children:["Q: ",s.q]}),(0,x.jsxs)(n.EY,{className:"faq-a",children:["A: ",s.a]})]},e)})]}),(0,x.jsxs)(n.Ss,{className:"enterprise-service dashed-card mt-20 mb-20",children:[(0,x.jsx)(n.Ss,{className:"star-badge"}),(0,x.jsxs)(n.Ss,{className:"flex-center",children:[(0,x.jsx)(n._V,{className:"enterprise-icon",src:(0,o.uq)("/icon/\u4f01\u4e1a\u6279\u91cf\u5b9a\u5236.png"),mode:"aspectFit"}),(0,x.jsx)(n.EY,{className:"enterprise-title",children:"\u4f01\u4e1a\u4e13\u5c5e\u5ba2\u6237\u7ecf\u7406"})]}),(0,x.jsx)(n.EY,{className:"enterprise-desc",children:"\u6279\u91cf\u8ba2\u5355\uff0850\u4ef6\u4ee5\u4e0a\uff09\u4eab\u4e13\u5c5e\u62a5\u4ef7\u3001\u4f18\u5148\u6392\u4ea7\u3001\u4e13\u4eba\u5bf9\u63a5"}),(0,x.jsx)(n.Ss,{className:"btn-outline enterprise-btn",children:(0,x.jsx)(n.EY,{children:"\u9884\u7ea6\u4f01\u4e1a\u54a8\u8be2"})})]}),(0,x.jsx)(n.Ss,{style:{height:"40px"}})]})]})}var N={navigationStyle:"custom",enablePageMeta:!0,navigationBarTitleText:"\u5ba2\u670d\u4e2d\u5fc3"};Page((0,c.createPageConfig)(j,"pages/service/index",{root:{cn:[]}},N||{}))}},function(s){var e=function(e){return s(s.s=e)};s.O(0,[907,96,76],function(){return e(5942)});s.O()}]); \ No newline at end of file diff --git a/dist/pages/settings/index.js b/dist/pages/settings/index.js index f13f3d4..1f6000a 100644 --- a/dist/pages/settings/index.js +++ b/dist/pages/settings/index.js @@ -1 +1 @@ -"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[486],{7904:function(e,s,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(9703),m=a(9201),h=a(5414),u=a(9674),x=a(8594),p=a(4848),g=[{label:"\u6d45\u8272\u6a21\u5f0f",value:"light"},{label:"\u6df1\u8272\u6a21\u5f0f",value:"dark"},{label:"\u8ddf\u968f\u7cfb\u7edf",value:"auto"}],j=[{label:"\u4e2a\u4eba\u4fe1\u606f",icon:"/icon/\u4e2a\u4eba.png",action:function(e){return e.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 N(){var e=(0,d.wR)(),s=e.theme,a=e.setTheme,n=e.resolvedTheme,l=(0,m.c)();(0,h.l)(n);var N=(0,o.useState)({}),v=(0,c.A)(N,2),f=v[0],S=v[1],b=(0,o.useState)(""),T=(0,c.A)(b,2),w=T[0],E=T[1],Y=(0,o.useState)(""),k=(0,c.A)(Y,2),A=k[0],y=k[1],F=(0,o.useState)(!1),U=(0,c.A)(F,2),V=U[0],_=U[1],P=function(){var e=(0,x.ug)()||{};S(e),E(e.nickName||""),y(e.avatarUrl||"")};(0,o.useEffect)(function(){P()},[]);var B=function(){(0,x.iA)((0,t.A)((0,t.A)({},f),{},{nickName:w,avatarUrl:A})),r().showToast({title:"\u4fee\u6539\u6210\u529f",icon:"success"}),_(!1),P()},C=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(e){e.confirm&&((0,x.Hf)(),r().switchTab({url:"/pages/index/index"}))}})},D=function(e){y(e.detail.avatarUrl||"")};return(0,p.jsxs)(i.Ss,{className:"theme-".concat(n),style:{minHeight:"100vh"},children:[(0,p.jsx)(u.A,{}),(0,p.jsx)(i.Ss,{className:"settings-page",children:(0,p.jsxs)(i.Ss,{className:"settings-area",children:[(0,p.jsx)(i.Ss,{className:"page-header dashed-card mt-20",style:{marginTop:"".concat(l.headerPaddingTop,"px")},children:(0,p.jsxs)(i.Ss,{className:"flex-between",style:{width:"100%"},children:[(0,p.jsx)(i.EY,{className:"back-btn",onTap:function(){return r().navigateBack()},children:"\u2190"}),(0,p.jsx)(i.EY,{className:"page-title",children:"\u8bbe\u7f6e"}),(0,p.jsx)(i.Ss,{style:{width:"60px"}})]})}),(0,p.jsx)(i.Ss,{className:"settings-user dashed-card mt-20",children:(0,p.jsxs)(i.Ss,{className:"flex-between",onTap:function(){return _(!0)},children:[(0,p.jsxs)(i.Ss,{className:"flex-center",children:[f.avatarUrl?(0,p.jsx)(i._V,{className:"settings-avatar",src:f.avatarUrl,mode:"aspectFill"}):(0,p.jsx)(i.Ss,{className:"settings-avatar-placeholder",children:(0,p.jsx)(i._V,{className:"settings-avatar-icon",src:"/icon/\u4e2a\u4eba.png",mode:"aspectFit"})}),(0,p.jsxs)(i.Ss,{style:{marginLeft:"20px"},children:[(0,p.jsx)(i.EY,{className:"settings-name",children:f.nickName||"\u672a\u767b\u5f55"}),(0,p.jsxs)(i.EY,{className:"settings-id",children:["ID: ",f.openid?f.openid.slice(-8):"---"]})]})]}),(0,p.jsx)(i.EY,{className:"arrow",children:"\u203a"})]})}),(0,p.jsxs)(i.Ss,{className:"settings-section dashed-card mt-20",children:[(0,p.jsx)(i.EY,{className:"section-label",children:"\u5916\u89c2"}),(0,p.jsx)(i.Ss,{className:"theme-options",children:g.map(function(e){return(0,p.jsxs)(i.Ss,{className:"theme-option ".concat(s===e.value?"active":""),onTap:function(){return a(e.value)},children:[(0,p.jsx)(i.EY,{className:"theme-option-text",children:e.label}),s===e.value&&(0,p.jsx)(i.Ss,{className:"theme-check"})]},e.value)})}),"auto"===s&&(0,p.jsxs)(i.EY,{className:"theme-hint",children:["\u5f53\u524d\u8ddf\u968f\u7cfb\u7edf\uff1a","dark"===n?"\u6df1\u8272\u6a21\u5f0f":"\u6d45\u8272\u6a21\u5f0f"]})]}),(0,p.jsx)(i.Ss,{className:"settings-list dashed-card mt-20",children:j.map(function(e,s){return(0,p.jsxs)(i.Ss,{className:"settings-item ".concat(s - + 还没有收货地址 点击下方按钮添加新地址 diff --git a/src/pages/designList/index.tsx b/src/pages/designList/index.tsx index d4a4949..5193c75 100644 --- a/src/pages/designList/index.tsx +++ b/src/pages/designList/index.tsx @@ -210,7 +210,7 @@ export default function DesignListPage() { {filtered.length === 0 && ( - + 还没有设计清单 去首页逛逛,找到喜欢的定制品 Taro.switchTab({ url: '/pages/index/index' })}> diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index 6b15f0e..f7655fa 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -62,7 +62,7 @@ export default function Index() { - + @@ -144,7 +144,7 @@ export default function Index() { {filteredCategories.length === 0 && ( - + 未找到匹配的品类 尝试搜索“笔记本”、“杯垫”等 diff --git a/src/pages/orderDetail/index.tsx b/src/pages/orderDetail/index.tsx index 426e450..7bf5e62 100644 --- a/src/pages/orderDetail/index.tsx +++ b/src/pages/orderDetail/index.tsx @@ -100,7 +100,7 @@ export default function OrderDetailPage() { - + 物流信息 单号: SF1234567890 @@ -161,7 +161,7 @@ export default function OrderDetailPage() { - + 收货地址 setShowAddrPicker(true)}> diff --git a/src/pages/orders/index.tsx b/src/pages/orders/index.tsx index ddad7dc..ac81298 100644 --- a/src/pages/orders/index.tsx +++ b/src/pages/orders/index.tsx @@ -174,7 +174,7 @@ export default function OrdersPage() { {filteredOrders.length === 0 && ( - + 暂无订单 去首页开始定制吧 Taro.switchTab({ url: '/pages/index/index' })}> diff --git a/src/pages/profile/index.tsx b/src/pages/profile/index.tsx index 43e16fd..1f13d30 100644 --- a/src/pages/profile/index.tsx +++ b/src/pages/profile/index.tsx @@ -9,22 +9,23 @@ import { useStatusBar } from '../../hooks/useStatusBar' import ThemedPageMeta from '../../components/ThemedPageMeta' import { login, getMe, updateProfile, getToken } from '../../utils/api' import { safeHideLoading } from '../../utils/request' +import { assetUrl } from '../../utils/asset' const ICON_MAP: Record = { - '我的设计': '/icon/调色盘.png', - '词云生成': '/icon/词云生成.png', - '收货地址': '/icon/地址.png', - '联系客服': '/icon/电话.png', - '使用帮助': '/icon/使用帮助.png', - '设置': '/icon/设置.png' + '我的设计': assetUrl('/icon/调色盘.png'), + '词云生成': assetUrl('/icon/词云生成.png'), + '收货地址': assetUrl('/icon/地址.png'), + '联系客服': assetUrl('/icon/电话.png'), + '使用帮助': assetUrl('/icon/使用帮助.png'), + '设置': assetUrl('/icon/设置.png') } const STATUS_MAP = [ - { key: 'toDesign', label: '待设计', icon: '/icon/三角尺.png' }, - { key: 'pending', label: '待付款', icon: '/icon/四角星.png' }, - { key: 'paid', label: '待发货', icon: '/icon/包裹.png' }, - { key: 'shipping', label: '待收货', icon: '/icon/杯子.png' }, - { key: 'done', label: '已完成', icon: '/icon/书本.png' } + { key: 'toDesign', label: '待设计', icon: assetUrl('/icon/三角尺.png') }, + { key: 'pending', label: '待付款', icon: assetUrl('/icon/四角星.png') }, + { key: 'paid', label: '待发货', icon: assetUrl('/icon/包裹.png') }, + { key: 'shipping', label: '待收货', icon: assetUrl('/icon/杯子.png') }, + { key: 'done', label: '已完成', icon: assetUrl('/icon/书本.png') } ] const MENU_ITEMS = [ @@ -288,7 +289,7 @@ export default function ProfilePage() { ) : ( - + )} @@ -351,7 +352,7 @@ export default function ProfilePage() { - + 企业批量定制 年会礼品、入职纪念、团建伴手礼 @@ -394,7 +395,7 @@ export default function ProfilePage() { {loginAvatarUrl ? ( ) : ( - + )} - + 智绘微刻客服中心 工作日 09:00 - 18:00 在线为您服务 Taro.showToast({ title: '跳转客服会话', icon: 'none' })}> @@ -44,7 +45,7 @@ export default function ServicePage() { - + 客服电话 400-XXX-XXXX @@ -52,7 +53,7 @@ export default function ServicePage() { Taro.setClipboardData({ data: 'smart_engraving' })}> - + 客服微信 smart_engraving(点击复制) @@ -60,7 +61,7 @@ export default function ServicePage() { - + 商务邮箱 biz@smart-engraving.com @@ -85,7 +86,7 @@ export default function ServicePage() { - + 企业专属客户经理 批量订单(50件以上)享专属报价、优先排产、专人对接 diff --git a/src/pages/settings/index.tsx b/src/pages/settings/index.tsx index 81691b6..8db1bb5 100644 --- a/src/pages/settings/index.tsx +++ b/src/pages/settings/index.tsx @@ -7,6 +7,7 @@ import { useSafeArea } from '../../hooks/useSafeArea' import { useStatusBar } from '../../hooks/useStatusBar' import ThemedPageMeta from '../../components/ThemedPageMeta' import { getUserInfo, setUserInfo, clearUserInfo, getAddressList, getDefaultAddress, type AddressItem } from '../../utils/store' +import { assetUrl } from '../../utils/asset' const THEME_OPTIONS: { label: string; value: 'light' | 'dark' | 'auto' }[] = [ { label: '浅色模式', value: 'light' }, @@ -15,10 +16,10 @@ const THEME_OPTIONS: { label: string; value: 'light' | 'dark' | 'auto' }[] = [ ] const MENU = [ - { label: '个人信息', icon: '/icon/个人.png', action: (s: any) => s.setShowEdit(true) }, - { label: '账号管理', icon: '/icon/账号管理.png', action: () => Taro.navigateTo({ url: '/pages/userDatabase/index' }) }, - { label: '定制协议', icon: '/icon/定制协议.png', action: () => Taro.navigateTo({ url: '/pages/agreement/index' }) }, - { label: '关于我们', icon: '/icon/关于我们.png', action: () => Taro.showToast({ title: '智绘微刻 v1.0', icon: 'none' }) } + { label: '个人信息', icon: assetUrl('/icon/个人.png'), action: (s: any) => s.setShowEdit(true) }, + { label: '账号管理', icon: assetUrl('/icon/账号管理.png'), action: () => Taro.navigateTo({ url: '/pages/userDatabase/index' }) }, + { label: '定制协议', icon: assetUrl('/icon/定制协议.png'), action: () => Taro.navigateTo({ url: '/pages/agreement/index' }) }, + { label: '关于我们', icon: assetUrl('/icon/关于我们.png'), action: () => Taro.showToast({ title: '智绘微刻 v1.0', icon: 'none' }) } ] export default function SettingsPage() { @@ -87,7 +88,7 @@ export default function SettingsPage() { ) : ( - + )} @@ -150,7 +151,7 @@ export default function SettingsPage() { {editAvatar ? ( ) : ( - + )}