|
@@ -477,7 +477,7 @@ var vm = new Vue({
|
|
|
for (var k in this.moduleShow) {
|
|
|
this.moduleShow[k] = false
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
// 判断阅读原文留资显示
|
|
|
if (vm.source = "article_original" ){
|
|
@@ -496,7 +496,7 @@ var vm = new Vue({
|
|
|
} else if(source.indexOf('jyarticle_see3_plus_pc') > -1){
|
|
|
this.dialogTitle = text
|
|
|
this.dialogTitleTop = '完善信息'
|
|
|
- }
|
|
|
+ }
|
|
|
// else if (source.indexOf("article_collection") > -1){
|
|
|
// this.dialogTitle = text
|
|
|
// this.dialogTitleTop = "为给您匹配精准的推荐信息,请完善个人信息"
|
|
@@ -537,7 +537,7 @@ var vm = new Vue({
|
|
|
this.calcTitleText(source)
|
|
|
this.source = source
|
|
|
var _this = this
|
|
|
-
|
|
|
+
|
|
|
$.ajax({
|
|
|
type:'POST',
|
|
|
url:'/salesLeads/retainedCapital',
|
|
@@ -546,33 +546,46 @@ var vm = new Vue({
|
|
|
},
|
|
|
success:function (res) {
|
|
|
// 判断当前信息否在其他页面留资 如果全部留资 直接弹窗提交成功
|
|
|
- if(res.info.branch && res.info.company && res.info.name && res.info.phone &&res.info.position){
|
|
|
+ var checkKeys = ['name', 'phone', 'company', 'branch', 'position']
|
|
|
+ var result = checkRequiredKeys(checkKeys, res.info)
|
|
|
+ if (result) {
|
|
|
_this.showForm = false
|
|
|
res.data.retainedCapital = false
|
|
|
- if(source == 'member_freeuse') {
|
|
|
- _this.showSuccess = true
|
|
|
- } else if(source=="jyarticle_see3_plus_pc") {
|
|
|
- // 如果留资正常 点击消失
|
|
|
- $(".detail-nj-btn").click(function(){
|
|
|
- $(".mask-zzz").hide()
|
|
|
- })
|
|
|
- } else if(source == 'article_original') {
|
|
|
- // 如果是阅读原文点击的 留完用户资料执行原点击操作
|
|
|
- _this.showSuccess = false
|
|
|
- } else if (source == 'article_collection'){
|
|
|
- _this.showSuccess = false
|
|
|
- } else if (source == 'pc_index_bottom_adv') {
|
|
|
- location.href = '/big/page/index'
|
|
|
- } else if (source.indexOf('_freeuser') > -1) {
|
|
|
- _this.showSuccess = true
|
|
|
- } else {
|
|
|
- _this.showSuccess = true
|
|
|
+ callback && callback(res)
|
|
|
+ switch (source) {
|
|
|
+ case 'member_freeuse': {
|
|
|
+ _this.showSuccess = true
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 'jyarticle_see3_plus_pc': {
|
|
|
+ $(".detail-nj-btn").click(function(){
|
|
|
+ $(".mask-zzz").hide()
|
|
|
+ })
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 'article_original': {
|
|
|
+ _this.showSuccess = false
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 'article_collection': {
|
|
|
+ _this.showSuccess = false
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 'pc_index_bottom_adv': {
|
|
|
+ location.href = '/big/page/index'
|
|
|
+ break
|
|
|
+ }
|
|
|
+ default: {
|
|
|
+ if (source.indexOf('_freeuser') > -1) {
|
|
|
+ _this.showSuccess = true
|
|
|
+ } else {
|
|
|
+ _this.showSuccess = true
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- } else {
|
|
|
- res.data.retainedCapital = true
|
|
|
- }
|
|
|
- if (res.data) {
|
|
|
+ } else if (res.data) {
|
|
|
window.isRetained = res.data.retainedCapital
|
|
|
+ _this.isForce = res.data.fource
|
|
|
if (res.data.retainedCapital) {
|
|
|
_this.showForm = true
|
|
|
_this.getOldInfo()
|
|
@@ -580,7 +593,6 @@ var vm = new Vue({
|
|
|
} else {
|
|
|
callback && callback(res)
|
|
|
}
|
|
|
- _this.isForce = res.data.fource
|
|
|
}
|
|
|
}
|
|
|
})
|