Merge pull request 'zhy' (#8) from zhy into master

Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/8
This commit is contained in:
hanshu 2020-06-02 16:09:50 +08:00
commit 45079580d4
13 changed files with 801 additions and 34 deletions

View File

@ -0,0 +1,154 @@
<template>
<view class="address">
<radio-group @change="changeDefault">
<view v-for="(item, index) in addressList" :key="index" class="address-item">
<view class="item-top">
<view class="user-info">
<view class="user-name">王先生</view>
<view class="user-pnone">174****7492</view>
</view>
<view class="user-address">山东省临沂市兰山区金雀山街道巴啦啦小区三号楼101室</view>
</view>
<view class="item-bottom">
<view class="item-default">
<radio :value="item" :checked="index === current" color="#FF770F" class="radio-class" />
<view :class="[item == current ? 'radio-default' : 'radio-others']">
{{ item == current ? '已设为默认' : '设为默认' }}
</view>
</view>
<view class="address-operate">
<view>
<img src="@/pageE/static/mine/24.png" />
<view>编辑</view>
</view>
<view>
<img src="@/pageE/static/mine/25.png" />
<view>删除</view>
</view>
</view>
</view>
</view>
</radio-group>
<view class="address-btn">添加地址</view>
</view>
</template>
<script>
export default {
name: 'address-item',
data() {
return {
current: 0
}
},
props: {
addressList: Array
},
onLoad() {
console.log(22)
},
methods: {
editAddress() {
uni.navigateTo({
url: '/pageE/mine/EditAddress'
});
},
changeDefault(event) {
console.log(event)
this.current = event.detail.value
}
},
}
</script>
<style lang="scss" scoped>
.address {
padding-top: 1rpx;
.address-item {
background-color: #ffffff;
margin-bottom: 20rpx;
padding: 30rpx;
.item-top {
position: relative;
padding-bottom: 30rpx;
&::after {
content: "";
position: absolute;
width: 690rpx;
height: 2rpx;
background: rgba(241,241,241,1);
bottom: 0;
left: 50%;
transform: translate(-50%,0);
}
.user-info {
display: flex;
align-items: center;
margin-bottom: 30rpx;
.user-name {
font-size: 32rpx;
font-weight: 500;
color: rgba(51,51,51,1);
margin-right: 13rpx;
}
.user-pnone {
font-size: 28rpx;
color: rgba(51,51,51,1);
}
}
.user-address {
font-size: 26rpx;
color: rgba(51,51,51,1);
}
}
.item-bottom {
padding-top: 30rpx;
display: flex;
justify-content: space-between;
.item-default {
display: flex;
align-items: center;
font-size: 22rpx;
/deep/ .radio-class {
.uni-radio-wrapper {
.uni-radio-input {
width: 29rpx !important;
height: 29rpx !important;
}
}
}
.radio-default {
color: rgba(255,119,15,1);
}
.radio-others {
color:rgba(153,153,153,1);
}
}
.address-operate {
display: flex;
font-size: 24rpx;
color: rgba(152,152,152,1);
> view {
display: flex;
&:not(:last-child) {
margin-right: 30rpx;
}
> img {
height: 23rpx;
margin-right: 15rpx;
}
}
}
}
}
.address-btn {
margin: 322rpx auto 40rpx;
width: 690rpx;
height: 98rpx;
background: rgba(255,119,15,1);
border-radius: 49rpx;
font-size: 36rpx;
color: rgba(255,255,255,1);
line-height: 98rpx;
text-align: center;
}
}
</style>

25
pageE/mine/Address.vue Normal file
View File

@ -0,0 +1,25 @@
<template>
<view class="address">
<AddressItem :addressList='addressList'></AddressItem>
</view>
</template>
<script>
import AddressItem from '@/components/mine/address-block/address-item'
export default {
data() {
return {
addressList: ['0', '1', '2', '3']
}
},
components: {
AddressItem
},
onLoad() {}
}
</script>
<style lang="scss" scoped>
.address {
min-height: 100vh;
background-color: #ECECEC;
}
</style>

View File

@ -0,0 +1,70 @@
<template>
<view class="edit-address">
<view class="user-info">
<view>
<input type="text" placeholder="收货人" />
</view>
<view>
<input type="text" placeholder="手机号" />
</view>
<view class="area">
<input type="text" placeholder="省市区" />
</view>
<view>
<input type="text" placeholder="详细地址" />
</view>
<view class="set-default">
<view>设为默认地址</view>
<view>
<u-switch v-model="checked" active-color="#FF770F" inactive-color="##A9A7A7" size="35"></u-switch>
</view>
</view>
</view>
<view class="edit-btn">保存地址</view>
</view>
</template>
<script>
export default {
data() {
return {
checked: false
}
},
onLoad() {}
}
</script>
<style lang="scss" scoped>
.edit-address {
min-height: 100vh;
.user-info {
border-top: 1rpx solid rgba(235,235,235,1);
> view {
height: 98rpx;
padding: 30rpx;
border-bottom: 2rpx solid rgba(235,235,235,1);
> input {
font-size: 30rpx;
outline: none;
}
}
.set-default {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 30rpx;
color: rgba(51,51,51,1);
}
}
.edit-btn {
margin: 122rpx auto 0;
width: 690rpx;
height: 98rpx;
background: rgba(255,119,15,1);
border-radius: 49rpx;
font-size: 36rpx;
color:rgba(255,255,255,1);
line-height: 98rpx;
text-align: center;
}
}
</style>

View File

@ -0,0 +1,21 @@
<template>
<view class="help-details">
<rich-text :nodes="nodes"></rich-text>
</view>
</template>
<script>
export default {
data() {
return {
nodes: `<p>13268748568645634nfdhf dfvjdfjgdfl vdufhnh1</p>123346<h1>das</h1><h1>das</h1><h1>das1</h1><h2>das2</h2><h3>das3</h3>`
}
}
}
</script>
<style lang="scss" scoped>
.help-details {
background: #ECECEC;
padding: 20rpx 35rpx 0;
min-height: 100vh;
}
</style>

49
pageE/mine/MineHelp.vue Normal file
View File

@ -0,0 +1,49 @@
<template>
<view class="mine-help">
<view class="help-box">
<view v-for="(item, index) in helpList" :key="index" class="help-item" @click="toDetailsPage()">
<view>使用帮助</view>
<img src="../static/mine/21.png" />
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
helpList: [1,1,1,1, 1, 1, 1]
}
},
methods: {
toDetailsPage() {
uni.navigateTo({
url: '/pageE/mine/HelpDetails'
});
}
},
}
</script>
<style lang="scss" scoped>
.mine-help {
min-height: 100vh;
background-color: #ECECEC;
.help-box {
.help-item {
display: flex;
align-items: center;
justify-content: space-between;
height: 98rpx;
border-top: 2rpx solid #EBEBEB;
background-color: #ffffff;
padding: 0 30rpx;
font-size: 30rpx;
color: rgba(51,51,51,1);
> img {
width: 14rpx;
height: 24rpx;
}
}
}
}
</style>

View File

@ -0,0 +1,84 @@
<template>
<view class="mine-history">
<view class="history-box">
<view v-for="(item, index) in historyList" :key="index" class="history-item">
<view class="item-title">
<img src="../static/mine/23.png" />
<view>小米店铺</view>
</view>
<!-- <view class="item-image">
<img src="../static/mine/23.png" />
</view> -->
<img src="../static/mine/23.png" class="item-image" />
<view class="item-info">
<view class="info-name">{{ item }}</view>
<img src="../static/mine/22.png" />
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
historyList: [1, 2, 3, 6]
};
},
onLoad() {},
methods: {}
};
</script>
<style lang="scss" scoped>
.mine-history {
min-height: 100vh;
background: #ECECEC;
.history-box {
padding: 20rpx 30rpx 0;
display: flex;
flex-wrap: wrap;
.history-item {
width: 220rpx;
height: 290rpx;
background: rgba(255,255,255,1);
border-radius: 10rpx;
padding: 20rpx 20rpx 22rpx;
margin: 0 10rpx 20rpx 0;
.item-title {
display: flex;
align-items: center;
> img {
width: 50rpx;
height: 50rpx;
border-radius: 50%;
margin-right: 19rpx;
}
> view {
font-size: 24rpx;
color: rgba(51,51,51,1);
}
}
.item-image {
margin: 20rpx 0 17rpx;
width: 180rpx;
height: 140rpx;
border-radius: 10rpx;
}
.item-info {
display: flex;
justify-content: space-between;
align-items: center;
.info-name {
font-size: 22rpx;
color: rgba(51,51,51,1);
}
> img {
width: 37rpx;
height: 8rpx;
}
}
}
}
}
</style>

View File

@ -2,16 +2,120 @@
<view class="mine">
<view class="mine-top">
<view class="top">
<!-- <img src="" alt="" /> -->
<view></view>
<view></view>
<img src="../static/mine/23.png" class="avatar" />
<!-- <view class="avatar"></view> -->
<view class="user-info">
<view class="info-left">
<view class="user-nickname">小同学</view>
<view class="user-medal">
<img src="../static/mine/13.png" />
<view class="rank-title">勋章</view>
</view>
</view>
<view class="info-right">
<view class="info-phone">123***5694</view>
<view class="user-rank">等级:34</view>
</view>
</view>
<view class="member-service">会员服务</view>
</view>
<view class="bottom">
<view>
<view>99</view>
<view>商品收藏</view>
</view>
<view>
<view>9</view>
<view>店铺收藏</view>
</view>
<view>
<view>9</view>
<view>图文收藏</view>
</view>
<view>
<view>9</view>
<view>积分数</view>
</view>
<view>
<view>9</view>
<view>关注</view>
</view>
</view>
<view class="bottom"></view>
</view>
<view class="mine-container">
<view class="order"></view>
<view class="tool"></view>
<view class="more-tool"></view>
<view class="order">
<view class="title">
<view class="title-text">我的订单</view>
<view class="more">
<view>查看全部订单</view>
<img src="../static/mine/21.png" />
</view>
</view>
<view class="content">
<view>
<img src="../static/mine/6.png" />
<view>待支付</view>
</view>
<view>
<img src="../static/mine/14.png" />
<view>已取消</view>
</view>
<view>
<img src="../static/mine/2.png" />
<view>待收货</view>
</view>
<view>
<img src="../static/mine/1.png" />
<view>试穿试送</view>
</view>
<view>
<img src="../static/mine/3.png" />
<view>待评价</view>
</view>
<view>
<img src="../static/mine/9.png" />
<view>售后</view>
</view>
</view>
</view>
<view class="tool">
<view class="title">我的工具</view>
<view class="content">
<view>
<img src="../static/mine/20.png" />
<view>送洗</view>
</view>
<view>
<img src="../static/mine/19.png" />
<view>美甲</view>
</view>
<view @click="toOtherPage('MineHistory')">
<img src="../static/mine/18.png" />
<view>足迹</view>
</view>
</view>
</view>
<view class="more-tool">
<view class="title">更多工具</view>
<view class="content">
<view>
<img src="../static/mine/17.png" />
<view>收货地址</view>
</view>
<view>
<img src="../static/mine/9.png" />
<view>售后政策</view>
</view>
<view @click="toOtherPage('MineHelp')">
<img src="../static/mine/16.png" />
<view>使用帮助</view>
</view>
<view>
<img src="../static/mine/15.png" />
<view>投诉意见</view>
</view>
</view>
</view>
</view>
</view>
</template>
@ -24,11 +128,191 @@ export default {
};
},
onLoad() {},
methods: {}
methods: {
toOtherPage(url) {
uni.navigateTo({
url: '/pageE/mine/' + url
});
}
}
};
</script>
<style lang="scss" scoped>
.mine {
min-height: 100vh;
background: #ECECEC;
.mine-top {
width: 750rpx;
height: 272rpx;
background: #FF780F;
.top {
padding: 40rpx 0 0 30rpx;
display: flex;
align-items: center;
margin-bottom: 40rpx;
.avatar {
width: 110rpx;
height: 110rpx;
border-radius: 50%;
border: 2rpx solid rgba(251,251,251,1);
margin-right: 30rpx;
}
.user-info {
display: flex;
.info-left {
margin-right: 15rpx;
.user-nickname {
font-size: 30rpx;
color: rgba(51,51,51,1);
margin-bottom: 19rpx;
}
.user-medal {
display: flex;
// width: 87rpx;
// height: 25rpx;
background: linear-gradient(269deg,rgba(175,175,175,1) 0%,rgba(224,224,224,1) 100%);
border-radius: 13rpx;
> img {
margin: 2rpx 10rpx;
width: 20rpx;
height: 22rpx;
}
.rank-title {
font-size: 16rpx;
color: rgba(51,51,51,1);
}
}
}
.info-right {
.info-phone {
font-size: 24rpx;
color: rgba(51,51,51,1);
margin-bottom: 26rpx;
}
.user-rank {
font-size: 24rpx;
color: rgba(51,51,51,1);
}
}
}
.member-service {
height: 52rpx;
line-height: 52rpx;
box-sizing: content-box;
margin-left: auto;
padding: 0 51rpx 0 22rpx;
background: rgba(255,255,255,0.32);
border-radius: 26rpx 0 0 26rpx;
font-size: 26rpx;
color:rgba(51,51,51,1);
}
}
.bottom {
box-sizing: border-box;
padding: 0 30rpx;
display: flex;
justify-content: space-between;
> view {
text-align: center;
font-size: 24rpx;
color:rgba(51,51,51,1);
> view:first-child {
margin-bottom: 10rpx;
}
}
}
}
.mine-container {
@mixin common-mine($content-padding-top, $content-padding-bottom, $image-height) {
box-sizing: border-box;
width: 690rpx;
background: rgba(255,255,255,1);
border-radius: 10rpx;
margin: 30rpx auto 0;
padding: 0 20rpx;
.title {
height: 76rpx;
font-size: 28rpx;
color: rgba(51,51,51,1);
position: relative;
display: flex;
align-items: center;
&::after {
content: "";
position: absolute;
width: 650rpx;
height: 1rpx;
background: rgba(234,234,234,1);
bottom: 0;
left: 50%;
transform: translate(-50%,0);
}
}
.content {
padding: $content-padding-top 0 $content-padding-bottom;
display: flex;
> view {
text-align: center;
> img {
height: $image-height;
margin-bottom: 15rpx;
}
> view {
font-size: 22rpx;
color: rgba(102,102,102,1);
}
}
}
}
.order {
@include common-mine(
$content-padding-top: 22rpx,
$content-padding-bottom: 30rpx,
$image-height: 36rpx
);
.title {
justify-content: space-between;
.more {
display: flex;
align-items: center;
> img {
height: 19rpx;
margin-left: 10rpx;
}
}
}
.content {
justify-content: space-between;
> view {
text-align: center;
flex: 1;
};
}
}
.tool {
@include common-mine(
$content-padding-top: 8rpx,
$content-padding-bottom: 25rpx,
$image-height: 71rpx
);
.content {
> view:not(:last-child) {
margin-right: 58rpx;
}
}
}
.more-tool {
@include common-mine(
$content-padding-top: 8rpx,
$content-padding-bottom: 48rpx,
$image-height: 71rpx
);
.content {
> view:not(:last-child) {
margin-right: 46rpx;
}
}
}
}
}
</style>

BIN
pageE/static/mine/21.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
pageE/static/mine/22.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1008 B

BIN
pageE/static/mine/23.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

BIN
pageE/static/mine/24.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
pageE/static/mine/25.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -4,33 +4,113 @@
},
"subPackages": [
{
"root": "pageA",
"pages": [
{
"path": "welcome/welcome",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom",
"app-plus": {
"titleNView": false,
"animationType": "slide-in-bottom"
"root": "pageA",
"pages": [
{
"path": "welcome/welcome",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom",
"app-plus": {
"titleNView": false,
"animationType": "slide-in-bottom"
}
}
}
},
{
"path": "login/login",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom",
"app-plus": {
"titleNView": false,
"animationType": "slide-in-bottom"
},
{
"path": "login/login",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom",
"app-plus": {
"titleNView": false,
"animationType": "slide-in-bottom"
}
}
}
}
]
}],
]
},
{
"root": "pageE",
"pages":[
{
"path": "mine/MineHistory",
"style": {
"navigationBarTitleText": "我的足迹",
"app-plus": {
"titleSize": "36px",
"titleColor": "#333333",
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "mine/MineHelp",
"style": {
"navigationBarTitleText": "使用帮助",
"app-plus": {
"titleSize": "36px",
"titleColor": "#333333",
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "mine/HelpDetails",
"style": {
"navigationBarTitleText": "使用帮助详情",
"app-plus": {
"titleSize": "36px",
"titleColor": "#333333",
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "mine/Address",
"style": {
"navigationBarTitleText": "收货地址",
"app-plus": {
"titleSize": "36px",
"titleColor": "#333333",
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "mine/EditAddress",
"style": {
"navigationBarTitleText": "编辑地址",
"app-plus": {
"titleSize": "36px",
"titleColor": "#333333",
"titleNView": {
"backgroundColor": "#FFFFFF"
},
"buttons": [
{
"type":"none",
"text":"删除",
"float":"right",
"fontSize":"26"
}
]
}
}
}
]
}
],
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
@ -45,4 +125,4 @@
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
}
}
}