Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-04-11 16:17:37 +08:00
5 changed files with 49 additions and 39 deletions

View File

@@ -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";`,

View File

@@ -1,6 +1,6 @@
{ {
"name": "jdt-user", "name": "jdt-user",
"version": "3.0.12", "version": "3.0.14",
"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.14"
}, },
"scripts": { "scripts": {
"build:weapp": "taro build --type weapp", "build:weapp": "taro build --type weapp",

View File

@@ -74,6 +74,7 @@ const subVerify = async () => {
try { try {
const res = await activeOrderVerify({ const res = await activeOrderVerify({
oid: goodInfo.value.oid, oid: goodInfo.value.oid,
bid: goodInfo.value.bid,
}); });
Taro.showToast({ Taro.showToast({
title: res.msg, title: res.msg,
@@ -106,8 +107,8 @@ const subVerify = async () => {
display: flex; display: flex;
image { image {
width: 150rpx; width: 150px;
height: 150rpx; height: 150px;
border-radius: 7px; border-radius: 7px;
display: block; display: block;
} }

View File

@@ -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;
}
} }
} }
@@ -260,18 +259,24 @@ const getList = async () => {
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;
} }
} }

View File

@@ -57,9 +57,9 @@ const clickText = (type: number, text: string) => {
<view>捷兑通</view> <view>捷兑通</view>
</view> </view>
<view class="center"> <view class="center">
<nut-button type="primary" @click="getCode">一键微信授权登录</nut-button> <nut-button type="primary" @click="getCode">手机号一键登录</nut-button>
<nut-button style="margin-top: 15px" @click="toPage" <nut-button style="margin-top: 15px" @click="toPage"
>手机号登录</nut-button >手机号登录/注册</nut-button
> >
</view> </view>
<view class="checkbox" <view class="checkbox"