Files
youlegames/codes/minipro/calculation/miniprogram/pages/index/index.wxml

100 lines
4.1 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--index.wxml-->
<scroll-view class="scrollarea" scroll-y type="list">
<view class="container">
<!-- 顶部仪表盘背景区 -->
<view class="dashboard-header">
<view class="header-status-bar">
<view class="date-group">
<text class="date-text">{{currentDate}}</text>
<text class="weekday-text">{{currentWeekday}}</text>
</view>
<view class="user-entry" bindtap="goToProfile">
<image class="mini-avatar" src="{{userInfo.avatarUrl}}"></image>
</view>
</view>
<view class="daily-quote">
<text class="quote-text">“{{dailyQuote}}”</text>
</view>
</view>
<!-- 主要内容区 -->
<view class="main-content">
<!-- 新增内容:常用公式速查 -->
<view class="section-header">
<text class="section-title">常用公式</text>
<text class="section-more"></text>
</view>
<scroll-view class="formula-scroll" scroll-x enable-flex>
<view class="formula-card" wx:for="{{formulas}}" wx:key="title">
<view class="formula-icon">{{item.icon}}</view>
<view class="formula-info">
<text class="formula-title">{{item.title}}</text>
<text class="formula-value">{{item.value}}</text>
</view>
</view>
</scroll-view>
<!-- 工具箱 -->
<view class="section-header" style="margin-top: 40rpx;">
<text class="section-title">实用工具</text>
</view>
<!-- 功能网格 -->
<view class="grid-container">
<!-- 计算器 (大卡片) -->
<view class="grid-item item-large" bindtap="goToCalculator" hover-class="grid-item-hover">
<view class="grid-bg bg-blue"></view>
<view class="grid-content">
<view class="icon-box">
<text class="icon">🧮</text>
</view>
<view class="text-box">
<text class="label">科学计算器</text>
<text class="sub-label">支持三角函数、对数及历史记录</text>
</view>
<view class="arrow-btn">GO</view>
</view>
</view>
<view class="grid-row">
<!-- 单位换算 -->
<view class="grid-item item-half" bindtap="goToUnitConverter" hover-class="grid-item-hover">
<view class="grid-bg bg-green"></view>
<view class="grid-content vertical">
<view class="icon-box-small">📏</view>
<text class="label">单位换算</text>
<text class="sub-label-small">多单位互转</text>
</view>
</view>
<!-- 折扣计算 -->
<view class="grid-item item-half" bindtap="goToDiscount" hover-class="grid-item-hover">
<view class="grid-bg bg-orange"></view>
<view class="grid-content vertical">
<view class="icon-box-small">🏷️</view>
<text class="label">折扣计算</text>
<text class="sub-label-small">计算折后价</text>
</view>
</view>
</view>
</view>
<!-- 系统入口 -->
<view class="system-entry-row" bindtap="goToAbout" hover-class="list-item-hover">
<text class="sys-label">关于与帮助</text>
<view class="sys-right">
<text class="sys-icon"></text>
<text class="arrow">></text>
</view>
</view>
<view class="privacy-link" bindtap="goToPrivacy" style="text-align: center; margin-top: 60rpx; padding-bottom: 40rpx;">
<text style="font-size: 24rpx; color: #ccc;">隐私政策</text>
</view>
</view>
</view>
</scroll-view>