Commit b8623474 by liuquan

合并分支 'liuquan' 到 'XDJK-master'

Liuquan

查看合并请求 !3
parents 93fdd8c8 52a65b35
...@@ -177,6 +177,36 @@ button::after { ...@@ -177,6 +177,36 @@ button::after {
border-radius: 5rpx; border-radius: 5rpx;
} }
/* loading */ /* loading */
.loading_box {
width: 100%;
text-align: center;
position: relative;
}
.loading1 image {
position: absolute;
top: 18rpx;
left: 50%;
width: 35rpx;
height: 35rpx;
margin-left: -80rpx;
}
.loading1 {
text-align: center;
font-size: 28rpx;
color: #999;
line-height: 70rpx;
margin-left: 70rpx;
}
.loading2 {
text-align: center;
font-size: 28rpx;
color: #999;
line-height: 70rpx;
}
.small{
font-size: 24rpx;
}
.loadingimg { .loadingimg {
width: 100%; width: 100%;
height: 100%; height: 100%;
......
...@@ -15,7 +15,8 @@ Page({ ...@@ -15,7 +15,8 @@ Page({
winH: null, winH: null,
}, },
showview: false, showview: false,
list: [] list: [],
page: 1
}, },
/** /**
...@@ -32,20 +33,34 @@ Page({ ...@@ -32,20 +33,34 @@ Page({
}, },
onShow: function () { onShow: function () {
var that = this var that = this
that.getList(that.data.nav) that.getList(1, that.data.nav)
}, },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function () {
var that = this var that = this
that.data.page = 1;
wx.showNavigationBarLoading() //在标题栏中显示加载 wx.showNavigationBarLoading() //在标题栏中显示加载
setTimeout(function () { setTimeout(function () {
that.getList(that.data.nav) that.getList(1, that.data.nav)
wx.hideNavigationBarLoading() //完成停止加载 wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh() //停止下拉刷新 wx.stopPullDownRefresh() //停止下拉刷新
}, 1500); }, 1500);
}, },
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
var that = this
var page = that.data.page + 1;
that.setData({
scrollFlag: true,
success: false,
page: page
})
that.getList(page, that.data.nav)
},
//删除订单 //删除订单
deleBtn: debouce(function (e) { deleBtn: debouce(function (e) {
var that = this var that = this
...@@ -64,7 +79,7 @@ Page({ ...@@ -64,7 +79,7 @@ Page({
icon: 'success', icon: 'success',
mask: true mask: true
}) })
that.getList(that.data.nav) that.getList(1, that.data.nav)
} }
}).catch((Error) => { }).catch((Error) => {
console.warn('error:', Error); // 获取会话资料失败的相关信息 console.warn('error:', Error); // 获取会话资料失败的相关信息
...@@ -74,18 +89,41 @@ Page({ ...@@ -74,18 +89,41 @@ Page({
}) })
}, 1000, true), }, 1000, true),
//获取列表 //获取列表
getList: function (status) { getList: function (page, status) {
var that = this var that = this
var data = { var data = {
// unionid:'oHhp80RDG97XDPoJR9vjCi3XfzJM', page: page,
// unionid:'oHhp80XTpjf-JKvU94VEztv3aLhc',
unionid: wx.getStorageSync('data').unionid, unionid: wx.getStorageSync('data').unionid,
status: status status: status
}; };
Service.buyDrugList(data).then((res) => { Service.buyDrugList(data).then((res) => {
console.log("getList", res) console.log("res", res)
if (res.code == 1) { var list = that.data.list;
if (page > 1 && res.data.length > 0) {
for (let i = 0; i < res.data.length; i++) {
list.push(res.data[i])
}
that.setData({
success: true
})
} else if (page > 1 && res.data.length == 0) {
that.setData({ that.setData({
list: res.data, scrollFlag: false,
scrollFlag1: true,
})
setTimeout(function () {
that.setData({
success: true
})
}, 2000)
} else {
list = res.data;
}
wx.stopPullDownRefresh()
if (list.length > 0) {
that.setData({
list: list,
showview: true showview: true
}) })
} else { } else {
...@@ -93,9 +131,6 @@ Page({ ...@@ -93,9 +131,6 @@ Page({
list: [], list: [],
showview: true showview: true
}) })
wx.showToast({
title: res.msg,
})
} }
}).catch(function (Error) { }).catch(function (Error) {
console.warn('error:', Error); // 获取会话资料失败的相关信息 console.warn('error:', Error); // 获取会话资料失败的相关信息
...@@ -106,9 +141,10 @@ Page({ ...@@ -106,9 +141,10 @@ Page({
let _this = this let _this = this
_this.setData({ _this.setData({
nav: e.currentTarget.dataset.index, nav: e.currentTarget.dataset.index,
page: 1,
showview: false showview: false
}) })
_this.getList(e.currentTarget.dataset.index) _this.getList(1, e.currentTarget.dataset.index)
}, },
//确认收货 //确认收货
confirmReceipt: debouce(function (e) { confirmReceipt: debouce(function (e) {
...@@ -126,7 +162,7 @@ Page({ ...@@ -126,7 +162,7 @@ Page({
wx.showToast({ wx.showToast({
title: res.msg, title: res.msg,
}) })
that.getList(3) that.getList(1, 3)
}) })
} else if (ress.cancel) { } else if (ress.cancel) {
console.log('用户点击取消') console.log('用户点击取消')
......
...@@ -64,6 +64,12 @@ ...@@ -64,6 +64,12 @@
</view> </view>
</view> </view>
</block> </block>
<view class="loading_box" wx:if='{{!success}}'>
<view class="loading1" wx:if='{{scrollFlag}}'>
<image src='/images/2.gif'></image>正在加载...
</view>
<view class="loading2" wx:if='{{scrollFlag1&&!scrollFlag}}'>没有更多了</view>
</view>
</view> </view>
</block> </block>
<block wx:else> <block wx:else>
......
...@@ -29,9 +29,9 @@ Page({ ...@@ -29,9 +29,9 @@ Page({
data.openid = wx.getStorageSync('data').openid; data.openid = wx.getStorageSync('data').openid;
Service.getInvoiceInfo(data).then((res)=>{ Service.getInvoiceInfo(data).then((res)=>{
if (res.data != null) { if (res.data != null) {
let qy = res.data.qy_type == 0 ? true : false // let qy = res.data.qy_type == 0 ? true : false
that.setData({ that.setData({
qy: qy, // qy: qy,
tickValue: res.data.ghdwmc, tickValue: res.data.ghdwmc,
taxpayerValue: res.data.ghdwsbh, taxpayerValue: res.data.ghdwsbh,
emailValue: res.data.qy_email emailValue: res.data.qy_email
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<view class="box"> <view class="box">
<view class='title'>发票详情</view> <view class='title'>发票详情</view>
<!-- <view class='con'> --> <!-- <view class='con'> -->
<view class='list'> <!-- <view class='list'>
<view>抬头类型</view> <view>抬头类型</view>
<view bindtap='goPer'> <view bindtap='goPer'>
<image src='/images/off.png' style='width:24rpx;height:24rpx;'></image> 企业抬头 <image src='/images/off.png' style='width:24rpx;height:24rpx;'></image> 企业抬头
...@@ -91,10 +91,16 @@ ...@@ -91,10 +91,16 @@
<image src='/images/on2x.png' style='width:24rpx;height:24rpx;'></image> 个人/非企业单位 <image src='/images/on2x.png' style='width:24rpx;height:24rpx;'></image> 个人/非企业单位
</view> </view>
<view class='line'></view> <view class='line'></view>
</view> </view> -->
<!-- </view> --> <!-- </view> -->
<view class='inp'> <view class='inp'>
<view class="partyone"> <view class="partyone">
<view class="title1">抬头类型</view>
<view>个人/非企业单位</view>
</view>
</view>
<view class='inp'>
<view class="partyone">
<view class="title1">发票抬头</view> <view class="title1">发票抬头</view>
<input type='text' placeholder="请输入个人或单位名称" bindinput="partyone" value="{{tickValue}}"></input> <input type='text' placeholder="请输入个人或单位名称" bindinput="partyone" value="{{tickValue}}"></input>
</view> </view>
......
...@@ -19,8 +19,9 @@ function addUserInfo(param) { ...@@ -19,8 +19,9 @@ function addUserInfo(param) {
var addUserInfoUrl = config.url.addUserInfo; var addUserInfoUrl = config.url.addUserInfo;
return wxRequest.getRequest(addUserInfoUrl, param); return wxRequest.getRequest(addUserInfoUrl, param);
}; };
/** 获取Im用户userSig /**
* add By lq DateTime 2020-04-26 * 获取Im用户userSig
* @add By lq DateTime 2020-04-26
* @param {String} user 用户注册IM的id * @param {String} user 用户注册IM的id
*/ */
function getUserSig(user) { function getUserSig(user) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment