|
@@ -42,9 +42,7 @@ var vm = new Vue({
|
|
|
},
|
|
|
conf: {
|
|
|
phoneReg: /^1[3-9]\d{9}$/
|
|
|
- },
|
|
|
- // 剑鱼币任务信息
|
|
|
- pointTaskInfo: {}
|
|
|
+ }
|
|
|
},
|
|
|
computed: {
|
|
|
someText: function () {
|
|
@@ -108,10 +106,6 @@ var vm = new Vue({
|
|
|
if (this.mode === 'mergeBind') {
|
|
|
this.needShowEntItem = false
|
|
|
}
|
|
|
- // 获取剑鱼币任务信息
|
|
|
- if(this.from === 'task' && this.type === 'bind'){
|
|
|
- this.getPointsTask()
|
|
|
- }
|
|
|
},
|
|
|
|
|
|
mounted: function () {
|
|
@@ -424,6 +418,7 @@ var vm = new Vue({
|
|
|
bindPhoneSuccess: function (state) {
|
|
|
var _this = this
|
|
|
if (state == 1) {
|
|
|
+ this.pointsTaskSuccessTip()
|
|
|
// 绑定手机号完成后,如果已经填写过公司。则不发送提交公司的请求
|
|
|
// 可以直接判断计算属性showEntItem,来判断需不需要填写公司
|
|
|
if (_this.showEntItem) {
|
|
@@ -443,9 +438,6 @@ var vm = new Vue({
|
|
|
this.setPhone(function (state) {
|
|
|
_this.bindPhoneSuccess(state)
|
|
|
})
|
|
|
- if(this.form === 'task'){
|
|
|
- this.pointsTaskSuccessTip()
|
|
|
- }
|
|
|
} else {
|
|
|
console.log('更换手机号...')
|
|
|
this.setPhone(function () {
|
|
@@ -477,29 +469,13 @@ var vm = new Vue({
|
|
|
// location.replace('/jyapp/jylab/mainSearch')
|
|
|
})
|
|
|
},
|
|
|
- // 获取剑鱼币数据
|
|
|
- getPointsTask: function() {
|
|
|
- var _this = this
|
|
|
- $.ajax({
|
|
|
- type: 'POST',
|
|
|
- url: '/jyActivity/task',
|
|
|
- success: function (res) {
|
|
|
- if (res.error_code == 0 && res.data) {
|
|
|
- var arr = res.data.taskType === 1 ? res.data.limitedTask : res.data.newbieTask
|
|
|
- var infoArr = arr.filter(function(item) {
|
|
|
- return item.type === 'bindPhone'
|
|
|
- })
|
|
|
- _this.pointTaskInfo = infoArr.length > 0 ? infoArr[0] : {}
|
|
|
- } else {
|
|
|
- _this.pointTaskInfo = {point: 0}
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
// 赚剑鱼币任务完成提示
|
|
|
pointsTaskSuccessTip () {
|
|
|
- var point = this.pointTaskInfo.point || 0
|
|
|
- this.showToast(`绑定手机号成功,获得${point}剑鱼币。`)
|
|
|
+ // 获取剑鱼币任务信息
|
|
|
+ if(this.from === 'task' && this.type === 'bind'){
|
|
|
+ var point = utils.getParam('point') || 0
|
|
|
+ this.showToast(`绑定手机号成功,获得${point}剑鱼币。`)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
})
|