Commit 77119105 authored by 刘文虎's avatar 刘文虎

bug修复

parent 17b6fc90
Pipeline #2936 canceled with stages
import request from "@/utils/request.js"
export function getList(data) {
return request({
url: `/rest/subscribe/temple`,
method: 'GET',
data,
noLoading:true
})
}
<template> <template>
<u-popup v-model="show" border-radius="24" :custom-style="{ 'background-color': '#F6F7FA' }" safe-area-inset-bottom mode="bottom"> <u-popup v-model="show" border-radius="24" safe-area-inset-bottom mode="bottom">
<view class="content"> <view class="content">
<view class="billing"> <view class="billing">
<view class="billing-head"> <view class="billing-head">
...@@ -122,12 +122,16 @@ export default { ...@@ -122,12 +122,16 @@ export default {
prop: 'classificationId', prop: 'classificationId',
message: '请选择类型' message: '请选择类型'
} }
] ],
notification : 'update-payments-setting'
}; };
}, },
mounted() { mounted() {
this.init(); this.init();
}, },
onUnload() {
uni.$off(this.notification);
},
methods: { methods: {
init() { init() {
this.form.happenTime = this.parseTime(new Date(), '{y}-{m}-{d}'); this.form.happenTime = this.parseTime(new Date(), '{y}-{m}-{d}');
...@@ -310,6 +314,9 @@ export default { ...@@ -310,6 +314,9 @@ export default {
uni.navigateTo({ uni.navigateTo({
url: '/pages/mine/payments-setting/payments-setting' url: '/pages/mine/payments-setting/payments-setting'
}); });
uni.$on(this.notification, res => {
this.getBillTypeOptions();
});
} else { } else {
this.form.classificationId = item.id; this.form.classificationId = item.id;
} }
......
This diff is collapsed.
...@@ -226,6 +226,15 @@ ...@@ -226,6 +226,15 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}
,{
"path" : "subscribe/subscribe",
"style" :
{
"navigationBarTitleText": "用户订阅",
"enablePullDownRefresh": false
}
} }
] ]
}, },
......
<template> <template>
<u-popup v-model="show" border-radius="24" :custom-style="{ 'background-color': '#F6F7FA' }" mode="bottom"> <u-popup v-model="show" border-radius="24" mode="bottom">
<view class="content"> <view class="content">
<view class="charge footer"> <view class="charge footer">
<view class="charge-title">收费列表</view> <view class="charge-title">收费列表</view>
......
...@@ -105,6 +105,8 @@ export default { ...@@ -105,6 +105,8 @@ export default {
} }
.status { .status {
width: 100upx; width: 100upx;
height: 40rpx;
line-height: 40rpx;
text-align: right; text-align: right;
margin-left: 38upx; margin-left: 38upx;
color: $default-color; color: $default-color;
......
...@@ -16,11 +16,13 @@ import AbButton from '@/components/common/ab-button.vue'; ...@@ -16,11 +16,13 @@ import AbButton from '@/components/common/ab-button.vue';
import EmptyPage from '@/components/common/empty-page.vue'; import EmptyPage from '@/components/common/empty-page.vue';
import NoData from '@/components/no-data'; import NoData from '@/components/no-data';
import PlanStep from './plan-step.vue'; import PlanStep from './plan-step.vue';
import subscribeMixin from '@/utils/subscribeMixin';
import { getTime } from '@/utils/common.js'; import { getTime } from '@/utils/common.js';
import { getList } from '@/api/schedule/index.js'; import { getList } from '@/api/schedule/index.js';
export default { export default {
name: 'plan-view', name: 'plan-view',
mixins: [subscribeMixin],
components: { components: {
AbButton, AbButton,
PlanStep, PlanStep,
...@@ -74,14 +76,18 @@ export default { ...@@ -74,14 +76,18 @@ export default {
url: 'pages/schedule/create-schedule/create-schedule' url: 'pages/schedule/create-schedule/create-schedule'
}); });
}, },
handleRemind(item) { // 拉起订阅
async handleRemind(item) {
if (item.status !== '1') { if (item.status !== '1') {
return false; return false;
} }
uni.showToast({ try{
icon: 'none', await this.getSubscribeMessage(this.scene.trip); // 拉起订阅
title: '提醒' this.showToast('订阅成功');
}); }catch(e){
//TODO handle the exception
}
}, },
handleClick(item) { handleClick(item) {
uni.navigateTo({ uni.navigateTo({
......
...@@ -424,6 +424,9 @@ export default { ...@@ -424,6 +424,9 @@ export default {
} }
.login-index .main .m-top { .login-index .main .m-top {
margin-top: 30rpx; margin-top: 30rpx;
display: flex;
flex-direction: column;
justify-content: center;
} }
.login-index .main .m-top .t-logo { .login-index .main .m-top .t-logo {
margin-bottom: 15rpx; margin-bottom: 15rpx;
......
...@@ -57,7 +57,8 @@ export default { ...@@ -57,7 +57,8 @@ export default {
}, },
listHeight: 0, listHeight: 0,
showTip: false, showTip: false,
imageTop: 0 imageTop: 0,
notification : 'update-payments-setting'
}; };
}, },
computed: { computed: {
...@@ -82,7 +83,15 @@ export default { ...@@ -82,7 +83,15 @@ export default {
onReady() { onReady() {
// this.showTipView(); // this.showTipView();
}, },
onUnload() {
uni.$off(this.notification);
},
methods: { methods: {
updateEmit(){
uni.$emit(this.notification, {
content: ""
});
},
closeDrap() { closeDrap() {
this.$refs['drap-view'].closeAll(); this.$refs['drap-view'].closeAll();
}, },
...@@ -163,6 +172,7 @@ export default { ...@@ -163,6 +172,7 @@ export default {
} }
let res = await sortList(params); let res = await sortList(params);
await this.getList(); await this.getList();
await this.updateEmit()
} catch (e) { } catch (e) {
this.getList(); this.getList();
//TODO handle the exception //TODO handle the exception
...@@ -175,6 +185,7 @@ export default { ...@@ -175,6 +185,7 @@ export default {
} }
let res = await deleteById(params) let res = await deleteById(params)
await this.getList(); await this.getList();
await this.updateEmit()
} catch (e) { } catch (e) {
this.getList(); this.getList();
//TODO handle the exception //TODO handle the exception
...@@ -197,14 +208,12 @@ export default { ...@@ -197,14 +208,12 @@ export default {
} }
let res = await update(params) let res = await update(params)
await this.getList(); await this.getList();
await this.updateEmit()
} catch (e) { } catch (e) {
this.getList(); this.getList();
//TODO handle the exception //TODO handle the exception
} }
}, },
naviTo() {
this.$u.route('pages/camp/layout');
}
} }
}; };
</script> </script>
......
<template>
<view class="subscribe-card">
<view class="subscribe-card-head" :class="{ 'head-border': headBorder }">
<view class="subscribe-card-head-label ellipsis">
<view class="subscribe-card-head-label-icon" v-if="leftIcon"><image :src="leftIcon" mode=""></image></view>
<view class="subscribe-card-head-label-text ellipsis">{{ title }}</view>
</view>
<view class="subscribe-card-head-right" hover-class="u-hover-class" @click="handleClick" v-if="rightButton">{{ rightButtonText }}</view>
</view>
<view class="subscribe-card-content"><slot></slot></view>
</view>
</template>
<script>
export default {
name: 'subscribe-card',
props: {
title: {
type: String | null,
default: '标题'
},
rightButtonText: {
type: String | null,
default: '全部+1'
},
rightButton: {
type: Boolean,
default: true
},
headBorder: {
type: Boolean,
default: true
},
leftIcon: {
type: String | null,
default: null
}
},
data() {
return {};
},
methods: {
handleClick() {
this.$emit('handleClickRight');
}
}
};
</script>
<style lang="scss" scoped>
image {
width: 100%;
height: 100%;
}
.subscribe-card {
width: 100%;
background: #ffffff;
border-radius: 8rpx;
padding: 0 24rpx;
overflow: hidden;
margin-bottom: 24rpx;
.ellipsis {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
}
&-head {
display: flex;
width: 100%;
height: 96rpx;
justify-content: space-between;
align-items: center;
&-label {
width: 70%;
font-size: 32rpx;
font-weight: bold;
display: flex;
align-items: center;
&-icon {
width: 28rpx;
height: 32rpx;
margin-right: 12rpx;
}
&-text {
flex: 1;
}
}
&-right {
background: #28C445;
border-radius: 8rpx;
font-size: 24rpx;
color: #FFFFFF;
width: 120rpx;
height: 48rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
}
}
.head-border {
border-bottom: 2rpx solid #f6f7fa;
}
}
</style>
<template>
<view class="subscribe-item">
<view class="subscribe-item-left" :class="{ 'has-time-button': timeButton }">
<view class="subscribe-item-left-label ellipsis">
<text>{{ detail.name }}</text>
<text class="subscribe-item-left-label-num" :class="{ 'red-num': countColor }">
<text>{{ detail.number }}</text>
<text>次</text>
</text>
</view>
<view class="subscribe-item-left-desc ellipsis" v-if="detail.desc">{{ detail.desc }}</view>
</view>
<view class="subscribe-item-right">
<view class="subscribe-item-right-button" hover-class="u-hover-class" :class="{ 'subscribe-item-right-button-active': timeButton }" v-if="timeButton" @click="timeSetting">
{{ timeButtonText }}
</view>
<view class="subscribe-item-right-button" hover-class="u-hover-class" @click="handleClick">{{ rightButtonText }}</view>
</view>
</view>
</template>
<script>
export default {
name: 'subscribe-item',
props: {
detail: {
type: Object,
default: () => {}
},
rightButtonText: {
type: String | null,
default: '订阅+1'
},
rightButton: {
type: Boolean,
default: false
}
},
data() {
return {};
},
computed: {
countColor() {
return this.detail.number <= 1 ? true : false;
},
timeButton() {
let { type } = this.detail;
if (type) {
return type.code === 'TIMING' ? true : false;
}
return false;
},
timeButtonText() {
return this.detail.config && this.detail.config.day && this.detail.config.day.length ? '已设置' : '设置时间';
}
},
methods: {
handleClick() {
this.$emit('handleClickRight', this.detail);
},
timeSetting() {
if (!this.detail.id) {
uni.showToast({
icon: 'none',
title: '订阅id不能为空'
});
return false;
}
this.$u.route({
url: 'pages/message/subscribe/subscription-setting/subscription-setting',
params: {
detail: JSON.stringify(this.detail)
}
});
}
}
};
</script>
<style lang="scss" scoped>
.subscribe-item {
width: 100%;
height: 156rpx;
padding: 24rpx 0;
display: flex;
justify-content: space-between;
align-items: center;
color: #333333;
.ellipsis {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
}
&-left {
width: 70%;
font-size: 28rpx;
&-label {
font-weight: bold;
&-num {
font-size: 24rpx;
line-height: 24rpx;
font-weight: 500;
color: #3878ff;
margin-left: 16rpx;
}
.red-num {
color: #fc524d;
}
}
&-desc {
margin-top: 24rpx;
font-size: 26rpx;
color: #8d8d8d;
}
}
.has-time-button {
width: 60%;
}
&-right {
display: flex;
align-items: center;
&-button {
width: 120rpx;
height: 48rpx;
box-sizing: border-box;
// padding: 12rpx 14rpx;
display: flex;
align-items: center;
justify-content: center;
// text-align: center;
background: #28C445;
border-radius: 8rpx;
font-size: 24rpx;
// line-height: 48rpx;
color: #FFFFFF;
margin-right: 24rpx;
&:last-child {
margin-right: 0;
}
}
&-button-active {
background: #ffffff;
border: 2rpx solid #28C445;
color: #28C445;
}
}
}
</style>
<template>
<view class="subscribe-message">
<view class="subscribe-message-content">
<view class="subscribe-message-content-item" v-for="item in messageList" :key="item">{{ item }}</view>
</view>
<view class="official-account">
<view class="official-account-component" v-if="show"><official-account style=""></official-account></view>
<view class="official-account-view" @click="toUrl">
<view class="official-account-view-label ellipsis">{{ title }}</view>
<view class="official-account-view-right">{{ rightButtonText }}</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'subscribe-message',
props: {
isSubscribe: {
type: Boolean | null,
default: false
},
show: {
type: Boolean,
default: false
},
},
computed: {
rightButtonText() {
return this.isSubscribe ? '已关注' : '点击关注';
}
},
data() {
return {
messageList: [
'1. 根据微信小程序官方规定,推送消息需用户主动授权',
'2. 成功授权一次,累加一次推送机会',
'3. 成功推送一次,消耗一次推送机会',
'所以大家根据需要进行授权添加推送次数。'
],
title: '消息不错过,请关注微信公众号 “咖营”'
};
},
methods:{
toUrl(){
if(this.show){
return false
}
this.$u.route({
url:"pages/message/official-account-page/official-account-page"
})
}
}
};
</script>
<style lang="scss" scoped>
.subscribe-message {
&-content {
margin: 20rpx 0;
&-item {
line-height: 48rpx;
font-size: 26rpx;
}
}
.official-account {
width: 100%;
height: 112rpx;
position: relative;
overflow: hidden;
&-component {
position: absolute;
z-index: 10;
top: -20px;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
}
&-view {
// background-color: #ffffff;
position: absolute;
z-index: 1;
top: 0;
left: 0;
display: flex;
width: 100%;
height: 100%;
justify-content: space-between;
align-items: center;
border-top: 2rpx solid #f6f7fa;
&-label {
width: 80%;
font-size: 28rpx;
}
&-right {
padding: 12rpx 14rpx;
color: #3878ff;
border: 2rpx solid #3878ff;
border-radius: 8rpx;
font-size: 24rpx;
line-height: 24rpx;
}
}
}
}
</style>
<template>
<view class="subscribe footer">
<!-- <NavbarNormal :background="{ background: '#f6f7fa' }" title="用户订阅" titleColor="#191C27" title-bold :border-bottom="false"></NavbarNormal> -->
<!-- <CampTabs
height="70"
activeColor="#333333"
inactive-color="#999999"
bar-height="10"
bar-width="22"
bar-image="tishiguangbiao@3x.png"
:list="listGroup"
:current="current"
@change="change"
font-size="32"
bold
bg-color="transparent"
></CampTabs> -->
<view class="subscribe-content">
<subscribe-card title="常用订阅,建议增加订阅次数" :leftIcon="commonLeftIcon" rightButtonText="全部+1" rightButton @handleClickRight="clickCommon">
<subscribe-item
v-for="(item, index) in subscribeCommon"
:key="item.id"
:detail="item"
rightButtonText="推送+1"
rightButton
@handleClickRight="clickSubscribe"
></subscribe-item>
</subscribe-card>
</view>
</view>
</template>
<script>
// import CampTabs from '@/components/camp-tabs';
import SubscribeCard from './components/subscribe-card.vue';
import SubscribeItem from './components/subscribe-item.vue';
import SubscribeMessage from './components/subscribe-message.vue';
import { mineBaseUrl } from '@/utils/config.js';
// import { getColdScene } from '@/utils/common.js';
import { getList } from '@/api/mine/subscribe.js';
import { mapGetters } from 'vuex';
export default {
components: {
// CampTabs,
SubscribeCard,
SubscribeItem,
SubscribeMessage
},
data() {
return {
// coldSceneList,
current: 0,
listGroup: [{ name: '用户订阅', type: 'USER' }, { name: '营主订阅', type: 'OWNER' }],
swiperHeight: 300,
// 常用订阅
subscribeCommon: [],
// 低频订阅
subscribeOther: [],
// 营主订阅
subscribeCampOwner: [],
isSubscribe: false, // 是否关注了公众号
commonLeftIcon: mineBaseUrl + 'dingyue2@3x.png',
showOfficialAccount: false
};
},
computed: {
...mapGetters(['loginChannel'])
},
onLoad() {
// this.checkScene()
},
onShow() {
// 查询是否关注了公众号
// this.queryOfficialAccount();
// 查询订阅列表
this.getSubscribeList();
// 子页面保存,传递参数
// uni.$on('onSubscriptionSetting', data => {
// console.log('监听到事件来自 updateData ,携带参数为:', data);
// });
},
methods: {
// 查询是否关注了公众号
async queryOfficialAccount() {
// let res=await this.$u.api.
// this.isSubscribe = !this.isSubscribe;
},
// 判断场景值是否能显示公众号
checkScene() {
let scene = getColdScene();
let index = this.coldSceneList.findIndex(e => e === scene);
console.log(index);
this.showOfficialAccount = index === -1 ? false : true;
},
// 查询订阅列表
async getSubscribeList() {
try {
let params = {
channel: this.loginChannel,
scene:''
};
let { data } = await getList(params);
this.subscribeCommon = data;
} catch (e) {
this.showToast('获取订阅模板失败');
//TODO handle the exception
}
},
change(index) {
this.current = index;
this.getSubscribeList();
},
// 点击单个订阅
clickSubscribe(item) {
if (!item.outTempleId) {
uni.showToast({
title: '消息模板id不能为空'
});
return false;
}
this.requestSubscribeMessage([item]);
},
// 点击全部订阅
clickCommon() {
this.subscribeAll(this.subscribeCommon);
},
clickOther() {
this.subscribeAll(this.subscribeOther);
},
clickCampOwner() {
this.subscribeAll(this.subscribeCampOwner);
},
subscribeAll(list) {
if (!list || list.length <= 0) {
return false;
}
let tmplIds = [...list];
tmplIds.sort((a, b) => a.number - b.number);
tmplIds = tmplIds.slice(0, 3);
this.requestSubscribeMessage(tmplIds);
},
requestSubscribeMessage(tempList = []) {
let tmplIds = tempList.map(item => item.outTempleId);
uni.requestSubscribeMessage({
tmplIds: tmplIds,
success: res => {
console.log(res);
this.saveSubscribeCount(tempList, res);
},
fail(err) {
console.log(err);
uni.showToast({
icon: 'none',
title: '订阅失败'
});
}
});
},
saveSubscribeCount(tmplIds, res) {
let countList = [];
let rejectList = [];
if (tmplIds && res && tmplIds.length) {
tmplIds.forEach(item => {
if (res[item.outTempleId] && res[item.outTempleId] === 'accept') {
countList.push(item);
} else {
rejectList.push(item);
}
});
}
console.log(`发起 ${tmplIds.length} 项订阅 , 用户同意订阅 ${countList.length} 项 , 拒绝 ${rejectList.length} 项`);
if (countList.length) {
this.addCount(countList);
}
},
async addCount(tempList) {
let params = tempList.map(item => item.id);
let res = await this.$u.api.addSubscribeCountByMessageModules(this.camp_id, params);
if (res) {
this.getSubscribeList();
}
}
}
};
</script>
<style lang="scss" scoped>
.subscribe {
background: #f6f7fa;
height: 100vh;
padding: 0 24rpx;
display: flex;
flex-direction: column;
&-content {
flex: 1;
width: 100%;
padding: 24rpx 0;
overflow: hidden;
.scorll-view {
width: 100%;
height: 100%;
overflow: hidden;
}
}
}
.footer {
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
}
</style>
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
<text>{{ detail.type.desc }}</text> <text>{{ detail.type.desc }}</text>
</text> </text>
<text v-else-if="item.value === 'remindMinute'"> <text v-else-if="item.value === 'remindMinute'">
<text>{{ myFilter(detail[item.value] + '', scheduleSettingOptions) }}</text> <text>{{ detail[item.value]?myFilter(detail[item.value] + '', scheduleSettingOptions):'' }}</text>
</text> </text>
<text v-else>{{ detail[item.value] }}</text> <text v-else>{{ detail[item.value]||'' }}</text>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -27,7 +27,9 @@ export const whiteList = ['/pages/index/index', '/pages/index/schedule/schedule' ...@@ -27,7 +27,9 @@ export const whiteList = ['/pages/index/index', '/pages/index/schedule/schedule'
]; // 路由白名单 ]; // 路由白名单
export const responseWhiteList = ['/rest/bookRecord/export', '/rest/exchangeCode/check','/rest/exchangeCode/exchange']; // 请求URL白名单,此名单内的请求不作状态码判断,在resolve中直接返回 export const responseWhiteList = ['/rest/bookRecord/export', '/rest/exchangeCode/check','/rest/exchangeCode/exchange']; // 请求URL白名单,此名单内的请求不作状态码判断,在resolve中直接返回
export const sceneOptions = {
trip: "TRIP",
}
export const loginInfo = { export const loginInfo = {
"account": "", "account": "",
"authType": "", "authType": "",
......
const baseUrl= process.uniEnv.qn_base_url+'mine/' const baseUrl = process.uniEnv.qn_base_url + 'mine/'
// 常用功能 // 常用功能
export const usedOptions = [{ export const usedOptions = [{
id: 1, id: 1,
title: '店铺设置', title: '店铺设置',
icon: baseUrl+'/dianpushezhi@3x.png', icon: baseUrl + '/dianpushezhi@3x.png',
path: "/pages/mine/shop-setting/shop-setting" path: "/pages/mine/shop-setting/shop-setting"
}, },
{ {
id: 2, id: 2,
title: '收支设置', title: '收支设置',
icon: baseUrl+'/shouzhishezhi@3x.png', icon: baseUrl + '/shouzhishezhi@3x.png',
path: "/pages/mine/payments-setting/payments-setting" path: "/pages/mine/payments-setting/payments-setting"
}, },
{ {
id: 3, id: 3,
title: '兑换会员', title: '兑换会员',
icon: baseUrl+'/duihuanhuiyuan@3x.png', icon: baseUrl + '/duihuanhuiyuan@3x.png',
path: "/pages/mine/cd-key/cd-key" path: "/pages/mine/cd-key/cd-key"
}, },
{ {
id: 4, id: 4,
title: '联系客服', title: '联系客服',
icon: baseUrl+'/lianxikefu1@3x.png', icon: baseUrl + '/lianxikefu1@3x.png',
path: "/pages/mine/service/service" path: "/pages/mine/service/service"
}, },
] ]
export const packageOptions = [{ export const packageOptions = [
// {
// id: 0,
// title: '用户订阅',
// icon: 'file-text',
// path: "/pages/mine/subscribe/subscribe"
// },
{
id: 1, id: 1,
title: '用户服务&隐私协议', title: '用户服务&隐私协议',
icon: 'file-text', icon: 'file-text',
...@@ -64,4 +71,4 @@ export const shopSettingOptions = [{ ...@@ -64,4 +71,4 @@ export const shopSettingOptions = [{
value: 'phone', value: 'phone',
path: "/pages/mine/shop-setting/shop-phone/shop-phone" path: "/pages/mine/shop-setting/shop-phone/shop-phone"
} }
] ]
\ No newline at end of file
/** 自定义组件 共同逻辑 */
import {sceneOptions,} from "@/utils/config.js"
import {getList} from "@/api/mine/subscribe.js"
import { mapGetters } from 'vuex';
export default {
data() {
return {
scene:sceneOptions,
}
},
computed: {
...mapGetters(['loginChannel'])
},
methods: {
onCallback(callback) {
if (callback && callback instanceof Function) {
callback()
}
},
/**
* scene : 场景值
*/
getSubscribeMessage(scene) {
return new Promise(async(resolve,reject)=>{
let params={
channel:this.loginChannel,
scene:scene
}
try{
let {data} = await getList(params);
this.requestSubscribeMessage(data,resolve,reject)
}catch(e){
//TODO handle the exception
reject(e)
}
})
},
requestSubscribeMessage(tempList, resolve,reject) {
let tmplIds = tempList.map(item => item.outTempleId);
uni.requestSubscribeMessage({
tmplIds: tmplIds,
success: res => {
console.log(res);
this.saveSubscribeCount(tempList, res, resolve);
},
fail:err=> {
uni.showToast({
icon:'none',
title: '订阅失败'
});
console.log(err)
reject(err)
}
});
},
saveSubscribeCount(tempList, res, callback) {
let countList = [];
let rejectList = [];
if (tempList && res && tempList.length) {
tempList.forEach(item => {
if (res[item.outTempleId] && res[item.outTempleId] === 'accept') {
countList.push(item);
} else {
rejectList.push(item);
}
});
}
console.log(`发起 ${tempList.length} 项订阅 , 用户同意订阅 ${countList.length} 项 , 拒绝 ${rejectList.length} 项`);
// if (countList.length) {
// this.addCount(countList,callback);
// } else {
// this.onCallback(callback)
// }
resolve(res)
},
async addCount(tempList, callback){
try{
let params = tempList.map(item => item.id);
let res = await addSubscribeCount(this.camp_id, params);
this.onCallback(callback)
}catch(e){
//TODO handle the exception
this.onCallback(callback)
}
}
}
}
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