|
@@ -312,7 +312,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="auth-btncard">
|
|
<div class="auth-btncard">
|
|
<div class="btn-unok"><u-button :customStyle="customStyleUnOk" @click="showAuthorizePhone=false"> 拒绝</u-button></div>
|
|
<div class="btn-unok"><u-button :customStyle="customStyleUnOk" @click="showAuthorizePhone=false"> 拒绝</u-button></div>
|
|
- <div class="btn-ok"><u-button :customStyle="customStyleOk" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber"> 允许</u-button></div>
|
|
|
|
|
|
+ <div class="btn-ok"><u-button :customStyle="customStyleOk" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber"> 立即登录</u-button></div>
|
|
</div>
|
|
</div>
|
|
</view>
|
|
</view>
|
|
</u-modal>
|
|
</u-modal>
|
|
@@ -362,7 +362,7 @@
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- userInfo: {avatarUrl:'',nickName:''},
|
|
|
|
|
|
+ userInfo: {head:'',nickname:''},
|
|
downOption: {
|
|
downOption: {
|
|
auto: false,
|
|
auto: false,
|
|
},
|
|
},
|
|
@@ -370,6 +370,7 @@
|
|
page: {
|
|
page: {
|
|
size: 10 // 每页数据的数量,默认10
|
|
size: 10 // 每页数据的数量,默认10
|
|
},
|
|
},
|
|
|
|
+ auto: false,
|
|
noMoreSize: 1,
|
|
noMoreSize: 1,
|
|
empty: {
|
|
empty: {
|
|
tip: '暂无相关数据'
|
|
tip: '暂无相关数据'
|
|
@@ -419,9 +420,6 @@
|
|
color:'#157DFB'
|
|
color:'#157DFB'
|
|
},
|
|
},
|
|
};
|
|
};
|
|
- },
|
|
|
|
- onShow() {
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
|
|
|
|
@@ -432,9 +430,10 @@
|
|
this.userInfo = uni.getStorageSync("userInfo")
|
|
this.userInfo = uni.getStorageSync("userInfo")
|
|
this.$nextTick(function() {
|
|
this.$nextTick(function() {
|
|
this.mescroll.resetUpScroll()
|
|
this.mescroll.resetUpScroll()
|
|
- // this.canReset && this.mescroll.resetUpScroll() // 重置列表数据为第一页
|
|
|
|
- // this.canReset && this.mescroll.scrollTo(0, 0) // 重置列表数据为第一页时,建议把滚动条也重置到顶部,避免无法再次翻页的问题
|
|
|
|
- // this.canReset = true // 过滤第一次的onShow事件,避免初始化界面时重复触发upCallback, 无需配置auto:false
|
|
|
|
|
|
+ wx.showShareMenu({
|
|
|
|
+ withShareTicket: true,
|
|
|
|
+ menus: ["shareAppMessage", "shareTimeline"]
|
|
|
|
+ })
|
|
});
|
|
});
|
|
this.searchVal = uni.getStorageSync("search_val") ? uni.getStorageSync("search_val") : ''
|
|
this.searchVal = uni.getStorageSync("search_val") ? uni.getStorageSync("search_val") : ''
|
|
} else {
|
|
} else {
|
|
@@ -450,12 +449,7 @@
|
|
icon: 'none',
|
|
icon: 'none',
|
|
duration: 10000
|
|
duration: 10000
|
|
});
|
|
});
|
|
- } else {
|
|
|
|
- wx.showShareMenu({
|
|
|
|
- withShareTicket: true,
|
|
|
|
- menus: ["shareAppMessage", "shareTimeline"]
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
|
|
},
|
|
},
|
|
onShareAppMessage(res) {
|
|
onShareAppMessage(res) {
|
|
@@ -485,15 +479,17 @@
|
|
userNameInput(e){
|
|
userNameInput(e){
|
|
this.userInfo.nickname = e.detail.value
|
|
this.userInfo.nickname = e.detail.value
|
|
},
|
|
},
|
|
- onChooseAvatar(e) {
|
|
|
|
- console.log(e.detail.avatarUrl)
|
|
|
|
- pathToBase64( e.detail.avatarUrl).then(path => {
|
|
|
|
- this.userInfo.head = path
|
|
|
|
- console.log(path)
|
|
|
|
- }).catch(error => {
|
|
|
|
- console.log(error)
|
|
|
|
|
|
+ async onChooseAvatar(e) {
|
|
|
|
+ this.$set(this.userInfo,"head",await this.toBase64(e.detail.avatarUrl))
|
|
|
|
+ },
|
|
|
|
+ toBase64(url){
|
|
|
|
+ return new Promise(resolve => {
|
|
|
|
+ pathToBase64(url).then(path => {
|
|
|
|
+ resolve(path);
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ console.log(error)
|
|
|
|
+ })
|
|
})
|
|
})
|
|
- // this.userInfo.head = e.detail.avatarUrl;
|
|
|
|
},
|
|
},
|
|
authUser(){
|
|
authUser(){
|
|
if(this.userInfo.nickname==''){
|
|
if(this.userInfo.nickname==''){
|
|
@@ -1055,79 +1051,82 @@
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
var that = this
|
|
var that = this
|
|
- uni.showLoading({
|
|
|
|
- title: '数据加载中'
|
|
|
|
- })
|
|
|
|
- await this.$request.baseRequest('admin.unimall.cardHolderInfo', 'list', {
|
|
|
|
- page: page.num,
|
|
|
|
- limit: page.size,
|
|
|
|
- commonId: uni.getStorageSync("userInfo").id,
|
|
|
|
- searchContent: this.searchVal,
|
|
|
|
- classify:this.typeName
|
|
|
|
- }, failres => {
|
|
|
|
- console.log('res+++++', failres.errmsg)
|
|
|
|
- this.$refs.uToast.show({
|
|
|
|
- type: 'error',
|
|
|
|
- message: failres.errmsg,
|
|
|
|
|
|
+ if(uni.getStorageSync("userInfo").id){
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: '数据加载中'
|
|
})
|
|
})
|
|
- uni.hideLoading()
|
|
|
|
- }).then(res => {
|
|
|
|
- console.log(res)
|
|
|
|
- if (page.num == 1) this.cardHolderList = [];
|
|
|
|
- let curPageLen = res.data.items.length;
|
|
|
|
- let totalPage = res.data.total;
|
|
|
|
- for (var i = 0; i < res.data.items.length; i++) {
|
|
|
|
- res.data.items[i].checked = false
|
|
|
|
- if (res.data.items[i].classify) {
|
|
|
|
- res.data.items[i].classifyName = res.data.items[i].classify[0]
|
|
|
|
|
|
+ await this.$request.baseRequest('admin.unimall.cardHolderInfo', 'list', {
|
|
|
|
+ page: page.num,
|
|
|
|
+ limit: page.size,
|
|
|
|
+ commonId: uni.getStorageSync("userInfo").id,
|
|
|
|
+ searchContent: this.searchVal,
|
|
|
|
+ classify:this.typeName
|
|
|
|
+ }, failres => {
|
|
|
|
+ console.log('res+++++', failres.errmsg)
|
|
|
|
+ this.$refs.uToast.show({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: failres.errmsg,
|
|
|
|
+ })
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ }).then(res => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ if (page.num == 1) this.cardHolderList = [];
|
|
|
|
+ let curPageLen = res.data.items.length;
|
|
|
|
+ let totalPage = res.data.total;
|
|
|
|
+ for (var i = 0; i < res.data.items.length; i++) {
|
|
|
|
+ res.data.items[i].checked = false
|
|
|
|
+ if (res.data.items[i].classify) {
|
|
|
|
+ res.data.items[i].classifyName = res.data.items[i].classify[0]
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
- this.cardHolderList = res.data.items
|
|
|
|
- this.loading = false
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
- that.mescroll.endBySize(curPageLen, totalPage)
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- uni.hideLoading()
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- await this.$request.baseRequest('admin.unimall.cardClassifyInfo', 'list', {
|
|
|
|
- page: 1,
|
|
|
|
- limit: 9999,
|
|
|
|
- commonId: uni.getStorageSync("userInfo").id
|
|
|
|
- }, failres => {
|
|
|
|
- console.log('res+++++', failres.errmsg)
|
|
|
|
- this.$refs.uToast.show({
|
|
|
|
- type: 'error',
|
|
|
|
- message: failres.errmsg,
|
|
|
|
- })
|
|
|
|
- }).then(res => {
|
|
|
|
- res.data.items.unshift({
|
|
|
|
- circleName:'全部分类'
|
|
|
|
|
|
+ this.cardHolderList = res.data.items
|
|
|
|
+ this.loading = false
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ that.mescroll.endBySize(curPageLen, totalPage)
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ uni.hideLoading()
|
|
})
|
|
})
|
|
- this.typeColumns = [res.data.items]
|
|
|
|
|
|
|
|
- console.log(this.typeColumns)
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- await 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,
|
|
|
|
|
|
+ await this.$request.baseRequest('admin.unimall.cardClassifyInfo', 'list', {
|
|
|
|
+ page: 1,
|
|
|
|
+ limit: 9999,
|
|
|
|
+ commonId: uni.getStorageSync("userInfo").id
|
|
|
|
+ }, failres => {
|
|
|
|
+ console.log('res+++++', failres.errmsg)
|
|
|
|
+ this.$refs.uToast.show({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: failres.errmsg,
|
|
|
|
+ })
|
|
|
|
+ }).then(res => {
|
|
|
|
+ res.data.items.unshift({
|
|
|
|
+ circleName:'全部分类'
|
|
|
|
+ })
|
|
|
|
+ this.typeColumns = [res.data.items]
|
|
|
|
+
|
|
|
|
+ console.log(this.typeColumns)
|
|
})
|
|
})
|
|
- }).then(res => {
|
|
|
|
- this.noticeList = res.data.items
|
|
|
|
- if (this.noticeList.length > 0) {
|
|
|
|
- var data = this.noticeList.filter((item) => {
|
|
|
|
- return item.newsFlag == 0
|
|
|
|
|
|
+
|
|
|
|
+ await 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,
|
|
})
|
|
})
|
|
- this.unread = data ? data.length : 0
|
|
|
|
- }
|
|
|
|
- console.log(this.unread)
|
|
|
|
- })
|
|
|
|
|
|
+ }).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)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
},
|
|
},
|
|
login() {
|
|
login() {
|