商品浏览页构建上传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()}]);
|
||||
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-168
@@ -1,168 +1 @@
|
||||
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/@tarojs/webpack5-runner/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[4]!./src/pages/designList/index.scss ***!
|
||||
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
@charset "UTF-8";
|
||||
.design-page {
|
||||
padding: 0 24rpx 24rpx;
|
||||
}
|
||||
|
||||
/* 状态 Tab */
|
||||
.status-tabs {
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.tabs-scroll {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
display: inline-block;
|
||||
padding: 20rpx 32rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tab-label {
|
||||
font-size: 28rpx;
|
||||
color: var(--text-secondary);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.tab-item.active .tab-label {
|
||||
color: var(--accent-pink);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.tab-underline {
|
||||
position: absolute;
|
||||
bottom: 8rpx;
|
||||
left: 50%;
|
||||
-webkit-transform: translateX(-50%);
|
||||
-ms-transform: translateX(-50%);
|
||||
transform: translateX(-50%);
|
||||
width: 40rpx;
|
||||
height: 4rpx;
|
||||
background: var(--accent-pink);
|
||||
border-radius: 2rpx;
|
||||
}
|
||||
|
||||
/* 设计卡片列表 */
|
||||
.design-list {
|
||||
padding-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.design-card {
|
||||
margin-bottom: 20rpx;
|
||||
padding: 28rpx;
|
||||
}
|
||||
|
||||
.design-body {
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-align-items: flex-start;
|
||||
-ms-flex-align: start;
|
||||
align-items: flex-start;
|
||||
gap: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.design-icon {
|
||||
font-size: 56rpx;
|
||||
-webkit-flex-shrink: 0;
|
||||
-ms-flex-negative: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.design-icon-img {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
-webkit-flex-shrink: 0;
|
||||
-ms-flex-negative: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.design-info {
|
||||
-webkit-flex: 1;
|
||||
-ms-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.design-title-row {
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-justify-content: space-between;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.design-name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.design-meta {
|
||||
font-size: 24rpx;
|
||||
color: var(--text-secondary);
|
||||
display: block;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.design-total {
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
color: var(--accent-pink);
|
||||
}
|
||||
|
||||
.design-actions {
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-justify-content: flex-end;
|
||||
-ms-flex-pack: end;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.design-btn {
|
||||
padding: 16rpx 40rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
/* 空状态 */
|
||||
.empty-state {
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
padding: 100rpx 40rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.empty-icon-img {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.empty-sub {
|
||||
font-size: 26rpx;
|
||||
color: var(--text-secondary);
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
.design-page{padding:0 24rpx 24rpx}.status-tabs{margin:20rpx 0}.tabs-scroll{white-space:nowrap}.tab-item{display:inline-block;padding:20rpx 32rpx;position:relative}.tab-label{color:var(--text-secondary);font-size:28rpx;font-weight:500}.tab-item.active .tab-label{color:var(--accent-pink);font-weight:700}.tab-underline{background:var(--accent-pink);border-radius:2rpx;bottom:8rpx;height:4rpx;left:50%;position:absolute;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:40rpx}.design-list{padding-bottom:24rpx}.design-card{margin-bottom:20rpx;padding:28rpx}.design-body{-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:20rpx;margin-bottom:20rpx}.design-icon{-ms-flex-negative:0;-webkit-flex-shrink:0;flex-shrink:0;font-size:56rpx}.design-icon-img{-ms-flex-negative:0;-webkit-flex-shrink:0;flex-shrink:0;height:56rpx;width:56rpx}.design-info{-webkit-flex:1;-ms-flex:1;flex:1}.design-title-row{-ms-flex-align:center;-ms-flex-pack:justify;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;justify-content:space-between;margin-bottom:12rpx}.design-name{color:var(--text-primary);font-size:32rpx;font-weight:700}.design-meta{color:var(--text-secondary);display:block;font-size:24rpx;margin-bottom:8rpx}.design-total{color:var(--accent-pink);font-size:26rpx;font-weight:600}.design-actions{-ms-flex-pack:end;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:flex-end;justify-content:flex-end}.design-btn{font-size:26rpx;padding:16rpx 40rpx}.empty-state{-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:100rpx 40rpx;text-align:center}.empty-icon-img{height:56rpx;margin-bottom:24rpx;width:56rpx}.empty-text{color:var(--text-primary);font-size:32rpx;font-weight:700;margin-bottom:12rpx}.empty-sub{color:var(--text-secondary);font-size:26rpx;margin-bottom:32rpx}
|
||||
Reference in New Issue
Block a user