http请求修改

This commit is contained in:
姚亚男
2021-10-19 18:04:22 +08:00
parent 06b5ac09db
commit 15a27091a8
17 changed files with 78 additions and 43 deletions
+2 -3
View File
@@ -124,12 +124,12 @@ Component({
success: function (res) {
imgids.push(JSON.parse(res.data).result.id)
count++;
//如果是最后一张,则隐藏等待中
//如果是最后一张,则隐藏等待中
if (count == tempFilePaths.length) {
wx.hideToast();
that.triggerEvent("getIds",imgids)
}
},
fail: function (res) {
wx.hideToast();
@@ -144,7 +144,6 @@ Component({
}
}
},
fail(err) {
console.log("失败", err);
}
+2 -2
View File
@@ -30,7 +30,7 @@ Page({
}).catch(err => {
wx.showToast({
title: '加载失败',
icon: 'fail',
icon: 'none',
duration: 2000
})
})
@@ -53,4 +53,4 @@ Page({
this.data.pageNo++
this.loadData()
}
})
})
+3 -3
View File
@@ -47,7 +47,7 @@ Page({
}).catch(err => {
wx.showToast({
title: '加载失败',
icon: 'fail',
icon: 'none',
duration: 2000
})
})
@@ -58,7 +58,7 @@ Page({
}).catch(err => {
wx.showToast({
title: '加载失败',
icon: 'fail',
icon: 'none',
duration: 2000
})
})
@@ -68,6 +68,6 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
}
})
+8 -4
View File
@@ -30,7 +30,7 @@ Page({
if (res.success) {
this.countDown()
wx.showToast({
title: '发送成功',
title: '发送成功'+ res.result,
icon: 'none',
duration: 2000
})
@@ -72,7 +72,7 @@ Page({
}, 1000)
// 倒计时 end
},
// 确认
formSubmit(e) {
if(!e.detail.value.phone){
@@ -159,11 +159,15 @@ Page({
phone: encrypt(this.data.rsaPublicKey,e.detail.value.phone), // 手机号加密
password: encrypt(this.data.rsaPublicKey, e.detail.value.password), // 新密码加密
verifyPassword: encrypt(this.data.rsaPublicKey, e.detail.value.verifyPassword), // 确认新密码加密
verifyCode: e.detail.value.verifyCode,
verifyCode: e.detail.value.verifyCode,
rsaPublicKey: this.data.rsaPublicKey
}
// 修改密码
UserApi.updatePassword(params).then(res => {
wx.showToast({
title: '加载中...',
icon: 'loading'
})
if (res.success) {
// 跳转登录页
wx.redirectTo({
@@ -209,7 +213,7 @@ Page({
}
})
},
/**
* 生命周期函数--监听页面显示
*/
+2 -2
View File
@@ -17,13 +17,13 @@
<view class="form-item">
<view class="text-label">新密码</view>
<view class="text-value">
<input name="password" value="{{password}}" placeholder="请输入新密码" />
<input name="password" type="password" value="{{password}}" placeholder="请输入新密码" />
</view>
</view>
<view class="form-item">
<view class="text-label">确认密码</view>
<view class="text-value">
<input name="verifyPassword" value="{{verifyPassword}}" placeholder="请输入确认密码" />
<input name="verifyPassword" type="password" value="{{verifyPassword}}" placeholder="请输入确认密码" />
</view>
</view>
<view class="btn-area">
+9 -7
View File
@@ -51,9 +51,11 @@ Page({
res.result.records.forEach(item=>{
item.msgContent = item.msgContent.replace(reg,"")
item.msgContent = item.msgContent.replace(reg1,"")
const startIndex = item.msgContent.indexOf("<")
const endIndex = item.msgContent.lastIndexOf(">")
item.msgContent = item.msgContent.substring(0, startIndex) + item.msgContent.slice(endIndex+1) + '点击报名'
const startIndex = item.msgContent.indexOf("<a")
const endIndex = item.msgContent.lastIndexOf("</a>")
if(startIndex > -1 && endIndex > -1 ){
item.msgContent = item.msgContent.substring(0, startIndex) + item.msgContent.slice(endIndex + 4) + '点击报名'
}
})
this.setData({
list: [...this.data.list, ...res.result.records]
@@ -62,14 +64,14 @@ Page({
}
}).catch(err => {
wx.showToast({
title: '加载失败',
icon: 'fail',
title: '登录后查看消息通知!',
icon: 'none',
duration: 2000
})
})
},
// 点击首页的五个选项跳转页面
clickSelect(e){
clickSelect(e){
let index = e.currentTarget.dataset.index
let url = ''
if(index === 0) { // 来款项目
@@ -162,4 +164,4 @@ Page({
this.data.searchParams.pageNo++
this.loadData()
}
})
})
+15 -3
View File
@@ -30,7 +30,7 @@ Page({
if (res.success) {
this.countDown()
wx.showToast({
title: '发送成功',
title: '发送成功'+ res.result,
icon: 'none',
duration: 2000
})
@@ -41,6 +41,12 @@ Page({
duration: 2000
})
}
}).catch(err => {
wx.showToast({
title: '获取失败',
icon: 'none',
duration: 2000
})
})
} else {
wx.showToast({
@@ -97,7 +103,7 @@ Page({
url: '../home/home',
})
}else{ // 首次登录不能直接用微信快捷登录
}
})
})
@@ -179,7 +185,7 @@ Page({
UserApi.wxBind(params).then(res=>{})
})
},
/**
* 生命周期函数--监听页面显示
*/
@@ -194,6 +200,12 @@ Page({
data: res.result
})
}
}).catch(err => {
wx.showToast({
title: '加载失败',
icon: 'none',
duration: 2000
})
})
}
})
+1 -1
View File
@@ -122,7 +122,7 @@ Page({
}).catch(err => {
wx.showToast({
title: '加载失败',
icon: 'fail',
icon: 'none',
duration: 2000
})
})
+4 -4
View File
@@ -74,10 +74,10 @@ Page({
url: `../scanSign/scanSign?signed=1&meeting=${result}`,
})
} else {
// let result = JSON.stringify(res.result)
let result = JSON.stringify(res.result)
// 未查到报名信息
wx.navigateTo({ // 未报名
url: `../scanSign/scanSign?signed=0&meeting=${1}`,
url: `../scanSign/scanSign?signed=0&meeting=${result}`,
})
}
})
@@ -91,7 +91,7 @@ Page({
wx.navigateTo({
url: '../mineData/mineData',
})
})
})
},
// 我的合同
mineContract() {
@@ -140,4 +140,4 @@ Page({
})
}
}
})
})
+12 -3
View File
@@ -17,20 +17,29 @@ Page({
})
},
loadData(){
wx.showToast({
title: '加载中...',
icon: 'loading'
})
let params = {
pageNo: this.data.pageNo,
pageSize: this.data.pageSize
}
UserApi.contractList(params).then(res=>{
if(res.success && res.result.records && res.result.records.length){
console.log(res.result.records)
this.setData({
list: [...this.data.list, ...res.result.records]
})
}
}).catch(err=>{
wx.showToast({
title: '加载失败',
icon: 'none',
duration: 2000
})
})
},
/**
* 生命周期函数--监听页面显示
*/
@@ -46,4 +55,4 @@ Page({
this.data.pageNo++
this.loadData()
}
})
})
+10 -1
View File
@@ -13,17 +13,26 @@ Page({
},
loadData(){
wx.showToast({
title: '加载中...',
icon: 'loading'
})
let params = {
pageNo: this.data.pageNo,
pageSize: this.data.pageSize
}
UserApi.dataList(params).then(res=>{
if(res.success && res.result.records && res.result.records.length){
console.log(res.result.records)
this.setData({
list: [...this.data.list, ...res.result.records]
})
}
}).catch(err=>{
wx.showToast({
title: '加载失败',
icon: 'none',
duration: 2000
})
})
},
// 预览
+1 -1
View File
@@ -18,7 +18,7 @@
<view class="text-value">
<input name="captcha" placeholder="请输入验证码" value="{{captcha}}" />
</view>
<view class="captcha" wx:if="{{form.requestCodeSuccess}}">
<view class="captcha" wx:if="{{form.requestCodeSuccess}}" bindtap="handleChangeCheckCode">
<image src="{{form.randCodeImage}}" mode="aspectFill"></image>
</view>
<view class="captcha count" wx:if="{{!form.requestCodeSuccess}}" bindtap="handleChangeCheckCode">重新获取</view>
+2 -2
View File
@@ -31,7 +31,7 @@ Page({
})
}
this.loadData()
},
},
// 打包改变
bindPackChange(e){
this.data.searchParams.pageNo = 1
@@ -112,7 +112,7 @@ Page({
}).catch(err=>{
wx.showToast({
title: '加载失败',
icon: 'fail',
icon: 'none',
duration: 2000
})
})
+3 -3
View File
@@ -50,7 +50,7 @@ Page({
}).catch(err => {
wx.showToast({
title: '加载失败',
icon: 'fail',
icon: 'none',
duration: 2000
})
})
@@ -76,7 +76,7 @@ Page({
}).catch(err => {
wx.showToast({
title: '加载失败',
icon: 'fail',
icon: 'none',
duration: 2000
})
})
@@ -93,7 +93,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
+2 -2
View File
@@ -49,7 +49,7 @@ Page({
}).catch(err => {
wx.showToast({
title: '加载失败',
icon: 'fail',
icon: 'none',
duration: 2000
})
})
@@ -92,6 +92,6 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
}
})
+1 -1
View File
@@ -30,7 +30,7 @@
<text>{{form.checkIn ? '是' : '否'}}</text>
</view>
<!-- 未签到时,显示“手动签到” checkIn: 是否签到 -->
<view wx:if="{{!form.checkIn}}">
<view wx:if="{{!form.checkIn && isSigned == '1'}}">
<text>手动签到</text>
<text style="color: #069F99;" bindtap="scanSign">签到</text>
</view>
+1 -1
View File
@@ -69,7 +69,7 @@
height: 160px
}
.warning-text{
margin-bottom: 10px;
margin:50px 0 10px 0;
display: flex;
justify-content: center;
align-items: center;