From ab05529015c21299c826edd9460815ab9d757eb6 Mon Sep 17 00:00:00 2001 From: qsh <> Date: Sat, 27 Jan 2024 21:21:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- .env.production | 3 + src/jtools/api/activity.js | 75 +++ src/jtools/request/index.js | 2 +- src/pages/index/components/ggl/index.vue | 115 ++++- src/pages/index/components/ggl/scraping.vue | 494 ++++++++++---------- src/pages/index/index.vue | 276 ++++++----- src/pages/login/login.vue | 14 +- src/pages/me/index.vue | 37 +- src/pages/me/myGift.vue | 58 ++- src/pages/me/qrCode.vue | 7 +- 11 files changed, 669 insertions(+), 416 deletions(-) create mode 100644 src/jtools/api/activity.js diff --git a/.env.development b/.env.development index 52702e2..bf60e6e 100644 --- a/.env.development +++ b/.env.development @@ -7,4 +7,6 @@ VITE_APP_ENV = 'development' # 金武联驾校/开发环境 VITE_APP_BASE_API = 'https://jwl.ahduima.com/' # -VITE_WEB_BASE_URL = 'https://jwl.ahduima.com' \ No newline at end of file +VITE_WEB_BASE_URL = 'https://jwl.ahduima.com' +# 资源地址 +VITE_RESOURSE_URL = 'http://huodong.ahduima.com' \ No newline at end of file diff --git a/.env.production b/.env.production index ea53d5b..297da09 100644 --- a/.env.production +++ b/.env.production @@ -9,3 +9,6 @@ VITE_APP_BASE_API = 'https://jwl.ahduima.com/' # VITE_WEB_BASE_URL = 'https://jwl.ahduima.com' + +# 资源地址 +VITE_RESOURSE_URL = 'http://huodong.ahduima.com' \ 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..0cdffa5 --- /dev/null +++ b/src/jtools/api/activity.js @@ -0,0 +1,75 @@ +import request from '../request/index.js'; + +//查询活动列表 +export function queryActivityList(data) { + return request({ + url: 'activity/applet/activity/list', + method: 'get', + data, + noToken: true + }); +} +//查询活动详情 +export function queryActivityDetail(data) { + return request({ + url: 'activity/applet/activity/detail', + method: 'get', + data, + noToken: true + }); +} +//查询抽奖次数 +export function queryLuckyNum(data) { + return request({ + url: 'activity/applet/activity/lucky/num', + method: 'get', + data, + noToken: true + }); +} +//查询中奖结果 +export function queryLuckyResult(data) { + return request({ + url: 'activity/applet/activity/lucky/result', + method: 'get', + 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: 'get', + data, + noToken: true + }); +} + +//查询中奖记录 +export function canRecieveGift(data) { + return request({ + url: 'activity/applet/activity/receive/user', + method: 'get', + data, + noToken: true + }); +} \ No newline at end of file diff --git a/src/jtools/request/index.js b/src/jtools/request/index.js index 25d87b1..1ab1d45 100644 --- a/src/jtools/request/index.js +++ b/src/jtools/request/index.js @@ -32,7 +32,7 @@ function service(options = {}) { useUserStore().logoutWithoutToken() //请求成功 resolved(res.data); - } else if(res.data.code != '0000'&&res.data.code !='4001') { + } else if(res.data.code != '0000'&&res.data.code !='4001'&&res.data.code != 200) { uni.showToast({ title: res?.data?.message || '访问出错', icon: 'none' diff --git a/src/pages/index/components/ggl/index.vue b/src/pages/index/components/ggl/index.vue index 3847459..58c9c06 100644 --- a/src/pages/index/components/ggl/index.vue +++ b/src/pages/index/components/ggl/index.vue @@ -1,22 +1,23 @@ diff --git a/src/pages/index/components/ggl/scraping.vue b/src/pages/index/components/ggl/scraping.vue index 652324d..9703c34 100644 --- a/src/pages/index/components/ggl/scraping.vue +++ b/src/pages/index/components/ggl/scraping.vue @@ -1,266 +1,280 @@ + .scraping-happy { + width: 100%; + height: 200rpx; + position: relative; + display: flex; + justify-content: center; + align-items: center; + } + + .scraping__canvas { + width: 100%; + height: 100%; + position: absolute; + z-index: 10; + /* background-color: red; */ + display: inline-block; + } + + .scraping__view { + position: absolute; + z-index: 1; + color: #f29100; + font-size: 20px; + font-weight: bold; + letter-spacing: 8px; + } + \ No newline at end of file diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 83f128d..a43679b 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -1,137 +1,165 @@ \ No newline at end of file diff --git a/src/pages/login/login.vue b/src/pages/login/login.vue index 9939448..7eec0c0 100644 --- a/src/pages/login/login.vue +++ b/src/pages/login/login.vue @@ -7,11 +7,11 @@ - - + @@ -39,7 +39,7 @@ import storage from '@/jtools/storage'; export default { data() { return { - login: { + loginForm: { phone: '', code: '' }, @@ -54,9 +54,9 @@ export default { }, methods: { getCode() { - if (isPhone(this.login.phone) && this.countDown == 0) { + if (isPhone(this.loginForm.phone) && this.countDown == 0) { getCode({ - phone: this.login.phone + phone: this.loginForm.phone }).then(resp => { // if (resp.code == '0000') { uni.showToast({ @@ -80,8 +80,8 @@ export default { this.countDown = 0 }, bindLogin() { - if (isPhone(this.login.phone) && this.login.code) { - let params = { ...this.login } + if (isPhone(this.loginForm.phone) && this.loginForm.code) { + let params = { ...this.loginForm } if (storage.get('companyId')) { params.id = storage.get('companyId') } diff --git a/src/pages/me/index.vue b/src/pages/me/index.vue index b8e4d21..e1c3942 100644 --- a/src/pages/me/index.vue +++ b/src/pages/me/index.vue @@ -12,6 +12,9 @@ 陪您学车 第{{ user.days }}天 + + + @@ -107,8 +110,8 @@ diff --git a/src/pages/me/qrCode.vue b/src/pages/me/qrCode.vue index ce5d803..fb75942 100644 --- a/src/pages/me/qrCode.vue +++ b/src/pages/me/qrCode.vue @@ -1,6 +1,6 @@ @@ -16,11 +16,8 @@ } }, onLoad(option) { - this.value = option.item + this.value = option.id }, - methods: { - - } }