更新页面

master
Eridani11579 7 years ago
parent 1b33c170e7
commit 07cc8819d2

@ -4,7 +4,8 @@ App({
globalData: { globalData: {
UserID:null, UserID:null,
CodeID:null CodeID:null,
url:"http://45.76.158.31:8080/web"
}, },
onLaunch: function () { onLaunch: function () {
@ -19,18 +20,18 @@ App({
success: res => { success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId // 发送 res.code 到后台换取 openId, sessionKey, unionId
console.log(res.code) console.log(res.code)
wx.request({ // wx.request({
url: 'https://hunjianghu.xuanjis.com/web/Yanzheng', // url: 'https://hunjianghu.xuanjis.com/web/Yanzheng',
data: { // data: {
"code": res.code // "code": res.code
}, // },
method: 'GET', // method: 'GET',
success: res1 => { // success: res1 => {
that.globalData.UserID = res1.data.UserID; // that.globalData.UserID = res1.data.UserID;
that.globalData.CodeID = res1.data.CodeID; // that.globalData.CodeID = res1.data.CodeID;
console.log(that.globalData.UserID) // console.log(that.globalData.UserID)
} // }
}) // })
} }

@ -18,7 +18,7 @@ Page({
console.log("in detail") console.log("in detail")
var thats = this var thats = this
wx.request({ wx.request({
url: "http://45.76.158.31:8080/web/BookInfo.do?bookid=" + options.id, url: "https://hunjianghu.xuanjis.com/web/BookInfo.do?bookid=" + options.id,
header: { header: {
"content-type": "json" "content-type": "json"
}, },
@ -51,7 +51,7 @@ Page({
addCar() { addCar() {
var that = this var that = this
wx.request({ wx.request({
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, url: 'https://hunjianghu.xuanjis.com/web/AddCart.do',//?action=Modify&UserID=1&BookID=' + that.data.book[0].BookID + '&Count=' + that.data.book[0].Count,
data: { data: {
'action':'Modify', 'action':'Modify',
'UserID':1, 'UserID':1,
@ -76,10 +76,23 @@ Page({
}, },
// 立即购买 // 立即购买
immeBuy() { immeBuy() {
var that = this
wx.showToast({ wx.showToast({
title: '购买成功', title: '购买成功',
icon: 'success', icon: 'success',
duration: 2000 duration: 2000
}); });
wx.request({
url: 'https://hunjianghu.xuanjis.com/web/Buy.do?UserID=1&BookID=' + that.data.book[0].BookID + '&Count=' + 1 + '&MessageID=' + 1,
header: {
},
success: function (res) {
if (res.statusCode == 200) {
}
}
})
}, },
}) })

@ -4,7 +4,7 @@
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}"> <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}">
<block> <block>
<swiper-item> <swiper-item>
<image src="http://45.76.158.31:8080/web/BookImage/{{books.BookName}}.jpg" data-src="{{item}}" bindtap="previewImage"></image> <image src="https://hunjianghu.xuanjis.com/web/BookImage/{{books.BookName}}.jpg" data-src="{{item}}" bindtap="previewImage"></image>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
@ -30,7 +30,7 @@
<view class="separate"></view> <view class="separate"></view>
<view> <view>
<text>商品详情</text> <text>商品详情</text>
<image class="image_detail" src="http://45.76.158.31:8080/web/BookImage/{{books.BookName}}.jpg" /> <image class="image_detail" src="https://hunjianghu.xuanjis.com/web/BookImage/{{books.BookName}}.jpg" />
</view> </view>
<!--<block wx:for-items="{{detailImg}}" wx:key="name"> <!--<block wx:for-items="{{detailImg}}" wx:key="name">
<image class="image_detail" src="{{item}}" /> <image class="image_detail" src="{{item}}" />

@ -117,7 +117,7 @@ Page({
onLoad: function (){ onLoad: function (){
var thats = this var thats = this
wx.request({ wx.request({
url: "http://45.76.158.31:8080/web/Classify.do?booktype=" + 1, url: "https://hunjianghu.xuanjis.com/web/Classify.do?booktype=" + 1,
header: { header: {
"content-type": "json" "content-type": "json"
}, },
@ -141,7 +141,7 @@ Page({
console.log(id) console.log(id)
var thats = this var thats = this
wx.request({ wx.request({
url: "http://45.76.158.31:8080/web/Classify.do?booktype="+id, url: "https://hunjianghu.xuanjis.com/web/Classify.do?booktype="+id,
header: { header: {
"content-type": "json" "content-type": "json"
}, },

@ -17,7 +17,7 @@
<view class="nav_right_items"> <view class="nav_right_items">
<!--界面跳转 --> <!--界面跳转 -->
<navigator url="/pages/detail/detail?id={{books.BookID}}"> <navigator url="/pages/detail/detail?id={{books.BookID}}">
<image src="http://45.76.158.31:8080/web/BookImage/{{books.BookName}}.jpg"></image> <image src="https://hunjianghu.xuanjis.com/web/BookImage/{{books.BookName}}.jpg"></image>
<text>{{books.BookName}}</text> <text>{{books.BookName}}</text>
</navigator> </navigator>
</view> </view>

@ -65,14 +65,13 @@ Page({
let bookList = this.data.bookList; let bookList = this.data.bookList;
wx.request({ wx.request({
url: "http://45.76.158.31:8080/web/AddCart.do?action=Delete&BookID=" + that.data.bookList[index].BookID + "&UserID=1", url: "https://hunjianghu.xuanjis.com/web/AddCart.do?action=Delete&BookID=" + that.data.bookList[index].BookID + "&UserID=1",
header: { header: {
"content-type": "json" "content-type": "json"
}, },
success: function(res) { success: function(res) {
if (res.statusCode == 200) { if (res.statusCode == 200) {
console.log(res.data)
that.setData({ that.setData({
book: res.data, book: res.data,
}) })
@ -82,7 +81,6 @@ Page({
}) })
bookList.splice(index, 1); bookList.splice(index, 1);
console.log(index)
this.setData({ this.setData({
bookList: bookList bookList: bookList
}); });
@ -134,14 +132,13 @@ Page({
this.calculateTotal(); this.calculateTotal();
wx.request({ wx.request({
url: "http://45.76.158.31:8080/web/AddCart.do?action=Modify&BookID=" + bookList[index].BookID + "&UserID=1&Count=" + bookList[index].Count, url: "https://hunjianghu.xuanjis.com/web/AddCart.do?action=Modify&BookID=" + bookList[index].BookID + "&UserID=1&Count=" + bookList[index].Count,
header: { header: {
"content-type": "json" "content-type": "json"
}, },
success: function(res) { success: function(res) {
if (res.statusCode == 200) { if (res.statusCode == 200) {
console.log(res.data)
that.setData({ that.setData({
book: res.data, book: res.data,
}) })
@ -169,14 +166,13 @@ Page({
this.calculateTotal(); this.calculateTotal();
wx.request({ wx.request({
url: "http://45.76.158.31:8080/web/AddCart.do?action=Modify&BookID=" + bookList[index].BookID + "&UserID=1&Count=" + bookList[index].Count, url: "https://hunjianghu.xuanjis.com/web/AddCart.do?action=Modify&BookID=" + bookList[index].BookID + "&UserID=1&Count=" + bookList[index].Count,
header: { header: {
"content-type": "json" "content-type": "json"
}, },
success: function(res) { success: function(res) {
if (res.statusCode == 200) { if (res.statusCode == 200) {
console.log(res.data)
that.setData({ that.setData({
book: res.data, book: res.data,
}) })
@ -190,7 +186,7 @@ Page({
* 用户选择购物车商品 * 用户选择购物车商品
*/ */
checkboxChange: function(e) { checkboxChange: function(e) {
console.log('checkbox发生change事件携带value值为', e.detail.value); //console.log('checkbox发生change事件携带value值为', e.detail.value);
var checkboxItems = this.data.bookList; var checkboxItems = this.data.bookList;
var values = e.detail.value; var values = e.detail.value;
for (var i = 0; i < checkboxItems.length; ++i) { for (var i = 0; i < checkboxItems.length; ++i) {
@ -241,7 +237,7 @@ Page({
todetail: function(e) { todetail: function(e) {
var id = e.target.dataset.id var id = e.target.dataset.id
console.log(id) //console.log(id)
wx.navigateTo({ wx.navigateTo({
url: "/pages/detail/detail?id=" + id url: "/pages/detail/detail?id=" + id
}) })
@ -267,7 +263,7 @@ Page({
onShow: function(options) { onShow: function(options) {
var that = this var that = this
wx.request({ wx.request({
url: "http://45.76.158.31:8080/web/AddCart.do?action=getinfo&UserID=1", url: "https://hunjianghu.xuanjis.com/web/AddCart.do?action=getinfo&UserID=1",
header: { header: {
"content-type": "json" "content-type": "json"
}, },
@ -275,15 +271,21 @@ Page({
for (var i = 0; i < res.data.length; i++) { for (var i = 0; i < res.data.length; i++) {
res.data[i].checked = false; res.data[i].checked = false;
} }
console.log(res.data)
if (res.statusCode == 200) { if (res.statusCode == 200) {
that.setData({ that.setData({
bookList: res.data, bookList: res.data,
iscart: false
}) })
if (res.data.length == 0) {
that.setData({
iscart: true
})
}
//wx.hideNavigationBarLoading() //wx.hideNavigationBarLoading()
} }
} }
}) })
}, },
/** /**
@ -327,33 +329,26 @@ Page({
newAddress: function() { newAddress: function() {
var that = this var that = this
var checkList = []; var checkList = [];
if (!this.data.iscart) { // var flag = false
var bookList = this.data.bookList
for (var i = 0; i < bookList.length; i++) {
if (bookList[i].checked) {
checkList.push(this.data.bookList[i])
}
}
}
// var checkLists = JSON.stringify(checkList)
// console.log(checkLists)
if (this.data.totalCount > 0) { if (this.data.totalCount > 0) {
if (!this.iscart) { //购物车不空
//向服务器传用户选中购买的东西生成订单 var bookLists = this.data.bookList
for (var i = 0; i < checkList.length; i++) { for (var i = 0; i < bookLists.length; i++) {
if (bookLists[i].checked) {
var bookid = bookLists[i].BookID
var count = bookLists[i].Count
wx.request({ wx.request({
url: "http://45.76.158.31:8080/web/Buy.do?UserID=1&BookID="+checkList[i].BookID+"&Count="+checkList[i].Count, url: 'https://hunjianghu.xuanjis.com/web/Buy.do?UserID=1&BookID=' + bookid + '&Count=' + count + '&MessageID=' + 1,
header: { header: {
"content-type": "json"
}, },
success: function(res) { success: function(res) {
if (res.statusCode == 200) { if (res.statusCode == 200) {
console.log(res.data) // that.setData({
that.setData({ // // book: res.data,
book: res.data, // flag :true
}) // })
//wx.hideNavigationBarLoading() //wx.hideNavigationBarLoading()
wx.showToast({ wx.showToast({
title: '订单生成成功!', title: '订单生成成功!',
@ -363,14 +358,43 @@ Page({
} }
} }
}) })
wx.request({
url: "https://hunjianghu.xuanjis.com/web/AddCart.do?action=Delete&BookID=" + bookid + "&UserID=1",
header: {
"content-type": "json"
},
success: function (res) {
if (res.statusCode == 200) {
// that.setData({
// book: res.data,
// })
//wx.hideNavigationBarLoading()
}
}
})
}
} }
}
// if (flag) {
setTimeout(function() { setTimeout(function() {
//要延时执行的代码 //要延时执行的代码
wx.navigateTo({ wx.navigateTo({
url: '/pages/order/order?typeId=0' url: '/pages/order/order?typeId=0'
}) })
}, 3000) }, 3000)
// } else {
// wx.showToast({
// title: '订单创建失败',
// icon: 'success',
// duration: 2000
// })
// }
} else { } else {
wx.showToast({ wx.showToast({
title: '没有选择商品', title: '没有选择商品',

@ -25,7 +25,7 @@
</label> </label>
</view> </view>
<view class='good_img'> <view class='good_img'>
<image class='cover' src='http://45.76.158.31:8080/web/BookImage/{{book.BookName}}.jpg' data-id='{{book.BookID}}' bindtap='todetail'></image> <image class='cover' src='https://hunjianghu.xuanjis.com/web/BookImage/{{book.BookName}}.jpg' data-id='{{book.BookID}}' bindtap='todetail'></image>
</view> </view>
<view class='content'> <view class='content'>
<view class='titles'>{{book.BookName}}</view> <view class='titles'>{{book.BookName}}</view>

@ -86,13 +86,13 @@ Page({
var that = this var that = this
//获取待付款订单信息 //获取待付款订单信息
wx.request({ wx.request({
url: "http://45.76.158.31:8080/web/CheckOrders.do?UserID=1&status=1", url: "https://hunjianghu.xuanjis.com/web/CheckOrders.do?UserID=1&status=1",
header: { header: {
"content-type": "json" "content-type": "json"
}, },
success: function(res) { success: function(res) {
if (res.statusCode == 200) {
console.log(res.data) console.log(res.data)
if (res.statusCode == 200) {
that.setData({ that.setData({
unpaidList: res.data unpaidList: res.data
}) })
@ -103,7 +103,7 @@ Page({
//获取待收货订单信息 //获取待收货订单信息
wx.request({ wx.request({
url: "http://45.76.158.31:8080/web/GetFrontInfo.do", url: "https://hunjianghu.xuanjis.com/web/CheckOrders.do?UserID=1&status=3",
header: { header: {
"content-type": "json" "content-type": "json"
}, },
@ -120,7 +120,7 @@ Page({
//获取待发货信息 //获取待发货信息
wx.request({ wx.request({
url: "http://45.76.158.31:8080/web/GetFrontInfo.do", url: "https://hunjianghu.xuanjis.com/web/CheckOrders.do?UserID=1&status=2",
header: { header: {
"content-type": "json" "content-type": "json"
}, },
@ -154,62 +154,63 @@ Page({
// }) // })
}, },
deleteList: function(e) { // deleteList: function(e) {
var that = this // var that = this
var index= e.currentTarget.dataset.index // var index= e.currentTarget.dataset.index
this.setData({ // this.setData({
'unpaidList': null // 'unpaidList': null
}); // });
//删除订单 // //删除订单
wx.request({ // wx.request({
url: "http://45.76.158.31:8080/web/CheckOrders.do?UserID=1&OderId="+that.unpaidList[i].OrderID, // url: "https://hunjianghu.xuanjis.com/web/CheckOrders.do?UserID=1&OderId="+that.unpaidList[i].OrderID,
header: { // header: {
"content-type": "json" // "content-type": "json"
}, // },
success: function (res) { // success: function (res) {
if (res.statusCode == 200) { // if (res.statusCode == 200) {
console.log(res.data) // console.log(res.data)
that.setData({ // that.setData({
checkList: res.data // checkList: res.data
}) // })
//wx.hideNavigationBarLoading() // //wx.hideNavigationBarLoading()
} // }
} // }
}) // })
}, // },
order_status: function(e) { order_status: function(e) {
var that = this var that = this
var current = e.currentTarget.dataset.current var current = e.currentTarget.dataset.current
console.log("current=")
if(current==1){ console.log(current)
if (current == 0) {
wx.request({ wx.request({
url: "http://45.76.158.31:8080/web/CheckOrders.do?UserID=1&status=1", url: "https://hunjianghu.xuanjis.com/web/CheckOrders.do?UserID=1&status=1",
header: { header: {
"content-type": "json" "content-type": "json"
}, },
success: function(res) { success: function(res) {
if (res.statusCode == 200) { if (res.statusCode == 200) {
console.log(res.data) // console.log(res.data)
that.setData({ that.setData({
checkList: res.data unpaidList: res.data
}) })
//wx.hideNavigationBarLoading() //wx.hideNavigationBarLoading()
} }
} }
}) })
}else if(current==2){ } else if (current == 1) {
//获取待收货订单信息 //获取待收货订单信息
wx.request({ wx.request({
url: "http://45.76.158.31:8080/web/GetFrontInfo.do", url: "https://hunjianghu.xuanjis.com/web/CheckOrders.do?UserID=1&status=3",
header: { header: {
"content-type": "json" "content-type": "json"
}, },
success: function(res) { success: function(res) {
if (res.statusCode == 200) { if (res.statusCode == 200) {
console.log(res.data) // console.log(res.data)
that.setData({ that.setData({
dueinList: res.data dueinList: res.data
}) })
@ -217,20 +218,21 @@ Page({
} }
} }
}) })
}else if(current==3){ } else if (current == 2) {
//获取待发货信息 //获取待发货信息
wx.request({ wx.request({
url: "http://45.76.158.31:8080/web/GetFrontInfo.do", url: "https://hunjianghu.xuanjis.com/web/CheckOrders.do?UserID=1&status=2",
header: { header: {
"content-type": "json" "content-type": "json"
}, },
success: function(res) { success: function(res) {
if (res.statusCode == 200) { if (res.statusCode == 200) {
console.log(res.data) // console.log(res.data)
that.setData({ that.setData({
deliverList: res.data deliverList: res.data
}) })
//wx.hideNavigationBarLoading() console.log(that.data.deliverList)
wx.hideNavigationBarLoading()
} }
} }
}) })
@ -241,13 +243,47 @@ Page({
}) })
}, },
toPay: function () { toPay: function(e) {
var that = this
var id = e.currentTarget.dataset.id
wx.showToast({ wx.showToast({
title: '付款成功!', title: '付款成功!',
icon: 'success', icon: 'success',
duration: 2000 duration: 2000
}) })
this.deleteList()
wx.request({
url: "https://hunjianghu.xuanjis.com/web/ModifyStatus.do?OrderID=" + id + "&status=2",
header: {
"content-type": "json"
},
success: function(res) {
if (res.statusCode == 200) {
// console.log(res.data)
// that.setData({
// deliverList: res.data
// })
//wx.hideNavigationBarLoading()
}
}
})
wx.request({
url: "https://hunjianghu.xuanjis.com/web/CheckOrders.do?UserID=1&status=1",
header: {
"content-type": "json"
},
success: function (res) {
if (res.statusCode == 200) {
// console.log(res.data)
that.setData({
unpaidList: res.data
})
//wx.hideNavigationBarLoading()
}
}
})
} }

@ -25,13 +25,13 @@
<view class="same_stroe"> <view class="same_stroe">
<view class="flexRowBetween orderlistShow"> <view class="flexRowBetween orderlistShow">
<view class="order_left"> <view class="order_left">
<image src="http://45.76.158.31:8080/web/BookImage/{{book.BookName}}.jpg"></image> <image src="https://hunjianghu.xuanjis.com/web/BookImage/{{book.BookName}}.jpg"></image>
</view> </view>
<view class="order_name"> <view class="order_name">
<view class="text1">{{book.BookName}}</view> <view class="text1">{{book.BookName}}</view>
<view class="orders flexRowBetween"> <view class="orders flexRowBetween">
<text class="order_type">数量:{{book.Count}}</text> <text class="order_type">数量:{{book.Count}}</text>
<text class="order_price">{{book.Price*book.Count}}</text> <!--<text class="order_price">{{book.Price*book.Count}}</text>-->
</view> </view>
</view> </view>
</view> </view>
@ -41,14 +41,14 @@
<view class="flexRowBetween"> <view class="flexRowBetween">
<view class="total_money"> <view class="total_money">
<text>合计:</text> <text>合计:</text>
<text class="text2">¥{{totalPrice}}</text> <text class="text2">¥{{book.Price*book.Count}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="handle_order"> <view class="handle_order">
<view class="flexRowBetween"> <view class="flexRowBetween">
<view class="handle_orders delete_order" bindtap='deleteList'>删除订单</view> <!--<view class="handle_orders delete_order" bindtap='deleteList'>删除订单</view>-->
<view class="handle_orders comment_order" bindtap='toPay' data-index="{{index}}">去付款</view> <view class="handle_orders comment_order" bindtap='toPay' data-index="{{index}}" data-id="{{book.OrderID}}">去付款</view>
</view> </view>
</view> </view>
</view> </view>
@ -68,7 +68,7 @@
<view class="same_stroe"> <view class="same_stroe">
<view class="flexRowBetween orderlistShow"> <view class="flexRowBetween orderlistShow">
<view class="order_left"> <view class="order_left">
<image src="http://45.76.158.31:8080/web/BookImage/{{book.BookName}}.jpg"></image> <image src="https://hunjianghu.xuanjis.com/web/BookImage/{{book.BookName}}.jpg"></image>
</view> </view>
<view class="order_name"> <view class="order_name">
<view class="text1">{{book.BookName}}</view> <view class="text1">{{book.BookName}}</view>
@ -83,10 +83,11 @@
<view class="flexRowBetween"> <view class="flexRowBetween">
<view class="total_money"> <view class="total_money">
<text>收货地址:</text> <text>收货地址:</text>
<text class="text2">{{book.Addresss}}</text> <text class="text2">{{book.Address}}</text>
</view> </view>
</view> </view>
</view> </view>
<!--
<view class="total_order"> <view class="total_order">
<view class="flexRowBetween"> <view class="flexRowBetween">
<view class="total_money"> <view class="total_money">
@ -94,7 +95,8 @@
<text class="text2">{{book.consignee}}</text> <text class="text2">{{book.consignee}}</text>
</view> </view>
</view> </view>
</view> </view>-->
<!--
<view class="total_order"> <view class="total_order">
<view class="flexRowBetween"> <view class="flexRowBetween">
<view class="total_money"> <view class="total_money">
@ -102,7 +104,7 @@
<text class="text2">{{book.phone}}</text> <text class="text2">{{book.phone}}</text>
</view> </view>
</view> </view>
</view> </view>-->
<!-- <!--
<view class="handle_order"> <view class="handle_order">
<view class="flexRowBetween"> <view class="flexRowBetween">
@ -112,8 +114,9 @@
</view>--> </view>-->
</view> </view>
<!--待发货-->
</view> </view>
<view class="order_all {{currentTap ==2?'order_show':''}}" wx:if="{{deliverList!=null}}" wx:for='{{dueinList}}' wx:for-item="book" wx:key="book.BookID"> <view class="order_all {{currentTap ==2?'order_show':''}}" wx:if="{{deliverList!=null}}" wx:for='{{deliverList}}' wx:for-item="book" wx:key="book.BookID">
<view class="order_tlt flexRowBetween"> <view class="order_tlt flexRowBetween">
<view class="tlt_left"> <view class="tlt_left">
<text>付款日期:</text> <text>付款日期:</text>
@ -126,7 +129,7 @@
<view class="same_stroe"> <view class="same_stroe">
<view class="flexRowBetween orderlistShow"> <view class="flexRowBetween orderlistShow">
<view class="order_left"> <view class="order_left">
<image src="http://45.76.158.31:8080/web/BookImage/{{book.BookName}}.jpg"></image> <image src="https://hunjianghu.xuanjis.com/web/BookImage/{{book.BookName}}.jpg"></image>
</view> </view>
<view class="order_name"> <view class="order_name">
<view class="text1">{{book.BookName}}</view> <view class="text1">{{book.BookName}}</view>
@ -145,6 +148,7 @@
</view> </view>
</view> </view>
</view> </view>
<!--
<view class="total_order"> <view class="total_order">
<view class="flexRowBetween"> <view class="flexRowBetween">
<view class="total_money"> <view class="total_money">
@ -152,7 +156,8 @@
<text class="text2">{{book.consignee}}</text> <text class="text2">{{book.consignee}}</text>
</view> </view>
</view> </view>
</view> </view>-->
<!--
<view class="total_order"> <view class="total_order">
<view class="flexRowBetween"> <view class="flexRowBetween">
<view class="total_money"> <view class="total_money">
@ -160,7 +165,7 @@
<text class="text2">{{book.phone}}</text> <text class="text2">{{book.phone}}</text>
</view> </view>
</view> </view>
</view> </view>-->
</view> </view>
</view> </view>
</view> </view>

@ -10,11 +10,7 @@ Page({
onLoad: function () { onLoad: function () {
}, },
userInfo: function () {
wx.navigateTo({
url: '/pages/userInfo/userInfo'
})
},
bindDateChange: function (e) { bindDateChange: function (e) {
this.setData({ this.setData({
date: e.detail.value date: e.detail.value

@ -41,7 +41,8 @@ Page({
}) })
wx.request({ wx.request({
url: "http://45.76.158.31:8080/web//BookInfo.do?bookname="+name+"&fuzzy=true", url: "https://hunjianghu.xuanjis.com/web/BookInfo.do?bookname="+name+"&fuzzy=true",
// url: getApp.globalData.url + "/BookInfo.do?bookname="+name+"&fuzzy=true",
header: { header: {
"content-type": "json" "content-type": "json"
}, },
@ -70,7 +71,8 @@ Page({
onLoad: function(options) { onLoad: function(options) {
var thats = this var thats = this
wx.request({ wx.request({
url: "http://45.76.158.31:8080/web/GetFrontInfo.do", url: "https://hunjianghu.xuanjis.com/web/GetFrontInfo.do",
// url: getApp.globalData.url + "GetFrontInfo.do",
header: { header: {
"content-type": "json" "content-type": "json"
}, },

@ -3,7 +3,7 @@
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}"> <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}">
<block wx:for="{{ppt}}" wx:for-item="ppts"> <block wx:for="{{ppt}}" wx:for-item="ppts">
<swiper-item> <swiper-item>
<image src="http://45.76.158.31:8080/web/BookImage/{{ppts.BookName}}.jpg" class="slide-image" width="355" height="240" /> <image src="https://hunjianghu.xuanjis.com/web/BookImage/{{ppts.BookName}}.jpg" class="slide-image" width="355" height="240" />
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
@ -24,7 +24,7 @@
<view class="weui-panel__bd"> <view class="weui-panel__bd">
<navigator wx:for="{{book}}" wx:for-item="books" url="../detail/detail?id={{books.BookID}}" data-id="{{books.BookID}}" class="weui-media-box weui-media-box_appmsg" hover-class="weui-cell_active"> <navigator wx:for="{{book}}" wx:for-item="books" url="../detail/detail?id={{books.BookID}}" data-id="{{books.BookID}}" class="weui-media-box weui-media-box_appmsg" hover-class="weui-cell_active">
<view class="weui-media-box__hd weui-media-box__hd_in-appmsg" style="width:120px;height:80px;"> <view class="weui-media-box__hd weui-media-box__hd_in-appmsg" style="width:120px;height:80px;">
<image class="weui-media-box__thumb" src="http://45.76.158.31:8080/web/BookImage/{{books.BookName}}.jpg" /> <image class="weui-media-box__thumb" src="https://hunjianghu.xuanjis.com/web/BookImage/{{books.BookName}}.jpg" />
</view> </view>
<view class="weui-media-box__bd weui-media-box__bd_in-appmsg"> <view class="weui-media-box__bd weui-media-box__bd_in-appmsg">
<view class="weui-media-box__title">{{books.BookName}}</view> <view class="weui-media-box__title">{{books.BookName}}</view>

@ -4,7 +4,7 @@
"ignore": [] "ignore": []
}, },
"setting": { "setting": {
"urlCheck": false, "urlCheck": true,
"es6": true, "es6": true,
"postcss": true, "postcss": true,
"minified": true, "minified": true,

Loading…
Cancel
Save