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

37 lines
835 B

6 years ago
Page({
shujichzhao: function (e) {
var that = this
6 years ago
wx.request({
url: 'http://localhost:9527/zxbook/find1',
data: {
'search': e.detail.value.search,
},
header: {
"Content-Type": "pplication/json"
6 years ago
},
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
})