|
@@ -27,7 +27,7 @@
|
|
|
|
|
|
<view
|
|
|
:style='cardHolderList.length>0?"padding:20rpx 20rpx 200rpx 20rpx;":"padding:20rpx 20rpx 20rpx 20rpx;"'
|
|
|
- class="content2">
|
|
|
+ class="content2" v-if="cardHolderList.length>0">
|
|
|
<view class="all-type flex" @click="selectType">
|
|
|
<text style="margin-right: 10rpx;">{{typeName?typeName:'全部分类'}}</text>
|
|
|
<uni-icons type="bottom" size="18" color="#fff"></uni-icons>
|
|
@@ -428,26 +428,9 @@
|
|
|
|
|
|
},
|
|
|
onShow:function(){
|
|
|
- this.$request.baseRequest('admin.unimall.cardNewsInfo', 'list', {
|
|
|
- receiveId: uni.getStorageSync("userInfo").id,
|
|
|
- }, failres => {
|
|
|
- console.log('res+++++', failres.errmsg)
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'error',
|
|
|
- message: failres.errmsg,
|
|
|
- })
|
|
|
- }).then(res => {
|
|
|
- this.noticeList = res.data.items
|
|
|
- if (this.noticeList.length > 0) {
|
|
|
- var data = this.noticeList.filter((item) => {
|
|
|
- return item.newsFlag == 0
|
|
|
- })
|
|
|
- this.unread = data ? data.length : 0
|
|
|
- }
|
|
|
- console.log(this.unread)
|
|
|
- })
|
|
|
+ let _isLoad = uni.getStorageSync("scanAddCardToIndex")
|
|
|
this.searchVal = uni.getStorageSync("search_val") ? uni.getStorageSync("search_val") : ''
|
|
|
- if(this.searchVal) this.mescroll.resetUpScroll();
|
|
|
+ if(this.searchVal||_isLoad) this.mescroll.resetUpScroll();
|
|
|
},
|
|
|
onLoad: function(options) {
|
|
|
that = this
|
|
@@ -455,7 +438,25 @@
|
|
|
if (uni.getStorageSync("userInfo").phone) {
|
|
|
this.userInfo = uni.getStorageSync("userInfo")
|
|
|
this.$nextTick(function() {
|
|
|
- this.mescroll.resetUpScroll()
|
|
|
+ that.mescroll.resetUpScroll()
|
|
|
+ that.$request.baseRequest('admin.unimall.cardNewsInfo', 'list', {
|
|
|
+ receiveId: uni.getStorageSync("userInfo").id,
|
|
|
+ }, failres => {
|
|
|
+ console.log('res+++++', failres.errmsg)
|
|
|
+ that.$refs.uToast.show({
|
|
|
+ type: 'error',
|
|
|
+ message: failres.errmsg,
|
|
|
+ })
|
|
|
+ }).then(res => {
|
|
|
+ that.noticeList = res.data.items
|
|
|
+ if (that.noticeList.length > 0) {
|
|
|
+ var data = that.noticeList.filter((item) => {
|
|
|
+ return item.newsFlag == 0
|
|
|
+ })
|
|
|
+ that.unread = data ? data.length : 0
|
|
|
+ }
|
|
|
+ console.log(that.unread)
|
|
|
+ })
|
|
|
wx.showShareMenu({
|
|
|
withShareTicket: true,
|
|
|
menus: ["shareAppMessage", "shareTimeline"]
|
|
@@ -1144,26 +1145,8 @@
|
|
|
|
|
|
console.log(this.typeColumns)
|
|
|
})
|
|
|
-
|
|
|
- // await this.$request.baseRequest('admin.unimall.cardNewsInfo', 'list', {
|
|
|
- // receiveId: uni.getStorageSync("userInfo").id,
|
|
|
- // }, failres => {
|
|
|
- // console.log('res+++++', failres.errmsg)
|
|
|
- // uni.showToast({
|
|
|
- // icon:"none",
|
|
|
- // title: failres.errmsg,
|
|
|
- // duration: 3000
|
|
|
- // });
|
|
|
- // }).then(res => {
|
|
|
- // this.noticeList = res.data.items
|
|
|
- // if (this.noticeList.length > 0) {
|
|
|
- // var data = this.noticeList.filter((item) => {
|
|
|
- // return item.newsFlag == 0
|
|
|
- // })
|
|
|
- // this.unread = data ? data.length : 0
|
|
|
- // }
|
|
|
- // console.log(this.unread)
|
|
|
- // })
|
|
|
+ //清楚扫码添加跳页刷新数据状态开关
|
|
|
+ uni.setStorageSync("scanAddCardToIndex",0)
|
|
|
}
|
|
|
|
|
|
}
|