map.html 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
  7. <title>关键字检索</title>
  8. <link rel="stylesheet" href="https://cache.amap.com/lbs/static/main1119.css"/>
  9. <style type="text/css">
  10. #panel {
  11. position: absolute;
  12. background-color: white;
  13. max-height: 90%;
  14. overflow-y: auto;
  15. top: 10px;
  16. right: 10px;
  17. width: 280px;
  18. }
  19. </style>
  20. <script id="map" type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.8&key={key}"></script>
  21. <script type="text/javascript" src="https://cache.amap.com/lbs/static/addToolbar.js"></script>
  22. </head>
  23. <body>
  24. <div id="container"></div>
  25. <div id="panel"></div>
  26. <script type="text/javascript" src="../script/lib/map/gaode.js"></script>
  27. </body>
  28. </html>
  29. </script>
  30. /*
  31. $('select').each(function() {
  32. if ($(this).attr('xm-value')) {
  33. formSelects.value($(this).attr('xm-select'), $(this).attr('xm-value'));
  34. }
  35. });
  36. */
  37. /*
  38. var obj = layui.skuTable.render({
  39. //规格类型 0统一规格 1多规格
  40. isAttributeValue: 0,
  41. //规格类型容器id
  42. isAttributeElemId: 'sku_spec_type',
  43. //规格表容器id
  44. specTableElemId: 'sku_spec_table',
  45. //sku表容器id
  46. skuTableElemId: 'sku_table',
  47. //规格拖拽排序
  48. sortable: false,
  49. //sku表相同属性值是否合并行
  50. rowspan: true,
  51. //请求成功返回状态码值
  52. requestSuccessCode: 200,
  53. //上传接口地址
  54. //接口要求返回格式参考 upload.json
  55. uploadUrl: './json/upload.json',
  56. //统一规格配置项
  57. singleSkuTableConfig: {
  58. thead: [
  59. {title: '商品编码', icon: 'layui-icon-cols'},
  60. {title: '销售价(元)', icon: 'layui-icon-cols'},
  61. {title: '采购价(元)', icon: 'layui-icon-cols'},
  62. {title: '成本价(元)', icon: 'layui-icon-cols'},
  63. ],
  64. tbody: [
  65. {type: 'input', field: 'code', value: '', verify: 'required', reqtext: '商品编码不能为空'},
  66. {type: 'input', field: 'price', value: '0', verify: 'required|number', reqtext: '销售价不能为空'},
  67. {type: 'input', field: 'buy_price', value: '0', verify: 'required|number', reqtext: '采购价不能为空'},
  68. {type: 'input', field: 'cost_price', value: '0', verify: 'required|number', reqtext: '成本价不能为空'},
  69. ]
  70. },
  71. //多规格配置项
  72. multipleSkuTableConfig: {
  73. thead: [
  74. {title: '图片', icon: ''},
  75. {title: '商品编码', icon: 'layui-icon-cols'},
  76. {title: '销售价(元)', icon: 'layui-icon-cols'},
  77. {title: '采购价(元)', icon: 'layui-icon-cols'},
  78. {title: '成本价(元)', icon: 'layui-icon-cols'},
  79. ],
  80. tbody: [
  81. {type: 'image', field: 'pic', value: '', verify: '', reqtext: ''},
  82. {type: 'input', field: 'code', value: '', verify: 'required', reqtext: '商品编码不能为空'},
  83. {type: 'input', field: 'price', value: '0', verify: 'required|number', reqtext: '销售价不能为空'},
  84. {type: 'input', field: 'buy_price', value: '0', verify: 'required|number', reqtext: '采购价不能为空'},
  85. {type: 'input', field: 'cost_price', value: '0', verify: 'required|number', reqtext: '成本价不能为空'},
  86. ]
  87. },
  88. //商品id 配合specDataUrl和skuDataUrl使用
  89. productId: '11',
  90. //规格数据, 一般从后台获取
  91. specData: [
  92. {
  93. id: "1",
  94. title: "颜色",
  95. child: [
  96. {id: "1", title: "红", checked: true},
  97. {id: "2", title: "黄", checked: false},
  98. {id: "3", title: "蓝", checked: false}
  99. ]
  100. }, {
  101. id: "2",
  102. title: "尺码",
  103. child: [
  104. {id: "4", title: "S", checked: true},
  105. {id: "5", title: "M", checked: true},
  106. {id: "6", title: "L", checked: false},
  107. {id: "7", title: "XL", checked: false}
  108. ]
  109. }, {
  110. id: "3",
  111. title: "款式",
  112. child: [
  113. {id: "8", title: "男款", checked: true},
  114. {id: "9", title: "女款", checked: true}
  115. ]
  116. }
  117. ],
  118. specData: [],
  119. //获取规格数据接口地址,如果为空或者不配置则使用 specData 参数配置
  120. //接口要求返回格式参考 specData.json
  121. // specDataUrl: './json/specData.json',
  122. //sku数据
  123. //新增的时候为空对象
  124. //编辑的时候可以从后台接收,会自动填充sku表,可以去掉注释看效果
  125. //多规格格式
  126. // skuData: {
  127. // "skus[1-4-8][picture]": "https://www.baidu.com/img/flexible/logo/pc/result.png",
  128. // "skus[1-4-8][price]": "100",
  129. // "skus[1-4-8][market_price]": "200",
  130. // "skus[1-4-8][cost_price]": "50",
  131. // "skus[1-4-8][stock]": "18",
  132. // "skus[1-4-8][status]": "0",
  133. // "skus[1-4-9][picture]": "",
  134. // "skus[1-4-9][price]": "0",
  135. // "skus[1-4-9][market_price]": "0",
  136. // "skus[1-4-9][cost_price]": "0",
  137. // "skus[1-4-9][stock]": "0",
  138. // "skus[1-4-9][status]": "1",
  139. // "skus[1-5-8][picture]": "",
  140. // "skus[1-5-8][price]": "0",
  141. // "skus[1-5-8][market_price]": "0",
  142. // "skus[1-5-8][cost_price]": "0",
  143. // "skus[1-5-8][stock]": "0",
  144. // "skus[1-5-8][status]": "1",
  145. // "skus[1-5-9][picture]": "",
  146. // "skus[1-5-9][price]": "0",
  147. // "skus[1-5-9][market_price]": "0",
  148. // "skus[1-5-9][cost_price]": "0",
  149. // "skus[1-5-9][stock]": "0",
  150. // "skus[1-5-9][status]": "1"
  151. // },
  152. //统一规格格式
  153. // skuData: {
  154. // 'price': '80',
  155. // 'market_price': '100',
  156. // 'cost_price': '60',
  157. // 'stock': '999',
  158. // 'status': '0',
  159. // }
  160. //获取SKU数据接口地址,如果为空或者不配置则使用skuData配置
  161. //接口要求返回格式参考 skuData.json
  162. // skuDataUrl: './json/skuData.json',
  163. });*/
  164. </script>