From 67b3e63de9c1f20ee3966384507c89ae3ab2eeb7 Mon Sep 17 00:00:00 2001
From: zcx <377075991@qq.com>
Date: Fri, 26 Jan 2024 20:41:25 +0800
Subject: [PATCH 1/5] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
project.config.json | 28 ++++++++++++++++
project.private.config.json | 7 ++++
src/jtools/api/activity.js | 65 +++++++++++++++++++++++++++++++++++++
src/pages/index/index.vue | 40 +++++++++++++++++++++--
4 files changed, 138 insertions(+), 2 deletions(-)
create mode 100644 project.config.json
create mode 100644 project.private.config.json
create mode 100644 src/jtools/api/activity.js
diff --git a/project.config.json b/project.config.json
new file mode 100644
index 0000000..a02cf76
--- /dev/null
+++ b/project.config.json
@@ -0,0 +1,28 @@
+{
+ "appid": "wx24c1b58020a5ce66",
+ "compileType": "miniprogram",
+ "libVersion": "3.3.3",
+ "packOptions": {
+ "ignore": [],
+ "include": []
+ },
+ "setting": {
+ "coverView": true,
+ "es6": true,
+ "postcss": true,
+ "minified": true,
+ "enhance": true,
+ "showShadowRootInWxmlPanel": true,
+ "packNpmRelationList": [],
+ "babelSetting": {
+ "ignore": [],
+ "disablePlugins": [],
+ "outputPath": ""
+ }
+ },
+ "condition": {},
+ "editorSetting": {
+ "tabIndent": "insertSpaces",
+ "tabSize": 2
+ }
+}
\ No newline at end of file
diff --git a/project.private.config.json b/project.private.config.json
new file mode 100644
index 0000000..72c48e2
--- /dev/null
+++ b/project.private.config.json
@@ -0,0 +1,7 @@
+{
+ "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+ "projectname": "jwl-applet",
+ "setting": {
+ "compileHotReLoad": true
+ }
+}
\ No newline at end of file
diff --git a/src/jtools/api/activity.js b/src/jtools/api/activity.js
new file mode 100644
index 0000000..1a3bf55
--- /dev/null
+++ b/src/jtools/api/activity.js
@@ -0,0 +1,65 @@
+import request from '../request/index.js';
+
+//查询活动列表
+export function queryActivityList(data) {
+ return request({
+ url: 'activity/applet/activity/list',
+ method: 'POST',
+ data,
+ noToken: true
+ });
+}
+//查询活动详情
+export function queryActivityDetail(data) {
+ return request({
+ url: 'activity/applet/activity/detail',
+ method: 'POST',
+ data,
+ noToken: true
+ });
+}
+//查询抽奖次数
+export function queryLuckyNum(data) {
+ return request({
+ url: 'activity/applet/activity/lucky/num',
+ method: 'POST',
+ data,
+ noToken: true
+ });
+}
+//查询中奖结果
+export function queryLuckyResult(data) {
+ return request({
+ url: 'activity/applet/activity/lucky/result',
+ method: 'POST',
+ data,
+ noToken: true
+ });
+}
+//录入中奖结果
+export function saveWinner(data) {
+ return request({
+ url: 'activity/applet/activity/winner/save',
+ method: 'POST',
+ data,
+ noToken: true
+ });
+}
+//核销
+export function receiveWinner(data) {
+ return request({
+ url: 'activity/applet/activity/winner/receive',
+ method: 'POST',
+ data,
+ noToken: true
+ });
+}
+//查询中奖记录
+export function getLuckyRecord(data) {
+ return request({
+ url: 'activity/applet/activity/lucky/record',
+ method: 'POST',
+ data,
+ noToken: true
+ });
+}
\ No newline at end of file
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 83f128d..d273282 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -31,12 +31,17 @@
mapActions
} from 'pinia' //引入映射函数
import useQuestionStore from '@/jtools/store/question' //引入store
+ import useUserStore from '@/jtools/store/user'
import storage from '@/jtools/storage';
import {
querySysConfigList,
} from '@/jtools/api/question';
import Subject1 from "./components/Subject1";
import Subject2 from "./components/Subject2";
+
+ import {
+ queryActivityList,
+ } from '@/jtools/api/activity';
export default {
components: {
Subject1,
@@ -52,7 +57,7 @@
categoryList: [],
rightList: storage.get(`rightList_subject${this.subject}`) || [],
wrongList: storage.get(`wrongList_subject${this.subject}`) || [],
- activityList: ['https://cdn.uviewui.com/uview/swiper/swiper1.png']
+ activityList: ['https://cdn.uviewui.com/uview/swiper/swiper1.png']
};
},
onShow() {
@@ -65,6 +70,7 @@
if(this.subject=='2'||this.subject=='3'){
this.$refs.subjectRef.getDiverType()
}
+ this.queryActivityList();
},
onHide(){
this.show=false
@@ -119,10 +125,40 @@
}, 100)
}
},
+ //查询活动列表
+ queryActivityList(){
+ // console.log(this.user)
+ // console.log(useUserStore().userInfo)
+ this.activityList = null;
+ uni.request({
+ url: 'http://localhost:8089/applet/activity/list',
+ method: 'post',
+ data: {'schoolId': useUserStore().userInfo.schoolId}
+ }).then(resp => {
+ console.log(".....")
+ console.log(resp)
+ if(resp.data.code == 200) {
+ this.activityList = resp.data.data
+ console.log("*****")
+ console.log(resp.data)
+ console.log(resp.data.data)
+ console.log(this.activityList)
+ }
+ })
+ // queryActivityList({schoolId: this.user.schoolId}).then(resp => {
+ // this.activityList = resp.data;
+ // })
+ },
// 去活动
handleToActivity(index) {
+ let detailId;
+ this.activityList.find((item, index1) => {
+ if(index === index1){
+ detailId = item.detailId;
+ }
+ })
uni.navigateTo({
- url: '/pages/index/activity'
+ url: '/pages/index/activity?detailId='+detailId,
})
}
}
From 9e24edad28eff09cb1c9d947314de6e4e3a33d19 Mon Sep 17 00:00:00 2001
From: zcx <377075991@qq.com>
Date: Fri, 26 Jan 2024 20:50:31 +0800
Subject: [PATCH 2/5] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/jtools/api/activity.js | 12 ++++++------
src/pages/index/index.vue | 37 ++++++++++++++++++-------------------
2 files changed, 24 insertions(+), 25 deletions(-)
diff --git a/src/jtools/api/activity.js b/src/jtools/api/activity.js
index 1a3bf55..5f1b995 100644
--- a/src/jtools/api/activity.js
+++ b/src/jtools/api/activity.js
@@ -4,7 +4,7 @@ import request from '../request/index.js';
export function queryActivityList(data) {
return request({
url: 'activity/applet/activity/list',
- method: 'POST',
+ method: 'get',
data,
noToken: true
});
@@ -13,16 +13,16 @@ export function queryActivityList(data) {
export function queryActivityDetail(data) {
return request({
url: 'activity/applet/activity/detail',
- method: 'POST',
+ method: 'get',
data,
- noToken: true
+ noToken: true
});
}
//查询抽奖次数
export function queryLuckyNum(data) {
return request({
url: 'activity/applet/activity/lucky/num',
- method: 'POST',
+ method: 'get',
data,
noToken: true
});
@@ -31,7 +31,7 @@ export function queryLuckyNum(data) {
export function queryLuckyResult(data) {
return request({
url: 'activity/applet/activity/lucky/result',
- method: 'POST',
+ method: 'get',
data,
noToken: true
});
@@ -58,7 +58,7 @@ export function receiveWinner(data) {
export function getLuckyRecord(data) {
return request({
url: 'activity/applet/activity/lucky/record',
- method: 'POST',
+ method: 'get',
data,
noToken: true
});
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index d273282..019c2b4 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -38,7 +38,6 @@
} from '@/jtools/api/question';
import Subject1 from "./components/Subject1";
import Subject2 from "./components/Subject2";
-
import {
queryActivityList,
} from '@/jtools/api/activity';
@@ -129,25 +128,25 @@
queryActivityList(){
// console.log(this.user)
// console.log(useUserStore().userInfo)
- this.activityList = null;
- uni.request({
- url: 'http://localhost:8089/applet/activity/list',
- method: 'post',
- data: {'schoolId': useUserStore().userInfo.schoolId}
- }).then(resp => {
- console.log(".....")
- console.log(resp)
- if(resp.data.code == 200) {
- this.activityList = resp.data.data
- console.log("*****")
- console.log(resp.data)
- console.log(resp.data.data)
- console.log(this.activityList)
- }
- })
- // queryActivityList({schoolId: this.user.schoolId}).then(resp => {
- // this.activityList = resp.data;
+ // this.activityList = null;
+ // uni.request({
+ // url: 'http://localhost:8089/applet/activity/list',
+ // method: 'get',
+ // data: {'schoolId': useUserStore().userInfo.schoolId}
+ // }).then(resp => {
+ // console.log(".....")
+ // console.log(resp)
+ // if(resp.data.code == 200) {
+ // this.activityList = resp.data.data
+ // console.log("*****")
+ // console.log(resp.data)
+ // console.log(resp.data.data)
+ // console.log(this.activityList)
+ // }
// })
+ queryActivityList({schoolId: this.user.schoolId}).then(resp => {
+ this.activityList = resp.data;
+ })
},
// 去活动
handleToActivity(index) {
From c26e306b3ac1c6c8fd7256ad81b50604cc0aca68 Mon Sep 17 00:00:00 2001
From: zcx <377075991@qq.com>
Date: Fri, 2 Feb 2024 13:51:36 +0800
Subject: [PATCH 3/5] =?UTF-8?q?=E5=8A=A9=E5=8A=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/jtools/api/activity.js | 45 ++-
src/pages.json | 7 +
src/pages/index/components/ggl/index.vue | 7 +-
src/pages/index/index.vue | 4 +-
src/pages/me/help.vue | 340 +++++++++++++++++++++++
src/pages/me/myGift.vue | 11 +-
6 files changed, 407 insertions(+), 7 deletions(-)
create mode 100644 src/pages/me/help.vue
diff --git a/src/jtools/api/activity.js b/src/jtools/api/activity.js
index 0cdffa5..ffdc0b2 100644
--- a/src/jtools/api/activity.js
+++ b/src/jtools/api/activity.js
@@ -72,4 +72,47 @@ export function canRecieveGift(data) {
data,
noToken: true
});
-}
\ No newline at end of file
+}
+
+//查询中奖信息
+export function queryWinnerInfo(data) {
+ return request({
+ url: 'activity/applet/activity/winner/info',
+ method: 'get',
+ data,
+ noToken: true
+ });
+}
+
+//查询助力信息
+export function queryHelpInfo(data) {
+ return request({
+ url: 'activity/applet/activity/help/info',
+ method: 'get',
+ data,
+ noToken: true
+ });
+}
+
+//保存助力信息
+export function saveHelpInfo(data) {
+ return request({
+ url: 'activity/applet/activity/help/save',
+ method: 'post',
+ data,
+ noToken: true
+ });
+}
+
+
+//微信登录获取手机号
+export function wxLogin(data) {
+ return request({
+ url: 'activity/applet/activity/wx/login',
+ method: 'post',
+ data,
+ noToken: true
+ });
+}
+
+
diff --git a/src/pages.json b/src/pages.json
index c85fb59..dda5ed5 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -197,6 +197,13 @@
"navigationBarTitleText" : "核销二维码",
"enablePullDownRefresh" : false
}
+ },
+ {
+ "path": "pages/me/help",
+ "style": {
+ "navigationBarTitleText": "好友助力",
+ "enablePullDownRefresh": true
+ }
}
],
diff --git a/src/pages/index/components/ggl/index.vue b/src/pages/index/components/ggl/index.vue
index 58c9c06..e075971 100644
--- a/src/pages/index/components/ggl/index.vue
+++ b/src/pages/index/components/ggl/index.vue
@@ -1,6 +1,6 @@
-
+
您今日还剩{{actiNum}}次刮奖机会,共有{{total}}人参加活动
@@ -123,9 +123,10 @@
this.btnText = '再刮一次!'
if(resp.code == 200) {
this.getActivityNum()
+ let help = ",完成助力即可领取奖品!"
uni.showToast({
icon: 'none',
- title: `恭喜获得${this.result}`
+ title: `恭喜获得${this.result}` + help
})
this.showBtn = true
}
@@ -136,6 +137,8 @@
\ No newline at end of file
diff --git a/src/pages/me/myGift.vue b/src/pages/me/myGift.vue
index 6161c67..41a5f9d 100644
--- a/src/pages/me/myGift.vue
+++ b/src/pages/me/myGift.vue
@@ -13,8 +13,10 @@
有效期至:{{ item.endTime }}
-
- 核销
+ 助力
+ 核销
+
+ 核销
@@ -61,6 +63,11 @@
url: `/pages/me/qrCode?id=${item.id}`
})
},
+ handleHelp(item){
+ uni.navigateTo({
+ url: `/pages/me/help?id=${item.id}`
+ })
+ }
}
}
From 65149c38cd4ffb73b65935b3d9e497c78cc3a456 Mon Sep 17 00:00:00 2001
From: zcx <377075991@qq.com>
Date: Fri, 2 Feb 2024 13:55:15 +0800
Subject: [PATCH 4/5] =?UTF-8?q?=E5=8A=A9=E5=8A=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/me/help.vue | 37 +------------------------------------
1 file changed, 1 insertion(+), 36 deletions(-)
diff --git a/src/pages/me/help.vue b/src/pages/me/help.vue
index c4a9cc0..5ef9375 100644
--- a/src/pages/me/help.vue
+++ b/src/pages/me/help.vue
@@ -181,43 +181,8 @@
}
});
- // this.phone = "18855146869"
- // this.saveHelpInfo()
},
- //保存助力信息
- saveHelpInfo(){
-
- uni.request({
- url: 'http://192.168.1.6:8089/applet/activity/help/save',
- method: 'post',
- data: {
- winnerId: this.winnerId,
- phone: this.phone
- }
- }).then(resp => {
- if(resp.data.code == 200) {
- console.log(resp)
- uni.showToast({
- icon: 'none',
- title: `助力成功`
- })
- this.disBtn = true
- }
- })
-
- // saveHelpInfo({
- // winnerId: this.winnerId,
- // phone: this.phone
- // }).then(resp => {
- // if(resp.code == 200) {
- // uni.showToast({
- // icon: 'none',
- // title: `助力成功`
- // })
- // this.disBtn = true
- // }
- // })
- }
+
},
}
From e67e1edf12aee186b86d8a159e6ea16638ef149b Mon Sep 17 00:00:00 2001
From: zcx <377075991@qq.com>
Date: Fri, 2 Feb 2024 14:16:26 +0800
Subject: [PATCH 5/5] =?UTF-8?q?=E5=8A=A9=E5=8A=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/jtools/api/activity.js | 8 ---
src/pages/index/index.vue | 135 -------------------------------------
2 files changed, 143 deletions(-)
diff --git a/src/jtools/api/activity.js b/src/jtools/api/activity.js
index cc6366e..ffdc0b2 100644
--- a/src/jtools/api/activity.js
+++ b/src/jtools/api/activity.js
@@ -15,11 +15,7 @@ export function queryActivityDetail(data) {
url: 'activity/applet/activity/detail',
method: 'get',
data,
-<<<<<<< HEAD
noToken: true
-=======
- noToken: true
->>>>>>> 9e24edad28eff09cb1c9d947314de6e4e3a33d19
});
}
//查询抽奖次数
@@ -66,7 +62,6 @@ export function getLuckyRecord(data) {
data,
noToken: true
});
-<<<<<<< HEAD
}
//查询中奖记录
@@ -121,6 +116,3 @@ export function wxLogin(data) {
}
-=======
-}
->>>>>>> 9e24edad28eff09cb1c9d947314de6e4e3a33d19
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index a105baf..14bb150 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -30,7 +30,6 @@