diff --git a/App.vue b/App.vue
index 4e890cf..851aa9a 100644
--- a/App.vue
+++ b/App.vue
@@ -13,8 +13,8 @@
if (/code=/.test(link) || link.indexOf("code") > -1) {
let temp = decodeURIComponent((new RegExp('[?|&]' + 'code' + '=' + '([^&;]+?)(&|#|;|$)').exec(
link) || [, ''])[1].replace(/\+/g, '%20')) || null;
- let gdz_lifeData = uni.getStorageSync('gdz_lifeData');
- if (!gdz_lifeData.vuex_token) {
+ let xcyjdt_lifeData = uni.getStorageSync('xcyjdt_lifeData');
+ if (!xcyjdt_lifeData.vuex_token) {
const loginRes = await this.$u.api.login({
code: temp
});
@@ -24,7 +24,7 @@
this.$u.vuex('vuex_user', userRes);
let url = location.href.split('#')[0];
- let shareLink = "https://vr.langye.net/gdz/";
+ let shareLink = "https://vr.langye.net/h5xcyjdt/";
const shareRes = await this.$u.api.share({
url
});
@@ -41,19 +41,19 @@
await new Promise((resolve) => {
jwx.ready(() => {
jwx.updateAppMessageShareData({
- title: '“爱满星和”让孤独的世界充满温暖',
+ title: '人人讲安全、个个会应急',
link: shareLink,
- desc: '守护“星”宝,爱不孤独!',
- imgUrl: 'https://vr.langye.net/gdz/static/share.jpg',
+ desc: '——排查身边灾害隐患',
+ imgUrl: 'https://vr.langye.net/h5xcyjdt/static/share.jpg',
success: () => {
console.log('updateAppMessageShareData-success');
},
});
jwx.updateTimelineShareData({
- title: '“爱满星和”让孤独的世界充满温暖',
- desc: '守护“星”宝,爱不孤独!',
+ title: '人人讲安全、个个会应急',
+ desc: '——排查身边灾害隐患',
link: shareLink,
- imgUrl: 'https://vr.langye.net/gdz/static/share.jpg',
+ imgUrl: 'https://vr.langye.net/h5xcyjdt/static/share.jpg',
success: () => {
console.log('updateTimelineShareData-success');
}
@@ -66,7 +66,7 @@
this.$u.vuex('vuex_user', userRes);
let url = location.href.split('#')[0];
- let shareLink = "https://vr.langye.net/gdz/";
+ let shareLink = "https://vr.langye.net/h5xcyjdt/";
const shareRes = await this.$u.api.share({
url
});
@@ -83,19 +83,19 @@
await new Promise((resolve) => {
jwx.ready(() => {
jwx.updateAppMessageShareData({
- title: '“爱满星和”让孤独的世界充满温暖',
+ title: '人人讲安全、个个会应急',
link: shareLink,
- desc: '守护“星”宝,爱不孤独!',
- imgUrl: 'https://vr.langye.net/gdz/static/share.jpg',
+ desc: '——排查身边灾害隐患',
+ imgUrl: 'https://vr.langye.net/h5xcyjdt/static/share.jpg',
success: () => {
console.log('updateAppMessageShareData-success');
},
});
jwx.updateTimelineShareData({
- title: '“爱满星和”让孤独的世界充满温暖',
- desc: '守护“星”宝,爱不孤独!',
+ title: '人人讲安全、个个会应急',
+ desc: '——排查身边灾害隐患',
link: shareLink,
- imgUrl: 'https://vr.langye.net/gdz/static/share.jpg',
+ imgUrl: 'https://vr.langye.net/h5xcyjdt/static/share.jpg',
success: () => {
console.log('updateTimelineShareData-success');
}
@@ -110,6 +110,7 @@
console.log(redirect);
window.location.href =
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appIdRes.appid}&redirect_uri=${redirect}&response_type=code&scope=snsapi_base#wechat_redirect`;
+
}
} catch (error) {
console.error('onLaunch 中出现错误:', error);
@@ -120,7 +121,8 @@
},
onHide: function() {
console.log('App Hide')
- }
+ }
+
}
diff --git a/common/http.api.js b/common/http.api.js
index e8ed171..ef89fff 100644
--- a/common/http.api.js
+++ b/common/http.api.js
@@ -1,12 +1,14 @@
//api集合
let apiApp = {
login: '/api/mobile/user/wechat-login',
- getAppId: '/api/mobile/user/wechat-login-url',
+ getAppId: '/api/mobile/user/wechat-login-url',
+
+
user: '/api/mobile/user/show',
-
share: '/api/mobile/user/wechat-share',
- savePoster: '/api/mobile/vr/save-poster',
- getPoster: '/api/mobile/vr/get-poster',
+ saveUser:'/api/mobile/user/save',
+ questions:'/api/mobile/quiz/get-questions',
+ saveQuestion:'/api/mobile/quiz/save-quiz-simple'
}
// 此处第二个参数vm,就是我们在页面使用的this,你可以通过vm获取vuex等操作
@@ -18,7 +20,11 @@ const install = (Vue, vm) => {
let user = (params = {}) => vm.$u.get(apiApp.user, params);
let share = (params = {}) => vm.$u.get(apiApp.share, params);
let savePoster = (params = {}) => vm.$u.get(apiApp.savePoster, params);
- let getPoster = (params = {}) => vm.$u.get(apiApp.getPoster, params)
+ let getPoster = (params = {}) => vm.$u.get(apiApp.getPoster, params)
+ let saveUser = (params = {}) => vm.$u.post(apiApp.saveUser, params)
+ let questions = (params = {}) => vm.$u.get(apiApp.questions, params)
+ let saveQuestion = (params = {}) => vm.$u.post(apiApp.saveQuestion, params)
+
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
vm.$u.api = {
login,
@@ -26,7 +32,10 @@ const install = (Vue, vm) => {
getAppId,
share,
savePoster,
- getPoster
+ getPoster,
+ saveUser,
+ questions,
+ saveQuestion
};
}
diff --git a/common/http.interceptor.js b/common/http.interceptor.js
index f907396..9b4a3e1 100644
--- a/common/http.interceptor.js
+++ b/common/http.interceptor.js
@@ -21,10 +21,10 @@ const install = (Vue, vm) => {
// 请求拦截部分,如配置,每次请求前都会执行
Vue.prototype.$u.http.interceptor.request = (config) => {
console.log('config-http', config)
- config.data.activity_tag = 'gdz'
- config.data.activity_list_id = 17
- let gdz_lifeData = uni.getStorageSync('gdz_lifeData')
- let vuex_token = gdz_lifeData.vuex_token;
+ config.data.activity_tag = 'xcyjdt'
+ config.data.activity_list_id = 18
+ let xcyjdt_lifeData = uni.getStorageSync('xcyjdt_lifeData')
+ let vuex_token = xcyjdt_lifeData.vuex_token;
if (vuex_token || vm.vuex_token) {
config.header['Authorization'] = `Bearer ${vuex_token || vm.vuex_token}`;
}
@@ -38,7 +38,7 @@ const install = (Vue, vm) => {
if (res.statusCode === 200) {
if (res.data.hasOwnProperty("errcode")) {
if (res.data?.errcode === 40001) {
- uni.removeStorageSync('gdz_lifeData')
+ uni.removeStorageSync('xcyjdt_lifeData')
setTimeout(() => {
let origin = window.location.origin;
let pathname = window.location.pathname;
diff --git a/components/mypage/page2.vue b/components/mypage/page2.vue
index a62437b..4f8d6ed 100644
--- a/components/mypage/page2.vue
+++ b/components/mypage/page2.vue
@@ -12,7 +12,6 @@
守护“星”宝,成为“星”友,有爱不孤独!
-
diff --git a/manifest.json b/manifest.json
index f2bb3a4..fab07cc 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,6 +1,6 @@
{
- "name" : "“爱满星和”让孤独的世界充满温暖",
- "appid" : "__UNI__9CD555B",
+ "name" : "人人讲安全、个个会应急",
+ "appid" : "__UNI__1DBD598",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
@@ -71,12 +71,12 @@
"vueVersion" : "2",
"h5" : {
"router" : {
- "base" : "gdz"
+ "base" : "h5xcyjdt"
},
"devServer" : {
"disableHostCheck" : true,
"https" : false
},
- "title" : "“爱满星和”让孤独的世界充满温暖"
+ "title" : "人人讲安全、个个会应急"
}
}
diff --git a/pages.json b/pages.json
index b7a146a..bf70ddd 100644
--- a/pages.json
+++ b/pages.json
@@ -8,13 +8,33 @@
"style": {
"navigationStyle": "custom"
}
+ },{
+ "path": "pages/login/index",
+ "style": {
+ "navigationStyle": "custom"
+ }
+ },{
+ "path": "pages/me/me",
+ "style": {
+ "navigationStyle": "custom"
+ }
+ },{
+ "path": "pages/record/index",
+ "style": {
+ "navigationStyle": "custom"
+ }
+ },{
+ "path": "pages/answer/index",
+ "style": {
+ "navigationStyle": "custom"
+ }
}
],
"subPackages": [],
"preloadRule": {},
"globalStyle": {
"navigationBarTextStyle": "black",
- "navigationBarTitleText": "“爱满星和”让孤独的世界充满温暖",
+ "navigationBarTitleText": "人人讲安全、个个会应急",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
}
diff --git a/pages/answer/index.vue b/pages/answer/index.vue
new file mode 100644
index 0000000..1ca604e
--- /dev/null
+++ b/pages/answer/index.vue
@@ -0,0 +1,579 @@
+
+
+
+
+
+
+
+ ——排查身边灾害隐患
+
+
+
+
+
+ (答题{{questionIndex+1}}/5)
+
+
+ {{minutes}}:{{seconds}}
+
+
+
+
+
+ {{question_list[questionIndex]?question_list[questionIndex]['type_name']:''}}
+
+
+
+
+ {{answerNum[ansindex]}}{{ans.title}}
+
+
+
+
+
+
+
+ 正确答案:{{correctAnswer}}
+
+
+
+ 下一题
+ 提交
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/index/index.vue b/pages/index/index.vue
index d9775ed..7716e30 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1,129 +1,175 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ 点击进入答题
+
+
+
+
+
+
+
+ 技术支撑:江苏有线苏州分公司
+
-
-
\ No newline at end of file
diff --git a/pages/login/index.vue b/pages/login/index.vue
new file mode 100644
index 0000000..9618ffe
--- /dev/null
+++ b/pages/login/index.vue
@@ -0,0 +1,317 @@
+
+
+
+
+
+
+
+ ——排查身边灾害隐患
+
+ 答题时间
+ {{startTime}}至{{endTime}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+
+
+
+
+
+
+ 活动须知
+
+
+
+
+
+
+
+ 知道了
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/me/me.vue b/pages/me/me.vue
new file mode 100644
index 0000000..bd7d7e0
--- /dev/null
+++ b/pages/me/me.vue
@@ -0,0 +1,427 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ userInfo.name || 'xx' }}
+
+
+ {{ userInfo.mobile ? userInfo.mobile : '' }}
+
+
+
+
+
+
+ {{answercount}}
+ 已答次数
+
+
+ {{ userInfo.quiz_total_score || 0 }}
+ 累计得分
+
+
+
+
+
+
+
+ 参与答题
+
+
+
+ 答题记录
+
+
+
+
+
+
+ 活动须知
+
+
+
+
+ 中奖情况
+ 查看
+ 暂未开始
+
+
+
+
+
+
+
+
+
+ 获奖通知
+
+
+ {{userInfo.name?userInfo.name:''}}
+ 请保持通话畅通,工作人员会与您联系
+
+
+ 知道了
+
+
+
+
+
+
+
+ 活动须知
+
+
+
+
+
+
+
+ 知道了
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/record/index.vue b/pages/record/index.vue
new file mode 100644
index 0000000..21204f2
--- /dev/null
+++ b/pages/record/index.vue
@@ -0,0 +1,257 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ userInfo.name || 'xx' }}
+
+
+ {{ userInfo.mobile ? userInfo.mobile : '' }}
+
+
+
+
+
+
+ {{answercount}}
+ 已答次数
+
+
+ {{ userInfo.quiz_total_score || 0 }}
+ 累计得分
+
+
+
+
+
+
+ {{item.score}}分
+
+
+
+ 第{{numberToChinese(index+1)}}次答题
+ {{item.created_at?item.created_at.substring(0,16):''}}
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/static/audio.mp3 b/static/audio.mp3
deleted file mode 100644
index 395e00b..0000000
Binary files a/static/audio.mp3 and /dev/null differ
diff --git a/static/bg.jpg b/static/bg.jpg
new file mode 100644
index 0000000..a3b9d1c
Binary files /dev/null and b/static/bg.jpg differ
diff --git a/static/index_logo.png b/static/index_logo.png
new file mode 100644
index 0000000..48cf358
Binary files /dev/null and b/static/index_logo.png differ
diff --git a/static/index_words.png b/static/index_words.png
new file mode 100644
index 0000000..f2eab21
Binary files /dev/null and b/static/index_words.png differ
diff --git a/static/index_words2.png b/static/index_words2.png
new file mode 100644
index 0000000..323489b
Binary files /dev/null and b/static/index_words2.png differ
diff --git a/static/index_words3.png b/static/index_words3.png
new file mode 100644
index 0000000..760b3c8
Binary files /dev/null and b/static/index_words3.png differ
diff --git a/static/jscn.jpg b/static/jscn.jpg
deleted file mode 100644
index 15e3916..0000000
Binary files a/static/jscn.jpg and /dev/null differ
diff --git a/static/logintip.png b/static/logintip.png
new file mode 100644
index 0000000..314f0f7
Binary files /dev/null and b/static/logintip.png differ
diff --git a/static/logo.png b/static/logo.png
deleted file mode 100644
index dab03a6..0000000
Binary files a/static/logo.png and /dev/null differ
diff --git a/static/logo1.png b/static/logo1.png
deleted file mode 100644
index f105c90..0000000
Binary files a/static/logo1.png and /dev/null differ
diff --git a/static/logo2.png b/static/logo2.png
new file mode 100644
index 0000000..b6f4eeb
Binary files /dev/null and b/static/logo2.png differ
diff --git a/static/logo3.png b/static/logo3.png
new file mode 100644
index 0000000..69f16d6
Binary files /dev/null and b/static/logo3.png differ
diff --git a/static/page1-bg.png b/static/page1-bg.png
deleted file mode 100644
index 41955f2..0000000
Binary files a/static/page1-bg.png and /dev/null differ
diff --git a/static/page1-bg1.png b/static/page1-bg1.png
deleted file mode 100644
index 2b7c406..0000000
Binary files a/static/page1-bg1.png and /dev/null differ
diff --git a/static/page1-icon1.png b/static/page1-icon1.png
deleted file mode 100644
index 92d8477..0000000
Binary files a/static/page1-icon1.png and /dev/null differ
diff --git a/static/page1-icon2.png b/static/page1-icon2.png
deleted file mode 100644
index d6cdec0..0000000
Binary files a/static/page1-icon2.png and /dev/null differ
diff --git a/static/page1-title1.png b/static/page1-title1.png
deleted file mode 100644
index f022f97..0000000
Binary files a/static/page1-title1.png and /dev/null differ
diff --git a/static/page1-title2.png b/static/page1-title2.png
deleted file mode 100644
index e1141f7..0000000
Binary files a/static/page1-title2.png and /dev/null differ
diff --git a/static/page2-bg.png b/static/page2-bg.png
deleted file mode 100644
index 1983fa6..0000000
Binary files a/static/page2-bg.png and /dev/null differ
diff --git a/static/page2-content.png b/static/page2-content.png
deleted file mode 100644
index 4768ddf..0000000
Binary files a/static/page2-content.png and /dev/null differ
diff --git a/static/page2-title.png b/static/page2-title.png
deleted file mode 100644
index 6723220..0000000
Binary files a/static/page2-title.png and /dev/null differ
diff --git a/static/page3-bg.png b/static/page3-bg.png
deleted file mode 100644
index bec4b5e..0000000
Binary files a/static/page3-bg.png and /dev/null differ
diff --git a/static/page3-content.png b/static/page3-content.png
deleted file mode 100644
index 2e1c581..0000000
Binary files a/static/page3-content.png and /dev/null differ
diff --git a/static/page3-title.png b/static/page3-title.png
deleted file mode 100644
index c16cc8f..0000000
Binary files a/static/page3-title.png and /dev/null differ
diff --git a/static/page3-title2.png b/static/page3-title2.png
deleted file mode 100644
index f5b6d26..0000000
Binary files a/static/page3-title2.png and /dev/null differ
diff --git a/static/page4-bg.png b/static/page4-bg.png
deleted file mode 100644
index 3eacafc..0000000
Binary files a/static/page4-bg.png and /dev/null differ
diff --git a/static/page4-content.png b/static/page4-content.png
deleted file mode 100644
index d7d9bfa..0000000
Binary files a/static/page4-content.png and /dev/null differ
diff --git a/static/page4-title.png b/static/page4-title.png
deleted file mode 100644
index bc7b3d2..0000000
Binary files a/static/page4-title.png and /dev/null differ
diff --git a/static/page4-title2.png b/static/page4-title2.png
deleted file mode 100644
index cc85159..0000000
Binary files a/static/page4-title2.png and /dev/null differ
diff --git a/static/page5-bg.png b/static/page5-bg.png
deleted file mode 100644
index f3f46da..0000000
Binary files a/static/page5-bg.png and /dev/null differ
diff --git a/static/page5-content.png b/static/page5-content.png
deleted file mode 100644
index d2e0666..0000000
Binary files a/static/page5-content.png and /dev/null differ
diff --git a/static/page5-title.png b/static/page5-title.png
deleted file mode 100644
index 3c4ab6c..0000000
Binary files a/static/page5-title.png and /dev/null differ
diff --git a/static/page6-bg.png b/static/page6-bg.png
deleted file mode 100644
index 3c5e474..0000000
Binary files a/static/page6-bg.png and /dev/null differ
diff --git a/static/page6-title.png b/static/page6-title.png
deleted file mode 100644
index 38f9a3a..0000000
Binary files a/static/page6-title.png and /dev/null differ
diff --git a/static/page6-title2.png b/static/page6-title2.png
deleted file mode 100644
index 711daa6..0000000
Binary files a/static/page6-title2.png and /dev/null differ
diff --git a/static/share.jpg b/static/share.jpg
index 8291f22..bff05ba 100644
Binary files a/static/share.jpg and b/static/share.jpg differ
diff --git a/static/time.png b/static/time.png
new file mode 100644
index 0000000..4c5a1dd
Binary files /dev/null and b/static/time.png differ
diff --git a/static/video.mp4 b/static/video.mp4
deleted file mode 100644
index 10299dc..0000000
Binary files a/static/video.mp4 and /dev/null differ
diff --git a/store/index.js b/store/index.js
index b9a446e..5aebd5f 100644
--- a/store/index.js
+++ b/store/index.js
@@ -2,11 +2,11 @@ import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
-let gdz_lifeData = {};
+let xcyjdt_lifeData = {};
try{
- // 尝试获取本地是否存在gdz_lifeData变量,第一次启动APP时是不存在的
- gdz_lifeData = uni.getStorageSync('gdz_lifeData');
+ // 尝试获取本地是否存在xcyjdt_lifeData变量,第一次启动APP时是不存在的
+ xcyjdt_lifeData = uni.getStorageSync('xcyjdt_lifeData');
}catch(e){
}
@@ -15,26 +15,26 @@ try{
let saveStateKeys = ['vuex_user', 'vuex_token','vuex_share'];
// 保存变量到本地存储中
-const savegdz_LifeData = function(key, value){
+const savexcyjdt_LifeData = function(key, value){
// 判断变量名是否在需要存储的数组中
if(saveStateKeys.indexOf(key) != -1) {
- // 获取本地存储的gdz_lifeData对象,将变量添加到对象中
- let tmp = uni.getStorageSync('gdz_lifeData');
- // 第一次打开APP,不存在gdz_lifeData变量,故放一个{}空对象
+ // 获取本地存储的xcyjdt_lifeData对象,将变量添加到对象中
+ let tmp = uni.getStorageSync('xcyjdt_lifeData');
+ // 第一次打开APP,不存在xcyjdt_lifeData变量,故放一个{}空对象
tmp = tmp ? tmp : {};
tmp[key] = value;
- // 执行这一步后,所有需要存储的变量,都挂载在本地的gdz_lifeData对象中
- uni.setStorageSync('gdz_lifeData', tmp);
+ // 执行这一步后,所有需要存储的变量,都挂载在本地的xcyjdt_lifeData对象中
+ uni.setStorageSync('xcyjdt_lifeData', tmp);
}
}
const store = new Vuex.Store({
// 下面这些值仅为示例,使用过程中请删除
state: {
- // 如果上面从本地获取的gdz_lifeData对象下有对应的属性,就赋值给state中对应的变量
+ // 如果上面从本地获取的xcyjdt_lifeData对象下有对应的属性,就赋值给state中对应的变量
// 加上vuex_前缀,是防止变量名冲突,也让人一目了然
- vuex_user: gdz_lifeData.vuex_user ? gdz_lifeData.vuex_user : {},
- vuex_token: gdz_lifeData.vuex_token ? gdz_lifeData.vuex_token : '',
- // 如果vuex_version无需保存到本地永久存储,无需gdz_lifeData.vuex_version方式
+ vuex_user: xcyjdt_lifeData.vuex_user ? xcyjdt_lifeData.vuex_user : {},
+ vuex_token: xcyjdt_lifeData.vuex_token ? xcyjdt_lifeData.vuex_token : '',
+ // 如果vuex_version无需保存到本地永久存储,无需xcyjdt_lifeData.vuex_version方式
vuex_version: '1.0.0',
vuex_sign_base64: '',
@@ -59,7 +59,7 @@ const store = new Vuex.Store({
saveKey = payload.name;
}
// 保存变量到本地,见顶部函数定义
- savegdz_LifeData(saveKey, state[saveKey])
+ savexcyjdt_LifeData(saveKey, state[saveKey])
}
}
})