From 934d4757a6a3665e8fded38e4e911bc4bd5687fa Mon Sep 17 00:00:00 2001 From: zpc Date: Wed, 16 Apr 2025 20:31:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 2 + App.vue | 41 +- common/env.js | 4 +- .../detail-wuxian-lingzhu.vue | 591 ++++++++++++++++- .../detail-wuxian-rage/detail-wuxian-rage.vue | 81 +++ index.html | 18 + manifest.json | 2 +- pages/shouye/dada_ranking.vue | 118 ++-- pages/shouye/detail.vue | 21 +- pages/shouye/detail_wuxian.vue | 594 ++++++------------ pages/shouye/yaoqing_ranking.vue | 283 +++++---- pages/user/login.vue | 3 +- 12 files changed, 1151 insertions(+), 607 deletions(-) create mode 100644 .gitattributes create mode 100644 components/detail-wuxian-rage/detail-wuxian-rage.vue create mode 100644 index.html diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..babf824 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +manifest.json merge=ours +common/env.js merge=ours diff --git a/App.vue b/App.vue index aec982b..eebadb1 100644 --- a/App.vue +++ b/App.vue @@ -10,6 +10,46 @@ export default { }, onLaunch: function () { console.log("App Launch"); + // #ifdef MP-WEIXIN + const updateManager = uni.getUpdateManager(); + + updateManager.onCheckForUpdate(function (res) { + // 请求完新版本信息的回调 + console.log(res.hasUpdate); + }); + + updateManager.onUpdateReady(function (res) { + uni.showModal({ + title: "更新提示", + content: "新版本已经准备好,是否重启应用?", + success(res) { + if (res.confirm) { + // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 + updateManager.applyUpdate(); + } + }, + }); + }); + + updateManager.onUpdateFailed(function (res) { + // 新的版本下载失败 + }); + //#endif + var that = this; + + this.$config.init().then(async (data) => { + //加载配置 + let src = await that.$config.getAppSettingAsync("win_audio"); + if (src == null || src == "") { + src = that.$img("/static/mp3/open.mp3"); + } + //创建中奖音乐 + const openBgm = uni.createInnerAudioContext(); + Vue.prototype.bgmCtx = {}; + Vue.prototype.bgmCtx.openBgm = openBgm; + openBgm.src = src; + }); + // 调用登录记录接口 this.callLoginRecordApi(); @@ -183,4 +223,3 @@ button.hide { height: 50px !important; } - diff --git a/common/env.js b/common/env.js index 67ac71e..8a7e24a 100644 --- a/common/env.js +++ b/common/env.js @@ -17,6 +17,7 @@ const development = { // 生产环境配置 const production = { + // baseUrl: 'https://youda.zfunbox.cn', baseUrl: 'https://api.zfunbox.cn', imageUrl: 'https://image.zfunbox.cn', loginPage: 'https://api.zfunbox.cn/login.html', @@ -44,7 +45,8 @@ if (process.env.NODE_ENV === 'production') { // #endif // #ifdef MP-WEIXIN -currentEnv =testing;// production; // 小程序默认使用生产环境配置 +// currentEnv =testing;//小程序默认使用测试环境配置 +currentEnv = production; // 小程序默认使用生产环境配置 // #endif // 衍生配置 diff --git a/components/detail-wuxian-lingzhu/detail-wuxian-lingzhu.vue b/components/detail-wuxian-lingzhu/detail-wuxian-lingzhu.vue index 161b651..9c35602 100644 --- a/components/detail-wuxian-lingzhu/detail-wuxian-lingzhu.vue +++ b/components/detail-wuxian-lingzhu/detail-wuxian-lingzhu.vue @@ -1,44 +1,312 @@ \ No newline at end of file diff --git a/components/detail-wuxian-rage/detail-wuxian-rage.vue b/components/detail-wuxian-rage/detail-wuxian-rage.vue new file mode 100644 index 0000000..89266df --- /dev/null +++ b/components/detail-wuxian-rage/detail-wuxian-rage.vue @@ -0,0 +1,81 @@ + + + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..70a57c2 --- /dev/null +++ b/index.html @@ -0,0 +1,18 @@ + + + + + + <%= htmlWebpackPlugin.options.title %>-友达赏 + + + + + +
+ + + \ No newline at end of file diff --git a/manifest.json b/manifest.json index a72e50a..9c0754e 100644 --- a/manifest.json +++ b/manifest.json @@ -177,7 +177,7 @@ "devServer" : { "https" : false }, - "template" : "" + "template" : "index.html" }, "vueVersion" : "2", "mp-kuaishou" : { diff --git a/pages/shouye/dada_ranking.vue b/pages/shouye/dada_ranking.vue index abc2a5a..f283d86 100644 --- a/pages/shouye/dada_ranking.vue +++ b/pages/shouye/dada_ranking.vue @@ -1,66 +1,45 @@ \ No newline at end of file diff --git a/pages/user/login.vue b/pages/user/login.vue index bbc1b52..316cc76 100644 --- a/pages/user/login.vue +++ b/pages/user/login.vue @@ -200,7 +200,8 @@ h5UserProfile() { var that = this; console.log('进入h5') - window.location.href = this.$wxloginPage; + this.$c.msg('暂未开放登录'); + // window.location.href = this.$wxloginPage; }, getdata() { let that = this