张延森 4 년 전
부모
커밋
a6beb98dfb
5개의 변경된 파일15개의 추가작업 그리고 6개의 파일을 삭제
  1. 4
    2
      src/pages/PaiJiang/PaiJiangGuanLi/index.vue
  2. 1
    1
      src/pages/SignUp/index.vue
  3. 5
    2
      src/pages/index/DingDanXiangQing/index.vue
  4. 3
    1
      src/util/PublicMethod.js
  5. 2
    0
      src/util/constant.js

+ 4
- 2
src/pages/PaiJiang/PaiJiangGuanLi/index.vue 파일 보기

@@ -70,10 +70,12 @@
70 70
 </template>
71 71
 
72 72
 <script>
73
-import MainPageContainer from '../../../components/common/MainPageContainer'
74 73
 import 'swiper/dist/css/swiper.css'
75 74
 import { swiper, swiperSlide } from 'vue-awesome-swiper'
76 75
 import { createNamespacedHelpers } from 'vuex'
76
+import MainPageContainer from '../../../components/common/MainPageContainer'
77
+import { APIBase } from '@/util/constant'
78
+
77 79
 const { mapState: mapUserState, mapActions: mapUserActions, mapMutations: mapUserMutations } = createNamespacedHelpers('user')
78 80
 export default {
79 81
   name: 'index',
@@ -143,7 +145,7 @@ export default {
143 145
           CurrentOrder = { ...item }
144 146
         }
145 147
       })
146
-      window.location.href = `/api/shop/sent-award/order/${CurrentOrder.orderId}?returlURL=${encodeURIComponent(`${window.location.origin}/#/PaiJiang/PaiJiangGuanLi`)}&token=${window.localStorage.Jwt}`
148
+      window.location.href = `${APIBase}api/shop/sent-award/order/${CurrentOrder.orderId}?returlURL=${encodeURIComponent(`${window.location.origin}/#/PaiJiang/PaiJiangGuanLi`)}&token=${window.localStorage.Jwt}`
147 149
       // this.SendPrize({ urlData: { id: OrderId.join(',') } }).then(() => {
148 150
       //   this.Toast('派奖成功')
149 151
       //   this.PageList.splice(Index, 1)

+ 1
- 1
src/pages/SignUp/index.vue 파일 보기

@@ -174,7 +174,7 @@ export default {
174 174
     ToShopSignUp () {
175 175
       if (!this.CheckFormData() || this.DataLock) return
176 176
       this.DataLock = true
177
-      this.ShopSignUp({ data: { ...this.FormData } }).then((res) => {
177
+      this.ShopSignUp({ data: { ...this.FormData, password: md5(this.FormData.password) } }).then((res) => {
178 178
         this.Toast(res.data.message)
179 179
         this.DataLock = false
180 180
         this.SignIn({ data: { password: md5(this.FormData.password), userName: this.FormData.phone } }).then(() => { // 登录

+ 5
- 2
src/pages/index/DingDanXiangQing/index.vue 파일 보기

@@ -53,7 +53,7 @@
53 53
 
54 54
         <div class="Bottom">
55 55
           <a @click="ToProcessOrder" v-if="!DetailInfo.bettingDetail.betting.isDrawn" class="active">确定</a>
56
-          <a :href="`/api/shop/sent-award/order/${$route.query.id}?returlURL=${encodeURIComponent(`${Origin}/#/PaiJiang/PaiJiangGuanLi`)}&token=${Jwt}`" v-if="DetailInfo.bettingDetail.betting.isDrawn && DetailInfo.bettingDetail.betting.isWinning && !DetailInfo.bettingDetail.betting.isCashed" class="active">派奖</a>
56
+          <a :href="`${APIBase}api/shop/sent-award/order/${$route.query.id}?returlURL=${encodeURIComponent(`${Origin}/#/PaiJiang/PaiJiangGuanLi`)}&token=${Jwt}`" v-if="DetailInfo.bettingDetail.betting.isDrawn && DetailInfo.bettingDetail.betting.isWinning && !DetailInfo.bettingDetail.betting.isCashed" class="active">派奖</a>
57 57
           <!-- <a v-else>撤单</a> -->
58 58
         </div>
59 59
       </div>
@@ -62,6 +62,7 @@
62 62
 </template>
63 63
 
64 64
 <script>
65
+import { createNamespacedHelpers } from 'vuex'
65 66
 import MainPageContainer from '../../../components/common/MainPageContainer'
66 67
 import DingDanXiangQingDaLeTou from '../../../components/index/DingDanXiangQingDaLeTou'
67 68
 import DingDanXiangQingShuangSeQiu from '../../../components/index/DingDanXiangQingShuangSeQiu'
@@ -69,7 +70,8 @@ import DingDanXiangQingZuQiu from '../../../components/index/DingDanXiangQingZuQ
69 70
 import DingDanXiangQingLanQiu from '../../../components/index/DingDanXiangQingLanQiu'
70 71
 import DingDanXiangQingP3 from '../../../components/index/DingDanXiangQingP3'
71 72
 import DingDanXiangQingP5 from '../../../components/index/DingDanXiangQingP5'
72
-import { createNamespacedHelpers } from 'vuex'
73
+import { APIBase } from '@/util/constant'
74
+
73 75
 const { mapActions: mapUserActions } = createNamespacedHelpers('user')
74 76
 export default {
75 77
   name: 'index',
@@ -79,6 +81,7 @@ export default {
79 81
       Origin: window.location.origin,
80 82
       CpImgArr: [],
81 83
       DetailInfo: null,
84
+      APIBase,
82 85
       DataLock: false // 数据锁
83 86
     }
84 87
   },

+ 3
- 1
src/util/PublicMethod.js 파일 보기

@@ -1,6 +1,8 @@
1 1
 /* eslint-disable */
2 2
 import Axios from 'axios'
3 3
 import qs from 'qs'
4
+import { APIBase } from '@/util/constant'
5
+
4 6
 const ToolClass = {
5 7
   ReplaceURLParams (url, params) {
6 8
     const args = { ...(params || {}), org: 'MQ' }
@@ -37,7 +39,7 @@ const ToolClass = {
37 39
       url: Url,
38 40
       data: Data,
39 41
       headers: { ...Header },
40
-      baseURL: process.env.NODE_ENV === 'production' ? 'https://api.xnsport.cn/' : '/'
42
+      baseURL: APIBase
41 43
     }
42 44
     Axios({ ...aParams }).then(res => {
43 45
       const token = res.headers['X-Authorization-JWT'] || res.headers['x-authorization-jwt'] || res.headers['X-AUTHORIZATION-JWT']

+ 2
- 0
src/util/constant.js 파일 보기

@@ -0,0 +1,2 @@
1
+
2
+export const APIBase = process.env.NODE_ENV === 'production' ? 'https://api.xnsport.cn/' : '/'