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.
zx/chazhao/chazhao.js

64 lines
1.4 KiB

6 years ago
Page({
shujichzhao: function (e) {
var that = this
6 years ago
wx.request({
6 years ago
<<<<<<< Updated upstream
url: 'http://localhost:9528/zxbook/find1',
6 years ago
=======
url: 'http://localhost:9527/zxbook/find1',
>>>>>>> Stashed changes
6 years ago
data: {
'search': e.detail.value.search,
},
header: {
"Content-Type": "pplication/json"
6 years ago
},
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,
})
}
6 years ago
}
})
6 years ago
},
fenlei:function(e){
wx.request({
url: 'http://localhost:9527/zxbook/find2',
data:{
'search':e.target.id,
},
header: {
"Content-Type": "application/json"
},
methods: {
method: "POST",
},
})
console.log(e.target.id);
var book = res.data
let bookstr = JSON.stringify(book);
console.log(book);
}
6 years ago
})