123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>盟主中心-储蓄金购买</title>
- <meta name="keywords" content="盟主中心-储蓄金购买">
- <meta name="description" content="盟主中心-储蓄金购买">
- <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
- <meta content="telephone=no" name="format-detection">
- <meta content="email=no" name="format-detection">
- <meta name="apple-mobile-web-app-title" content="盟主中心-储蓄金购买">
- <meta http-equiv="Cache-Control" content="no-siteapp">
- <link rel="stylesheet" href="./static/css/crop.css">
- <link rel="stylesheet" href="./static/css/main.css">
- <style>
- .f36{font-size: .96rem;}
- .f17{font-size:.4533rem;}
- .m25{margin:0 .6667rem;}
- .mt6{margin-top: .16rem;}
- .mt22{margin-top: .5867rem;}
- .jccen{justify-content: center;}
- .bgcf4{background-color: #f4f4f4;width:100vw;height:.2133rem;}
- .artical{padding: .5333rem .4267rem;}
- .underline{text-decoration:underline;}
- .buyFunds{color:#905312;background: url('./static/images/user-buyFunds.png') no-repeat ;background-size:cover;margin: .4267rem;padding: .5333rem;border-radius: .4rem;}
- .negoiate{background-color: #EEF4FE;width: 100vw;height: 1.0667rem;}
- .van-button__content{color:#323232}
- .fixBottom{position: fixed;bottom: 0.3rem;}
- .rules{overflow-y: scroll;word-break: break-all;line-height:2;}
- </style>
- </head>
- <body class="nopb pt0" style="padding-top:0;">
- <div class="ovh" id="app" v-cloak style="height:100vh">
- <van-nav-bar class=" user_title_normal f16" title="储蓄金购买" @click-left="goback" v-if="toptitleisshow" left-arrow v-cloak>
- <template #left>
- <van-icon name="arrow-left" color="#333" size="20"></van-icon>
- </template>
- </van-nav-bar>
- <div class="buyFunds bgcfff">
- <div class="f17 b">储蓄金购买</div>
- <div class="f36 mt16">¥{{needPay.get(BuyType)}}</div>
- <div class="f12 mt6">购买后金额将自动增加至盟主储蓄金</div>
- </div>
- <div class="bgcf4"></div>
- <div class="rules ovh-x">
- <div v-html="rules"></div>
- </div>
- <div class="fixBottom">
- <div class="negoiate df aic">
- <van-checkbox class="ml16" v-model="isagreenment" icon-size=".426667rem" checked-color="#FFD500" style="justify-content:center;">
- <template #icon="props"> <img class="img-icon" :src="props.checked ? activeIcon : inactiveIcon" style="height:.4267rem;"></template>
- <div class="f14 c666" style="margin:0;">本人阅读并认同<span class="underline c333" @click="goservice">《创业帮盟主体系说明》</span></div>
- </van-checkbox>
- </div>
- <van-button class="m0a mt6" color="#FDD500" block text="购买额度" @click="toBuy" round style="width:90%" :disabled="!isagreenment"> </van-button>
- </div>
- </div>
- <script src="./static/js/klm-vv.min.js"></script>
- <script src="./static/js/appfunc.min.js"></script>
- <script src="./static/js/klm-axios-config.js"></script>
- <script src="./static/js/publicfn.js"></script>
- <script>
- PublicLib.SetStatusBarBgColor({bgcolor:'ffffff'});
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- toptitleisshow,
- isagreenment:false,
- activeIcon:'./static/images/checked@3x.png',
- inactiveIcon:'./static/images/unchecked@3x.png',
- rules:'',
- needPay:new Map([[2, 15000], [1, 60000]]),
- BuyType:PublicLib.getCookieInfo('BuyType')*1,
- };
- },
- created(){
- this.getRules();
- const LeaderLevel = PublicLib.getCookieInfo('LeaderLevel')*1
- if(this.BuyType === 2 && LeaderLevel === 2){
- this.BuyType = 1
- }
- },
- mounted() {
- setTimeout(() => {
- let scroll = document.getElementsByClassName('rules')[0]
- let select = document.getElementsByClassName('fixBottom')[0]
- //- scroll.style.height = `calc(100vh - ${scroll.getBoundingClientRect().top - select.getBoundingClientRect().top}px)`
- scroll.style.height = `calc(${select.getBoundingClientRect().top - scroll.getBoundingClientRect().top }px)`
- });
- },
- methods: {
- goback(){
- PublicLib.GoBack({Level:1});
- },
- goservice(){
- PublicLib.Goto({Url:'user-leaderLevel-rules'});
- },
- async getRules(){
- const res = await getRequest('api/v1/pageinfo/detail?t='+Math.random(6),JSON.stringify({Id:11}));
- if(res.status !== '1')return tips('规则获取失败!');
- this.rules = res.data.Contents
- },
- async toBuy(){
- const UserId = PublicLib.getCookieInfo('userId');
- const BuyType = PublicLib.getCookieInfo('BuyType');
- const TotalPrice = this.needPay.get(this.BuyType)
- const res = await postRequest('api/v1/orders/buyreserve?t='+Math.random(6),JSON.stringify({BuyType,TotalPrice,UserId}));
- if(res.status === '1'){
- PublicLib.putCookieInfo('mallorderId',res.data.Id);
- setTimeout(()=>{
- PublicLib.Goto({Url:'mall-deal-detail'});
- },200)
- }
- }
- }
- });
- </script>
- </body>
- </html>
|