Skip to content

Commit

Permalink
🐞 fix: 用户首次登录失败的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Chadwuo committed Jul 22, 2024
1 parent 7de2330 commit dd7f570
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 109 deletions.
3 changes: 2 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ onLaunch(async () => {
uni.$emit('bookPageUpdate')
uni.hideLoading()
}
catch {
catch (error) {
console.log('App Launch Error :>> ', error)
router.push('/pages/exception/500')
}
})
Expand Down
39 changes: 3 additions & 36 deletions src/pages-sub/contributors/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,10 @@

<template>
<div>
<div>礼记团队介绍</div>
<div class="indent-8 text-sm leading-relaxed">
礼记是一个开源项目,从21年11月份写下第一行代码至今,经历了500+ 次代码提交、来自全球开发者参与的50+ 个拉取请求、20+ 个版本迭代、累计为5000+ 用户提供稳定服务。
</div>
<div class="indent-8 text-sm leading-relaxed">
感谢开源社区成员为礼记做出的贡献,感谢屏幕前的你,因为你们,礼记可以持续发展。
</div>
<div class="indent-8 text-sm leading-relaxed">
今天很高兴的宣布,礼记3.0版本,代号 "Initial D",正式发布了。她重写了全部代码,全新的页面UI,重新设计了家庭数据权限,并且添加了更多功能,更加安全稳定。
</div>

<div class="indent-8 text-sm leading-relaxed">
在这里,说几句很多用户反复询问的一些关心问题。
</div>
<div class="indent-8 text-sm leading-relaxed">
1,礼记运营需要一定的服务器费用,费用并不高,目前依靠程序内部广告收益(你如果非常不喜欢广告,甚至可以关闭),可以收支平衡,完全可以做到持续运营。未来推出的所有功能也都会是免费使用,请放心食用哦!
</div>
<div class="indent-8 text-sm leading-relaxed">
2,礼记开源的目的是为了让开发者们可以自由开发,让所有人都能参与项目讨论、开发、审查,以此提供安全稳定的服务。简单来说,礼记不会跑路,因为代码就在那里,你可以自由 clone
、fork、修改、提交、审查代码。这是其他同类产品不具备的优势。
</div>

<div class="indent-8 text-sm leading-relaxed">
3,礼记这次全新升级后,我们会着力开发数据导出功能,数据统计报表功能(当然免费使用)。原来一直没做,是因为之前版本的代码有很多不满意的地方,也就一直拖着没做,现在升级了全新框架,可以做的更好!
</div>
<div class="indent-8 text-sm leading-relaxed">
感谢您抽出宝贵时间阅读本文!
</div>
contributors
</div>
</template>

<style lang="scss" scoped></style>
<style lang="scss" scoped>
<route lang="json">
{
"style": {
"navigationBarTitleText": "开发团队"
}
}
</route>
</style>
19 changes: 8 additions & 11 deletions src/pages/settings/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,16 @@ function onBlur() {
<template>
<div class="mt-3 space-y-3">
<div class="rounded-2xl bg-white p-1">
<uv-cell is-link :border="false">
<template #title>
<button class="uv-reset-button w-full text-left" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
头像
</button>
</template>
<template #value>
<uv-avatar :src="userInfo.avatarUrl" />
</template>
</uv-cell>
<button class="uv-reset-button w-full text-left" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<uv-cell title="头像" is-link :border="false">
<template #value>
<uv-avatar :src="userInfo.avatarUrl" />
</template>
</uv-cell>
</button>
<uv-cell title="昵称" :border="false" is-link>
<template #value>
<input v-model="nickName_edit" class="text-right text-sm" type="nickname" @blur="onBlur">
<input v-model="nickName_edit" class="w-4/5 py-2 text-right text-sm" type="nickname" @blur="onBlur">
</template>
</uv-cell>
</div>
Expand Down
64 changes: 3 additions & 61 deletions src/pages/sponsor/index.vue
Original file line number Diff line number Diff line change
@@ -1,56 +1,5 @@
<script setup>
let rewardedVideoAd = null
onLoad(() => {
// 创建广告
if (wx.createRewardedVideoAd) {
rewardedVideoAd = wx.createRewardedVideoAd({
adUnitId: 'adunit-3095dee4fe741a53',
})
rewardedVideoAd.onLoad(() => {
console.log('激励视频 广告加载成功')
})
rewardedVideoAd.onError((err) => {
console.log('onError event emit', err)
})
rewardedVideoAd.onClose((res) => {
// 用户点击了【关闭广告】按钮
if (res && res.isEnded) {
// 正常播放结束,可以下发游戏奖励
rewardedSuccess()
}
else {
// 播放中途退出,不下发游戏奖励
uni.showToast({
title: '没关系,下次一定',
icon: 'none',
})
}
})
}
})
function onSupport() {
rewardedVideoAd.show()
.catch(() => {
rewardedVideoAd.load()
.then(() => rewardedVideoAd.show())
.catch((err) => {
console.log('激励视频 广告显示失败', err)
uni.showToast({
title: '广告显示失败',
icon: 'error',
})
})
})
}
function rewardedSuccess() {
uni.showToast({
title: '充电成功,感谢有你',
icon: 'none',
})
}
</script>

<template>
Expand All @@ -66,13 +15,6 @@ function rewardedSuccess() {
设置
</text>中关闭广告!
</div>
<div class="indent-8 text-sm leading-relaxed">
倘若 礼记 于你有益,欢迎你通过下方观看广告视频的形式助力 礼记 发展。用爱发电,你也可以!
</div>

<div class="my-5 text-center">
<uv-button type="primary" shape="circle" text="观看广告视频" @click="onSupport" />
</div>
</div>
<Advertisement class="mt-auto" adtyle="video" />
</template>
Expand All @@ -81,8 +23,8 @@ function rewardedSuccess() {

<route lang="json">
{
"style": {
"navigationBarTitleText": "支持礼记"
}
"style": {
"navigationBarTitleText": "支持礼记"
}
}
</route>

0 comments on commit dd7f570

Please sign in to comment.