|
|
@@ -196,7 +196,7 @@
|
|
|
</span>
|
|
|
</div>
|
|
|
<div class="internet-number">
|
|
|
- 0
|
|
|
+ {{ smsRemainCount !== null && smsRemainCount !== undefined ? formatNumberWithCommas(smsRemainCount) : 0 }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -511,6 +511,7 @@ import {
|
|
|
smsBalance, thisMonthOrderCount, thisMonthRecvCount, trafficLog,
|
|
|
watchCourseTopTen, watchEndPlayTrend
|
|
|
} from "@/api/statistics/statistics";
|
|
|
+import { getRemainingSMSCount } from "@/api/company/companySms";
|
|
|
import dayjs from 'dayjs';
|
|
|
|
|
|
|
|
|
@@ -1112,15 +1113,29 @@ export default {
|
|
|
this.watchRate = res.data.watchRate;
|
|
|
}
|
|
|
})
|
|
|
- smsBalance().then(res=>{
|
|
|
- if(res.code === 200){
|
|
|
- if(res.data == null) {
|
|
|
+ getRemainingSMSCount().then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ // 接口返回的是 { code: 200, data: count }
|
|
|
+ if (res.data == null) {
|
|
|
this.smsRemainCount = 0;
|
|
|
} else {
|
|
|
this.smsRemainCount = res.data;
|
|
|
}
|
|
|
+ } else {
|
|
|
+ this.smsRemainCount = 0;
|
|
|
}
|
|
|
- })
|
|
|
+ }).catch(() => {
|
|
|
+ this.smsRemainCount = 0;
|
|
|
+ });
|
|
|
+ // smsBalance().then(res=>{
|
|
|
+ // if(res.code === 200){
|
|
|
+ // if(res.data == null) {
|
|
|
+ // this.smsRemainCount = 0;
|
|
|
+ // } else {
|
|
|
+ // this.smsRemainCount = res.data;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
authorizationInfo().then(res=>{
|
|
|
if(res.code === 200){
|
|
|
this.todayWatchUserCount = res.data.todayWatchUserCount;
|