赞
踩
我还为大家准备了一套体系化的架构师学习资料包以及BAT面试资料,供大家参考及学习
已经将知识体系整理好(源码,笔记,PPT,学习视频)
this.user = res.data; this.btnColor = this.btnColor.sort(() => { return (0.5 - Math.random()); }); this.getThumbsup(); let cleanType = uni.getStorageSync('pingluenStateState') if (cleanType) { uni.removeStorageSync('pingluenStateState') this.mescroll.num = 1 this.upCallback(this.mescroll) } }, destroyed: function() { //window.clearInterval(this.inter); }, methods: { //打开评分留言窗口 async onScoreOrComment() { this.commentData = null this.scoreData = 0 this.$refs.deliver.open() }, // 关闭评分留言窗口 closeScoreOrComment() { this.$refs.deliver.close() }, //提交数据 async submitData() { if (1 == 2) return this.$utils.msg('不会进入的地方,如果进来请联系管理员'); else if (this.commentData == null || this.commentData == '') return this.$utils.msg('留言不能为空'); let data = { yinyueId: this.yinyueId, yonghuId: this.user.yonghuId, yinyueLiuyanPingfenNumber: this.scoreData, yinyueLiuyanText: this.commentData, } await this.$api.save(`yinyueLiuyan`, data); this.$refs.deliver.close() this.mescroll.num = 1 this.upCallback(this.mescroll) }, //返回 async fanhui(){ this.$utils.tab("list") }, //下载 download(url) { let _this = this; uni.downloadFile({ url: url, success: (res) => { if (res.statusCode === 200) { _this.$utils.msg('下载成功'); // window.open(url); } } }); }, // 获取详情 async init() { let res = await this.$api.detail('yinyue', this.yinyueId); this.detail = res.data this.detail.yinyueContent = this.detail.yinyueContent.replace("<img","<img class=\"daxiao\"").replace("src=\"upload/","src=\""+this.$base.url+"upload/"); // 主图 this.swiperList = this.detail.yinyuePhoto ? this.detail.yinyuePhoto.split(",") : []; }, /\* && !nameList?seq\_contains('zuowei\_number')\*/ // 收藏 async getyinyueCollection() { let params = { page: 1, limit: 1, yinyueId: this.yinyueId, yinyueCollectionTypes:'1' } let res = await this.$api.page(`yinyueCollection`, params); if(res.data.list.length > 0){ this.collectionFlag = res.data.list.length; }else{ this.collectionFlag = 0 } }, async shoucang() { let _this = this; let params = { page: 1, limit: 1, yinyueId: _this.detail.id, yonghuId: _this.user.id, yinyueCollectionTypes:'1' } let res = await _this.$api.list(`yinyueCollection`, params); if (res.data.list.length == 1) { let yinyueCollectionId = res.data.list[0].id; uni.showModal({ title: '提示', content: '是否取消', success: async function(res) { if (res.confirm) { await _this.$api.del('yinyueCollection', JSON.stringify([yinyueCollectionId])); _this.$utils.msg('取消成功'); _this.getyinyueCollection(); } } }); return; } uni.showModal({ title: '提示', content: '是否收藏', success: async function(res) { if (res.confirm) { await _this.$api.add('yinyueCollection', { yonghuId: _this.user.id, yinyueId: _this.detail.id, yinyueCollectionTypes:1 }); _this.$utils.msg('收藏成功'); _this.getyinyueCollection(); } } }); }, // mescroll组件初始化的回调,可获取到mescroll对象 mescrollInit(mescroll) { this.mescroll = mescroll; }, /\*下拉刷新的回调 \*/ downCallback(mescroll) { this.hasNext = true mescroll.resetUpScroll() }, /\*上拉加载的回调: mescroll携带page的参数, 其中num:当前页 从1开始, size:每页数据条数,默认10 \*/ async upCallback(mescroll) { let res = await this.$api.list('yinyueLiuyan', { page: mescroll.num, limit: mescroll.size, yinyueId: this.yinyueId }); // 如果是第一页数据置空 if (mescroll.num == 1) this.commentList = []; this.commentList = this.commentList.concat(res.data.list); if (res.data.list.length == 0) this.hasNext = false; mescroll.endSuccess(mescroll.size, this.hasNext); }, // 获取赞踩 async getThumbsup() { let _this = this; let params = { page: 1, limit: 1, yinyueId: _this.detail.id, yonghuId: _this.user.id, } let res = await _this.$api.list(`yinyueCollection`, params); if (res.data.list.length > 0) { if (res.data.list[0].yinyueCollectionTypes == '2') { _this.thumbsupFlag = true; } if (res.data.list[0].yinyueCollectionTypes == '3') { _this.crazilyFlag = true; } } }, // 点赞 async zan() { let _this = this; let params = { page: 1, limit: 1, yinyueId: _this.detail.id, yonghuId: _this.user.id, yinyueCollectionTypes: '2', } let res = await _this.$api.list(`yinyueCollection`, params); if (res.data.list.length > 0) { let yinyueCollectionId = res.data.list[0].id; uni.showModal({ title: '提示', content: '是否取消点赞', success: async function(res) { if (res.confirm) { await _this.$api.del('yinyueCollection', JSON.stringify([yinyueCollectionId])); _this.detail.zanNumber = parseInt(_this.detail.zanNumber) - 1; await _this.$api.update('yinyue', _this.detail); _this.$utils.msg('取消成功'); _this.thumbsupFlag = false; } } }); return; } uni.showModal({ title: '提示', content: '是否点赞', success: async function(res) { if (res.confirm) { await _this.$api.add('yinyueCollection', { yonghuId: _this.user.id, yinyueId: _this.detail.id, yinyueCollectionTypes: '2' }); _this.detail.zanNumber = parseInt(_this.detail.zanNumber) + 1; await _this.$api.update('yinyue', _this.detail); _this.$utils.msg('点赞成功'); _this.thumbsupFlag = true; } } }); }, // 踩 async cai() { let _this = this; let params = { page: 1, limit: 1, yinyueId: _this.detail.id, yonghuId: _this.user.id, yinyueCollectionTypes: '3', } let res = await _this.$api.list(`yinyueCollection`, params); if (res.data.list.length > 0) { let yinyueCollectionId = res.data.list[0].id; uni.showModal({ title: '提示', content: '是否取消点踩', success: async function(res) { if (res.confirm) { await _this.$api.del('yinyueCollection', JSON.stringify([yinyueCollectionId])); _this.detail.caiNumber = parseInt(_this.detail.caiNumber) - 1; await _this.$api.update('yinyue', _this.detail); _this.$utils.msg('取消成功'); _this.crazilyFlag = false; } } }); return; } uni.showModal({ title: '提示', content: '是否点踩', success: async function(res) { if (res.confirm) { await _this.$api.add('yinyueCollection', { yonghuId: _this.user.id, yinyueId: _this.detail.id, yinyueCollectionTypes: '3' }); _this.detail.caiNumber = parseInt(_this.detail.caiNumber) + 1; await _this.$api.update('yinyue', _this.detail); _this.$utils.msg('点踩成功'); _this.crazilyFlag = true; } } }); }, async baoming() { let _this = this; uni.showModal({ title: '提示', content: '确定要报名么', success: async function(res) { if (res.confirm) { await _this.$api.add('yinyueYuyue', { yonghuId: _this.user.id, yinyueId: _this.detail.id, }); _this.$utils.msg('报名成功'); _this.$utils.jump('/pages/yinyueYuyue/list'); } } }); }, async onErweima() {//打开模态框 // this.erweimaText = "画师名称:["+this.detail.huashiName+"]所属画院:["+this.detail.huayuanName+"]画师称号:["+this.detail.huashiChenghao+"]画师性别:["+this.detail.sexValue+"]" this.erweimaText = "二维码内容"; this.$refs.erweimaModal.open() }, async closeErweima() {//关闭模态框 this.$refs.erweimaModal.close() }, async saveErweima() {//保存二维码 uni.showLoading({title: '保存中',mask: true}); const ref = this.$refs['qr']; ref.save({ success: res => {
分享一些资料给大家,我觉得这些都是很有用的东西,大家也可以跟着来学习,查漏补缺。
《Java高级面试》
《Java高级架构知识》
《算法知识》
知识》**
[外链图片转存中…(img-SDg9Ol1f-1715720439009)]
《算法知识》
[外链图片转存中…(img-5Z6C6QoM-1715720439009)]
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。