wesmiler 6 years ago
parent
commit
a75a4f2369
2 changed files with 3 additions and 3 deletions
  1. 2 2
      public/static/weixin/js/index.js
  2. 1 1
      public/themes/default/weixin/index.html

+ 2 - 2
public/static/weixin/js/index.js

@@ -5,7 +5,7 @@ var app = new Vue({
         curNav: 'index',
         // 定位信息
         location: {
-            city: '南宁市',
+            city: '位置',
             address: '',
             info: {},
             lng: '',
@@ -121,7 +121,7 @@ var app = new Vue({
                                     var detail = result.detail;
                                     var address = detail.addressComponents;
                                     if(address.city){
-
+                                        _this.location = address;
                                         $.toast.prototype.defaults.duration = 1000;
                                         $.toast('您的位置:'+address.city,'text');
                                     }

+ 1 - 1
public/themes/default/weixin/index.html

@@ -5,7 +5,7 @@
 <div id="app" v-cloak>
     <header class="zyw-header">
         <div class="zyw-container white-color">
-            <!--<div class="location"><span v-text="location.city"></span></div>-->
+            <div class="location"><span v-text="location.city"></span></div>
             <div class="head-search" id="search">
                 <i class="fa fa-search" aria-hidden="true"></i>
                 <input type="text" name="kw" placeholder="输入您当前要搜索的产品" class="white-color keyword">