http请求修改

This commit is contained in:
姚亚男
2021-10-19 14:59:13 +08:00
parent b399125d3a
commit 27a0dc96b1
10 changed files with 113 additions and 74 deletions
+17 -3
View File
@@ -1,4 +1,5 @@
import UserApi from '../../assets/js/http/userApi'
import { baseUrl, URL_CONFIG } from '../../assets/js/http/api'
Page({
/**
@@ -6,9 +7,9 @@ Page({
*/
data: {
form: {},
isSigned: 1, // 默认未报名
isSigned: 1, // 是否报名
fileId: '', // 图片id
src: 'null' // 签名之后,保存签名的图片地址
src: null // 签名之后,保存签名的图片地址
},
// 去签到页
scanSign(){
@@ -45,6 +46,12 @@ Page({
})
}
}
}).catch(err => {
wx.showToast({
title: '加载失败',
icon: 'fail',
duration: 2000
})
})
},
// 去报名
@@ -57,9 +64,16 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
let meeting = JSON.parse(options.meeting)
let src
if(meeting.checkFile){ // 签到名回显
src = baseUrl + URL_CONFIG + 'sys/common/download/' + meeting.checkFile
}else{
src = ''
}
this.setData({
isSigned: options.signed,
src
})
let form = JSON.parse(options.meeting)
this.setData({