Browse Source

支付成功的界面

master
453530270@qq.com 3 years ago
parent
commit
f474e89455
  1. 2
      pages/home.vue
  2. 97
      pages/paySuccess/paySuccess.vue

2
pages/home.vue

@ -206,12 +206,12 @@
this.isLogin = true
// 0
//this.hasverify = this.userInfo.grade_id>0?true:false;
this.getUserInfo()
}else{
this.isLogin= false
setTimeout("",1200)
showError("请登录后再操作",this.gotologin())
}
},
gotologin(){
this.$navTo("pages/login/loginsms")

97
pages/paySuccess/paySuccess.vue

@ -19,12 +19,12 @@
<view class="down_item">
<view class="left_icon"></view>
<view class="down_link">国家文化专网网络应用入口</view>
<view class="right_icon" @click="download(1)"></view>
<view class="right_icon" @click="zwdz()"></view>
</view>
<view class="down_item">
<view class="left_icon"></view>
<view class="down_link">手机绑定关联程序</view>
<view class="right_icon" @click="download(2)"></view>
<view class="right_icon" @click="downapp()"></view>
</view>
</view>
<view class="s_title">2.输入设备安装码</view>
@ -44,19 +44,108 @@
</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: {
download(type){
//
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(){
const zwurl="http://10.24.4.14"
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(){
const durl ="";
//
var u = navigator.userAgent;
if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) {//
//alert('')
durl=""
} else if (u.indexOf('iPhone') > -1) {//
durl="https://bf-analyze.oss-cn-shenzhen.aliyuncs.com/test/planet"
//alert('iPhone')
} else if (u.indexOf('Windows Phone') > -1) {//winphone
//alert(' windows Phone')
}
//
window.location.href=durl
},
//
submit(){
const app = this
app.$navTo("pages/book/index")
}
}
}

Loading…
Cancel
Save