From 3e48a983b342fe246310ad3c692246e179f41a39 Mon Sep 17 00:00:00 2001
From: HardenSG <2767525216@qq.com>
Date: Mon, 20 May 2024 13:52:31 +0800
Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E5=8F=8D=E9=A6=88=E7=95=8C=E9=9D=A2?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=AA=E4=BF=9D=E6=B3=95=E5=A3=B0=E6=98=8E?=
=?UTF-8?q?=E6=96=87=E6=A1=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/Setting/Feedback/index.module.scss | 13 ++++++++-
src/pages/Setting/Feedback/index.tsx | 29 ++++++++++++++------
src/utils/perfTrack/business.ts | 16 +++++++++--
3 files changed, 46 insertions(+), 12 deletions(-)
diff --git a/src/pages/Setting/Feedback/index.module.scss b/src/pages/Setting/Feedback/index.module.scss
index 7279fff..4aca75b 100644
--- a/src/pages/Setting/Feedback/index.module.scss
+++ b/src/pages/Setting/Feedback/index.module.scss
@@ -46,7 +46,8 @@
line-height: 80rpx;
// box-shadow: -10rpx 13rpx $primary-color;
background-color: $primary-color;
- margin-top: 70rpx;
+ margin-top: 30rpx;
+ margin-bottom: 10rpx;
}
}
@@ -64,6 +65,16 @@
}
}
+.promise_text {
+ font-size: 26rpx;
+ color: #bfbbbb;
+}
+
+.from {
+ display: flex;
+ justify-content: flex-end;
+}
+
page {
/* 覆盖field宽度 */
--form-label-width: 100rpx;
diff --git a/src/pages/Setting/Feedback/index.tsx b/src/pages/Setting/Feedback/index.tsx
index f6f5344..47c3740 100644
--- a/src/pages/Setting/Feedback/index.tsx
+++ b/src/pages/Setting/Feedback/index.tsx
@@ -1,4 +1,4 @@
-import { View, Button } from '@tarojs/components'
+import { View, Button, Text } from '@tarojs/components'
import React, { useCallback, useState } from 'react'
import { Field, Textarea, Input } from '@taroify/core'
import { goTo, showModal, showToast, trackFeedbackContent } from 'src/utils'
@@ -6,7 +6,7 @@ import './index.module.scss'
const Index = () => {
const [text, setText] = useState('')
- const [phone, setPhone] = useState(0)
+ const [email, setEmail] = useState('')
const clickBtn = useCallback(async () => {
if (text.length <= 0) {
@@ -14,6 +14,13 @@ const Index = () => {
return
}
+ if (email.length > 0) {
+ if (!/\w+@\w+(\.\w+)+/.test(email)) {
+ showToast('您填写的邮箱有误')
+ return
+ }
+ }
+
const res = await showModal({
title: '反馈一下🤔',
content: '您提出的宝贵建议我们会仔细斟酌,请附上您的联系方式方便采纳后与您联系🫡',
@@ -24,14 +31,15 @@ const Index = () => {
console.log('提交')
trackFeedbackContent({
- user_phone: phone ?? 0,
+ user_phone: 0,
+ user_email: email,
user_feedback: text,
})
showToast('反馈成功,即将返回上一页!')
setTimeout(() => {
goTo({ methodType: 'navigateBack' })
}, 1000)
- }, [phone, text])
+ }, [email, text])
return (
@@ -50,7 +58,7 @@ const Index = () => {
onChange={({ detail: { value } }) => setText(value)}
/>
-
+
{
borderRadius: '10rpx',
paddingLeft: '10rpx',
}}
- placeholder='请输入手机号'
- type='number'
- onChange={({ detail: { value } }) => setPhone(value as unknown as number)}
+ placeholder='请输入邮箱'
+ onChange={({ detail: { value } }) => setEmail(value)}
/>
+
+ 您提供的联系方式我们会妥善保管,我们承诺仅用于系统升级的后续沟通跟进,不会将您的信息以任何种形式外借、售卖、展示给任何人,以防您的信息泄漏
+
+ -- 24.5.20 研发团队宣✊
diff --git a/src/utils/perfTrack/business.ts b/src/utils/perfTrack/business.ts
index 5819924..6233b3c 100644
--- a/src/utils/perfTrack/business.ts
+++ b/src/utils/perfTrack/business.ts
@@ -86,16 +86,28 @@ type TTrackUserFeedback = Pick & {
user_feedback?: string
/** 用户手机号 */
user_phone?: number
+ /** 邮箱 */
+ user_email?: string
}
/** 上报用户反馈信息 */
-export const trackFeedbackContent = ({ user_feedback, user_phone }: TTrackUserFeedback) => {
- /*#__PURE__ */ console.log(' === 运行时用户反馈埋点上报 === ', user_feedback, user_phone)
+export const trackFeedbackContent = ({
+ user_feedback,
+ user_phone,
+ user_email,
+}: TTrackUserFeedback) => {
+ /*#__PURE__ */ console.log(
+ ' === 运行时用户反馈埋点上报 === ',
+ user_feedback,
+ user_phone,
+ user_email,
+ )
trackEvent({
eventId: BUSINESS_EVENT_MAP.USER_FEEDBACK,
extraParams: {
user_feedback,
user_phone,
+ user_email,
},
})
}
From 1b42d045e092064e2524c023a28b05b67ffc1a51 Mon Sep 17 00:00:00 2001
From: John <2236313680@qq.com>
Date: Mon, 20 May 2024 13:56:00 +0800
Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E?=
=?UTF-8?q?=E6=97=B6=E9=97=B4=E8=BF=87=E9=95=BF=E4=BD=93=E9=AA=8C=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/Initial/components/orgInit.tsx | 1 +
src/pages/Initial/index.tsx | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/pages/Initial/components/orgInit.tsx b/src/pages/Initial/components/orgInit.tsx
index 440665c..3c1a39c 100644
--- a/src/pages/Initial/components/orgInit.tsx
+++ b/src/pages/Initial/components/orgInit.tsx
@@ -33,6 +33,7 @@ const Index = () => {
size,
keyword,
},
+ silent: false,
loadingNeedMask: true,
})
.then((res) => {
diff --git a/src/pages/Initial/index.tsx b/src/pages/Initial/index.tsx
index 007bf51..9ac4695 100644
--- a/src/pages/Initial/index.tsx
+++ b/src/pages/Initial/index.tsx
@@ -12,6 +12,7 @@ import {
TBizStudentGetInfo,
} from 'src/utils'
import useUpdateEffect from 'src/hooks/useUpdateEffect'
+import Loading from 'src/components/baseBuiltComp/Loading'
import OrgInit from './components/orgInit'
import { getStudentInfoUrl, loginInterUrl } from './common'
import GradeInit from './components/gradeInit'
@@ -25,6 +26,7 @@ const Index = () => {
const userState = useSelector((root: RootState) => root.userinfoModel)
const orgCacheState = useSelector((root: RootState) => root.runtimeModel.organizationCache)
const [isLogin, setLogin] = useState()
+ const [isLoading, setLoading] = useState(true)
/** 用户信息 拿到token 组织 年级 班级 */
const {
orgId: _orgId,
@@ -87,7 +89,6 @@ const Index = () => {
// 有token获取用户信息
const result = await Get({
url: getStudentInfoUrl,
- loadingNeedMask: true,
silent: true,
})
const { code, data } = result
@@ -149,6 +150,7 @@ const Index = () => {
const eventMap = { back }
const fn = eventMap[action]
fn && fn()
+ setLoading(false)
})
/** END */
@@ -160,8 +162,10 @@ const Index = () => {
}, [isLogin])
// 未完善,跳转到组织初始化页面
+
const notHaveOrg = !hasOrg
const onlyHasOrg = hasOrg && !hasGrade
+ if (isLoading) return
if (notHaveOrg) return
if (onlyHasOrg || !hasClass) return
return
From b4d639ac383b789e4c00126f8212bc8507e0e8c5 Mon Sep 17 00:00:00 2001
From: HardenSG <2767525216@qq.com>
Date: Mon, 20 May 2024 14:12:02 +0800
Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4scripts=20ci?=
=?UTF-8?q?=E8=84=9A=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
scripts/changelog.js | 12 ++++-----
scripts/gitHelper.js | 37 +++++++++++++++-------------
scripts/uploadDist/package-lock.json | 8 +++---
scripts/uploadDist/package.json | 2 +-
scripts/uploadDist/upload.js | 17 ++++++-------
5 files changed, 39 insertions(+), 37 deletions(-)
diff --git a/scripts/changelog.js b/scripts/changelog.js
index b363c00..d6d93c7 100644
--- a/scripts/changelog.js
+++ b/scripts/changelog.js
@@ -3,14 +3,14 @@ const { multiProcessCommandExec } = require('./utils')
const { logUtils } = require('./constant')
async function changelog() {
- const currentBranch = multiProcessCommandExec('git branch --show-current')
- logUtils.warn(`⌛️:当前分支:${currentBranch},changelog生成中....\n`)
+ const currentBranch = multiProcessCommandExec('git branch --show-current')
+ logUtils.warn(`⌛️:当前分支:${currentBranch},changelog生成中....\n`)
- if (currentBranch === 'dev') return
+ if (currentBranch === 'dev') return
- logUtils.warn(`⌛️:此次版本更新为根目录基建,即将更新根目录CHANGELOG..\n`)
- await exec.promise('conventional-changelog -p angular -i CHANGELOG.md -s')
- logUtils.success('✅:CHANGELOG输出成功!\n')
+ logUtils.warn('⌛️:此次版本更新为根目录基建,即将更新根目录CHANGELOG..\n')
+ await exec.promise('npx conventional-changelog -p angular -i CHANGELOG.md -s')
+ logUtils.success('✅:CHANGELOG输出成功!\n')
}
changelog()
diff --git a/scripts/gitHelper.js b/scripts/gitHelper.js
index 112c0cf..ef31baf 100644
--- a/scripts/gitHelper.js
+++ b/scripts/gitHelper.js
@@ -4,28 +4,31 @@ const { logUtils, REGISTRY_URL } = require('./constant')
const git = CLI_COMMON_CONFIG().git
const gitHelper = async () => {
- const currentBranch = multiProcessCommandExec('git branch --show-current')
- logUtils.warn(`⌛️:当前分支:${currentBranch},git release 发版运行中....\n`)
+ const currentBranch = multiProcessCommandExec('git branch --show-current')
+ logUtils.warn(`⌛️:当前分支:${currentBranch},git release 发版运行中....\n`)
- if (currentBranch === 'dev') return
+ if (currentBranch === 'dev') return
- const isNeedTag = true
- const pkg = fileUtils()
+ const isNeedTag = true
+ const pkg = fileUtils()
+ const remoteRepo = multiProcessCommandExec('git remote -v').trim()
+ if (!remoteRepo.includes('origin')) {
await exec.promise(`git remote add origin ${REGISTRY_URL}`)
- await exec.promise(`git config user.name "${git.name}"`);
- await exec.promise(`git config user.email "${git.email}"`);
+ }
+ await exec.promise(`git config user.name "${git.name}"`)
+ await exec.promise(`git config user.email "${git.email}"`)
- await exec.promise('git add .');
- await exec.promise(`git commit -m "chore(release): ${pkg.version} feature release"`)
- await exec.promise('git pull')
- await exec.promise(`git push --set-upstream origin ${currentBranch}`)
- if (isNeedTag) {
- logUtils.warn('⌛️:需要tag,推送远程标签中.....');
- await exec.promise(`git tag v${pkg.version}`);
- await exec.promise(`git push origin --tags`);
- logUtils.success('✅:推送远程成功🏅');
- }
+ await exec.promise('git add .')
+ await exec.promise(`git commit -m "chore(release): ${pkg.version} feature release"`)
+ await exec.promise('git pull')
+ await exec.promise(`git push --set-upstream origin ${currentBranch}`)
+ if (isNeedTag) {
+ logUtils.warn('⌛️:需要tag,推送远程标签中.....')
+ await exec.promise(`git tag v${pkg.version}`)
+ await exec.promise('git push origin --tags')
+ logUtils.success('✅:推送远程成功🏅')
+ }
}
gitHelper()
diff --git a/scripts/uploadDist/package-lock.json b/scripts/uploadDist/package-lock.json
index cb650c2..34b3e28 100644
--- a/scripts/uploadDist/package-lock.json
+++ b/scripts/uploadDist/package-lock.json
@@ -9,7 +9,7 @@
"version": "1.0.0",
"license": "ISC",
"dependencies": {
- "miniprogram-ci": "^1.9.10"
+ "miniprogram-ci": "^1.9.15"
}
},
"node_modules/@ampproject/remapping": {
@@ -5233,9 +5233,9 @@
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="
},
"node_modules/miniprogram-ci": {
- "version": "1.9.10",
- "resolved": "https://registry.npmmirror.com/miniprogram-ci/-/miniprogram-ci-1.9.10.tgz",
- "integrity": "sha512-uNvVSzXfV1Za0biLSMM/tRX5R9XqFs8IoJBcGvyzU0TDTgNHQ+S0CX+PQgfe0/DU2Gv9/9ZnsIBsF7LIdEyByQ==",
+ "version": "1.9.15",
+ "resolved": "http://artifactory.intra.xiaojukeji.com/artifactory/api/npm/npm/miniprogram-ci/-/miniprogram-ci-1.9.15.tgz?dl=https%3A%2F%2Fregistry.npmmirror.com%2Fminiprogram-ci%2F-%2Fminiprogram-ci-1.9.15.tgz",
+ "integrity": "sha512-n2dH4CFeF+/lg32rTZYrAH5JEzQ0iyGWPm5A7AdiegbbrpJBEyXmkcvc6yK9ZzdmyV5p55xLJzSpqzHPlUnjVQ==",
"dependencies": {
"@babel/core": "7.21.4",
"@babel/generator": "7.21.4",
diff --git a/scripts/uploadDist/package.json b/scripts/uploadDist/package.json
index 1f83ba3..174590f 100644
--- a/scripts/uploadDist/package.json
+++ b/scripts/uploadDist/package.json
@@ -10,6 +10,6 @@
"author": "",
"license": "ISC",
"dependencies": {
- "miniprogram-ci": "^1.9.10"
+ "miniprogram-ci": "^1.9.15"
}
}
diff --git a/scripts/uploadDist/upload.js b/scripts/uploadDist/upload.js
index de93052..b128c8a 100644
--- a/scripts/uploadDist/upload.js
+++ b/scripts/uploadDist/upload.js
@@ -6,21 +6,21 @@ const cwd = process.cwd()
const { version } = require(path.resolve(cwd + '/package.json'))
const ROBOT_MAP = {
- 'dev': 1,
- 'pre': 2,
- 'main': 3
+ dev: 1,
+ pre: 2,
+ main: 3,
}
const getCurrentBranch = () => execSync('git branch --show-current').toString().trim()
-const getLatestCommitAuthor = () => execSync('git log -1 --pretty=format:"%an <%ae>"').toString().trim();
+const getLatestCommitAuthor = () =>
+ execSync('git log -1 --pretty=format:"%an <%ae>"').toString().trim()
const getTargetRobotId = () => ROBOT_MAP[getCurrentBranch()]
-
const upload = async () => {
const robot = getTargetRobotId()
- console.log('当前分支:' + getCurrentBranch() + ' 机器人编号为:' + robot);
+ console.log('当前分支:' + getCurrentBranch() + ' 机器人编号为:' + robot)
if (!robot) {
- console.log('您当前不在能够上传产物的白名单分支,请切换到指定分支并重新构建产物');
+ console.log('您当前不在能够上传产物的白名单分支,请切换到指定分支并重新构建产物')
return
}
@@ -46,7 +46,7 @@ const upload = async () => {
setting: {
es6: true,
minify: true,
- autoPrefixWXSS: true
+ autoPrefixWXSS: true,
},
robot,
onProgressUpdate: console.log,
@@ -54,4 +54,3 @@ const upload = async () => {
console.log(uploadResult)
}
upload()
-