You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
Page({
|
|
|
|
shujichzhao: function (e) {
|
|
|
|
var that = this
|
|
|
|
wx.request({
|
|
|
|
url: 'http://localhost:9527/zxbook/find1',
|
|
|
|
data: {
|
|
|
|
'search': e.detail.value.search,
|
|
|
|
},
|
|
|
|
header: {
|
|
|
|
"Content-Type": "pplication/json"
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
method: "POST",
|
|
|
|
},
|
|
|
|
success: function (res) {
|
|
|
|
if(res.data=='zhaobudao'){
|
|
|
|
wx.showModal({
|
|
|
|
title: '书籍查询',
|
|
|
|
content: '未找到该书籍',
|
|
|
|
confirmColor: "rgba(253, 153, 65, 1)"
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
else{
|
|
|
|
var book=res.data
|
|
|
|
let bookstr = JSON.stringify(book);
|
|
|
|
console.log(book);
|
|
|
|
wx.navigateTo({
|
|
|
|
url: '../shuji/shuji?bookstr=' + bookstr,
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|