🐳 chore(迁移仓库): 迁移仓库到新的仓库

This commit is contained in:
xuan 2022-08-29 16:36:38 +08:00
parent 5b5d4bb8e2
commit 9eb68f8d91
15 changed files with 167 additions and 28 deletions

View File

@ -43,7 +43,7 @@
"@tarojs/react": "3.5.4",
"@tarojs/runtime": "3.5.4",
"@tarojs/taro": "3.5.4",
"big.js": "^6.1.1",
"big.js": "^6.2.1",
"dayjs": "^1.11.3",
"qs": "^6.10.3",
"react": "^18.2.0",

View File

@ -4,7 +4,7 @@
"description": "项目配置文件详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"appid": "wx64fe67f111d52457",
"setting": {
"urlCheck": true,
"urlCheck": false,
"es6": false,
"postcss": false,
"minified": false,
@ -45,4 +45,4 @@
"tabIndent": "insertSpaces",
"tabSize": 2
}
}
}

View File

@ -1,9 +1,5 @@
export default {
pages: [
'pages/index/index',
'pages/order/index',
'pages/user/index',
],
export default defineAppConfig({
pages: ['pages/user/index', 'pages/index/index', 'pages/order/index', 'pages/shopping/index'],
window: {
backgroundTextStyle: 'light',
navigationBarBackgroundColor: '#fff',
@ -19,6 +15,12 @@ export default {
iconPath: './styles/tabbar/list.png',
selectedIconPath: './styles/tabbar/list_on.png',
},
{
pagePath: 'pages/shopping/index',
text: '购物',
iconPath: './styles/tabbar/order.png',
selectedIconPath: './styles/tabbar/order_on.png',
},
{
pagePath: 'pages/order/index',
text: '订单',
@ -30,15 +32,12 @@ export default {
text: '我的',
iconPath: './styles/tabbar/my.png',
selectedIconPath: './styles/tabbar/my_on.png',
}
},
],
'color': '#707070',
'selectedColor': '#2680EB',
'backgroundColor': '#fff',
'borderStyle': 'white'
color: '#707070',
selectedColor: '#2680EB',
backgroundColor: '#fff',
borderStyle: 'white',
},
subPackages: [
]
}
subPackages: [],
})

View File

@ -0,0 +1,45 @@
.divider {
position: relative;
// 垂直
&-vertical {
display: inline-block;
width: 1px;
height: 1em;
margin: 0 8px;
border-left: 1px $borderStyle $borderColor;
vertical-align: middle;
}
// 水平
&-horizontal {
display: block;
width: 100%;
height: 1px;
margin: 48px 0;
border-top: 1px $borderStyle $borderColor;
}
&-text{
position: absolute;
text-align: center;
padding: 0 40px;
font-weight: 500;
font-size: 28px;
color: #333;
background-color: #fff;
}
}
.is{
&-center{
left: 50%;
transform: translateX(-50%) translateY(-50%);
}
&-left{
left: 20px;
transform:translateY(-50%);
}
&-right{
right: 20px;
transform:translateY(-50%);
}
}

View File

@ -0,0 +1,57 @@
/**
* Usage:
*
* <View></View>
* <Divider direction="vertical" borderStyle="solid"></Divider
* <View></View>
*
*/
import { View } from "@tarojs/components";
import { FC, ReactNode } from "react";
import styles from "./index.module.scss";
import classnames from "classnames";
type BorderStype = 'solid' | 'dashed' | 'dotted' | 'double'
interface DividerProps {
direction?: "horizontal" | "vertical";
borderStyle?: BorderStype;
contentPosition?: "left" | "center" | "right";
children?: ReactNode;
}
const Divider: FC<DividerProps> = props => {
const {
direction = "horizontal",
borderStyle = "solid",
contentPosition = "center"
} = props;
const classname = classnames(
styles["divider"],
styles["divider-" + direction]
);
const contentClassname = classnames(
styles["divider-text"],
styles["is-" + contentPosition]
);
const borderTopStyle: { borderTopStyle: BorderStype } = {
borderTopStyle: borderStyle
};
const borderLeftStyle: { borderLeftStyle: BorderStype } = {
borderLeftStyle: borderStyle
};
const dividerStyle =
direction === "horizontal" ? borderTopStyle : borderLeftStyle;
return (
<View className={classname} style={dividerStyle}>
{props.children && direction !== "vertical" && (
<View className={contentClassname}>{props.children}</View>
)}
</View>
);
};
export default Divider

View File

@ -17,4 +17,4 @@ export default memo(({onClose, styleObj = {}}:Params) => {
<Text className={`iconfont icon-qingkong ${style.icon_a_btn}`}></Text>
</View>
)
})
})

View File

@ -25,7 +25,7 @@ export default memo(({list = [], defaultValue = 0, tabsOnClick, style={}}: Param
useEffect(() => {
const index = list?.findIndex(item => {
return item.value == defaultValue
return item.value == defaultValue
})
if(index !== -1) {
const num = index > 0?( index - 1) : 0
@ -58,4 +58,4 @@ export default memo(({list = [], defaultValue = 0, tabsOnClick, style={}}: Param
</View>
</>
)
})
})

View File

@ -1 +1,7 @@
import { View } from "@tarojs/components"
const Order = () => {
return <View></View>
}
export default Order

View File

@ -0,0 +1,3 @@
export default {
navigationBarTitleText: '购物页面',
}

View File

@ -0,0 +1,9 @@
import { isEmptyObject } from '@/common/common'
import { View } from '@tarojs/components'
const User = () => {
const obj = {}
console.log(isEmptyObject(obj))
return <View>sdfasdfasdf</View>
}
export default User

View File

@ -1,3 +1,8 @@
export default {
navigationBarTitleText: '我的',
}
export default definePageConfig({
navigationBarTitleText: '我的',
navigationBarTextStyle: 'white',
navigationBarBackgroundColor: '#4581FF',
backgroundColor: '#4581FF',
backgroundColorTop: '#4581FF',
enablePullDownRefresh: true
})

View File

@ -0,0 +1,5 @@
.main{
width: 100%;
min-height: 100vh;
background: linear-gradient(to bottom, $color_main 25%, $color_bg_one 42%);
}

View File

@ -0,0 +1,10 @@
import { isEmptyObject } from '@/common/common'
import { View } from '@tarojs/components'
import styles from './index.module.scss'
// 我的
const User = () => {
const obj = {}
console.log(isEmptyObject(obj))
return <View className={styles['main']}>sdfasdfasdf</View>
}
export default User

View File

@ -3,7 +3,7 @@ $color_bg_one: #F8F8F8;
$color_font_one: #3C3C3C;
$color_font_two: #ABABAB;
$color_font_three: #707070;
$color_main: #007AFF;
$color_main: #4581FF;
$font_size_big: 32px;
$font_size: 28px;

View File

@ -4370,9 +4370,9 @@ big.js@^5.2.2:
resolved "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz"
integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==
big.js@^6.1.1:
big.js@^6.2.1:
version "6.2.1"
resolved "https://registry.npmmirror.com/big.js/-/big.js-6.2.1.tgz"
resolved "https://registry.npmmirror.com/big.js/-/big.js-6.2.1.tgz#7205ce763efb17c2e41f26f121c420c6a7c2744f"
integrity sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ==
binary-extensions@^2.0.0: