Browse Source

commit -m 推送统计

zhengjinyi 1 year ago
parent
commit
fcd770dc83
2 changed files with 129 additions and 103 deletions
  1. 127 101
      pages/login/apply.vue
  2. 2 2
      services/config.env.js

+ 127 - 101
pages/login/apply.vue

@@ -315,6 +315,7 @@ import { mapMutations } from 'vuex'
 import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
 import { beautyList, beautyLists, mentuzCampNullList, medicaCampNullList } from '@/common/json/data.json.js' //本地数据
 import { uploadFileImage } from '@/services/public.js'
+import wxLogin from '@/common/config/wxLogin.js'
 export default {
 	components: {
 		mpvueCityPicker
@@ -385,96 +386,118 @@ export default {
 		}
 	},
 	onLoad(option) {
-		this.clubStatus = option.clubStatus ? option.clubStatus : ''
-		this.organizationInfo()
+		this.handleInfo(option)
 	},
 	methods: {
-		hanldNavigateBack() {
-			this.$util.modal('', '资料尚未提交审核,确定放弃升级吗?', '确定', '取消', true, () => {
-				uni.navigateBack({
-					delta: 1
-				})
-			})
+		async handleInfo(option){
+			if(option.userBehaviorType === 'model'){
+				// 这是从公众号模板消息进入
+				wxLogin.wxLoginAuthorize()// 执行快捷授权登录
+				this.initGetStotage()
+				setTimeout(()=>{
+					this.userClubBehaviorInfo()
+				},1000)
+			}else{
+				// 正常进入升级资料
+				this.clubStatus = option.clubStatus ? option.clubStatus : ''
+				this.initGetStotage()
+			}
 		},
-		organizationInfo() {
-			this.$api.getStorage().then(resolve => {
-				this.userId = resolve.userId ? resolve.userId : 0
-				this.UserService.OrganizationUpdateModifyInfo({ userId: this.userId })
-					.then(response => {
-						let organizationClub = response.data.club
-						let organizationUser = response.data.user
-						if (organizationUser.auditNoteList != null) {
-							this.errorList = organizationUser.auditNoteList
-						}
-						this.contractEmail = organizationClub.contractEmail
-						this.linkManIdentity = organizationClub.linkManIdentity ? organizationClub.linkManIdentity : 0
-						this.linkManIdentityText = this.linkManIdentity ? this.linkManFilters(this.linkManIdentity) : '请选择联系人身份'
-						this.clubId = organizationUser.clubId
-						if (this.contractEmail) {
-							this.isFirstAdds = false
-							this.clubName = this.$reg.checkData(organizationClub.name)
-						} else {
-							this.isFirstAdds = true
-							this.clubName = ''
-						}
-						this.shortName = this.$reg.checkData(organizationClub.shortName)
-						if (organizationClub.provinceId == '' || organizationClub.provinceId == null) {
-							this.addressData.provinceId = ''
-						} else {
-							this.addressData.provinceId = organizationClub.provinceId
-						}
-						if (organizationClub.cityId == '' || organizationClub.cityId === null) {
-							this.addressData.cityId = ''
-						} else {
-							this.addressData.cityId = organizationClub.cityId
-						}
-						if (organizationClub.townId == '' || organizationClub.townId == null) {
-							this.addressData.townId = ''
-						} else {
-							this.addressData.townId = organizationClub.townId
-						}
-						this.addressData.address = organizationClub.provincialAddress
-							? organizationClub.provincialAddress
-							: '请选择机构所在地区'
-						this.addressData.addressDetail = this.$reg.checkData(organizationClub.address)
-						this.socialCreditCode = this.$reg.checkData(organizationClub.socialCreditCode)
-						this.firstClubType = organizationClub.firstClubType
-						this.organizationTypeText = organizationClub.firstClubType ? this.firstClubTypeText(this.firstClubType) : '请选择机构类型'
-						this.secondClubType = this.$reg.checkData(organizationClub.secondClubType)
-						this.businessLicense = this.$reg.checkData(organizationClub.businessLicense)
-						this.shopPhoto = this.$reg.checkData(organizationClub.shopPhoto)
-						this.medicalPracticeLicense = this.$reg.checkData(organizationClub.medicalPracticeLicense)
-						this.department = this.$reg.checkData(organizationClub.department)
-						if (organizationClub.mainProduct == '' || organizationClub.mainProduct == null) {
-							this.mentuzCampList = this.mentuzCampNullList
-							this.medicaCampList = this.medicaCampNullList
-						} else {
-							if (this.firstClubType == 1) {
-								this.mentuzCampList = this.setNewMainpro(organizationClub.mainProduct)
-								this.medicaCampList = this.medicaCampNullList
-							} else {
-								this.medicaCampList = this.setNewMainpro(organizationClub.mainProduct)
-								this.mentuzCampList = this.mentuzCampNullList
-							}
-							this.mainProduct = organizationClub.mainProduct
-						}
-						//机构类型
-						switch (this.secondClubType) {
-							case 1:
-								this.isDepartment = false
-								break
-							case 2:
-								this.isDepartment = true
-								break
-							case 3:
-								this.isDepartment = true
-								break
-						}
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
+		async initGetStotage() {
+			// 初始化查询机构资料信息
+			const userInfo = await this.$api.getStorage()
+			this.userId = userInfo.userId ? userInfo.userId : 0
+			this.organizationInfo()
+		},
+		async userClubBehaviorInfo(){
+			// 统计微信模板消息点击进入
+			// 获取路径
+			const pages = getCurrentPages()
+			const len = pages.length
+			const page = pages[len - 1]
+			const route = { path: '/' + page.route, fullPath: page.$page.fullPath, query: page.options, meta: {} }
+			try{
+				await this.UserService.userClubBehaviorInfo({ userId: this.userId,link:route.path, accessType:4,accessSource:1 })
+			}catch(error){
+				console.log('error',error)
+			}
+		},
+		async organizationInfo() {
+			try{
+				const res = await this.UserService.OrganizationUpdateModifyInfo({ userId: this.userId })
+				const data = res.data
+				const organizationClub = data.club
+				const organizationUser = data.user
+				if (organizationUser.auditNoteList != null) {
+					this.errorList = organizationUser.auditNoteList
+				}
+				this.contractEmail = organizationClub.contractEmail
+				this.linkManIdentity = organizationClub.linkManIdentity ? organizationClub.linkManIdentity : 0
+				this.linkManIdentityText = this.linkManIdentity ? this.linkManFilters(this.linkManIdentity) : '请选择联系人身份'
+				this.clubId = organizationUser.clubId
+				if (this.contractEmail) {
+					this.isFirstAdds = false
+					this.clubName = this.$reg.checkData(organizationClub.name)
+				} else {
+					this.isFirstAdds = true
+					this.clubName = ''
+				}
+				this.shortName = this.$reg.checkData(organizationClub.shortName)
+				if (organizationClub.provinceId == '' || organizationClub.provinceId == null) {
+					this.addressData.provinceId = ''
+				} else {
+					this.addressData.provinceId = organizationClub.provinceId
+				}
+				if (organizationClub.cityId == '' || organizationClub.cityId === null) {
+					this.addressData.cityId = ''
+				} else {
+					this.addressData.cityId = organizationClub.cityId
+				}
+				if (organizationClub.townId == '' || organizationClub.townId == null) {
+					this.addressData.townId = ''
+				} else {
+					this.addressData.townId = organizationClub.townId
+				}
+				this.addressData.address = organizationClub.provincialAddress
+					? organizationClub.provincialAddress
+					: '请选择机构所在地区'
+				this.addressData.addressDetail = this.$reg.checkData(organizationClub.address)
+				this.socialCreditCode = this.$reg.checkData(organizationClub.socialCreditCode)
+				this.firstClubType = organizationClub.firstClubType
+				this.organizationTypeText = organizationClub.firstClubType ? this.firstClubTypeText(this.firstClubType) : '请选择机构类型'
+				this.secondClubType = this.$reg.checkData(organizationClub.secondClubType)
+				this.businessLicense = this.$reg.checkData(organizationClub.businessLicense)
+				this.shopPhoto = this.$reg.checkData(organizationClub.shopPhoto)
+				this.medicalPracticeLicense = this.$reg.checkData(organizationClub.medicalPracticeLicense)
+				this.department = this.$reg.checkData(organizationClub.department)
+				if (organizationClub.mainProduct == '' || organizationClub.mainProduct == null) {
+					this.mentuzCampList = this.mentuzCampNullList
+					this.medicaCampList = this.medicaCampNullList
+				} else {
+					if (this.firstClubType == 1) {
+						this.mentuzCampList = this.setNewMainpro(organizationClub.mainProduct)
+						this.medicaCampList = this.medicaCampNullList
+					} else {
+						this.medicaCampList = this.setNewMainpro(organizationClub.mainProduct)
+						this.mentuzCampList = this.mentuzCampNullList
+					}
+					this.mainProduct = organizationClub.mainProduct
+				}
+				//机构类型
+				switch (this.secondClubType) {
+					case 1:
+						this.isDepartment = false
+						break
+					case 2:
+						this.isDepartment = true
+						break
+					case 3:
+						this.isDepartment = true
+						break
+				}
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
 		},
 		organizationUpdateInfo() {
 			//提交审核
@@ -565,13 +588,16 @@ export default {
 					Um_Key_SourcePage: '升级页面'
 				})
 			}
-			this.UserService.OrganizationRegister(params)
-				.then(response => {
-					this.isConfirmShow = true
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
+			this.confirmOrganizationRegister(params)
+		},
+		async confirmOrganizationRegister(params){
+			// 调用提交审核
+			try{
+				await this.UserService.OrganizationRegister(params)
+				this.isConfirmShow = true
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
 		},
 		handleClick() {
 			//隐藏提示弹窗
@@ -717,13 +743,6 @@ export default {
 			})
 			return arr.join('/')
 		},
-		// onBlurInput(e){//
-		// 	if(e.detail.value ===''){
-		// 		this.isDisabled = true
-		// 	}else{
-		// 		this.isDisabled = false
-		// 	}
-		// },
 		showAustomItem() {
 			this.isShowAustomItem = !this.isShowAustomItem
 		},
@@ -788,6 +807,13 @@ export default {
 			}
 			return map[value]
 		},
+		hanldNavigateBack() {
+			this.$util.modal('', '资料尚未提交审核,确定放弃升级吗?', '确定', '取消', true, () => {
+				uni.navigateBack({
+					delta: 1
+				})
+			})
+		},
 	},
 	onShow() {
 		if (this.isPreviewImage) {

+ 2 - 2
services/config.env.js

@@ -5,8 +5,8 @@ if(process.env.NODE_ENV === 'development'){
     // URL_CONFIG = 'http://192.168.2.68:18002'	 //涛涛联调地址
     // URL_CONFIG = 'http://192.168.2.102:18002' //志国联调地址
     // URL_CONFIG = 'http://192.168.2.103:18002'    //陈凯联调地址
-    // URL_CONFIG = 'https://core-b.caimei365.com' 
-    URL_CONFIG = 'https://core.caimei365.com'    
+    URL_CONFIG = 'https://core-b.caimei365.com' 
+    // URL_CONFIG = 'https://core.caimei365.com'    
 }else{
     // 生产环境
     // URL_CONFIG = 'https://core-b.caimei365.com'