|
@@ -19,6 +19,20 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="rechargehave_pay_content">
|
|
|
+ <div class="pay_title">
|
|
|
+ 支付方式
|
|
|
+ </div>
|
|
|
+ <div class="jianyu_pay">
|
|
|
+ <div class="jy_pay_left">
|
|
|
+ <span class="jy_money">剑鱼币</span>
|
|
|
+ <span class="jy_tip">(剩余{{response.balance}}剑鱼币)</span>
|
|
|
+ </div>
|
|
|
+ <div class="jy_pay_icon">
|
|
|
+ <img src="../../assets/icon/checked.png" class="icon_right_option" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="docs_phone">
|
|
|
<!-- <van-cell-group>
|
|
|
<van-field v-model="tel" type="number" label="手机号码" placeholder="请输入手机号码" />
|
|
@@ -45,7 +59,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="readly">
|
|
|
- <van-checkbox v-model="checked" checked-color="#2ABED1" >我已阅读,理解并接受<a href="javascript:;" class="clause" @click="clause()">《剑鱼伙伴服务条款》</a></van-checkbox>
|
|
|
+ <van-checkbox v-model="checked" checked-color="#2ABED1" >我已阅读并同意<a href="javascript:;" class="clause" @click="clause()">《剑鱼文库线上购买及服务条款》</a><a href="javascript:;" class="clause" @click="clause2()">《剑鱼标讯产品与服务线上购买服务条款》</a></van-checkbox>
|
|
|
</div>
|
|
|
<div class="apply_footer">
|
|
|
<button class="apply_button" :disabled="!this.checked" @click="exchange()">确定兑换</button>
|
|
@@ -71,15 +85,18 @@ const regPhoneExg = /^(0|86|17951)?(13[0-9]|15[012356789]|166|17[3678]|18[0-9]|1
|
|
|
methods: {
|
|
|
...mapActions({
|
|
|
getDocPay: 'main/getDocPay',
|
|
|
- getDetails: 'main/getDetails'
|
|
|
+ getDetails: 'main/getDetails',
|
|
|
+ getListDetail: 'main/getListDetail'
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
export default class extends Vue {
|
|
|
protected getDocPay!: any
|
|
|
protected getDetails!: any
|
|
|
+ protected getListDetail!: any
|
|
|
checked = false
|
|
|
tel = ''
|
|
|
+ query: any
|
|
|
$router: any
|
|
|
response = {
|
|
|
docName: '',
|
|
@@ -87,16 +104,19 @@ export default class extends Vue {
|
|
|
downTimes: '',
|
|
|
docFileSize: '',
|
|
|
docPageSize: '',
|
|
|
- previewImgId: ''
|
|
|
+ previewImgId: '',
|
|
|
+ balance: ''
|
|
|
}
|
|
|
|
|
|
created () {
|
|
|
+ this.query = location.href.split('/')[location.href.split('/').length - 1] // 获取id
|
|
|
+ console.log(this.query)
|
|
|
this.getWordInfor()
|
|
|
}
|
|
|
|
|
|
// 文档信息
|
|
|
- getWordInfor () {
|
|
|
- this.getDetails({ docId: '4f6c00ba-8882-11eb-8699-0050568f51e7' }).then((res: any) => {
|
|
|
+ async getWordInfor () {
|
|
|
+ this.getDetails({ docId: this.query }).then((res: any) => {
|
|
|
console.log(res)
|
|
|
const item = res.data.detail
|
|
|
if (res.error_code === 0) {
|
|
@@ -108,13 +128,21 @@ export default class extends Vue {
|
|
|
this.response.previewImgId = item.previewImgId
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+ this.getListDetail({ B: true }).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.error_code === 0) {
|
|
|
+ this.response.balance = res.points.balance
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
// 确定兑换
|
|
|
exchange () {
|
|
|
- this.getDocPay({ docId: '4f6c00ba-8882-11eb-8699-0050568f51e7', phone: '18439509554' }).then((res: any) => {
|
|
|
+ this.getDocPay({ docId: this.query, phone: this.tel }).then((res: any) => {
|
|
|
console.log(res)
|
|
|
- if (res.data === 'success') {
|
|
|
+ if (res.error_code === 0) {
|
|
|
+ sessionStorage.setItem('paydata', JSON.stringify(res.data))
|
|
|
this.$router.push('/purchasesuccess')
|
|
|
}
|
|
|
})
|
|
@@ -132,9 +160,16 @@ export default class extends Vue {
|
|
|
message: '手机号格式错误'
|
|
|
}]
|
|
|
|
|
|
- // 剑鱼标讯服务条款
|
|
|
+ // 剑鱼文库线上购买及服务条款
|
|
|
clause () {
|
|
|
+ this.$router.push('/onlineterm')
|
|
|
+ }
|
|
|
+
|
|
|
+ // 剑鱼标讯产品与服务线上购买服务条款
|
|
|
+ clause2 () {
|
|
|
+ // app:https://app-a2.jianyu360.com/jyapp/front/staticPage/dataExport_serviceterms.html
|
|
|
// this.$router.push('/readme')
|
|
|
+ // wx:https://www.jianyu360.com/front/staticPage/wx-serviceterms.html
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -202,6 +237,47 @@ export default class extends Vue {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .rechargehave_pay_content{
|
|
|
+ padding: 0 16px;
|
|
|
+ margin-top: 8px;
|
|
|
+ width: 100%;
|
|
|
+ height: 100px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border-bottom: 1px solid rgba($color: #000000, $alpha: 0.05);
|
|
|
+ background: #ffffff;
|
|
|
+ .pay_title{
|
|
|
+ margin-top: 16px;
|
|
|
+ width: 100%;
|
|
|
+ height: 24px;
|
|
|
+ color: #171826;
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 24px;
|
|
|
+ }
|
|
|
+ .jianyu_pay{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 24px;
|
|
|
+ width: 100%;
|
|
|
+ height: 20px;
|
|
|
+ color: #171826;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 20px;
|
|
|
+ .jy_pay_left{
|
|
|
+ .jy_tip{
|
|
|
+ color: #2abed1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .jy_pay_icon{
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ .icon_right_option{
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
.docs_phone {
|
|
|
padding: 15px 0;
|
|
|
width: 100%;
|