Merge branch 'v5.0.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.0.0dev

This commit is contained in:
liaofei 2023-04-11 17:21:13 +08:00
commit 7ac4e930df
45 changed files with 321 additions and 189 deletions

View File

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>加载中</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.b0707a6a.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.6d549041.js></script><script src=/static/js/index.8f27223f.js></script></body></html>
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.b0707a6a.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.6d549041.js></script><script src=/static/js/index.468ab3a7.js></script></body></html>

23
crmeb/public/mobile.html Normal file
View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?=$siteName?></title>
<style>
#page {
width: 350px;
height: 90vh;
margin: 0 auto;
display: block;
position: absolute;
left: 50%;
-webkit-transform: translate(-50%,0);
-moz-transform: translate(-50%,0);
transform: translate(-50%,0);
}
</style>
</head>
<body>
<iframe id="page" src="<?=$siteUrl?>" frameborder="0"></iframe>
</body>
</html>

View File

@ -1,55 +0,0 @@
<!DOCTYPE html>
<html lang=zh-CN>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1">
<title>crmeb-PC端</title>
<meta name="Copyright" content="helang">
<link rel="shortcut icon" type="image/png" href="">
<meta name="keywords" content="">
<meta name="description" content="">
<style type="text/css">
body{
margin: 0;
background-color: #f3f3f3;
}
iframe{
width: 375px;
height: 667px;
background-color: #fff;
box-sizing: content-box;
border: none;
}
@media screen and (min-width: 450px) {
iframe {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
border: rgba(0,0,0,0.1) solid 1px;
border-radius: 4px;
}
}
</style>
<script type="text/javascript">
window.isPC = true;
window.onload = function(){
/* 监听电脑浏览器窗口尺寸改变 */
window.onresize = function(){
/* 窗口宽度 小于或等于420px 时,跳转回H5页面 */
if(window.innerWidth <= 420){
window.location.pathname = '/';
}
}
}
</script>
</head>
<body>
<iframe src="/"></iframe>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-annex-web_view-index"],{"70c4":function(t,n,e){"use strict";e.r(n);var i=e("9c60"),r=e.n(i);for(var u in i)"default"!==u&&function(t){e.d(n,t,(function(){return i[t]}))}(u);n["default"]=r.a},"9c60":function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e={data:function(){return{windowH:0,windowW:0,webviewStyles:{progress:{color:"transparent"}},url:""}},onLoad:function(t){this.url=t.url;try{var n=uni.getSystemInfoSync();this.windowW=n.windowWidth,this.windowH=n.windowHeight}catch(e){}}};n.default=e}).call(this,e("5a52")["default"])},c4bc:function(t,n,e){"use strict";var i;e.d(n,"b",(function(){return r})),e.d(n,"c",(function(){return u})),e.d(n,"a",(function(){return i}));var r=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("v-uni-web-view",{staticClass:"web-view",style:{width:t.windowW+"px",height:t.windowH+"px"},attrs:{"webview-styles":t.webviewStyles,src:t.url}})},u=[]},c5e8:function(t,n,e){"use strict";e.r(n);var i=e("c4bc"),r=e("70c4");for(var u in r)"default"!==u&&function(t){e.d(n,t,(function(){return r[t]}))}(u);var c,a=e("f0c5"),o=Object(a["a"])(r["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],c);n["default"]=o.exports}}]);

View File

@ -1 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-annex-web_view-index"],{"70c4":function(n,t,e){"use strict";e.r(t);var i=e("9c60"),r=e.n(i);for(var u in i)"default"!==u&&function(n){e.d(t,n,(function(){return i[n]}))}(u);t["default"]=r.a},9693:function(n,t,e){"use strict";var i;e.d(t,"b",(function(){return r})),e.d(t,"c",(function(){return u})),e.d(t,"a",(function(){return i}));var r=function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("v-uni-web-view",{staticClass:"web-view",style:{width:n.windowW+"px",height:n.windowH+"px"},attrs:{"webview-styles":n.webviewStyles,src:n.url}})},u=[]},"9c60":function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={data:function(){return{windowH:0,windowW:0,webviewStyles:{progress:{color:"transparent"}},url:""}},onLoad:function(n){this.url=n.url;try{var t=uni.getSystemInfoSync();this.windowW=t.windowWidth,this.windowH=t.windowHeight}catch(e){}}};t.default=i},c5e8:function(n,t,e){"use strict";e.r(t);var i=e("9693"),r=e("70c4");for(var u in r)"default"!==u&&function(n){e.d(t,n,(function(){return r[n]}))}(u);var c,o=e("f0c5"),a=Object(o["a"])(r["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],c);t["default"]=a.exports}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -24,8 +24,16 @@ Route::miss(function () {
case 'pages':
return view(app()->getRootPath() . 'public' . DS . 'index.html');
default:
if (!request()->isMobile() && is_dir(app()->getRootPath() . 'public' . DS . 'home') && !request()->get('type')) {
return view(app()->getRootPath() . 'public' . DS . 'home' . DS . 'index.html');
if (!request()->isMobile()) {
if (is_dir(app()->getRootPath() . 'public' . DS . 'home') && !request()->get('type')) {
return view(app()->getRootPath() . 'public' . DS . 'home' . DS . 'index.html');
} else {
if (request()->get('type')) {
return view(app()->getRootPath() . 'public' . DS . 'index.html');
} else {
return view(app()->getRootPath() . 'public' . DS . 'mobile.html', ['siteName' => sys_config('site_name'), 'siteUrl' => sys_config('site_url') . '/pages/index/index']);
}
}
} else {
return view(app()->getRootPath() . 'public' . DS . 'index.html');
}

View File

@ -62,6 +62,17 @@ export function routeDet(id) {
method: 'get',
});
}
/**
* 接口分类编辑
* @param {*} data
* @returns
*/
export function routeEdit(id, appName) {
return request({
url: `system/route_cate/${id}/edit?app_name=${appName}`,
method: 'get',
});
}
/**
* @description 修改名称

View File

@ -94,3 +94,13 @@ export function getRuleList() {
method: 'get',
});
}
/**
* @description 权限列表
*/
export function menusBatch(data) {
return request({
url: `setting/menus/batch`,
method: 'post',
data,
});
}

View File

@ -55,9 +55,9 @@ export default {
if (Number(this.$route.query.type) === 1) {
this.iframeUrl = `${moveLink}/pages/index/index?type=iframeWindow`;
} else {
this.iframeUrl = `https://v4.wuht.net/pages/index/index?type=iframeWindow`;
// this.iframeUrl = `https://v4.wuht.net/pages/index/index?type=iframeWindow`;
// this.iframeUrl = `${location.origin}/pages/index/index?type=iframeWindow`;
this.iframeUrl = `${location.origin}/pages/index/index?type=iframeWindow`;
}
diyGetInfo(parseInt(pageId)).then((datas) => {
let data = datas.data.info.value;

View File

@ -12,7 +12,7 @@
@on-visible-change="visible"
>
<Form ref="formValidate" :model="formValidate" :label-width="110" @submit.native.prevent>
<Row type="flex" :gutter="24">
<!-- <Row type="flex" :gutter="24">
<Col span="24">
<FormItem label="类型:">
<RadioGroup v-model="formValidate.auth_type" @on-change="changeRadio">
@ -23,14 +23,14 @@
</RadioGroup>
</FormItem>
</Col>
</Row>
</Row> -->
<Row type="flex" :gutter="24">
<Col v-bind="grid">
<FormItem :label="!authType ? '接口名称:' : '按钮名称:'" prop="menu_name">
<div class="add">
<Input v-model="formValidate.menu_name" :placeholder="!authType ? '请输入接口名称' : '请输入按钮名称'">
</Input>
<Button class="ml10 df" v-show="!authType" @click="getRuleList()" icon="ios-apps"></Button>
<!-- <Button class="ml10 df" v-show="!authType" @click="getRuleList()" icon="ios-apps"></Button> -->
</div>
</FormItem>
</Col>
@ -95,7 +95,7 @@
</RadioGroup>
</FormItem>
</Col>
<Col :xs="24">
<Col v-bind="grid">
<FormItem label="状态:">
<RadioGroup v-model="formValidate.is_show">
<Radio :label="item.value" v-for="(item, i) in isShowRadio" :key="i">

View File

@ -67,13 +67,15 @@
</i-switch>
</template>
</vxe-table-column>
<vxe-table-column field="date" title="操作" align="center" width="200" fixed="right">
<vxe-table-column field="date" title="操作" align="center" width="250" fixed="right">
<template v-slot="{ row, index }">
<span v-auth="['setting-system_menus-add']">
<a @click="addRoute(row)" v-if="row.auth_type === 1">添加权限</a>
<Divider type="vertical" v-if="row.auth_type === 1" />
<a @click="addE(row, '添加子菜单')" v-if="row.auth_type === 1">添加子菜单</a>
<a @click="addE(row, '添加规则')" v-else>添加规则</a>
<!-- <a @click="addE(row, '添加规则')" v-else>添加规则</a> -->
</span>
<Divider type="vertical" />
<Divider type="vertical" v-if="row.auth_type === 1" />
<a @click="edit(row, '编辑')">编辑</a>
<Divider type="vertical" />
<a @click="del(row, '删除规则')">删除</a>
@ -85,16 +87,57 @@
:formValidate="formValidate"
:titleFrom="titleFrom"
@getList="getList"
@selectRule="selectRule"
ref="menusFrom"
@clearFrom="clearFrom"
></menus-from>
<Modal
v-model="ruleModal"
scrollable
width="1100"
title="权限列表"
@on-ok="addRouters"
@on-cancel="ruleModal = false"
@on-visible-change="modalchange"
>
<div class="search-rule">
<Input
class="mr10"
v-model="searchRule"
placeholder="输入关键词搜索"
clearable
style="width: 300px"
ref="search"
@on-enter="searchRules"
@on-clear="searchRules"
/>
<Button class="mr10" type="primary" @click="searchRules">搜索</Button>
<Button @click="init">重置</Button>
</div>
<Tabs v-model="routeType" @on-click="changTab">
<TabPane label="基础接口" name="1"></TabPane>
<TabPane label="公共接口" name="0"></TabPane>
</Tabs>
<div class="rule">
<div
class="rule-list"
v-show="!arrs.length || arrs.includes(item.id)"
:class="{ 'select-rule': seletRouteIds.includes(item.id) }"
v-for="(item, index) in routeType == 1 ? foundationList : openList"
:key="index"
@click="selectRule(item)"
>
<div>接口名称:{{ item.real_name }}</div>
<div>请求方式:{{ item.method }}</div>
<div>接口地址:{{ item.rule }}</div>
</div>
</div>
</Modal>
</div>
</template>
<script>
import { mapState } from 'vuex';
import { getTable, menusDetailsApi, isShowApi, editMenus } from '@/api/systemMenus';
import { getTable, menusDetailsApi, isShowApi, editMenus, getRuleList, menusBatch } from '@/api/systemMenus';
import formCreate from '@form-create/iview';
import menusFrom from './components/menusFrom';
export default {
@ -103,6 +146,8 @@ export default {
return {
tabconfig: { children: 'children', reserve: true, accordion: true },
spinShow: false,
ruleModal: false,
searchRule: '',
grid: {
xl: 7,
lg: 7,
@ -121,6 +166,13 @@ export default {
formValidate: {},
titleFrom: '',
modalTitleSs: '',
routeType: '1',
arrs: [],
foundationList: [], // 基础接口列表
openList: [], // 公开接口列表
seletRoute: [], // 选中路由
seletRouteIds: [], // 选中id
menusId: 0, // 选中分类id
};
},
components: { menusFrom, formCreate: formCreate.$form() },
@ -137,6 +189,77 @@ export default {
this.getData();
},
methods: {
init() {
this.searchRule = '';
this.arrs = [];
this.seletRouteIds = [];
this.seletRoute = [];
},
addRouters() {
let data = {
menus: this.seletRoute,
};
menusBatch(data)
.then((res) => {
console.log(res);
this.getData();
})
.catch((res) => {
this.$Message.error(res.msg);
});
},
selectRule(data) {
if (this.seletRouteIds.includes(data.id)) {
let i = this.seletRouteIds.findIndex((e) => e == data.id);
this.seletRouteIds.splice(i, 1);
this.seletRoute.splice(i, 1);
} else {
this.seletRouteIds.push(data.id);
this.seletRoute.push({
menu_name: data.name,
unique_auth: '',
api_url: data.path,
path: this.menusId,
method: data.method,
});
}
},
changTab(name) {
console.log(name);
this.searchRules();
},
// 搜索规则
searchRules() {
if (this.searchRule.trim()) {
this.arrs = [];
let arr = this.routeType == 1 ? this.foundationList : this.openList;
for (var i = 0; i < arr.length; i++) {
if (arr[i].real_name.indexOf(this.searchRule) !== -1) {
this.arrs.push(arr[i].id);
}
}
} else {
this.arrs = [];
}
},
addRoute(row) {
this.menusId = row.id;
this.getRuleList();
},
modalchange() {},
// 获取权限列表
getRuleList() {
getRuleList().then((res) => {
res.data.map((e) => {
if (e.type) {
this.foundationList.push(e);
} else {
this.openList.push(e);
}
});
this.ruleModal = true;
});
},
// 修改规则状态
onchangeIsShow(row) {
let data = {
@ -157,11 +280,7 @@ export default {
this.formValidate = Object.assign({}, this.$options.data().formValidate);
this.getData();
},
selectRule(data) {
this.formValidate.menu_name = data.real_name;
this.formValidate.methods = data.method;
this.formValidate.api_url = data.rule;
},
// 清除表单数据
clearFrom() {
this.formValidate = Object.assign({}, this.$options.data().formValidate);
@ -291,4 +410,52 @@ export default {
background: #fff !important;
}
}
.rule {
display: flex;
flex-wrap: wrap;
max-height: 600px;
overflow-y: scroll;
}
/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
.rule::-webkit-scrollbar {
width: 10px;
height: 10px;
background-color: #f5f5f5;
}
/*定义滚动条轨道 内阴影+圆角*/
.rule::-webkit-scrollbar-track {
border-radius: 4px;
background-color: #f5f5f5;
}
/*定义滑块 内阴影+圆角*/
.rule::-webkit-scrollbar-thumb {
border-radius: 4px;
background-color: #ccc;
}
.rule-list {
background-color: #f2f2f2;
width: 32%;
margin: 5px;
border-radius: 3px;
padding: 10px;
color: #333;
cursor: pointer;
transition: all 0.1s;
}
.rule-list:hover {
background-color: #c5d1dd;
}
.rule-list div {
white-space: nowrap;
}
.select-rule {
background-color: #c5d1dd;
}
</style>

View File

@ -9,6 +9,7 @@
</template>
</Input>
<Button class="ml20" type="primary" @click="requestData">请求</Button>
<Button class="ml10 copy-btn" type="success" @click="insertCopy()">复制</Button>
</div>
<div class="params">
<Tabs class="mt10" v-model="paramsType" @on-click="changeTab">
@ -210,7 +211,6 @@
</div>
</div>
<div class="res mt10 mb10" v-if="codes">
<div class="copy-btn"><Button class="mt10 copy-btn" type="primary" @click="insertCopy()">复制</Button></div>
<MonacoEditor :codes="codes" :readOnly="true" />
</div>
</div>
@ -458,7 +458,7 @@ export default {
}
}
}
.copy-btn{
.copy-btn {
display: flex;
justify-content: right;
}

View File

@ -9,6 +9,7 @@
</template>
</Input>
<Button class="ml20" type="primary" @click="requestData">请求</Button>
<Button v-if="codes" class="ml10 copy-btn" type="success" @click="insertCopy()">复制结果</Button>
</div>
<div class="params">
<Tabs class="mt10" v-model="paramsType" @on-click="changeTab">
@ -210,7 +211,6 @@
</div>
</div>
<div class="res mt10 mb10" v-if="codes">
<div class="copy-btn"><Button class="mt10 copy-btn" type="primary" @click="insertCopy()">复制</Button></div>
<MonacoEditor :codes="codes" :readOnly="true" />
</div>
</div>
@ -280,7 +280,7 @@ export default {
console.log(this.$refs.xTable.getTableData().tableData);
console.log(this.filtersData((await this.$refs.xTable.getTableData().tableData) || []));
let url, method, params, body, headers;
url = this.interfaceData.url;
url = this.interfaceData.app_name + '/' + this.interfaceData.path;
method = this.interfaceData.method;
params = this.filtersData((await this.$refs.xTable.getTableData().tableData) || []);
body = this.filtersData((await this.$refs.yTable.getTableData().tableData) || []);
@ -294,7 +294,7 @@ export default {
console.log(url, method, params, body, headers);
requestMethod(url, method, params, body, headers)
.then((res) => {
this.codes = res + '';
this.codes = JSON.stringify(res);
})
.catch((err) => {
this.codes = JSON.stringify(err);

View File

@ -142,7 +142,27 @@
v-model.trim="formValidate.describe"
placeholder="请输入"
/>
<span v-else class="text-area">{{ formValidate.describe || '' }}</span>
<span v-else class="text-area">{{ formValidate.describe || '--' }}</span>
</FormItem>
<FormItem label="所属分类:" prop="name" v-if="isEdit">
<el-cascader
v-model="formValidate.cate_id"
size="small"
:options="formValidate.cate_tree"
:props="{ checkStrictly: true, multiple: false, emitPath: false, value: 'id', label: 'name' }"
clearable
></el-cascader>
</FormItem>
<FormItem label="是否公共:" prop="name">
<Switch v-if="isEdit" v-model="formValidate.type" :true-value="1" :false-value="0">
<template #open>
<span>是</span>
</template>
<template #close>
<span>否</span>
</template>
</Switch>
<span v-else class="text-area">{{ formValidate.type ? '是' : '否' }}</span>
</FormItem>
</Col>
</Row>
@ -409,6 +429,7 @@ import {
routeSave,
interfaceEditName,
routeDel,
routeEdit,
routeCateDel,
} from '@/api/systemBackendRouting';
import { VueTreeList, Tree, TreeNode } from 'vue-tree-list';
@ -558,32 +579,39 @@ export default {
await $table.setActiveCell(data, 'name');
},
getInterfaceList(disk_type) {
routeList()
.then((res) => {
res.data[0].expand = false;
this.treeData = new Tree(res.data);
if (res.data.length) {
if (res.data[0].children && res.data[0].children.length) {
this.onClick(res.data[0].children[0]);
}
}
})
.catch((err) => {
this.$Message.error(err);
});
},
onClick(params) {
console.log(params, 'params');
if (params.method) {
this.isEdit = false;
routeDet(params.id)
try {
routeList()
.then((res) => {
this.formValidate = res.data;
if (res.data.length) {
res.data[0].expand = false;
this.treeData = new Tree(res.data);
if (res.data[0].children && res.data[0].children.length) {
this.onClick(res.data[0].children[0]);
}
}
})
.catch((err) => {
console.log(err);
this.$Message.error(err);
});
} catch (error) {
console.log(error);
}
},
onClick(params) {
try {
if (params.method) {
this.isEdit = false;
routeDet(params.id)
.then((res) => {
this.formValidate = res.data;
})
.catch((err) => {
console.log(err);
this.$Message.error(err);
});
}
} catch (error) {
console.log(error);
}
},
async handleSubmit() {
@ -689,9 +717,11 @@ export default {
this.formValidate.id = 0;
this.isEdit = true;
} else if (name == 2) {
this.value = params.name || '';
this.formValidate.cate_id = params ? params.id : 0;
this.nameModal = true;
// this.value = params.name || '';
// this.formValidate.cate_id = params ? params.id : 0;
// this.nameModal = true;
// this.onEdit(params);
this.$modalForm(routeEdit(params.id, this.app_name)).then(() => this.getInterfaceList());
} else if (name == 3) {
this.onDel(params);
} else if (name == 4) {

View File

@ -3,7 +3,8 @@ import Setting from '@/setting';
import { getCookies, removeCookies } from '@/libs/util';
const service = axios.create({
baseURL: Setting.apiBaseURL,
baseURL: 'https://v5.wuht.net',
// baseURL: location.protocol + '//'+ location.hostname,
timeout: 10000, // 请求超时时间
});
axios.defaults.withCredentials = true; // 携带cookie
@ -11,12 +12,12 @@ axios.defaults.withCredentials = true; // 携带cookie
// 请求拦截器
service.interceptors.request.use(
(config) => {
if (config.kefu) {
let baseUrl = Setting.apiBaseURL.replace(/adminapi/, 'kefuapi');
config.baseURL = baseUrl;
} else {
config.baseURL = 'https://v5.wuht.net/outapi' || Setting.apiBaseURL;
}
// if (config.kefu) {
// let baseUrl = Setting.apiBaseURL.replace(/adminapi/, 'kefuapi');
// config.baseURL = baseUrl;
// } else {
// config.baseURL = 'https://v5.wuht.net/outapi' || Setting.apiBaseURL;
// }
if (config.file) {
config.headers['Content-Type'] = 'multipart/form-data';
}

View File

@ -246,14 +246,6 @@
// #endif
// #ifdef H5
uni.getSystemInfo({
success(e) {
/* 窗口宽度大于420px且不在PC页面且不在移动设备时跳转至 PC.html 页面 */
if (e.windowWidth > 420 && !window.top.isPC && !/iOS|Android/i.test(e.system)) {
window.location.pathname = '/static/html/pc.html';
}
}
});
if (option.query.hasOwnProperty('type') && option.query.type == "iframeWindow") {
this.globalData.isIframe = true;
} else {

View File

@ -1,55 +0,0 @@
<!DOCTYPE html>
<html lang=zh-CN>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1">
<title>crmeb-PC端</title>
<meta name="Copyright" content="helang">
<link rel="shortcut icon" type="image/png" href="">
<meta name="keywords" content="">
<meta name="description" content="">
<style type="text/css">
body{
margin: 0;
background-color: #f3f3f3;
}
iframe{
width: 375px;
height: 667px;
background-color: #fff;
box-sizing: content-box;
border: none;
}
@media screen and (min-width: 450px) {
iframe {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
border: rgba(0,0,0,0.1) solid 1px;
border-radius: 4px;
}
}
</style>
<script type="text/javascript">
window.isPC = true;
window.onload = function(){
/* 监听电脑浏览器窗口尺寸改变 */
window.onresize = function(){
/* 窗口宽度 小于或等于420px 时,跳转回H5页面 */
if(window.innerWidth <= 420){
window.location.pathname = '/';
}
}
}
</script>
</head>
<body>
<iframe src="/"></iframe>
</body>
</html>