斜塘答题

master
lion 2 years ago
commit 8b78f09e2c

@ -1,25 +1,25 @@
<script>
import util from "@/utils/util.js"
const jwx = require('jweixin-module')
export default {
onLaunch: function() {
console.log('App Launch')
this.$nextTick(() => {
<script>
import util from "@/utils/util.js"
const jwx = require('jweixin-module')
export default {
onLaunch: function() {
console.log('App Launch')
this.$nextTick(() => {
let link = window.location.href;
let that = this
if (/code=/.test(link) || link.indexOf("code") > -1) {
let temp = decodeURIComponent((new RegExp('[?|&]' + 'code' + '=' +
'([^&;]+?)(&|#|;|$)')
.exec(link) || [, ''])[1].replace(/\+/g, '%20')) || null
let lifeData = uni.getStorageSync('userInfo_token')
let that = this
if (/code=/.test(link) || link.indexOf("code") > -1) {
let temp = decodeURIComponent((new RegExp('[?|&]' + 'code' + '=' +
'([^&;]+?)(&|#|;|$)')
.exec(link) || [, ''])[1].replace(/\+/g, '%20')) || null
let lifeData = uni.getStorageSync('userInfo_token')
if (!lifeData) {
let that = this
this.util.request({
api: '/api/mobile/user/wechat-login?code=' + temp+'&activity_tag=bbfc',
data: '',
method: 'GET',
let that = this
this.util.request({
api: '/api/mobile/user/wechat-login?code=' + temp+'&activity_tag=bbfc',
data: '',
method: 'GET',
utilSuccess: function(res) {
console.log(res)
console.log(res)
uni.setStorageSync('userInfo_token', res);
that.util.request({
api: '/api/mobile/user/show',
@ -58,7 +58,7 @@
'updateAppMessageShareData-success'
)
},
});
jwx.updateTimelineShareData({
title: '百步芳草 与理同行', //
@ -76,7 +76,7 @@
utilFail: function(res) {
// that.util.toast(res)
// uni.clearStorageSync()
}
})
},
@ -85,13 +85,13 @@
// uni.clearStorageSync()
}
})
},
utilFail: function(res) {
},
utilFail: function(res) {
// that.util.toast(res)
// uni.clearStorageSync()
}
})
// uni.clearStorageSync()
}
})
}else{
this.util.request({
api: '/api/mobile/user/show',
@ -129,7 +129,7 @@
'updateAppMessageShareData-success'
)
},
});
jwx.updateTimelineShareData({
title: '百步芳草 与理同行', //
@ -157,31 +157,32 @@
// this.$router.go(0)
}
})
}
} else {
let redirect = encodeURIComponent(link.replace(/#\//, ""))
}
} else {
let redirect = encodeURIComponent(link.replace(/#\//, ""))
// let appid = 'wx7b33df2cb829cec6'
let appid = 'wxbf4862e929ab85b0'
uni.setStorageSync('userInfo_token', {"token":"7881|46ePF9WTeCxRWTioGoy6Sf1zVvwaCCb4DOQYm5FQ","user_id":5101});
window.location.href =
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${redirect}&response_type=code&scope=snsapi_base#wechat_redirect`
}
})
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style lang="scss">
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */
// uni.setStorageSync('userInfo_token', {"token":"7777|QHwrodQSA6dhth3TEYjIwJfW2BNok5azI9CO25yb","user_id":5081});
window.location.href =
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${redirect}&response_type=code&scope=snsapi_base#wechat_redirect`
}
})
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style lang="scss">
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */
@import "@/uni_modules/uview-ui/index.scss";
@import "@/GAL/css/gal.css";
</style>
@import "@/GAL/css/gal.css";
</style>

@ -199,7 +199,7 @@
url = '/pages/me/me'
}
console.log(userinfo,url,isclick)
return
// return
if(isclick){
uni.navigateTo({
url:url

@ -1,4 +1,4 @@
<template>
<template>
<view class='wrap'>
<view class="formwrap">
<view class='logintitle'>
@ -30,7 +30,7 @@
</view>
</view>
<u-picker @confirm="confirmParty" keyName="name" @cancel='cancelParty' :show="partyShow" :columns="partyColumns"></u-picker>
<!-- <view class="loginsucess" v-if="showSucess" :style="{'height':maskHeight+'px'}">
<view class="loginsucesswrap">
<view class="answerBtn">
@ -67,7 +67,7 @@
</view>
<view class="tipcenter">
<view>
<view v-html="active_tip"></view>
<view v-html="active_tip"></view>
</view>
</view>
<view class="answerBtn">
@ -75,13 +75,13 @@
</view>
<view class="tipbottom"></view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
</view>
</view>
</template>
<script>
export default {
data() {
return {
logintitle:require("../../static/logintitle.png"),
loginicon:require("../../static/loginicon.png"),
@ -89,12 +89,12 @@ export default {
tip:require("../../static/logintip.png"),
partyShow:false,
showSucess:false,
partyColumns:[],
form: {
name: '',
mobile: '',
partyColumns:[],
form: {
name: '',
mobile: '',
address: '',
department_id:''
department_id:''
},
showTip:false,
isEnd:true,
@ -105,8 +105,8 @@ export default {
windowHeight:0,
activeConfig:{},
startTime:'',
endTime:''
}
endTime:''
}
},
onShow(){
let that = this
@ -144,9 +144,9 @@ export default {
_this.windowHeight = res.windowHeight
}
});
},
methods: {
formatDateToMonthDay(dateString) {
// const date = new Date(dateString);
@ -194,6 +194,7 @@ export default {
api: '/api/mobile/quiz/get-departments',
data: this.form,
method: 'GET',
customLoading: true,
utilSuccess: function(res) {
let _arr = []
res.map(item=>{
@ -209,6 +210,9 @@ export default {
openPicker(){
uni.hideKeyboard()
this.partyShow = true
if (this.partyColumns.length === 0) {
this.getParty()
}
},
confirmParty(e){
console.log(e)
@ -224,8 +228,8 @@ export default {
isOnlyChinese(str) {
const chineseRegex = /^[\u4e00-\u9fa5]+$/;
return chineseRegex.test(str);
},
submit() {
},
submit() {
if(this.util.isNull(this.form.name)||this.util.isNull(this.form.mobile)||this.util.isNull(this.form.address)){
this.util.toast("请填写所有信息")
return
@ -264,12 +268,12 @@ export default {
utilFail: function(res) {
that.util.toast(res)
}
})
}
}
}
</script>
})
}
}
}
</script>
<style scoped>
page {
/* background-color: #F6F3EA; */
@ -278,7 +282,7 @@ export default {
position: relative;
background-color: #fffafa;
/* padding-top: 11vh; */
}
}
.wrap{
height: 100%;
width:100%;
@ -294,11 +298,11 @@ export default {
padding-bottom:120rpx
}
.logintitle{
}
/deep/ .logintitle .u-image{
margin:0 auto;
}
.logintitletext{
margin-top:40rpx;
@ -308,7 +312,7 @@ export default {
font-size: 28rpx;
color:#999999;
border-radius:0 60rpx 60rpx 0;
background-color: #fff;
background-color: #fff;
padding:10rpx 20rpx
}
.logintitletext span:first-child{
@ -344,7 +348,7 @@ export default {
}
/deep/ .loginbtn .u-button--circle{
box-shadow: 1rpx 7rpx 18rpx 0rpx rgba(235,107,85,0.3);
}
}
</style>
<style lang="scss">
.tips{
@ -427,16 +431,16 @@ export default {
font-size: 28rpx;
border-radius: 10rpx;
display: inline-block;
}
& > view:last-child{
color:#fff;
background: linear-gradient(90deg, #E73928, #F07963);
}
}
}
}
.loginsucess{
.tipwrap{
@ -464,4 +468,4 @@ export default {
}
}
}
</style>
</style>

@ -32,7 +32,7 @@
<view class="user-info">
<view class="user-info-avatar">
<img class="avatar" :src="userInfo.headimgurl ? userInfo.headimgurl : logo" alt="">
</view>
<view class="user-info__text">
@ -86,7 +86,7 @@
</view>
</view>
</view>
<!-- 未获得证书 -->
<view class="norecord tips" v-if="showRecord">
<view class="tipwrap">
@ -184,7 +184,7 @@
</view>
<view class="tipcenter" style="text-align: left;">
<view>
<view v-html="active_tip"></view>
<view v-html="active_tip"></view>
</view>
</view>
<view class="answerBtn">
@ -222,7 +222,7 @@ export default {
showtips:false,
winimg:require('../../static/index/logo2.png'),
tiptitle:require('../../static/tiptitle.png'),
isEnd:true,
isEnd:true,
active_tip:'',
maxCount:2,
};
@ -297,7 +297,7 @@ export default {
method: 'GET',
utilSuccess: function(res) {
that.answercount = res.ask_count
},
utilFail: function(res) {
that.util.toast(res)
@ -436,7 +436,7 @@ export default {
// color:#fff;
// background: linear-gradient(90deg, #E73928, #F07963);
// }
// }
// }
// }
@ -447,7 +447,7 @@ export default {
// height:643rpx;
// background-size: 100% 100%;
// .tipwrap{
// .nowintip{
// top:320rpx;
// }
@ -563,16 +563,16 @@ export default {
font-size: 28rpx;
border-radius: 10rpx;
display: inline-block;
}
& > view:last-child{
color:#fff;
background: linear-gradient(90deg, #E73928, #F07963);
}
}
}
}
.norecord{
.tipwrap{
@ -594,18 +594,18 @@ export default {
min-height:120rpx;
& >view:last-child{
padding-top:0;
}
& span{
color:#E73928
}
}
}
}
.nowin{
.tipwrap{
.tipicon{
background: url(../../static/nowinicon.png);
background-size: 100% 100%;
@ -624,7 +624,7 @@ export default {
min-height:120rpx;
}
}
}
.win{
.tipwrap{

Loading…
Cancel
Save