Authored by 陈峰

内嵌老商户端页面

<template>
<div class="iframe-box">
<iframe :src="src" frameborder="0"></iframe>
</div>
</template>
<script>
export default {
name: 'IFrame',
props: {
src: {
type: String,
default: ''
}
},
data() {
return {
};
},
methods: {
}
};
</script>
<style lang="scss">
.iframe-box {
width: 100%;
height: 100%;
iframe {
width: 100%;
height: 100%;
}
}
</style>
... ...
import UserInfo from './user-info';
import Editor from './editor';
import FileUpload from './file-upload';
import DragFileUpload from './drag-file-upload.vue';
import DragFileUpload from './drag-file-upload';
import IFrame from './iframe';
export default {
UserInfo,
Editor,
FileUpload,
DragFileUpload
DragFileUpload,
IFrame
};
... ...
... ... @@ -19,7 +19,6 @@
<script>
import Vue from 'vue';
import axios from 'axios';
export default {
name: 'UserInfo',
... ...
... ... @@ -15,4 +15,9 @@ export default {
</script>
<style lang="scss">
.layout-body {
position: relative;
width: 100%;
height: 100%;
}
</style>
... ...
<template>
<LayoutBody>
<IFrame src="http://shops.yohobuy.com/supplier/shop/decorationDetail/792/1/editor/1576/"></IFrame>
</LayoutBody>
</template>
<script>
export default {
created() {
},
data() {
return {
};
},
methods: {
}
};
</script>
<style lang="scss">
</style>
... ...
const page = r => require.ensure([], () => r(require('./decoration')), 'shop.decoration');
export default {
path: '/decoration.html',
name: 'decoration',
component: page,
meta: {
pageName: '店铺装修'
}
};
... ...
import info from './info';
import decoration from './decoration';
let routers = [info];
let routers = [info, decoration];
routers.forEach(router => {
router.path = `/shop${router.path}`;
... ...
... ... @@ -39,6 +39,13 @@ export default [
menu_id: 'shop.info',
status: 1,
id: 21
},
{
menu_name: '店铺装修',
menu_url: '/shop/decoration.html',
menu_id: 'shop.decoration',
status: 1,
id: 22
}
],
menu_name: '店铺管理',
... ...
... ... @@ -42,7 +42,12 @@ app.use(compression());
app.use(favicon(path.join(__dirname, '/favicon.ico')));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: false}));
app.use(cookieParser());
app.use(cookieParser('', {
decode(val) {
console.log(val)
return val;
}
}));
const middleware = require('./middleware');
const controllers = require('./controllers');
... ...
... ... @@ -29,7 +29,7 @@ let domainApis = {
getProduct: '/SellerProductController/getProduct'
},
shop: {
loginInter: '/loginInter'
login: '/login'
}
};
... ...
... ... @@ -66,12 +66,15 @@ class UserController extends Context {
}
syncSession(context, user, sess) {
console.log(sess)
context.req.session.USER = user;
context.req.session.LOGIN_UID = user.pid; // pid 为用户名
_.each(sess, (v, k) => {
context.res.cookie(k, v, {
path: '/'
path: '/',
domain: '.yohobuy.com',
httpOnly: true,
overwrite: false,
encode: val => val
});
});
}
... ...
... ... @@ -33,10 +33,10 @@ class UserService extends Context {
}
shopLogin(account, password) {
return rp.get({
url: apiDomain.shop.loginInter,
return rp.post({
url: apiDomain.shop.login,
resolveWithFullResponse: true,
qs: {
formData: {
user: account,
password: password
}
... ...