|
@@ -112,11 +112,11 @@ function RandomCoordinate (conf) {
|
|
|
|
|
|
this.init()
|
|
|
}
|
|
|
-var platform = utils.isWeiXinBrowser ? 'wx' : 'app'
|
|
|
var task = new Vue({
|
|
|
el: '#main-app',
|
|
|
delimiters: ['${', '}'],
|
|
|
data: {
|
|
|
+ platform: 'app',
|
|
|
progress: {
|
|
|
min: 0,
|
|
|
max: 1000,
|
|
@@ -156,8 +156,8 @@ var task = new Vue({
|
|
|
missionsList: [
|
|
|
{
|
|
|
id: 'subscribe',
|
|
|
- x: 0,
|
|
|
- y: 0,
|
|
|
+ x: 0.2,
|
|
|
+ y: 0.94, // rem
|
|
|
num: 300,
|
|
|
unit: '剑鱼币',
|
|
|
complete: false,
|
|
@@ -166,8 +166,8 @@ var task = new Vue({
|
|
|
},
|
|
|
{
|
|
|
id: 'invite',
|
|
|
- x: 0,
|
|
|
- y: 0,
|
|
|
+ x: 2.84,
|
|
|
+ y: 0.06,
|
|
|
num: 500,
|
|
|
unit: '剑鱼币',
|
|
|
complete: false,
|
|
@@ -176,8 +176,8 @@ var task = new Vue({
|
|
|
},
|
|
|
{
|
|
|
id: 'improveInfo',
|
|
|
- x: 0,
|
|
|
- y: 0,
|
|
|
+ x: 4.8,
|
|
|
+ y: 0.82,
|
|
|
num: 200,
|
|
|
unit: '剑鱼币',
|
|
|
complete: false,
|
|
@@ -204,40 +204,78 @@ var task = new Vue({
|
|
|
toolBoxList: [
|
|
|
{
|
|
|
text: '超级订阅',
|
|
|
- url: ''
|
|
|
+ id: 'vip',
|
|
|
+ url: {
|
|
|
+ app: '/jyapp/vipsubscribe/introducePage',
|
|
|
+ wx: ''
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
text: '大会员',
|
|
|
- url: ''
|
|
|
+ id: 'big-vip',
|
|
|
+ url: {
|
|
|
+ app: '/jyapp/big/page/main_root',
|
|
|
+ wx: '/big/wx/page/landingPage'
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
text: '企业管理',
|
|
|
- url: ''
|
|
|
+ id: 'manager',
|
|
|
+ url: {
|
|
|
+ wx: '',
|
|
|
+ app: '',
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
text: '数据定制服务',
|
|
|
- url: ''
|
|
|
+ id: 'structured',
|
|
|
+ url: {
|
|
|
+ wx: '/front/structed/index',
|
|
|
+ app: '/jyapp/structed/index',
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
text: '数据自主导出',
|
|
|
- url: ''
|
|
|
+ id: 'export',
|
|
|
+ url: {
|
|
|
+ wx: '/front/wx_dataExport/toSieve',
|
|
|
+ app: '/jyapp/front/dataExport/toSieve',
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
text: '数据流量包',
|
|
|
- url: ''
|
|
|
+ id: 'data-pack',
|
|
|
+ url: {
|
|
|
+ wx: '/jy_mobile/common/order/create/datapack',
|
|
|
+ app: '/jy_mobile/common/order/create/datapack',
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
- text: '电信行业解决方案',
|
|
|
- url: ''
|
|
|
+ text: '数据报告',
|
|
|
+ id: 'report',
|
|
|
+ url: {
|
|
|
+ wx: '/datareport/page/introduce',
|
|
|
+ app: '/datareport/page/introduce',
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
text: '中标必听课',
|
|
|
- url: ''
|
|
|
+ id: 'online-course',
|
|
|
+ url: {
|
|
|
+ wx: '/jyxsapp/',
|
|
|
+ app: '/jyxsapp/',
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
text: '剑鱼文库',
|
|
|
- url: ''
|
|
|
+ id: 'docs',
|
|
|
+ url: {
|
|
|
+ wx: '/page_docs_mobile/home',
|
|
|
+ app: '/page_docs_mobile/home',
|
|
|
+ }
|
|
|
},
|
|
|
+ // 电信解决方案
|
|
|
+ // /weixin/frontPage/bidedoc/sess/index
|
|
|
],
|
|
|
rulesList: [
|
|
|
{
|
|
@@ -273,37 +311,33 @@ var task = new Vue({
|
|
|
}
|
|
|
return calcRate
|
|
|
},
|
|
|
- progressAnchorList: function () {
|
|
|
- var progressList = JSON.parse(JSON.stringify(this.progress.anchorList))
|
|
|
+ blinkTextShow: function () {
|
|
|
+ var anchorList = this.progress.anchorList
|
|
|
var rate = this.rate
|
|
|
- var existRate = false
|
|
|
- for (var i = 0; i < progressList.length; i++) {
|
|
|
- if (progressList[i].rate === rate) {
|
|
|
- existRate = true
|
|
|
+ var exist = false
|
|
|
+ for (var i = 0; i < anchorList.length; i++) {
|
|
|
+ if (rate === anchorList[i].rate) {
|
|
|
+ exist = true
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
- if (!existRate) {
|
|
|
- progressList.push({
|
|
|
- rate: this.rate, // 进度,单位%,最大为100
|
|
|
- anchorText: this.progress.current + '剑鱼币'
|
|
|
- })
|
|
|
- }
|
|
|
- return progressList.sort(function (a, b) {
|
|
|
- return a.rate - b.rate
|
|
|
- })
|
|
|
+ return !exist
|
|
|
+ },
|
|
|
+ progressAnchorList: function () {
|
|
|
+ return this.progress.anchorList
|
|
|
},
|
|
|
getScreenMax: function () {
|
|
|
return document.body.clientHeight < 600
|
|
|
}
|
|
|
},
|
|
|
created: function () {
|
|
|
+ this.platform = utils.isWeiXinBrowser ? 'wx' : 'app'
|
|
|
this.ajaxActiveStatus()
|
|
|
this.getMissionList()
|
|
|
this.ajaxProgress()
|
|
|
},
|
|
|
mounted: function () {
|
|
|
- this.calcPointList()
|
|
|
+ // this.calcPointList()
|
|
|
},
|
|
|
methods: {
|
|
|
calcPointList: function () {
|
|
@@ -401,7 +435,7 @@ var task = new Vue({
|
|
|
type: 'post',
|
|
|
contentType: 'application/json',
|
|
|
data: JSON.stringify(data),
|
|
|
- complete: function (res) {
|
|
|
+ success: function (res) {
|
|
|
return callback(res.data, res.error_msg)
|
|
|
}
|
|
|
})
|
|
@@ -413,17 +447,39 @@ var task = new Vue({
|
|
|
},
|
|
|
onClickListItem: function (item) {
|
|
|
if (item.icon === 'jy-svip') {
|
|
|
- location.href = '/jy_mobile/common/order/create/svip?type=buy'
|
|
|
+ if (this.isWeiXinBrowser) {
|
|
|
+ location.href = '/weixin/pay/toMyWxOrder?active=0'
|
|
|
+ } else {
|
|
|
+ location.href = '/jyapp/front/myOrder/toMyOrder?active=0'
|
|
|
+ }
|
|
|
} else {
|
|
|
location.href = '/page_points_mobile/list'
|
|
|
}
|
|
|
},
|
|
|
+ leaveCanvas: function (item) {
|
|
|
+ var rootFontSize = RootNodeFontSize()
|
|
|
+ var dom = $('.mission-list-item.' + item.id)
|
|
|
+ dom.removeClass('floating')
|
|
|
+ var baseX = -0.8 * rootFontSize
|
|
|
+
|
|
|
+ // 终点坐标
|
|
|
+ var current = {
|
|
|
+ x: baseX + $('.progress-bar-content').width(),
|
|
|
+ y: $('.mission-list').height() - $('.blink-point').height() / 2
|
|
|
+ }
|
|
|
+
|
|
|
+ item.x = current.x / rootFontSize
|
|
|
+ item.y = current.y / rootFontSize
|
|
|
+ this.$nextTick(function () {
|
|
|
+ dom.addClass('exit')
|
|
|
+ })
|
|
|
+ },
|
|
|
onClickReceive: function (type, item) {
|
|
|
var _this = this
|
|
|
var status = false
|
|
|
if (type === 'schedule' && item.className === 'wait') {
|
|
|
status = true
|
|
|
- } else if (type === 'mission' && item.className === 'wait') {
|
|
|
+ } else if (type === 'mission' && item.complete) {
|
|
|
status = true
|
|
|
}
|
|
|
if (!status) {
|
|
@@ -456,20 +512,23 @@ var task = new Vue({
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
+ if (type === 'mission') {
|
|
|
+ this.leaveCanvas(item)
|
|
|
+ }
|
|
|
this.ajaxReceive({ type: type, value: item.id }, function (result, msg) {
|
|
|
if (result) {
|
|
|
switch (item.id) {
|
|
|
case 'subscribe': {
|
|
|
- this.$toast('已成功领取300剑鱼币')
|
|
|
+ _this.$toast('已成功领取300剑鱼币')
|
|
|
break
|
|
|
}
|
|
|
case 'invite': {
|
|
|
- this.$toast('已成功领取500剑鱼币')
|
|
|
+ _this.$toast('已成功领取500剑鱼币')
|
|
|
break
|
|
|
}
|
|
|
case 'improveInfo': {
|
|
|
// 留资
|
|
|
- this.$toast('已成功领取200剑鱼币')
|
|
|
+ _this.$toast('已成功领取200剑鱼币')
|
|
|
break
|
|
|
}
|
|
|
case '800': {
|
|
@@ -483,7 +542,7 @@ var task = new Vue({
|
|
|
}
|
|
|
_this.ajaxActiveStatus()
|
|
|
_this.ajaxProgress()
|
|
|
- _this.getMissionList()
|
|
|
+ // _this.getMissionList()
|
|
|
} else {
|
|
|
_this.$toast(msg)
|
|
|
}
|
|
@@ -508,6 +567,79 @@ var task = new Vue({
|
|
|
JyObj.openExternalLink(href, '使用帮助');
|
|
|
} catch (error) {}
|
|
|
}
|
|
|
+ },
|
|
|
+ onToolBoxAction: function (item) {
|
|
|
+ var platform = this.platform
|
|
|
+ var url = item.url[platform]
|
|
|
+ if (url) {
|
|
|
+ location.href = url
|
|
|
+ } else {
|
|
|
+ if (item.id === 'vip') {
|
|
|
+ // 微信超级订阅跳转
|
|
|
+ this.routerToVip()
|
|
|
+ } else if (item.id === 'manager') {
|
|
|
+ this.routerEntNiche()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ routerToVip: function () {
|
|
|
+ var loading = this.$toast.loading({ duration: 0 })
|
|
|
+ $.ajax({
|
|
|
+ url: '/subscribepay/orderListDetails/isVip?v=' + (+new Date()),
|
|
|
+ type: 'POST',
|
|
|
+ success: function (data) {
|
|
|
+ if (data.isvip) {
|
|
|
+ location.href = "/front/vipsubscribe/toSubVipSetPage";
|
|
|
+ } else {
|
|
|
+ location.href = "/front/vipsubscribe/introducePage";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ complete: function () {
|
|
|
+ loading.clear()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ routerEntNiche: function () {
|
|
|
+ var _this = this
|
|
|
+ var loading = this.$toast.loading({ duration: 0 })
|
|
|
+ $.ajax({
|
|
|
+ url: '/entnicheNew/buy/whetherbuy',
|
|
|
+ type: 'POST',
|
|
|
+ success: function (res) {
|
|
|
+ if (res.error_code === 0) {
|
|
|
+ loading.clear()
|
|
|
+ _this.redirectToEntNiche(res.data)
|
|
|
+ } else {
|
|
|
+ // 失败 提示
|
|
|
+ _this.$toast({
|
|
|
+ message: res.error_msg,
|
|
|
+ duration: 2000,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function () {}
|
|
|
+ })
|
|
|
+ },
|
|
|
+ redirectToEntNiche: function (data) {
|
|
|
+ // data.status为0,未绑定
|
|
|
+ // data.status为1,未购买
|
|
|
+ // data.status为2 已购买
|
|
|
+ // --isPower:未购买员工是否有权限进入商机管理页面
|
|
|
+ if (utils.isWeiXinBrowser) {
|
|
|
+ location.href = '/weixin/frontPage/entpc/free/entpc'
|
|
|
+ } else {
|
|
|
+ if (data.status === 2 || data.isPower) {
|
|
|
+ // 跳转到商机管理使用页面
|
|
|
+ if (data.isNew) {
|
|
|
+ location.href = '/page_entniche_new/home'
|
|
|
+ } else {
|
|
|
+ location.href = '/page_entniche/home'
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 跳转到创建企业页面
|
|
|
+ location.href = '/jyapp/frontPage/enptc/sess/app_enptc'
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
})
|