feat: 添加我的店铺api
This commit is contained in:
+63
-3
@@ -1,9 +1,12 @@
|
||||
<template>
|
||||
<s-layout :navbar="navBar" title="金种子" navPreset="float">
|
||||
<view class="pages w100" :style="{ marginTop: -height + 'px' }">
|
||||
<view class="w100">
|
||||
<!-- <image class="w100" :src="$url + 'home/seed_1.png'" mode="widthFix" /> -->
|
||||
<image class="w100" src="/static/jinzhongzi_bg.png" mode="widthFix" />
|
||||
<view class="seed-hero w100">
|
||||
<image class="seed-hero__bg" src="/static/jinzhongzi_bg.png" mode="widthFix" />
|
||||
<view class="seed-hero__text">
|
||||
<view class="seed-hero__title">资产概览</view>
|
||||
<view class="seed-hero__sub">更新于 {{ getUpdateDateText() }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content" :style="{ marginTop: -top + 'px' }">
|
||||
<view class="con">
|
||||
@@ -283,6 +286,33 @@
|
||||
const n = Number(val);
|
||||
return Number.isFinite(n) ? n.toFixed(4) : '0.0000';
|
||||
};
|
||||
|
||||
const formatYmd = (val: any) => {
|
||||
const formatDate = (d: Date) => {
|
||||
const y = d.getFullYear();
|
||||
const m = pad2(d.getMonth() + 1);
|
||||
const day = pad2(d.getDate());
|
||||
return `${y}年${m}月${day}日`;
|
||||
};
|
||||
if (val instanceof Date) return formatDate(val);
|
||||
if (typeof val === 'number') {
|
||||
const d = new Date(val);
|
||||
return Number.isFinite(d.getTime()) ? formatDate(d) : '';
|
||||
}
|
||||
const s = String(val ?? '').trim();
|
||||
if (!s) return '';
|
||||
const m = s.match(/^(\d{4})-(\d{2})-(\d{2})/);
|
||||
if (m) return `${m[1]}年${m[2]}月${m[3]}日`;
|
||||
const d = new Date(s);
|
||||
return Number.isFinite(d.getTime()) ? formatDate(d) : '';
|
||||
};
|
||||
|
||||
const getUpdateDateText = () => {
|
||||
return (
|
||||
formatYmd(dataObj?.updateTime || dataObj?.updateDate || dataObj?.updateAt) ||
|
||||
formatYmd(new Date())
|
||||
);
|
||||
};
|
||||
const toLocalDateTime = (d) => {
|
||||
const y = d.getFullYear();
|
||||
const m = pad2(d.getMonth() + 1);
|
||||
@@ -633,7 +663,37 @@
|
||||
<style lang="scss" scoped>
|
||||
.pages {
|
||||
// position: relative;
|
||||
box-sizing: border-box;
|
||||
.seed-hero {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.seed-hero__bg {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.seed-hero__text {
|
||||
position: absolute;
|
||||
left: 60rpx;
|
||||
top: calc(env(safe-area-inset-top) + 120rpx);
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.seed-hero__title {
|
||||
font-size: 44rpx;
|
||||
line-height: 52rpx;
|
||||
font-weight: 700;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.seed-hero__sub {
|
||||
margin-top: 10rpx;
|
||||
font-size: 26rpx;
|
||||
line-height: 34rpx;
|
||||
color: rgba(255, 255, 255, 0.88);
|
||||
}
|
||||
.content {
|
||||
// position: absolute;
|
||||
width: 100%;
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
<view class="share_page_bg" id="captureBox" :style="{ marginTop: `-${navHeight}px` }">
|
||||
<view class="slogan">
|
||||
<image class="slogan_img" src="/static/share_bg.png" mode="widthFix" />
|
||||
<view class="slogan__text">
|
||||
<view class="slogan__title">邀请好友</view>
|
||||
<view class="slogan__title">一起瓜分金种子</view>
|
||||
<view class="slogan__sub">好友注册你得奖励</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="share_card">
|
||||
@@ -385,6 +390,27 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
.slogan__text {
|
||||
position: absolute;
|
||||
left: 60rpx;
|
||||
top: calc(env(safe-area-inset-top) + 100rpx);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.slogan__title {
|
||||
font-size: 45rpx;
|
||||
line-height: 60rpx;
|
||||
font-weight: 800;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.slogan__sub {
|
||||
margin-top: 18rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 35rpx;
|
||||
color: rgba(255, 255, 255, 0.88);
|
||||
}
|
||||
|
||||
.share_card {
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
|
||||
Reference in New Issue
Block a user