refactor(custom): 我的账户细微修改
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -50,7 +50,7 @@ const config = {
|
|||||||
prebundle: { enable: false },
|
prebundle: { enable: false },
|
||||||
},
|
},
|
||||||
cache: {
|
cache: {
|
||||||
enable: true, // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache
|
enable: false, // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache
|
||||||
},
|
},
|
||||||
sass: {
|
sass: {
|
||||||
data: `@import "@nutui/nutui-taro/dist/styles/variables.scss";`,
|
data: `@import "@nutui/nutui-taro/dist/styles/variables.scss";`,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jdt-user",
|
"name": "jdt-user",
|
||||||
"version": "3.0.12",
|
"version": "3.0.13",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "",
|
"description": "",
|
||||||
"templateInfo": {
|
"templateInfo": {
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
"css": "sass"
|
"css": "sass"
|
||||||
},
|
},
|
||||||
"taroConfig": {
|
"taroConfig": {
|
||||||
"version": "3.0.12"
|
"version": "3.0.13"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:weapp": "taro build --type weapp",
|
"build:weapp": "taro build --type weapp",
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import Taro from "@tarojs/taro";
|
import Taro from "@tarojs/taro";
|
||||||
|
import * as dayjs from "dayjs";
|
||||||
import { getIntegralDetail, getBeanDetail, getGiftRecord } from "@/api/user";
|
import { getIntegralDetail, getBeanDetail, getGiftRecord } from "@/api/user";
|
||||||
|
|
||||||
const tabValue = ref(1);
|
const tabValue = ref(1);
|
||||||
@@ -55,6 +56,7 @@ interface DataType {
|
|||||||
order_number: number;
|
order_number: number;
|
||||||
type: number;
|
type: number;
|
||||||
oid: string;
|
oid: string;
|
||||||
|
residue: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = ref<DataType[]>([]);
|
const data = ref<DataType[]>([]);
|
||||||
@@ -108,7 +110,6 @@ const getList = async () => {
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<!-- <view class="greeting">Hello! YuanHuakk</view>-->
|
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view>
|
<view>
|
||||||
@@ -118,7 +119,6 @@ const getList = async () => {
|
|||||||
<view class="num">积分: {{ userInfo.data?.integral }}</view>
|
<view class="num">积分: {{ userInfo.data?.integral }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <image class="img" src="https://picdm.sunbangyan.cn/2023/08/15/ste192.png"/> -->
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view scroll-x>
|
<scroll-view scroll-x>
|
||||||
@@ -138,18 +138,35 @@ const getList = async () => {
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
<view v-if="data.length > 0">
|
<view v-if="data.length > 0">
|
||||||
<view v-if="tabValue === 1 || tabValue === 3 || tabValue === 5">
|
<view v-if="tabValue === 1">
|
||||||
|
<view class="card-list" v-for="(item, index) in data" :key="index">
|
||||||
|
<view class="left">
|
||||||
|
<view>订单号: {{ item.oid }}</view>
|
||||||
|
<text class="jf">{{
|
||||||
|
dayjs(item.add_time).format("YYYY/MM/DD mm:ss")
|
||||||
|
}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="right">
|
||||||
|
<view v-if="tabValue === 1" style="color: red"
|
||||||
|
>-
|
||||||
|
<text>{{ item.number }}</text>
|
||||||
|
</view>
|
||||||
|
<text class="jf">积分余额: {{ item.residue || 0 }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="tabValue === 3 || tabValue === 5">
|
||||||
<view class="card-list" v-for="(item, index) in data" :key="index">
|
<view class="card-list" v-for="(item, index) in data" :key="index">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view>订单:{{ item.oid }}</view>
|
<view>订单:{{ item.oid }}</view>
|
||||||
<view>时间:{{ item.add_time.slice(0, 10) }}</view>
|
<view>时间:{{ item.add_time.slice(0, 10) }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<view v-if="tabValue === 1 || tabValue === 5" style="color: green"
|
<view v-if="tabValue === 5" style="color: red"
|
||||||
>-
|
>-
|
||||||
<text>{{ item.number }}积分</text>
|
<text>{{ item.number }}积分</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="tabValue === 3" style="color: red"
|
<view v-if="tabValue === 3" style="color: green"
|
||||||
>+
|
>+
|
||||||
<text>{{ item.number }}</text>
|
<text>{{ item.number }}</text>
|
||||||
积分
|
积分
|
||||||
@@ -164,7 +181,7 @@ const getList = async () => {
|
|||||||
<view>时间:{{ item.add_time.slice(0, 10) }}</view>
|
<view>时间:{{ item.add_time.slice(0, 10) }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<view style="color: red"
|
<view style="color: green"
|
||||||
>+
|
>+
|
||||||
<text>{{ item.number }}</text>
|
<text>{{ item.number }}</text>
|
||||||
豆子
|
豆子
|
||||||
@@ -179,7 +196,7 @@ const getList = async () => {
|
|||||||
<view>时间:{{ item.add_time.slice(0, 10) }}</view>
|
<view>时间:{{ item.add_time.slice(0, 10) }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<view style="color: red"
|
<view style="color: green"
|
||||||
>+
|
>+
|
||||||
<text>{{ item.number }}</text>
|
<text>{{ item.number }}</text>
|
||||||
豆子
|
豆子
|
||||||
@@ -207,28 +224,15 @@ const getList = async () => {
|
|||||||
|
|
||||||
.card {
|
.card {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: 300px;
|
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
background-color: #282828;
|
background-color: #282828;
|
||||||
box-shadow: 0 0 10px rgba(40, 40, 40, 0.1);
|
|
||||||
background-size: 100% 100%;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
margin: 10px auto;
|
margin: 10px auto;
|
||||||
color: #d0a568;
|
color: #d0a568;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
|
||||||
.greeting {
|
|
||||||
font-size: 35px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
height: 300px;
|
height: 200px;
|
||||||
width: 50%;
|
|
||||||
text-align: left;
|
text-align: left;
|
||||||
margin-left: 50px;
|
margin-left: 50px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -241,11 +245,6 @@ const getList = async () => {
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.img {
|
|
||||||
width: 380px;
|
|
||||||
height: 270px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,19 +258,25 @@ const getList = async () => {
|
|||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
view {
|
view {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
margin: 10px 20px;
|
margin: 10px 0;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
font-size: large;
|
||||||
}
|
}
|
||||||
|
|
||||||
.line {
|
.line {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: 50px;
|
width: 100px;
|
||||||
height: 5px;
|
height: 5px;
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
transition: all 0.3s ease-in-out;
|
transition: all 0.3s ease-in-out;
|
||||||
@@ -291,18 +296,22 @@ const getList = async () => {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.left {
|
.jf {
|
||||||
width: 500px;
|
color: #8a8a8a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left {
|
||||||
.text {
|
.text {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
width: 100%;
|
font-weight: bolder;
|
||||||
// 超出一行隐藏
|
// 超出一行隐藏
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
-webkit-line-clamp: 1;
|
-webkit-line-clamp: 1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
|
color: #484848;
|
||||||
|
font-size: large;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user