专网注册
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

277 lines
6.3 KiB

<template>
<view class="wrapper">
<view class="nav_area">
<image src="../../static/pay/left.png" mode="" style="width: 50rpx;height: 50rpx;"></image>
<image src="../../static/pay/help.png" mode="" style="width: 40rpx;height: 40rpx;"></image>
</view>
<view class="icon_area">
<image src="../../static/pay/success.png" mode="" class="success_icon"></image>
<view class="success_txt">支付完毕</view>
</view>
<view class="content_area">
<view class="">
<view class="title">请根据指引下载安装</view>
<view class="subtitle">请根据指引步骤进行国家文化专网网络入网应用安装</view>
</view>
<view class="">
<view class="s_title">1.应用下载</view>
<view class="down_area">
<view class="down_item" @click="zwdz()">
<view class="left_icon"></view>
<view class="down_link">国家文化专网网络应用入口请下载</view>
<view class="right_icon"></view>
</view>
<view class="down_item" @click="docopy('https://pelerin.cn/planet')">
<view class="left_icon"></view>
<view class="down_link">根服务器文件请复制</view>
<view class="right_icopy" ></view>
</view>
<view class="down_item" @click="docopy('fc00dd5d63caabd8')">
<view class="left_icon"></view>
<view class="down_link">网络ID请复制</view>
<view class="right_icopy" ></view>
</view>
</view>
<view class="s_title">2.输入设备安装码</view>
<view class="">
<input type="text" v-model="installationCode" placeholder="请输入" placeholder-style="color: #B7B7B7;" class="input_box">
</view>
<view class="s_title">3.交易中心账号绑定</view>
<view class="">
<input type="text" v-model="account" placeholder="默认为注册手机号" maxlength="11" placeholder-style="color: #B7B7B7;" class="input_box">
</view>
</view>
</view>
<view class="footer_area">
<button class="btn" @click="submit()">提交</button>
</view>
</view>
</template>
<script>
import store from '@/store'
// 校验登录
import { checkLogin, showError } from '@/core/app'
import * as UserApi from '@/api/user'
export default {
data() {
return {
installationCode: '',
account: '',
// dev refer
devpath:"",
//用户信息
userInfo:[]
}
},
onLoad(opt) {
this.devpath = opt.dev
},
mounted() {
// this.getUserInfo()
// this.mkdevsn()
this.init()
},
methods: {
// 长按复制
docopy(str){
navigator.clipboard.writeText(str).then(() => {
//this.$message.success('复制成功')
this.$toast("复制成功")
})
//this.$toast(str)
//alert("changancopy")
},
// 生成安装码
mkdevsn(){
const dev = this.devpath
const td = dev.charAt(2)
// console.log(td)
const tdd = dev.substring(2,-1).toUpperCase()+Date.now()
this.installationCode = tdd
// this.account = this.userInfo.mobile
},
init(){
if(checkLogin()==true){
this.isLogin = true
//console.log(this.userInfo)
this.getUserInfo()
}else{
this.isLogin= false
//this.$navTo("pages/login/index")
showError("请登录后再操作",this.gotologin())
}
},
// 专网地址
zwdz(){
let zwurl="https://pelerin.cn/CCDE.apk"
// 弹窗告诉用户去登录
uni.showModal({
title: '提示',
content: '即将打开链接:'+zwurl,
success: res => {
if(res.confirm){
this.$navTo("pages/webview/webview?url="+zwurl)
}
}
})
//window.location.href=zwurl
},
// 跳转到登录页
handleLogin() {
!this.isLogin && this.$navTo('pages/login/index')
},
// 获取当前用户信息
getUserInfo() {
const app = this
return new Promise((resolve, reject) => {
!app.isLogin ? resolve(null) : UserApi.info({}, { load: app.isFirstload })
.then(result => {
// console.log(result)
app.userInfo = result.data.userInfo
// app.account = result.data.userInfo.mobile
resolve(app.userInfo)
})
.catch(err => {
if (err.result && err.result.status == 401) {
app.isLogin = false
resolve(null)
} else {
reject(err)
}
})
})
},
//下载
downapp(){
let durl ="https://pelerin.cn/planet"; //
// 弹窗告诉用户
uni.showModal({
title: '提示',
content: '即将打开链接:'+durl,
success: res => {
if (res.confirm) {
this.$navTo("pages/webview/webview?url="+durl)
}
}
})
},
//提交成功
submit(){
const app = this
app.$navTo("pages/book/success")
}
}
}
</script>
<style scoped>
.wrapper{
color: #101010;
padding-bottom: 160rpx;
}
.nav_area{
height: 94rpx;
padding: 0px 50rpx;
padding-top: var(--status-bar-height);
margin-bottom: 24rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.icon_area{
text-align: center;
}
.success_icon{
width: 220rpx;
height: 220rpx;
}
.success_txt{
font-size: 20px;
margin: 20px 0px 35px;
}
.content_area{
padding: 0px 50rpx;
}
.title{
font-size: 26px;
font-weight: bold;
line-height: 50px;
}
.subtitle{
color: #999;
font-size: 13px;
margin-bottom: 26px;
}
.s_title{
font-size: 16px;
margin-bottom: 10px;
}
.down_area{
margin-bottom: 10px;
}
.down_item{
height: 70rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.left_icon{
width: 40rpx;
height: 40rpx;
background-image: url("../../static/pay/install.png");
background-size: cover;
}
.down_link{
font-size: 12px;
flex: 1;
margin: 0px 40rpx;
}
.right_icon{
width: 40rpx;
height: 40rpx;
background-image: url("../../static/pay/download.png");
background-size: cover;
}
.right_icopy{
width: 40rpx;
height: 40rpx;
background-image: url("../../static/pay/icopy.svg");
background-size: cover;
}
.input_box{
width: 640rpx;
height: 90rpx;
padding: 0px 40rpx;
box-sizing: border-box;
background-color: #f8f8f8;
font-size: 14px;
margin-bottom: 26px;
}
.footer_area{
width: 100vw;
height: 100rpx;
position: fixed;
bottom: 60rpx;
left: 0px;
}
.footer_area .btn{
width: 100%;
height: 100%;
font-size: 16px;
color: #fff;
background-color: #10476E;
border-radius: 0px;
line-height: 100rpx;
}
</style>