Authored by weiqingting

网销

... ... @@ -8,6 +8,10 @@ tabTree.init();
var ENUM={
/*
*colorId 颜色(主色调)
*goodsColorImage 商品名称
*/
/*
*marketPrice 市场价
*salePrice 销售价
*factoryCode 厂家编号
... ...
'use strict';
var $ = require('jquery'),
common = require('../common/common');
require('../util/custom.js');
/*
* 获取业务数据
*/
window.NETSALEDATA=require('./partials/data.js');
console.log(window.NETSALEDATA);
/*加载其他模块*/
require('./partials/xiaobian');
var e = new common.edit('#basicForm');
e.init();
// var e = new common.edit('#basicForm');
// e.init();
common.edit.ajaxfileupload('.goods-img', {
action: '/ajax/upload',
onComplete: function() {
// common.edit.ajaxfileupload('.goods-img', {
// action: '/ajax/upload',
// onComplete: function() {
}
})
\ No newline at end of file
// }
// })
\ No newline at end of file
... ...
'use strict';
var $ = require('jquery'),
common = require('../../common/common');
var ENUM=null;
var param=location.href.match(/edit\/(\d+)/)[1];
common.util.__ajax({
url:'/goods/netsale/getdata',
async:false,
data:{
param:param
}
},function(res){
ENUM=res.data;
},true);
module.exports=ENUM;
... ...
console.log("小编SB ");
\ No newline at end of file
... ...
... ... @@ -29,7 +29,6 @@ var entry={index:[],libs:[]};
entry.libs=commons;
var readfile=function(dir,callback){
var files = fs.readdirSync(dir);
files.forEach(function (file) {
... ... @@ -37,7 +36,7 @@ var readfile=function(dir,callback){
if (fs.statSync(filePath).isFile() && /.*\.js$/i.test(file)) {
callback && callback(filePath);
}else{
if(file!="common"&&file!="util"){
if(file!="common"&&file!="util"&&file!="partials"){
readfile(filePath,callback);
}
}
... ...
... ... @@ -166,11 +166,20 @@ exports.res = [
route: '/goods/netsale/edit/:param',
method: 'GET',
view: 'pages/goods/netsale-edit',
url: '/product/getNetSaleInfo',
// url: '/product/getNetSaleInfo',
src: '/goods/netsale-edit',
data: {
action: ''
},
}//,
// params: [{
// name: 'param',
// type: 'number'
// }]
},{
route: '/goods/netsale/getdata',
method: 'POST',
url: '/product/getNetSaleInfo',
params: [{
name: 'param',
type: 'number'
... ...