2025/2/8第一次更新

This commit is contained in:
爱吃咸鱼小猫咪
2025-02-08 18:50:38 +08:00
commit d7af560866
26519 changed files with 5046029 additions and 0 deletions
+154
View File
@@ -0,0 +1,154 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const composables_useCommon = require("../../composables/useCommon.js");
const stores_appStore = require("../../stores/appStore.js");
const composables_useWorkFlow = require("../../composables/useWorkFlow.js");
const utils_emitter = require("../../utils/emitter.js");
const types_event_types = require("../../types/event.types.js");
if (!Array) {
const _easycom_up_status_bar2 = common_vendor.resolveComponent("up-status-bar");
const _easycom_up_avatar2 = common_vendor.resolveComponent("up-avatar");
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
const _easycom_up_cell2 = common_vendor.resolveComponent("up-cell");
const _easycom_up_cell_group2 = common_vendor.resolveComponent("up-cell-group");
(_easycom_up_status_bar2 + _easycom_up_avatar2 + _easycom_up_icon2 + _easycom_up_cell2 + _easycom_up_cell_group2)();
}
const _easycom_up_status_bar = () => "../../node-modules/uview-plus/components/u-status-bar/u-status-bar.js";
const _easycom_up_avatar = () => "../../node-modules/uview-plus/components/u-avatar/u-avatar.js";
const _easycom_up_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js";
const _easycom_up_cell = () => "../../node-modules/uview-plus/components/u-cell/u-cell.js";
const _easycom_up_cell_group = () => "../../node-modules/uview-plus/components/u-cell-group/u-cell-group.js";
if (!Math) {
(MyNavbar + _easycom_up_status_bar + _easycom_up_avatar + UserMemberInfo + GetUserInfoPopup + _easycom_up_icon + _easycom_up_cell + _easycom_up_cell_group + TnIcon + BaseLayout)();
}
const MyNavbar = () => "../../components/common/MyNavbar.js";
const BaseLayout = () => "../../layouts/BaseLayout.js";
const GetUserInfoPopup = () => "../../components/GetUserInfoPopup.js";
const TnIcon = () => "../../node-modules/@tuniao/tnui-vue3-uniapp/components/icon/src/icon.js";
const UserMemberInfo = () => "../../components/home/UserMemberInfo.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "setting",
setup(__props) {
const { user } = common_vendor.storeToRefs(stores_appStore.useAppStore());
common_vendor.ref(true);
common_vendor.ref("");
function handleGotoHistory() {
common_vendor.index.navigateTo({
url: "/pages/history/history"
});
}
const handleLogin = async () => {
if (composables_useCommon.isLogin.value) {
return;
}
common_vendor.index.showLoading({
title: "正在登录...",
mask: true
});
const { uniPlatform } = common_vendor.index.getSystemInfoSync();
if (uniPlatform !== "web") {
handleLoginByWechat();
} else {
console.log("dev");
const user2 = await composables_useCommon.loginByUsername({
username: "test456",
password: "123456"
});
composables_useCommon.saveLoginInfo(user2);
common_vendor.index.hideLoading();
}
};
const handleLoginByWechat = () => {
common_vendor.index.login({
success: async function({ code }) {
const result = await composables_useCommon.loginByWechatCode(code);
composables_useCommon.saveLoginInfo(result);
common_vendor.index.hideLoading();
},
fail: function(err) {
common_vendor.index.showToast({
title: "登录错误",
icon: "none"
});
}
});
};
const { socketInit } = composables_useWorkFlow.useWorkFlow();
common_vendor.onReady(() => {
socketInit();
utils_emitter.on(types_event_types.EventType.PAY_SUCCESS, ({ order_id }) => handlePayMessage(order_id));
});
const handlePayMessage = async (order_id) => {
console.log("收到支付成功消息", order_id);
const order = await composables_useCommon.getOrderInfoById(order_id);
if (order[0] && order[0].order_status === 1) {
common_vendor.index.showToast({
title: "支付成功",
icon: "none"
});
composables_useCommon.refreshUserInfo();
}
};
const handleLoginOut = () => {
common_vendor.index.showLoading({
title: "正在退出登录...",
mask: true
});
composables_useCommon.loginOut();
common_vendor.index.hideLoading();
common_vendor.index.showToast({
title: "退出成功",
icon: "none"
});
};
const { showPay } = common_vendor.storeToRefs(stores_appStore.useAppStore());
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.o(handleLogin),
b: common_vendor.p({
src: common_vendor.unref(user).avatar_url,
size: "80"
}),
c: !common_vendor.unref(composables_useCommon.isLogin)
}, !common_vendor.unref(composables_useCommon.isLogin) ? {} : {}, {
d: common_vendor.unref(composables_useCommon.isLogin)
}, common_vendor.unref(composables_useCommon.isLogin) ? {
e: common_vendor.t(common_vendor.unref(user).nickname)
} : {}, {
f: common_vendor.unref(composables_useCommon.isLogin)
}, common_vendor.unref(composables_useCommon.isLogin) ? {
g: common_vendor.t(common_vendor.unref(user).balance)
} : {}, {
h: common_vendor.p({
name: "scan",
color: "#969799",
size: "28"
}),
i: common_vendor.p({
name: "arrow-right",
color: "#969799",
size: "28"
}),
j: common_vendor.o(($event) => showPay.value = true),
k: common_vendor.p({
icon: "rmb-circle",
title: "成为会员"
}),
l: common_vendor.o(handleGotoHistory),
m: common_vendor.p({
icon: "photo",
title: "绘图历史"
}),
n: common_vendor.p({
name: "logout"
}),
o: common_vendor.o(handleLoginOut),
p: common_vendor.p({
icon: "setting",
title: "退出登录"
})
});
};
}
});
wx.createPage(_sfc_main);
+15
View File
@@ -0,0 +1,15 @@
{
"navigationBarTitleText": "Fuzi-AI",
"usingComponents": {
"up-status-bar": "../../node-modules/uview-plus/components/u-status-bar/u-status-bar",
"up-avatar": "../../node-modules/uview-plus/components/u-avatar/u-avatar",
"up-icon": "../../node-modules/uview-plus/components/u-icon/u-icon",
"up-cell": "../../node-modules/uview-plus/components/u-cell/u-cell",
"up-cell-group": "../../node-modules/uview-plus/components/u-cell-group/u-cell-group",
"my-navbar": "../../components/common/MyNavbar",
"base-layout": "../../layouts/BaseLayout",
"get-user-info-popup": "../../components/GetUserInfoPopup",
"tn-icon": "../../node-modules/@tuniao/tnui-vue3-uniapp/components/icon/src/icon",
"user-member-info": "../../components/home/UserMemberInfo"
}
}
+1
View File
@@ -0,0 +1 @@
<base-layout u-s="{{['d']}}" u-i="ce957f6a-0" bind:__l="__l" class="{{[virtualHostClass]}}" virtualHostClass="{{[virtualHostClass]}}" style="{{virtualHostStyle}}" virtualHostStyle="{{virtualHostStyle}}"><view><my-navbar u-i="ce957f6a-1,ce957f6a-0" bind:__l="__l"/><up-status-bar u-i="ce957f6a-2,ce957f6a-0" bind:__l="__l"/><view class="u-flex u-row-right" style="width:100%"><view class="camera u-flex u-row-center"></view></view><view class="u-flex u-flex-y-center u-flex-around user-box u-p-l-30 u-p-r-20 u-p-b-30"><view class="u-m-r-10"><up-avatar wx:if="{{b}}" bindclick="{{a}}" u-i="ce957f6a-3,ce957f6a-0" bind:__l="__l" u-p="{{b}}"></up-avatar><view wx:if="{{c}}" class="tn-text-center tn-text-sm tn-gray-dark_text" style="position:relative;bottom:0">点击头像登录</view></view><view class="u-flex-1"><view wx:if="{{d}}" class="u-font-18 u-p-b-10 tn-text">昵称:{{e}}</view><view wx:else class="u-font-18 u-p-b-10 tn-gray-dark_text">未登录</view><view><user-member-info u-i="ce957f6a-4,ce957f6a-0" bind:__l="__l"></user-member-info></view><view wx:if="{{f}}" class="tn-text-xs tn-gray-dark_text">余额:{{g}}</view><get-user-info-popup u-i="ce957f6a-5,ce957f6a-0" bind:__l="__l"/></view><view class="u-m-l-10 u-p-10"><up-icon wx:if="{{h}}" u-i="ce957f6a-6,ce957f6a-0" bind:__l="__l" u-p="{{h}}"></up-icon></view><view class="u-m-l-10 u-p-10"><up-icon wx:if="{{i}}" u-i="ce957f6a-7,ce957f6a-0" bind:__l="__l" u-p="{{i}}"></up-icon></view></view><view class="u-m-t-20"><up-cell-group u-s="{{['d']}}" u-i="ce957f6a-8,ce957f6a-0" bind:__l="__l"><up-cell wx:if="{{k}}" bindclick="{{j}}" u-i="ce957f6a-9,ce957f6a-8" bind:__l="__l" u-p="{{k}}"></up-cell></up-cell-group></view><view class="u-m-t-20"><up-cell-group u-s="{{['d']}}" u-i="ce957f6a-10,ce957f6a-0" bind:__l="__l"><up-cell wx:if="{{m}}" bindclick="{{l}}" u-i="ce957f6a-11,ce957f6a-10" bind:__l="__l" u-p="{{m}}"></up-cell><up-cell wx:if="{{p}}" u-s="{{['icon']}}" bindclick="{{o}}" u-i="ce957f6a-12,ce957f6a-10" bind:__l="__l" u-p="{{p}}"><tn-icon u-i="ce957f6a-13,ce957f6a-12" bind:__l="__l" u-p="{{n}}" slot="icon"/></up-cell></up-cell-group></view><view class="u-m-t-20"><up-cell-group u-i="ce957f6a-14,ce957f6a-0" bind:__l="__l"></up-cell-group></view></view></base-layout>
+41
View File
@@ -0,0 +1,41 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
page {
background-color: #ededed;
}
.camera {
width: 54px;
height: 44px;
}
.camera:active {
background-color: #ededed;
}
.user-box {
background-color: #fff;
}
.u-cell-group {
background-color: #fff;
}