1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

api接口baseUrl通过全局变量引入;代码格式化

This commit is contained in:
2022-11-05 16:45:52 +08:00
parent 3e0c182bc9
commit 5cf1ed3a49
22 changed files with 477 additions and 406 deletions

View File

@@ -5,7 +5,7 @@ Page({
* 页面的初始数据
*/
data: {
feedbackList:'',
feedbackList: '',
replay: [],
},
@@ -33,13 +33,13 @@ Page({
onShow: function () {
var that = this;
wx.request({
url: 'http://127.0.0.1:8080/other/feedbackListNoReplay',
url: `${baseUrl}/other/feedbackListNoReplay`,
data: {
id:wx.getStorageSync('id')
id: wx.getStorageSync('id')
},
success: function (d) {
for (const iterator of d.data.data) {
if(!iterator.reply){
if (!iterator.reply) {
iterator.reply = ""
}
}
@@ -54,10 +54,10 @@ Page({
var that = this
console.log(event.target.dataset)
wx.request({
url: 'http://127.0.0.1:8080/other/feedbackReplay',
url: `${baseUrl}/other/feedbackReplay`,
data: {
id:event.target.dataset.id,
replay:event.target.dataset.replay
id: event.target.dataset.id,
replay: event.target.dataset.replay
},
success: function (d) {
wx.showToast({
@@ -66,12 +66,12 @@ Page({
duration: 2000,
success: function () {
that.setData({
replay : ""
replay: ""
})
that.onShow()
}
})
}
})
},
@@ -109,4 +109,4 @@ Page({
onShareAppMessage: function () {
}
})
})