s-material-react 0.1.19 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/pages/goodsDetail.scss +3 -2
- package/dist/common/addressItem/index.d.ts +1 -1
- package/dist/common/card/index.d.ts +8 -8
- package/dist/common/coupon/index.d.ts +2 -2
- package/dist/common/evaluateItem/index.d.ts +2 -2
- package/dist/common/evaluateList/index.d.ts +5 -5
- package/dist/common/icon/index.d.ts +7 -7
- package/dist/common/mock/index.d.ts +300 -300
- package/dist/common/stepNum/index.d.ts +5 -5
- package/dist/components/AddressDetail/components/index.d.ts +1 -1
- package/dist/components/AddressDetail/components/skull.d.ts +2 -2
- package/dist/components/AddressDetail/config.d.ts +51 -51
- package/dist/components/AddressDetail/index.d.ts +2 -2
- package/dist/components/AddressList/components/index.d.ts +1 -1
- package/dist/components/AddressList/components/skull.d.ts +2 -2
- package/dist/components/AddressList/index.d.ts +2 -2
- package/dist/components/Cart/components/cartItem.d.ts +3 -3
- package/dist/components/Cart/components/index.d.ts +1 -1
- package/dist/components/Cart/index.d.ts +2 -2
- package/dist/components/ClassifyNav/index.d.ts +15 -15
- package/dist/components/CouponList/components/index.d.ts +4 -4
- package/dist/components/CouponList/components/overdue.d.ts +5 -5
- package/dist/components/CouponList/components/skull.d.ts +2 -2
- package/dist/components/CouponList/components/unUsed.d.ts +5 -5
- package/dist/components/CouponList/components/used.d.ts +5 -5
- package/dist/components/CouponList/index.d.ts +2 -2
- package/dist/components/Cube/index.d.ts +17 -17
- package/dist/components/EvaluateList/index.d.ts +2 -2
- package/dist/components/Goods/index.d.ts +24 -24
- package/dist/components/GoodsClassify/components/classifyFloor.d.ts +1 -1
- package/dist/components/GoodsClassify/components/classifySkeleton.d.ts +1 -1
- package/dist/components/GoodsClassify/components/index.d.ts +2 -2
- package/dist/components/GoodsClassify/index.d.ts +2 -2
- package/dist/components/GoodsDetail/components/evaluateEntry.d.ts +2 -2
- package/dist/components/GoodsDetail/components/goodsDetailCollection.d.ts +1 -1
- package/dist/components/GoodsDetail/components/goodsDetailCoupon.d.ts +1 -1
- package/dist/components/GoodsDetail/components/goodsDetailEvaluate.d.ts +1 -1
- package/dist/components/GoodsDetail/components/goodsDetailHandleBar.d.ts +1 -1
- package/dist/components/GoodsDetail/components/goodsDetailInfo.d.ts +1 -1
- package/dist/components/GoodsDetail/components/goodsDetailPopup.d.ts +1 -1
- package/dist/components/GoodsDetail/components/goodsDetailPromotion.d.ts +1 -1
- package/dist/components/GoodsDetail/components/goodsDetailSize.d.ts +1 -1
- package/dist/components/GoodsDetail/components/index.d.ts +9 -9
- package/dist/components/GoodsDetail/index.d.ts +6 -6
- package/dist/components/GoodsDetailPromotion/index.d.ts +2 -2
- package/dist/components/GoodsDetailTopInfo/index.d.ts +2 -2
- package/dist/components/GoodsGroup/index.d.ts +25 -25
- package/dist/components/GoodsList/components/filter.d.ts +5 -5
- package/dist/components/GoodsList/components/index.d.ts +1 -1
- package/dist/components/GoodsList/index.d.ts +6 -6
- package/dist/components/Line/index.d.ts +11 -11
- package/dist/components/Mine/components/index.d.ts +2 -2
- package/dist/components/Mine/components/menuList.d.ts +1 -1
- package/dist/components/Mine/components/orderEntry.d.ts +1 -1
- package/dist/components/Mine/index.d.ts +7 -7
- package/dist/components/Notice/index.d.ts +12 -12
- package/dist/components/OrderDetail/index.d.ts +2 -2
- package/dist/components/OrderList/components/index.d.ts +3 -3
- package/dist/components/OrderList/components/mock.d.ts +1647 -1647
- package/dist/components/OrderList/components/orderItem.d.ts +15 -15
- package/dist/components/OrderList/components/orderListItem.d.ts +7 -7
- package/dist/components/OrderList/index.d.ts +2 -2
- package/dist/components/PaymentMode/config.d.ts +6 -6
- package/dist/components/PaymentMode/hooks/useOrderResult.d.ts +10 -11
- package/dist/components/PaymentMode/index.d.ts +4 -4
- package/dist/components/PlaceOrder/components/address.d.ts +12 -12
- package/dist/components/PlaceOrder/components/index.d.ts +3 -3
- package/dist/components/PlaceOrder/components/orderPrice.d.ts +12 -12
- package/dist/components/PlaceOrder/components/shop.d.ts +3 -3
- package/dist/components/PlaceOrder/index.d.ts +7 -7
- package/dist/components/PlaceOrderResult/index.d.ts +4 -4
- package/dist/components/Search/index.d.ts +14 -14
- package/dist/components/SearchPage/index.d.ts +8 -8
- package/dist/components/Service/index.d.ts +12 -12
- package/dist/components/Slider/index.d.ts +24 -24
- package/dist/components/Slider/item.d.ts +6 -6
- package/dist/components/Title/index.d.ts +17 -17
- package/dist/components/Video/index.d.ts +13 -13
- package/dist/components/index.d.ts +29 -29
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/routerMap/index.d.ts +16 -16
- package/dist/static/icon/index.d.ts +7 -7
- package/dist/static/index.d.ts +1 -1
- package/dist/utils/checkImgUrl.d.ts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/payment.d.ts +14 -14
- package/dist/utils/serviceActionSheet.d.ts +1 -1
- package/package.json +12 -10
- package/dist/common/addressItem/index.js +0 -9
- package/dist/common/card/index.js +0 -6
- package/dist/common/coupon/index.js +0 -8
- package/dist/common/evaluateItem/index.js +0 -13
- package/dist/common/evaluateList/index.js +0 -12
- package/dist/common/icon/index.js +0 -12
- package/dist/common/mock/index.js +0 -658
- package/dist/common/stepNum/index.js +0 -9
- package/dist/components/AddressDetail/components/index.js +0 -1
- package/dist/components/AddressDetail/components/skull.js +0 -9
- package/dist/components/AddressDetail/config.js +0 -65
- package/dist/components/AddressDetail/index.js +0 -29
- package/dist/components/AddressList/components/index.js +0 -1
- package/dist/components/AddressList/components/skull.js +0 -9
- package/dist/components/AddressList/index.js +0 -17
- package/dist/components/Cart/components/cartItem.js +0 -33
- package/dist/components/Cart/components/index.js +0 -1
- package/dist/components/Cart/index.js +0 -24
- package/dist/components/ClassifyNav/index.js +0 -12
- package/dist/components/CouponList/components/index.js +0 -4
- package/dist/components/CouponList/components/overdue.js +0 -6
- package/dist/components/CouponList/components/skull.js +0 -9
- package/dist/components/CouponList/components/unUsed.js +0 -6
- package/dist/components/CouponList/components/used.js +0 -6
- package/dist/components/CouponList/index.js +0 -22
- package/dist/components/Cube/index.js +0 -28
- package/dist/components/EvaluateList/index.js +0 -40
- package/dist/components/Goods/index.js +0 -69
- package/dist/components/GoodsClassify/components/classifyFloor.js +0 -12
- package/dist/components/GoodsClassify/components/classifySkeleton.js +0 -12
- package/dist/components/GoodsClassify/components/index.js +0 -2
- package/dist/components/GoodsClassify/index.js +0 -45
- package/dist/components/GoodsDetail/components/evaluateEntry.js +0 -43
- package/dist/components/GoodsDetail/components/goodsDetailCollection.js +0 -64
- package/dist/components/GoodsDetail/components/goodsDetailCoupon.js +0 -44
- package/dist/components/GoodsDetail/components/goodsDetailEvaluate.js +0 -6
- package/dist/components/GoodsDetail/components/goodsDetailHandleBar.js +0 -27
- package/dist/components/GoodsDetail/components/goodsDetailInfo.js +0 -14
- package/dist/components/GoodsDetail/components/goodsDetailPopup.js +0 -11
- package/dist/components/GoodsDetail/components/goodsDetailPromotion.js +0 -8
- package/dist/components/GoodsDetail/components/goodsDetailSize.js +0 -17
- package/dist/components/GoodsDetail/components/index.js +0 -9
- package/dist/components/GoodsDetail/index.js +0 -28
- package/dist/components/GoodsDetailPromotion/index.js +0 -8
- package/dist/components/GoodsDetailTopInfo/index.js +0 -9
- package/dist/components/GoodsGroup/index.js +0 -27
- package/dist/components/GoodsList/components/filter.js +0 -43
- package/dist/components/GoodsList/components/index.js +0 -1
- package/dist/components/GoodsList/index.js +0 -16
- package/dist/components/Line/index.js +0 -18
- package/dist/components/Mine/components/index.js +0 -2
- package/dist/components/Mine/components/menuList.js +0 -22
- package/dist/components/Mine/components/orderEntry.js +0 -48
- package/dist/components/Mine/index.js +0 -15
- package/dist/components/Notice/index.js +0 -15
- package/dist/components/OrderDetail/index.js +0 -15
- package/dist/components/OrderList/components/index.js +0 -3
- package/dist/components/OrderList/components/mock.js +0 -4417
- package/dist/components/OrderList/components/orderItem.js +0 -7
- package/dist/components/OrderList/components/orderListItem.js +0 -38
- package/dist/components/OrderList/index.js +0 -17
- package/dist/components/PaymentMode/config.js +0 -14
- package/dist/components/PaymentMode/hooks/useOrderResult.js +0 -100
- package/dist/components/PaymentMode/index.js +0 -17
- package/dist/components/PlaceOrder/components/address.js +0 -33
- package/dist/components/PlaceOrder/components/index.js +0 -3
- package/dist/components/PlaceOrder/components/orderPrice.js +0 -7
- package/dist/components/PlaceOrder/components/shop.js +0 -8
- package/dist/components/PlaceOrder/index.js +0 -16
- package/dist/components/PlaceOrderResult/index.js +0 -16
- package/dist/components/Search/index.js +0 -34
- package/dist/components/SearchPage/index.js +0 -59
- package/dist/components/Service/index.js +0 -8
- package/dist/components/Slider/index.js +0 -28
- package/dist/components/Slider/item.js +0 -13
- package/dist/components/Title/index.js +0 -18
- package/dist/components/Video/index.js +0 -13
- package/dist/components/index.js +0 -29
- package/dist/options/index.js +0 -36
- package/dist/routerMap/index.js +0 -16
- package/dist/static/icon/index.js +0 -14
- package/dist/static/index.js +0 -1
- package/dist/utils/checkImgUrl.js +0 -9
- package/dist/utils/index.js +0 -1
- package/dist/utils/payment.js +0 -56
- package/dist/utils/serviceActionSheet.js +0 -31
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
const checkMobile = (_, value) => {
|
|
2
|
-
return new Promise((resolve, reject) => {
|
|
3
|
-
if (!/^1[3456789]\d{9}$/.test(value) && value) {
|
|
4
|
-
reject('请输入正确手机号');
|
|
5
|
-
}
|
|
6
|
-
else {
|
|
7
|
-
resolve('');
|
|
8
|
-
}
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
export const config = [
|
|
12
|
-
{
|
|
13
|
-
type: 'input',
|
|
14
|
-
props: {
|
|
15
|
-
onlyShowClearWhenFocus: true,
|
|
16
|
-
placeholder: '请填写收货人姓名'
|
|
17
|
-
},
|
|
18
|
-
label: '收货人',
|
|
19
|
-
name: 'addressMember',
|
|
20
|
-
rules: [{ required: true, message: '收货人姓名不能为空' }]
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
type: 'input',
|
|
24
|
-
props: {
|
|
25
|
-
type: 'number',
|
|
26
|
-
onlyShowClearWhenFocus: true,
|
|
27
|
-
placeholder: '请填写收货人手机号码'
|
|
28
|
-
},
|
|
29
|
-
label: '手机号码',
|
|
30
|
-
name: 'addressPhone',
|
|
31
|
-
rules: [{ required: true, message: '收货人手机号码不能为空' }, { validator: checkMobile }]
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
type: 'cascader',
|
|
35
|
-
label: '所在地区',
|
|
36
|
-
name: 'area',
|
|
37
|
-
rules: [{ required: true, message: '所在地区不能为空' }]
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
type: 'input',
|
|
41
|
-
props: {
|
|
42
|
-
onlyShowClearWhenFocus: true,
|
|
43
|
-
placeholder: '街道/楼牌号等'
|
|
44
|
-
},
|
|
45
|
-
label: '详细地址',
|
|
46
|
-
name: 'addressDetail',
|
|
47
|
-
rules: [{ required: true, message: '收货人详细地址不能为空' }]
|
|
48
|
-
},
|
|
49
|
-
// {
|
|
50
|
-
// type: 'input',
|
|
51
|
-
// props: {
|
|
52
|
-
// type: 'number',
|
|
53
|
-
// onlyShowClearWhenFocus: true,
|
|
54
|
-
// placeholder: '请填写邮政编码'
|
|
55
|
-
// },
|
|
56
|
-
// label: '邮政编码',
|
|
57
|
-
// name: 'zipCode'
|
|
58
|
-
// },
|
|
59
|
-
{
|
|
60
|
-
type: 'switch',
|
|
61
|
-
props: {},
|
|
62
|
-
label: '设置默认地址',
|
|
63
|
-
name: 'addressDefault'
|
|
64
|
-
}
|
|
65
|
-
];
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { memo } from 'react';
|
|
3
|
-
import { getEnv } from '@brushes/api';
|
|
4
|
-
import { config } from './config';
|
|
5
|
-
import { useEditAddress } from 'qj-mobile-store';
|
|
6
|
-
import { useComponent, antdMobile } from '@brushes/qj-simulate-component';
|
|
7
|
-
import { Skull } from './components';
|
|
8
|
-
const flag = getEnv();
|
|
9
|
-
const AddressDetailJsx = ({ addressId = undefined }) => {
|
|
10
|
-
const { View } = useComponent();
|
|
11
|
-
const { Form, Button, Input } = antdMobile;
|
|
12
|
-
const { skullShow, form, area, defaultAddress, handleArea, handleDefaultAddress, handleFinish } = useEditAddress(addressId, Form);
|
|
13
|
-
return (_jsx(View, Object.assign({ className: 'addressDetail', style: { height: flag ? '100%' : '667px' } }, { children: skullShow ? (_jsx(Skull, {})) : (_jsx(Form, Object.assign({ form: form, layout: "horizontal", mode: "card", onFinish: handleFinish, footer: _jsx(Button, Object.assign({ block: true, type: "submit", color: "primary", size: "large" }, { children: "\u63D0\u4EA4" })) }, { children: config.map((item, index) => {
|
|
14
|
-
return (_jsx(Form.Item, Object.assign({ label: item.label, name: item.name, rules: item.rules, trigger: item.type === 'cascader' ? 'onConfirm' : 'onChange', arrow: false }, { children: (() => {
|
|
15
|
-
if (item.type === 'input') {
|
|
16
|
-
return _jsx(Input, Object.assign({}, item.props));
|
|
17
|
-
}
|
|
18
|
-
else if (item.type === 'switch') {
|
|
19
|
-
return (_jsx("switch", Object.assign({}, item.props, { color: '#000', onChange: handleDefaultAddress, checked: defaultAddress === '1' })));
|
|
20
|
-
}
|
|
21
|
-
else if (item.type === 'cascader') {
|
|
22
|
-
return (_jsx(_Fragment, { children: flag ? (_jsx("picker", Object.assign({ mode: 'region', onChange: handleArea, value: '123' }, { children: _jsx(View, Object.assign({ className: 'areaWrap' }, { children: !area.provinceName
|
|
23
|
-
? '请选择所在地区'
|
|
24
|
-
: `${area.provinceName}—${area.cityName}-${area.areaName}` })) }))) : ('请选择所在地区') }));
|
|
25
|
-
}
|
|
26
|
-
})() }), index));
|
|
27
|
-
}) }))) })));
|
|
28
|
-
};
|
|
29
|
-
export const AddressDetail = memo(AddressDetailJsx);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './skull';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { memo, useRef } from 'react';
|
|
3
|
-
import { useComponent } from '@brushes/qj-simulate-component';
|
|
4
|
-
const SkullJsx = () => {
|
|
5
|
-
const { View, Skeleton } = useComponent();
|
|
6
|
-
const coe = useRef(new Array(3).fill(0));
|
|
7
|
-
return (_jsx(_Fragment, { children: _jsx(View, Object.assign({ className: 'skullWrap' }, { children: _jsx(View, Object.assign({ className: 'skull' }, { children: coe.current.map((item, index) => (_jsx(Skeleton, { className: 'skullItem', animated: true }, index))) })) })) }));
|
|
8
|
-
};
|
|
9
|
-
export const Skull = memo(SkullJsx);
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { memo } from 'react';
|
|
3
|
-
import { navigatorImpl, useComponent } from '@brushes/qj-simulate-component';
|
|
4
|
-
import { getEnv } from '@brushes/api';
|
|
5
|
-
import { AddressItem } from '../../common/addressItem';
|
|
6
|
-
import { useAddressList } from 'qj-mobile-store';
|
|
7
|
-
import { routerMap } from '../../routerMap';
|
|
8
|
-
import { Skull } from './components';
|
|
9
|
-
const AddressListJsx = () => {
|
|
10
|
-
const { View } = useComponent();
|
|
11
|
-
const flag = getEnv();
|
|
12
|
-
const { list, delAddress, setDefault, skullShow } = useAddressList();
|
|
13
|
-
return (_jsxs(View, Object.assign({ className: 'addressListWrap', style: {
|
|
14
|
-
height: flag ? 'inherit' : '667px'
|
|
15
|
-
} }, { children: [skullShow ? (_jsx(Skull, {})) : (_jsx(View, Object.assign({ className: 'addressList' }, { children: list.map((item, index) => (_jsx(AddressItem, { itemData: item, setDefault: setDefault.bind(null, item, index), delAddress: delAddress.bind(null, item) }, item === null || item === void 0 ? void 0 : item.addressId))) }))), _jsx(View, Object.assign({ className: 'addBtnWrap' }, { children: _jsx(View, Object.assign({ className: 'addBtn', onClick: () => navigatorImpl(`${routerMap.addressEditor}`) }, { children: "+ \u65B0\u589E\u5730\u5740" })) }))] })));
|
|
16
|
-
};
|
|
17
|
-
export const AddressList = memo(AddressListJsx);
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { useComponent, NumStep, SmoothCheckbox } from '@brushes/qj-simulate-component';
|
|
12
|
-
import { useDispatchImpl, useStore, useCartList } from 'qj-mobile-store';
|
|
13
|
-
export function CartItem({ list }) {
|
|
14
|
-
const { View, Text, Image, Checkbox } = useComponent();
|
|
15
|
-
const { updateImpl } = useCartList();
|
|
16
|
-
const dispatch = useDispatchImpl();
|
|
17
|
-
const { select } = useStore();
|
|
18
|
-
const handleStep = (id, amount, type) => __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
const count = type === 'plus' ? ++amount : --amount;
|
|
20
|
-
updateImpl(id, count);
|
|
21
|
-
});
|
|
22
|
-
const onChange = (e) => {
|
|
23
|
-
dispatch({
|
|
24
|
-
type: 'select',
|
|
25
|
-
payload: e.detail.value
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
return (_jsx(SmoothCheckbox, Object.assign({ onChange: onChange }, { children: list.map((item, index) => (_jsxs(View, Object.assign({ className: 'cartItem' }, { children: [_jsx(View, Object.assign({ className: 'checkBoxWrap' }, { children: _jsx(Checkbox, { checked: select.includes(item.shoppingGoodsId + ''), value: item.shoppingGoodsId, style: {
|
|
29
|
-
'--icon-size': '16px',
|
|
30
|
-
'--font-size': '14px',
|
|
31
|
-
'--gap': '6px'
|
|
32
|
-
} }) })), _jsx(Image, { className: 'img', src: item.dataPic }), _jsxs(View, Object.assign({ className: 'info' }, { children: [_jsx(Text, Object.assign({ className: 'goodsName' }, { children: item.goodsName })), _jsxs(View, Object.assign({ className: 'size' }, { children: ["\u89C4\u683C\uFF1A", item.skuName, " X ", item.goodsCamount] })), _jsxs(View, Object.assign({ className: 'handleWrap' }, { children: [_jsxs(Text, Object.assign({ className: 'price' }, { children: ["\uFFE5", item.pricesetNprice] })), _jsx(NumStep, { count: item.goodsCamount, handleStep: handleStep.bind(null, item.shoppingGoodsId, item.goodsCamount) })] }))] }))] }), index))) })));
|
|
33
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './cartItem';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { memo, useState } from 'react';
|
|
3
|
-
import { useComponent, SmoothCheckbox } from '@brushes/qj-simulate-component';
|
|
4
|
-
import { getEnv } from '@brushes/api';
|
|
5
|
-
import { CartItem } from './components';
|
|
6
|
-
import { StoreProvider, useStore, useCartList } from 'qj-mobile-store';
|
|
7
|
-
const flag = getEnv();
|
|
8
|
-
const CartJsx = () => {
|
|
9
|
-
const [editState, setEditState] = useState(true);
|
|
10
|
-
const { View, Text, Checkbox } = useComponent();
|
|
11
|
-
const { select } = useStore();
|
|
12
|
-
const { cartList, amount, selectAll, allCart, toOrderImpl } = useCartList();
|
|
13
|
-
return (_jsxs(View, Object.assign({ className: 'cart', style: {
|
|
14
|
-
height: flag ? '100%' : '667px'
|
|
15
|
-
} }, { children: [_jsx(View, Object.assign({ className: 'edit' }, { children: _jsx(View, Object.assign({ className: 'btn', onClick: () => setEditState(!editState) }, { children: editState ? '编辑' : '完成' })) })), _jsx(View, Object.assign({ className: 'itemGroup' }, { children: _jsx(CartItem, { list: cartList.shoppingGoodsList }) })), _jsxs(View, Object.assign({ className: 'dashboard' }, { children: [_jsx(View, Object.assign({ className: 'choose' }, { children: _jsx(SmoothCheckbox, Object.assign({ onChange: selectAll }, { children: _jsx(Checkbox, Object.assign({ checked: allCart.current.length === select.length, value: 'true', style: {
|
|
16
|
-
'--icon-size': '16px',
|
|
17
|
-
'--font-size': '14px',
|
|
18
|
-
'--gap': '6px'
|
|
19
|
-
} }, { children: "\u5168\u9009" })) })) })), editState ? (_jsxs(View, Object.assign({ className: 'check' }, { children: [_jsxs(View, Object.assign({ className: 'priceGroup' }, { children: [_jsxs(View, Object.assign({ className: 'discount' }, { children: ["\u4F18\u60E0: ", _jsxs(Text, Object.assign({ className: 'data' }, { children: ["\uFFE5 ", cartList.disMoney || 0] }))] })), _jsxs(View, Object.assign({ className: 'all' }, { children: ["\u5408\u8BA1: ", _jsxs(Text, Object.assign({ className: 'data' }, { children: ["\uFFE5 ", amount.amount] }))] }))] })), _jsxs(View, Object.assign({ onClick: toOrderImpl, className: 'btn' }, { children: ["\u7ED3\u7B97(", amount.num, ")"] }))] }))) : (_jsx(View, Object.assign({ className: 'del' }, { children: _jsx(View, Object.assign({ className: 'btn' }, { children: "\u5220\u9664" })) })))] }))] })));
|
|
20
|
-
};
|
|
21
|
-
const WrapCartJsx = () => {
|
|
22
|
-
return (_jsx(StoreProvider, { children: _jsx(CartJsx, {}) }));
|
|
23
|
-
};
|
|
24
|
-
export const Cart = memo(WrapCartJsx);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { memo } from 'react';
|
|
3
|
-
import { useComponent } from '@brushes/qj-simulate-component';
|
|
4
|
-
import { useCube } from 'qj-mobile-store';
|
|
5
|
-
const ClassifyNavJsx = ({ defaultValue, borderRadius, paddingTop, paddingBottom, selectClassifyNav }) => {
|
|
6
|
-
const { View, Text } = useComponent();
|
|
7
|
-
const list = useCube(defaultValue, selectClassifyNav);
|
|
8
|
-
return (_jsx(View, Object.assign({ style: { paddingTop, paddingBottom } }, { children: _jsx(View, Object.assign({ className: 'classifyNav' }, { children: list.map((item, index) => {
|
|
9
|
-
return (_jsxs(View, Object.assign({ className: 'classifyNavItem' }, { children: [_jsx("img", { src: item.imgUrl, alt: "", className: 'img' }), _jsx(Text, Object.assign({ className: 'label' }, { children: item.title }))] }), index));
|
|
10
|
-
}) })) })));
|
|
11
|
-
};
|
|
12
|
-
export const ClassifyNav = memo(ClassifyNavJsx);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useComponent } from '@brushes/qj-simulate-component';
|
|
3
|
-
export const Overdue = ({ coe }) => {
|
|
4
|
-
const { View, Text } = useComponent();
|
|
5
|
-
return (_jsx(_Fragment, { children: coe === 3 ? (_jsx(View, Object.assign({ className: 'couponListItem overdue' }, { children: _jsxs(View, Object.assign({ className: 'coupon-content' }, { children: [_jsxs(View, Object.assign({ className: 'price' }, { children: [_jsx(Text, Object.assign({ className: 'symbol' }, { children: "\uFFE5" })), _jsx(Text, Object.assign({ className: 'num' }, { children: "123" }))] })), _jsxs(View, Object.assign({ className: 'info' }, { children: [_jsx(Text, Object.assign({ className: 'title' }, { children: "\u6574\u5355\u7ACB\u51CF10\u5143 \u6EE1199\u53EF\u7528" })), _jsx(Text, Object.assign({ className: 'date' }, { children: "\u6709\u6548\u671F\u81F3\uFF1A2022-10-01" })), _jsx(View, Object.assign({ className: 'btn' }, { children: "\u5DF2\u4F7F\u7528" })), _jsx(View, Object.assign({ className: 'round' }, { children: "\u5DF2\u5931\u6548" }))] }))] })) }))) : null }));
|
|
6
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { memo, useRef } from 'react';
|
|
3
|
-
import { useComponent } from '@brushes/qj-simulate-component';
|
|
4
|
-
const SkullJsx = () => {
|
|
5
|
-
const { View, Skeleton } = useComponent();
|
|
6
|
-
const coe = useRef(new Array(3).fill(0));
|
|
7
|
-
return (_jsx(_Fragment, { children: _jsx(View, Object.assign({ className: 'skullWrap' }, { children: _jsx(View, Object.assign({ className: 'skull' }, { children: coe.current.map((item, index) => (_jsx(Skeleton, { className: 'skullItem', animated: true }, index))) })) })) }));
|
|
8
|
-
};
|
|
9
|
-
export const Skull = memo(SkullJsx);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useComponent } from '@brushes/qj-simulate-component';
|
|
3
|
-
export const UnUsed = ({ coe }) => {
|
|
4
|
-
const { View, Text } = useComponent();
|
|
5
|
-
return (_jsx(_Fragment, { children: coe === 1 ? (_jsx(View, Object.assign({ className: 'couponListItem unused' }, { children: _jsxs(View, Object.assign({ className: 'coupon-content' }, { children: [_jsxs(View, Object.assign({ className: 'price' }, { children: [_jsx(Text, Object.assign({ className: 'symbol' }, { children: "\uFFE5" })), _jsx(Text, Object.assign({ className: 'num' }, { children: "123" }))] })), _jsxs(View, Object.assign({ className: 'info' }, { children: [_jsx(Text, Object.assign({ className: 'title' }, { children: "\u6574\u5355\u7ACB\u51CF10\u5143 \u6EE1199\u53EF\u7528" })), _jsx(Text, Object.assign({ className: 'date' }, { children: "\u6709\u6548\u671F\u81F3\uFF1A2022-10-01" })), _jsx(View, Object.assign({ className: 'btn' }, { children: "\u5DF2\u4F7F\u7528" }))] }))] })) }))) : null }));
|
|
6
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useComponent } from '@brushes/qj-simulate-component';
|
|
3
|
-
export const Used = ({ coe }) => {
|
|
4
|
-
const { View, Text } = useComponent();
|
|
5
|
-
return (_jsx(_Fragment, { children: coe === 2 ? (_jsx(View, Object.assign({ className: 'couponListItem used' }, { children: _jsxs(View, Object.assign({ className: 'coupon-content' }, { children: [_jsxs(View, Object.assign({ className: 'price' }, { children: [_jsx(Text, Object.assign({ className: 'symbol' }, { children: "\uFFE5" })), _jsx(Text, Object.assign({ className: 'num' }, { children: "123" }))] })), _jsxs(View, Object.assign({ className: 'info' }, { children: [_jsx(Text, Object.assign({ className: 'title' }, { children: "\u6574\u5355\u7ACB\u51CF10\u5143 \u6EE1199\u53EF\u7528" })), _jsx(Text, Object.assign({ className: 'date' }, { children: "\u6709\u6548\u671F\u81F3\uFF1A2022-10-01" })), _jsx(View, Object.assign({ className: 'btn' }, { children: "\u5DF2\u4F7F\u7528" }))] }))] })) }))) : null }));
|
|
6
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { memo, useEffect } from 'react';
|
|
3
|
-
import { useComponent } from '@brushes/qj-simulate-component';
|
|
4
|
-
import { getEnv, queryUsercouponNember } from '@brushes/api';
|
|
5
|
-
import { useCouponList } from 'qj-mobile-store';
|
|
6
|
-
import { UnUsed, Overdue, Used } from './components';
|
|
7
|
-
const CouponListJsx = () => {
|
|
8
|
-
const { View, Text } = useComponent();
|
|
9
|
-
const { coe, setCoe, config } = useCouponList();
|
|
10
|
-
const flag = getEnv();
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
queryUsercouponNember().then((res) => {
|
|
13
|
-
console.log(26, res);
|
|
14
|
-
});
|
|
15
|
-
}, []);
|
|
16
|
-
return (_jsxs(View, Object.assign({ className: 'couponList', style: {
|
|
17
|
-
height: flag ? '100vh' : '667px'
|
|
18
|
-
} }, { children: [_jsx(View, Object.assign({ className: 'couponTab' }, { children: config.current.map((item) => {
|
|
19
|
-
return (_jsxs(View, Object.assign({ className: `couponTabItem ${coe === item.id ? 'active' : ''}`, onClick: () => setCoe(item.id) }, { children: [item.label, _jsx(Text, { className: 'icon' })] }), item.id));
|
|
20
|
-
}) })), _jsxs(View, Object.assign({ className: 'couponListContent' }, { children: [_jsx(UnUsed, { coe: coe }), _jsx(Used, { coe: coe }), _jsx(Overdue, { coe: coe })] }))] })));
|
|
21
|
-
};
|
|
22
|
-
export const CouponList = memo(CouponListJsx);
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { memo } from 'react';
|
|
3
|
-
import { useComponent } from '@brushes/qj-simulate-component';
|
|
4
|
-
import { useCube } from 'qj-mobile-store';
|
|
5
|
-
const CubeJsx = ({ defaultValue, type, borderRadius, paddingTop, paddingLeft, paddingRight, paddingBottom, selectImg }) => {
|
|
6
|
-
const { View, Image } = useComponent();
|
|
7
|
-
const list = useCube(defaultValue, selectImg);
|
|
8
|
-
return (_jsx(View, Object.assign({ style: {
|
|
9
|
-
paddingTop,
|
|
10
|
-
paddingBottom
|
|
11
|
-
} }, { children: _jsx(View, Object.assign({ className: `cube-type${type}`, style: { paddingLeft, paddingRight } }, { children: list.map((item, index) => {
|
|
12
|
-
return type === 1 ? (_jsx(Image, { mode: 'widthFix', src: item.imgUrl, style: {
|
|
13
|
-
width: '100%',
|
|
14
|
-
borderRadius: borderRadius + 'px'
|
|
15
|
-
} }, index)) : (_jsx(View, { className: 'block', style: {
|
|
16
|
-
backgroundImage: `url(${item.imgUrl})`,
|
|
17
|
-
width: '100%',
|
|
18
|
-
borderRadius: borderRadius + 'px'
|
|
19
|
-
}, onClick: () => {
|
|
20
|
-
if (process.env.TARO_ENV === 'weapp') {
|
|
21
|
-
// Taro?.navigateTo({
|
|
22
|
-
// url: item.link,
|
|
23
|
-
// })
|
|
24
|
-
}
|
|
25
|
-
} }, index));
|
|
26
|
-
}) })) })));
|
|
27
|
-
};
|
|
28
|
-
export const Cube = memo(CubeJsx);
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { memo, useRef, useState } from 'react';
|
|
3
|
-
import { useComponent } from '@brushes/qj-simulate-component';
|
|
4
|
-
import EvaluateItem from '../../common/evaluateItem';
|
|
5
|
-
import { evaluateListFake } from '../../common/mock';
|
|
6
|
-
const EvaluateListJsx = () => {
|
|
7
|
-
const [active, setActive] = useState('1');
|
|
8
|
-
const { View } = useComponent();
|
|
9
|
-
const tabs = useRef([
|
|
10
|
-
{
|
|
11
|
-
label: '全部',
|
|
12
|
-
num: '900+',
|
|
13
|
-
index: '1'
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
label: '好评',
|
|
17
|
-
num: '800+',
|
|
18
|
-
index: '2'
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
label: '中评',
|
|
22
|
-
num: '99+',
|
|
23
|
-
index: '3'
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
label: '差评',
|
|
27
|
-
num: '12',
|
|
28
|
-
index: '4'
|
|
29
|
-
}
|
|
30
|
-
]);
|
|
31
|
-
const handleTab = (coe) => {
|
|
32
|
-
setActive(coe);
|
|
33
|
-
};
|
|
34
|
-
return (_jsxs(_Fragment, { children: [_jsx(View, Object.assign({ className: 'evaluateListTab' }, { children: tabs.current.map((item) => {
|
|
35
|
-
return (_jsxs(View, Object.assign({ className: `evaluateListTabItem ${item.index === active ? 'active' : ''}`, "data-index": item.index, onClick: handleTab.bind(null, item.index) }, { children: [item.label, " ", item.num] }), item.index));
|
|
36
|
-
}) })), _jsx(View, Object.assign({ className: 'evaluateListContent' }, { children: evaluateListFake.map((item, index) => {
|
|
37
|
-
return _jsx(EvaluateItem, { itemData: item }, index);
|
|
38
|
-
}) }))] }));
|
|
39
|
-
};
|
|
40
|
-
export const EvaluateList = memo(EvaluateListJsx);
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { useEffect, useState, memo, useRef } from 'react';
|
|
12
|
-
import { navigatorImpl, useComponent } from '@brushes/qj-simulate-component';
|
|
13
|
-
import { querySkuNotOnShelf } from '@brushes/api';
|
|
14
|
-
import { _ } from '@brushes/tools';
|
|
15
|
-
import classNames from 'classnames';
|
|
16
|
-
import { QjMobileIcon } from '../../common/icon';
|
|
17
|
-
import { routerMap } from '../../routerMap';
|
|
18
|
-
const { isEqual, isEmpty } = _;
|
|
19
|
-
const GoodsJsx = ({ defaultValue = [], classCode = '', margin, circular, cell, gap = 10, goods = [], markedPrice, paddingTop, paddingBottom, paddingLeft, paddingRight }) => {
|
|
20
|
-
const [list, setList] = useState(defaultValue);
|
|
21
|
-
const preGoods = useRef();
|
|
22
|
-
const { View, Text } = useComponent();
|
|
23
|
-
useEffect(() => {
|
|
24
|
-
if (isEqual(preGoods.current, goods))
|
|
25
|
-
return;
|
|
26
|
-
preGoods.current = goods;
|
|
27
|
-
if (isEmpty(goods)) {
|
|
28
|
-
setList(defaultValue);
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
32
|
-
const arr = [];
|
|
33
|
-
for (let i of goods) {
|
|
34
|
-
arr.push(querySkuNotOnShelf({
|
|
35
|
-
goodsCode: i
|
|
36
|
-
}));
|
|
37
|
-
}
|
|
38
|
-
try {
|
|
39
|
-
const data = yield Promise.all(arr);
|
|
40
|
-
let result = [];
|
|
41
|
-
data.forEach((item) => {
|
|
42
|
-
if (item.rows) {
|
|
43
|
-
result = result.concat(item.rows);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
setList(result);
|
|
47
|
-
}
|
|
48
|
-
catch (err) {
|
|
49
|
-
console.log(59, err);
|
|
50
|
-
setList(defaultValue);
|
|
51
|
-
}
|
|
52
|
-
}))();
|
|
53
|
-
return () => {
|
|
54
|
-
console.log(54, goods, preGoods.current);
|
|
55
|
-
};
|
|
56
|
-
}, [goods]);
|
|
57
|
-
return (_jsx(View, Object.assign({ style: { paddingTop, paddingBottom } }, { children: _jsx(View, Object.assign({ className: classNames({ [`goods-${classCode}`]: true }), style: {
|
|
58
|
-
display: 'grid',
|
|
59
|
-
gap,
|
|
60
|
-
marginBottom: margin,
|
|
61
|
-
gridTemplateColumns: `repeat(${cell}, 1fr)`,
|
|
62
|
-
paddingLeft,
|
|
63
|
-
paddingRight
|
|
64
|
-
} }, { children: list.map((item, index) => (_jsxs(View, Object.assign({ style: {
|
|
65
|
-
overflow: 'hidden',
|
|
66
|
-
borderRadius: circular === 2 ? 0 : '8px'
|
|
67
|
-
}, onClick: () => navigatorImpl(`${routerMap.goodDetail}?skuCode=${item.skuCode}`), className: 'goods' }, { children: [_jsx(View, { className: `goods-img`, style: { backgroundImage: `url(${item.dataPic})` } }), _jsxs(View, Object.assign({ className: 'space' }, { children: [_jsx(View, Object.assign({ className: 'titleType' }, { children: item.goodsName })), _jsx(View, Object.assign({ className: 'subTitle' }, { children: item.brandName })), _jsxs(View, Object.assign({ className: 'price' }, { children: [_jsx(Text, Object.assign({ className: 'subPrice' }, { children: "\u00A5" })), item.pricesetNprice, markedPrice === 1 && (_jsxs(Text, Object.assign({ className: 'markedPrice' }, { children: [_jsx(Text, Object.assign({ className: 'subPrice' }, { children: "\u00A5" })), item.pricesetMakeprice] })))] })), _jsx(View, Object.assign({ className: 'anticon' }, { children: _jsx(QjMobileIcon, { style: { fontSize: 30, color: '#f00' }, value: 'cart' }) }))] }))] }), index))) })) })));
|
|
68
|
-
};
|
|
69
|
-
export const Goods = memo(GoodsJsx);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useComponent, navigatorImpl } from '@brushes/qj-simulate-component';
|
|
3
|
-
import { checkImgUrl } from '../../../utils/checkImgUrl';
|
|
4
|
-
import { routerMap } from '../../../routerMap';
|
|
5
|
-
export const ClassifyFloor = ({ navList, activeKey }) => {
|
|
6
|
-
const { View, Text } = useComponent();
|
|
7
|
-
return navList.map((item) => (_jsx(View, Object.assign({ className: ['content', activeKey === `${item.goodsClassCode}` ? ' active' : ''].join('') }, { children: item === null || item === void 0 ? void 0 : item.childList.map((classifyItem) => {
|
|
8
|
-
return (_jsxs(View, Object.assign({ className: 'classifyFloor' }, { children: [_jsxs(View, Object.assign({ className: 'titleWrap' }, { children: [_jsx(Text, Object.assign({ className: 'title' }, { children: classifyItem.goodsClassName })), _jsx(Text, { className: 'line' })] })), _jsx(View, Object.assign({ className: 'container' }, { children: classifyItem.childList.map(({ classtreeCode, goodsClassCode, goodsClassLogo, goodsClassName }) => {
|
|
9
|
-
return (_jsxs(View, Object.assign({ onClick: () => navigatorImpl(`${routerMap.goodList}?classtreeCode=${classtreeCode}`), className: 'classifyFloorGoodsItem' }, { children: [_jsx("img", { src: checkImgUrl(goodsClassLogo), className: 'logo' }), _jsx(Text, Object.assign({ className: 'title' }, { children: goodsClassName }))] }), goodsClassCode));
|
|
10
|
-
}) }))] }), classifyItem.goodsClassCode));
|
|
11
|
-
}) }), item.goodsClassCode)));
|
|
12
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useComponent } from '@brushes/qj-simulate-component';
|
|
3
|
-
import { getEnv } from '@brushes/api';
|
|
4
|
-
import { useRef } from 'react';
|
|
5
|
-
export const ClassifySkeleton = () => {
|
|
6
|
-
const flag = getEnv();
|
|
7
|
-
const { View, Skeleton } = useComponent();
|
|
8
|
-
const lBlcArr = useRef(Array(3).fill(1));
|
|
9
|
-
return (_jsxs(View, Object.assign({ className: 'classifySkeleton', style: { height: flag ? 'calc(100vh - 51px)' : '667px' } }, { children: [_jsx(View, Object.assign({ className: 'lPart' }, { children: lBlcArr.current.map((item, index) => {
|
|
10
|
-
return _jsx(Skeleton, { animated: true, className: 'blc' }, index);
|
|
11
|
-
}) })), _jsx(View, Object.assign({ className: 'rPart' }, { children: _jsx(Skeleton.Paragraph, { lineCount: 5, animated: true }) }))] })));
|
|
12
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { memo, useEffect, useState } from 'react';
|
|
12
|
-
import { useComponent, antdMobile, navigatorImpl } from '@brushes/qj-simulate-component';
|
|
13
|
-
import { ClassifyFloor } from './components/';
|
|
14
|
-
// import {SEARCH} from "../../static";
|
|
15
|
-
import { getEnv } from '@brushes/api';
|
|
16
|
-
import { queryGoodsClassTree } from '@brushes/api';
|
|
17
|
-
import { QjMobileIcon } from '../../common/icon';
|
|
18
|
-
import { _ } from '@brushes/tools';
|
|
19
|
-
import { routerMap } from '../../routerMap';
|
|
20
|
-
const { get } = _;
|
|
21
|
-
const { SideBar } = antdMobile;
|
|
22
|
-
const GoodsClassifyJsx = () => {
|
|
23
|
-
const { View, Text } = useComponent();
|
|
24
|
-
const [activeKey, setActiveKey] = useState('');
|
|
25
|
-
const [navList, setNavList] = useState([]);
|
|
26
|
-
const flag = getEnv();
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
getData();
|
|
29
|
-
}, []);
|
|
30
|
-
const getData = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
31
|
-
try {
|
|
32
|
-
let commits = yield queryGoodsClassTree();
|
|
33
|
-
setNavList(commits || []);
|
|
34
|
-
const code = get(commits, '[0].goodsClassCode');
|
|
35
|
-
setActiveKey(code);
|
|
36
|
-
}
|
|
37
|
-
catch (err) {
|
|
38
|
-
console.log(err);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
return (_jsxs(View, Object.assign({ className: 'goodsClassifyWrap', style: { height: flag ? '100%' : '667px' } }, { children: [_jsx(View, Object.assign({ className: 'goods-classify' }, { children: _jsxs(View, Object.assign({ className: 'goods-classify-search', onClick: () => navigatorImpl(routerMap.search) }, { children: [_jsx(QjMobileIcon, { value: "fenxiang" }), _jsx(Text, { children: "\u641C\u7D22\u5546\u54C1" })] })) })), _jsxs(View, Object.assign({ className: 'goodsClassifyContainer' }, { children: [_jsx(View, Object.assign({ className: 'side' }, { children: _jsx(SideBar, Object.assign({ activeKey: activeKey, onChange: setActiveKey, style: {
|
|
42
|
-
'--width': '88px'
|
|
43
|
-
} }, { children: navList.map((item) => (_jsx(SideBar.Item, { title: item.goodsClassName }, item.goodsClassCode))) })) })), _jsx(View, Object.assign({ className: 'main' }, { children: _jsx(ClassifyFloor, { navList: navList, activeKey: activeKey }) }))] }))] })));
|
|
44
|
-
};
|
|
45
|
-
export const GoodsClassify = memo(GoodsClassifyJsx);
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useComponent } from '@brushes/qj-simulate-component';
|
|
3
|
-
import EvaluateItem from '../../../common/evaluateItem';
|
|
4
|
-
const fake = [
|
|
5
|
-
{
|
|
6
|
-
avatar: 'http://www.qianjiangcloud.com/images/centerimga/pic%EF%BC%8Flogo+@2x.png',
|
|
7
|
-
userName: '张三李四王五',
|
|
8
|
-
rate: 4.5,
|
|
9
|
-
size: '一大通',
|
|
10
|
-
evaluate: '实物与描述的一样,质量相当好,卖家态度也好,有问必答,发货速度杠杠的,值得购买哦。外观设计漂亮,尺寸大小合适,包装仔细完整,宝贝手感不错,感觉很好,发货速度快,服务态度一流,给力!5星好评!',
|
|
11
|
-
imgUrls: [
|
|
12
|
-
{
|
|
13
|
-
imgUrl: 'https://img12.360buyimg.com/n1/jfs/t1/137059/18/27631/76566/635fc607E0b9e9c60/762dac6802e989d3.jpg'
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
imgUrl: 'https://img12.360buyimg.com/n1/jfs/t1/137059/18/27631/76566/635fc607E0b9e9c60/762dac6802e989d3.jpg'
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
imgUrl: 'https://img12.360buyimg.com/n1/jfs/t1/137059/18/27631/76566/635fc607E0b9e9c60/762dac6802e989d3.jpg'
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
imgUrl: 'https://img12.360buyimg.com/n1/jfs/t1/137059/18/27631/76566/635fc607E0b9e9c60/762dac6802e989d3.jpg'
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
avatar: 'http://www.qianjiangcloud.com/images/centerimga/pic%EF%BC%8Flogo+@2x.png',
|
|
28
|
-
userName: '张三李四王五',
|
|
29
|
-
rate: 4.5,
|
|
30
|
-
size: '一大通',
|
|
31
|
-
evaluate: '实物与描述的一样,质量相当好,卖家态度也好,有问必答,发货速度杠杠的,值得购买哦。外观设计漂亮,尺寸大小合适,包装仔细完整,宝贝手感不错,感觉很好,发货速度快,服务态度一流,给力!5星好评!',
|
|
32
|
-
imgUrls: [
|
|
33
|
-
{
|
|
34
|
-
imgUrl: 'https://img12.360buyimg.com/n1/jfs/t1/137059/18/27631/76566/635fc607E0b9e9c60/762dac6802e989d3.jpg'
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
];
|
|
39
|
-
const EvaluateEntry = () => {
|
|
40
|
-
const { View, Text } = useComponent();
|
|
41
|
-
return (_jsxs(View, Object.assign({ className: 'evaluateEntry' }, { children: [_jsxs(View, Object.assign({ className: 'topInfo' }, { children: [_jsx(Text, Object.assign({ className: 'title' }, { children: "\u8BC4\u4EF7\uFF08109\uFF09" })), _jsx(View, { children: _jsx(Text, Object.assign({ className: 'txt' }, { children: "\u597D\u8BC4\u5EA6 99%" })) })] })), fake.map((item, index) => (_jsx(EvaluateItem, { itemData: item }, index)))] })));
|
|
42
|
-
};
|
|
43
|
-
export default EvaluateEntry;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { SEARCH } from '../../../static';
|
|
12
|
-
import { useComponent } from '@brushes/qj-simulate-component';
|
|
13
|
-
import { checkCollectExit, saveCollect, deleteCollectByCode } from '@brushes/api';
|
|
14
|
-
import { _ } from '@brushes/tools';
|
|
15
|
-
import { useEffect } from 'react';
|
|
16
|
-
const { isEmpty } = _;
|
|
17
|
-
export const GoodsDetailCollection = ({ checkCollectionObj, setCheckCollectionObj, goods }) => {
|
|
18
|
-
const { Text, View } = useComponent();
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
checkCollection();
|
|
21
|
-
}, []);
|
|
22
|
-
const checkCollection = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
|
-
const checkCollectionParams = {
|
|
24
|
-
collectType: 0,
|
|
25
|
-
collectOpcode: goods.rsSkuDomainList[0].skuCode || ''
|
|
26
|
-
};
|
|
27
|
-
try {
|
|
28
|
-
const result = yield checkCollectExit(checkCollectionParams);
|
|
29
|
-
setCheckCollectionObj(result);
|
|
30
|
-
}
|
|
31
|
-
catch (err) {
|
|
32
|
-
console.log(err);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
const handleSaveCollect = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
36
|
-
const saveCollectParmas = {
|
|
37
|
-
collectType: 0,
|
|
38
|
-
collectOpcode: goods.rsSkuDomainList[0].skuCode || '',
|
|
39
|
-
collectOppic: goods.dataPic,
|
|
40
|
-
collectOpcont: goods.goodsName,
|
|
41
|
-
collectOpnum: goods.pricesetNprice,
|
|
42
|
-
goodsOrigin: 0
|
|
43
|
-
};
|
|
44
|
-
yield saveCollect(saveCollectParmas);
|
|
45
|
-
});
|
|
46
|
-
const handleDeleteCollectByCode = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
47
|
-
const deleteCollectByCodeParams = {
|
|
48
|
-
collectType: 0,
|
|
49
|
-
collectOpcode: goods.rsSkuDomainList[0].skuCode || ''
|
|
50
|
-
};
|
|
51
|
-
yield deleteCollectByCode(deleteCollectByCodeParams);
|
|
52
|
-
});
|
|
53
|
-
const handleCollect = () => {
|
|
54
|
-
console.log(123);
|
|
55
|
-
if (isEmpty(checkCollectionObj.dataObj)) {
|
|
56
|
-
handleSaveCollect();
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
handleDeleteCollectByCode();
|
|
60
|
-
}
|
|
61
|
-
checkCollection();
|
|
62
|
-
};
|
|
63
|
-
return (_jsxs(View, Object.assign({ onClick: handleCollect }, { children: [_jsx("img", { src: SEARCH, alt: "", className: 'icon' }), _jsx(Text, Object.assign({ className: 'txt' }, { children: isEmpty(checkCollectionObj.dataObj) ? '收藏' : '已收藏' }))] })));
|
|
64
|
-
};
|