commit 49f4a1d6ccd728cf4630a78ce7c56b4880c71a38 Author: zzc <1761997216@qq.com> Date: Fri Apr 24 10:20:50 2026 +0800 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ccaa112 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/unpackage +unpackage diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json new file mode 100644 index 0000000..81f13f4 --- /dev/null +++ b/.hbuilderx/launch.json @@ -0,0 +1,16 @@ +{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 + "version": "0.0", + "configurations": [{ + "default" : + { + "launchtype" : "local" + }, + "mp-weixin" : + { + "launchtype" : "local" + }, + "type" : "uniCloud" + } + ] +} diff --git a/App.vue b/App.vue new file mode 100644 index 0000000..ceaacbf --- /dev/null +++ b/App.vue @@ -0,0 +1,68 @@ + + + diff --git a/api/auth.js b/api/auth.js new file mode 100644 index 0000000..9adb7a8 --- /dev/null +++ b/api/auth.js @@ -0,0 +1,45 @@ +import { request } from "@/utils/request.js"; + +export const apiLogin = async (data) => { + return request({ + url: "/api/user/login", + method: "POST", + data, + }); +}; + +export const getUserInfo = async () => { + return request({ + url: "/api/user/info", + method: "GET", + }); +}; + +export const updateUserInfo = async (body) => { + return request({ + url: "/api/user/info", + method: "PUT", + data: body, + }); +}; + +export const userOpenApp = async () => { + return request({ + url: "/api/user/open-app", + method: "POST", + }); +}; + +export const getUserAsset = async () => { + return request({ + url: "/api/user/asset", + method: "GET", + }); +}; + +export const reportPrivacy = async () => { + // return request({ + // url: "/api/common/privacy/report", + // method: "POST", + // }); +}; diff --git a/api/mine.js b/api/mine.js new file mode 100644 index 0000000..29be01a --- /dev/null +++ b/api/mine.js @@ -0,0 +1,40 @@ +import { request } from "@/utils/request.js"; + +export const sendFeedback = async (data) => { + return request({ + url: "/api/common/feedback", + method: "POST", + data, + }); +}; + +export const getMyCard = async (page = 1) => { + return request({ + url: "/api/blessing/my/card?page=" + page, + method: "GET", + }); +}; + +export const getMyWallpaper = async (page = 1) => { + return request({ + url: "/api/blessing/my/wallpaper?page=" + page, + method: "GET", + }); +}; + +export const getMyAvatar = async (page = 1) => { + return request({ + url: "/api/blessing/my/avatar?page=" + page, + method: "GET", + }); +}; + +export const userAvatarChange = async (imageUrl) => { + return request({ + url: "/api/blessing/user/avatar/change", + method: "POST", + data: { + imageUrl, + }, + }); +}; diff --git a/api/pay.js b/api/pay.js new file mode 100644 index 0000000..5cac542 --- /dev/null +++ b/api/pay.js @@ -0,0 +1,16 @@ +import { request } from "@/utils/request.js"; + +export const createOrder = async (data) => { + return request({ + url: "/api/pay/order/v2/create", + method: "POST", + data, + }); +}; + +export const getVipPlan = async () => { + return request({ + url: "/api/blessing/vip/plan", + method: "GET", + }); +}; diff --git a/api/system.js b/api/system.js new file mode 100644 index 0000000..d885837 --- /dev/null +++ b/api/system.js @@ -0,0 +1,85 @@ +import { request } from "@/utils/request.js"; +import { useUserStore } from "@/stores/user"; + +export const createShareToken = async (data) => { + return request({ + url: "/api/blessing/share/token", + method: "POST", + data, + }); +}; + +export const getShareReward = async (data) => { + const res = await request({ + url: "/api/reward/share", + method: "POST", + data, + }); + console.log("getShareReward res", res); + if (res && res.success) { + const userStore = useUserStore(); + userStore.fetchUserAssets(); + } + return res; +}; + +export const saveRecord = async (data) => { + return request({ + url: "/api/blessing/save/record", + method: "POST", + data, + }); +}; + +export const viewRecord = async (data) => { + return request({ + url: "/api/blessing/view/record", + method: "POST", + data, + }); +}; + +export const getRecommendList = async (page = 1) => { + return request({ + url: `/api/blessing/recommend/list?page=${page}`, + method: "get", + }); +}; + +export const msgCheckApi = async (content) => { + return request({ + url: "/api/common/msg-check?content=" + content, + method: "get", + }); +}; + +export const createTracking = async (data) => { + return request({ + url: "/api/common/tracking/create", + method: "POST", + data, + }); +}; + +export const watchAdReward = async (token, scene, type, resourceId) => { + return request({ + url: "/api/ad/reward", + method: "POST", + data: { + rewardToken: token, + scene, + type, + resourceId, + }, + }); +}; + +export const watchAdStart = async () => { + return request({ + url: "/api/ad/start", + method: "POST", + data: { + adPlacementId: "adunit-d7a28e0357d98947", + }, + }); +}; diff --git a/api/user.js b/api/user.js new file mode 100644 index 0000000..c8daafc --- /dev/null +++ b/api/user.js @@ -0,0 +1,8 @@ +import { request } from "@/utils/request.js"; + +export const getUserSignInfo = async () => { + return request({ + url: "/api/sign/info", + method: "GET", + }); +}; diff --git a/common/images/preview_small.webp b/common/images/preview_small.webp new file mode 100644 index 0000000..716f2cb Binary files /dev/null and b/common/images/preview_small.webp differ diff --git a/common/style/base-style.scss b/common/style/base-style.scss new file mode 100644 index 0000000..47da42e --- /dev/null +++ b/common/style/base-style.scss @@ -0,0 +1,10 @@ +$brand-theme-color:#262626; //品牌主体红色 + +$border-color:#e0e0e0; //边框颜色 +$border-color-light:#efefef; //边框亮色 + +$text-font-color-1:#000; //文字主色 +$text-font-color-2:#676767; //副标题颜色 +$text-font-color-3:#a7a7a7; //浅色 +$text-font-color-4:#e4e4e4; //更浅 +$text-color: #B2B2B2 \ No newline at end of file diff --git a/common/style/common-style.scss b/common/style/common-style.scss new file mode 100644 index 0000000..7414c4b --- /dev/null +++ b/common/style/common-style.scss @@ -0,0 +1,8 @@ +view, swiper, swiper-item{ + box-sizing: border-box; +} + +.pageBg{ + background: $brand-theme-color; + min-height: 80vh; +} \ No newline at end of file diff --git a/components/LoginPopup/LoginPopup.vue b/components/LoginPopup/LoginPopup.vue new file mode 100644 index 0000000..f5809ef --- /dev/null +++ b/components/LoginPopup/LoginPopup.vue @@ -0,0 +1,516 @@ + + + + + diff --git a/components/NavBar/NavBar.vue b/components/NavBar/NavBar.vue new file mode 100644 index 0000000..a6cf15c --- /dev/null +++ b/components/NavBar/NavBar.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/components/PrivacyPopup/PrivacyPopup.vue b/components/PrivacyPopup/PrivacyPopup.vue new file mode 100644 index 0000000..6bd276e --- /dev/null +++ b/components/PrivacyPopup/PrivacyPopup.vue @@ -0,0 +1,208 @@ + + + + + diff --git a/components/RewardAd/RewardAd.vue b/components/RewardAd/RewardAd.vue new file mode 100644 index 0000000..5b8b19f --- /dev/null +++ b/components/RewardAd/RewardAd.vue @@ -0,0 +1,49 @@ + + + diff --git a/components/custom-content/custom-content.vue b/components/custom-content/custom-content.vue new file mode 100644 index 0000000..c3788c9 --- /dev/null +++ b/components/custom-content/custom-content.vue @@ -0,0 +1,69 @@ + + + + + \ No newline at end of file diff --git a/components/layout/layout.vue b/components/layout/layout.vue new file mode 100644 index 0000000..66a42e3 --- /dev/null +++ b/components/layout/layout.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..c3ff205 --- /dev/null +++ b/index.html @@ -0,0 +1,20 @@ + + + + + + + + + + +
+ + + diff --git a/main.js b/main.js new file mode 100644 index 0000000..db68db0 --- /dev/null +++ b/main.js @@ -0,0 +1,39 @@ +import './polyfill' +import App from './App' + +// #ifndef VUE3 +import Vue from 'vue' +import './uni.promisify.adaptor' +import { createPinia } from 'pinia' + +Vue.config.productionTip = false +App.mpType = 'app' +const app = new Vue({ + ...App +}) +const pinia = createPinia() +app.use(pinia) + +app.$mount() +// #endif + +// #ifdef VUE3 +import { createSSRApp } from 'vue' +import { createPinia } from 'pinia' +import { trackRecord } from '@/utils/common.js' // 引入埋点方法 + +export function createApp() { + const app = createSSRApp(App) + const pinia = createPinia() + app.use(pinia) // ✅ 这句是关键 + + // 挂载到全局配置,使得在 vue3 setup 中可以通过 proxy 或 app.config.globalProperties 访问 + app.config.globalProperties.$trackRecord = trackRecord + // 同时也挂载到 uni 对象上,这样在任何地方都可以直接 uni.$trackRecord 调用 + uni.$trackRecord = trackRecord + + return { + app + } +} +// #endif diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..b9d7797 --- /dev/null +++ b/manifest.json @@ -0,0 +1,75 @@ +{ + "name" : "tpl-mini", + "appid" : "", + "description" : "", + "versionName" : "1.0.0", + "versionCode" : "100", + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : {}, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + /* ios打包配置 */ + "ios" : {}, + /* SDK配置 */ + "sdkConfigs" : {} + } + }, + /* 快应用特有相关 */ + "quickapp" : {}, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "wx8d0a4bfb94c9a7f0", + "__usePrivacyCheck__" : true, + "setting" : { + "urlCheck" : false + }, + "usingComponents" : true, + "lazyCodeLoading" : "requiredComponents" + }, + "mp-alipay" : { + "usingComponents" : true, + "appid" : "2021006125616610" + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "uniStatistics" : { + "enable" : false + }, + "vueVersion" : "3" +} diff --git a/pages.json b/pages.json new file mode 100644 index 0000000..ffbbadf --- /dev/null +++ b/pages.json @@ -0,0 +1,105 @@ +{ + "pages": [ + { + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "祝福 壁纸 头像", + "enablePullDownRefresh": true, + "navigationStyle": "custom", + "backgroundColor": "#FFFFFF" + } + }, + { + "path": "pages/mine/help", + "style": { + "navigationBarTitleText": "帮助中心", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/mine/vip", + "style": { + "navigationBarTitleText": "会员中心", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/mine/profile", + "style": { + "navigationBarTitleText": "个人信息", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/mine/mine", + "style": { + "navigationBarTitleText": "我的", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, + { + "path": "pages/creation/index", + "style": { + "navigationBarTitleText": "创作中心", + "navigationStyle": "custom", + "backgroundColor": "#fbfbfb" + } + }, + { + "path": "pages/webview/index", + "style": { + "navigationBarTitleText": "加载中...", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/feedback/index", + "style": { + "navigationBarTitleText": "意见反馈", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + } + ], + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "uni-app", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8", + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES" + } + }, + "tabBar": { + "color": "#999999", + "selectedColor": "#ff3b30", + "backgroundColor": "#ffffff", + "iconWidth": "24px", + "list": [ + { + "text": "首页", + "pagePath": "pages/index/index", + "iconPath": "static/images/tabBar/home.png", + "selectedIconPath": "static/images/tabBar/home_s.png" + }, + { + "text": "创作", + "pagePath": "pages/creation/index", + "iconPath": "static/images/tabBar/creation.png", + "selectedIconPath": "static/images/tabBar/creation_s.png" + }, + { + "text": "我的", + "pagePath": "pages/mine/mine", + "iconPath": "static/images/tabBar/me.png", + "selectedIconPath": "static/images/tabBar/me_s.png" + } + ] + }, + "uniIdRouter": {} +} diff --git a/pages/.DS_Store b/pages/.DS_Store new file mode 100644 index 0000000..8ef2d1b Binary files /dev/null and b/pages/.DS_Store differ diff --git a/pages/creation/index.vue b/pages/creation/index.vue new file mode 100644 index 0000000..00745d5 --- /dev/null +++ b/pages/creation/index.vue @@ -0,0 +1,90 @@ + + + + + diff --git a/pages/feedback/index.vue b/pages/feedback/index.vue new file mode 100644 index 0000000..5ed0948 --- /dev/null +++ b/pages/feedback/index.vue @@ -0,0 +1,381 @@ +