123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- // 机构通知消息
- const noticeMixins = {
- filters: {
- noticeOrderFilters(value) {
- // 交易物流状态显示 1.下单成功通知 2.订单支付完成 3.退款/货成功通知 4.订单取消通知 5.订单发货通知 6.自动收货通知
- const map = {
- 1: '下单成功通知',
- 2: '订单支付完成',
- 3: '退款/货成功通知',
- 4: '订单取消通知',
- 5: '订单发货通知',
- 6: '自动收货通知'
- }
- return map[value]
- },
- noticeUsersFilters(value) {
- // 账户通知状态 1.注册成功通知 2.购买超级会员成功 3.超级会员到期提醒 4.超级会员到期提醒 5.升级资质机构成功 6.升级资质机构失败 7.成为机构运营人员通知
- const map = {
- 1: '注册成功通知',
- 2: '购买超级会员成功',
- 3: '超级会员到期提醒',
- 4: '系统赠送超级会员',
- 5: '升级资质机构成功',
- 6: '升级资质机构失败',
- 7: '成为机构运营人员通知'
- }
- return map[value]
- },
- noticeCouponFilters(value) {
- // 优惠券通知状态 1.优惠券待领取通知 2.优惠券过期通知
- const map = {
- 1: '优惠券待领取通知',
- 2: '优惠券过期通知',
- 3: '优惠券待领取通知'
- }
- return map[value]
- }
- },
- methods: {
- getUserAuthClubMessageList() {
- this.UserService.getUserAuthClubMessageList(this.listQuery)
- .then(response => {
- let data = response.data
- this.hasNextPage = response.data.hasNextPage
- if (data.list && data.list.length > 0) {
- this.isEmpty = false
- this.list = [...data.list]
- this.pullFlag = false
- setTimeout(() => {
- this.pullFlag = true
- }, 500)
- if (this.hasNextPage) {
- this.pullUpOn = false
- this.nomoreText = '上拉显示更多'
- } else {
- if (this.list.length < 5) {
- this.pullUpOn = true
- this.loadding = false
- } else {
- this.pullUpOn = false
- this.loadding = false
- this.nomoreText = '到底了~'
- }
- }
- } else {
- this.isEmpty = true
- }
- this.skeletonShow = false
- })
- .catch(error => {
- this.$util.msg(error.msg, 2000)
- })
- },
- getReachBottomData() {
- this.pullUpOn = false
- this.loadding = false
- //上拉加载
- this.listQuery.pageNum += 1
- this.UserService.getUserAuthClubMessageList(this.listQuery)
- .then(response => {
- let data = response.data
- if (data.list && data.list.length > 0) {
- this.hasNextPage = data.hasNextPage
- this.list = this.list.concat(data.list)
- this.pullFlag = false // 防上拉暴滑
- setTimeout(() => {
- this.pullFlag = true
- }, 500)
- if (this.hasNextPage) {
- this.pullUpOn = false
- this.nomoreText = '上拉显示更多'
- } else {
- this.pullUpOn = false
- this.loadding = false
- this.nomoreText = '到底了~'
- }
- }
- })
- .catch(error => {
- this.$util.msg(error.msg, 2000)
- })
- },
- deleteBtn(id,index) {
- // 删除通知消息
- this.UserService.authDeleteMessage({ id: id })
- .then(response => {
- let _this = this
- uni.vibrateShort({
- success: function() {
- _this.listQuery.pageNum = 1
- _this.getUserAuthClubMessageList()
- // _this.list.splice(index, 1)
- }
- })
- })
- .catch(error => {
- console.log('error=>', error.msg)
- })
- },
- noticeOrderText(cell) { // 交易物流通知文案
- const map = {
- 1: '您已成功下单!',
- 2: '您的订单已支付完成,将立即安排发货!',
- 3: `您的订单已${cell.refundType === 1 ? '部分退' : '全部退'}款/货成功!退款金额¥${cell.content},到账时间可能存在延迟,具体以支付方通知为准。`,
- 4: `${cell.content}`,
- 5: '您的订单已发货,请您留意物流变化!',
- 6: '您的订单因超时已被系统自动确认收货!'
- }
- return map[cell.orderMessageType]
- },
- noticeUsersText(cell) { // 账户通知文案
- const map = {
- 1: '欢迎成为采美机构用户,祝您开启愉快的采购之旅。',
- 2: `您已成功购买${cell.content}采美平台超级会员服务,在服务期内每月可领多张大额优惠券,还有更多超级会员专属权益等您体验,快去看看吧 >>>`,
- 3: `您的超级会员服务将于${cell.content}到期,到期后将无法享受专属会员权益,赶快去续费吧 >>>`,
- 4: `您已获得采美平台赠送的${cell.content}超级会员,在服务期内每月可领多张大额优惠券,还有更多超级会员专属权益等您体验,快去看看吧 >>>`,
- 5: '恭喜您成功升级为资质机构用户!现在可以查看更多商品的信息啦,采美平台也将为您提供更多专业服务。',
- 6: '您的账号升级资质机构失败!赶快去修改资料重新提交吧 >>>',
- 7: `恭喜您(微信昵称:${cell.content})成功成为机构运营人员,祝您开启愉快的采购之旅。`
- }
- return map[cell.accountType]
- },
- noticeCouponText(cell) { // 优惠促销通知文案
- const copunMap = {
- 0: `采美平台送您${cell.couponFee}元优惠券,众多大牌正品等着您,赶快去领取下单吧 >>>`,
- 1: `采美平台${cell.content}类商品大优惠,特送您${cell.couponFee}元优惠券,赶快去领取下单吧 >>>`,
- 2: `为了答谢您对采美平台的支持,采美送您${cell.couponFee}元优惠券,赶快去领取下单吧 >>>`,
- 3: `【${cell.content}】赠送您${cell.couponFee}元的店铺专属优惠券,众多火爆商品等您来!赶快去领取下单吧 >>>`,
- 4: `恭喜成功注册采美平台,现赠送您${cell.couponFee}元新用户优惠券,赶快去领取下单吧 >>>`,
- }
- const map = {
- 1: copunMap[cell.couponType],
- 2: `您有${cell.couponFee}元优惠券将于${cell.content}过期,赶快去查看使用吧 >>>`,
- 3: `您有${cell.couponFee}元优惠券尚未领取,优惠券将于${cell.content}后下架,赶快去领取下单吧 >>>`,
- }
- return map[cell.couponMessageType]
- }
- }
- }
- export default noticeMixins
|