list.page.js
716 Bytes
const Vue = require('yoho-vue');
const $ = require('yoho-jquery');
const search = require('product/list/index.vue');
$(function() {
const buildOrder = function() {
return [
{
txt: '默认',
val: ''
}, {
txt: '最新',
val: 's_t_desc'
}, {
type: 'updown',
txt: '价格',
val: ['s_p_asc', 's_p_desc'] // [up, down]
},
{
type: 'updown',
txt: '折扣',
val: ['p_d_asc', 'p_d_desc']
}
];
};
let app = new Vue(search);
app.orderConfig = buildOrder();
});