diff --git a/hunjianghu.xuanjis.com.jks b/hunjianghu.xuanjis.com.jks
new file mode 100644
index 0000000..195fa60
Binary files /dev/null and b/hunjianghu.xuanjis.com.jks differ
diff --git a/江可飞/小程序开发.rar b/江可飞/小程序开发.rar
deleted file mode 100644
index dcbc1af..0000000
Binary files a/江可飞/小程序开发.rar and /dev/null differ
diff --git a/江可飞/小程序开发/app.js b/江可飞/小程序开发/app.js
index d5d6acb..c890f9b 100644
--- a/江可飞/小程序开发/app.js
+++ b/江可飞/小程序开发/app.js
@@ -1,7 +1,14 @@
//app.js
App({
+
+ globalData: {
+ UserID:null,
+ CodeID:null
+ },
+
onLaunch: function () {
+ var that = this
// 展示本地存储能力
var logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
@@ -11,9 +18,22 @@ App({
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
- var code = res.code
+ console.log(res.code)
+ wx.request({
+ url: 'https://hunjianghu.xuanjis.com/web/Yanzheng',
+ data: {
+ "code": res.code
+ },
+ method: 'GET',
+ success: res1 => {
+ that.globalData.UserID = res1.data.UserID;
+ that.globalData.CodeID = res1.data.CodeID;
+ console.log(that.globalData.UserID)
+ }
+ })
}
+
})
// 获取用户信息
wx.getSetting({
diff --git a/江可飞/小程序开发/pages/detail/detail.js b/江可飞/小程序开发/pages/detail/detail.js
index 8a0bb7e..8499e0f 100644
--- a/江可飞/小程序开发/pages/detail/detail.js
+++ b/江可飞/小程序开发/pages/detail/detail.js
@@ -10,19 +10,23 @@ Page({
// 商品详情介绍
detailImg: [
- "/pages/index/image/suanfa.jpg"
+ "/pages/index/image/suanfa.jpg"
],
},
- onload:function(options){
+ onLoad: function (options) {
+ console.log("in detail")
var thats = this
wx.request({
- url: "http://45.76.158.31:8080/web/GetFrontInfo.do?bookid="+options.id,
+ url: "http://45.76.158.31:8080/web/BookInfo.do?bookid=" + options.id,
header: {
"content-type": "json"
},
- success: function (res) {
+ success: function(res) {
console.log(res.data)
+ for (var i = 0; i < res.data.length; i++) {
+ res.data[i].Count = 1;
+ }
if (res.statusCode == 200) {
thats.setData({
book: res.data,
@@ -34,7 +38,7 @@ Page({
},
//预览图片
- previewImage: function (e) {
+ previewImage: function(e) {
var current = e.target.dataset.src;
wx.previewImage({
@@ -45,12 +49,19 @@ Page({
// 跳到购物车
addCar() {
- var reqData="{'BookName':'','BookID':'','count':''}"
+ var that = this
wx.request({
- url: '',
- data: {reqData:reqData},
- header: {'Content-Type': 'application/x-www-form-urlencoded'},
- method: 'POST',
+ url: 'http://45.76.158.31:8080/web/AddCart.do',//?action=Modify&UserID=1&BookID=' + that.data.book[0].BookID + '&Count=' + that.data.book[0].Count,
+ data: {
+ 'action':'Modify',
+ 'UserID':1,
+ 'BookID':that.data.book[0].BookID,
+ 'Count':that.data.book[0].Count
+ },
+ header: {
+ 'Content-Type': 'application/x-www-form-urlencoded'
+ },
+ // method: 'POST',
dataType: 'json',
responseType: 'text',
success: function(res) {
diff --git a/江可飞/小程序开发/pages/detail/detail.wxml b/江可飞/小程序开发/pages/detail/detail.wxml
index 2604474..6e2f964 100644
--- a/江可飞/小程序开发/pages/detail/detail.wxml
+++ b/江可飞/小程序开发/pages/detail/detail.wxml
@@ -1,30 +1,43 @@
-
-
-
-
-
-
-
-
-
- {{book[0].BookName}}
- ¥{{book[0].Price}}
-
-
-
- 请选择购买数量
-
- 商品评价:{{book[0].Introduce}}
-
- 商品详情
-
-
+ 数量:1
+
+
+
+
+ 商品评价:{{books.Introduce}}
+
+
+
+ 商品详情
+
+
+
-
-
+
+
+
diff --git a/江可飞/小程序开发/pages/detail/detail.wxss b/江可飞/小程序开发/pages/detail/detail.wxss
index d79cbcf..73e2644 100644
--- a/江可飞/小程序开发/pages/detail/detail.wxss
+++ b/江可飞/小程序开发/pages/detail/detail.wxss
@@ -104,3 +104,61 @@ text {
font-size: 25rpx;
margin: 10rpx;
}
+<<<<<<< HEAD
+=======
+
+.introduce{
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+
+.good_content .good_footer .stepper {
+ float: left;
+ margin-top: 10rpx;
+ width: 50%;
+ margin-left: 70rpx;
+}
+
+
+.good_content .stepper .add, .stepper .subtract {
+ float: left;
+ width: 50rpx;
+ height: 50rpx;
+ line-height: 50rpx;
+ text-align: center;
+ font-size: 28rpx;
+ border: 1px solid #ccc;
+ box-sizing: border-box;
+}
+
+.good_content .stepper .disabled {
+ float: left;
+ color: #eee;
+}
+
+.good_content .stepper .count {
+ float: left;
+ width: 60rpx;
+ height: 50rpx;
+ line-height: 50rpx;
+ /* border: 1px solid #ccc; */
+ border-top: 1px solid #ccc;
+ border-bottom: 1px solid #ccc;
+ text-align: center;
+ box-sizing: border-box;
+ min-height: 1rem;
+ font-size: 28rpx;
+}
+
+.good_content .stepper .add, .stepper .subtract {
+ float: left;
+ width: 50rpx;
+ height: 50rpx;
+ line-height: 50rpx;
+ text-align: center;
+ font-size: 28rpx;
+ border: 1px solid #ccc;
+ box-sizing: border-box;
+}
+>>>>>>> 1b33c170e75d0094eab32be499d7f94124a3b4ef
diff --git a/江可飞/小程序开发/pages/fenlei/fenlei.js b/江可飞/小程序开发/pages/fenlei/fenlei.js
index 33cf5c8..c3b21ed 100644
--- a/江可飞/小程序开发/pages/fenlei/fenlei.js
+++ b/江可飞/小程序开发/pages/fenlei/fenlei.js
@@ -98,16 +98,26 @@ Page({
// image:"/pages/index/image/jsswl.jpg"
// },
// ]
- }
+ },
+ {
+ cate_id: 5,
+ cate_name: "修真",
+ ishaveChild: true,
+ },
+ {
+ cate_id: 6,
+ cate_name: "网游",
+ ishaveChild: true,
+ },
],
curNav: 1,
curIndex: 0
},
- onload:function(){
+ onLoad: function (){
var thats = this
wx.request({
- url: "http://45.76.158.31:8080/web/GetFrontInfo.do?type=" + 1,
+ url: "http://45.76.158.31:8080/web/Classify.do?booktype=" + 1,
header: {
"content-type": "json"
},
@@ -131,7 +141,7 @@ Page({
console.log(id)
var thats = this
wx.request({
- url: "http://45.76.158.31:8080/web/GetFrontInfo.do?type="+id,
+ url: "http://45.76.158.31:8080/web/Classify.do?booktype="+id,
header: {
"content-type": "json"
},
diff --git a/江可飞/小程序开发/pages/fenlei/fenlei.json b/江可飞/小程序开发/pages/fenlei/fenlei.json
index 8835af0..48d7c2d 100644
--- a/江可飞/小程序开发/pages/fenlei/fenlei.json
+++ b/江可飞/小程序开发/pages/fenlei/fenlei.json
@@ -1,3 +1,3 @@
{
- "usingComponents": {}
+ "navigationBarTitleText": "分类"
}
\ No newline at end of file
diff --git a/江可飞/小程序开发/pages/fenlei/fenlei.wxml b/江可飞/小程序开发/pages/fenlei/fenlei.wxml
index 2ddb9f0..49dd16b 100644
--- a/江可飞/小程序开发/pages/fenlei/fenlei.wxml
+++ b/江可飞/小程序开发/pages/fenlei/fenlei.wxml
@@ -12,7 +12,7 @@
-
+
diff --git a/江可飞/小程序开发/pages/gouwu/gouwu.js b/江可飞/小程序开发/pages/gouwu/gouwu.js
index 1ab4708..53bc279 100644
--- a/江可飞/小程序开发/pages/gouwu/gouwu.js
+++ b/江可飞/小程序开发/pages/gouwu/gouwu.js
@@ -12,6 +12,7 @@ Page({
=======
'iscart': false,
'checked': [],
+<<<<<<< HEAD
'goodList': [{
>>>>>>> f23362a433f70f1876587a01c643e157b7e8b3ae
'cover': '/pages/index/image/suanfa.jpg',
@@ -54,6 +55,49 @@ Page({
'checked': false
}
],
+=======
+ // 'goodList': [{
+ // 'cover': '/pages/index/image/suanfa.jpg',
+ // 'isbn': '9787535482051',
+ // 'desc': '计算机算法设计',
+ // 'price': 20,
+ // 'count': 1,
+ // 'checked': false
+ // },
+ // {
+ // 'cover': '/pages/index/image/jichu.jpg',
+ // 'isbn': '9787540455958',
+ // 'desc': '计算机基础',
+ // 'price': 30,
+ // 'count': 1,
+ // 'checked': false
+ // },
+ // {
+ // 'cover': '/pages/index/image/rjgcdl.jpg',
+ // 'isbn': '9787539982830',
+ // 'desc': '软件工程导论',
+ // 'price': 25,
+ // 'count': 1,
+ // 'checked': false
+ // },
+ // {
+ // 'cover': '/pages/index/image/java.jpg',
+ // 'isbn': '9787550013247',
+ // 'desc': 'Java Web',
+ // 'price': 17,
+ // 'count': 1,
+ // 'checked': false
+ // },
+ // {
+ // 'cover': '/pages/index/image/byyl.jpg',
+ // 'isbn': '9787208061644',
+ // 'desc': '编译原理',
+ // 'price': 15,
+ // 'count': 1,
+ // 'checked': false
+ // }
+ // ],
+>>>>>>> 1b33c170e75d0094eab32be499d7f94124a3b4ef
'bookList': [],
'checkAll': false,
'totalCount': 0,
@@ -66,9 +110,29 @@ Page({
* 删除购物车当前商品
*/
deleteList(e) {
+ var that = this
const index = e.currentTarget.dataset.index;
let bookList = this.data.bookList;
+
+ wx.request({
+ url: "http://45.76.158.31:8080/web/AddCart.do?action=Delete&BookID=" + that.data.bookList[index].BookID + "&UserID=1",
+ header: {
+ "content-type": "json"
+ },
+ success: function(res) {
+
+ if (res.statusCode == 200) {
+ console.log(res.data)
+ that.setData({
+ book: res.data,
+ })
+ //wx.hideNavigationBarLoading()
+ }
+ }
+ })
+
bookList.splice(index, 1);
+ console.log(index)
this.setData({
bookList: bookList
});
@@ -91,8 +155,8 @@ Page({
for (var i = 0; i < bookList.length; i++) {
var book = bookList[i];
if (book.checked) {
- totalCount += book.count;
- totalPrice += book.count * book.price;
+ totalCount += book.Count * 1;
+ totalPrice += book.Count * book.Price;
}
}
totalPrice = totalPrice.toFixed(2);
@@ -106,9 +170,10 @@ Page({
* 用户点击商品减1
*/
subtracttap: function(e) {
+ var that = this
var index = e.target.dataset.index;
var bookList = this.data.bookList;
- var count = bookList[index].count;
+ var count = bookList[index].Count;
if (count <= 1) {
return;
} else {
@@ -117,21 +182,59 @@ Page({
'bookList': bookList
});
this.calculateTotal();
+
+ wx.request({
+ url: "http://45.76.158.31:8080/web/AddCart.do?action=Modify&BookID=" + bookList[index].BookID + "&UserID=1&Count=" + bookList[index].Count,
+ header: {
+ "content-type": "json"
+ },
+ success: function(res) {
+
+ if (res.statusCode == 200) {
+ console.log(res.data)
+ that.setData({
+ book: res.data,
+ })
+ //wx.hideNavigationBarLoading()
+ }
+ }
+ })
+
}
+
},
/**
* 用户点击商品加1
*/
addtap: function(e) {
+ var that = this
var index = e.target.dataset.index;
var bookList = this.data.bookList;
- var count = bookList[index].count;
+ var count = bookList[index].Count;
bookList[index].Count++;
this.setData({
'bookList': bookList
});
this.calculateTotal();
+
+ wx.request({
+ url: "http://45.76.158.31:8080/web/AddCart.do?action=Modify&BookID=" + bookList[index].BookID + "&UserID=1&Count=" + bookList[index].Count,
+ header: {
+ "content-type": "json"
+ },
+ success: function(res) {
+
+ if (res.statusCode == 200) {
+ console.log(res.data)
+ that.setData({
+ book: res.data,
+ })
+ //wx.hideNavigationBarLoading()
+ }
+ }
+ })
+
},
/**
* 用户选择购物车商品
@@ -194,6 +297,7 @@ Page({
todetail: function(e) {
var id = e.target.dataset.id
+ console.log(id)
wx.navigateTo({
url: "/pages/detail/detail?id=" + id
})
@@ -203,9 +307,23 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function() {
+ this.calculateTotal();
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function(options) {
var that = this
wx.request({
- url: "http://45.76.158.31:8080/web/GetFrontInfo.do",
+ url: "http://45.76.158.31:8080/web/AddCart.do?action=getinfo&UserID=1",
header: {
"content-type": "json"
},
@@ -224,25 +342,11 @@ Page({
})
},
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function() {
- this.calculateTotal();
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function() {
-
- },
-
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
-
+
},
/**
@@ -290,7 +394,11 @@ Page({
})
=======
+ /**
+ * 点击结算触发
+ */
newAddress: function() {
+ var that = this
var checkList = [];
if (!this.data.iscart) {
var bookList = this.data.bookList
@@ -300,20 +408,49 @@ Page({
}
}
}
- var checkLists = JSON.stringify(checkList)
- console.log(checkLists)
- //if (this.data.totalCount > 0) {
- wx.navigateTo({
- url: '/pages/order/order?typeId=0&checkLists=' + checkLists
- })
- // }
- // else {
- // wx.showToast({
- // title: '没有选择商品',
- // icon: 'success',
- // duration: 2000
- // })
- // }
+ // var checkLists = JSON.stringify(checkList)
+ // console.log(checkLists)
+
+ if (this.data.totalCount > 0) {
+
+ //向服务器传用户选中购买的东西生成订单
+ for (var i = 0; i < checkList.length; i++) {
+ wx.request({
+ url: "http://45.76.158.31:8080/web/Buy.do?UserID=1&BookID="+checkList[i].BookID+"&Count="+checkList[i].Count,
+ header: {
+ "content-type": "json"
+ },
+ success: function(res) {
+
+ if (res.statusCode == 200) {
+ console.log(res.data)
+ that.setData({
+ book: res.data,
+ })
+ //wx.hideNavigationBarLoading()
+ wx.showToast({
+ title: '订单生成成功!',
+ icon: 'success',
+ duration: 2000
+ })
+ }
+ }
+ })
+ }
+ setTimeout(function() {
+ //要延时执行的代码
+ wx.navigateTo({
+ url: '/pages/order/order?typeId=0'
+ })
+ }, 3000)
+
+ } else {
+ wx.showToast({
+ title: '没有选择商品',
+ icon: 'success',
+ duration: 2000
+ })
+ }
}
})
diff --git a/江可飞/小程序开发/pages/gouwu/gouwu.json b/江可飞/小程序开发/pages/gouwu/gouwu.json
index 8835af0..15a72ea 100644
--- a/江可飞/小程序开发/pages/gouwu/gouwu.json
+++ b/江可飞/小程序开发/pages/gouwu/gouwu.json
@@ -1,3 +1,3 @@
{
- "usingComponents": {}
+ "navigationBarTitleText": "购物车"
}
\ No newline at end of file
diff --git a/江可飞/小程序开发/pages/gouwu/gouwu.wxml b/江可飞/小程序开发/pages/gouwu/gouwu.wxml
index 577eab9..b1be35a 100644
--- a/江可飞/小程序开发/pages/gouwu/gouwu.wxml
+++ b/江可飞/小程序开发/pages/gouwu/gouwu.wxml
@@ -49,7 +49,7 @@
-
+
@@ -65,7 +65,7 @@
-
+
{{book.BookName}}
diff --git a/江可飞/小程序开发/pages/order/order.js b/江可飞/小程序开发/pages/order/order.js
index ef030ac..ea2a790 100644
--- a/江可飞/小程序开发/pages/order/order.js
+++ b/江可飞/小程序开发/pages/order/order.js
@@ -21,6 +21,7 @@ Page({
'deliverList': [], //待发货
'checkList':[],
+<<<<<<< HEAD
'unpaidLists': [ //待付款
>>>>>>> f23362a433f70f1876587a01c643e157b7e8b3ae
{
@@ -85,16 +86,78 @@ Page({
'count': 5
}
],
+=======
+ // 'unpaidLists': [ //待付款
+ // {
+ // 'cover': '../index/image/suanfa.jpg',
+ // 'isbn': '9787535482051',
+ // 'desc': '计算机算法设计',
+ // 'price': 20,
+ // 'count': 2
+ // },
+ // {
+ // 'cover': '../index/image/jichu.jpg',
+ // 'isbn': '9787540455958',
+ // 'desc': '计算机基础',
+ // 'price': 30,
+ // 'count': 1
+ // },
+ // {
+ // 'cover': '../index/image/rjgcdl.jpg',
+ // 'isbn': '9787539982830',
+ // 'desc': '软件工程导论',
+ // 'price': 25,
+ // 'count': 5
+ // }
+ // ],
+ // 'deliverLists': [ //待发货
+ // {
+ // 'cover': '../index/image/suanfa.jpg',
+ // 'isbn': '9787535482051',
+ // 'desc': '计算机算法设计',
+ // 'count': 2
+ // },
+ // {
+ // 'cover': '../index/image/jichu.jpg',
+ // 'isbn': '9787540455958',
+ // 'desc': '计算机基础',
+ // 'count': 1
+ // },
+ // {
+ // 'cover': '../index/image/rjgcdl.jpg',
+ // 'isbn': '9787539982830',
+ // 'desc': '软件工程导论',
+ // 'count': 5
+ // }
+ // ],
+ // 'dueinLists': [ //待收货
+ // {
+ // 'cover': '../index/image/suanfa.jpg',
+ // 'isbn': '9787535482051',
+ // 'desc': '计算机算法设计',
+ // 'count': 2
+ // },
+ // {
+ // 'cover': '../index/image/jichu.jpg',
+ // 'isbn': '9787540455958',
+ // 'desc': '计算机基础',
+ // 'count': 1
+ // },
+ // {
+ // 'cover': '../index/image/rjgcdl.jpg',
+ // 'isbn': '9787539982830',
+ // 'desc': '软件工程导论',
+ // 'count': 5
+ // }
+ // ],
+>>>>>>> 1b33c170e75d0094eab32be499d7f94124a3b4ef
},
onLoad: function(options) {
var that = this
- if (options.checkLists != null) {
- that.data.ccheckList = JSON.parse(options.checkLists);
- //console.log(checkList[0].BookName)
- } else {
+ //获取待付款订单信息
wx.request({
- url: "http://45.76.158.31:8080/web/GetFrontInfo.do",
+ url: "http://45.76.158.31:8080/web/CheckOrders.do?UserID=1&status=1",
header: {
"content-type": "json"
},
@@ -102,14 +165,14 @@ Page({
if (res.statusCode == 200) {
console.log(res.data)
that.setData({
- checkList :res.data
+ unpaidList :res.data
})
//wx.hideNavigationBarLoading()
}
}
})
- }
+ //获取待收货订单信息
wx.request({
url: "http://45.76.158.31:8080/web/GetFrontInfo.do",
header: {
@@ -126,6 +189,7 @@ Page({
}
})
+ //获取待发货信息
wx.request({
url: "http://45.76.158.31:8080/web/GetFrontInfo.do",
header: {
@@ -142,37 +206,121 @@ Page({
}
})
-
that.setData({
currentTap: options.typeId,
- unpaidList: that.data.checkList
- })
- var unpaidList = that.data.unpaidList;
- var totalCount = 0;
- var totalPrice = 0;
- for (var i = 0; i < that.data.unpaidList.l; i++) {
- var book = that.data.unpaidList[i];
- totalCount += book.Count;
- totalPrice += book.Count * book.Price;
- }
- totalPrice = totalPrice.toFixed(2);
- that.setData({
- 'totalCount': totalCount,
- 'totalPrice': totalPrice
+ // unpaidList: that.data.checkList
})
+ // var unpaidList = that.data.unpaidList;
+ // var totalCount = 0;
+ // var totalPrice = 0;
+ // for (var i = 0; i < that.data.unpaidList.length; i++) {
+ // var book = that.data.unpaidList[i];
+ // totalCount += book.Count*1;
+ // totalPrice += book.Count * book.Price;
+ // }
+ // totalPrice = totalPrice.toFixed(2);
+ // that.setData({
+ // 'totalCount': totalCount,
+ // 'totalPrice': totalPrice
+ // })
},
deleteList: function(e) {
+ var that = this
+ var index= e.currentTarget.dataset.index
this.setData({
'unpaidList': null
});
+
+ //删除订单
+ wx.request({
+ url: "http://45.76.158.31:8080/web/CheckOrders.do?UserID=1&OderId="+that.unpaidList[i].OrderID,
+ header: {
+ "content-type": "json"
+ },
+ success: function (res) {
+ if (res.statusCode == 200) {
+ console.log(res.data)
+ that.setData({
+ checkList: res.data
+ })
+ //wx.hideNavigationBarLoading()
+ }
+ }
+ })
+
},
order_status: function(e) {
+ var that = this
var current = e.currentTarget.dataset.current
+
+ if(current==1){
+ wx.request({
+ url: "http://45.76.158.31:8080/web/CheckOrders.do?UserID=1&status=1",
+ header: {
+ "content-type": "json"
+ },
+ success: function (res) {
+ if (res.statusCode == 200) {
+ console.log(res.data)
+ that.setData({
+ checkList: res.data
+ })
+ //wx.hideNavigationBarLoading()
+ }
+ }
+ })
+ }else if(current==2){
+ //获取待收货订单信息
+ wx.request({
+ url: "http://45.76.158.31:8080/web/GetFrontInfo.do",
+ header: {
+ "content-type": "json"
+ },
+ success: function (res) {
+ if (res.statusCode == 200) {
+ console.log(res.data)
+ that.setData({
+ dueinList: res.data
+ })
+ //wx.hideNavigationBarLoading()
+ }
+ }
+ })
+ }else if(current==3){
+ //获取待发货信息
+ wx.request({
+ url: "http://45.76.158.31:8080/web/GetFrontInfo.do",
+ header: {
+ "content-type": "json"
+ },
+ success: function (res) {
+ if (res.statusCode == 200) {
+ console.log(res.data)
+ that.setData({
+ deliverList: res.data
+ })
+ //wx.hideNavigationBarLoading()
+ }
+ }
+ })
+ }
+
this.setData({
currentTap: current
})
},
+ toPay: function () {
+ wx.showToast({
+ title: '付款成功!',
+ icon: 'success',
+ duration: 2000
+ })
+ this.deleteList()
+
+
+ }
+
})
\ No newline at end of file
diff --git a/江可飞/小程序开发/pages/order/order.wxml b/江可飞/小程序开发/pages/order/order.wxml
index d081d25..da882e3 100644
--- a/江可飞/小程序开发/pages/order/order.wxml
+++ b/江可飞/小程序开发/pages/order/order.wxml
@@ -48,7 +48,7 @@
删除订单
- 去付款
+ 去付款
diff --git a/江可飞/小程序开发/pages/shouye/shouye.js b/江可飞/小程序开发/pages/shouye/shouye.js
index 3853041..8437dc3 100644
--- a/江可飞/小程序开发/pages/shouye/shouye.js
+++ b/江可飞/小程序开发/pages/shouye/shouye.js
@@ -33,7 +33,7 @@ Page({
console.log("in formSubmit: "+e.detail.value)
var thats = this
-
+ var name = e.detail.value
thats.setData({
search_txt: e.detail.value
@@ -41,13 +41,14 @@ Page({
})
wx.request({
- url: "http://45.76.158.31:8080/web/GetFrontInfo.do?bookname="+e.detail.value+"&fuzzy=true",
+ url: "http://45.76.158.31:8080/web//BookInfo.do?bookname="+name+"&fuzzy=true",
header: {
"content-type": "json"
},
success: function (res) {
- console.log(res.data)
+
if (res.statusCode == 200) {
+ console.log(res.data)
thats.setData({
book: res.data,
})
@@ -57,6 +58,15 @@ Page({
})
},
+ toDetail: function(e){
+ var id = e.target.dataset.id
+
+ wx.switchTab({
+ url: "/pages/detail/detail?id="+id
+ })
+
+ },
+
onLoad: function(options) {
var thats = this
wx.request({
diff --git a/江可飞/小程序开发/pages/wode/wode.js b/江可飞/小程序开发/pages/wode/wode.js
index 4445557..3efaff0 100644
--- a/江可飞/小程序开发/pages/wode/wode.js
+++ b/江可飞/小程序开发/pages/wode/wode.js
@@ -34,7 +34,7 @@ Page({
})
},
onLoad: function() {
-
+ console.log("wode is onload")
},
address: function() {
wx.navigateTo({
diff --git a/江可飞/小程序开发/pages/wode/wode.json b/江可飞/小程序开发/pages/wode/wode.json
index 8835af0..1da73fa 100644
--- a/江可飞/小程序开发/pages/wode/wode.json
+++ b/江可飞/小程序开发/pages/wode/wode.json
@@ -1,3 +1,3 @@
{
- "usingComponents": {}
+ "navigationBarTitleText": "我的"
}
\ No newline at end of file
diff --git a/江可飞/小程序开发/project.config.json b/江可飞/小程序开发/project.config.json
index e4dca5b..af52510 100644
--- a/江可飞/小程序开发/project.config.json
+++ b/江可飞/小程序开发/project.config.json
@@ -13,8 +13,13 @@
},
"compileType": "miniprogram",
"libVersion": "2.4.4",
+<<<<<<< HEAD
"appid": "wx18f06ad86d422b11",
"projectname": "%E5%B0%8F%E7%A8%8B%E5%BA%8F",
+=======
+ "appid": "wxdc9f23490d56599c",
+ "projectname": "%E5%B0%8F%E7%A8%8B%E5%BA%8F%E5%BC%80%E5%8F%91%E6%B5%8B%E8%AF%95111",
+>>>>>>> 1b33c170e75d0094eab32be499d7f94124a3b4ef
"debugOptions": {
"hidedInDevtools": []
},