董国庆
2025-03-13 c64b1e69da3a72bd9cfd9d725fb812489c904199
Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/H5/threeSide
9个文件已修改
2个文件已删除
6个文件已添加
218 ■■■■■ 已修改文件
H5/manifest.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/pages/location/location.vue 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/static/home/img2.png 补丁 | 查看 | 原始文档 | blame | 历史
management/.gitignore 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
management/config/config.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
management/public/LogoSCUnboundedSans.ttf 补丁 | 查看 | 原始文档 | blame | 历史
management/public/account.png 补丁 | 查看 | 原始文档 | blame | 历史
management/public/code.png 补丁 | 查看 | 原始文档 | blame | 历史
management/public/font.css 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
management/public/loginBg.png 补丁 | 查看 | 原始文档 | blame | 历史
management/public/logo.svg 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
management/public/logo/wellcome.png 补丁 | 查看 | 原始文档 | blame | 历史
management/public/password.png 补丁 | 查看 | 原始文档 | blame | 历史
management/public/pro_icon.svg 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
management/src/pages/Login/index.tsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
management/src/pages/Login/style.less 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
management/src/pages/system/welco/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/manifest.json
@@ -1,6 +1,6 @@
{
    "name": "三个身边",
    "appid": "__UNI__32C3F0F",
    "appid" : "__UNI__4B73B99",
    "description": "",
    "versionName": "1.0.0",
    "versionCode": "100",
H5/pages/location/location.vue
@@ -50,6 +50,7 @@
            };
        },
        methods: {
            clearMarkers() {
                // 清除所有标点
                this.markers.forEach((marker) => {
@@ -99,35 +100,6 @@
                    }
                })
                return
                uni.request({
                    url: `https://api.map.baidu.com/place/v2/search`,
                    method: 'GET',
                    data: {
                        query: this.keyword,
                        location: `${this.latitude},${this.longitude }`,
                        radius: 10000, // 搜索半径,单位:米
                        output: 'json',
                        ak: '3mHKIXMArjgIkgADzOlTYp4XssNSNkwr' // 替换为你自己的 AK
                    },
                    success: (res) => {
                        if (res.data.status === 0) {
                            this.searchResults = res.data.results;
                            this.latitude = res.data.results[0].location.lat
                            this.longitude = res.data.results[0].location.lng
                            this.locationList = res.data.results.map((result, index) => {
                                result.id = index + 1
                                return result
                            });
                        }
                    },
                    fail: (err) => {
                        console.error('搜索失败:', err);
                    }
                });
            },
        },
        onLoad() {
@@ -136,16 +108,15 @@
        onReady() {
            this.map = new BMapGL.Map("container"); // 创建地图实例 
            const that = this
            // uni.getLocation({
            //     type: 'wgs84',
            //     success: (res) => {
            navigator.geolocation.getCurrentPosition(success, error, options);
            function success(position) {
                const latitude = position.coords.latitude;
                const longitude = position.coords.longitude;
                const accuracy = position.coords.accuracy; // 精度,单位米
                //  在这里可以使用获取到的经纬度信息,例如在地图上显示位置等。
                uni.request({
                    url: `https://api.map.baidu.com/geoconv/v2/?coords=${position.coords.longitude},${position.coords.latitude}&model=2&ak=3mHKIXMArjgIkgADzOlTYp4XssNSNkwr`,
                    method: 'GET',
                    success: (res) => {
                        const latitude = res.data.result[0].y;
                        const longitude = res.data.result[0].x;
                var point = new BMapGL.Point(longitude, latitude); // 创建点坐标
                that.map.enableScrollWheelZoom(true);
                that.map.centerAndZoom(point, 12);
@@ -160,10 +131,11 @@
                        return item
                    })
                })
                    },
                });
            }
            function error(err) {
                switch (err.code) {
                    case err.PERMISSION_DENIED:
                        console.error("用户拒绝了位置请求。");
@@ -184,6 +156,7 @@
                timeout: 5000, // 5 秒超时
                maximumAge: 0 //  不使用缓存
            };
            this.map.addEventListener('click', (e) => {
                this.clearMarkers()
                var mercator = this.map.lnglatToMercator(e.latlng.lng, e.latlng.lat);
@@ -194,7 +167,7 @@
                var myGeo = new BMapGL.Geocoder();
                // 根据坐标得到地址描述    
                myGeo.getLocation(new BMapGL.Point(e.latlng.lng, e.latlng.lat), (result) => {
                    console.log(result,'result');
                    this.city = result.addressComponents.city
                    if( result.surroundingPois.length>0){
                        this.locationList = result.surroundingPois.map((item, index) => {
                            item.id = index + 1
@@ -204,7 +177,10 @@
                        this.locationList =[{
                            id:1,
                            title:result.address,
                            point:{lat:e.latlng.lat,lng:e.latlng.lng}
                            point: {
                                lat: e.latlng.lat,
                                lng: e.latlng.lng
                            }
                        }]
                    }
                    
@@ -213,11 +189,6 @@
                this.map.addOverlay(marker);
                this.markers.push(marker);
            });
            // },
            // error:err=>{
            //
            // }
            // });
        }
    }
H5/static/home/img2.png

management/.gitignore
@@ -8,7 +8,7 @@
# production
/dist
/admin
/sgsb
# misc
.DS_Store
management/config/config.ts
@@ -8,7 +8,7 @@
const { REACT_APP_ENV = 'dev' } = process.env;
export default defineConfig({
  outputPath: 'admin', // 设置打包后的文件名为 admin
  outputPath: 'sgsb', // 设置打包后的文件名为 admin
  /**
   * @name 开启 hash 模式
   * @description 让 build 之后的产物包含 hash 后缀。通常用于增量发布和避免浏览器加载缓存。
management/public/LogoSCUnboundedSans.ttf
Binary files differ
management/public/account.png
management/public/code.png
management/public/font.css
@@ -0,0 +1,6 @@
@font-face {
    font-family: 'LogoSCUnboundedSans';
    src: url('./LogoSCUnboundedSans.ttf');
    font-weight: normal;
    font-style: normal;
}
management/public/loginBg.png
management/public/logo.svg
File was deleted
management/public/logo/wellcome.png
management/public/password.png
management/public/pro_icon.svg
File was deleted
management/src/pages/Login/index.tsx
@@ -11,6 +11,7 @@
import Settings from '../../../config/defaultSettings';
import EditPwd from './editPwd.jsx';
import { updatePwd } from './service.js';
import bgImg from '../../../public/loginBg.png';
import './style.less';
const Lang = () => {
@@ -62,6 +63,9 @@
    return {
      height: '100vh',
      overflow: 'auto',
      backgroundImage: `url(${bgImg})`,
      backgroundSize: 'cover',
      backgroundPosition: 'center',
    };
  });
@@ -165,15 +169,11 @@
            top: '50%',
            left: '50%',
            transform: 'translate(-50%,-50%)',
            display: 'flex',
            alignItems: 'center',
          }}
        >
          <div style={{ width: '787px', fontSize: '26px', textAlign: 'center' }}>
            <h1>
              “三个身边”群众工作机制
            </h1>
            <h1>平台</h1>
          <div className='sysName'>
            <div>“三个身边”</div>
            <div>群众工作机制</div>
          </div>
          <LoginForm
            contentStyle={{
@@ -197,7 +197,7 @@
              await handleSubmit(values as API.LoginParams);
            }}
          >
            <h1 style={{ fontSize: '26px', textAlign: 'center', marginBottom: '20px' }}>登录</h1>
            <div style={{ fontSize: '23px', lineHeight: '32px', textAlign: 'center', marginBottom: '45px', fontWeight: 'bold' }}>登录</div>
            {status === 'error' && loginType === 'username' && (
              <LoginMessage
                content={intl.formatMessage({
@@ -212,7 +212,7 @@
                  name="phone"
                  fieldProps={{
                    size: 'large',
                    prefix: <UserOutlined />,
                    prefix: <img src={require('../../../public/account.png')} style={{ width: 18, height: 18 }} />,
                  }}
                  placeholder="请输入账号"
                  rules={[
@@ -226,7 +226,7 @@
                  name="password"
                  fieldProps={{
                    size: 'large',
                    prefix: <LockOutlined />,
                    prefix: <img src={require('../../../public/password.png')} style={{ width: 18, height: 18 }} />,
                  }}
                  placeholder="请输入密码"
                  rules={[
@@ -236,12 +236,12 @@
                    },
                  ]}
                />
                <Space>
                <div className='codeBox'>
                  <ProFormText
                    name="code"
                    fieldProps={{
                      size: 'large',
                      prefix: <SafetyOutlined />,
                      prefix: <img src={require('../../../public/code.png')} style={{ width: 18, height: 18 }} />,
                    }}
                    placeholder="请输入验证码"
                    rules={[
@@ -251,10 +251,10 @@
                      },
                    ]}
                  />
                  <div style={{ marginBottom: '24px' }}>
                    <Captcha onChange={handleClick} ref={captchaRef} bgColor="#fff" />
                  <div>
                    <Captcha onChange={handleClick} ref={captchaRef} bgColor="#fff" height={52} />
                  </div>
                </Space>
                </div>
              </>
            )}
            {status === 'error' && loginType === 'mobile' && <LoginMessage content="验证码错误" />}
management/src/pages/Login/style.less
@@ -1,16 +1,111 @@
.ant-pro-form-login-container {
    background-color: #fff;
    border-radius: 23px;
    padding: 45px 60px;
    padding: 38px 95px 65px 95px;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
    margin-left: 50px;
    margin-top: 69px;
}
.ant-pro-form-login-header {
    width: 190px;
    height: 190px;
.loginContent {
    .sysName {
        text-align: center;
        font-family: 'LogoSCUnboundedSans';
        font-weight: 400;
        letter-spacing: 2px;
        background: linear-gradient(270deg, #FFEEA7 0%, #FDF9FA 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
        font-size: 70px;
        line-height: 101px;
}
.ant-pro-form-login-top {
    display: none;
    .ant-form-item {
        width: 480px;
        margin-bottom: 20px;
    }
    .ant-input-affix-wrapper {
        padding: 14px 18px;
        background: #F5F5F5;
        border-radius: 10px;
        border: 1px solid rgba(0, 0, 0, 0.15);
    }
    .ant-input-affix-wrapper:hover {
        border-color: #FC8D55;
    }
    .ant-input-affix-wrapper:focus-within {
        border-color: #FC8D55;
        box-shadow: 0 0 0 2px rgba(252, 141, 85, 0.2);
    }
    .ant-pro-form-login-main {
        width: unset !important;
        min-width: unset !important;
    }
    .codeBox {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-radius: 10px;
        background: #F5F5F5;
        border: 1px solid rgba(0, 0, 0, 0.15);
        margin-bottom: 25px;
        position: relative;
        .ant-form-item-additional {
            position: absolute;
            bottom: -1.5rem;
        }
        .ant-form-item {
            width: 365px;
            margin-bottom: unset;
            .ant-input-affix-wrapper {
                background: unset !important;
            }
            .ant-input-outlined {
                border: unset !important;
            }
        }
    }
    canvas {
        border-radius: 0 10px 10px 0;
    }
    .codeBox:hover {
        border-color: #FC8D55;
        background-color: #fff;
    }
    .codeBox:focus-within {
        border-color: #FC8D55;
        box-shadow: 0 0 0 2px rgba(252, 141, 85, 0.2);
    }
    .ant-btn {
        height: 50px;
        background: linear-gradient(270deg, #FC8D55 0%, #FF4948 100%);
        border-radius: 25px;
    }
    .ant-btn-variant-solid:hover {
        background: linear-gradient(270deg, #FC8D55 0%, #FF4948 100%) !important;
    }
    .ant-input-status-error {
        background-color: #F5F5F5 !important;
        border: 1px solid rgba(0, 0, 0, 0.15) !important;
    }
}
management/src/pages/system/welco/index.jsx
@@ -4,7 +4,7 @@
const SystemSettings = () => {
    return (
        <PageContainer title={''} className={'weclome'}>
            <img src={require('../../../../public/logo/welcome.png')} style={{ width: "100%", height: "calc(100vh - 74px)" }} />
            <img src={require('../../../../public/logo/wellcome.png')} style={{ width: "100%", height: "calc(100vh - 74px)" }} />
        </PageContainer>
    )