优化
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const namingStore = require("../../store/namingStore");
|
||||
const namingStore = require("../../store/namingStore");
|
||||
|
||||
function showToast(title) {
|
||||
if (typeof tt === "undefined" || !tt.showToast) {
|
||||
@@ -19,7 +19,7 @@ Page({
|
||||
onLoad() {
|
||||
const { results } = namingStore.getState();
|
||||
if (!results || !results.length) {
|
||||
showToast("\u6682\u65e0\u7ed3\u679c\uff0c\u8bf7\u5148\u751f\u6210\u59d3\u540d");
|
||||
showToast("暂无结果,请先生成姓名");
|
||||
setTimeout(() => {
|
||||
if (typeof tt !== "undefined" && tt.navigateBack) {
|
||||
tt.navigateBack();
|
||||
@@ -37,9 +37,9 @@ Page({
|
||||
};
|
||||
const saved = namingStore.addFavorite(item);
|
||||
if (saved) {
|
||||
showToast("\u5df2\u6536\u85cf");
|
||||
showToast("已收藏");
|
||||
} else {
|
||||
showToast("\u6536\u85cf\u5931\u8d25");
|
||||
showToast("收藏失败");
|
||||
}
|
||||
},
|
||||
handleBack() {
|
||||
|
||||
Reference in New Issue
Block a user