Browse Source

购买文件大小

TANGSHIZHE 4 years ago
parent
commit
89e5e276d5

+ 3 - 3
jydocs-mobile/.env.development

@@ -1,6 +1,6 @@
 NODE_ENV=development
-VUE_APP_MOCK=true
-VUE_APP_BASE_API = '/dev/api'
+VUE_APP_MOCK=false
+VUE_APP_BASE_API = '/jydocs'
 BASE_URL = '/dev/docs/'
 VUE_APP_BASE_URL = '/dev/docs/'
-VUE_APP_LOG_URL='https://web2-jytest.jianyu360.cn/jyintegral/pointsLogs?logAction='
+VUE_APP_LOG_URL='https://web2-jytest.jianyu360.cn/jyintegral/actionInfo?logAction='

+ 2 - 2
jydocs-mobile/.env.production

@@ -1,5 +1,5 @@
 NODE_ENV=production
-VUE_APP_BASE_API='/jydocs/'
+VUE_APP_BASE_API='/jydocs'
 BASE_URL = '/page_docs_app/'
 VUE_APP_BASE_URL = '/page_docs_app/'
-VUE_APP_LOG_URL='https://web2-jytest.jydev.jianyu360.com/jyLogs/pointsLogs?logAction='
+VUE_APP_LOG_URL='https://web2-jytest.jydev.jianyu360.com/jyLogs/actionInfo?logAction='

+ 13 - 15
jydocs-mobile/src/views/purchase/purchase.vue

@@ -59,7 +59,7 @@
         </div>
       </div>
       <div class="readly">
-        <van-checkbox v-model="checked" checked-color="#2ABED1" @click="checkBtn()">我已阅读并同意<a href="javascript:;" class="clause" @click="clause()">《剑鱼文库线上购买及服务条款》</a><a href="javascript:;" class="clause" @click="clause2()">《剑鱼标讯产品与服务线上购买服务条款》</a></van-checkbox>
+        <van-checkbox v-model="checked" checked-color="#2ABED1" @click="checkBtn()">我已阅读并同意<a href="javascript:;" class="clause" @click.stop="clause()">《剑鱼文库线上购买及服务条款》</a><a href="javascript:;" class="clause" @click.stop="clause2()">《剑鱼标讯产品与服务线上购买服务条款》</a></van-checkbox>
       </div>
       <div class="apply_footer">
         <button class="apply_button" :disabled="!this.btnChecked" @click="exchange()">确定兑换</button>
@@ -72,7 +72,7 @@
 import { Component, Vue } from 'vue-property-decorator'
 import { Checkbox, CheckboxGroup, Field, CellGroup, Form } from 'vant'
 import { mapActions } from 'vuex'
-import { isWeiXinBrowser, formatSize } from '../../utils/globalFunctions'
+import { formatSize } from '../../utils/globalFunctions'
 @Component({
   name: 'purchase-page',
   components: {
@@ -102,6 +102,7 @@ export default class extends Vue {
   regPhoneExg = /^(0|86|17951)?(13[0-9]|15[012356789]|166|17[3678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/
   query: any
   $router: any
+  $env: any
   response = {
     docName: '',
     price: '',
@@ -115,7 +116,6 @@ export default class extends Vue {
   created () {
     this.query = location.href.split('/')[location.href.split('/').length - 1] // 获取id
     this.getWordInfor()
-    this.getBindPhone()
   }
 
   validator (val: any) {
@@ -148,14 +148,6 @@ export default class extends Vue {
     }
   }
 
-  // 获取绑定的手机号
-  getBindPhone () {
-    this.getAccountInfo().then((res: any) => {
-      console.log(res)
-      this.tel = res.data.phone
-    })
-  }
-
   // 文档信息
   async getWordInfor () {
     this.getDetails({ docId: this.query }).then((res: any) => {
@@ -178,6 +170,12 @@ export default class extends Vue {
         this.response.balance = res.data.points.balance
       }
     })
+
+    // 获取绑定的手机号
+    this.getAccountInfo().then((res: any) => {
+      console.log(res)
+      this.tel = res.data.phone
+    })
   }
 
   // 确定兑换
@@ -186,7 +184,7 @@ export default class extends Vue {
       console.log(res)
       if (res.error_code === 0) {
         sessionStorage.setItem('paydata', JSON.stringify(res.data))
-        this.$router.push('/purchasesuccess/' + this.response.price)
+        this.$router.replace('/purchasesuccess/' + this.response.price)
       }
     })
   }
@@ -198,10 +196,10 @@ export default class extends Vue {
 
   // 剑鱼标讯产品与服务线上购买服务条款
   clause2 () {
-    if (!isWeiXinBrowser) {
-      location.href = '/front/staticPage/wx-serviceterms.html'
-    } else {
+    if (this.$env.platform === 'app') {
       location.href = '/jyapp/front/staticPage/dataExport_serviceterms.html'
+    } else {
+      location.href = '/front/staticPage/wx-serviceterms.html'
     }
   }
 }

+ 1 - 1
jydocs-pc/.env.development

@@ -3,4 +3,4 @@ VUE_APP_BASE_API='/jydocs/'
 VUE_APP_BASE_URL='/swordfish/frontPage/docs/sess/index/'
 VUE_APP_MOCK=false
 VUE_APP_BASE_PUBLIC='http://localhost:8080/'
-VUE_APP_LOG_URL='https://web2-jytest.jydev.jianyu360.com/jyLogs/pointsLogs?logAction='
+VUE_APP_LOG_URL='https://web2-jytest.jydev.jianyu360.com/jyLogs/actionInfo?logAction='

+ 1 - 1
jydocs-pc/.env.production

@@ -2,4 +2,4 @@ NODE_ENV=production
 VUE_APP_BASE_API='/jydocs/'
 VUE_APP_BASE_URL='/swordfish/docs/index'
 VUE_APP_BASE_PUBLIC='/page_docs/'
-VUE_APP_LOG_URL='https://www.jianyu360.com/jyLogs/pointsLogs?logAction='
+VUE_APP_LOG_URL='https://www.jianyu360.com/jyLogs/actionInfo?logAction='