活动接口

pull/36/head
zcx 10 months ago
parent 67b3e63de9
commit 9e24edad28
  1. 10
      src/jtools/api/activity.js
  2. 37
      src/pages/index/index.vue

@ -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,7 +13,7 @@ export function queryActivityList(data) {
export function queryActivityDetail(data) {
return request({
url: 'activity/applet/activity/detail',
method: 'POST',
method: 'get',
data,
noToken: true
});
@ -22,7 +22,7 @@ export function queryActivityDetail(data) {
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
});

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

Loading…
Cancel
Save