Browse Source

add style

dev
刘嘉炜 5 days ago
parent
commit
07fb66445b
  1. 12
      src/components/tab_bar.vue
  2. 12
      src/pages.json
  3. 93
      src/pages/member/index.vue
  4. 7
      src/pages/order/list.vue
  5. BIN
      src/static/images/certification.png

12
src/components/tab_bar.vue

@ -1,18 +1,16 @@
<script setup> <script setup>
import { reactive, ref } from "vue"; import { reactive, ref } from "vue";
const emits = defineEmits([ 'click:tab' ]);
const props = defineProps({
tabs: { default: [ {a: 1}, { a: 2} ] },
});
const tabIdx = ref(0); const tabIdx = ref(0);
</script> </script>
<template> <template>
<view class="tab-bar"> <view class="tab-bar">
<view class="tb-item" :class="{'tb-active': tabIdx === 0}" @click="tabIdx = 0">
<view class="ti-txt">889</view>
</view>
<view class="tb-item" :class="{'tb-active': tabIdx === 1}" @click="tabIdx = 1">
<view class="ti-txt">889</view>
</view>
<view class="tb-item" :class="{'tb-active': tabIdx === 2}" @click="tabIdx = 2">
<view class="tb-item" v-for="(e, i) in tabs" :key="i" :class="{'tb-active': tabIdx === i}" @click="tabIdx = i">
<view class="ti-txt">889</view> <view class="ti-txt">889</view>
</view> </view>
</view> </view>

12
src/pages.json

@ -11,6 +11,12 @@
"style": { "style": {
"navigationBarTitleText": "订单列表" "navigationBarTitleText": "订单列表"
} }
},
{
"path": "pages/member/index",
"style": {
"navigationBarTitleText": "会员中心"
}
} }
], ],
"subpackages": [ "subpackages": [
@ -97,6 +103,12 @@
"text": "订单", "text": "订单",
"iconPath": "static/images/tab/order_g.png", "iconPath": "static/images/tab/order_g.png",
"selectedIconPath": "static/images/tab/order_a.png" "selectedIconPath": "static/images/tab/order_a.png"
},
{
"pagePath": "pages/member/index",
"text": "我的",
"iconPath": "static/images/tab/mine_g.png",
"selectedIconPath": "static/images/tab/mine_a.png"
} }
] ]
}, },

93
src/pages/member/index.vue

@ -0,0 +1,93 @@
<script setup>
import { onLoad } from '@dcloudio/uni-app';
import { reactive, ref } from 'vue';
onLoad(() => {
});
</script>
<template>
<view class="member-index">
<view class="mi-header">
<image class="mh-avatar"></image>
<view class="mh-info">
<view class="mi-name">抖音用户</view>
<view class="mi-num">17688184874</view>
</view>
</view>
<view class="mi-section">
<view class="ms-tool">
<view class="mt-tit">我的工具</view>
<view class="mt-ls">
<view class="ml-item">
<image class="mi-icon" mode="aspectFit" src="/static/images/certification.png"></image>
<view class="mi-txt">服务资质</view>
</view>
</view>
</view>
</view>
</view>
</template>
<style lang="scss" scoped>
.member-index{
}
.mi-header{
padding: 40upx 48upx 48upx;
background: $mColor;
@include ctf;
.mh-avatar{
flex-shrink: 0;
flex-grow: 0;
margin-right: 24upx;
width: 128upx;
height: 128upx;
border-radius: 50%;
background-color: #fff;
}
.mh-info{
padding-top: 8upx;
.mi-name{
@include flcw(36upx, 50upx, #fff, 500);
@include tHide;
}
.mi-num{
margin-top: 24upx;
@include flcw(28upx, 40upx, #fff);
@include tHide;
}
}
}
.mi-section{
margin-top: 24upx;
}
.ms-tool{
padding: 30upx;
background-color: #fff;
.mt-tit{
@include flcw(36upx, 50upx, #333, 500);
}
.mt-ls{
margin-top: 40upx;
padding: 0 30upx;
.ml-item{
display: inline-block;
font-size: 0;
.mi-icon{
display: block;
margin: 0 auto;
width: 50upx;
height: 50upx;
}
.mi-txt{
margin-top: 20upx;
text-align: center;
@include flcw(28upx, 40upx, #1a1a1a);
}
}
}
}
</style>

7
src/pages/order/list.vue

@ -1,10 +1,15 @@
<script setup> <script setup>
import { onLoad } from '@dcloudio/uni-app'; import { onLoad } from '@dcloudio/uni-app';
import tabBar from "@/components/tab_bar.vue"; import tabBar from "@/components/tab_bar.vue";
import { routeTo } from '@/utils/polish';
onLoad(() => { onLoad(() => {
}); });
function toOrderDetail(){
routeTo('/subpackage/order/pages/detail');
}
</script> </script>
<template> <template>
@ -13,7 +18,7 @@ onLoad(() => {
<tab-bar></tab-bar> <tab-bar></tab-bar>
</view> </view>
<view class="ol-list-content"> <view class="ol-list-content">
<view class="ol-item" v-for="i in 10" :key="i">
<view class="ol-item" v-for="i in 10" :key="i" @click="toOrderDetail">
<view class="oi-header"> <view class="oi-header">
<image class="oh-logo"></image> <image class="oh-logo"></image>
<view class="oh-name">MJ体育(天空篮球从云店)</view> <view class="oh-name">MJ体育(天空篮球从云店)</view>

BIN
src/static/images/certification.png

After

Width: 52  |  Height: 50  |  Size: 773 B

Loading…
Cancel
Save