Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
郭成尧
8 years ago
Commit
ae9c300b4ee87522ac8604c7c2bf0e12eb6f11d4
1 parent
0d7c9e99
for-mars
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
10 deletions
public/js/home/refund-exchange.page.js
public/js/home/refund.page.js
public/js/plugin/util.js
public/vue/home/exchange/exchange.vue
public/js/home/refund-exchange.page.js
View file @
ae9c300
const
Vue
=
require
(
'vue'
);
const
lazyload
=
require
(
'vue-lazyload'
);
const
exchange
=
require
(
'home/exchange/exchange.vue'
);
const
bus
=
require
(
'plugin/vue-bus'
);
const
yohoApp
=
require
(
'yoho-app'
);
require
(
'plugin/vue-filter'
)(
Vue
);
Vue
.
use
(
lazyload
,
{
preLoad
:
3
});
/**
* 发射提交表单事件
*/
function
subExchangeForm
()
{
bus
.
$emit
(
'subExchangeForm'
);
}
if
(
yohoApp
&&
yohoApp
.
isMarsApp
)
{
yohoApp
.
ready
(
function
()
{
yohoApp
.
addNativeMethod
(
'subExchangeForm'
,
subExchangeForm
);
yohoApp
.
invokeMethod
(
'set.topRightButton'
,
{
name
:
'提交'
,
callback
:
'subExchangeForm()'
});
});
}
new
Vue
({
el
:
'#exchange'
,
components
:
{
exchange
}
});
$
(
'.yoho-header'
).
find
(
'.nav-btn'
).
on
(
'click'
,
subExchangeForm
);
...
...
public/js/home/refund.page.js
View file @
ae9c300
const
Vue
=
require
(
'vue'
);
const
lazyload
=
require
(
'vue-lazyload'
);
const
bus
=
require
(
'plugin/vue-bus'
);
const
refund
=
require
(
'home/refund/refund.vue'
);
const
vueFilter
=
require
(
'plugin/vue-filter'
);
const
yohoApp
=
require
(
'yoho-app'
);
/**
* 发射提交表单事件
*/
function
subRefundForm
()
{
bus
.
$emit
(
'subRefundForm'
);
}
if
(
yohoApp
&&
yohoApp
.
isMarsApp
)
{
yohoApp
.
ready
(
function
()
{
yohoApp
.
addNativeMethod
(
'subRefundForm'
,
subRefundForm
);
yohoApp
.
invokeMethod
(
'set.topRightButton'
,
{
name
:
'提交'
,
callback
:
'subRefundForm()'
});
});
}
Vue
.
use
(
vueFilter
);
Vue
.
use
(
lazyload
,
{
preLoad
:
3
});
...
...
@@ -16,6 +32,4 @@ new Vue({
}
});
$
(
'.yoho-header'
).
find
(
'.nav-btn'
).
on
(
'click'
,
function
()
{
bus
.
$emit
(
'subRefundForm'
);
});
$
(
'.yoho-header'
).
find
(
'.nav-btn'
).
on
(
'click'
,
subRefundForm
);
...
...
public/js/plugin/util.js
View file @
ae9c300
const
Modal
=
require
(
'plugin/modal2'
);
const
yohoApp
=
require
(
'yoho-app'
);
const
getImgHost
=
function
(
url
,
bucket
=
'goodsimg'
)
{
let
urlArr
=
url
.
split
(
'/'
),
...
...
@@ -27,6 +28,13 @@ const getImgUrl = function(src, width = 300, height = 300, mode = 2) {
// 退换货 申请 成功, 打开 modal
const
applySuccuss
=
function
(
type
,
applyId
)
{
// 取消 Mars APP 头部的提交按钮
if
(
yohoApp
&&
yohoApp
.
isMarsApp
)
{
yohoApp
.
ready
(
function
()
{
yohoApp
.
invokeMethod
(
'set.removeTopRightButton'
);
});
}
const
config
=
{
exchange
:
{
name
:
'换货'
,
...
...
public/vue/home/exchange/exchange.vue
View file @
ae9c300
...
...
@@ -69,10 +69,10 @@
}
},
created() {
// 提交按钮dom
this.$submitBtn = $('#yoho-header .nav-btn');
this.$submitBtn.on('click', this.submit);
// 提交表单
bus.$on('subExchangeForm', () => {
this.submit();
});
bus.$on('open.featureSelector', msg => {
this.queryProductFeature(msg.pid, msg.sku, msg.rid);
...
...
Please
register
or
login
to post a comment