新增商铺分为4个文件,详情说明如下:
1、addShop.js 接口数据交互
var app = getApp();
var upImg = require('../../resource/js/image.js')
Page({
data: {
imglist: [],
item: '../../res/add.png',
loading: false,
disabled: false,
array: [],
index: 0,
names: ''
},
onLoad: function (options) {
app.pageConfig(this);
this.setData({
openid: options.op
})
this.getCate();
},
onShow: function () {
},
bindPickerChange: function (e) {
var x;
var id = e.detail.value;
var array = this.data.arrax;
for (x in array) {
if (x == id)
var names = array[x];
}
this.setData({
names: names,
index: e.detail.value
})
},
// 分类请求
getCate: function () {
var that = this;
app.util.request({
url: 'entry/wxapp/GetClass',
cachetime: 0,
success: functi