Commit dfda60ab by suwenbiao

观看方式完结

parent 449f5879
......@@ -8,7 +8,7 @@
var reg2 = new RegExp("#","g")
room_id = room_id.replace(reg2,"")
uni.setStorageSync('room_id', room_id)
window.location.href = window.location.href.slice(0, window.location.href.indexOf('/',10));
window.location.replace(window.location.href.slice(0, window.location.href.indexOf('/',10)))
}
},
onShow() {
......
<template>
<view class="">
<u-notify ref="uNotify" message=""></u-notify>
<view class="pwd_view">
<!-- <view class="cancel">
<image src="../../static/images/close.png" mode=""></image>
......@@ -13,7 +14,7 @@
<view class="tips">
备注:请输入账号登录,如没有账号请找授课老师获取
</view>
<view class="btn_pwd">
<view class="btn_pwd" @click="send">
进入
</view>
</view>
......@@ -21,32 +22,91 @@
</template>
<script>
export default {
name: "acount_login",
props: {
logintype:Object
},
mounted() {
// uni.showToast({
// title:"owewqo"
// })
},
data() {
return {
acount_input:''
}
export default {
name: "acount_login",
props: {
logintype: Object
},
mounted() {
},
data() {
return {
acount_input: '',
nickname:''
}
},
methods: {
send() {
if (this.acount_input.length <= 0) {
uni.showToast({
title:"账号不能为空",
icon:"none"
})
} else {
this.$api.roomwatchytypephone(this.acount_input).then(res => {
console.log(res);
if (res.data.code == 200) {
this.nickname = res.data.data
if (localStorage.getItem('wxnick') == 1) {
this.$api.getusertoken('', this.acount_input, true).then(res => {
uni.setStorageSync('room_token', res.data.data)
this.$refs.uNotify.show({
top: 30,
type: 'success',
message: '验证成功',
duration: 1000 * 3,
fontSize: 20,
safeAreaInsetTop:true
})
setTimeout(() => {
location.reload()
}, 1500);
})
}
if (localStorage.getItem('wxnick') == 0) {
this.nickname = this.nickname + ""
uni.setStorageSync("user_name1",this.nickname)
this.$api.getusertoken(this.nickname, this.acount_input, true).then(res => {
uni.setStorageSync('room_token', res.data.data)
this.$refs.uNotify.show({
top: 30,
type: 'success',
message: '验证成功',
duration: 1000 * 3,
fontSize: 20,
safeAreaInsetTop:true
})
setTimeout(() => {
window.location.reload()
}, 1500);
})
}
} else {
this.$refs.uNotify.show({
top: 30,
type: 'error',
message: res.data.msg,
duration: 1000 * 3,
fontSize: 20,
safeAreaInsetTop:true
})
}
})
}
},
},
}
}
</script>
<style>
.pwd_view{
.pwd_view {
padding: 45rpx 60rpx;
text-align: center;
}
.btn_pwd{
.btn_pwd {
margin-top: 80rpx;
height: 80rpx;
background: #266FE8;
......@@ -54,6 +114,7 @@ export default {
color: #fff;
border-radius: 40rpx;
}
/* .cancel{
margin-top: -20rpx;
margin-bottom: 50rpx;
......@@ -64,4 +125,9 @@ export default {
float: right;
height: 30rpx;
} */
</style>
\ No newline at end of file
.tips {
font-size: 24rpx;
color: #777777;
margin-top: 90rpx;
}
</style>
......@@ -8,7 +8,7 @@
<view class="" style="font-size: 30rpx;margin-bottom: 42rpx;">
邀请码登录
</view>
<u--input placeholder="请输入账号" border="none" inputAlign="center" v-model="acount_input"
<u--input placeholder="请输入账号" border="none" inputAlign="center" v-model="bacount_input"
style="background-color: #F2F2F4;border-radius: 10rpx;font-size: 28rpx;padding: 20rpx 0;">
</u--input>
<view class="tips">
......@@ -32,12 +32,12 @@
},
data() {
return {
bacount_input:''
}
},
methods: {
sumbit_invitation() {
this.$api.roomwatchytypeinvite(this.acount_input).then(res => {
this.$api.roomwatchytypeinvite(this.bacount_input).then(res => {
if (res.data.code == 200) {
this.$refs.uNotify.show({
top: 30,
......
<template>
<view class="">
<u-notify ref="uNotify" message=""></u-notify>
<view class="pwd_view">
<!-- <view class="cancel">
<image src="../../static/images/close.png" mode=""></image>
......@@ -11,40 +12,100 @@
价格:
<text style="color: #FF4A43;">{{logintype.payment}}</text>
</view>
<view class="btn_pwd">
<view class="btn_pwd" @click="go_pay">
立即支付
</view>
<view class="btn_pwd" @click="close">
取消
</view>
</view>
</view>
</template>
<script>
export default {
name: "pay_login",
mounted() {
this.$api.roomwatchytypepay('WX').then(res=>{
console.log(res);
})
},
props: {
logintype:Object
},
data() {
return {
pwd:''
}
export default {
name: "pay_login",
mounted() {
// this.go_pay()
},
props: {
logintype: Object
},
data() {
return {
pwd: ''
}
},
methods: {
close(){
this.$emit("excitpay",false)
},
go_pay() {
var that = this
this.$api.roomwatchytypepay('WX').then(res => {
console.log(res.data.data);
if (res.data.data.url) {
var num = res.data.data.orderNum
var parms = res.data.data.url
var jWeixin = require('jweixin-module')
jWeixin.config({
debug: false,
appId: parms.jsapiAppid,
timestamp: parms.timeStamp, // 支付签名时间戳,注意微信 jssdk 中的所有使用 timestamp 字段均为小写。但最新版的支付后台生成签名使用的 timeStamp 字段名需大写其中的 S 字符
nonceStr: parms.nonceStr, // 支付签名随机串,不长于 32 位
package: parms.jsapipackage, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)
signType: parms.signType, // 微信支付V3的传入 RSA ,微信支付V2的传入格式与V2统一下单的签名格式保持一致
paySign: parms.paySign, // 支付签名
});
jWeixin.chooseWXPay({
appId: parms.jsapiAppid,
timestamp: parms.timeStamp, // 支付签名时间戳,注意微信 jssdk 中的所有使用 timestamp 字段均为小写。但最新版的支付后台生成签名使用的 timeStamp 字段名需大写其中的 S 字符
nonceStr: parms.nonceStr, // 支付签名随机串,不长于 32 位
package: parms.jsapipackage, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)
signType: parms.signType, // 微信支付V3的传入 RSA ,微信支付V2的传入格式与V2统一下单的签名格式保持一致
paySign: parms.paySign, // 支付签名
success:function(e){
that.$refs.uNotify.show({
top: 30,
type: 'success',
message: '支付成功',
duration: 1000 * 3,
fontSize: 20,
safeAreaInsetTop:true
})
that.$api.roomwatchytypeverifyPay(num).then(res=>{
console.log(res);
})
setTimeout(() => {
location.reload()
}, 1500);
},
fail:function(){
that.$refs.uNotify.show({
top: 30,
type: 'error',
message: '支付失败',
duration: 1000 * 3,
fontSize: 20,
safeAreaInsetTop:true
})
},
});
}
})
},
},
}
}
</script>
<style>
.pwd_view{
.pwd_view {
padding: 45rpx 60rpx;
text-align: center;
}
.btn_pwd{
.btn_pwd {
margin-top: 80rpx;
height: 80rpx;
background: #FF4A43;
......@@ -52,7 +113,8 @@ export default {
color: #fff;
border-radius: 40rpx;
}
/* .cancel{
/* .cancel{
margin-top: -20rpx;
margin-bottom: 50rpx;
margin-right: -20rpx;
......@@ -62,4 +124,4 @@ export default {
float: right;
height: 30rpx;
} */
</style>
\ No newline at end of file
</style>
......@@ -4,21 +4,26 @@
<view class="">
报名登录
</view>
<view class="scorll_view">
<u-notify ref="zNotify" message=""></u-notify>
<view class="scorll_view" v-if="!show_wait">
<view class="">
<u--input placeholder="请输入手机号" border="none" maxlength="11" clearable type="number"
inputAlign="center" v-model="tel"
<u--input :placeholder="form[0].remark" border="none" clearable inputAlign="center"
v-model="datalist.nickname" v-if="form[0].choose"
style="width: 88%;margin: 62rpx auto 32rpx auto;background-color: #F2F2F4;border-radius: 10rpx;font-size: 28rpx;padding: 20rpx 0;">
</u--input>
<view class="input_imgcode">
<u--input placeholder="请输入图片验证码" border="none" inputAlign="center" v-model="icode"
<u--input :placeholder="form[1].remark" border="none" maxlength="11" clearable type="number"
inputAlign="center" v-model="datalist.phone" v-if="form[1].choose"
style="width: 88%;margin: 62rpx auto 32rpx auto;background-color: #F2F2F4;border-radius: 10rpx;font-size: 28rpx;padding: 20rpx 0;">
</u--input>
<view class="input_imgcode" v-if="form[1].phone_on && form[1].choose">
<u--input placeholder="请输入图片验证码" border="none" inputAlign="center" v-model="datalist.imageCode"
style="width: 52.5%;background-color: #F2F2F4;border-radius: 10rpx;font-size: 28rpx;padding: 20rpx 0;float: left;">
</u--input>
<u--image :showLoading="true" :src="code_src" width="280rpx" height="88rpx"
@click="clickcodeimg" style="float: left;margin-left: 5%;"></u--image>
</view>
<view class="input_imgcode">
<u--input placeholder="请输入短信验证码" border="none" inputAlign="center" v-model="smscode"
<view class="input_imgcode" v-if="form[1].phone_on && form[1].choose">
<u--input placeholder="请输入短信验证码" border="none" inputAlign="center" v-model="datalist.code"
style="width: 52.5%;background-color: #F2F2F4;border-radius: 10rpx;font-size: 28rpx;padding: 20rpx 0;float: left;">
</u--input>
<view class="btn_getsms">
......@@ -26,14 +31,26 @@
<u-code :seconds="seconds" ref="uCode" @change="codeChange" @start="start"></u-code>
<u-button @tap="getCode"
style="border: 2rpx solid #276EE8;outline: none;color: #276EE8;margin-top: 4rpx;">
{{tips}}</u-button>
{{tips}}
</u-button>
</view>
</view>
<view class="" v-for="(item,index) in form" v-if="index>1 && form[index].choose">
<u--input :placeholder="item.remark" border="none" clearable inputAlign="center"
v-model="item.val" v-if="form[0].choose"
style="width: 88%;margin: 62rpx auto 32rpx auto;background-color: #F2F2F4;border-radius: 10rpx;font-size: 28rpx;padding: 20rpx 0;">
</u--input>
</view>
</view>
</view>
<view class="btn_smslogin" @click="sumbit">
<view class="btn_smslogin" @click="sumbit" v-if="!show_wait">
登录
</view>
<view class="" v-if="show_wait">
<view class="" style="padding: 50rpx;font-size: 26rpx;">
报名信息已提交,请等待管理员审核
</view>
</view>
</view>
</view>
</template>
......@@ -42,7 +59,7 @@
export default {
name: "sign_login",
props: {
logintype:Object
logintype: Object
},
components: {},
data() {
......@@ -57,10 +74,27 @@
numrandom: '',
seconds: 60,
tips: '获取验证码',
form: [],
datalist: {
nickname: '',
phone: '',
subject: '',
uniqueCode: '',
code: '',
time: '',
imageCode: '',
type: '',
},
show_wait:false
};
},
mounted() {
created() {
this.clickcodeimg()
this.checkwatchtype()
this.form = JSON.parse(this.logintype.applyJson)
},
mounted() {
},
methods: {
start() {
......@@ -113,6 +147,47 @@
})
}
},
//验证观看方式是否认证
checkwatchtype() {
this.$api.roomwatchytypeverify().then(res => {
if (res.data.code === 200) {} else {
if (res.data.data == 1) {
this.show_wait = true
}
}
})
},
sumbit(){
var that = this
if(that.form.length>2){
for(var index in that.form){
if(index > 1){
var title = that.form[index].title
var val = that.form[index].val
if (that.form[index].choose) {
var sub = title+':'+val+","
that.datalist.subject = that.datalist.subject + sub
}
}
}
}
console.log(that.datalist);
that.$api.roomwatchytypesubmit(that.datalist).then(res=>{
if(res.data.code == 200){
that.$refs.zNotify.show({
top: 30,
type: 'success',
message: '报名成功',
duration: 1000 * 3,
fontSize: 20,
safeAreaInsetTop: true
})
setTimeout(() => {
location.reload()
}, 1000);
}
})
},
}
}
</script>
......@@ -210,7 +285,8 @@
color: #fff;
font-size: 30rpx;
}
.scorll_view{
.scorll_view {
max-height: 600rpx;
overflow-y: scroll;
}
......
# jweixin-module
微信JS-SDK
## 安装
### NPM
```shell
npm install jweixin-module --save
```
### UMD
```http
https://unpkg.com/jweixin-module/out/index.js
```
## 使用
```js
var jweixin = require('jweixin-module')
jweixin.ready(function(){
// TODO
});
```
## 完整API
>[微信JS-SDK说明文档](https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115)
{
"_from": "jweixin-module",
"_id": "jweixin-module@1.6.0",
"_inBundle": false,
"_integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w==",
"_location": "/jweixin-module",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "jweixin-module",
"name": "jweixin-module",
"escapedName": "jweixin-module",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmmirror.com/jweixin-module/-/jweixin-module-1.6.0.tgz",
"_shasum": "4a7ea614083e3c9c3f49e2fdc2bb882cfa58dfcd",
"_spec": "jweixin-module",
"_where": "C:\\Users\\t1089\\Desktop\\新建文件夹 (2)",
"author": {
"name": "Shengqiang Guo"
},
"bugs": {
"url": "https://github.com/zhetengbiji/jweixin-module/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "微信JS-SDK",
"devDependencies": {},
"homepage": "https://github.com/zhetengbiji/jweixin-module#readme",
"keywords": [
"wxjssdk",
"weixin",
"jweixin",
"wechat",
"jssdk",
"wx"
],
"license": "ISC",
"main": "lib/index.js",
"name": "jweixin-module",
"repository": {
"type": "git",
"url": "git+https://github.com/zhetengbiji/jweixin-module.git"
},
"scripts": {},
"version": "1.6.0"
}
......@@ -67,6 +67,11 @@
"mime-types": "^2.1.12"
}
},
"jweixin-module": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/jweixin-module/-/jweixin-module-1.6.0.tgz",
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
},
"mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
......
......@@ -5,6 +5,7 @@
"main": "main.js",
"dependencies": {
"axios": "^1.1.3",
"jweixin-module": "^1.6.0",
"vconsole": "^3.14.7"
},
"devDependencies": {},
......
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>智课</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.2772579d.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.93fd1780.js></script><script src=/static/js/index.604e2e21.js></script></body></html>
\ No newline at end of file
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.2772579d.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.93fd1780.js></script><script src=/static/js/index.32321f34.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment