Commit 13c4f54b by liwk

commit

1 parent c08202ee
...@@ -12,6 +12,7 @@ const request = (params = {}, url, method = RequestMethods.POST, noSignAttr = [] ...@@ -12,6 +12,7 @@ const request = (params = {}, url, method = RequestMethods.POST, noSignAttr = []
params.v = '1.0.0' params.v = '1.0.0'
params.format = 'json' params.format = 'json'
params.locale = 'zh_CN' params.locale = 'zh_CN'
console.log('开始')
let data = sign(params, noSignAttr) let data = sign(params, noSignAttr)
return GlAxios.post('router', data) return GlAxios.post('router', data)
} }
......
...@@ -50,13 +50,21 @@ var mixin = { ...@@ -50,13 +50,21 @@ var mixin = {
} }
}) })
connection.promise.then(parent => { connection.promise.then(parent => {
const cfg = _this.$get_session_config() // const cfg = _this.$get_session_config()
if (cfg) return // if (cfg) return
parent.getResources().then(config => { parent.getResources().then(config => {
_this.$set_session_config(config) _this.$set_session_config(config)
_this.init()
}) })
}) })
} },
methods: {
init() {
this.$children[0].flag = true
this.$children[0].init()
}
},
} }
const URL = 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config' const URL = 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
...@@ -66,7 +74,6 @@ const getConfig = (url = URL + '/oss_dj_equity_config') => { ...@@ -66,7 +74,6 @@ const getConfig = (url = URL + '/oss_dj_equity_config') => {
xhr.onreadystatechange = () => { xhr.onreadystatechange = () => {
if (xhr.readyState === 4 && xhr.status === 200) { if (xhr.readyState === 4 && xhr.status === 200) {
let config = JSON.parse(xhr.responseText) let config = JSON.parse(xhr.responseText)
window.localStorage.setItem('GLSX_OSS_EQUITY_CONFIG', xhr.responseText)
resolve({ resolve({
'vue': Vue, 'vue': Vue,
'config': config 'config': config
...@@ -86,7 +93,6 @@ const render = App => { ...@@ -86,7 +93,6 @@ const render = App => {
render: h => h(App) render: h => h(App)
}) })
} }
getConfig()
export default { export default {
render, render,
getConfig getConfig
......
...@@ -44,10 +44,11 @@ export default { ...@@ -44,10 +44,11 @@ export default {
} }
}, },
mounted() { mounted() {
this.getCarList()
}, },
methods: { methods: {
/**汽车权益列表 */ /**汽车权益列表 */
getCarList() { getCarList() {
carEquityManageApi.getCarList().then(({ data }) => { carEquityManageApi.getCarList().then(({ data }) => {
......
...@@ -45,7 +45,7 @@ export default { ...@@ -45,7 +45,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.getCategoryList()
}, },
methods: { methods: {
/**获取商品分类列表 */ /**获取商品分类列表 */
......
...@@ -152,6 +152,10 @@ export default { ...@@ -152,6 +152,10 @@ export default {
}, },
methods: { methods: {
init () {
this.getCarList()
this.getCategoryList()
},
addEquity (type) { addEquity (type) {
this.dialogType = type this.dialogType = type
this.showDialog = true this.showDialog = true
......
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
</div> </div>
<div class="table-box"> <div class="table-box">
<d2-table <d2-table
v-if="flag"
ref="table" ref="table"
:searchForm="searchObj" :searchForm="searchObj"
:tableParams="tableParams" :tableParams="tableParams"
...@@ -85,6 +86,7 @@ export default { ...@@ -85,6 +86,7 @@ export default {
mixins: [searchMixin], mixins: [searchMixin],
data () { data () {
return { return {
flag: false,
statusList: [{ statusList: [{
label: '已结算', label: '已结算',
value: 0 value: 0
......
...@@ -113,6 +113,7 @@ ...@@ -113,6 +113,7 @@
>刷新余额</el-button> >刷新余额</el-button>
</div> </div>
<d2-table <d2-table
v-if="flag"
ref="table" ref="table"
:searchForm="searchObj" :searchForm="searchObj"
:tableParams="tableParams" :tableParams="tableParams"
...@@ -137,6 +138,7 @@ export default { ...@@ -137,6 +138,7 @@ export default {
mixins: [orderMixin, searchMixin], mixins: [orderMixin, searchMixin],
data () { data () {
return { return {
flag: false,
price: 0, price: 0,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
......
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
</div> </div>
<div class="table-box"> <div class="table-box">
<d2-table <d2-table
v-if="flag"
ref="table" ref="table"
:searchForm="searchObj" :searchForm="searchObj"
:tableParams="tableParams" :tableParams="tableParams"
...@@ -95,6 +96,7 @@ export default { ...@@ -95,6 +96,7 @@ export default {
mixins: [searchMixin], mixins: [searchMixin],
data () { data () {
return { return {
flag: false,
statusList: [{ statusList: [{
label: '已支付', label: '已支付',
value: 1 value: 1
......
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
>新增商品</el-button> >新增商品</el-button>
</div> </div>
<d2-table <d2-table
v-if="flag"
ref="table" ref="table"
:searchForm="searchObj" :searchForm="searchObj"
:tableParams="tableParams" :tableParams="tableParams"
...@@ -147,6 +148,7 @@ export default { ...@@ -147,6 +148,7 @@ export default {
mixins: [searchMixin], mixins: [searchMixin],
data () { data () {
return { return {
flag: false,
brandNameList: [], brandNameList: [],
supplierList: [ supplierList: [
{ {
......
...@@ -118,6 +118,7 @@ ...@@ -118,6 +118,7 @@
></el-tab-pane> ></el-tab-pane>
</el-tabs> </el-tabs>
<d2-table <d2-table
v-if="flag"
ref="table" ref="table"
:searchForm="searchObj" :searchForm="searchObj"
:tableParams="tableParams" :tableParams="tableParams"
...@@ -148,6 +149,7 @@ export default { ...@@ -148,6 +149,7 @@ export default {
data () { data () {
return { return {
tabIndex: '', tabIndex: '',
flag: false,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
getListApi: orderApi.getOrderList, getListApi: orderApi.getOrderList,
......
...@@ -115,6 +115,7 @@ ...@@ -115,6 +115,7 @@
></el-tab-pane> ></el-tab-pane>
</el-tabs> </el-tabs>
<d2-table <d2-table
v-if="flag"
ref="table" ref="table"
:searchForm="searchObj" :searchForm="searchObj"
:tableParams="tableParams" :tableParams="tableParams"
...@@ -144,6 +145,7 @@ export default { ...@@ -144,6 +145,7 @@ export default {
mixins: [orderMixin, searchMixin], mixins: [orderMixin, searchMixin],
data () { data () {
return { return {
flag: false,
tabIndex: '', tabIndex: '',
tableParams: { tableParams: {
listName: 'list', listName: 'list',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!