Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
swx_weapp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2022-10-28 17:59:28 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7656caad457a7a05f21fd1bfe79a41930a4f503b
7656caad
1 parent
3e2a842a
联调生成小程序二维码
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
src/api/Activity/index.js
src/pages/activityDetail/index.vue
src/api/Activity/index.js
View file @
7656caa
/*
* @Date: 2022-10-20 13:15:00
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-10-2
6 11:36:29
* @LastEditTime: 2022-10-2
8 17:34:06
* @FilePath: /swx/src/api/Activity/index.js
* @Description: 活动信息
*/
...
...
@@ -13,6 +13,7 @@ const Api = {
ACTIVITY_COPY
:
'/srv/?a=activity_copy'
,
ACTIVITY_END
:
'/srv/?a=activity_end'
,
ACTIVITY_DEL
:
'/srv/?a=activity_del'
,
ACTIVITY_QRCODE
:
'/srv/?a=activity_info_qrcode'
,
}
/**
...
...
@@ -44,3 +45,9 @@ export const endActivityAPI = (params) => fn(fetch.get(Api.ACTIVITY_END, params)
* @returns
*/
export
const
delActivityAPI
=
(
params
)
=>
fn
(
fetch
.
get
(
Api
.
ACTIVITY_DEL
,
params
));
/**
* @description: 生成小程序码
* @returns
*/
export
const
qrCodeActivityAPI
=
(
params
)
=>
fn
(
fetch
.
get
(
Api
.
ACTIVITY_QRCODE
,
params
));
...
...
src/pages/activityDetail/index.vue
View file @
7656caa
<!--
* @Date: 2022-09-26 14:36:57
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-10-28 1
3:50:13
* @LastEditTime: 2022-10-28 1
7:56:57
* @FilePath: /swx/src/pages/activityDetail/index.vue
* @Description: 活动详情页
-->
...
...
@@ -152,6 +152,7 @@ import PosterBuilder from '@/components/PosterBuilder/index.vue';
import { ref, onMounted } from "vue";
import * as dayjs from 'dayjs'
import { infoUserAPI } from '@/api/User/index';
import { qrCodeActivityAPI } from '@/api/Activity/index';
import icon_share from '@/images/icon/share.png'
const nickname = ref('');
...
...
@@ -196,12 +197,15 @@ const onClickPost = () => {
const startDraw = ref(false)
const posterPath = ref('')
let base = {}
let qrcode_url = '';
const start = async () => {
const { code, data } = await activityInfoAPI({ i: getCurrentPageParam().id });
if (code) {
data.activity.activity_time = formatDate(data.activity.activity_time);
const activity = data.activity;
const qrcode = await qrCodeActivityAPI({ i: getCurrentPageParam().id });
if (qrcode.code) {
qrcode_url = qrcode.data.qrcode_url;
base = {
width: 1024,
height: 1334,
...
...
@@ -399,7 +403,7 @@ const start = async () => {
zIndex: 10,
},
{
url: 'https://pic.juncao.cc/cms/images/minapp.jpg'
,
url: qrcode_url
,
width: 170,
height: 170,
x: 750,
...
...
@@ -423,6 +427,7 @@ const start = async () => {
startDraw.value = true;
if (!posterPath.value) Taro.showLoading();
}
}
}
const drawSuccess = (result) => {
console.warn('绘制好了', result);
...
...
Please
register
or
login
to post a comment