瀏覽代碼

Merge branch 'master' of ssh://192.168.3.207:10022/jianyu/jy-docs

cuiyalong 4 年之前
父節點
當前提交
16044ee958

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

@@ -3,3 +3,4 @@ VUE_APP_BASE_API='/jydocs/'
 VUE_APP_BASE_URL='/swordfish/frontPage/docs/free/index/'
 VUE_APP_BASE_URL='/swordfish/frontPage/docs/free/index/'
 VUE_APP_MOCK=true
 VUE_APP_MOCK=true
 VUE_APP_BASE_PUBLIC='http://localhost:8080/'
 VUE_APP_BASE_PUBLIC='http://localhost:8080/'
+VUE_APP_LOG_URL='https://web2-jytest.jianyu360.cn/jyintegral/pointsLogs?logAction='

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

@@ -2,3 +2,4 @@ NODE_ENV=production
 VUE_APP_BASE_API='/jydocs/'
 VUE_APP_BASE_API='/jydocs/'
 VUE_APP_BASE_URL='/swordfish/docs/index'
 VUE_APP_BASE_URL='/swordfish/docs/index'
 VUE_APP_BASE_PUBLIC='/page_docs/'
 VUE_APP_BASE_PUBLIC='/page_docs/'
+VUE_APP_LOG_URL='https://web2-jytest.jianyu360.cn/jyintegral/pointsLogs?logAction='

+ 5 - 0
jydocs-pc/src/main.js

@@ -4,10 +4,15 @@ import router from './router'
 import singleSpaVue from 'single-spa-vue'
 import singleSpaVue from 'single-spa-vue'
 import { Loading } from 'element-ui'
 import { Loading } from 'element-ui'
 import '@/utils/'
 import '@/utils/'
+import axios from 'axios'
 
 
 Vue.use(Loading.directive)
 Vue.use(Loading.directive)
 Vue.config.productionTip = false
 Vue.config.productionTip = false
 
 
+router.afterEach((to, from) => {
+  axios.get(process.env.VUE_APP_LOG_URL + process.env.VUE_APP_BASE_URL + to.fullPath)
+})
+
 const vueOptions = {
 const vueOptions = {
   el: '#single-spa-app',
   el: '#single-spa-app',
   router,
   router,

+ 1 - 1
jydocs-pc/src/router.js

@@ -39,7 +39,7 @@ export default new Router({
       component: () => import('@/views/purchase/purchase.vue')
       component: () => import('@/views/purchase/purchase.vue')
     },
     },
     {
     {
-      path: '/purchasesuccess',
+      path: '/purchasesuccess/:num',
       name: 'purchasesuccess',
       name: 'purchasesuccess',
       component: () => import('@/views/purchase/purchasesuccess.vue')
       component: () => import('@/views/purchase/purchasesuccess.vue')
     },
     },

+ 7 - 6
jydocs-pc/src/views/purchase/purchase.vue

@@ -16,7 +16,7 @@
         <div class="doc_m_content">
         <div class="doc_m_content">
           <div class="doc_content_infor">
           <div class="doc_content_infor">
             <div class="doc_c_left">
             <div class="doc_c_left">
-              <img src="../../assets/images/banner.png" class="doc_c_img" alt="" />
+              <img :src="response.previewImgId" class="doc_c_img" alt="" />
               <span class="icon_word"></span>
               <span class="icon_word"></span>
             </div>
             </div>
             <div class="doc_c_right">
             <div class="doc_c_right">
@@ -55,7 +55,7 @@
           </div>
           </div>
         </div>
         </div>
         <div class="doc_agreement">
         <div class="doc_agreement">
-          <el-checkbox v-model="checked" >我已阅读并同意<a href="javascript:;" class="agree_link">《剑鱼标讯线上购买与服务条款》</a></el-checkbox>
+          <el-checkbox v-model="checked" >我已阅读并同意<a href="/front/staticPage/serviceterms.html" class="agree_link">《剑鱼标讯线上购买与服务条款》</a></el-checkbox>
         </div>
         </div>
         <div class="doc_surepur">
         <div class="doc_surepur">
           <button class="btnsure" @click="setExhange()" :disabled="!this.checked" id="btnsure">确定兑换</button>
           <button class="btnsure" @click="setExhange()" :disabled="!this.checked" id="btnsure">确定兑换</button>
@@ -114,8 +114,9 @@ export default {
       })
       })
       getJYchannel({ B: true }).then((res) => {
       getJYchannel({ B: true }).then((res) => {
         console.log(res)
         console.log(res)
-        if (res.error_code === 0) {
-          this.response.channel = res.points.balance
+        if (res.data.error_code === 0) {
+          console.log(res.data)
+          this.response.channel = res.data.data.points.balance
         }
         }
       })
       })
     },
     },
@@ -123,9 +124,9 @@ export default {
     setExhange () {
     setExhange () {
       getDocPays({ docId: this.query, phone: this.tel }).then((res) => {
       getDocPays({ docId: this.query, phone: this.tel }).then((res) => {
         console.log(res)
         console.log(res)
-        if (res.error_code === 0) {
+        if (res.data.error_code === 0) {
           sessionStorage.setItem('paydata', JSON.stringify(res.data))
           sessionStorage.setItem('paydata', JSON.stringify(res.data))
-          this.$router.push('/purchasesuccess')
+          this.$router.push('/purchasesuccess/' + this.response.price)
         }
         }
       })
       })
     }
     }

+ 9 - 6
jydocs-pc/src/views/purchase/purchasesuccess.vue

@@ -10,7 +10,7 @@
           <div class="exchange_text">兑换成功</div>
           <div class="exchange_text">兑换成功</div>
           <div class="ex_pay">
           <div class="ex_pay">
             <span class="icon_jianyu"></span>
             <span class="icon_jianyu"></span>
-            <span class="setmoney">-500</span>
+            <span class="setmoney">-{{query}}</span>
           </div>
           </div>
         </div>
         </div>
         <div class="doc_m_bottom">
         <div class="doc_m_bottom">
@@ -29,7 +29,7 @@
             </li>
             </li>
             <li class="bill_list">
             <li class="bill_list">
               <span class="bill_label">剑鱼币余额</span>
               <span class="bill_label">剑鱼币余额</span>
-              <span class="bill_result bill_money">2700</span>
+              <span class="bill_result bill_money">{{payinfor.balance}}</span>
             </li>
             </li>
           </ul>
           </ul>
           <div class="now_download">
           <div class="now_download">
@@ -53,6 +53,7 @@ export default {
   data () {
   data () {
     return {
     return {
       checked: true,
       checked: true,
+      query: '',
       payinfor: {
       payinfor: {
         payTime: '',
         payTime: '',
         payWay: '',
         payWay: '',
@@ -62,17 +63,19 @@ export default {
     }
     }
   },
   },
   created () {
   created () {
+    this.query = location.href.split('/')[location.href.split('/').length - 1] // 获取id
     this.setSession()
     this.setSession()
   },
   },
   methods: {
   methods: {
     setSession () {
     setSession () {
       let paydata = sessionStorage.getItem('paydata')
       let paydata = sessionStorage.getItem('paydata')
-      console.log(paydata)
       if (paydata) {
       if (paydata) {
         paydata = JSON.parse(paydata)
         paydata = JSON.parse(paydata)
-        this.payinfor.payTime = dateFormatter(paydata.payTime * 1000, 'yyyy-MM-dd HH:mm:ss')
-        this.payinfor.payWay = paydata.payWay
-        this.payinfor.code = paydata.code
+        console.log(paydata)
+        this.payinfor.payTime = dateFormatter(paydata.data.payTime * 1000, 'yyyy-MM-dd HH:mm:ss')
+        this.payinfor.payWay = paydata.data.payWay
+        this.payinfor.code = paydata.data.code
+        this.payinfor.balance = paydata.data.balance
       }
       }
     }
     }
   }
   }