forked from MuxiKeStack/muxiK-StackFrontend2.0
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
76 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,7 @@ | |
width: 80%; | ||
justify-content: center; | ||
} | ||
.img{ | ||
width: 80rpx; | ||
height: 80rpx; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.title { | ||
font-size: 50rpx; | ||
text-align: center; | ||
font-weight: bold; | ||
margin: auto; | ||
display: block; | ||
} | ||
.card { | ||
padding-top: 10rpx; | ||
width: 80%; | ||
height: 60%; | ||
margin: auto; | ||
font-size: 35rpx; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { Button, Text, View } from '@tarojs/components'; | ||
// eslint-disable-next-line import/first | ||
import Taro from '@tarojs/taro'; | ||
|
||
import './index.scss'; | ||
|
||
// eslint-disable-next-line import/first | ||
import { post } from '@/common/utils/fetch'; | ||
|
||
const ShareGrades = () => { | ||
const handleSubmit = () => { | ||
try { | ||
void post('/grades/sign', { wants_to_sign: true }, true).then((r) => { | ||
console.log(r); | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
if (r.msg === '重复签约') { | ||
void Taro.showToast({ | ||
icon: 'error', | ||
title: '请勿重复签约', | ||
}); | ||
} | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
if (r.msg === '签约成功') { | ||
void Taro.showToast({ | ||
icon: 'success', | ||
title: '签约成功!', | ||
}); | ||
} | ||
}); | ||
} catch (err) { | ||
console.log(err); | ||
} | ||
}; | ||
|
||
return ( | ||
<View> | ||
<Text className="title">成绩共享计划</Text> | ||
<View className="card"> | ||
该部分的课程成绩信息是我们在征得用户同意后, | ||
<Text className="font-extrabold">匿名</Text> | ||
收集用户成绩数据所得到的统计结果。查看该信息需要您加入我们的 课程成绩共享计划 | ||
,提供自己的过往成绩信息作为数据分析的一部分。我们将根据隐私条例中的内容,保证您的个人信息受到安全保护。 | ||
</View> | ||
<Button onClick={handleSubmit}>我同意成绩共享计划</Button> | ||
</View> | ||
); | ||
}; | ||
export default ShareGrades; |