Browse Source

feat: 个人中心页面;

pull/1/head
fox 2 months ago
parent
commit
dcb5f9c2a3
15 changed files with 202 additions and 50 deletions
  1. +1
    -1
      components/base/cardTitle.vue
  2. +167
    -47
      pages/index/center.vue
  3. +25
    -0
      pages_order/mine/verifyRecord.vue
  4. +9
    -2
      pages_order/product/productDetail.vue
  5. BIN
      static/image/center/bg-scan.png
  6. BIN
      static/image/center/bg-verify.png
  7. BIN
      static/image/center/icon-arrow.png
  8. BIN
      static/image/center/icon-cooperation.png
  9. BIN
      static/image/center/icon-coupon.png
  10. BIN
      static/image/center/icon-invite.png
  11. BIN
      static/image/center/icon-member-center.png
  12. BIN
      static/image/center/icon-service.png
  13. BIN
      static/image/center/icon-sign-in.png
  14. BIN
      static/image/center/icon-team.png
  15. BIN
      static/image/center/icon-voucher.png

pages_order/components/cardTitle.vue → components/base/cardTitle.vue View File

@ -24,13 +24,13 @@
.underline {
margin-top: 26rpx;
margin-left: 30rpx;
width: 146rpx;
height: 8rpx;
border-radius: 4rpx;
background-image: linear-gradient(to right, #84A73F, #D8FF8F);
}
.title {
transform: translateX(-10rpx);
color: #000000;
font-size: 28rpx;
font-weight: 700;

+ 167
- 47
pages/index/center.vue View File

@ -63,6 +63,7 @@
</view>
</view>
<!-- todo: check -> @click="$utils.navigateTo('/pages_order/mine/withdraw') -->
<view class="card flex account">
<view class="flex flex-column">
<view class="account-value">{{ riceInfo.balance || 0 }}<text class="account-unit"></text></view>
@ -83,30 +84,76 @@
<view class="account-label">优惠券</view>
</view>
</view>
<template v-if="false">
<!-- 佣金数据 -->
<view @click="$utils.navigateTo('/pages_order/mine/withdraw')" class="brokerage-data"
:class="{'brokerage-data-mt' : !userInfo.role}">
<view class="brokerage">
<image :src="configList.money_image" mode="aspectFill" class="brokerage-img"></image>
<div class="main">
<div class="title">我的佣金</div>
<div class="money">{{ riceInfo.canWithdraw || 0 }}</div>
</div>
<view class="card fun-common">
<view v-if="role === 'merchant'" class="fun-header">
<cardTitle>常用功能</cardTitle>
</view>
<view class="fun-content fun-common-content">
<view class="flex flex-column" @click="$utils.navigateTo('/pages_order/mine/memberCenter')">
<image class="fun-common-icon" src="@/static/image/center/icon-member-center.png" mode="widthFix"></image>
<text class="fun-common-label">会员中心</text>
</view>
<!-- todo: navigateTo -->
<view class="flex flex-column" @click="$utils.navigateTo('/pages_order/mine/partner')">
<image class="fun-common-icon" src="@/static/image/center/icon-team.png" mode="widthFix"></image>
<text class="fun-common-label">我的团队</text>
</view>
<!-- todo: navigateTo -->
<view class="flex flex-column" @click="$utils.navigateTo('/pages_order/mine/promotion')">
<image class="fun-common-icon" src="@/static/image/center/icon-invite.png" mode="widthFix"></image>
<text class="fun-common-label">邀请好友</text>
</view>
<!-- todo: navigateTo -->
<view class="flex flex-column" @click="$utils.navigateTo('/pages_order/mine/memberCenter')">
<image class="fun-common-icon" src="@/static/image/center/icon-coupon.png" mode="widthFix"></image>
<text class="fun-common-label">优惠券</text>
</view>
<!-- todo: navigateTo -->
<view class="flex flex-column" @click="$utils.navigateTo('/pages_order/mine/coupon')">
<image class="fun-common-icon" src="@/static/image/center/icon-voucher.png" mode="widthFix"></image>
<text class="fun-common-label">代金券</text>
</view>
<!-- todo: navigateTo -->
<view class="flex flex-column" @click="$utils.navigateTo('/pages_order/mine/memberCenter')">
<image class="fun-common-icon" src="@/static/image/center/icon-service.png" mode="widthFix"></image>
<text class="fun-common-label">联系客服</text>
</view>
<!-- todo: navigateTo -->
<view class="flex flex-column" @click="$utils.navigateTo('/pages_order/mine/memberCenter')">
<image class="fun-common-icon" src="@/static/image/center/icon-sign-in.png" mode="widthFix"></image>
<text class="fun-common-label">每日签到</text>
</view>
<!-- todo: navigateTo -->
<view class="flex flex-column" @click="$utils.navigateTo('/pages_order/mine/memberCenter')">
<image class="fun-common-icon" src="@/static/image/center/icon-cooperation.png" mode="widthFix"></image>
<text class="fun-common-label">商家合作</text>
</view>
</view>
</view>
<view v-if="role === 'merchant'" class="card fun-merchant">
<view class="fun-header">
<cardTitle>商家功能</cardTitle>
</view>
<view class="flex fun-content fun-merchant-content">
<view class="left">
<image class="left-bg" src="@/static/image/center/bg-verify.png"></image>
<view class="balance">
<image :src="configList.price_image" mode="aspectFill" class="balance-img"></image>
<view class="flex left-content">
<text>核销明细</text>
<image class="left-icon" src="@/static/image/center/icon-arrow.png" mode="widthFix"></image>
</view>
</view>
<div class="main">
<div class="title">我的余额</div>
<div class="money">{{ riceInfo.balance || 0 }}</div>
</div>
<view class="right" @click="onScan">
<image class="right-bg" src="@/static/image/center/bg-scan.png"></image>
</view>
</view>
</view>
<!-- todo: delete -->
<template v-if="false">
<!-- 我的服务 -->
<view class="myServer">
@ -119,18 +166,10 @@
<image src="@/static/image/center/1.png" mode="aspectFill" />
<view class="title">我的订单</view>
</view>
<view class="boxs" @click="$utils.navigateTo('/pages_order/mine/partner')">
<image src="@/static/image/center/2.png" mode="aspectFill" />
<view class="title">我的团队</view>
</view>
<view class="boxs" @click="$utils.navigateTo('/pages_order/home/contact')">
<image src="@/static/image/center/3.png" mode="aspectFill" />
<view class="title">联系客服</view>
</view>
<view class="boxs" @click="$utils.navigateTo('/pages_order/mine/promotion')">
<image src="@/static/image/center/4.png" mode="aspectFill" />
<view class="title">邀请好友</view>
</view>
</view>
<view class="box">
@ -138,14 +177,6 @@
<image src="@/static/image/center/5.png" mode="aspectFill" />
<view class="title">合伙人招募</view>
</view>
<view class="boxs" @click="$utils.navigateTo('/pages_order/mine/memberCenter')">
<image src="@/static/image/center/6.png" mode="aspectFill" />
<view class="title">会员权益</view>
</view>
<view class="boxs" @click="$utils.navigateTo('/pages_order/mine/coupon')">
<image src="@/static/image/center/7.png" mode="aspectFill" />
<view class="title">优惠券</view>
</view>
<view class="boxs" @click="$utils.navigateTo('/pages_order/mine/help')">
<image src="@/static/image/center/8.png" mode="aspectFill" />
<view class="title">帮助与反馈</view>
@ -196,6 +227,7 @@
</template>
<script>
import cardTitle from '@/components/base/cardTitle.vue'
import tabber from '@/components/base/tabbar.vue'
import {
mapState
@ -204,6 +236,7 @@
export default {
components: {
cardTitle,
tabber,
customerServicePopup,
},
@ -219,7 +252,7 @@
},
data() {
return {
role: '', // member-personal | member-business
role: '', // member-personal | member-business | merchant
vipType: ['普通会员', '黄金会员', '渠道商'],
vipImage: ['vip_vip', 'vip_user', 'vip_shop'],
@ -239,17 +272,16 @@
title: '暂未开放',
})
},
logout(){
uni.showModal({
title: '确认退出登录吗',
success : (r) => {
if (r.confirm) {
this.$store.commit('logout', true)
}
}
})
},
logout(){
uni.showModal({
title: '确认退出登录吗',
success : (r) => {
if (r.confirm) {
this.$store.commit('logout', true)
}
}
})
},
//广
closeAdvertising() {
this.showAdvertising = false;
@ -262,7 +294,11 @@
this.vipList = res.result
}
})
}
},
onScan() {
// todo
},
}
}
</script>
@ -601,4 +637,88 @@
margin-left: 2rpx;
}
}
.fun {
&-header {
text-align: left;
padding-left: 12rpx;
margin-bottom: 19rpx;
/deep/ .title__view {
display: inline-flex;
}
}
&-content {
margin-top: 24rpx;
}
&-common {
padding: 30rpx 40rpx 67rpx 40rpx;
&-content {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-column-gap: 71rpx;
grid-row-gap: 81rpx;
}
&-icon {
width: 66rpx;
height: auto;
}
&-label {
color: #000000;
font-size: 28rpx;
margin-top: 5rpx;
}
}
&-merchant {
padding: 33rpx 30rpx 28rpx 30rpx;
margin-bottom: 10rpx;
&-content {
justify-content: space-between;
}
.left {
width: 198rpx;
height: 139rpx;
position: relative;
&-bg {
width: 100%;
height: 100%;
}
&-content {
position: absolute;
top: 13rpx;
left: 14rpx;
color: $uni-text-color-inverse;
font-size: 28rpx;
}
&-icon {
width: 23rpx;
height: auto;
margin-left: 9rpx;
}
}
.right {
width: 429rpx;
height: 164rpx;
margin-top: -25rpx;
&-bg {
width: 100%;
height: 100%;
}
}
}
}
</style>

+ 25
- 0
pages_order/mine/verifyRecord.vue View File

@ -0,0 +1,25 @@
<template>
<view class="page">
<navbar title="核销明细" leftClick @leftClick="$utils.navigateBack" color="#fff" />
<!-- todo -->
</view>
</template>
<script>
export default {
data() {
return {
}
}
}
</script>
<style scoped lang="scss">
.page {
/deep/ .nav-bar__view {
background-image: linear-gradient(#84A73F, #D8FF8F);
}
}
</style>

+ 9
- 2
pages_order/product/productDetail.vue View File

@ -42,8 +42,11 @@
<!-- 商品详情 -->
<view class="detail">
<cardTitle class="header">商品详情</cardTitle>
<view class="header">
<cardTitle>商品详情</cardTitle>
</view>
<uv-parse :content="productDetail.details"></uv-parse>
<!-- todo: check richtext ? 图文详情 -->
</view>
<!-- 分享和购买按钮 -->
@ -66,7 +69,7 @@
</template>
<script>
import cardTitle from '../components/cardTitle.vue'
import cardTitle from '@/components/base/cardTitle.vue'
export default {
components: {
@ -252,6 +255,10 @@
margin-top: 12rpx;
padding: 18rpx 28rpx;
background-color: $uni-fg-color;
.header {
margin-bottom: 30rpx;
}
}
.bar {


BIN
static/image/center/bg-scan.png View File

Before After
Width: 429  |  Height: 164  |  Size: 12 KiB

BIN
static/image/center/bg-verify.png View File

Before After
Width: 198  |  Height: 139  |  Size: 8.6 KiB

BIN
static/image/center/icon-arrow.png View File

Before After
Width: 23  |  Height: 24  |  Size: 540 B

BIN
static/image/center/icon-cooperation.png View File

Before After
Width: 66  |  Height: 66  |  Size: 3.6 KiB

BIN
static/image/center/icon-coupon.png View File

Before After
Width: 66  |  Height: 66  |  Size: 3.1 KiB

BIN
static/image/center/icon-invite.png View File

Before After
Width: 66  |  Height: 66  |  Size: 2.4 KiB

BIN
static/image/center/icon-member-center.png View File

Before After
Width: 66  |  Height: 66  |  Size: 2.4 KiB

BIN
static/image/center/icon-service.png View File

Before After
Width: 66  |  Height: 66  |  Size: 3.7 KiB

BIN
static/image/center/icon-sign-in.png View File

Before After
Width: 66  |  Height: 66  |  Size: 1.7 KiB

BIN
static/image/center/icon-team.png View File

Before After
Width: 66  |  Height: 66  |  Size: 2.9 KiB

BIN
static/image/center/icon-voucher.png View File

Before After
Width: 66  |  Height: 66  |  Size: 2.5 KiB

Loading…
Cancel
Save