s-material-react 0.1.19 → 0.1.20
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.js +1 -0
- package/dist/common/icon/index.js +1 -0
- package/dist/components/AddressDetail/config.js +1 -0
- package/dist/components/AddressDetail/index.js +1 -0
- package/dist/components/Cart/components/cartItem.js +1 -0
- package/dist/components/Cart/index.js +1 -0
- package/dist/components/ClassifyNav/index.js +1 -0
- package/dist/components/CouponList/index.js +1 -0
- package/dist/components/Cube/index.js +1 -0
- package/dist/components/Goods/index.js +1 -0
- package/dist/components/GoodsDetail/components/goodsDetailCoupon.js +3 -1
- package/dist/components/GoodsDetail/components/goodsDetailHandleBar.js +2 -2
- package/dist/components/GoodsDetail/components/goodsDetailPopup.js +1 -1
- package/dist/components/GoodsDetail/components/goodsDetailPromotion.js +1 -0
- package/dist/components/GoodsDetail/components/goodsDetailSize.js +2 -1
- package/dist/components/GoodsDetail/index.js +1 -0
- package/dist/components/GoodsGroup/index.js +1 -0
- package/dist/components/GoodsList/index.js +1 -0
- package/dist/components/OrderDetail/index.js +1 -0
- package/dist/components/OrderList/components/orderListItem.js +1 -1
- package/dist/components/PaymentMode/hooks/useOrderResult.js +1 -2
- package/dist/components/PaymentMode/index.js +1 -0
- package/dist/components/PlaceOrderResult/index.js +6 -4
- package/dist/components/Search/index.js +1 -0
- package/dist/components/SearchPage/index.js +1 -0
- package/dist/components/Slider/index.js +3 -14
- package/dist/components/Slider/item.js +1 -0
- package/package.json +11 -9
|
@@ -391,10 +391,11 @@
|
|
|
391
391
|
display: inline-block;
|
|
392
392
|
border-radius: 4px;
|
|
393
393
|
color: #a7a7a7;
|
|
394
|
-
|
|
394
|
+
margin-bottom: 10px;
|
|
395
395
|
&.active {
|
|
396
396
|
//background: #346fc2;
|
|
397
|
-
|
|
397
|
+
background: #000000;
|
|
398
|
+
color: #fff;
|
|
398
399
|
border-color: #1a1a1a;
|
|
399
400
|
}
|
|
400
401
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
//@ts-nocheck
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import { useComponent } from '@brushes/qj-simulate-component';
|
|
4
5
|
export const QjMobileIcon = ({ className = 'iconfont', prefixClass = 'icon', onClick = () => { }, style = {
|
|
@@ -8,6 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
//@ts-nocheck
|
|
11
12
|
import { useComponent, NumStep, SmoothCheckbox } from '@brushes/qj-simulate-component';
|
|
12
13
|
import { useDispatchImpl, useStore, useCartList } from 'qj-mobile-store';
|
|
13
14
|
export function CartItem({ list }) {
|
|
@@ -8,6 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
//@ts-nocheck
|
|
11
12
|
import { useEffect, useState, memo, useRef } from 'react';
|
|
12
13
|
import { navigatorImpl, useComponent } from '@brushes/qj-simulate-component';
|
|
13
14
|
import { querySkuNotOnShelf } from '@brushes/api';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
//@ts-nocheck
|
|
2
3
|
import { useComponent, Popup, SmoothRadio } from '@brushes/qj-simulate-component';
|
|
3
4
|
import { THREE_DOTS } from '../../../static';
|
|
4
5
|
import { useState } from 'react';
|
|
5
6
|
import { Coupon } from '../../../common/coupon';
|
|
6
|
-
import {
|
|
7
|
+
import { goodsDetailStore } from 'qj-mobile-store';
|
|
8
|
+
const { useDispatchImpl, useStore } = goodsDetailStore;
|
|
7
9
|
const fake = [
|
|
8
10
|
{
|
|
9
11
|
title: '五一大促疯抢 满100立减10',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { switchTabImpl, useComponent, IconMobile } from '@brushes/qj-simulate-component';
|
|
3
|
-
import {
|
|
3
|
+
import { goodsDetailStore } from 'qj-mobile-store';
|
|
4
4
|
import { routerMap } from '../../../routerMap';
|
|
5
5
|
export const GoodsDetailHandleBar = () => {
|
|
6
6
|
const { Text, View } = useComponent();
|
|
7
|
-
const dispatch = useDispatchImpl();
|
|
7
|
+
const dispatch = goodsDetailStore.useDispatchImpl();
|
|
8
8
|
return (_jsxs(View, Object.assign({ className: 'goodsDetailHandleBar' }, { children: [_jsxs(View, Object.assign({ className: 'linkGroup' }, { children: [_jsx(IconMobile, { value: 'kefu', style: { fontSize: 22, display: 'block' } }), _jsx(Text, Object.assign({ className: 'txt' }, { children: "\u5BA2\u670D" }))] })), _jsxs(View, Object.assign({ className: 'linkGroup', onClick: () => switchTabImpl(routerMap.shopping) }, { children: [_jsx(IconMobile, { value: 'gouwuche', style: { fontSize: 22, display: 'block' } }), _jsx(Text, Object.assign({ className: 'txt' }, { children: "\u8D2D\u7269\u8F66" }))] })), _jsxs(View, Object.assign({ className: 'btnGroup' }, { children: [_jsx(View, Object.assign({ className: 'btn addCart', onClick: () => {
|
|
9
9
|
dispatch({
|
|
10
10
|
type: 'popupImpl',
|
|
@@ -5,7 +5,7 @@ import { useComponent } from '@brushes/qj-simulate-component';
|
|
|
5
5
|
export const GoodsDetailPopup = ({ goods }) => {
|
|
6
6
|
const { count, spec, popupVisible, isNeedButton, handleChooseSize, handleStep, popupHandler, addShoppingImpl } = useAddShopping();
|
|
7
7
|
const { View, Text, Image } = useComponent();
|
|
8
|
-
return (_jsx(Popup, Object.assign({ popupVisible: popupVisible, popupHandler: popupHandler }, { children: _jsxs(View, Object.assign({ className: 'goodsDetail-size-popup' }, { children: [_jsxs(View, Object.assign({ className: 'content' }, { children: [_jsxs(View, Object.assign({ className: 'goodsInfo' }, { children: [_jsx(View, Object.assign({ className: 'lPart' }, { children: _jsx(Image, { src: goods.dataPic, alt: "", className: 'goodsImg' }) })), _jsxs(View, Object.assign({ className: 'rPart' }, { children: [_jsx(View, Object.assign({ className: 'name' }, { children: goods.goodsShowname || '' })), _jsxs(View, Object.assign({ className: 'price' }, { children: ["\uFFE5 ", goods.pricesetNprice.toFixed(2) || ''] })), _jsxs(View, Object.assign({ className: 'chosen' }, { children: ["\u5DF2\u9009\u62E9: ", spec] }))] }))] })), _jsxs(View, Object.assign({ className: 'sizeArr' }, { children: [_jsx(Text, Object.assign({ className: 'title' }, { children: "\u9009\u62E9\
|
|
8
|
+
return (_jsx(Popup, Object.assign({ popupVisible: popupVisible, popupHandler: popupHandler }, { children: _jsxs(View, Object.assign({ className: 'goodsDetail-size-popup' }, { children: [_jsxs(View, Object.assign({ className: 'content' }, { children: [_jsxs(View, Object.assign({ className: 'goodsInfo' }, { children: [_jsx(View, Object.assign({ className: 'lPart' }, { children: _jsx(Image, { src: goods.dataPic, alt: "", className: 'goodsImg' }) })), _jsxs(View, Object.assign({ className: 'rPart' }, { children: [_jsx(View, Object.assign({ className: 'name' }, { children: goods.goodsShowname || '' })), _jsxs(View, Object.assign({ className: 'price' }, { children: ["\uFFE5 ", goods.pricesetNprice.toFixed(2) || ''] })), _jsxs(View, Object.assign({ className: 'chosen' }, { children: ["\u5DF2\u9009\u62E9: ", spec] }))] }))] })), _jsxs(View, Object.assign({ className: 'sizeArr' }, { children: [_jsx(Text, Object.assign({ className: 'title' }, { children: "\u9009\u62E9\u89C4\u683C" })), _jsx(View, Object.assign({ className: 'sizeArrItemWrap' }, { children: goods.rsSpecValueDomainList.map((item, index) => {
|
|
9
9
|
return (_jsx(View, Object.assign({ className: `sizeItem ${spec === item.specValueValue ? 'active' : ''}`, onClick: handleChooseSize.bind(null, item.specValueValue) }, { children: item.specValueValue }), index));
|
|
10
10
|
}) }))] })), _jsxs(View, Object.assign({ className: 'countWrap' }, { children: [_jsx(View, Object.assign({ className: 'label' }, { children: "\u8D2D\u4E70\u6570\u91CF" })), _jsx(NumStep, { count: count, handleStep: handleStep })] }))] })), isNeedButton && (_jsx(View, Object.assign({ className: 'btnWrap', onClick: addShoppingImpl }, { children: _jsx(Text, Object.assign({ className: 'btn' }, { children: "\u786E\u8BA4" })) })))] })) })));
|
|
11
11
|
};
|
|
@@ -2,7 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { useComponent } from '@brushes/qj-simulate-component';
|
|
3
3
|
import { THREE_DOTS } from '../../../static';
|
|
4
4
|
import { GoodsDetailPopup } from './goodsDetailPopup';
|
|
5
|
-
import {
|
|
5
|
+
import { goodsDetailStore } from 'qj-mobile-store';
|
|
6
|
+
const { useDispatchImpl, useStore } = goodsDetailStore;
|
|
6
7
|
export const GoodsDetailSize = ({ goods }) => {
|
|
7
8
|
const { View, Text } = useComponent();
|
|
8
9
|
const { count, spec } = useStore();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
//@ts-nocheck
|
|
2
3
|
import { memo, useState } from 'react';
|
|
3
4
|
import { Loading, navigatorImpl, ScrollView, useComponent } from '@brushes/qj-simulate-component';
|
|
4
5
|
import { QjMobileIcon } from '../../common/icon';
|
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { createElement as _createElement } from "react";
|
|
12
|
+
//@ts-nocheck
|
|
12
13
|
import { memo, useEffect, useState } from 'react';
|
|
13
14
|
import { getEnv, queryContractPageC } from '@brushes/api';
|
|
14
15
|
import { useComponent, ScrollView, Loading } from '@brushes/qj-simulate-component';
|
|
@@ -32,7 +33,6 @@ function OrderListItemJsx({ item }) {
|
|
|
32
33
|
console.log(err);
|
|
33
34
|
}
|
|
34
35
|
});
|
|
35
|
-
console.log('23=====>', data);
|
|
36
36
|
return (_jsx(View, Object.assign({ className: 'orderListItemWrap', style: { height: isTaro ? '100vh' : '667px' } }, { children: _jsx(ScrollView, Object.assign({ onScroll: onScroll, style: { height: '100vh' } }, { children: _jsxs(View, { children: [data.map((item, index) => (_createElement(Item, Object.assign({}, item, { key: index })))), loading ? _jsx(Loading, {}) : null] }) })) })));
|
|
37
37
|
}
|
|
38
38
|
export const OrderListItem = memo(OrderListItemJsx);
|
|
@@ -7,10 +7,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
+
//@ts-nocheck
|
|
10
11
|
import { useEffect, useRef, useState } from 'react';
|
|
11
12
|
import { saveOrderToPay, syncContractState, paymentCommit } from '../../../utils/payment';
|
|
12
|
-
import { _ } from '@brushes/tools';
|
|
13
|
-
const { get } = _;
|
|
14
13
|
export function useOrderResult(code) {
|
|
15
14
|
const [loading, setLoading] = useState(false);
|
|
16
15
|
const channel = useRef('');
|
|
@@ -2,15 +2,17 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { memo } from 'react';
|
|
3
3
|
import { navigatorImpl, useComponent } from '@brushes/qj-simulate-component';
|
|
4
4
|
import { getEnv } from '@brushes/api';
|
|
5
|
-
import { routerMap } from '../../routerMap';
|
|
6
|
-
import { useOrderResultResult } from 'qj-mobile-store';
|
|
5
|
+
// import { routerMap } from '../../routerMap';
|
|
6
|
+
import { useOrderResultResult, routerMap } from 'qj-mobile-store';
|
|
7
7
|
const { useOrderResult } = useOrderResultResult;
|
|
8
8
|
const flag = getEnv();
|
|
9
9
|
const PlaceOrderResultJsx = ({ code }) => {
|
|
10
10
|
const { View, Text } = useComponent();
|
|
11
|
-
const {
|
|
11
|
+
const { result } = useOrderResult(code);
|
|
12
|
+
const { sysRecode, dataObj } = result;
|
|
13
|
+
console.log('15=====>', dataObj);
|
|
12
14
|
return (_jsx(View, Object.assign({ className: 'placeOrderResult', style: {
|
|
13
15
|
height: flag ? '100vh' : '667px'
|
|
14
|
-
} }, { children: _jsxs(View, Object.assign({ className: 'placeOrderResultContent' }, { children: [_jsx(Text, { className: 'icon' }),
|
|
16
|
+
} }, { children: sysRecode ? (_jsxs(View, Object.assign({ className: 'placeOrderResultContent' }, { children: [_jsx(Text, { className: 'icon' }), _jsx(View, Object.assign({ className: 'tips' }, { children: _jsx(Text, Object.assign({ className: 'title' }, { children: "\u8BA2\u5355\u652F\u4ED8\u6210\u529F" })) })), _jsxs(View, Object.assign({ className: 'placeOrderResultWrap' }, { children: [_jsxs(View, Object.assign({ className: 'placeOrderResultItem' }, { children: [_jsx(Text, Object.assign({ className: 'label' }, { children: "\u8BA2\u5355\u53F7\uFF1A" })), _jsx(Text, Object.assign({ className: 'value' }, { children: dataObj.contractBillcode }))] })), _jsxs(View, Object.assign({ className: 'placeOrderResultItem' }, { children: [_jsx(Text, Object.assign({ className: 'label' }, { children: "\u652F\u4ED8\u65B9\u5F0F\uFF1A" })), _jsx(Text, Object.assign({ className: 'value' }, { children: dataObj.contractType === '00' ? '微信支付' : '其他' }))] })), _jsxs(View, Object.assign({ className: 'placeOrderResultItem' }, { children: [_jsx(Text, Object.assign({ className: 'label' }, { children: "\u652F\u4ED8\u91D1\u989D\uFF1A" })), _jsxs(Text, Object.assign({ className: 'value' }, { children: ["\uFFE5 ", dataObj.dataBmoney] }))] }))] })), _jsxs(View, Object.assign({ className: 'btnGroup' }, { children: [_jsx(View, Object.assign({ className: 'btn black', onClick: () => navigatorImpl(`${routerMap.orderDetail}?contractBillcode=${dataObj.contractBillcode}`) }, { children: "\u67E5\u770B\u8BA2\u5355" })), _jsx(View, Object.assign({ onClick: () => navigatorImpl(routerMap.classify), className: 'btn white' }, { children: "\u7EE7\u7EED\u8D2D\u7269" }))] }))] }))) : (_jsxs(View, Object.assign({ className: 'placeOrderResultContent' }, { children: [_jsx(Text, { className: 'icon' }), _jsxs(View, Object.assign({ className: 'tips' }, { children: [_jsx(Text, Object.assign({ className: 'title' }, { children: "\u8BA2\u5355\u652F\u4ED8\u5931\u8D25" })), _jsx(Text, Object.assign({ className: 'tip' }, { children: "\u60A8\u7684\u8BA2\u5355\u5C06\u4FDD\u755915\u5206\u949F\uFF0C\u53EF\u70B9\u51FB\u4E0B\u65B9\u201C\u53BB\u652F\u4ED8\u201D\u5B8C\u6210\u8BA2\u5355" }))] })), _jsx(View, Object.assign({ className: 'btnGroup' }, { children: _jsx(View, Object.assign({ onClick: () => navigatorImpl(`${routerMap.paymentMode}?code=${result.contractBillcode}`), className: 'btn white' }, { children: "\u53BB\u652F\u4ED8" })) }))] }))) })));
|
|
15
17
|
};
|
|
16
18
|
export const PlaceOrderResult = memo(PlaceOrderResultJsx);
|
|
@@ -8,6 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
//@ts-nocheck
|
|
11
12
|
import { memo, useEffect, useState } from 'react';
|
|
12
13
|
import { navigatorImpl, useComponent, navigatorBackImpl } from '@brushes/qj-simulate-component';
|
|
13
14
|
import { SEARCH } from '../../static';
|
|
@@ -1,23 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
//@ts-nocheck
|
|
3
3
|
import { memo } from 'react';
|
|
4
4
|
import { SmoothSwiper, View } from '@brushes/qj-simulate-component';
|
|
5
5
|
import { getEnv } from '@brushes/api';
|
|
6
|
-
import { _ } from '@brushes/tools';
|
|
7
6
|
import { Items } from './item';
|
|
8
|
-
|
|
7
|
+
import { useCube } from 'qj-mobile-store';
|
|
9
8
|
const SwiperJsx = ({ defaultValue = [], type, autoplay, autoplayInterval, direction, loop, paddingTop, paddingBottom, paddingLeft, paddingRight, selectImg, imgHeight }) => {
|
|
10
|
-
const
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
const computedArr = selectImg
|
|
13
|
-
.filter((item) => !isUndefined(item))
|
|
14
|
-
.filter((item) => !Object.values(item).every((citem) => isUndefined(citem)));
|
|
15
|
-
let arr = defaultValue;
|
|
16
|
-
if (!isEmpty(computedArr)) {
|
|
17
|
-
arr = computedArr;
|
|
18
|
-
}
|
|
19
|
-
setList(arr);
|
|
20
|
-
}, [selectImg]);
|
|
9
|
+
const list = useCube(defaultValue, selectImg);
|
|
21
10
|
return (_jsx(View, Object.assign({ style: {
|
|
22
11
|
paddingTop,
|
|
23
12
|
paddingBottom,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "s-material-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"description": "'组件库'",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": [
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
16
|
"start": "concurrently npm:start:*",
|
|
17
|
-
"start:ts": "
|
|
17
|
+
"start:ts": "rollup -c -w",
|
|
18
18
|
"start:css": "npx nodemon --config ./nodemon.json",
|
|
19
19
|
"cp-css": "rm -rf css/ && mkdir -p ./css && cp -R src/scss/* ./css",
|
|
20
20
|
"build": "npm run cp-css && rm -rf dist/ && prettier --write src/ && tsc",
|
|
@@ -32,17 +32,19 @@
|
|
|
32
32
|
"@brushes/qj-simulate-component": "^0.1.1",
|
|
33
33
|
"@brushes/tools": "^1.0.31",
|
|
34
34
|
"@stencil/core": "^2.19.1",
|
|
35
|
-
"@types/node": ">18.0.0",
|
|
36
|
-
"@types/react": "^18.0.0",
|
|
37
35
|
"china-division": "^2.5.0",
|
|
38
36
|
"classnames": "^2.3.2",
|
|
37
|
+
"qj-mobile-store": "^1.0.5",
|
|
38
|
+
"react": "^18.0.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@rollup/plugin-terser": "^0.4.0",
|
|
42
|
+
"@types/node": ">18.0.0",
|
|
43
|
+
"@types/react": "^18.0.0",
|
|
44
|
+
"concurrently": "^7.5.0",
|
|
39
45
|
"nodemon": "^2.0.19",
|
|
40
46
|
"prettier": "^2.7.1",
|
|
41
|
-
"
|
|
42
|
-
"react": "^18.0.0",
|
|
47
|
+
"rollup-plugin-typescript2": "^0.34.1",
|
|
43
48
|
"typescript": ">4.0.0"
|
|
44
|
-
},
|
|
45
|
-
"devDependencies": {
|
|
46
|
-
"concurrently": "^7.5.0"
|
|
47
49
|
}
|
|
48
50
|
}
|