first commit
|
|
@ -0,0 +1 @@
|
||||||
|
{"containers":[],"config":{}}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
/*
|
||||||
|
* Eslint config file
|
||||||
|
* Documentation: https://eslint.org/docs/user-guide/configuring/
|
||||||
|
* Install the Eslint extension before using this feature.
|
||||||
|
*/
|
||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
browser: true,
|
||||||
|
node: true,
|
||||||
|
},
|
||||||
|
ecmaFeatures: {
|
||||||
|
modules: true,
|
||||||
|
},
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
sourceType: 'module',
|
||||||
|
},
|
||||||
|
globals: {
|
||||||
|
wx: true,
|
||||||
|
App: true,
|
||||||
|
Page: true,
|
||||||
|
getCurrentPages: true,
|
||||||
|
getApp: true,
|
||||||
|
Component: true,
|
||||||
|
requirePlugin: true,
|
||||||
|
requireMiniProgram: true,
|
||||||
|
},
|
||||||
|
// extends: 'eslint:recommended',
|
||||||
|
rules: {},
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
// app.js
|
||||||
|
App({
|
||||||
|
onLaunch() {
|
||||||
|
// 展示本地存储能力
|
||||||
|
const logs = wx.getStorageSync('logs') || []
|
||||||
|
logs.unshift(Date.now())
|
||||||
|
wx.setStorageSync('logs', logs)
|
||||||
|
|
||||||
|
},
|
||||||
|
globalData: {
|
||||||
|
userInfo: null
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
function newDir(){
|
||||||
|
const fs = wx.getFileSystemManager();
|
||||||
|
fs.mkdir({
|
||||||
|
dirPath: `${wx.env.USER_DATA_PATH}/images`,
|
||||||
|
recursive: true,
|
||||||
|
success(res) {
|
||||||
|
console.log('Folder created successfully!');
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
{
|
||||||
|
"pages": [
|
||||||
|
"pages/login/login",
|
||||||
|
"pages/home/home",
|
||||||
|
"pages/personal/personal",
|
||||||
|
"pages/policy/policy",
|
||||||
|
"pages/qa/qa",
|
||||||
|
"pages/assist/assist",
|
||||||
|
"pages/recruit/recruit",
|
||||||
|
"pages/messageEdit/messageEdit"
|
||||||
|
],
|
||||||
|
"window": {
|
||||||
|
"backgroundTextStyle": "light",
|
||||||
|
"navigationBarTitleText": "万名群众进城镇",
|
||||||
|
"navigationBarBackgroundColor": "#2b4b6b"
|
||||||
|
},
|
||||||
|
"tabBar": {
|
||||||
|
"list": [{
|
||||||
|
"pagePath": "pages/home/home",
|
||||||
|
"text": "首页",
|
||||||
|
"iconPath": "/assets/images/icon/home-off.png",
|
||||||
|
"selectedIconPath": "/assets/images/icon/home-on.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/personal/personal",
|
||||||
|
"text": "个人",
|
||||||
|
"iconPath": "/assets/images/icon/personal-off.png",
|
||||||
|
"selectedIconPath": "/assets/images/icon/personal-on.png"
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
"style": "v2",
|
||||||
|
"rendererOptions": {
|
||||||
|
"skyline": {
|
||||||
|
"defaultDisplayBlock": true,
|
||||||
|
"disableABTest": true,
|
||||||
|
"sdkVersionBegin": "3.0.0",
|
||||||
|
"sdkVersionEnd": "15.255.255"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"componentFramework": "glass-easel",
|
||||||
|
"sitemapLocation": "sitemap.json",
|
||||||
|
"lazyCodeLoading": "requiredComponents"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
/**app.wxss**/
|
||||||
|
.container {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 200rpx 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1704339319044" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2285" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M704 0H320a96 96 0 0 0-96 96v832a96 96 0 0 0 96 96h384a96 96 0 0 0 96-96V96a96 96 0 0 0-96-96z m32 928a32 32 0 0 1-32 32H320a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32h384a32 32 0 0 1 32 32z m-224-128a64 64 0 1 0 64 64 64 64 0 0 0-64-64z m64-704h-128a32 32 0 0 0 0 64h128a32 32 0 0 0 0-64z" fill="#1B1B1B" p-id="2286"></path></svg>
|
||||||
|
After Width: | Height: | Size: 660 B |
|
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1704352351942" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5421" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512 283.456c-165.248 0-299.392 74.304-408.128 228.864 107.2 154.112 241.28 228.224 408.128 228.224 166.848 0 300.928-74.112 408.128-228.224C811.392 357.76 677.248 283.52 512 283.52zM512 832c-213.888 0-384.512-106.688-512-320 129.408-213.312 300.032-320 512-320 211.968 0 382.592 106.688 512 320-127.488 213.312-298.112 320-512 320z m0-137.152a182.848 182.848 0 1 0 0-365.696 182.848 182.848 0 0 0 0 365.696zM512 576a64 64 0 1 1 0-128 64 64 0 0 1 0 128z" fill="#262626" p-id="5422"></path></svg>
|
||||||
|
After Width: | Height: | Size: 828 B |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1704351441252" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3422" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M746.666667 373.333333h-39.637334V294.101333A198.186667 198.186667 0 0 0 509.013333 96a198.186667 198.186667 0 0 0-198.101333 198.101333V373.333333h-39.68A79.445333 79.445333 0 0 0 192 452.565333v353.493334a79.445333 79.445333 0 0 0 79.232 79.274666H746.666667a79.445333 79.445333 0 0 0 79.274666-79.232v-353.536A79.445333 79.445333 0 0 0 746.666667 373.333333z m-197.802667 307.712a29.269333 29.269333 0 0 1-29.098667 29.525334 29.269333 29.269333 0 0 1-29.098666-29.525334v-118.186666c0-16.341333 13.013333-29.525333 29.098666-29.525334 7.978667 0 15.274667 3.328 20.522667 8.661334 5.290667 5.376 8.533333 12.757333 8.533333 20.906666v118.144zM386.133333 373.333333V294.101333a122.88 122.88 0 0 1 122.837334-122.837333 122.88 122.88 0 0 1 122.794666 122.794667V373.333333H386.133333z" fill="#000000" p-id="3423"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1704352142928" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4457" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M337.387283 341.82659c-17.757225 0-35.514451 11.83815-35.514451 29.595375s17.757225 29.595376 35.514451 29.595376 29.595376-11.83815 29.595376-29.595376c0-18.49711-11.83815-29.595376-29.595376-29.595375zM577.849711 513.479769c-11.83815 0-22.936416 12.578035-22.936416 23.6763 0 12.578035 11.83815 23.676301 22.936416 23.676301 17.757225 0 29.595376-11.83815 29.595376-23.676301s-11.83815-23.676301-29.595376-23.6763zM501.641618 401.017341c17.757225 0 29.595376-12.578035 29.595376-29.595376 0-17.757225-11.83815-29.595376-29.595376-29.595375s-35.514451 11.83815-35.51445 29.595375 17.757225 29.595376 35.51445 29.595376zM706.589595 513.479769c-11.83815 0-22.936416 12.578035-22.936416 23.6763 0 12.578035 11.83815 23.676301 22.936416 23.676301 17.757225 0 29.595376-11.83815 29.595376-23.676301s-11.83815-23.676301-29.595376-23.6763z" fill="#28C445" p-id="4458"></path><path d="M510.520231 2.959538C228.624277 2.959538 0 231.583815 0 513.479769s228.624277 510.520231 510.520231 510.520231 510.520231-228.624277 510.520231-510.520231-228.624277-510.520231-510.520231-510.520231zM413.595376 644.439306c-29.595376 0-53.271676-5.919075-81.387284-12.578034l-81.387283 41.433526 22.936416-71.768786c-58.450867-41.433526-93.965318-95.445087-93.965317-159.815029 0-113.202312 105.803468-201.988439 233.803468-201.98844 114.682081 0 216.046243 71.028902 236.023121 166.473989-7.398844-0.739884-14.797688-1.479769-22.196532-1.479769-110.982659 1.479769-198.289017 85.086705-198.289017 188.67052 0 17.017341 2.959538 33.294798 7.398844 49.572255-7.398844 0.739884-15.537572 1.479769-22.936416 1.479768z m346.265896 82.867052l17.757225 59.190752-63.630058-35.514451c-22.936416 5.919075-46.612717 11.83815-70.289017 11.83815-111.722543 0-199.768786-76.947977-199.768786-172.393063-0.739884-94.705202 87.306358-171.653179 198.289017-171.65318 105.803468 0 199.028902 77.687861 199.028902 172.393064 0 53.271676-34.774566 100.624277-81.387283 136.138728z" fill="#28C445" p-id="4459"></path></svg>
|
||||||
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
|
@ -0,0 +1,66 @@
|
||||||
|
// pages/assist/assist.js
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad(options) {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage() {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"usingComponents": {},
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarTitleText": "帮扶信息"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
<!--pages/assist/assist.wxml-->
|
||||||
|
<text>pages/assist/assist.wxml</text>
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/* pages/assist/assist.wxss */
|
||||||
|
|
@ -0,0 +1,100 @@
|
||||||
|
// pages/personal/personal.js
|
||||||
|
import { requestUrl } from '../../utils/config.js';
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
menuItems: [],
|
||||||
|
swiperList:[]
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad(options) {
|
||||||
|
this.getMenu();
|
||||||
|
this.getSwiperList();
|
||||||
|
},
|
||||||
|
getMenu(){
|
||||||
|
wx.request({
|
||||||
|
url: requestUrl + '/api/get-menu', // 更改为你的实际API地址
|
||||||
|
success: (res) => {
|
||||||
|
console.log(res.data)
|
||||||
|
this.setData({ menuItems: res.data.data });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getSwiperList(){
|
||||||
|
let that = this; // 在回调中使用this,所以需要先保存它的引用
|
||||||
|
wx.request({
|
||||||
|
url: requestUrl + '/api/get-swiper-list', // 确保requestUrl已定义且正确
|
||||||
|
method: "GET",
|
||||||
|
success(res) {
|
||||||
|
console.log(res.data); // 打印响应内容
|
||||||
|
// 假设返回的数据结构是{ image_ids: [...] }
|
||||||
|
if(res.data.code == 0 && res.data.msg == "ok"){
|
||||||
|
console.log("请求成功")
|
||||||
|
that.setData({swiperList:res.data.data})
|
||||||
|
} else {
|
||||||
|
// 处理错误或空数据的情况
|
||||||
|
console.log("Received empty or incorrect format data");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail(error) {
|
||||||
|
// 请求失败的处理
|
||||||
|
console.error("Request failed", error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage() {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
<view class="page-body">
|
||||||
|
<view>
|
||||||
|
<!-- 轮播图组件 -->
|
||||||
|
<swiper indicator-dots="true" autoplay="true" interval="3000" duration="500" indicator-color="rgba(128,128,128,1)" indicator-active-color="rgba(255,255,255,1)" circular="true">
|
||||||
|
<swiper-item wx:for="{{swiperList}}" wx:key="unique">
|
||||||
|
<image src="{{item.path}}" class="slide-image" mode="widthFix"></image>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<!-- 四宫格容器 -->
|
||||||
|
<view class="grid-container">
|
||||||
|
<view class="card">
|
||||||
|
<navigator wx:for="{{menuItems}}" wx:key="id" url="{{item.url}}" class="grid-item">
|
||||||
|
<image src="data:image/png;base64,{{item.base64EncodedImage}}"></image>
|
||||||
|
<text>{{item.menu_name}}</text>
|
||||||
|
</navigator>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
.page-body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 四宫格布局样式 */
|
||||||
|
.grid-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
width: 96%; /* 根据实际情况调整 */
|
||||||
|
height: 290rpx;
|
||||||
|
border-radius: 30rpx; /* 圆角大小 */
|
||||||
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); /* 阴影效果,根据需要调整 */
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-around; /* 子项在主轴线上的对齐方式 */
|
||||||
|
margin: 20px 0; /* 卡片外边距 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-item {
|
||||||
|
width: 48%; /* 每个项目占据一行的48%,两列布局 */
|
||||||
|
text-align: center; /* 文本居中 */
|
||||||
|
margin-bottom: 20px; /* 底部外边距 */
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-item image {
|
||||||
|
width: 40rpx; /* 图像大小,根据需要调整 */
|
||||||
|
height: 40rpx;
|
||||||
|
margin-bottom: 5rpx; /* 图像与文本之间的间距,根据需要调整 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-item text {
|
||||||
|
display: block; /* 让文本独占一行 */
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
import { requestUrl } from '../../utils/config.js';
|
||||||
|
function showTost(title){
|
||||||
|
wx.showToast({
|
||||||
|
title: title,
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
phoneNumber: '', // 手机号
|
||||||
|
password: '' // 密码
|
||||||
|
},
|
||||||
|
handlePhoneInput(event) {
|
||||||
|
this.setData({ phoneNumber: event.detail.value });
|
||||||
|
},
|
||||||
|
handlePasswordInput(event) {
|
||||||
|
this.setData({ password: event.detail.value });
|
||||||
|
},
|
||||||
|
handleLogin() {
|
||||||
|
wx.request({
|
||||||
|
url: requestUrl + '/user/login', // 你的接口地址
|
||||||
|
method: 'POST',
|
||||||
|
data: {
|
||||||
|
username: this.data.phoneNumber,
|
||||||
|
password: this.data.password
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
success(res) {
|
||||||
|
if (res.data.code == 0 && res.data.msg == "ok"){
|
||||||
|
console.log("登录成功",res.data.code)
|
||||||
|
showTost("登录成功")
|
||||||
|
// wx.redirectTo({
|
||||||
|
// url: 'pages/home/home',
|
||||||
|
// })
|
||||||
|
wx.switchTab({
|
||||||
|
url: 'pages/home/home'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
showTost(res.data.msg)
|
||||||
|
console.log("登录失败",res.data)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail(error) {
|
||||||
|
console.log('登录失败', error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad(options) {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage() {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
{}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
<view class="login">
|
||||||
|
|
||||||
|
<!-- 登录卡片容器 -->
|
||||||
|
<view class="login-card">
|
||||||
|
<view class="login-text">登录</view>
|
||||||
|
|
||||||
|
<!-- 手机号输入区 -->
|
||||||
|
<view class="phone">
|
||||||
|
<image src="/assets/images/icon/Phone.svg" class="phone-icon"></image>
|
||||||
|
<input bindinput ="handlePhoneInput" placeholder="请输入手机号" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 密码输入区 -->
|
||||||
|
<view class="password">
|
||||||
|
<image src="/assets/images/icon/password.svg" class="password-icon"></image>
|
||||||
|
<input type="password" bindinput="handlePasswordInput" placeholder="请输入密码" />
|
||||||
|
<image src="/assets/images/icon/eye.svg" class="eye-icon"></image>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 忘记密码链接 -->
|
||||||
|
<view class="forget-password">
|
||||||
|
<navigator>忘记密码?</navigator>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 登录按钮 -->
|
||||||
|
<view class="login-btn">
|
||||||
|
<button class="btn-dl" bind:tap="handleLogin" type="primary">登录</button>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 协议区 -->
|
||||||
|
<view class="agreement-area">
|
||||||
|
<checkbox class="agreement"></checkbox>
|
||||||
|
<view class="agreement-text">同意小程序的《使用协议》</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 登录提示框 -->
|
||||||
|
<view class="prompt-box">
|
||||||
|
<view class="line"></view>
|
||||||
|
<view class="lText">您还可以使用以下方式登录</view>
|
||||||
|
<view class="line"></view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 其他登录方式 -->
|
||||||
|
<view class="other-login">
|
||||||
|
<image src="/assets/images/icon/weixin.svg"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
@ -0,0 +1,167 @@
|
||||||
|
/* 最大的父元素 */
|
||||||
|
.login{
|
||||||
|
display: block;
|
||||||
|
position:absolute;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
background:#778899;
|
||||||
|
/* 换图片 */
|
||||||
|
|
||||||
|
}
|
||||||
|
/* 白色区域 */
|
||||||
|
.login .login-card{
|
||||||
|
position: relative;
|
||||||
|
margin-top: 150rpx;
|
||||||
|
left: 100rpx;
|
||||||
|
width: 545rpx;
|
||||||
|
height: 750rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
}
|
||||||
|
/* 白色区域内的登录文本 */
|
||||||
|
.login .login-card .login-text{
|
||||||
|
margin-top: 50rpx;
|
||||||
|
position: absolute;
|
||||||
|
margin-left:80rpx;
|
||||||
|
width: 150rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
font-size: 60rpx;
|
||||||
|
font-family: Helvetica;
|
||||||
|
color: #000000;
|
||||||
|
line-height: 100rpx;
|
||||||
|
letter-spacing: 2rpx;
|
||||||
|
}
|
||||||
|
/* 手机图片+输入框+下划线的父容器view */
|
||||||
|
.login .login-card .phone{
|
||||||
|
margin-top: 200rpx;
|
||||||
|
margin-left: 35rpx;
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
width:450rpx ;
|
||||||
|
height: 80rpx ;
|
||||||
|
border-bottom: 3rpx solid rgb(58, 57, 57);
|
||||||
|
}
|
||||||
|
/* 手机图标 */
|
||||||
|
.login .login-card .phone .phone-icon{
|
||||||
|
margin-top: 5rpx;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
width: 55rpx;
|
||||||
|
height: 55rpx;
|
||||||
|
}
|
||||||
|
/* 手机号输入框 */
|
||||||
|
.login .login-card .phone input{
|
||||||
|
width: 200rpx;
|
||||||
|
font-size: 25rpx ;
|
||||||
|
margin-top: 15rpx;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
}
|
||||||
|
/* 密码图标+输入框+小眼睛图标+下划线父容器view */
|
||||||
|
.login .login-card .password{
|
||||||
|
margin-top: 400rpx;
|
||||||
|
margin-left: 35rpx;
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
width:450rpx ;
|
||||||
|
height: 80rpx ;
|
||||||
|
border-bottom: 3rpx solid rgb(58, 57, 57);
|
||||||
|
}
|
||||||
|
/* 密码图标 */
|
||||||
|
.login .login-card .password .password-icon{
|
||||||
|
margin-top: 5rpx;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
width: 55rpx;
|
||||||
|
height: 55rpx;
|
||||||
|
}
|
||||||
|
/* 眼睛 图标*/
|
||||||
|
.login .login-card .password .eye-icon{
|
||||||
|
margin-top: 5rpx;
|
||||||
|
margin-left: 65rpx;
|
||||||
|
width: 55rpx;
|
||||||
|
height: 55rpx;
|
||||||
|
}
|
||||||
|
/* 密码输入框 */
|
||||||
|
.login .login-card .password input{
|
||||||
|
width: 200rpx;
|
||||||
|
font-size: 25rpx ;
|
||||||
|
margin-top: 15rpx;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
}
|
||||||
|
/* 注册+忘记密码父容器 */
|
||||||
|
.login .login-card .forget-password{
|
||||||
|
font-size: 25rpx;
|
||||||
|
margin-left: 85rpx;
|
||||||
|
width: 370rpx;
|
||||||
|
margin-top: 540rpx;
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
/* 登录按钮容器view */
|
||||||
|
.login .login-card .login-btn{
|
||||||
|
width: 350rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
position: absolute;
|
||||||
|
margin-top: 600rpx;
|
||||||
|
margin-left: 85rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
/* 登录按钮 */
|
||||||
|
.login .login-card .login-btn button{
|
||||||
|
padding: 0rpx;
|
||||||
|
line-height: 50rpx;
|
||||||
|
font-size: 25rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
}
|
||||||
|
/* 复选框+协议文字容器view */
|
||||||
|
.login .login-card .agreement-area{
|
||||||
|
margin-left: 10rpx;
|
||||||
|
margin-top: 680rpx;
|
||||||
|
width: 400rpx;
|
||||||
|
display: flex;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
/* 复选框 */
|
||||||
|
.login .login-card .agreement-area .agreement{
|
||||||
|
margin-left: 85rpx;
|
||||||
|
/* 修改复选框的大小 */
|
||||||
|
transform:scale(.6);
|
||||||
|
}
|
||||||
|
/* 协议文本 */
|
||||||
|
.login .login-card .agreement-area .agreement-text{
|
||||||
|
margin-left: 10rpx;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
color: #000000;
|
||||||
|
font-size:20rpx;
|
||||||
|
}
|
||||||
|
/* 提示文本 */
|
||||||
|
.prompt-box{
|
||||||
|
padding-left: 100rpx;
|
||||||
|
display: flex;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 60rpx;
|
||||||
|
padding-top: 50rpx;
|
||||||
|
}
|
||||||
|
.prompt-box .line{
|
||||||
|
margin-left: 5rpx;
|
||||||
|
margin-top: 18rpx;
|
||||||
|
width: 120rpx;
|
||||||
|
height: 3rpx;
|
||||||
|
background-color:#FFFFFF;
|
||||||
|
}
|
||||||
|
.prompt-box .lText{
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 25rpx;
|
||||||
|
}
|
||||||
|
.other-login {
|
||||||
|
display: flex; /* 启用flex布局 */
|
||||||
|
justify-content: center; /* 水平居中 */
|
||||||
|
align-items: center; /* 垂直居中 */
|
||||||
|
}
|
||||||
|
.other-login image{
|
||||||
|
|
||||||
|
width: 80rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
// pages/messageEdit/messageEdit.js
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad(options) {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage() {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"usingComponents": {},
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarTitleText": "问答"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
<view class="leave-message-page">
|
||||||
|
<!-- 留言标题输入区域 -->
|
||||||
|
<view class="input-group">
|
||||||
|
<text class="label">留言标题</text>
|
||||||
|
<input class="input" type="text" placeholder="请输入留言标题" maxlength="30"/>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 留言内容输入区域 -->
|
||||||
|
<view class="input-group">
|
||||||
|
<text class="label">留言内容</text>
|
||||||
|
<textarea class="textarea" placeholder="请输入留言内容,最多500字" maxlength="500"></textarea>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 提交按钮 -->
|
||||||
|
<button class="submit-btn" bindtap="onSubmitMessage">提交留言</button>
|
||||||
|
</view>
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
.leave-message-page {
|
||||||
|
padding: 20px;
|
||||||
|
background-color: #f0f0f0; /* 页面背景色 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group {
|
||||||
|
margin-bottom: 20px; /* 间距 */
|
||||||
|
background-color: white; /* 输入区域背景色 */
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 10px; /* 圆角 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #333;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input,
|
||||||
|
.textarea {
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px;
|
||||||
|
border: 1px solid #ddd; /* 边框 */
|
||||||
|
border-radius: 5px; /* 圆角 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.textarea {
|
||||||
|
height: 150px; /* 文本区域高度 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.submit-btn {
|
||||||
|
width: calc(100% - 40px); /* 减去padding */
|
||||||
|
margin: 0 auto; /* 水平居中 */
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #1aad19; /* 微信绿 */
|
||||||
|
color: white;
|
||||||
|
border-radius: 5px; /* 圆角 */
|
||||||
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 轻微阴影 */
|
||||||
|
font-size: 18px; /* 字号 */
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
// pages/personal/personal.js
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad(options) {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage() {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
<!--pages/personal/personal.wxml-->
|
||||||
|
<text>pages/personal/personal.wxml</text>
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/* pages/personal/personal.wxss */
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
// pages/policy/policy.js
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
policies: [
|
||||||
|
{ title: "政策标题1", date: "2024-01-01" },
|
||||||
|
{ title: "政策标题2", date: "2023-01-02" },
|
||||||
|
{ title: "政策标题3", date: "2022-01-02" },
|
||||||
|
{ title: "政策标题4", date: "2023-01-02" },
|
||||||
|
{ title: "政策标题5", date: "2022-01-02" },
|
||||||
|
{ title: "政策标题6", date: "2023-01-02" },
|
||||||
|
{ title: "政策标题7", date: "2021-01-02" },
|
||||||
|
{ title: "政策标题8", date: "2021-01-02" },
|
||||||
|
{ title: "政策标题9", date: "2024-02-02" },
|
||||||
|
{ title: "政策标题10", date: "2024-03-02" },
|
||||||
|
{ title: "政策标题11", date: "2024-04-02" },
|
||||||
|
{ title: "政策标题12", date: "2024-01-02" },
|
||||||
|
{ title: "政策标题13", date: "2024-01-02" },
|
||||||
|
{ title: "政策标题14", date: "2024-01-02" },
|
||||||
|
{ title: "政策标题15", date: "2024-01-02" },
|
||||||
|
{ title: "政策标题16", date: "2024-01-02" },
|
||||||
|
{ title: "政策标题17", date: "2024-01-02" },
|
||||||
|
// 更多政策数据...
|
||||||
|
]
|
||||||
|
// 更多数据...
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad(options) {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage() {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"usingComponents": {},
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarTitleText": "政策查询"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
<view class="policy-page">
|
||||||
|
<!-- 搜索框 -->
|
||||||
|
<view class="search-bar">
|
||||||
|
<input type="text" placeholder="请输入关键字搜索" confirm-type="search" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 政策列表 -->
|
||||||
|
<view class="policy-list">
|
||||||
|
<!-- 循环遍历政策数据 -->
|
||||||
|
<block wx:for="{{policies}}" wx:key="unique">
|
||||||
|
<!-- 每项政策使用圆角矩形卡片展示 -->
|
||||||
|
<view class="policy-card">
|
||||||
|
<view class="policy-item">
|
||||||
|
<view class="title">{{item.title}}
|
||||||
|
</view>
|
||||||
|
<view class="date">发布时间:{{item.date}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
.policy-page {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar input {
|
||||||
|
width: 90%;
|
||||||
|
padding: 10px;
|
||||||
|
border: 1px solid #ccc; /* 轻微边框 */
|
||||||
|
border-radius: 5px; /* 圆角 */
|
||||||
|
margin:0 auto; /* 上下保持0,左右自动,实现水平居中 */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.policy-list .policy-item {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.policy-item .title {
|
||||||
|
font-size: 18px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.policy-item .date {
|
||||||
|
font-size: 14px; /* 日期字体大小 */
|
||||||
|
color: #666; /* 日期颜色 */
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
.policy-card {
|
||||||
|
background-color: white; /* 卡片背景色 */
|
||||||
|
border-radius: 10px; /* 圆角 */
|
||||||
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 阴影效果 */
|
||||||
|
margin: 10px; /* 外边距,根据需要调整 */
|
||||||
|
padding: 15px; /* 内边距,根据需要调整 */
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,104 @@
|
||||||
|
// pages/messageEdit/messageEdit.js
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
messages: [
|
||||||
|
{
|
||||||
|
id: 1, // unique identifier for each message
|
||||||
|
title: "留言标题1",
|
||||||
|
date: "2024-01-01"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 1, // unique identifier for each message
|
||||||
|
title: "留言标题1",
|
||||||
|
date: "2024-01-01"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 1, // unique identifier for each message
|
||||||
|
title: "留言标题1",
|
||||||
|
date: "2024-01-01"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 1, // unique identifier for each message
|
||||||
|
title: "留言标题1",
|
||||||
|
date: "2024-01-01"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 1, // unique identifier for each message
|
||||||
|
title: "留言标题1",
|
||||||
|
date: "2024-01-01"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 1, // unique identifier for each message
|
||||||
|
title: "留言标题1",
|
||||||
|
date: "2024-01-01"
|
||||||
|
},
|
||||||
|
// 更多留言...
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
goToMessageEdit: function () {
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '/pages/messageEdit/messageEdit'
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad(options) {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage() {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"usingComponents": {},
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarTitleText": "问答"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
<view class="messages-page">
|
||||||
|
<!-- 留言列表 -->
|
||||||
|
<view class="message-list">
|
||||||
|
<block wx:for="{{messages}}" wx:key="unique">
|
||||||
|
<navigator url="/pages/messageDetail/messageDetail?id={{item.id}}" class="message-card">
|
||||||
|
<view class="message-title">{{item.title}}</view>
|
||||||
|
<view class="message-date">{{item.date}}</view>
|
||||||
|
</navigator>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<button class="leave-message-btn" bindtap="goToMessageEdit">我要留言</button>
|
||||||
|
</view>
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
.messages-page {
|
||||||
|
position: relative; /* 为子元素绝对定位提供参考 */
|
||||||
|
padding: 20rpx;
|
||||||
|
padding-bottom: 100rpx; /* 留出足够的空间给底部的按钮 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.message-list .message-card {
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||||
|
margin: 10px 0;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.message-title {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.message-date {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.leave-message-btn {
|
||||||
|
position: fixed; /* 固定位置 */
|
||||||
|
bottom: 20px; /* 距离底部20px */
|
||||||
|
left: 50%; /* 水平居中 */
|
||||||
|
transform: translateX(-50%); /* 与left配合使其完全居中 */
|
||||||
|
width: 90%;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 20px; /* 增加圆角 */
|
||||||
|
font-size: 16px;
|
||||||
|
color: black; /* 字体颜色为红色 */
|
||||||
|
background-color: white; /* 按钮背景色,可以根据需要调整 */
|
||||||
|
border: 1px solid #ccc; /* 轻微边框,可以根据需要调整 */
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,78 @@
|
||||||
|
// pages/recruit/recruit.js
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
jobs: [
|
||||||
|
{
|
||||||
|
title: "软件工程师",
|
||||||
|
salary: "10k-15k",
|
||||||
|
date: "2024-01-01",
|
||||||
|
detail: "技术栈JAVA、Golang"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "产品经理",
|
||||||
|
salary: "12k-20k",
|
||||||
|
date: "2024-01-02",
|
||||||
|
detail: "产品经理"
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad(options) {
|
||||||
|
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage() {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"usingComponents": {},
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarTitleText": "招聘"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<view class="jobs-page">
|
||||||
|
<!-- 招聘列表 -->
|
||||||
|
<view class="job-list">
|
||||||
|
<!-- 循环遍历招聘数据 -->
|
||||||
|
<block wx:for="{{jobs}}" wx:key="unique">
|
||||||
|
<view class="job-card">
|
||||||
|
<view class="job-header">
|
||||||
|
<text class="job-title">{{item.title}}</text>
|
||||||
|
<text class="job-salary">{{item.salary}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="job-info">
|
||||||
|
<text class="job-date">发布日期:{{item.date}}</text>
|
||||||
|
<text class="job-detail">概述:{{item.detail}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
.jobs-page {
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.job-list .job-card {
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||||
|
margin: 10px 0;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.job-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.job-title {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.job-salary {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #ff5722;
|
||||||
|
}
|
||||||
|
|
||||||
|
.job-info .job-date {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.job-info .job-detail {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #666;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
{
|
||||||
|
"appid": "wxd0724e4918da9826",
|
||||||
|
"compileType": "miniprogram",
|
||||||
|
"libVersion": "3.2.1",
|
||||||
|
"packOptions": {
|
||||||
|
"ignore": [],
|
||||||
|
"include": []
|
||||||
|
},
|
||||||
|
"setting": {
|
||||||
|
"coverView": true,
|
||||||
|
"es6": true,
|
||||||
|
"postcss": true,
|
||||||
|
"minified": true,
|
||||||
|
"enhance": true,
|
||||||
|
"showShadowRootInWxmlPanel": true,
|
||||||
|
"packNpmRelationList": [],
|
||||||
|
"babelSetting": {
|
||||||
|
"ignore": [],
|
||||||
|
"disablePlugins": [],
|
||||||
|
"outputPath": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"condition": {},
|
||||||
|
"editorSetting": {
|
||||||
|
"tabIndent": "auto",
|
||||||
|
"tabSize": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||||
|
"projectname": "govService",
|
||||||
|
"setting": {
|
||||||
|
"compileHotReLoad": true,
|
||||||
|
"urlCheck": false
|
||||||
|
},
|
||||||
|
"condition": {
|
||||||
|
"miniprogram": {
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"name": "pages/login/login",
|
||||||
|
"pathName": "pages/login/login",
|
||||||
|
"query": "",
|
||||||
|
"launchMode": "default",
|
||||||
|
"scene": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pages/home/home",
|
||||||
|
"pathName": "pages/home/home",
|
||||||
|
"query": "",
|
||||||
|
"launchMode": "default",
|
||||||
|
"scene": null,
|
||||||
|
"partialCompile": {
|
||||||
|
"enabled": false,
|
||||||
|
"pages": [
|
||||||
|
"pages/login/login"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
|
||||||
|
"rules": [{
|
||||||
|
"action": "allow",
|
||||||
|
"page": "*"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
// 在config.js
|
||||||
|
const requestUrl = "http://127.0.0.1:8000";
|
||||||
|
export { requestUrl };
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
const formatTime = date => {
|
||||||
|
const year = date.getFullYear()
|
||||||
|
const month = date.getMonth() + 1
|
||||||
|
const day = date.getDate()
|
||||||
|
const hour = date.getHours()
|
||||||
|
const minute = date.getMinutes()
|
||||||
|
const second = date.getSeconds()
|
||||||
|
|
||||||
|
return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}`
|
||||||
|
}
|
||||||
|
|
||||||
|
const formatNumber = n => {
|
||||||
|
n = n.toString()
|
||||||
|
return n[1] ? n : `0${n}`
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkFile(path) {
|
||||||
|
let fs = wx.getFileSystemManager();
|
||||||
|
fs.access({
|
||||||
|
path: `${wx.env.USER_DATA_PATH}/usr/images/1.png`,
|
||||||
|
success(res) {
|
||||||
|
// 文件存在
|
||||||
|
console.log("存在")
|
||||||
|
},
|
||||||
|
fail(res) {
|
||||||
|
// 文件不存在或其他错误
|
||||||
|
console.error(res)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkDir() {
|
||||||
|
let fs = wx.getFileSystemManager()
|
||||||
|
fs.access({
|
||||||
|
path: `${wx.env.USER_DATA_PATH}/images`,
|
||||||
|
success(res) {
|
||||||
|
// 文件存在
|
||||||
|
console.log(res)
|
||||||
|
return;
|
||||||
|
},
|
||||||
|
fail(res) {
|
||||||
|
console.log(res)
|
||||||
|
// 文件不存在或其他错误
|
||||||
|
fs.mkdir({
|
||||||
|
dirPath: `${wx.env.USER_DATA_PATH}/images`,
|
||||||
|
recursive: false,
|
||||||
|
success(res) {
|
||||||
|
console.log(res)
|
||||||
|
},
|
||||||
|
fail(res) {
|
||||||
|
console.error(res)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
module.exports = {
|
||||||
|
formatTime,
|
||||||
|
checkFile,
|
||||||
|
checkDir
|
||||||
|
}
|
||||||