商品浏览页构建上传1.1.0版本
This commit is contained in:
Vendored
+1
-277
@@ -1,277 +1 @@
|
||||
"use strict";
|
||||
(wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["pages/designList/index"],{
|
||||
|
||||
/***/ "./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/designList/index!./src/pages/designList/index.tsx":
|
||||
/*!**************************************************************************************************************************!*\
|
||||
!*** ./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/designList/index!./src/pages/designList/index.tsx ***!
|
||||
\**************************************************************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": function() { return /* binding */ DesignListPage; }
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var F_weixin_wordc_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
|
||||
/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
|
||||
/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tarojs/taro */ "./node_modules/@tarojs/taro/index.js");
|
||||
/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "./node_modules/react/cjs/react.production.min.js");
|
||||
/* harmony import */ var _utils_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/store */ "./src/utils/store.ts");
|
||||
/* harmony import */ var _utils_productConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/productConfig */ "./src/utils/productConfig.ts");
|
||||
/* harmony import */ var _components_ThemeToggle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../components/ThemeToggle */ "./src/components/ThemeToggle/index.tsx");
|
||||
/* harmony import */ var _context_ThemeContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../context/ThemeContext */ "./src/context/ThemeContext.tsx");
|
||||
/* harmony import */ var _components_LoginGuard__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/LoginGuard */ "./src/components/LoginGuard/index.tsx");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/cjs/react-jsx-runtime.production.min.js");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var STATUS_TABS = [{
|
||||
code: 'all',
|
||||
label: '全部'
|
||||
}, {
|
||||
code: 'toDesign',
|
||||
label: '待设计'
|
||||
}, {
|
||||
code: 'undesigned',
|
||||
label: '未设计'
|
||||
}, {
|
||||
code: 'designing',
|
||||
label: '设计中'
|
||||
}, {
|
||||
code: 'ordered',
|
||||
label: '已下单'
|
||||
}];
|
||||
var STATUS_STYLE = {
|
||||
undesigned: {
|
||||
label: '未设计',
|
||||
cls: 'badge-pink'
|
||||
},
|
||||
designing: {
|
||||
label: '设计中',
|
||||
cls: 'badge-blue'
|
||||
},
|
||||
ordered: {
|
||||
label: '已下单',
|
||||
cls: 'badge-green'
|
||||
}
|
||||
};
|
||||
function DesignListPage() {
|
||||
var _useThemeContext = (0,_context_ThemeContext__WEBPACK_IMPORTED_MODULE_5__.useThemeContext)(),
|
||||
theme = _useThemeContext.theme;
|
||||
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)('all'),
|
||||
_useState2 = (0,F_weixin_wordc_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_useState, 2),
|
||||
activeTab = _useState2[0],
|
||||
setActiveTab = _useState2[1];
|
||||
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]),
|
||||
_useState4 = (0,F_weixin_wordc_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_useState3, 2),
|
||||
list = _useState4[0],
|
||||
setList = _useState4[1];
|
||||
var load = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
|
||||
setList((0,_utils_store__WEBPACK_IMPORTED_MODULE_2__.getDesignList)());
|
||||
}, []);
|
||||
|
||||
// 自动读取外部传入的筛选状态
|
||||
var init = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
|
||||
var filter = _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().getStorageSync('designList:filter');
|
||||
if (filter && STATUS_TABS.some(function (t) {
|
||||
return t.code === filter;
|
||||
})) {
|
||||
setActiveTab(filter);
|
||||
_tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().removeStorageSync('designList:filter');
|
||||
}
|
||||
load();
|
||||
}, [load]);
|
||||
|
||||
// 页面每次显示时刷新
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
||||
var page = _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().getCurrentInstance().page;
|
||||
if (page) {
|
||||
var orig = page.onShow;
|
||||
page.onShow = function () {
|
||||
init();
|
||||
if (orig) orig.apply(this);
|
||||
};
|
||||
}
|
||||
init();
|
||||
}, [init]);
|
||||
var filtered = activeTab === 'all' ? list : activeTab === 'toDesign' ? list.filter(function (d) {
|
||||
return d.status === 'undesigned' || d.status === 'designing';
|
||||
}) : list.filter(function (d) {
|
||||
return d.status === activeTab;
|
||||
});
|
||||
var goDesign = function goDesign(item) {
|
||||
if (item.status === 'ordered') {
|
||||
_tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().showToast({
|
||||
title: '该商品已下单,请查看订单',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
_tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().navigateTo({
|
||||
url: "/pages/diy/index?source=designList&designId=".concat(item.id)
|
||||
});
|
||||
};
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
className: "theme-".concat(theme),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_components_LoginGuard__WEBPACK_IMPORTED_MODULE_6__["default"], {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
className: "design-page",
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_components_ThemeToggle__WEBPACK_IMPORTED_MODULE_4__["default"], {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
className: "page-header dashed-card mt-20",
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
className: "star-badge"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
|
||||
className: "page-title",
|
||||
children: "\u6211\u7684\u8BBE\u8BA1\u6E05\u5355"
|
||||
})]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
className: "status-tabs",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.ScrollView, {
|
||||
className: "tabs-scroll",
|
||||
scrollX: true,
|
||||
children: STATUS_TABS.map(function (tab) {
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
className: "tab-item ".concat(activeTab === tab.code ? 'active' : ''),
|
||||
onTap: function onTap() {
|
||||
return setActiveTab(tab.code);
|
||||
},
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
|
||||
className: "tab-label",
|
||||
children: tab.label
|
||||
}), activeTab === tab.code && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
className: "tab-underline"
|
||||
})]
|
||||
}, tab.code);
|
||||
})
|
||||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.ScrollView, {
|
||||
className: "design-list",
|
||||
scrollY: true,
|
||||
children: [filtered.map(function (item) {
|
||||
var _item$productIcon;
|
||||
var style = STATUS_STYLE[item.status];
|
||||
var iconSrc = (_item$productIcon = item.productIcon) !== null && _item$productIcon !== void 0 && _item$productIcon.startsWith('/icon/') ? item.productIcon : _utils_productConfig__WEBPACK_IMPORTED_MODULE_3__.PRODUCT_ICON_MAP[item.productId] || '/icon/四角星.png';
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
className: "design-card dashed-card",
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
className: "star-badge"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
className: "design-body",
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Image, {
|
||||
className: "design-icon-img",
|
||||
src: iconSrc,
|
||||
mode: "aspectFit"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
className: "design-info",
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
className: "design-title-row",
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
|
||||
className: "design-name",
|
||||
children: item.productName
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
|
||||
className: "badge ".concat(style.cls),
|
||||
children: style.label
|
||||
})]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
|
||||
className: "design-meta",
|
||||
children: ["\u6570\u91CF: ", item.count, " \u4EF6 | \u5355\u4EF7: \xA5", item.unitPrice]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
|
||||
className: "design-total",
|
||||
children: ["\u5C0F\u8BA1: \xA5", (item.unitPrice * item.count).toFixed(2)]
|
||||
})]
|
||||
})]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
className: "design-actions",
|
||||
children: [item.status !== 'ordered' && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
className: "btn-gradient design-btn",
|
||||
onTap: function onTap() {
|
||||
return goDesign(item);
|
||||
},
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
|
||||
children: item.status === 'undesigned' ? '开始设计' : '继续设计'
|
||||
})
|
||||
}), item.status === 'ordered' && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
className: "btn-outline design-btn",
|
||||
onTap: function onTap() {
|
||||
return _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().switchTab({
|
||||
url: '/pages/orders/index'
|
||||
});
|
||||
},
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
|
||||
children: "\u67E5\u770B\u8BA2\u5355"
|
||||
})
|
||||
})]
|
||||
})]
|
||||
}, item.id);
|
||||
}), filtered.length === 0 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
className: "empty-state",
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Image, {
|
||||
className: "empty-icon-img",
|
||||
src: "/icon/\u8C03\u8272\u76D8.png",
|
||||
mode: "aspectFit"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
|
||||
className: "empty-text",
|
||||
children: "\u8FD8\u6CA1\u6709\u8BBE\u8BA1\u6E05\u5355"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
|
||||
className: "empty-sub",
|
||||
children: "\u53BB\u9996\u9875\u901B\u901B\uFF0C\u627E\u5230\u559C\u6B22\u7684\u5B9A\u5236\u54C1"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
className: "btn-gradient",
|
||||
onTap: function onTap() {
|
||||
return _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().switchTab({
|
||||
url: '/pages/index/index'
|
||||
});
|
||||
},
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
|
||||
children: "\u53BB\u901B\u901B"
|
||||
})
|
||||
})]
|
||||
})]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
style: {
|
||||
height: '40px'
|
||||
}
|
||||
})]
|
||||
})
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/pages/designList/index.tsx":
|
||||
/*!****************************************!*\
|
||||
!*** ./src/pages/designList/index.tsx ***!
|
||||
\****************************************/
|
||||
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
||||
|
||||
/* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tarojs/runtime */ "./node_modules/@tarojs/runtime/dist/runtime.esm.js");
|
||||
/* harmony import */ var _node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_designList_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !!../../../node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/designList/index!./index.tsx */ "./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/designList/index!./src/pages/designList/index.tsx");
|
||||
|
||||
|
||||
var config = {};
|
||||
|
||||
|
||||
var inst = Page((0,_tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__.createPageConfig)(_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_designList_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__["default"], 'pages/designList/index', {root:{cn:[]}}, config || {}))
|
||||
|
||||
|
||||
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_designList_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__["default"]);
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
},
|
||||
/******/ function(__webpack_require__) { // webpackRuntimeModules
|
||||
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
|
||||
/******/ __webpack_require__.O(0, ["taro","vendors","common"], function() { return __webpack_exec__("./src/pages/designList/index.tsx"); });
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O();
|
||||
/******/ }
|
||||
]);
|
||||
//# sourceMappingURL=index.js.map
|
||||
"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[319],{3512:function(e,s,n){var a=n(7842),t=n(5544),c=n(118),i=n(758),l=n.n(i),d=n(6540),r=n(8594),o=n(5234),u=n(1268),g=n(9703),m=n(7723),x=n(4848),h=[{code:"all",label:"\u5168\u90e8"},{code:"toDesign",label:"\u5f85\u8bbe\u8ba1"},{code:"undesigned",label:"\u672a\u8bbe\u8ba1"},{code:"designing",label:"\u8bbe\u8ba1\u4e2d"},{code:"ordered",label:"\u5df2\u4e0b\u5355"}],b={undesigned:{label:"\u672a\u8bbe\u8ba1",cls:"badge-pink"},designing:{label:"\u8bbe\u8ba1\u4e2d",cls:"badge-blue"},ordered:{label:"\u5df2\u4e0b\u5355",cls:"badge-green"}};function j(){var e=(0,g.wR)(),s=e.theme,n=(0,d.useState)("all"),a=(0,t.A)(n,2),i=a[0],j=a[1],p=(0,d.useState)([]),N=(0,t.A)(p,2),f=N[0],S=N[1],v=(0,d.useCallback)(function(){S((0,r.p_)())},[]),E=(0,d.useCallback)(function(){var e=l().getStorageSync("designList:filter");e&&h.some(function(s){return s.code===e})&&(j(e),l().removeStorageSync("designList:filter")),v()},[v]);(0,d.useEffect)(function(){var e=l().getCurrentInstance().page;if(e){var s=e.onShow;e.onShow=function(){E(),s&&s.apply(this)}}E()},[E]);var Y="all"===i?f:"toDesign"===i?f.filter(function(e){return"undesigned"===e.status||"designing"===e.status}):f.filter(function(e){return e.status===i}),w=function(e){"ordered"!==e.status?l().navigateTo({url:"/pages/diy/index?source=designList&designId=".concat(e.id)}):l().showToast({title:"\u8be5\u5546\u54c1\u5df2\u4e0b\u5355\uff0c\u8bf7\u67e5\u770b\u8ba2\u5355",icon:"none"})};return(0,x.jsx)(c.Ss,{className:"theme-".concat(s),children:(0,x.jsx)(m.A,{children:(0,x.jsxs)(c.Ss,{className:"design-page",children:[(0,x.jsx)(u.A,{}),(0,x.jsxs)(c.Ss,{className:"page-header dashed-card mt-20",children:[(0,x.jsx)(c.Ss,{className:"star-badge"}),(0,x.jsx)(c.EY,{className:"page-title",children:"\u6211\u7684\u8bbe\u8ba1\u6e05\u5355"})]}),(0,x.jsx)(c.Ss,{className:"status-tabs",children:(0,x.jsx)(c.BM,{className:"tabs-scroll",scrollX:!0,children:h.map(function(e){return(0,x.jsxs)(c.Ss,{className:"tab-item ".concat(i===e.code?"active":""),onTap:function(){return j(e.code)},children:[(0,x.jsx)(c.EY,{className:"tab-label",children:e.label}),i===e.code&&(0,x.jsx)(c.Ss,{className:"tab-underline"})]},e.code)})})}),(0,x.jsxs)(c.BM,{className:"design-list",scrollY:!0,children:[Y.map(function(e){var s,n=b[e.status],a=null!==(s=e.productIcon)&&void 0!==s&&s.startsWith("/icon/")?e.productIcon:o.rj[e.productId]||"/icon/\u56db\u89d2\u661f.png";return(0,x.jsxs)(c.Ss,{className:"design-card dashed-card",children:[(0,x.jsx)(c.Ss,{className:"star-badge"}),(0,x.jsxs)(c.Ss,{className:"design-body",children:[(0,x.jsx)(c._V,{className:"design-icon-img",src:a,mode:"aspectFit"}),(0,x.jsxs)(c.Ss,{className:"design-info",children:[(0,x.jsxs)(c.Ss,{className:"design-title-row",children:[(0,x.jsx)(c.EY,{className:"design-name",children:e.productName}),(0,x.jsx)(c.EY,{className:"badge ".concat(n.cls),children:n.label})]}),(0,x.jsxs)(c.EY,{className:"design-meta",children:["\u6570\u91cf: ",e.count," \u4ef6 | \u5355\u4ef7: \xa5",e.unitPrice]}),(0,x.jsxs)(c.EY,{className:"design-total",children:["\u5c0f\u8ba1: \xa5",(e.unitPrice*e.count).toFixed(2)]})]})]}),(0,x.jsxs)(c.Ss,{className:"design-actions",children:["ordered"!==e.status&&(0,x.jsx)(c.Ss,{className:"btn-gradient design-btn",onTap:function(){return w(e)},children:(0,x.jsx)(c.EY,{children:"undesigned"===e.status?"\u5f00\u59cb\u8bbe\u8ba1":"\u7ee7\u7eed\u8bbe\u8ba1"})}),"ordered"===e.status&&(0,x.jsx)(c.Ss,{className:"btn-outline design-btn",onTap:function(){return l().switchTab({url:"/pages/orders/index"})},children:(0,x.jsx)(c.EY,{children:"\u67e5\u770b\u8ba2\u5355"})})]})]},e.id)}),0===Y.length&&(0,x.jsxs)(c.Ss,{className:"empty-state",children:[(0,x.jsx)(c._V,{className:"empty-icon-img",src:"/icon/\u8c03\u8272\u76d8.png",mode:"aspectFit"}),(0,x.jsx)(c.EY,{className:"empty-text",children:"\u8fd8\u6ca1\u6709\u8bbe\u8ba1\u6e05\u5355"}),(0,x.jsx)(c.EY,{className:"empty-sub",children:"\u53bb\u9996\u9875\u901b\u901b\uff0c\u627e\u5230\u559c\u6b22\u7684\u5b9a\u5236\u54c1"}),(0,x.jsx)(c.Ss,{className:"btn-gradient",onTap:function(){return l().switchTab({url:"/pages/index/index"})},children:(0,x.jsx)(c.EY,{children:"\u53bb\u901b\u901b"})})]})]}),(0,x.jsx)(c.Ss,{style:{height:"40px"}})]})})})}var p={};Page((0,a.createPageConfig)(j,"pages/designList/index",{root:{cn:[]}},p||{}))}},function(e){var s=function(s){return e(e.s=s)};e.O(0,[907,96,76],function(){return s(3512)});e.O()}]);
|
||||
Reference in New Issue
Block a user