Commit 3c7742cb authored by 黄奎's avatar 黄奎

去掉授权登录

parent f1a8b15d
...@@ -9,19 +9,18 @@ ...@@ -9,19 +9,18 @@
<view v-if="userData && userData.AccountName && userData.AccountId>0"> <view v-if="userData && userData.AccountName && userData.AccountId>0">
{{userData.AccountName}} {{userData.AccountName}}
</view> </view>
<indexassembly @success='againdata' v-else> <!-- <indexassembly @success='againdata' v-else>
<view class="flex_start_center"> <view class="flex_start_center">
<image <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/login2x.png" mode="aspectFit"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/login2x.png" class="loginIcon" id="loadImg"></image>
mode="aspectFit" class="loginIcon" id="loadImg"></image>
登录 登录
</view> </view>
</indexassembly> </indexassembly> -->
</view> </view>
<!-- 扫码登陆 --> <!-- 扫码登陆 -->
<view class="scanBox" @click="scan"> <view class="scanBox" @click="scan">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/scan2x.png" <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/scan2x.png" mode="aspectFit"
mode="aspectFit" class="scanIcon"> class="scanIcon">
</image> </image>
</view> </view>
...@@ -50,41 +49,34 @@ ...@@ -50,41 +49,34 @@
<view class="flex_around_center "> <view class="flex_around_center ">
<view class="wordItem"> <view class="wordItem">
<text class="wordItemTitle">今日新词</text> <text class="wordItemTitle">今日新词</text>
<text class="wordItemText">{{pageData.Words.NextWord||0}}<text <text class="wordItemText">{{pageData.Words.NextWord||0}}<text class="wordItemTextUnit"></text></text>
class="wordItemTextUnit"></text></text>
</view> </view>
<view class="wordItem"> <view class="wordItem">
<text class="wordItemTitle">复习词语</text> <text class="wordItemTitle">复习词语</text>
<text class="wordItemText">{{pageData.Words.ReviewWord||0}} <text <text class="wordItemText">{{pageData.Words.ReviewWord||0}} <text class="wordItemTextUnit"></text></text>
class="wordItemTextUnit"></text></text>
</view> </view>
</view> </view>
<view class="wordDuration" style="visibility: hidden;"> <view class="wordDuration" style="visibility: hidden;">
预计用时10分钟 预计用时10分钟
</view> </view>
<view style="text-align: center;font-size: 22rpx;color: #4C50E7;" <view style="text-align: center;font-size: 22rpx;color: #4C50E7;" v-if="(pageData.Words.NextWord==0||!pageData.Words.NextWord)&&(pageData.Words.ReviewWord==0||!pageData.Words.ReviewWord)">
v-if="(pageData.Words.NextWord==0||!pageData.Words.NextWord)&&(pageData.Words.ReviewWord==0||!pageData.Words.ReviewWord)">
暂无新词</view> 暂无新词</view>
<view class="wordBtn" v-else <view class="wordBtn" v-else @click="jumpPage(`/pages/word/word?CourseId=${pageData.Words.CourseId||0}&&ChapterId=${pageData.Words.NextCourseNo||0}&&ReviewChapterId=${pageData.Words.ReviewCourseNo||0}&&ClassId=${pageData.Words.ClassId||0}`)">
@click="jumpPage(`/pages/word/word?CourseId=${pageData.Words.CourseId||0}&&ChapterId=${pageData.Words.NextCourseNo||0}&&ReviewChapterId=${pageData.Words.ReviewCourseNo||0}&&ClassId=${pageData.Words.ClassId||0}`)">
开始学习 开始学习
</view> </view>
</view> </view>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coffee/xbkbanner2.png" <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coffee/xbkbanner2.png" mode="widthFix"
mode="widthFix" class="starbucks" @click="jumpJiahemini"></image> class="starbucks" @click="jumpJiahemini"></image>
<view class="courseBox"> <view class="courseBox">
<view class="courseInnerBox" @click="jumpTimetable"> <view class="courseInnerBox" @click="jumpTimetable">
<view class="top"> <view class="top">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/classtime.png" <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/classtime.png" mode="aspectFit"
mode="aspectFit" class="courseIcon"></image> class="courseIcon"></image>
<text class="courseDateStr" <text class="courseDateStr" style="margin: 0 16rpx 0 8rpx;">{{pageData.ClassNext.DateStr||'暂无'}}</text>
style="margin: 0 16rpx 0 8rpx;">{{pageData.ClassNext.DateStr||'暂无'}}</text> <text class="courseDateStr" v-if="pageData.ClassNext.DateStart">{{pageData.ClassNext.DateStart}}</text>
<text class="courseDateStr" <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/classroom.png" mode="aspectFit"
v-if="pageData.ClassNext.DateStart">{{pageData.ClassNext.DateStart}}</text> class="courseIcon" style="margin: 0 12rpx 0 50rpx;"></image>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/classroom.png" <text class="courseDateStr" style="margin-right: 30rpx;">{{pageData.ClassNext.RoomName||'暂无'}}</text>
mode="aspectFit" class="courseIcon" style="margin: 0 12rpx 0 50rpx;"></image>
<text class="courseDateStr"
style="margin-right: 30rpx;">{{pageData.ClassNext.RoomName||'暂无'}}</text>
</view> </view>
<view class="flex"> <view class="flex">
<view class="courseNameBox"> <view class="courseNameBox">
...@@ -95,8 +87,8 @@ ...@@ -95,8 +87,8 @@
{{pageData.ClassNext.CourseName||'暂无'}} {{pageData.ClassNext.CourseName||'暂无'}}
</view> </view>
</view> </view>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/female2x.png" <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/female2x.png" mode="aspectFit"
mode="aspectFit" class="courseIcon2"></image> class="courseIcon2"></image>
</view> </view>
</view> </view>
<view class="courseTitle"> <view class="courseTitle">
...@@ -116,16 +108,14 @@ ...@@ -116,16 +108,14 @@
height: 60rpx; height: 60rpx;
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 500;
color: #4C50E7;display: flex;align-items: center;" @click="jumpGarden(item.Id)">查看更多 color: #4C50E7;display: flex;align-items: center;"
@click="jumpGarden(item.Id)">查看更多
<van-icon name="arrow" /> <van-icon name="arrow" />
</view> </view>
</view> </view>
<view class="gardenCon" v-for="(item1,index1) in item.List" :key="index1" id="img" <view class="gardenCon" v-for="(item1,index1) in item.List" :key="index1" id="img" @click="jumpPage(`/pages/learningGarden/learningGardenDetails?Id=${item1.Id}`)">
@click="jumpPage(`/pages/learningGarden/learningGardenDetails?Id=${item1.Id}`)"> <image :src="item1.Img" mode="aspectFill" :id="'img'+index1" style="width: 100%;height:100%;border-radius: 24rpx 24rpx 0 0;"></image>
<image :src="item1.Img" mode="aspectFill" :id="'img'+index1" <view class="gardenTextBox" :style="{'background':`linear-gradient(to bottom,${item1.bgcolor},${item1.bgcolor1} , ${item1.bgcolor2})` }">
style="width: 100%;height:100%;border-radius: 24rpx 24rpx 0 0;"></image>
<view class="gardenTextBox"
:style="{'background':`linear-gradient(to bottom,${item1.bgcolor},${item1.bgcolor1} , ${item1.bgcolor2})` }">
<view class="gardenTitle one_line"> <view class="gardenTitle one_line">
{{item1.Title}} {{item1.Title}}
</view> </view>
...@@ -140,7 +130,8 @@ ...@@ -140,7 +130,8 @@
<canvas canvas-id="myCanvas" class="canvas" style="position:absolute;left: -1000px;"></canvas> <canvas canvas-id="myCanvas" class="canvas" style="position:absolute;left: -1000px;"></canvas>
<van-toast id="van-toast" /> <van-toast id="van-toast" />
<view class="diaocha-box" v-if="SurveyObj.ActivitySurveyId>0"> <view class="diaocha-box" v-if="SurveyObj.ActivitySurveyId>0">
<image @click="goTongji()" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1652251724000_835.png" mode="widthFix"></image> <image @click="goTongji()" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1652251724000_835.png"
mode="widthFix"></image>
</view> </view>
</view> </view>
</template> </template>
...@@ -166,7 +157,8 @@ ...@@ -166,7 +157,8 @@
getSweepCode getSweepCode
} from '../../api/index.js' } from '../../api/index.js'
import { import {
getImageColor,VersionUpdate getImageColor,
VersionUpdate
} from '../../utils/index.js' } from '../../utils/index.js'
import indexassembly from './components/indexassembly.vue' import indexassembly from './components/indexassembly.vue'
import navbar from '../../components/navbar.vue' import navbar from '../../components/navbar.vue'
...@@ -197,9 +189,9 @@ ...@@ -197,9 +189,9 @@
pageData: { pageData: {
LearningGardenList: [] LearningGardenList: []
}, },
SurveyObj:{ SurveyObj: {
ActivitySurveyId:0, ActivitySurveyId: 0,
ActivitySurveyGuestId:0, ActivitySurveyGuestId: 0,
}, },
userData: {} userData: {}
}); });
...@@ -208,7 +200,8 @@ ...@@ -208,7 +200,8 @@
VersionUpdate, VersionUpdate,
goTongji() { goTongji() {
//console.log("SurveyObj",data.SurveyObj); //console.log("SurveyObj",data.SurveyObj);
this.jumpPage('/pages/study/questionNaire?ActivitySurveyId='+data.SurveyObj.ActivitySurveyId+"&ActivitySurveyGuestId="+data.SurveyObj.ActivitySurveyGuestId); this.jumpPage('/pages/study/questionNaire?ActivitySurveyId=' + data.SurveyObj.ActivitySurveyId +
"&ActivitySurveyGuestId=" + data.SurveyObj.ActivitySurveyGuestId);
}, },
jumpPage(url) { jumpPage(url) {
uni.navigateTo({ uni.navigateTo({
...@@ -274,7 +267,7 @@ ...@@ -274,7 +267,7 @@
scanType: ['qrCode'], scanType: ['qrCode'],
success: function(res) { success: function(res) {
// 解码 // 解码
var saveObj={}; var saveObj = {};
try { try {
saveObj = that.base64_decode(res.result) saveObj = that.base64_decode(res.result)
// console.log(saveObj) // console.log(saveObj)
...@@ -282,23 +275,23 @@ ...@@ -282,23 +275,23 @@
//TODO handle the exception //TODO handle the exception
// console.log(e) // console.log(e)
} }
var jsonObj= JSON.parse(saveObj) var jsonObj = JSON.parse(saveObj)
if(jsonObj.cmd =="checkin"){ if (jsonObj.cmd == "checkin") {
var userData = uni.getStorageSync('userInfo'); var userData = uni.getStorageSync('userInfo');
console.log("userData",userData); console.log("userData", userData);
jsonObj.params.StuId=userData.AccountId; jsonObj.params.StuId = userData.AccountId;
var array=[]; var array = [];
array.push(jsonObj.params); array.push(jsonObj.params);
console.log("jsonObj.params",jsonObj.params) console.log("jsonObj.params", jsonObj.params)
let result = getSweepCode(array); let result = getSweepCode(array);
if (result) { if (result) {
// console.log(result) // console.log(result)
if (result.Code == 1) { if (result.Code == 1) {
console.log('扫码成功') console.log('扫码成功')
uni.navigateTo({ uni.navigateTo({
url:'./success', url: './success',
}) })
}else{ } else {
console.log('扫码失败') console.log('扫码失败')
uni.navigateTo({ uni.navigateTo({
url: './fail' url: './fail'
...@@ -319,8 +312,8 @@ ...@@ -319,8 +312,8 @@
proxy.$request("/AppletIndex/GetIndexInfo_V2", {}).then(res => { proxy.$request("/AppletIndex/GetIndexInfo_V2", {}).then(res => {
data.pageData = res.Data data.pageData = res.Data
uni.setStorageSync("indexData", res.Data); uni.setStorageSync("indexData", res.Data);
data.SurveyObj.ActivitySurveyId=res.Data.ActivitySurveyId; data.SurveyObj.ActivitySurveyId = res.Data.ActivitySurveyId;
data.SurveyObj.ActivitySurveyGuestId=res.Data.ActivitySurveyGuestId; data.SurveyObj.ActivitySurveyGuestId = res.Data.ActivitySurveyGuestId;
if (data.pageData.LearningGardenList.length > 0) { if (data.pageData.LearningGardenList.length > 0) {
data.pageData.LearningGardenList.forEach((x, y) => { data.pageData.LearningGardenList.forEach((x, y) => {
if (x.List.length > 0) { if (x.List.length > 0) {
...@@ -763,22 +756,25 @@ ...@@ -763,22 +756,25 @@
border-radius: 20rpx; border-radius: 20rpx;
margin: 60rpx auto; margin: 60rpx auto;
} }
.diaocha-box{
.diaocha-box {
position: absolute; position: absolute;
left: 0; left: 0;
right: 0; right: 0;
top: 0; top: 0;
bottom: 0; bottom: 0;
background-color: rgba(0,0,0,.3); background-color: rgba(0, 0, 0, .3);
padding:0 10vw; padding: 0 10vw;
display: flex; display: flex;
align-items: center; align-items: center;
z-index: 1000; z-index: 1000;
} }
.diaocha-box image{
width:80vw; .diaocha-box image {
width: 80vw;
} }
.no-scroll{
.no-scroll {
overflow: hidden !important; overflow: hidden !important;
height: 100vh !important; height: 100vh !important;
} }
......
...@@ -5,8 +5,7 @@ ...@@ -5,8 +5,7 @@
</van-nav-bar> </van-nav-bar>
<view class="top"> <view class="top">
登录 登录
<van-image width="193rpx" height="242rpx" fit="cover" class="yuqi" <van-image width="193rpx" height="242rpx" fit="cover" class="yuqi" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/yuqi.png" />
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/yuqi.png" />
</view> </view>
<view class="main"> <view class="main">
<van-cell-group> <van-cell-group>
...@@ -21,9 +20,9 @@ ...@@ -21,9 +20,9 @@
<view class="btnBox" @click="login"> <view class="btnBox" @click="login">
账号登录 账号登录
</view> </view>
<view class="flex_center_center" v-if="showVisitor"> <!-- <view class="flex_center_center" v-if="showVisitor">
<indexassembly width="440rpx" height="90rpx" @success='againdata' > <indexassembly width="440rpx" height="90rpx" @success='againdata'>
<view class="btnBox authBtn" > <view class="btnBox authBtn">
授权登录 授权登录
</view> </view>
</indexassembly> </indexassembly>
...@@ -32,9 +31,8 @@ ...@@ -32,9 +31,8 @@
游客登录 游客登录
</view> </view>
<van-toast id="van-toast" /> <van-toast id="van-toast" />
<van-dialog :show='show' title="提示" message='游客登录,不能使用全部功能!' show-cancel-button @cancel='show = false' <van-dialog :show='show' title="提示" message='游客登录,不能使用全部功能!' show-cancel-button @cancel='show = false' @confirm='login3'>
@confirm='login3'> </van-dialog> -->
</van-dialog>
</view> </view>
</template> </template>
...@@ -60,7 +58,7 @@ ...@@ -60,7 +58,7 @@
} from '../../wxcomponents/vant/dialog/index'; } from '../../wxcomponents/vant/dialog/index';
import indexassembly from '../index/components/indexassembly.vue' import indexassembly from '../index/components/indexassembly.vue'
export default { export default {
components:{ components: {
indexassembly indexassembly
}, },
setup(props, context) { setup(props, context) {
...@@ -79,7 +77,7 @@ ...@@ -79,7 +77,7 @@
openid: "", openid: "",
code: "", code: "",
show: false, show: false,
showVisitor:false, showVisitor: false,
}); });
let methods = { let methods = {
...@@ -95,12 +93,9 @@ ...@@ -95,12 +93,9 @@
jumpPage() { jumpPage() {
uni.reLaunch({ uni.reLaunch({
url: "/pages/index/index", url: "/pages/index/index",
// url: "/pages/index/index2",//跳转查看考试
}); });
clearTimeout(); clearTimeout();
}, },
async login() { async login() {
if (msg.Account == "" || !msg.Account) { if (msg.Account == "" || !msg.Account) {
Toast.fail("请输入账号"); Toast.fail("请输入账号");
...@@ -110,8 +105,8 @@ ...@@ -110,8 +105,8 @@
Toast.fail("请输入密码"); Toast.fail("请输入密码");
return; return;
} }
let res = await this.$request('/AppletLogin/Login', msg).then(res=>{ let res = await this.$request('/AppletLogin/Login', msg).then(res => {
if(res.Code==1){ if (res.Code == 1) {
res.Data.Account = msg.Account; res.Data.Account = msg.Account;
uni.setStorageSync("userInfo", res.Data); uni.setStorageSync("userInfo", res.Data);
Toast.success("登录成功"); Toast.success("登录成功");
...@@ -203,17 +198,10 @@ ...@@ -203,17 +198,10 @@
} else { } else {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
title:"未授权电话,请先点击授权按钮", title: "未授权电话,请先点击授权按钮",
duration:2000, duration: 2000,
}) })
// setTimeout(()=>{
// uni.reLaunch({
// url: '/pages/index/index' //没有授权登录
// });
// },1500)
} }
}, },
againdata() { againdata() {
uni.reLaunch({ uni.reLaunch({
...@@ -231,7 +219,7 @@ ...@@ -231,7 +219,7 @@
}, },
onLoad() { onLoad() {
//审核用 //审核用
this.showVisitor=new Date().getTime()> new Date('2022-03-16').getTime() this.showVisitor = new Date().getTime() > new Date('2022-03-16').getTime()
} }
}; };
</script> </script>
...@@ -321,11 +309,13 @@ ...@@ -321,11 +309,13 @@
text-align: center; text-align: center;
line-height: 88rpx; line-height: 88rpx;
} }
.authBtn{
.authBtn {
background-color: #EDEDFD !important; background-color: #EDEDFD !important;
color: #4C50E8 !important; color: #4C50E8 !important;
} }
.visitor{
.visitor {
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
font-family: PingFang SC; font-family: PingFang SC;
......
//请求教育接口 //请求教育接口
let host = '' let host = ''
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === "development") {
host = 'http://192.168.10.46:8300/api' host = 'http://192.168.10.128:8300/api'
// host = 'http://192.168.10.65:8085/api'
// host = 'https://eduapi.oytour.com/api'
} else { } else {
host = 'https://eduapi.oytour.com/api' host = 'https://eduapi.oytour.com/api'
} }
......
//请求电商接口 //请求电商接口
let host = '' let host = ''
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === "development") {
host = 'http://192.168.10.46:8200/api' host = 'http://192.168.10.128:8200/api'
//host = "https://mallapi.oytour.com/api"
} else { } else {
host = "https://mallapi.oytour.com/api" host = "https://mallapi.oytour.com/api"
} }
......
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