|
@@ -9,15 +9,15 @@ Page({
|
|
showcamara: false,
|
|
showcamara: false,
|
|
type:'card',
|
|
type:'card',
|
|
info:{
|
|
info:{
|
|
- card_code:"",
|
|
|
|
- name:""
|
|
|
|
|
|
+ band_code:"",
|
|
|
|
+ band_name:""
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad: function (options) {
|
|
onLoad: function (options) {
|
|
let info = this.data.info;
|
|
let info = this.data.info;
|
|
app.getMakerInfo( res =>{
|
|
app.getMakerInfo( res =>{
|
|
Object.assign( info, res )
|
|
Object.assign( info, res )
|
|
- this.setData( {info })
|
|
|
|
|
|
+ this.setData( {info})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
onReady: function (res) {
|
|
onReady: function (res) {
|
|
@@ -51,11 +51,20 @@ Page({
|
|
let showcamara= false
|
|
let showcamara= false
|
|
util.http( method, {url}, (err,res)=>{
|
|
util.http( method, {url}, (err,res)=>{
|
|
if( err!= 0 ) return;
|
|
if( err!= 0 ) return;
|
|
- console.log("http",err, res)
|
|
|
|
Object.assign( info, res)
|
|
Object.assign( info, res)
|
|
this.setData({info,showcamara})
|
|
this.setData({info,showcamara})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ saveBandInfo: function( e ){
|
|
|
|
+ let info = this.data.info;
|
|
|
|
+ let {band_code,band_name} = e.detail.value;
|
|
|
|
+ util.http( '/maker/addMakerBand', {band_code,band_name}, (err,res)=>{
|
|
|
|
+ if( err!= 0 ) return;
|
|
|
|
+ Object.assign( info, res);
|
|
|
|
+ app.setMakerInfo( info )
|
|
|
|
+ util.showSuccess("保存成功")
|
|
|
|
+ })
|
|
|
|
+ },
|
|
chooseImg: function () {
|
|
chooseImg: function () {
|
|
var that = this
|
|
var that = this
|
|
wx.chooseImage({
|
|
wx.chooseImage({
|