Commit 6dc985aa authored by 5359's avatar 5359

添加功能模块

parent 699e94ab
This diff is collapsed.
......@@ -301,7 +301,20 @@ export default {
'target': null,
'applicationFlag': 'N',
'appCode': 'HLS_APP',
}
},
{
'functionId': 66,
'functionCode': '500',
'functionName': '招行聚合支付',
'functionIcon': require('@/assets/home-manager/cmbpay_logo.png'),
'functionState': 'cmbPolyPay',
'prodFlag': 'Y',
'enableFlag': 'Y',
'functionType': 'local',
'target': null,
'applicationFlag': 'N',
'appCode': 'HLS_APP',
},
],
},
/* {
......
......@@ -22,16 +22,9 @@
<div class="middle-box">
<header>常用应用</header>
<div class="function">
<function-item
v-for="item in functionList"
:key="item.functionId"
:functionIcon="item.functionIcon"
:functionName="item.functionName"
style="width:33.3%"
:data="item"
class="function-item vue-1px"
@clickFunction="goFunctionHome"
/>
<function-item v-for="item in functionList" :key="item.functionId" :functionIcon="item.functionIcon"
:functionName="item.functionName" :data="item" style="width:33.3%" class="function-item vue-1px"
@clickFunction="goFunctionHome" />
<!-- <div class="function-item" @click="goAllFunction">
<img src="../assets/image/home/functionMore@2x.png">
</div>-->
......@@ -62,11 +55,11 @@
</template>
<script>
import functionState from "./functionState";
import {getUrlParam} from "@/scripts/utils";
import functionState from './functionState'
import { getUrlParam } from '@/scripts/utils'
export default {
data() {
export default {
data () {
return {
imgList: [],
recommendList: [],
......@@ -76,9 +69,9 @@
area: {},
box1: {},
box2: {},
searchInput: "",
subscribe: false
};
searchInput: '',
subscribe: false,
}
},
beforeCreate: function () {
},
......@@ -87,51 +80,50 @@
// window.localStorage.setItem('user_id', 2009)
// this.imgList = [...functionState.bannerList]
// this.recommendList = [...functionState.recommendList]
this.moduleSeparateList = [...functionState.moduleSeparateList];
this.moduleSeparateList = [...functionState.moduleSeparateList]
this.moduleSeparateList.forEach(item => {
this.functionList = this.functionList.concat(item.functions);
});
this.functionList = this.functionList.concat(item.functions)
})
this.getToken().then(res => {
this.wxConfig();
this.wxConfig()
// if (window.localStorage.openId) {
// this.getWxUserInfo(window.localStorage.openId);
// }
// this.noticeQuery()
// 注意,此处用户个人信息是写死的user_id 后续项目实施中根据以下代码实时获取企业通讯录个人信息
var code = getUrlParam("code");
var code = getUrlParam('code')
// code = "111";
if (code) {
this.getOpenId(code);
this.getOpenId(code)
}
this.subscribe = window.localStorage.subscribe;
});
this.subscribe = window.localStorage.subscribe
})
},
updated: function () {
},
methods: {
// 调用微信接口的基础配置
wxConfig() {
let clientUrl = "";
let u = navigator.userAgent;
let isAndroid = u.indexOf("Android") > -1 || u.indexOf("Linux") > -1; //g
let isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
wxConfig () {
let clientUrl = ''
let u = navigator.userAgent
let isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1 // g
let isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/) // ios终端
if (isAndroid) {
//这个是安卓操作系统
console.log("机型:android");
clientUrl = location.href;
// 这个是安卓操作系统
console.log('机型:android')
clientUrl = location.href
}
if (isIOS) {
//这个是ios操作系统
console.log("机型:ios");
clientUrl = location.href.split("#")[0];
// 这个是ios操作系统
console.log('机型:ios')
clientUrl = location.href.split('#')[0]
}
// let url = $config.rootPath + '/js/sdk/getWxConfig?wxCode=' + $config.wxCode + '&clientUrl=' + clientUrl
let url = process.env.basePathRl + "getSignature";
let url = process.env.basePathRl + 'getSignature'
let param = {
apiKey: "handexinxi",
url: clientUrl
};
apiKey: 'handexinxi',
url: clientUrl,
}
hlsHttp.post(url, param).then(function (res) {
wx.config({
beta: true,
......@@ -141,18 +133,18 @@
nonceStr: res.result.nonceStr, // 必填,生成签名的随机串
signature: res.result.signature, // 必填,签名,见附录1
jsApiList: [
"chooseImage",
"previewImage",
"downloadImage",
"getLocalImgData",
"uploadImage",
"hideOptionMenu"
] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
});
'chooseImage',
'previewImage',
'downloadImage',
'getLocalImgData',
'uploadImage',
'hideOptionMenu',
], // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
})
wx.ready(function () {
wx.hideOptionMenu();
});
});
wx.hideOptionMenu()
})
})
},
// search () {
// let vm = this
......@@ -182,15 +174,15 @@
// },
// })
// },
getToken() {
let vm = this;
let url = process.env.loginPathRl + "admin";
let param = {};
getToken () {
let vm = this
let url = process.env.loginPathRl + 'admin'
let param = {}
return vm.hlsHttp.post(url, param).then(function (res) {
window.localStorage.setItem("access_token_rl", res.access_token);
});
window.localStorage.setItem('access_token_rl', res.access_token)
})
},
goFunctionHome(data) {
goFunctionHome (data) {
// if (this.subscribe) {
// this.$router.push({
// name: data.functionState
......@@ -204,76 +196,76 @@
// }
if (!this.subscribe) {
hlsPopup.showPopup({
title: "提示",
content: "未关注公众号,请先关注后再进入!",
title: '提示',
content: '未关注公众号,请先关注后再进入!',
onConfirm: function () {
}
},
})
} else {
"Y" == window.localStorage.authFlag || "UserRegister" == data.functionState|| "ChinaUnionPay" == data.functionState ? this.$router.push({name: data.functionState}) : hlsPopup.showPopup({
title: "提示",
content: "当前用户未完成注册,请先注册!",
window.localStorage.authFlag == 'Y' || data.functionState == 'UserRegister' || data.functionState == 'ChinaUnionPay' /* || data.functionState == 'CmbPolyPay' */ ? this.$router.push({ name: data.functionState }) : hlsPopup.showPopup({
title: '提示',
content: '当前用户未完成注册,请先注册!',
onConfirm: function () {
}
},
})
}
},
// moreRecommend () {
// console.log('go moreRecommend')
// },
getOpenId(code) {
let vm = this;
let url = process.env.basePathRl + "getOpenId";
getOpenId (code) {
let vm = this
let url = process.env.basePathRl + 'getOpenId'
let param = {
apiKey: "handexinxi",
code: code
};
apiKey: 'handexinxi',
code: code,
}
// window.localStorage.openId = "oBdoRwP0WSbegPOoe9WTEMPkKsWQ";
// vm.getWxUserInfo(window.localStorage.openId);
vm.hlsHttp.post(url, param).then(function (res) {
if (res.resultCode == "00") {
window.localStorage.openId = res.result;
if (res.resultCode == '00') {
window.localStorage.openId = res.result
if (window.localStorage.openId) {
vm.getWxUserInfo(window.localStorage.openId);
vm.getWxUserInfo(window.localStorage.openId)
vm.getUserInfo(window.localStorage.openId)
}
}
});
})
},
getWxUserInfo(id) {
let vm = this;
let url = process.env.basePathRl + "getWxUserInfo";
getWxUserInfo (id) {
let vm = this
let url = process.env.basePathRl + 'getWxUserInfo'
let params = {
apiKey: "handexinxi",
openid: id
apiKey: 'handexinxi',
openid: id,
// openid: "oBdoRwI9gj9Brbe9iqlDCg5G2dDc"
};
}
// window.localStorage.openId = "1234567"
vm.hlsHttp.post(url, params).then(function (res) {
if (res.resultCode == "00") {
vm.subscribe = window.localStorage.subscribe = res.result.subscribe;
if (res.resultCode == '00') {
vm.subscribe = window.localStorage.subscribe = res.result.subscribe
// console.log("vvvv", res.result.subscribe);
}
});
})
},
getUserInfo: function (openId) {
let vm = this,
url = process.env.rootPath + "/sign/info/hclc/query/by/openid?openId=" + openId;
url = process.env.rootPath + '/sign/info/hclc/query/by/openid?openId=' + openId
vm.$post(url).then(function (res) {
if (res.rows.length > 0) {
var results = res.rows[0];
vm.authFlag = window.localStorage.authFlag = results.authFlag;
var results = res.rows[0]
vm.authFlag = window.localStorage.authFlag = results.authFlag
}
})
}
}
};
},
},
}
</script>
<style lang="less" scoped type="text/less">
@import "../styles/vue-1px";
@import "../styles/vue-1px";
#home {
#home {
.top-box {
// height: 264px;
width: 100%;
......@@ -500,5 +492,5 @@
}
}
}
}
}
</style>
......@@ -5,7 +5,6 @@ import ModuleFunction from '@/pages/homeManager/module-function'
// test工具类
import HlsPopup from '@/pages/hlsPopup'
// 合同
import ContractMaintenList from '@/pages/applications/contractMainten/contract-mainten-list'
import ContractMainten from '@/pages/applications/contractMainten/contract-mainten'
......@@ -13,7 +12,6 @@ import ContractSignList from '@/pages/applications/contractSign/contract-sign-li
import ContractSign from '@/pages/applications/contractSign/contract-sign'
import EsignPicture from '@/pages/applications/contractSign/esignPicture'
// 电子签章
import Esign from '@/pages/applications/esign/Esign'
import BankVerified from '@/pages/applications/esign/BankVerified'
......@@ -26,15 +24,13 @@ import UserRegister from '@/pages/applications/userRegisters/userRegister'
// 企业注册
import CompanyRegister from '@/pages/applications/userRegisters/companyRegister'
import ReadonlyCompanyReg from '@/pages/applications/userRegisters/readonlyCompanyReg'
//授权经办人
// 授权经办人
import AuthorizedAgent from '@/pages/applications/userRegisters/authorizedAgent'
// 个人注册
import PersonalRegister from '@/pages/applications/userRegisters/personalRegister'
import ReadonlyPersonalReg from '@/pages/applications/userRegisters/readonlyPersonalReg'
Vue.use(Router)
// 电子签约
import ElectronicContract from '@/pages/applications/electronicContract/electronicContract'
import ElectronicContractList from '@/pages/applications/electronicContract/electronicContractList'
......@@ -44,10 +40,14 @@ import ContractDownloadList from '@/pages/applications/contractDownload/contract
// 图片上传微信服务器
import UploadImg from '@/pages/applications/userRegisters/uploadImg'
import UploadImage from '@/pages/applications/userRegisters/uploadImage'
//银联电子签约
// 银联电子签约
import ChinaUnionPay from '@/pages/applications/chinaUnionPay/chinaUnionPay'
// 银联电子签约
import CmbPolyPay from '@/pages/applications/cmbPolyPay/cmbPolyPay'
Vue.use(Router)
// 全局跳转路由方法
Router.prototype.pushPage = function(param, bool) {
Router.prototype.pushPage = function (param, bool) {
debugger
let key = true
if (bool === undefined) {
......@@ -107,15 +107,15 @@ export default new Router({
component: UserRegister,
name: 'UserRegister',
meta: {
keepAlive: false
}
keepAlive: false,
},
},
{
path: '/UserRegister/PersonalRegister',
component: PersonalRegister,
name: 'PersonalRegister',
meta: {
keepAlive: false
keepAlive: false,
},
},
{
......@@ -123,7 +123,7 @@ export default new Router({
component: ReadonlyPersonalReg,
name: 'ReadonlyPersonalReg',
meta: {
keepAlive: true
keepAlive: true,
},
},
......@@ -132,7 +132,7 @@ export default new Router({
component: CompanyRegister,
name: 'CompanyRegister',
meta: {
keepAlive: false
keepAlive: false,
},
},
{
......@@ -140,7 +140,7 @@ export default new Router({
component: ReadonlyCompanyReg,
name: 'ReadonlyCompanyReg',
meta: {
keepAlive: true
keepAlive: true,
},
},
// 微信上传图片
......@@ -149,7 +149,7 @@ export default new Router({
component: UploadImg,
name: 'UploadImg',
meta: {
keepAlive: true
keepAlive: true,
},
},
......@@ -158,7 +158,7 @@ export default new Router({
component: UploadImage,
name: 'UploadImage',
meta: {
keepAlive: true
keepAlive: true,
},
},
// 电子签约
......@@ -168,7 +168,7 @@ export default new Router({
component: ElectronicContract,
name: 'ElectronicContract',
meta: {
keepAlive: false
keepAlive: false,
},
},
{
......@@ -176,7 +176,7 @@ export default new Router({
component: ElectronicContractList,
name: 'ElectronicContractList',
meta: {
keepAlive: true
keepAlive: true,
},
},
// 电子合同下载
......@@ -185,7 +185,7 @@ export default new Router({
component: ContractDownload,
name: 'ContractDownload',
meta: {
keepAlive: false
keepAlive: false,
},
},
// 电子合同下载
......@@ -194,7 +194,7 @@ export default new Router({
component: ContractDownloadList,
name: 'ContractDownloadList',
meta: {
keepAlive: false
keepAlive: false,
},
},
// 授权经办人
......@@ -203,7 +203,7 @@ export default new Router({
component: AuthorizedAgent,
name: 'AuthorizedAgent',
meta: {
keepAlive: false
keepAlive: false,
},
},
// 银联电子签约
......@@ -212,15 +212,20 @@ export default new Router({
component: ChinaUnionPay,
name: 'ChinaUnionPay',
meta: {
keepAlive: false
keepAlive: false,
},
},
// 招行聚合支付
{
path: '/CmbPolyPay',
component: CmbPolyPay,
name: 'CmbPolyPay',
meta: {
keepAlive: false,
},
},
],
scrollBehavior(to, from, savedPosition) {
scrollBehavior (to, from, savedPosition) {
if (to.hash) {
return {
selector: to.hash,
......
File added
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment