Commit 08df0d92 by 前端

Merge branch 'huy_dev_v2.1.0' into 'v2.1.0'

Huy dev v2.1.0

See merge request !16
2 parents 268ae98b 5740bd1e
......@@ -27,7 +27,6 @@ layui.define(['form', 'laydate', 'carousel', 'util'], function (exports) {
* @return <option/>文本
*/
getSelect(config) {
console.log(config)
let f = {
id: undefined,
url: undefined,
......@@ -41,7 +40,7 @@ layui.define(['form', 'laydate', 'carousel', 'util'], function (exports) {
return t[this.text]
},
param: null,
initData: [{ cityId: '', cityName: '请选择' }],
initData: [{ adcode: '', name: '请选择' }],
link: false,
select: false,
data: [],
......@@ -62,7 +61,7 @@ layui.define(['form', 'laydate', 'carousel', 'util'], function (exports) {
}
}
getProvinceList()
// getProvinceList()
//绑定选中事件
if (f.select) {
if (isArray) {
......@@ -79,13 +78,12 @@ layui.define(['form', 'laydate', 'carousel', 'util'], function (exports) {
}
//生成option
function getOptions() {
if (!f.link) {
f.data = that.provinceInfoList
}
console.log(f.data)
// if (!f.link) {
// f.data = that.provinceInfoList
// }
let h = ''
$.each(f.initData, function (i, d) {
h += '<option value="' + d.cityId + '">' + d.cityName + '</option>'
h += '<option value="' + d.adcode + '">' + d.name + '</option>'
})
$.each(f.data, function (i, d) {
h += '<option value="' + f.getValue(d) + '">' + f.getText(d) + '</option>'
......@@ -111,7 +109,6 @@ layui.define(['form', 'laydate', 'carousel', 'util'], function (exports) {
url: 'http://oss-config.dev.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/provinceList',
async: false,
success: function (res) {
console.log(res)
that.provinceInfoList = res.provinceInfoList
}
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!