diff --git a/yudao-ui-app/app.scss b/yudao-ui-app/app.scss index 954306e77..14dd7a1b1 100644 --- a/yudao-ui-app/app.scss +++ b/yudao-ui-app/app.scss @@ -1,52 +1,7 @@ /* 页面公共scss */ .container { padding-top: var(--status-bar-height);//uni-app提供了状态栏高度的css变量--status-bar-height - background-color: $uni-bg-color; + background-color: $custom-bg-color; box-sizing: border-box; height: 100%; } - -/* 布局间距 */ -.m-0-r { - margin: 0rpx; -} - -.mtb-0-r { - margin-top: 0rpx; - margin-bottom: 0rpx; -} - -.no-mlt { - margin-left: 0rpx; - margin-right: 0rpx; -} - -.mtb-30-r { - margin-top: 30rpx; - margin-bottom: 30rpx; -} - -.mlr-30-r { - margin-left: 30rpx; - margin-right: 30rpx; -} - -.mt-20-r {margin-top: 20rpx;} -.mt-30-r {margin-top: 30rpx;} -.mt-40-r {margin-top: 40rpx;} -.mt-50-r {margin-top: 50rpx;} - -.mb-20-r {margin-bottom: 20rpx;} -.mb-30-r {margin-bottom: 30rpx;} -.mb-40-r {margin-bottom: 40rpx;} -.mb-50-r {margin-bottom: 50rpx;} - -.ml-20-r {margin-left: 20rpx;} -.ml-30-r {margin-left: 30rpx;} -.ml-40-r {margin-left: 40rpx;} -.ml-50-r {margin-left: 50rpx;} - -.mr-20-r {margin-right: 20rpx;} -.mr-30-r {margin-right: 30rpx;} -.mr-40-r {margin-right: 40rpx;} -.mr-50-r {margin-right: 50rpx;} diff --git a/yudao-ui-app/common/props.js b/yudao-ui-app/common/props.js index 30f4924f4..935e6a54b 100644 --- a/yudao-ui-app/common/props.js +++ b/yudao-ui-app/common/props.js @@ -1,2 +1,3 @@ +/* uView组件全局属性 */ uni.$u.props.gap.bgColor = '#ffffff' uni.$u.props.gap.height = '10' diff --git a/yudao-ui-app/pages.json b/yudao-ui-app/pages.json index 6ff317445..a8e16a38e 100644 --- a/yudao-ui-app/pages.json +++ b/yudao-ui-app/pages.json @@ -47,6 +47,12 @@ "style": { "navigationBarTitleText": "个人资料" } + }, + { + "path": "pages/product/product", + "style": { + "navigationBarTitleText": "商品详情" + } } ], "tabBar": { diff --git a/yudao-ui-app/pages/category/category.vue b/yudao-ui-app/pages/category/category.vue index 793da35cc..3e92eb6a7 100644 --- a/yudao-ui-app/pages/category/category.vue +++ b/yudao-ui-app/pages/category/category.vue @@ -1,24 +1,217 @@ diff --git a/yudao-ui-app/pages/forgot/forgot.vue b/yudao-ui-app/pages/forgot/forgot.vue index d8c415440..be9021b07 100644 --- a/yudao-ui-app/pages/forgot/forgot.vue +++ b/yudao-ui-app/pages/forgot/forgot.vue @@ -174,8 +174,8 @@ export default { justify-content: space-between; font-size: 12rpx; - color: #3c9cff; - text-decoration: #3c9cff; + color: $u-primary; + text-decoration: $u-primary; } diff --git a/yudao-ui-app/pages/index/index.vue b/yudao-ui-app/pages/index/index.vue index 240603e00..d20adb139 100644 --- a/yudao-ui-app/pages/index/index.vue +++ b/yudao-ui-app/pages/index/index.vue @@ -15,14 +15,16 @@ + + - - - - {{item.title}} - - - + + + {{item.title}} + + + + @@ -37,14 +39,14 @@ - - + + - + - + @@ -62,15 +64,15 @@ - - + + - - + + - + @@ -89,15 +91,16 @@ - - + + - - + + + - + @@ -138,11 +141,41 @@ export default { '一片冰心在玉壶' ], productList: [ - 'https://cdn.uviewui.com/uview/album/1.jpg', - 'https://cdn.uviewui.com/uview/album/2.jpg', - 'https://cdn.uviewui.com/uview/album/3.jpg', - 'https://cdn.uviewui.com/uview/album/4.jpg', - 'https://cdn.uviewui.com/uview/album/5.jpg', + { + id: 1, + image: 'https://cdn.uviewui.com/uview/album/1.jpg', + title: '山不在高,有仙则名。水不在深,有龙则灵。斯是陋室,惟吾德馨。', + desc: '山不在于高,有了神仙就会有名气。水不在于深,有了龙就会有灵气。这是简陋的房子,只是我品德好就感觉不到简陋了。', + price: '13.00' + }, + { + id: 2, + image: 'https://cdn.uviewui.com/uview/album/2.jpg', + title: '商品222', + desc: '', + price: '23.00' + }, + { + id: 3, + image: 'https://cdn.uviewui.com/uview/album/3.jpg', + title: '商品333', + desc: '商品描述信息2', + price: '33.00' + }, + { + id: 4, + image: 'https://cdn.uviewui.com/uview/album/4.jpg', + title: '商品444', + desc: '商品描述信息4', + price: '43.00' + }, + { + id: 5, + image: 'https://cdn.uviewui.com/uview/album/5.jpg', + title: '商品555', + desc: '商品描述信息5', + price: '53.00' + } ], status: 'nomore', loadingText: '努力加载中...', @@ -174,6 +207,11 @@ export default { }, handleSwiperClick(index){ console.log('点击了图片索引值:',index) + }, + handleProdItemClick(productId){ + uni.$u.route('/pages/product/product', { + productId: productId + }); } }, computed: { @@ -198,7 +236,7 @@ export default { diff --git a/yudao-ui-app/pages/register/register.vue b/yudao-ui-app/pages/register/register.vue index b82e4f8fc..062ebbc78 100644 --- a/yudao-ui-app/pages/register/register.vue +++ b/yudao-ui-app/pages/register/register.vue @@ -136,8 +136,8 @@ export default { justify-content: space-between; font-size: 12rpx; - color: #3c9cff; - text-decoration: #3c9cff; + color: $u-primary; + text-decoration: $u-primary; } diff --git a/yudao-ui-app/pages/user/user.vue b/yudao-ui-app/pages/user/user.vue index 7c070348c..789016116 100644 --- a/yudao-ui-app/pages/user/user.vue +++ b/yudao-ui-app/pages/user/user.vue @@ -7,7 +7,7 @@ - + @@ -18,7 +18,7 @@ - + {{item.title}} @@ -27,16 +27,17 @@ - - - + + + + {{item.value}} {{item.title}} - + @@ -57,7 +58,7 @@ avatar:'', nickName:'点击登录', orderStatusList: [{icon: 'rmb-circle', title: '待支付'}, {icon: 'car', title: '代发货'}, {icon: 'order', title: '待收货'}, {icon: 'integral', title: '已完成'}], - statisticsList: [{value: '2', title: '我的收藏'}, {value: '3', title: '我的消息'}, {value: '3', title: '我的足迹'}] + statList: [{value: '2', title: '我的收藏'}, {value: '3', title: '我的消息'}, {value: '3', title: '我的足迹'}] } }, onLoad() { @@ -101,7 +102,7 @@ align-items: center; justify-content: space-between; padding: 20rpx 30rpx; - border-bottom: 1rpx solid #f3f3f3; + border-bottom: $custom-border-style; .order-title { color: #333333; @@ -118,6 +119,14 @@ } } +.order-status-box { + padding: 40rpx 0; +} + +.stat-box { + padding: 20rpx 0; +} + .grid-title { line-height: 50rpx; font-size: 26rpx; @@ -134,7 +143,7 @@ .fun-item { padding-top: 10rpx; padding-bottom: 10rpx; - border-bottom: 1rpx solid #f3f3f3; + border-bottom: $custom-border-style; } } diff --git a/yudao-ui-app/uni.scss b/yudao-ui-app/uni.scss index b54d6b3b2..0ebf216e1 100644 --- a/yudao-ui-app/uni.scss +++ b/yudao-ui-app/uni.scss @@ -15,65 +15,10 @@ /* 引入uView主题样式 */ @import '@/uni_modules/uview-ui/theme.scss'; -/* 颜色变量 */ +/* 全局自定义scss变量 */ -/* 行为相关颜色 */ -$uni-color-primary: #007aff; -$uni-color-success: #4cd964; -$uni-color-warning: #f0ad4e; -$uni-color-error: #dd524d; +/* 页面背景颜色 */ +$custom-bg-color: #ffffff; -/* 文字基本颜色 */ -$uni-text-color:#333;//基本色 -$uni-text-color-inverse:#fff;//反色 -$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 -$uni-text-color-placeholder: #808080; -$uni-text-color-disable:#c0c0c0; - -/* 背景颜色 */ -$uni-bg-color:#ffffff; -$uni-bg-color-grey:#f8f8f8; -$uni-bg-color-hover:#f1f1f1;//点击状态颜色 -$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 - -/* 边框颜色 */ -$uni-border-color:#c8c7cc; - -/* 尺寸变量 */ - -/* 文字尺寸 */ -$uni-font-size-sm:12px; -$uni-font-size-base:14px; -$uni-font-size-lg:16; - -/* 图片尺寸 */ -$uni-img-size-sm:20px; -$uni-img-size-base:26px; -$uni-img-size-lg:40px; - -/* Border Radius */ -$uni-border-radius-sm: 2px; -$uni-border-radius-base: 3px; -$uni-border-radius-lg: 6px; -$uni-border-radius-circle: 50%; - -/* 水平间距 */ -$uni-spacing-row-sm: 5px; -$uni-spacing-row-base: 10px; -$uni-spacing-row-lg: 15px; - -/* 垂直间距 */ -$uni-spacing-col-sm: 4px; -$uni-spacing-col-base: 8px; -$uni-spacing-col-lg: 12px; - -/* 透明度 */ -$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 - -/* 文章场景相关 */ -$uni-color-title: #2C405A; // 文章标题颜色 -$uni-font-size-title:20px; -$uni-color-subtitle: #555555; // 二级标题颜色 -$uni-font-size-subtitle:26px; -$uni-color-paragraph: #3F536E; // 文章段落颜色 -$uni-font-size-paragraph:15px; +/* 边框样式 */ +$custom-border-style: 1rpx solid #f3f3f3; diff --git a/yudao-ui-app/uni_modules/uview-ui/components/u--text-price/u--text-price.vue b/yudao-ui-app/uni_modules/uview-ui/components/u--text-price/u--text-price.vue index eb861ac72..0911a3627 100644 --- a/yudao-ui-app/uni_modules/uview-ui/components/u--text-price/u--text-price.vue +++ b/yudao-ui-app/uni_modules/uview-ui/components/u--text-price/u--text-price.vue @@ -1,32 +1,39 @@ \ No newline at end of file