作者 李洪娟

修改服务地址的定位

@@ -368,7 +368,7 @@ function getRequest(type, url, params, header) { @@ -368,7 +368,7 @@ function getRequest(type, url, params, header) {
368 }).catch(function (err) { 368 }).catch(function (err) {
369 toastMsg('网络错误'); 369 toastMsg('网络错误');
370 openView('wrong', 'common/wrong', '网络错误', 'wrong', false, false, false); 370 openView('wrong', 'common/wrong', '网络错误', 'wrong', false, false, false);
371 - alert(JSON.stringify(err)) 371 + // alert(JSON.stringify(err))
372 reject(err) 372 reject(err)
373 }) 373 })
374 }); 374 });
1 <!doctype html> 1 <!doctype html>
2 <html lang="en"> 2 <html lang="en">
3 -<head> 3 +
  4 + <head>
4 <meta charset="UTF-8"> 5 <meta charset="UTF-8">
5 - <meta name="viewport"  
6 - content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> 6 + <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
7 <meta http-equiv="X-UA-Compatible" content="ie=edge"> 7 <meta http-equiv="X-UA-Compatible" content="ie=edge">
8 <meta name="format-detection" content="telephone=no,email=no,date=no,address=no"> 8 <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
9 <title></title> 9 <title></title>
10 - <script src="../../assets/js/fontsize.js"></script>  
11 - <link rel="stylesheet" href="../../assets/css/api.css"/> 10 + <!--<link rel="stylesheet" href="https://cache.amap.com/lbs/static/main1119.css"/>-->
12 <link rel="stylesheet" href="../../assets/icon/iconfont.css"> 11 <link rel="stylesheet" href="../../assets/icon/iconfont.css">
  12 + <script src="../../assets/js/fontsize.js"></script>
  13 + <link rel="stylesheet" href="../../assets/css/weui.min.css">
  14 + <link rel="stylesheet" href="../../assets/css/api.css" />
  15 +
  16 +
  17 + <!-- <script type="text/javascript" src="https://cache.amap.com/lbs/static/addToolbar.js"></script>-->
13 <style type="text/css"> 18 <style type="text/css">
14 body { 19 body {
15 padding-bottom: 1rem; 20 padding-bottom: 1rem;
@@ -81,7 +86,6 @@ @@ -81,7 +86,6 @@
81 .position { 86 .position {
82 display: flex; 87 display: flex;
83 align-items: center; 88 align-items: center;
84 -  
85 } 89 }
86 90
87 .position span { 91 .position span {
@@ -122,15 +126,18 @@ @@ -122,15 +126,18 @@
122 border-bottom: 1px solid #f2f2f2; 126 border-bottom: 1px solid #f2f2f2;
123 } 127 }
124 </style> 128 </style>
125 -</head>  
126 -<body>  
127 -<div id="loadStart"></div>  
128 -<div id="app" v-cloak> 129 + </head>
  130 +
  131 + <body>
  132 + <div id="loadStart"></div>
  133 + <div id="app" v-cloak>
  134 +
  135 + <div id="container"></div>
129 <div class="city_top"> 136 <div class="city_top">
130 <div class="city_name_box" @click="choose_city_fun"> 137 <div class="city_name_box" @click="choose_city_fun">
131 <span class="iconfont icon-dizhi"></span> 138 <span class="iconfont icon-dizhi"></span>
132 <div class="clamp1">{{cityname}}</div> 139 <div class="clamp1">{{cityname}}</div>
133 - </div> 140 + </div>:
134 <div class="city_input"><input type="search" placeholder="请输入你的服务地址" v-model="keyword" @input="getCity"></div> 141 <div class="city_input"><input type="search" placeholder="请输入你的服务地址" v-model="keyword" @input="getCity"></div>
135 <div class="main_color" @click="search_word">搜索</div> 142 <div class="main_color" @click="search_word">搜索</div>
136 </div> 143 </div>
@@ -142,38 +149,59 @@ @@ -142,38 +149,59 @@
142 <div class="my_address"> 149 <div class="my_address">
143 <div class="address_title"><span class="iconfont icon-shouye"></span><span> 我的服务地址</span></div> 150 <div class="address_title"><span class="iconfont icon-shouye"></span><span> 我的服务地址</span></div>
144 <div class="address_item nodata" v-if="user_address_list.length==0">暂无服务地址</div> 151 <div class="address_item nodata" v-if="user_address_list.length==0">暂无服务地址</div>
145 - <div class="address_item" v-for="(item,index) in user_address_list"  
146 - @click="choose_address(item.address,item.address_info,item.lon,item.lat)" v-else> 152 + <div class="address_item" v-for="(item,index) in user_address_list" @click="choose_address(item.address,item.address_info,item.lon,item.lat)" v-else>
147 <span>{{item.address}}{{item.address_info}}</span> 153 <span>{{item.address}}{{item.address_info}}</span>
148 </div> 154 </div>
149 </div> 155 </div>
150 <div class="my_address"> 156 <div class="my_address">
151 <div class="address_title"><span class="iconfont icon-dizhi"></span><span>我的附近地址</span></div> 157 <div class="address_title"><span class="iconfont icon-dizhi"></span><span>我的附近地址</span></div>
152 - <div class="address_item" v-for="(item,index) in nearList"  
153 - @click="choose_address(item.address,'',item.lon,item.lat)"> 158 + <div class="address_item" v-for="(item,index) in nearList" @click="choose_address(item.address,'',item.lon,item.lat)">
154 <span>{{item.address}}</span> 159 <span>{{item.address}}</span>
155 </div> 160 </div>
156 </div> 161 </div>
157 </div> 162 </div>
158 - <div v-for="(item,index) in keywords" class="city_item"  
159 - @click="choose_address(item.address,item.name,item.lon,item.lat)" v-else> 163 + <div v-for="(item,index) in keywords" class="city_item" @click="choose_address(item.address,item.name,item.lon,item.lat)" v-else>
160 <div> 164 <div>
161 <div class="city_name">{{item.name}}</div> 165 <div class="city_name">{{item.name}}</div>
162 <div class="city_address">{{item.address}}</div> 166 <div class="city_address">{{item.address}}</div>
163 </div> 167 </div>
164 </div> 168 </div>
165 -</div>  
166 -</body> 169 + </div>
  170 + </body>
  171 +
167 </html> 172 </html>
  173 +<!--<script src="https://webapi.amap.com/maps?v=1.4.8&key= ef53760bd959a4df08b7d4587280e642"></script>
  174 +<script type="text/javascript">
  175 + var map = new AMap.Map('container', {
  176 + center:[117.000923,36.675807],
  177 + zoom:11
  178 + });
  179 +</script>-->
  180 +<script>
  181 + var map = {}
  182 + window.onLoad = function() {
  183 + map = new AMap.Map('container');
  184 + }
  185 + var url = 'https://webapi.amap.com/maps?v=1.4.8&key=ef53760bd959a4df08b7d4587280e642&callback=onLoad';
  186 + var jsapi = document.createElement('script');
  187 + jsapi.charset = 'utf-8';
  188 + jsapi.src = url;
  189 + document.head.appendChild(jsapi);
  190 +</script>
  191 +<script type="text/javascript" src="../../assets/js/weui.min.js"></script>
168 <script type="text/javascript" src="../../assets/js/api.js"></script> 192 <script type="text/javascript" src="../../assets/js/api.js"></script>
  193 +<script ty></script>
169 <script type="text/javascript" src="../../assets/js/public.js"></script> 194 <script type="text/javascript" src="../../assets/js/public.js"></script>
170 <script type="text/javascript" src="../../assets/js/fastclick.js"></script> 195 <script type="text/javascript" src="../../assets/js/fastclick.js"></script>
171 <script> 196 <script>
172 new FastClick(document.body); 197 new FastClick(document.body);
173 </script> 198 </script>
  199 +
174 <script type="text/javascript" src="../../assets/js/vue.min.js"></script> 200 <script type="text/javascript" src="../../assets/js/vue.min.js"></script>
175 <script type="text/javascript" src="../../assets/js/axios.min.js"></script> 201 <script type="text/javascript" src="../../assets/js/axios.min.js"></script>
176 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script> 202 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
  203 +<script type="text/javascript" src="https://cache.amap.com/lbs/static/PlaceSearchRender.js"></script>
  204 +<script type="text/javascript" src="https://cache.amap.com/lbs/static/addToolbar.js"></script>
177 <script> 205 <script>
178 var app = new Vue({ 206 var app = new Vue({
179 el: '#app', 207 el: '#app',
@@ -189,135 +217,170 @@ @@ -189,135 +217,170 @@
189 user_address_list: [], 217 user_address_list: [],
190 address_show: true, 218 address_show: true,
191 latitude: '', 219 latitude: '',
192 - longitude: '' 220 + longitude: '',
  221 + //经度
  222 + lng: '',
  223 +
  224 + //纬度
  225 + lat: '',
  226 + map: {},
  227 + //经纬度
  228 + centerPoint: []
193 }, 229 },
194 - created: function () {  
195 - apiready = function () {  
196 - api.setFrameAttr({  
197 - name: 'choose_address',  
198 - bounces: true  
199 - });  
200 - app.getNearBy();  
201 - app.cityname = getcity() ? getcity() : api.pageParam.cityname;  
202 - api.addEventListener({  
203 - name: 'city'  
204 - }, function (ret, err) {  
205 - // alert(JSON.stringify(ret));  
206 - app.cityname = ret.value.city;  
207 - });  
208 - app.getUsedAddress(); 230 + created: function() {
  231 + loadEnd();
  232 + apiready = function() {
  233 + app.get_city();
  234 + app.getUsedAddress()
  235 +
209 } 236 }
  237 +
  238 + // app.getNearBy();
  239 + // app.cityname = getcity() ? getcity() : api.pageParam.cityname;
  240 + // api.addEventListener({
  241 + // name: 'city'
  242 + // }, function (ret, err) {
  243 + // // alert(JSON.stringify(ret));
  244 + // app.cityname = ret.value.city;
  245 + // });
  246 + // app.getUsedAddress();
210 }, 247 },
211 methods: { 248 methods: {
212 // 获取我的服务地址 249 // 获取我的服务地址
213 - getUsedAddress: function () { 250 + getUsedAddress: function() {
214 var header = { 251 var header = {
215 "XX-Device-Type": getDevice(), 252 "XX-Device-Type": getDevice(),
216 'XX-Token': getToken() 253 'XX-Token': getToken()
217 }; 254 };
218 - getRequest('post', 'portal/Goods/getUsedAddress', null, header).then(function (res) {  
219 - // alert(JSON.stringify(res));  
220 - if (res.data.code == 1) { 255 + console.log(header)
  256 + getRequest('post', 'portal/Goods/getUsedAddress', null, header).then(function(res) {
  257 + //alert(JSON.stringify(res));
  258 + if(res.data.code == 1) {
221 app.user_address_list = res.data.data; 259 app.user_address_list = res.data.data;
222 - } else {  
223 toastMsg(res.data.msg) 260 toastMsg(res.data.msg)
224 } 261 }
  262 + loadEnd();
225 }) 263 })
226 }, 264 },
227 // 重新获取当前定位信息 265 // 重新获取当前定位信息
228 - choose_now: function () {  
229 - api.showProgress({  
230 - title: '正在重新定位',  
231 - text: '定位中...',  
232 - modal: true  
233 - });  
234 - app.getNearBy(); 266 + choose_now: function() {
  267 +
  268 + toastMsg('正在重新定位')
  269 + app.get_city()
235 setTimeout(function() { 270 setTimeout(function() {
236 - api.hideProgress(); 271 +// api.hideProgress();
237 }, 2000) 272 }, 2000)
238 }, 273 },
  274 +
  275 + // 定位当前城市
  276 + get_city: function() {
  277 +
  278 + app.map = new AMap.Map('container', {});
  279 + app.map.plugin('AMap.Geolocation', function() {
  280 + var geolocation = new AMap.Geolocation({
  281 + // 是否使用高精度定位,默认:true
  282 + enableHighAccuracy: true,
  283 + // 设置定位超时时间,默认:无穷大
  284 + timeout: 10000,
  285 + });
  286 + geolocation.getCurrentPosition();
  287 + AMap.event.addListener(geolocation, 'complete', onComplete)
  288 + AMap.event.addListener(geolocation, 'error', onError)
  289 +
  290 + function onComplete(data) {
  291 + // console.log(JSON.stringify(data));
  292 +
  293 + app.cityname = data.addressComponent.province;
  294 + console.log(app.cityname);
  295 + app.lng = data.position.lng;
  296 + app.lat = data.position.lat;
  297 + // console.log(app.lng);
  298 + // console.log(app.lat);
  299 + //
239 // 获取附近地址 300 // 获取附近地址
240 - getNearBy: function () {  
241 - var aMap = api.require('aMap');  
242 - aMap.open({  
243 - rect: {  
244 - x: 0,  
245 - y: 0,  
246 - w: 0,  
247 - h: 0  
248 - },  
249 - }, function (ret, err) {  
250 - if (ret.status) {  
251 - aMap.getLocation(function (ret_loc, err_loc) {  
252 - if (ret_loc.status) {  
253 - aMap.getNameFromCoords({  
254 - lon: ret_loc.lon,  
255 - lat: ret_loc.lat  
256 - }, function (ret_city, err_city) {  
257 - if (ret_city.status) {  
258 - app.getName(ret_loc.lon, ret_loc.lat);  
259 - app.street = ret_city.street;  
260 - // app.cityname=ret.  
261 - aMap.searchNearby({  
262 - keyword: ret_city.street,  
263 - lon: ret_loc.lon,  
264 - lat: ret_loc.lat,  
265 - radius: 1000,  
266 - offset: 20,  
267 - page: 1,  
268 - sortrule: 0  
269 - }, function (ret_near, err_near) {  
270 - if (ret_near.status) {  
271 - app.nearList = ret_near.pois.slice(0, 10);  
272 - }  
273 - loadEnd(); 301 + app.map = new AMap.Map('container', {});
  302 + AMap.service(["AMap.PlaceSearch"], function() {
  303 + var placeSearch = new AMap.PlaceSearch({
  304 + pageSize: 10, // 每页10条
  305 + pageIndex: 1, // 获取第一页
  306 + city: app.cityname // 指定城市名(如果你获取不到城市名称,这个参数也可以不传,注释掉)
274 }); 307 });
275 308
  309 + // 第一个参数是关键字,这里传入的空表示不需要根据关键字过滤
  310 + // 第二个参数是经纬度,数组类型
  311 + // 第三个参数是半径,周边的范围
  312 + // 第四个参数为回调函数
  313 +
  314 + placeSearch.searchNearBy(app.cityname, [app.lng, app.lat], 1000, function(status, result) {
  315 +
  316 + console.log(JSON.stringify(status))
  317 + if(result.info === 'OK') {
  318 + var locationList = result.poiList.pois; // 周边地标建筑列表
  319 + //console.log(JSON.stringify(locationList))
  320 + app.nearList = locationList          // 生成地址列表html
  321 + //           createLocationHtml(locationList);
276 } else { 322 } else {
277 - toastMsg(JSON.stringify(err_city)); 323 + console.log('获取位置信息失败!');
278 } 324 }
279 }); 325 });
  326 + });
280 327
281 - } else {  
282 - toastMsg(JSON.stringify(err_loc));  
283 } 328 }
284 - });  
285 - } else {  
286 - toastMsg(JSON.stringify(err)); 329 +
  330 + function onError(erro) {
  331 + // 定位出错
  332 + toastMsg('请开启定位功能')
287 } 333 }
288 - }); 334 + })
289 }, 335 },
  336 +
290 // 获取搜索地址 337 // 获取搜索地址
291 - getCity: function () {  
292 - if (app.keyword == '') { 338 + getCity: function() {
  339 + if(app.keyword == '') {
293 app.address_show = true; 340 app.address_show = true;
294 } else { 341 } else {
295 app.address_show = false; 342 app.address_show = false;
296 - } 343 +
297 var aMap = api.require('aMap'); 344 var aMap = api.require('aMap');
298 - aMap.searchInCity({  
299 - city: app.cityname,  
300 - keyword: app.keyword,  
301 - offset: 20,  
302 - page: 1,  
303 - sortrule: 0  
304 - }, function (ret) {  
305 - if (ret.status) {  
306 - app.keywords = ret.pois;  
307 - // alert(JSON.stringify(app.keywords))  
308 - } 345 + var placeSearchOptions = { //构造地点查询类
  346 + pageSize: 10,
  347 + pageIndex: 1,
  348 + city: app.cityname //城市
  349 + };
  350 + var placeSearch = new AMap.PlaceSearch(placeSearchOptions);
  351 + //关键字查询,您如果想修改结果展现效果,请参考页面:https://lbs.amap.com/fn/css-style/
  352 + placeSearch.search(app.keyword, callback);
  353 + var placeSearchRender = new Lib.AMap.PlaceSearchRender();
  354 +
  355 + function callback(status, result) {
  356 + locationList = result.poiList.pois
  357 +// console.log(JSON.stringify(result));
  358 + app.keywords = locationList;
  359 +
  360 + if(status === 'complete' && result.info === 'OK') {
  361 + placeSearchRender.autoRender({
  362 + placeSearchInstance: placeSearch,
  363 + methodName: "search",
  364 + methodArgumments: [app.keyword, callback],
  365 + data: result,
  366 + map: map,
  367 + panel: "panel"
309 }); 368 });
  369 + }
  370 + }
  371 + }
  372 +
310 }, 373 },
311 // 搜索地址 374 // 搜索地址
312 - search_word: function () {  
313 - if (app.keyword == '') { 375 + search_word: function() {
  376 + if(app.keyword == '') {
314 toastMsg('请输入搜索内容') 377 toastMsg('请输入搜索内容')
315 } else { 378 } else {
316 app.getCity(); 379 app.getCity();
317 } 380 }
318 }, 381 },
319 // 选择地址 382 // 选择地址
320 - choose_address: function (address, name, longitude, latitude) { 383 + choose_address: function(address, name, longitude, latitude) {
321 api.sendEvent({ 384 api.sendEvent({
322 name: 'choose_city', 385 name: 'choose_city',
323 extra: { 386 extra: {
@@ -331,20 +394,20 @@ @@ -331,20 +394,20 @@
331 closeWindow(); 394 closeWindow();
332 }, 395 },
333 // 切换城市 396 // 切换城市
334 - choose_city_fun: function () { 397 + choose_city_fun: function() {
335 api.openWin({ 398 api.openWin({
336 url: '../index/city_win.html', 399 url: '../index/city_win.html',
337 name: 'city_win' 400 name: 'city_win'
338 }); 401 });
339 $api.rmStorage('city') 402 $api.rmStorage('city')
340 }, 403 },
341 - getName: function (lon, lat) { 404 + getName: function(lon, lat) {
342 var aMap = api.require('aMap'); 405 var aMap = api.require('aMap');
343 aMap.getNameFromCoords({ 406 aMap.getNameFromCoords({
344 lon: lon, 407 lon: lon,
345 lat: lat, 408 lat: lat,
346 - }, function (ret, err) {  
347 - if (ret.status) { 409 + }, function(ret, err) {
  410 + if(ret.status) {
348 // alert(JSON.stringify(ret)) 411 // alert(JSON.stringify(ret))
349 app.cityname = ret.city 412 app.cityname = ret.city
350 } else { 413 } else {
@@ -263,6 +263,7 @@ @@ -263,6 +263,7 @@
263 AMap.event.addListener(geolocation, 'error', onError) 263 AMap.event.addListener(geolocation, 'error', onError)
264 264
265 function onComplete(data) { 265 function onComplete(data) {
  266 + // console.log(JSON.stringify(data))
266 app.cityname = data.addressComponent.province 267 app.cityname = data.addressComponent.province
267 // data是具体的定位信息 268 // data是具体的定位信息
268 } 269 }
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <meta charset="UTF-8"> 4 <meta charset="UTF-8">
5 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 5 <meta http-equiv="X-UA-Compatible" content="IE=edge">
6 <meta name="viewport" content="width=device-width, initial-scale=1"> 6 <meta name="viewport" content="width=device-width, initial-scale=1">
7 - <title>演示:移动端按首字母检索城市列表</title> 7 + <title></title>
8 <link rel="stylesheet" href="../../assets/css/reset.css"> 8 <link rel="stylesheet" href="../../assets/css/reset.css">
9 <link rel="stylesheet" type="text/css" href="../../assets/css/city.css"> 9 <link rel="stylesheet" type="text/css" href="../../assets/css/city.css">
10 </head> 10 </head>
@@ -141,25 +141,25 @@ @@ -141,25 +141,25 @@
141 app.cid = api.pageParam.cid; 141 app.cid = api.pageParam.cid;
142 // alert(app.id) 142 // alert(app.id)
143 app.getCatInfo3(); 143 app.getCatInfo3();
144 - //导航轮播  
145 - app.mySwiper = new Swiper('.examination_swiper .swiper-container', {  
146 - slidesPerView: 'auto',  
147 - slideToClickedSlide: true,  
148 - observer: true,  
149 - observeParents: true,  
150 - freeMode: true  
151 - });  
152 - //内容轮播  
153 - app.Swiper1 = new Swiper('.examination_content_swiper .swiper-container', {  
154 - observer: true,  
155 - observeParents: true,  
156 - autoHeight: true,  
157 - onTransitionEnd: function (swiper) {  
158 - app.ind = swiper.activeIndex;  
159 - app.mySwiper.slideTo(swiper.activeIndex, 500)  
160 - // alert(swiper.activeIndex);  
161 - }  
162 - }); 144 + // //导航轮播
  145 + // app.mySwiper = new Swiper('.examination_swiper .swiper-container', {
  146 + // slidesPerView: 'auto',
  147 + // slideToClickedSlide: true,
  148 + // observer: true,
  149 + // observeParents: true,
  150 + // freeMode: true
  151 + // });
  152 + // //内容轮播
  153 + // app.Swiper1 = new Swiper('.examination_content_swiper .swiper-container', {
  154 + // observer: true,
  155 + // observeParents: true,
  156 + // autoHeight: true,
  157 + // onTransitionEnd: function (swiper) {
  158 + // app.ind = swiper.activeIndex;
  159 + // app.mySwiper.slideTo(swiper.activeIndex, 500)
  160 + // // alert(swiper.activeIndex);
  161 + // }
  162 + // });
163 } 163 }
164 }, 164 },
165 methods: { 165 methods: {
@@ -181,10 +181,6 @@ @@ -181,10 +181,6 @@
181 var post = { 181 var post = {
182 cid: app.cid 182 cid: app.cid
183 }; 183 };
184 - // var header = {  
185 - // 'XX-Device-Type': getDevice(),  
186 - // 'XX-Token':getToken()  
187 - // };  
188 var header = { 184 var header = {
189 "XX-Device-Type": getDevice(), 185 "XX-Device-Type": getDevice(),
190 'XX-Token': 1 186 'XX-Token': 1
@@ -341,6 +341,7 @@ @@ -341,6 +341,7 @@
341 api.addEventListener({ 341 api.addEventListener({
342 name: 'choose_city' 342 name: 'choose_city'
343 }, function (ret, err) { 343 }, function (ret, err) {
  344 + // console.log(JSON.stringify(ret))
344 // alert(JSON.stringify(ret)); 345 // alert(JSON.stringify(ret));
345 // app.user_address = ret.value.city + ' ' + ret.value.address; 346 // app.user_address = ret.value.city + ' ' + ret.value.address;
346 app.user_address = ret.value.address; 347 app.user_address = ret.value.address;
@@ -430,6 +431,8 @@ @@ -430,6 +431,8 @@
430 , 431 ,
431 // 获取订单详情 432 // 获取订单详情
432 applyInfo: function () { 433 applyInfo: function () {
  434 +
  435 +
433 var post = { 436 var post = {
434 gid: app.id 437 gid: app.id
435 }; 438 };
@@ -437,7 +440,11 @@ @@ -437,7 +440,11 @@
437 "XX-Device-Type": getDevice(), 440 "XX-Device-Type": getDevice(),
438 'XX-Token': getToken() 441 'XX-Token': getToken()
439 }; 442 };
  443 + console.log(header);
  444 +
440 getRequest('post', 'portal/Goods/applyInfo', post, header).then(function (res) { 445 getRequest('post', 'portal/Goods/applyInfo', post, header).then(function (res) {
  446 + alert(res)
  447 + console.log(JSON.stringify(res));
441 // alert(JSON.stringify(res)) 448 // alert(JSON.stringify(res))
442 if (res.data.code == 1) { 449 if (res.data.code == 1) {
443 app.is_idcard = res.data.data.is_idcard; 450 app.is_idcard = res.data.data.is_idcard;
@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
7 <meta name="format-detection" content="telephone=no,email=no,date=no,address=no"> 7 <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
8 <title></title> 8 <title></title>
9 <script src="../../assets/js/fontsize.js"></script> 9 <script src="../../assets/js/fontsize.js"></script>
  10 + <link rel="stylesheet" href="../../assets/css/weui.min.css">
10 <link rel="stylesheet" href="../../assets/css/api.css"/> 11 <link rel="stylesheet" href="../../assets/css/api.css"/>
11 <link rel="stylesheet" href="../../assets/css/login_index.css"> 12 <link rel="stylesheet" href="../../assets/css/login_index.css">
12 <link rel="stylesheet" href="../../assets/icon/iconfont.css"> 13 <link rel="stylesheet" href="../../assets/icon/iconfont.css">
@@ -91,6 +92,7 @@ @@ -91,6 +92,7 @@
91 <script type="text/javascript" src="../../assets/js/vue.min.js"></script> 92 <script type="text/javascript" src="../../assets/js/vue.min.js"></script>
92 <script type="text/javascript" src="../../assets/js/axios.min.js"></script> 93 <script type="text/javascript" src="../../assets/js/axios.min.js"></script>
93 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script> 94 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
  95 +<script type="text/javascript" src="../../assets/js/weui.min.js"></script>
94 <script> 96 <script>
95 var app = new Vue({ 97 var app = new Vue({
96 el: '#app', 98 el: '#app',
@@ -93,6 +93,7 @@ @@ -93,6 +93,7 @@
93 'XX-Device-Type': getDevice() 93 'XX-Device-Type': getDevice()
94 } 94 }
95 getRequest('POST', 'home/index/loginBySMS', post, header).then(function (res) { 95 getRequest('POST', 'home/index/loginBySMS', post, header).then(function (res) {
  96 + console.log(res)
96 toastMsg(res.data.msg) 97 toastMsg(res.data.msg)
97 if (!app.timer) { 98 if (!app.timer) {
98 app.count = TIME_COUNT; 99 app.count = TIME_COUNT;
@@ -138,6 +139,7 @@ @@ -138,6 +139,7 @@
138 'XX-Device-Type': getDevice() 139 'XX-Device-Type': getDevice()
139 }; 140 };
140 getRequest('post', 'home/index/checkSMS', post, header).then(function (res) { 141 getRequest('post', 'home/index/checkSMS', post, header).then(function (res) {
  142 + console.log(res)
141 // alert(JSON.stringify(res.data.data.token)) 143 // alert(JSON.stringify(res.data.data.token))
142 if (res.data.code == 1) { 144 if (res.data.code == 1) {
143 $api.setStorage('token', res.data.data.token); 145 $api.setStorage('token', res.data.data.token);
@@ -182,15 +182,15 @@ @@ -182,15 +182,15 @@
182 <div :class="['iconfont',wx_type?'icon-xuanzhong':'icon-xuanzhong1']"></div> 182 <div :class="['iconfont',wx_type?'icon-xuanzhong':'icon-xuanzhong1']"></div>
183 </div> 183 </div>
184 </div> 184 </div>
185 - <div class="pay_way_item" @click="choose_zhi_fu">  
186 - <div class="iconfont icon-zhifubao"></div>  
187 - <div class="pay_right">  
188 - <div>  
189 - <div><span>支付宝支付</span><span class="iconfont icon-tuijian"></span></div>  
190 - </div>  
191 - <div :class="['iconfont',zhifu_type?'icon-xuanzhong':'icon-xuanzhong1']"></div>  
192 - </div>  
193 - </div> 185 + <!--<div class="pay_way_item" @click="choose_zhi_fu">-->
  186 + <!--<div class="iconfont icon-zhifubao"></div>-->
  187 + <!--<div class="pay_right">-->
  188 + <!--<div>-->
  189 + <!--<div><span>支付宝支付</span><span class="iconfont icon-tuijian"></span></div>-->
  190 + <!--</div>-->
  191 + <!--<div :class="['iconfont',zhifu_type?'icon-xuanzhong':'icon-xuanzhong1']"></div>-->
  192 + <!--</div>-->
  193 + <!--</div>-->
194 </div> 194 </div>
195 <div class="save_btn pays"><span class="pay_money">¥{{price}}</span><span class="pay_btn" 195 <div class="save_btn pays"><span class="pay_money">¥{{price}}</span><span class="pay_btn"
196 @click="pay_order">支付</span> 196 @click="pay_order">支付</span>
@@ -113,7 +113,8 @@ @@ -113,7 +113,8 @@
113 app.getCall(); 113 app.getCall();
114 app.getUserIndexInfo(); 114 app.getUserIndexInfo();
115 api.getCacheSize(function (ret) { 115 api.getCacheSize(function (ret) {
116 - app.size = (ret.size / 1048576).toFixed(2); 116 + // app.size = (ret.size / 1048576).toFixed(2);
  117 + app.size = (app.size / 1048576).toFixed(2);
117 }); 118 });
118 } 119 }
119 }, 120 },