作者 lihongjuan

1

... ... @@ -58,6 +58,7 @@ App({
resolve(res.data)
} else if (res.data.code == '5000') {
wx.hideLoading();
reject(res.data)
wx.removeStorageSync('token');
wx.removeStorageSync('login');
// wx.navigateTo({
... ...
... ... @@ -61,4 +61,9 @@
color:#BDC4CE;
font-size: 24rpx;
text-decoration: line-through
}
\ No newline at end of file
}
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
\ No newline at end of file
... ...
... ... @@ -59,7 +59,8 @@ Page({
if (r.code == 200) {
app.globalData.login_new=r.msg.login_new;
console.log( app.globalData.login_new)
app.globalData.status = r.msg.status;
console.log(app.globalData.status)
// t.setData({
// obj: r.msg
// })
... ... @@ -602,12 +603,13 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
let that = this;
let token=wx.getStorageSync('token');
console.log('woshitoe',token)
if(token!=""){
this.getInfoFun()
}
// if(token!=""){
// this.getInfoFun()
// }
this.get_banner()
// 获取活动专区
... ... @@ -686,21 +688,7 @@ Page({
}).catch((err) => {})
},
// 获取个人信息
getInfoFun() {
let that= this;
let u = app.interface.readteacher;
app.post(u, {}).then((r) => {
console.log('3489523498',r)
if (r.code == 200) {
app.globalData.login_new=r.msg.login_new;
console.log( app.globalData.login_new)
// t.setData({
// obj: r.msg
// })
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
... ... @@ -753,7 +741,7 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
loadMore(e){
console.log(e)
... ...
... ... @@ -5,7 +5,9 @@ Page({
* 页面的初始数据
*/
data: {
info:[]
info:[],
item:'',
sel:0
},
// 获取页面信息
get_info(order) {
... ... @@ -19,10 +21,28 @@ Page({
this.setData({
info: res.msg.kuaidi
})
this.setData({
item: res.msg.kuaidi[0]
})
console.log(that.data.info)
})
},
selectinfo(e){
let that=this
let index=e.currentTarget.dataset.index;
that.setData({
sel:index
})
this.data.info.forEach(function(value,indexk,array){
if(index==indexk){
that.setData({
item:value
})
}
})
},
/**
* 生命周期函数--监听页面加载
*/
... ...
<!-- 商品 -->
<view class="block">
<view wx:for="{{info}}" wx:key=''>
<view class="show_good">
<view>
<!-- <view class="show_good">
<image src="{{item.kuaidi.product_image}}" mode="aspectFill"/>
<view class="dai" wx:if="{{item.kuaidi.State==0}}">待取件</view>
<view class="dai" wx:if="{{item.kuaidi.State==1}}">已揽收</view>
<view class="dai" wx:if="{{item.kuaidi.State==2}}">在途中</view>
<view class="dai" wx:if="{{item.kuaidi.State==3}}">已签收</view>
<view class="dai" wx:if="{{item.kuaidi.State==4}}">问题件</view>
</view>
</view> -->
<!-- 物流 -->
<view class="logistics">
<view class="info">
<view class="right">
<view class="name">{{item.kuaidi.name}}</view>
<view class="order_num">快递单号:{{item.kuaidi.LogisticCode}}</view>
<view class="info" >
<view class="right" wx:for="{{info}}" wx:key='' bindtap="selectinfo" data-index="{{index}}">
<view class="name {{sel==index?'selactive':''}}">{{item.kuaidi.name}}</view>
<view class="order_num {{sel==index?'selactive':''}}">快递单号:{{item.kuaidi.LogisticCode}}</view>
</view>
</view>
<view class="order_box">
... ...
... ... @@ -41,16 +41,28 @@ page {
display: flex;
align-items: center;
border-bottom: 1px solid #ccc;
overflow-x: scroll
}
.info image {
width: 96rpx;
height: 96rpx;
margin-right: 20rpx;
}
.right{
width:400rpx;
margin-right: 30rpx;
}
.name{
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: rgba(19, 26, 46, 1);
}
.info .right {
width: 360rpx;
/* .info .right {
width: 460rpx;
}
.info .right .name {
... ... @@ -66,8 +78,19 @@ page {
font-weight: 400;
color: rgba(156, 156, 156, 1);
margin-top: 10rpx;
} */
.order_num{
width:400rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 400;
color: rgba(156, 156, 156, 1);
}
.selactive{
color: rgba(61, 154, 248, 1);
}
.order_box {
width: 100%;
padding: 0 32rpx;
... ... @@ -121,8 +144,8 @@ page {
height: 136rpx;
background: rgba(238, 238, 238, 1);
position: absolute;
left: 17rpx;
top: 36rpx;
left: 15rpx;
top: 48rpx;
}
.order_item:last-child .status_img .line{
... ...
... ... @@ -16,6 +16,7 @@
<view class="messtopright">{{item.createtime}}</view>
</view>
<view class="messagename">{{item.content}}</view>
</view>
</view>
... ...
... ... @@ -47,6 +47,7 @@ page {
.messagename {
margin-top: 10rpx;
word-break:break-all
}
.no_login{
font-size: 36rpx;
... ...
... ... @@ -5,4 +5,5 @@
<view class="text">
{{detail.content}}
</view>
</view>
... ...
... ... @@ -28,4 +28,5 @@ page {
color: #939a9e;
font-size: 24rpx;
margin-top: 20rpx;
word-break: break-all;
}
... ...
... ... @@ -55,14 +55,22 @@ Page({
// 获取个人信息
getInfoFun() {
let t = this;
console.log(4848394893)
let u = a.interface.readteacher;
a.post(u, {}).then((r) => {
console.log(r)
console.log('用户信息',r)
if (r.code == 200) {
t.setData({
obj: r.msg
})
}
}).catch((err) => {
if (err.msg =='请重新登录|授权'){
t.setData({
obj: {}
})
}
console.log(err)
})
},
... ...
... ... @@ -67,6 +67,13 @@ Page({
// 立即购买
purchaseNow() {
let that = this;
if (app.globalData.status==0){
wx.showToast({
title: '您已被拉黑',
icon:'none'
})
return false
}
if (that.data.info.sold==0){
wx.showToast({
title: '库存不足,不能下单',
... ...