Browse Source

feat: 优化位置信息按钮布局,改为一行显示

Xfy
徐飞洋 4 weeks ago
parent
commit
cda5959ae4
  1. 23
      Dockerfile
  2. 2
      pages/profile/authentication/index.js
  3. 4
      pages/profile/authentication/index.wxml
  4. 22
      pages/profile/authentication/index.wxss
  5. 29
      pages/profile/index.wxml

23
Dockerfile

@ -0,0 +1,23 @@
# 使用官方的Node.js 18镜像作为基础镜像
FROM node:18-alpine
# 设置工作目录
WORKDIR /app
# 复制package.json和package-lock.json到工作目录
COPY server-example/package*.json ./
# 安装依赖
RUN npm install --production
# 复制整个项目到工作目录
COPY . .
# 设置环境变量
ENV NODE_ENV=production
# 暴露应用端口
EXPOSE 3000
# 运行应用
CMD ["npm", "start"]

2
pages/profile/authentication/index.js

@ -165,7 +165,7 @@ Page({
const currentStatus = this.data.idcardstatus; const currentStatus = this.data.idcardstatus;
// 如果当前状态是已通过,显示确认对话框 // 如果当前状态是已通过,显示确认对话框
if (currentStatus === '1') { if (currentStatus === '1' || currentStatus === 1) {
wx.showModal({ wx.showModal({
title: '确认重新提交', title: '确认重新提交',
content: '您的认证信息已审核通过,确定要重新提交审核吗?', content: '您的认证信息已审核通过,确定要重新提交审核吗?',

4
pages/profile/authentication/index.wxml

@ -1,6 +1,5 @@
<view class="container"> <view class="container">
<!-- 当前认证资料 --> <!-- 当前认证资料 -->
<view class="big-title">提示:只有认证通过后,才能使用估价功能和对比价格功能,重复提交会重置登录权限!</view>
<!-- 身份证上传区域 --> <!-- 身份证上传区域 -->
<view class="upload-section"> <view class="upload-section">
@ -75,4 +74,7 @@
<view class="auth-btn" bindtap="submitAuth"> <view class="auth-btn" bindtap="submitAuth">
<text class="auth-btn-text">{{idcardstatus === '' || idcardstatus === 0 ? '提交' : '重新提交'}}</text> <text class="auth-btn-text">{{idcardstatus === '' || idcardstatus === 0 ? '提交' : '重新提交'}}</text>
</view> </view>
<view class="big-title">❗提示:只有认证通过后,才能使用估价功能和对比价格功能,重复提交会重置登录权限!</view>
</view> </view>

22
pages/profile/authentication/index.wxss

@ -4,31 +4,33 @@
background-color: #f5f5f5; background-color: #f5f5f5;
min-height: 100vh; min-height: 100vh;
padding-bottom: 40rpx; padding-bottom: 40rpx;
display: block;
width: 100%;
height: auto;
} }
/* 大标题提示 */ /* 大标题提示 */
.big-title { .big-title {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); background: white;
color: white; color: black;
font-size: 28rpx; font-size: 24rpx;
font-weight: 500; font-weight: 500;
padding: 24rpx 30rpx; padding: 24rpx 30rpx;
margin: 20rpx 30rpx; margin: 20rpx 30rpx 0;
border-radius: 16rpx; border-radius: 16rpx;
box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3); box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
display: flex; display: flex;
align-items: center; align-items: center;
line-height: 1.6; line-height: 1.6;
} }
.big-title::before { .big-title::before {
content: "!";
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
background-color: rgba(255, 255, 255, 0.3); background-color: #f0f0f0;
border-radius: 50%; border-radius: 50%;
font-size: 28rpx; font-size: 28rpx;
font-weight: bold; font-weight: bold;
@ -68,13 +70,13 @@
/* 上传区域 */ /* 上传区域 */
.upload-section { .upload-section {
background-color: white; background-color: white;
margin: 20rpx 0; margin: 0 0 20rpx;
padding: 30rpx; padding: 30rpx;
} }
.upload-item { .upload-item {
display: flex; display: flex;
margin-bottom: 40rpx; margin-bottom: 20rpx;
align-items: center; align-items: center;
} }
@ -229,7 +231,7 @@
padding: 30rpx; padding: 30rpx;
margin: 0 30rpx; margin: 0 30rpx;
border-radius: 20rpx; border-radius: 20rpx;
margin-top: 40rpx; margin-top: 20rpx;
} }
.auth-btn-text { .auth-btn-text {

29
pages/profile/index.wxml

@ -74,20 +74,29 @@
<view wx:if="{{hasLocationAuth}}" style="font-size: 28rpx; color: #333; margin-bottom: 20rpx;"> <view wx:if="{{hasLocationAuth}}" style="font-size: 28rpx; color: #333; margin-bottom: 20rpx;">
当前位置:{{locationInfo || '暂无位置信息'}} 当前位置:{{locationInfo || '暂无位置信息'}}
</view> </view>
<view wx:if="{{hasLocationAuth}}" style="display: flex; justify-content: space-between; gap: 12rpx;">
<button
class="btn"
style="background-color: #18d87eff; color: white; width: 48%; margin-bottom: 0;"
bindtap="getUserLocation"
>
更新位置
</button>
<button
class="btn"
style="background-color: #1677ff; color: white; width: 48%; margin-bottom: 0;"
bindtap="chooseLocation"
>
手动选择位置
</button>
</view>
<button <button
class="btn" wx:if="{{!hasLocationAuth}}"
style="background-color: {{hasLocationAuth ? '#18d87eff' : '#1677ff'}}; color: white; margin-bottom: 12rpx;"
bindtap="{{hasLocationAuth ? 'getUserLocation' : 'requestLocationAuth'}}"
>
{{hasLocationAuth ? '更新位置' : '授权位置'}}
</button>
<button
wx:if="{{hasLocationAuth}}"
class="btn" class="btn"
style="background-color: #1677ff; color: white;" style="background-color: #1677ff; color: white;"
bindtap="chooseLocation" bindtap="requestLocationAuth"
> >
手动选择位置 授权位置
</button> </button>
</view> </view>
</view> </view>

Loading…
Cancel
Save