当前位置: 首页> 房产> 家装 > seo快速排名博客_温州专业网站制作公司_商业软文案例_菏泽seo

seo快速排名博客_温州专业网站制作公司_商业软文案例_菏泽seo

时间:2025/7/11 18:30:16来源:https://blog.csdn.net/Xiang_Gong_Ya_/article/details/146343212 浏览次数:0次
seo快速排名博客_温州专业网站制作公司_商业软文案例_菏泽seo
const submitForm = async (formEl: FormInstance | undefined) => {if (!formEl) returnawait formEl.validate((valid: any, fields: any) => {if (valid) {console.log(ruleForm)getToken({ act: 'miniprogram', op: 'getAccessToken', type: ruleForm.name }).then((res: any) => {const ACCESS_TOKEN = res.data.token// 根据选择循环生成多张selectData[0].children.forEach((element: { children: any; label: any; value: any }) => {console.log(element.children[0].value)const params = {scene: element.children[0].value,page: ruleForm.page,width: 430,env_version: 'develop',}const label = element.labelgenerateMiniProgramQR(params, ACCESS_TOKEN, label)})})} else {console.log('error submit!', fields)}})
}
const generateMiniProgramQR = async (params: { scene: any; page?: any; width?: number; label?: any },ACCESS_TOKEN: any,label: any
) => {try {const url = `https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=${ACCESS_TOKEN}`const response = await axios.post(url, params, { responseType: 'arraybuffer' })const blob = new Blob([response.data], { type: 'image/jpeg' })const imageUrl = URL.createObjectURL(blob)const link = document.createElement('a')link.href = imageUrllink.download = `${label}.jpg`document.body.appendChild(link)link.click()document.body.removeChild(link)URL.revokeObjectURL(imageUrl)} catch (error) {// 错误处理}
}

在这里插入图片描述

关键字:seo快速排名博客_温州专业网站制作公司_商业软文案例_菏泽seo

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: