提交 71f0e77a 编写于 作者: guangjun.yang's avatar guangjun.yang

申请逻辑修改

上级 86acc5e7
...@@ -8,11 +8,16 @@ import '@/utils/rem' // 引入自适应 ...@@ -8,11 +8,16 @@ import '@/utils/rem' // 引入自适应
import '@/utils/yqy-bridge' // 移动端服务 import '@/utils/yqy-bridge' // 移动端服务
// import FastClick from 'fastclick' // import FastClick from 'fastclick'
import vueFilters from '@/utils/filter' import vueFilters from '@/utils/filter'
// import VConsole from 'vconsole/dist/vconsole.min.js' import VConsole from 'vconsole/dist/vconsole.min.js'
// if(!(process.env.BUILD_ENV === 'uat' || process.env.BUILD_ENV === 'pro')) { import BuriedPoint,{ sendBuriedData} from 'web-buried-point';
import Vant from 'vant';
import 'vant/lib/index.css';
if(!(process.env.BUILD_ENV === 'uat' || process.env.BUILD_ENV === 'pro')) {
// if(!(process.env.BUILD_ENV === 'pro')) { // if(!(process.env.BUILD_ENV === 'pro')) {
// let vConsole = new VConsole() // 初始化 let vConsole = new VConsole() // 初始化
// } }
// 可调试 // 可调试
// Vue.config.devtools = true; // Vue.config.devtools = true;
...@@ -53,7 +58,6 @@ Vue.mixin({ ...@@ -53,7 +58,6 @@ Vue.mixin({
}) })
// import './plugins'; // import './plugins';
import BuriedPoint,{ sendBuriedData} from 'web-buried-point';
// import { buriedURL } from './apiConfig'; // import { buriedURL } from './apiConfig';
let domain = ''; let domain = '';
if (process.env.BUILD_ENV === 'prod') { if (process.env.BUILD_ENV === 'prod') {
...@@ -74,8 +78,6 @@ Vue.use(BuriedPoint, { ...@@ -74,8 +78,6 @@ Vue.use(BuriedPoint, {
}); });
Vue.prototype.$sendBuriedData = sendBuriedData; Vue.prototype.$sendBuriedData = sendBuriedData;
import Vant from 'vant';
import 'vant/lib/index.css';
Vue.use(Vant); Vue.use(Vant);
new Vue({ new Vue({
......
...@@ -17,8 +17,9 @@ service.interceptors.request.use(config => { ...@@ -17,8 +17,9 @@ service.interceptors.request.use(config => {
if(config.data.token){ if(config.data.token){
config.headers['token'] = config.data.token || '0F32D60C3D7042158BCF1FB574E482BE' config.headers['token'] = config.data.token || '0F32D60C3D7042158BCF1FB574E482BE'
if( process.env.BUILD_ENV == "development" ){ // 本地开发环境 if( process.env.BUILD_ENV == "development" ){ // 本地开发环境
config.headers['token'] = 'A92C95FD752C413FA3244767177344B7' || 'F5CE3BAEC4934864B1022C1C4D39EB40'; config.headers['token'] = 'C85C482D4E854364815C85485C6277F1' || 'F5CE3BAEC4934864B1022C1C4D39EB40';
} }
delete config.data.token;
} }
config.headers['deviceInfo'] = JSON.stringify({ "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": '10' }) config.headers['deviceInfo'] = JSON.stringify({ "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": '10' })
......
...@@ -25,8 +25,8 @@ function getConfigByEnvType(urlType) { ...@@ -25,8 +25,8 @@ function getConfigByEnvType(urlType) {
// 日期与时间解析函数 // 日期与时间解析函数
export function parseTime(time, cFormat) { export function parseTime(time, cFormat) {
if (arguments.length === 0) { if (arguments.length === 0 || !time) {
return null return ''
} }
const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}' const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
let date let date
...@@ -118,3 +118,22 @@ export function deepCopy(obj) { ...@@ -118,3 +118,22 @@ export function deepCopy(obj) {
export function mergeObjs(...ojbs){ export function mergeObjs(...ojbs){
} }
export function gotoPage(context, pageUrl) {
if(__isWeb) {
context.$router.push(pageUrl)
} else {
let paramList = [
{
key: "pageUrl",
value: getWebPageUrl(pageUrl),
type: 4,
seqNo: 1
}
];
rocNative.dispatchEventByModuleCode({
modeCode: "M300",
jsonString: paramList
});
}
}
\ No newline at end of file
...@@ -12,7 +12,7 @@ module.exports = { ...@@ -12,7 +12,7 @@ module.exports = {
if(this.$route !== undefined) { if(this.$route !== undefined) {
query = this.$route.query query = this.$route.query
} }
this.token = this.getUrlKey('token') || (query && query.token) || 'A92C95FD752C413FA3244767177344B7' this.token = this.getUrlKey('token') || (query && query.token) || 'C85C482D4E854364815C85485C6277F1'
}, },
mounted() { mounted() {
......
...@@ -4,38 +4,9 @@ ...@@ -4,38 +4,9 @@
e.rocNative = { e.rocNative = {
// 参数说明 e:回传回来的移动端服务名称; t:前端自己传递的回调JS方法 // 参数说明 e:回传回来的移动端服务名称; t:前端自己传递的回调JS方法
__nativeCall: function (e, t, n) { __nativeCall: function (e, t, n) {
// if(t == '__refresh'){ if (window[t]) {
// console.log('!__refresh: ',t,n);
// __refresh(n);
// // return;
// }
if( window[t] ){
window[t](n) window[t](n)
} }
// if(t == '__getUserInfo64Comp') {
// __getUserInfo64Comp(n);
// }
// if(t == '__getUserInfo'){
// __getUserInfo(n);
// // return;
// }
// if(t == '__getUserInfo4Comp'){
// __getUserInfo4Comp(n);
// // return;
// }
// if(t == '__getUserInfo4Coop'){
// __getUserInfo4Coop(n);
// // return;
// }
// if (t == '__sendBuriedPoint') {
// __sendBuriedPoint(n);
// // return
// }
// if (t == '__openErrorDebug') {
// __openErrorDebug(n);
// // return
// }
}, },
__callNative: function (t, a, o) { __callNative: function (t, a, o) {
"function" == typeof o && (n++ , i[n] = o); "function" == typeof o && (n++ , i[n] = o);
...@@ -82,7 +53,7 @@ ...@@ -82,7 +53,7 @@
}) })
} }
}) })
}("gotoLogin", "dispatchEventByModuleCode", "gotoAuthentication", "shareWechat", "backPreviousPage", "bindingWechat", "getDeviceInfo", "goBack", "appBuryingPointEntrust", "getAuthPermission", "getAppVersionCode", "getToken", "gotoNewActivity", "gotoNewActivityWithParams", "gotoNewWebActivity", "gotoYidianActivity", "readMessage", "openFiveMintusAudio", "getStatusBarSize", "showNativeDialog", "showNativeToast", "gotoViewTop", "appInit", "checkPermissions", "getStatusBarHeight", "setTabMiniIcon", "getUserInfo", "pauseAudioView", "sendBuriedPoint", "openErrorDebug", "upGradeVersion","getLocalData"); }("gotoLogin", "dispatchEventByModuleCode", "gotoAuthentication", "shareWechat", "backPreviousPage", "bindingWechat", "getDeviceInfo", "goBack", "appBuryingPointEntrust", "getAuthPermission", "getAppVersionCode", "getToken", "gotoNewActivity", "gotoNewActivityWithParams", "gotoNewWebActivity", "gotoYidianActivity", "readMessage", "openFiveMintusAudio", "getStatusBarSize", "showNativeDialog", "showNativeToast", "gotoViewTop", "appInit", "checkPermissions", "getStatusBarHeight", "setTabMiniIcon", "getUserInfo", "pauseAudioView", "sendBuriedPoint", "openErrorDebug", "upGradeVersion", "getLocalData");
if (e.__rocAndroid) { if (e.__rocAndroid) {
e.__isAndroid = true e.__isAndroid = true
e.__isIOS = false e.__isIOS = false
...@@ -96,7 +67,7 @@ ...@@ -96,7 +67,7 @@
e.__isIOS = false e.__isIOS = false
e.__isWeb = true e.__isWeb = true
} }
if(window.__isIOS){ if (window.__isIOS) {
rocNative.appInit() rocNative.appInit()
} }
}(window); }(window);
此差异已折叠。
...@@ -38,14 +38,14 @@ export default { ...@@ -38,14 +38,14 @@ export default {
formData: { formData: {
creditId: "", creditId: "",
id: "", id: "",
name: "测试", name: "",
idCardNumber: "", idCardNumber: "",
icCardNumber: "", icCardNumber: "",
}, },
projectId: "", // projectId: "",
token: "A92C95FD752C413FA3244767177344B7", token: "C85C482D4E854364815C85485C6277F1",
buttonStyleType: 'disabled', buttonStyleType: 'disabled',
from: "outer", from: "native",
isBlack: true, isBlack: true,
bgColor: "#fff", bgColor: "#fff",
navTitle: "申请学分", navTitle: "申请学分",
...@@ -72,32 +72,64 @@ export default { ...@@ -72,32 +72,64 @@ export default {
} }
}, },
created() { created() {
// 前一页面传projectId,token let _this = this;
this.projectId = this.$route && this.$route.query && this.$route.query.projectId || 393; window.__getUserInfoInCEdit = function(param) {
this.formData.id = this.projectId; _this.token = param.userToken;
_this.getUserInfoByToken();
_this.getLatestApplyRecord();
};
window.__refresh = function() {
_this.getUserInfo();
};
// 前一页面传creditId
// this.projectId = this.$route && this.$route.query && this.$route.query.projectId || '';
this.from = this.$route && this.$route.query && this.$route.query.from || this.from;
this.creditId = this.$route && this.$route.query && this.$route.query.creditId || 393;
// this.formData.id = this.projectId;
this.formData.creditId = this.creditId;
this.token = this.$route && this.$route.query && this.$route.query.token || this.token || '' this.token = this.$route && this.$route.query && this.$route.query.token || this.token || ''
if (__isWeb) {
this.getUserInfoByToken(); this.getUserInfoByToken();
this.getLatestApplyRecord();
} else {
this.getUserInfo()
}
}, },
methods: { methods: {
getUserInfo() {
rocNative.getUserInfo({
__funcName: "__getUserInfoInCEdit"
});
},
// 提交申请 // 提交申请
applyCredit() { applyCredit() {
let _this = this;
let param = { let param = {
...this.formData, ...this.formData,
token: this.token, token: this.token,
setEntry: true setEntry: true
}; };
// this.GET("cme/credit/certificate/list", param).then(res => {
this.POST("cme/credit/apply", param).then(res => { this.POST("cme/credit/apply", param).then(res => {
if(res.code == '000000') {
this.isShowDialog = true this.isShowDialog = true
}
})
},
// 最后一次提交信息:获取用户的idCardNumber
getLatestApplyRecord() {
let param = {
token: this.token,
setEntry: true
};
this.POST("cme/credit/latestApplyRecord/" + this.creditId, param).then(res => {
this.formData.icCardNumber = res.data.icCardNumber;
}) })
}, },
// 根据token获取用户信息 // 根据token获取用户信息
getUserInfoByToken() { getUserInfoByToken() {
let _this = this;
let param = { let param = {
token: this.token, token: this.token,
setEntry: true setEntry: true
...@@ -105,7 +137,6 @@ export default { ...@@ -105,7 +137,6 @@ export default {
this.GET("cme/credit/doctor/info", param).then(res => { this.GET("cme/credit/doctor/info", param).then(res => {
this.formData.name = res.data.name; this.formData.name = res.data.name;
this.formData.idCardNumber = res.data.card; this.formData.idCardNumber = res.data.card;
this.formData.icCardNumber = res.data.icCardNumber;
this.isShowDialog = true this.isShowDialog = true
}) })
}, },
...@@ -113,13 +144,19 @@ export default { ...@@ -113,13 +144,19 @@ export default {
// 显示提交成功的提示信息 // 显示提交成功的提示信息
handlerDialogAction(type) { handlerDialogAction(type) {
this.isShowDialog = false; this.isShowDialog = false;
// 跳转到前一页面
if (window.__isWeb) {
this.$router.back(-1);
} else {
rocNative.goBack();
}
}, },
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss">
@import "../style/mixin"; @import "../style/mixin";
.credit-edit-wrapper { .credit-edit-wrapper {
.group { .group {
...@@ -132,6 +169,14 @@ export default { ...@@ -132,6 +169,14 @@ export default {
line-height: px2rem(21px); line-height: px2rem(21px);
color: #979899; color: #979899;
} }
.van-cell {
padding: px2rem(20px) 0 !important;
font-size: px2rem(15px) !important;
color: #373839 !important;
}
.van-cell__title span {
font-weight: 400 !important;
}
} }
</style> </style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册