浏览代码

静态页面

xcx 4 年前
父节点
当前提交
47676a9cdd

+ 1
- 0
index.html 查看文件

6
   <meta content='width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0' name='viewport'>
6
   <meta content='width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0' name='viewport'>
7
   <meta name="referrer" content="no-referrer">
7
   <meta name="referrer" content="no-referrer">
8
   <link rel="stylesheet" href="//at.alicdn.com/t/font_2022160_f7cp731cw5p.css">
8
   <link rel="stylesheet" href="//at.alicdn.com/t/font_2022160_f7cp731cw5p.css">
9
+  <script src="//api.map.baidu.com/api?v=2.0&ak=NH4DjAzwLcPkHgwBLWcfeZfr3uUnTlwk"></script>
9
   <title>牛彩</title>
10
   <title>牛彩</title>
10
   <script>
11
   <script>
11
     let Width = document.documentElement.clientWidth / 375 * 100
12
     let Width = document.documentElement.clientWidth / 375 * 100

+ 35
- 19
src/pages/index/DaLeTouDingDan/index.vue 查看文件

1
 <template>
1
 <template>
2
   <div class="Page">
2
   <div class="Page">
3
     <MainPageContainer :ShowMainHeader="true" :ShowMainHeaderBack="true" MainHeaderTitle="大乐透">
3
     <MainPageContainer :ShowMainHeader="true" :ShowMainHeaderBack="true" MainHeaderTitle="大乐透">
4
+      <div id="BaiDuMap" style="display: none;"></div>
4
       <div class="PageContainer flex-v">
5
       <div class="PageContainer flex-v">
5
         <div class="flex-item">
6
         <div class="flex-item">
6
           <div>
7
           <div>
114
   name: '',
115
   name: '',
115
   data () {
116
   data () {
116
     return {
117
     return {
118
+      Lat: '',
119
+      Lng: '',
117
       MyStoreList: [], // 我的店铺
120
       MyStoreList: [], // 我的店铺
118
       CurrentStoreName: null, // 当前选择店铺名称
121
       CurrentStoreName: null, // 当前选择店铺名称
119
       CurrentStoreId: null, // 当前选择店铺id
122
       CurrentStoreId: null, // 当前选择店铺id
141
   created () {
144
   created () {
142
     this.PageList = [...this.DaLeTouCart]
145
     this.PageList = [...this.DaLeTouCart]
143
     this.CheckOrderCount() // 计算订单倍数、金额
146
     this.CheckOrderCount() // 计算订单倍数、金额
144
-    this.GetStoreList({
145
-      queryData: {
146
-        location: '114.16936109999999,22.3193039',
147
-        lotteryId: 'lottery'
148
-      }
149
-    }).then((res) => {
150
-      this.StoreList = res.data.data.nearest || []
151
-      this.RecommendStoreList = res.data.data.recommend || []
152
-      this.MyStoreList = res.data.data.mine || []
153
-      if (this.MyStoreList.length) {
154
-        this.CurrentStoreName = this.MyStoreList[0].shopId === this.CurrentStoreId ? null : this.MyStoreList[0].name
155
-        this.CurrentStoreId = this.MyStoreList[0].shopId === this.CurrentStoreId ? null : this.MyStoreList[0].shopId
156
-      } else if (this.RecommendStoreList.length) {
157
-        this.CurrentStoreName = this.RecommendStoreList[0].shopId === this.CurrentStoreId ? null : this.RecommendStoreList[0].name
158
-        this.CurrentStoreId = this.RecommendStoreList[0].shopId === this.CurrentStoreId ? null : this.RecommendStoreList[0].shopId
159
-      } else if (this.StoreList.length) {
160
-        this.CurrentStoreName = this.StoreList[0].shopId === this.CurrentStoreId ? null : this.StoreList[0].name
161
-        this.CurrentStoreId = this.StoreList[0].shopId === this.CurrentStoreId ? null : this.StoreList[0].shopId
147
+    let map = new window.BMap.Geolocation()
148
+    let _that = this
149
+    map.getCurrentPosition(function (res) {
150
+      if (this.getStatus() === window.BMAP_STATUS_SUCCESS) {
151
+        _that.Lat = res.point.lat
152
+        _that.Lng = res.point.lng
153
+        _that.ToGetStoreList()
154
+      } else {
155
+        console.log('failed' + this.getStatus())
162
       }
156
       }
163
-    })
157
+    }, { enableHighAccuracy: true })
164
   },
158
   },
165
   mounted () {
159
   mounted () {
166
     this.$nextTick(() => {
160
     this.$nextTick(() => {
177
       'CreateAliPayOrder',
171
       'CreateAliPayOrder',
178
       'GetCurrentUserInfo'
172
       'GetCurrentUserInfo'
179
     ]),
173
     ]),
174
+    ToGetStoreList () {
175
+      this.GetStoreList({
176
+        queryData: {
177
+          location: `${this.Lng},${this.Lat}`,
178
+          lotteryId: 'lottery'
179
+        }
180
+      }).then((res) => {
181
+        this.StoreList = res.data.data.nearest || []
182
+        this.RecommendStoreList = res.data.data.recommend || []
183
+        this.MyStoreList = res.data.data.mine || []
184
+        if (this.MyStoreList.length) {
185
+          this.CurrentStoreName = this.MyStoreList[0].shopId === this.CurrentStoreId ? null : this.MyStoreList[0].name
186
+          this.CurrentStoreId = this.MyStoreList[0].shopId === this.CurrentStoreId ? null : this.MyStoreList[0].shopId
187
+        } else if (this.RecommendStoreList.length) {
188
+          this.CurrentStoreName = this.RecommendStoreList[0].shopId === this.CurrentStoreId ? null : this.RecommendStoreList[0].name
189
+          this.CurrentStoreId = this.RecommendStoreList[0].shopId === this.CurrentStoreId ? null : this.RecommendStoreList[0].shopId
190
+        } else if (this.StoreList.length) {
191
+          this.CurrentStoreName = this.StoreList[0].shopId === this.CurrentStoreId ? null : this.StoreList[0].name
192
+          this.CurrentStoreId = this.StoreList[0].shopId === this.CurrentStoreId ? null : this.StoreList[0].shopId
193
+        }
194
+      })
195
+    },
180
     SelectStore (item) { // 选择店铺
196
     SelectStore (item) { // 选择店铺
181
       if (this.DataLock) return
197
       if (this.DataLock) return
182
       this.DataLock = true
198
       this.DataLock = true

+ 15
- 3
src/pages/index/LanQiuDingDan/index.vue 查看文件

134
   name: '',
134
   name: '',
135
   data () {
135
   data () {
136
     return {
136
     return {
137
+      Lat: '',
138
+      Lng: '',
137
       MyStoreList: [],
139
       MyStoreList: [],
138
       PriceArr: [0, 0], // 奖金区间
140
       PriceArr: [0, 0], // 奖金区间
139
       AllParts: [], // 投注生成结果
141
       AllParts: [], // 投注生成结果
188
     ]),
190
     ]),
189
     Init () { // 初始化
191
     Init () { // 初始化
190
       this.PageList = [...this.LanQiuCart] // 赋值页面数据
192
       this.PageList = [...this.LanQiuCart] // 赋值页面数据
191
-      this.ToGetStoreList() // 获取店铺列表
193
+      let map = new window.BMap.Geolocation()
194
+      let _that = this
195
+      map.getCurrentPosition(function (res) {
196
+        if (this.getStatus() === window.BMAP_STATUS_SUCCESS) {
197
+          _that.Lat = res.point.lat
198
+          _that.Lng = res.point.lng
199
+          _that.ToGetStoreList()
200
+        } else {
201
+          console.log('failed' + this.getStatus())
202
+        }
203
+      }, { enableHighAccuracy: true })
192
       if (this.$route.query.type === 'single') { // 单关
204
       if (this.$route.query.type === 'single') { // 单关
193
         this.CurrentPassCode = '1*1'
205
         this.CurrentPassCode = '1*1'
194
         this.ToGetAllParts() // 枚举投注
206
         this.ToGetAllParts() // 枚举投注
257
     ToGetStoreList () { // 获取店铺列表
269
     ToGetStoreList () { // 获取店铺列表
258
       this.GetStoreList({
270
       this.GetStoreList({
259
         queryData: {
271
         queryData: {
260
-          location: '114.16936109999999,22.3193039',
261
-          lotteryId: 'lottery'
272
+          location: `${this.Lng},${this.Lat}`,
273
+          lotteryId: 'basketball'
262
         }
274
         }
263
       }).then((res) => {
275
       }).then((res) => {
264
         let StoreList = res.data.data.nearest || []
276
         let StoreList = res.data.data.nearest || []

+ 16
- 1
src/pages/index/PaiLie3DingDan/index.vue 查看文件

159
   name: '',
159
   name: '',
160
   data () {
160
   data () {
161
     return {
161
     return {
162
+      Lat: '',
163
+      Lng: '',
162
       MyStoreList: [],
164
       MyStoreList: [],
163
       CurrentStoreName: null, // 当前选择店铺名称
165
       CurrentStoreName: null, // 当前选择店铺名称
164
       CurrentStoreId: null, // 当前选择店铺id
166
       CurrentStoreId: null, // 当前选择店铺id
200
     Init () {
202
     Init () {
201
       this.PageList = [...this.PaiLie3Cart]
203
       this.PageList = [...this.PaiLie3Cart]
202
       this.CalcTotalCount()
204
       this.CalcTotalCount()
205
+      let map = new window.BMap.Geolocation()
206
+      let _that = this
207
+      map.getCurrentPosition(function (res) {
208
+        if (this.getStatus() === window.BMAP_STATUS_SUCCESS) {
209
+          _that.Lat = res.point.lat
210
+          _that.Lng = res.point.lng
211
+          _that.ToGetStoreList()
212
+        } else {
213
+          console.log('failed' + this.getStatus())
214
+        }
215
+      }, { enableHighAccuracy: true })
216
+    },
217
+    ToGetStoreList () {
203
       this.GetStoreList({
218
       this.GetStoreList({
204
         queryData: {
219
         queryData: {
205
-          location: '114.16936109999999,22.3193039',
220
+          location: `${this.Lng},${this.Lat}`,
206
           lotteryId: 'p3'
221
           lotteryId: 'p3'
207
         }
222
         }
208
       }).then((res) => {
223
       }).then((res) => {

+ 16
- 2
src/pages/index/PaiLie5DingDan/index.vue 查看文件

150
   name: '',
150
   name: '',
151
   data () {
151
   data () {
152
     return {
152
     return {
153
+      Lat: '',
154
+      Lng: '',
153
       MyStoreList: [],
155
       MyStoreList: [],
154
       CurrentStoreName: null, // 当前选择店铺名称
156
       CurrentStoreName: null, // 当前选择店铺名称
155
       CurrentStoreId: null, // 当前选择店铺id
157
       CurrentStoreId: null, // 当前选择店铺id
197
     ]),
199
     ]),
198
     Init () { // 初始化
200
     Init () { // 初始化
199
       this.PageList = [...this.PaiLie5Cart]
201
       this.PageList = [...this.PaiLie5Cart]
200
-      console.log(this.PageList)
202
+      let map = new window.BMap.Geolocation()
203
+      let _that = this
204
+      map.getCurrentPosition(function (res) {
205
+        if (this.getStatus() === window.BMAP_STATUS_SUCCESS) {
206
+          _that.Lat = res.point.lat
207
+          _that.Lng = res.point.lng
208
+          _that.ToGetStoreList()
209
+        } else {
210
+          console.log('failed' + this.getStatus())
211
+        }
212
+      }, { enableHighAccuracy: true })
201
       this.CalcTotalCount()
213
       this.CalcTotalCount()
202
       this.CreateData()
214
       this.CreateData()
215
+    },
216
+    ToGetStoreList () {
203
       this.GetStoreList({
217
       this.GetStoreList({
204
         queryData: {
218
         queryData: {
205
-          location: '114.16936109999999,22.3193039',
219
+          location: `${this.Lng},${this.Lat}`,
206
           lotteryId: 'p5'
220
           lotteryId: 'p5'
207
         }
221
         }
208
       }).then((res) => {
222
       }).then((res) => {

+ 34
- 19
src/pages/index/ShuangSeQiuDingDan/index.vue 查看文件

113
   name: '',
113
   name: '',
114
   data () {
114
   data () {
115
     return {
115
     return {
116
+      Lat: '',
117
+      Lng: '',
116
       MyStoreList: [],
118
       MyStoreList: [],
117
       CurrentStoreName: null, // 当前选择店铺名称
119
       CurrentStoreName: null, // 当前选择店铺名称
118
       CurrentStoreId: null, // 当前选择店铺id
120
       CurrentStoreId: null, // 当前选择店铺id
139
   created () {
141
   created () {
140
     this.PageList = [...this.ShuangSeQiuCart]
142
     this.PageList = [...this.ShuangSeQiuCart]
141
     this.CheckOrderCount() // 计算订单倍数、金额
143
     this.CheckOrderCount() // 计算订单倍数、金额
142
-    this.GetStoreList({
143
-      queryData: {
144
-        location: '114.16936109999999,22.3193039',
145
-        lotteryId: 'double-color'
146
-      }
147
-    }).then((res) => {
148
-      this.StoreList = res.data.data.nearest || []
149
-      this.RecommendStoreList = res.data.data.recommend || []
150
-      this.MyStoreList = res.data.data.mine || []
151
-      if (this.MyStoreList.length) {
152
-        this.CurrentStoreName = this.MyStoreList[0].shopId === this.CurrentStoreId ? null : this.MyStoreList[0].name
153
-        this.CurrentStoreId = this.MyStoreList[0].shopId === this.CurrentStoreId ? null : this.MyStoreList[0].shopId
154
-      } else if (this.RecommendStoreList.length) {
155
-        this.CurrentStoreName = this.RecommendStoreList[0].shopId === this.CurrentStoreId ? null : this.RecommendStoreList[0].name
156
-        this.CurrentStoreId = this.RecommendStoreList[0].shopId === this.CurrentStoreId ? null : this.RecommendStoreList[0].shopId
157
-      } else if (this.StoreList.length) {
158
-        this.CurrentStoreName = this.StoreList[0].shopId === this.CurrentStoreId ? null : this.StoreList[0].name
159
-        this.CurrentStoreId = this.StoreList[0].shopId === this.CurrentStoreId ? null : this.StoreList[0].shopId
144
+    let map = new window.BMap.Geolocation()
145
+    let _that = this
146
+    map.getCurrentPosition(function (res) {
147
+      if (this.getStatus() === window.BMAP_STATUS_SUCCESS) {
148
+        _that.Lat = res.point.lat
149
+        _that.Lng = res.point.lng
150
+        _that.ToGetStoreList()
151
+      } else {
152
+        console.log('failed' + this.getStatus())
160
       }
153
       }
161
-    })
154
+    }, { enableHighAccuracy: true })
162
   },
155
   },
163
   mounted () {
156
   mounted () {
164
     this.$nextTick(() => {
157
     this.$nextTick(() => {
174
       'GetStoreList',
167
       'GetStoreList',
175
       'GetCurrentUserInfo'
168
       'GetCurrentUserInfo'
176
     ]),
169
     ]),
170
+    ToGetStoreList () {
171
+      this.GetStoreList({
172
+        queryData: {
173
+          location: `${this.Lng},${this.Lat}`,
174
+          lotteryId: 'double-color'
175
+        }
176
+      }).then((res) => {
177
+        this.StoreList = res.data.data.nearest || []
178
+        this.RecommendStoreList = res.data.data.recommend || []
179
+        this.MyStoreList = res.data.data.mine || []
180
+        if (this.MyStoreList.length) {
181
+          this.CurrentStoreName = this.MyStoreList[0].shopId === this.CurrentStoreId ? null : this.MyStoreList[0].name
182
+          this.CurrentStoreId = this.MyStoreList[0].shopId === this.CurrentStoreId ? null : this.MyStoreList[0].shopId
183
+        } else if (this.RecommendStoreList.length) {
184
+          this.CurrentStoreName = this.RecommendStoreList[0].shopId === this.CurrentStoreId ? null : this.RecommendStoreList[0].name
185
+          this.CurrentStoreId = this.RecommendStoreList[0].shopId === this.CurrentStoreId ? null : this.RecommendStoreList[0].shopId
186
+        } else if (this.StoreList.length) {
187
+          this.CurrentStoreName = this.StoreList[0].shopId === this.CurrentStoreId ? null : this.StoreList[0].name
188
+          this.CurrentStoreId = this.StoreList[0].shopId === this.CurrentStoreId ? null : this.StoreList[0].shopId
189
+        }
190
+      })
191
+    },
177
     ResToString (target) {
192
     ResToString (target) {
178
       let arr = []
193
       let arr = []
179
       target.map((item) => {
194
       target.map((item) => {

+ 15
- 4
src/pages/index/ZuQiuDingDan/index.vue 查看文件

134
   name: '',
134
   name: '',
135
   data () {
135
   data () {
136
     return {
136
     return {
137
+      Lat: '',
138
+      Lng: '',
137
       MyStoreList: [],
139
       MyStoreList: [],
138
       PriceArr: [0, 0], // 奖金区间
140
       PriceArr: [0, 0], // 奖金区间
139
       AllParts: [], // 投注生成结果
141
       AllParts: [], // 投注生成结果
188
     ]),
190
     ]),
189
     Init () { // 初始化
191
     Init () { // 初始化
190
       this.PageList = [...this.ZuQiuCart] // 赋值页面数据
192
       this.PageList = [...this.ZuQiuCart] // 赋值页面数据
191
-      console.log(this.FootballKeys)
192
-      this.ToGetStoreList() // 获取店铺列表
193
+      let map = new window.BMap.Geolocation()
194
+      let _that = this
195
+      map.getCurrentPosition(function (res) {
196
+        if (this.getStatus() === window.BMAP_STATUS_SUCCESS) {
197
+          _that.Lat = res.point.lat
198
+          _that.Lng = res.point.lng
199
+          _that.ToGetStoreList()
200
+        } else {
201
+          console.log('failed' + this.getStatus())
202
+        }
203
+      }, { enableHighAccuracy: true })
193
       if (this.$route.query.type === 'single') { // 单关
204
       if (this.$route.query.type === 'single') { // 单关
194
         this.CurrentPassCode = '1*1'
205
         this.CurrentPassCode = '1*1'
195
         this.ToGetAllParts() // 枚举投注
206
         this.ToGetAllParts() // 枚举投注
258
     ToGetStoreList () { // 获取店铺列表
269
     ToGetStoreList () { // 获取店铺列表
259
       this.GetStoreList({
270
       this.GetStoreList({
260
         queryData: {
271
         queryData: {
261
-          location: '114.16936109999999,22.3193039',
262
-          lotteryId: 'lottery'
272
+          location: `${this.Lng},${this.Lat}`,
273
+          lotteryId: 'football'
263
         }
274
         }
264
       }).then((res) => {
275
       }).then((res) => {
265
         let StoreList = res.data.data.nearest || []
276
         let StoreList = res.data.data.nearest || []