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 @@
-