Commit 39d7abbe by 郑艺斌

新增跳转以及校验

parent 4310a86a
......@@ -68,6 +68,24 @@ Page({
},
addTag(){
const that = this
let pattern1 = /^\s+/g;
let pattern2 = /\s+$/g;
let tagText = this.data.tagText
if(pattern1.test(tagText)){
wx.showToast({
title: `文字前不能包含空格!`,
icon: 'none',
duration: 2000
})
return
}else if(pattern2.test(tagText)){
wx.showToast({
title: `文字后不能包含空格!`,
icon: 'none',
duration: 2000
})
return
}
wx.request({
url: baseUrl + '/api/emaint/problem-base/addLabel',
data: {
......@@ -84,6 +102,12 @@ Page({
tagText:''
})
that.getTabs()
}else{
wx.showToast({
title: res.data.responseResult,
icon: 'none',
duration: 2000
})
}
}})
},
......
......@@ -81,6 +81,8 @@ Page({
// 点击完成维修
wanchengdan(e){
var that = this;
wx.navigateTo({url:`../endRepair/repair?id=${e.currentTarget.dataset.id}`})
return
console.log(e.currentTarget.dataset.id)
this.setData({
// wantan: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment