فهرست منبع

feat: 移除测试代码

zhangyuhan 3 سال پیش
والد
کامیت
e09fd9efbd
1فایلهای تغییر یافته به همراه2 افزوده شده و 70 حذف شده
  1. 2 70
      src/web/staticres/common-module/yearEndReport/js/index.js

+ 2 - 70
src/web/staticres/common-module/yearEndReport/js/index.js

@@ -208,38 +208,6 @@ var tempUtils = {
 }
 
 
-const pageInfo = {
-    // 用户信息
-    user_name: '醉纸鸢',
-    user_head: 'https://www.jianyu360.cn/images/auto.png',
-    share_link: 'https://www.jianyu360.cn/images/auto.png',
-    // 是否新用户
-    is_new: false,
-    // 注册时间 秒
-    registration_time: 1644249599,
-    // 距离今天的天数
-    total_days: 100,
-    // 近一年登录天数
-    login_days: 50,
-    // 深夜登录天数
-    active_days: -1,
-    // 最关注的项目名称
-    focus_project: '最关注的项目名称',
-    // 浏览信息次数
-    view_total: 1000,
-    // 搜索次数
-    search_total: 999,
-    // 企业/项目关注数量
-    follow_total: -1,
-    // 繁忙月份
-    active_month: 7,
-    // 行业发布数据条数
-    industry_total: 99,
-    // 体验新功能列表
-    exp_list: ['大会员', '超级订阅', '数据导出', '行业解决方案'],
-    // 结果页type
-    result: 1
-}
 $(function () {
     try {
         JyObj.hiddenBottom(0)
@@ -253,7 +221,7 @@ var vPage = new Vue({
     delimiters: ['${', '}'],
     data: function () {
         return {
-            pageInfo: pageInfo,
+            pageInfo: {},
             showToastText: false,
             readPact: false
         }
@@ -315,7 +283,6 @@ var vPage = new Vue({
                 url: '/publicapply/active/yearEndReport',
                 type: 'GET',
                 success: function (res) {
-                    console.log(res)
                     if (res && res.error_msg === '' && res.data) {
                         if (res.data.share_link) {
                             sessionStorage.setItem('shareReportLink', res.data.share_link)
@@ -335,42 +302,7 @@ var vPage = new Vue({
                     }
                 },
                 error: function () {
-                    _this.showToast('接口请求失败,展示测试数据')
-                    var res = {
-                        "error_code": 0,
-                        "error_msg": "",
-                        "data": {
-                            user_head: "",
-                            user_name: "",
-                            "registration_time": 1462779190,
-                            "login_days": 108,
-                            "active_days": 11,
-                            "view_total": 17500000,
-                            "search_total": 67000000,
-                            "follow_total": 17000000,
-                            "active_month": 11,
-                            "industry_total": 6807008,
-                            "exp_list": [
-                                "大会员",
-                                "超级订阅"
-                            ],
-                            "focus_project": [
-                                "计算机",
-                                "信息技术"
-                            ],
-                            "total_days": 2076,
-                            "is_new": false,
-                            "result": 7,
-                            "share_link": "https://web-wky.jydev.jianyu360.com/active/yearEndReport?from=share"
-                        }
-                    }
-                    res.data = pageInfo
-                    if (res && res.error_msg === '' && res.data) {
-                        _this.pageInfo = res.data
-                        _this.$nextTick(function () {
-                            initSwiper.bind(_this)()
-                        })
-                    }
+                    location.replace('/swordfish/about')
                 }
             })
         },