小程序提交

This commit is contained in:
2025-07-20 18:22:59 +08:00
parent a1d21c67b8
commit fa2a7b3499
61 changed files with 2505 additions and 944 deletions

View File

@ -0,0 +1,146 @@
import { baseUrl } from "../../../request";
Page({
data: {
status: '', // 审核状态: 审核中、审核通过、审核失败
result: {} // 查询结果数据
},
// 输入框事件
onInput(e) {
this.setData({
inputIdCard: e.detail.value // 获取身份证输入
});
},
// 查询操作
onSearch() {
const inputIdCard = this.data.inputIdCard;
if (!inputIdCard) {
wx.showToast({
title: '请输入身份证',
icon: 'none'
});
return;
}
// 查询的接口
wx.request({
url: baseUrl + '/advancementApply/query/credential', // 替换为你的后端查询接口
method: 'POST',
data: { templateString: inputIdCard },
success: (res) => {
console.log('后端返回---->',res.data);
if (res.data.code === 1) {
// 假设返回的查询结果是以下格式
const result = res.data.data; // 获取返回的数据
// 更新审核状态和查询结果
this.setData({
status: result.reviewStatus, // 审核状态
result: {
name: result.name, // 姓名
phone: result.phone, // 手机号
idCard: result.idCard, // 身份证号
failureReason: result.rejectReason, // 失败原因
password: result.userPassword, // 密码(如果有的话)
userRole: result.userRole, // 用户级别
id: result.id
}
});
} else {
wx.showToast({
title: res.data.message,
icon: 'none'
});
}
},
fail: () => {
wx.showToast({
title: '请求失败,请重试',
icon: 'none'
});
}
});
},
// 重新申请操作
onReapply() {
wx.showToast({
title: '重新申请中...',
icon: 'none'
});
},
// 用户撤销申请
revokeApplication() {
const { id } = this.data.result
console.log('id--->',id);
wx.showModal({
title: '确认',
content: '是否撤销申请',
complete: (res) => {
if (res.cancel) {
}
if (res.confirm) {
wx.request({
url: baseUrl + '/advancementApply/modify/status',
method: 'POST',
header: {
Authorization: wx.getStorageSync('token')
},
data: {
id: id
},
success: res => {
console.log('后端返回11---->',res.data);
if (res.data.code === 1 ) {
this.setData({
status: ''
})
} else {
wx.showToast({
title: '系统错误',
})
}
}
})
}
}
})
},
// 用户去登录
gotoLogin() {
wx.navigateBack({
delta: 2
})
},
// 用户重新申请
reapply() {
wx.navigateBack({
delta: 1
})
},
copyPassword() {
const { password } = this.data.result
wx.setClipboardData({
data: password, // 要复制的内容
success(res) {
wx.showToast({
title: '已复制到剪贴板',
icon: 'success'
});
},
fail() {
wx.showToast({
title: '复制失败',
icon: 'none'
});
}
});
}
});

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,98 @@
<view class="flex-col page">
<!-- 身份证输入框 -->
<view class="flex-row items-center section">
<image class="image" src="./images/find.png" />
<input class="font text ml-5" maxlength="18" placeholder="请输入身份证查询凭证" bindinput="onInput" bindconfirm="onSearch" />
</view>
<!-- 显示查询结果 -->
<view class="flex-col mt-18">
<!-- 审核失败 -->
<view wx:if="{{status === '审核失败'}}" class="flex-col section_2">
<view class="flex-row justify-center self-start section_3">
<image class="image_2" src="./images/flase.png" />
<text class="font text_2 ml-8">审核失败</text>
</view>
<text class="self-start font_2 text_3">姓名</text>
<text class="self-start font_3 text_4">{{result.name}}</text>
<text class="self-start font_2 text_5">手机号</text>
<text class="self-start font_4 text_6">{{result.phone}}</text>
<view class="flex-col self-stretch relative group">
<view class="self-start section_4"></view>
<view class="flex-col justify-start items-center self-stretch text-wrapper" bind:tap="reapply">
<text class="font text_9">重新申请</text>
</view>
<view class="flex-col items-start section_5 pos">
<text class="font_5 text_7">原因:</text>
<text class="font_5 text_8 mt-11">{{result.failureReason}}</text>
</view>
</view>
</view>
<!-- 审核通过 -->
<view wx:if="{{status === '已通过'}}" class="flex-col section_6 mt-18">
<view class="flex-col group_2">
<view class="flex-row justify-between group_3">
<view class="flex-row items-center section_7">
<image class="shrink-0 image_3" src="./images/current.png" />
<text class="font text_11 ml-6">审核通过</text>
</view>
<view class="flex-col justify-start items-center self-start text-wrapper_2">
<text class="text_10">员工</text>
</view>
</view>
<view class="flex-col relative mt-21">
<view class="flex-row self-stretch section_8">
<text class="font_2 text_12">姓名</text>
<text class="font_3 ml-39">{{result.name}}</text>
</view>
<view class="flex-row self-stretch section_9">
<text class="font_2">手机号</text>
<text class="font_4 text_13 ml-23">{{result.phone}}</text>
</view>
<view class="self-start section_10"></view>
<view class="flex-row justify-between items-center section_11 pos_2">
<view class="flex-row items-center">
<text class="font_2 text_14">密码</text>
<text class="font_3 text_15 ml-37">{{result.password}}</text>
</view>
<text class="font_2 text_16" bind:tap="copyPassword">复制</text>
</view>
</view>
<view class="group_4 mt-21">
<text class="font_6 text_17">温馨提示:</text>
<text class="font_6">恭喜成为本公司的推广员工,请保存以上账号密码,用于登录员工端小程序。</text>
</view>
</view>
<view class="flex-col justify-start items-center text-wrapper_3" bind:tap="gotoLogin"><text class="font text_18">去登录</text></view>
</view>
<!-- 审核中 -->
<view wx:if="{{status === '待审核'}}" class="flex-col section_12 mt-18">
<view class="flex-row justify-center items-center self-start section_13">
<image class="image" src="./images/wait.png" />
<text class="font text_19 ml-6">审核中</text>
</view>
<text class="self-start font_2 text_20">姓名</text>
<text class="self-start font_3 text_21">{{result.name}}</text>
<text class="self-start font_2 text_22">手机号</text>
<text class="self-start font_4 text_23">{{result.phone}}</text>
<!-- <text class="self-start font_2 text_24">身份证号</text>
<view class="flex-row self-stretch group_5">
<view class="shrink-0 section_14"></view>
<view class="flex-col justify-start items-start flex-1 text-wrapper_4">
<text class="text_25">{{result.idCard}}</text>
</view>
</view> -->
<view class="flex-col self-stretch group_6">
<view class="group_7">
<text class="font_6 text_26">注:</text>
<text class="font_6">每次必须通过身份证来查看申请状态。</text>
</view>
<view class="flex-col justify-start items-center text-wrapper_5 mt-14" bind:tap="revokeApplication">
<text class="font text_27">撤销申请</text>
</view>
</view>
</view>
</view>
</view>

View File

@ -0,0 +1,329 @@
.ml-5 {
margin-left: 9.38rpx;
}
.mt-11 {
margin-top: 20.63rpx;
}
.ml-39 {
margin-left: 73.13rpx;
}
.ml-23 {
margin-left: 43.13rpx;
}
.ml-37 {
margin-left: 69.38rpx;
}
.mt-21 {
margin-top: 39.38rpx;
}
.page {
padding: 45.94rpx 38.44rpx 140.91rpx;
background-color: #fafafa;
width: 100%;
overflow-y: auto;
overflow-x: hidden;
height: 100%;
}
.section {
padding: 15.81rpx 13.93rpx 14.19rpx;
background-color: #ffffff;
border-radius: 93.75rpx;
border: solid 1.88rpx #e0e0e0;
}
.image {
width: 33.75rpx;
height: 33.75rpx;
}
.font {
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 27.84rpx;
color: #ffffff;
}
.text {
color: #919191;
line-height: 27.75rpx;
}
.section_2 {
padding: 33.75rpx 28.13rpx 35.63rpx;
background-color: #ffffff;
border-radius: 18.43rpx;
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
}
.section_3 {
padding: 15rpx 0 13.13rpx;
background-color: #e53935;
border-radius: 18.75rpx;
width: 211.88rpx;
}
.image_2 {
width: 30rpx;
height: 30rpx;
}
.text_2 {
margin-right: 3.28rpx;
line-height: 28.16rpx;
}
.font_2 {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 24.15rpx;
color: #999999;
}
.text_3 {
margin-left: 2.81rpx;
margin-top: 39rpx;
line-height: 24.21rpx;
}
.font_3 {
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 27.84rpx;
color: #333333;
}
.text_4 {
margin-left: 4.24rpx;
margin-top: 21rpx;
}
.text_5 {
margin-left: 3.19rpx;
margin-top: 41.4rpx;
}
.font_4 {
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 24.15rpx;
color: #333333;
}
.text_6 {
margin-left: 4.52rpx;
margin-top: 24.04rpx;
line-height: 22.76rpx;
}
.group {
margin-top: 43.73rpx;
}
.section_4 {
background-color: #d32f2f;
border-radius: 9.38rpx 0rpx 0rpx 9.38rpx;
width: 13.13rpx;
height: 120rpx;
}
.text-wrapper {
margin-top: 35.63rpx;
padding: 35.57rpx 0 30.49rpx;
background-color: #e53935;
border-radius: 9.38rpx;
}
.text_9 {
line-height: 27.69rpx;
}
.section_5 {
padding: 27.81rpx 21.47rpx 24.26rpx;
background-color: #fdecea;
border-radius: 8.01rpx;
}
.pos {
position: absolute;
left: 7.5rpx;
right: 0;
top: 0;
}
.font_5 {
font-size: 26.25rpx;
font-family: AlibabaPuHuiTi;
line-height: 24.15rpx;
}
.text_7 {
color: #d32f2f;
line-height: 23.25rpx;
}
.text_8 {
color: #555555;
line-height: 24.26rpx;
}
.section_6 {
padding: 0 28.13rpx 56.25rpx;
background-color: #ffffff;
border-radius: 22.24rpx;
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
}
.group_2 {
padding: 31.88rpx 0 54.17rpx;
}
.group_3 {
padding-left: 7.5rpx;
}
.section_7 {
padding: 11.25rpx 18.75rpx 9.38rpx;
background-color: #66bb6a;
border-radius: 18.75rpx;
height: 58.13rpx;
}
.image_3 {
width: 37.5rpx;
height: 37.5rpx;
}
.text_11 {
margin-right: 3.28rpx;
line-height: 28.16rpx;
}
.text-wrapper_2 {
padding: 11.47rpx 0 9.73rpx;
background-color: #66bb6a;
border-radius: 29.46rpx;
width: 99.38rpx;
height: 41.25rpx;
}
.text_10 {
color: #ffffff;
font-size: 22.5rpx;
font-family: SourceHanSansCN;
line-height: 20.04rpx;
}
.section_8 {
padding: 33.58rpx 27.19rpx 30.45rpx;
background-color: #f8f9fa;
border-radius: 9.38rpx;
}
.text_12 {
line-height: 24.21rpx;
}
.section_9 {
margin-top: 28.74rpx;
padding: 35.33rpx 27.56rpx 32.4rpx;
background-color: #f8f9fa;
border-radius: 9.38rpx;
}
.text_13 {
line-height: 22.76rpx;
}
.section_10 {
margin-top: 31.26rpx;
background-color: #66bb6a;
border-radius: 9.38rpx 0rpx 0rpx 9.38rpx;
width: 13.13rpx;
height: 91.88rpx;
}
.section_11 {
padding: 34.74rpx 21.62rpx 25.59rpx;
background-color: #e8f5e9;
border-radius: 9.38rpx;
}
.pos_2 {
position: absolute;
left: 5.63rpx;
right: 0;
top: 235.75rpx;
}
.text_14 {
line-height: 24.36rpx;
}
.text_15 {
line-height: 31.54rpx;
}
.text_16 {
margin-right: 7.52rpx;
color: #66bb6a;
}
.group_4 {
line-height: 31.88rpx;
}
.font_6 {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 31.88rpx;
color: #999999;
}
.text_17 {
color: #66bb6a;
}
.text-wrapper_3 {
padding: 35.66rpx 0 30.39rpx;
background-color: #66bb6a;
border-radius: 9.38rpx;
}
.text_18 {
line-height: 27.69rpx;
}
.section_12 {
padding: 33.75rpx 28.13rpx 54.38rpx;
background-color: #ffffff;
border-radius: 22.24rpx;
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
}
.section_13 {
margin-left: 7.5rpx;
padding: 13.13rpx 0 11.25rpx;
background-color: #ff8d1a;
border-radius: 18.75rpx;
width: 183.75rpx;
}
.text_19 {
line-height: 28.16rpx;
}
.text_20 {
margin-left: 2.81rpx;
margin-top: 39rpx;
line-height: 24.21rpx;
}
.text_21 {
margin-left: 4.24rpx;
margin-top: 21rpx;
}
.text_22 {
margin-left: 3.19rpx;
margin-top: 41.4rpx;
}
.text_23 {
margin-left: 4.52rpx;
margin-top: 24.04rpx;
line-height: 22.76rpx;
}
.text_24 {
margin-left: 2.98rpx;
margin-top: 39.6rpx;
line-height: 24.43rpx;
}
.group_5 {
margin-top: 20.94rpx;
}
.section_14 {
background-color: #ff8d1a;
border-radius: 9.38rpx 0rpx 0rpx 9.38rpx;
width: 13.13rpx;
height: 91.88rpx;
}
.text-wrapper_4 {
margin-left: -7.5rpx;
padding: 38.04rpx 0 32.04rpx;
background-color: #fff4e5;
border-radius: 9.19rpx;
height: 91.88rpx;
}
.text_25 {
margin-left: 25.71rpx;
color: #ff8d1a;
font-size: 30rpx;
font-family: AlimamaShuHeiTi;
line-height: 21.79rpx;
}
.group_6 {
margin-top: 40.97rpx;
}
.group_7 {
margin-left: 2.74rpx;
margin-right: 10.33rpx;
line-height: 31.88rpx;
}
.text_26 {
color: #ff8d1a;
}
.text-wrapper_5 {
padding: 35.48rpx 0 30.41rpx;
background-color: #ff8d1a;
border-radius: 9.38rpx;
}
.text_27 {
line-height: 27.86rpx;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B