Commit 94ed0d8f authored by 罗超's avatar 罗超

1

parent 50122d51
...@@ -12,6 +12,30 @@ export function login(data) { ...@@ -12,6 +12,30 @@ export function login(data) {
}) })
} }
/**
* 解密手机号
* @param {JSON参数} data
*/
export function parsePhone(data) {
return request({
url: '/AppletLogin/GetGuestWeiXinMobile',
method: 'post',
data
})
}
/**
* 手机号登录
* @param {JSON参数} data
*/
export function phoneLogin(data) {
return request({
url: '/AppletLogin/LoginByAccount',
method: 'post',
data
})
}
/** /**
* 获取首页信息 * 获取首页信息
* @param {JSON参数} data * @param {JSON参数} data
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
class="feedback-img" class="feedback-img"
v-if="index1 === 0 || index1 === 1 || index1 === 2" v-if="index1 === 0 || index1 === 1 || index1 === 2"
> >
<view style="width: 100%; height: 100%;position: relative;" v-if="index1 === 0 || index1 === 1 || index1 === 2"> <view style="width: 100%; height: 100%;position: relative;">
<image <image
:src="item1" :src="item1"
style="width: 100%; height: 100%" style="width: 100%; height: 100%"
......
...@@ -93,6 +93,9 @@ ...@@ -93,6 +93,9 @@
</view> </view>
</view> </view>
<view class="Timetable-box"> <view class="Timetable-box">
<view class="flex flex_center_center" v-if="loading">
<van-loading size="48rpx" type="spinner">加载中...</van-loading>
</view>
<van-empty description="暂无数据" v-if="dataList.length === 0" /> <van-empty description="暂无数据" v-if="dataList.length === 0" />
<view <view
v-for="(item, index) in dataList" v-for="(item, index) in dataList"
...@@ -211,11 +214,14 @@ export default { ...@@ -211,11 +214,14 @@ export default {
statusBarHeight: 0, statusBarHeight: 0,
dataList: [], dataList: [],
allData:[], allData:[],
loading:false,
}); });
let methods = { let methods = {
async getData() { async getData() {
data.loading=true
let res = await getStundentPlanStatistical(data.msg); let res = await getStundentPlanStatistical(data.msg);
data.loading=false
if (res) { if (res) {
data.dataList = res.Data; data.dataList = res.Data;
} }
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<view <view
class="teacher-name one_line" class="teacher-name one_line"
v-if="indexData.FeedBackList[0].TeacherName" v-if="indexData.FeedBackList[0].TeacherName"
>{{ indexData.FeedBackList[0].TeacherName }} {{indexData.FeedBackList[0].CourseName}} {{indexData.FeedBackList[0].CreateTime.replace('T','&nbsp;')}}</view >{{ indexData.FeedBackList[0].TeacherName }} {{indexData.FeedBackList[0].CourseName}} </view
> >
<view class="rate"> <view class="rate">
<van-rate <van-rate
...@@ -90,6 +90,7 @@ ...@@ -90,6 +90,7 @@
void-icon="" void-icon=""
size="24rpx" size="24rpx"
/> />
<text class="FeedBackTime">{{indexData.FeedBackList[0].ClassDateStr}}&nbsp;{{indexData.FeedBackList[0].StartTime}}</text>
</view> </view>
</view> </view>
<view <view
...@@ -109,15 +110,32 @@ ...@@ -109,15 +110,32 @@
:key="index" :key="index"
v-if="index === 0 || index === 1 || index === 2" v-if="index === 0 || index === 1 || index === 2"
class="feedback-img" class="feedback-img"
@click="previewImage(indexData.FeedBackList[0].PhotoList, index)"
> >
<view style="width: 100%; height: 100%" >
<image <image
:src="item" :src="item"
style="width: 100%; height: 100%" style="width: 100%; height: 100%"
mode="aspectFill" mode="aspectFill"
v-if="index === 0 || index === 1 || index === 2" v-if="item.indexOf('mp4')==-1"
@click="previewImage(item, index)"
> >
</image> </image>
<video :id="'myVideo'+index" :src="item" style="width: 100%; height: 100%;"
:controls='controls'
:show-center-play-btn='false'
:show-fullscreen-btn='false'
@fullscreenchange='videoControl'
v-if="item.indexOf('mp4')!=-1"
></video>
<view @click="enlarge(index)" v-if="item.indexOf('mp4')!=-1"
style="position: absolute;left: 50%;top: 50%;margin-top: -49rpx;margin-left: -49rpx;width: 98rpx;height: 98rpx;border-radius: 20rpx;background-color: rgba(255,255,255,.4);display: flex;align-items: center;justify-content: center;">
<!-- 播放按钮 -->
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616471847000_345.png"
style="width: 37rpx;height: 44rpx;" mode=""></image>
</view>
</view>
<view <view
class="layer" class="layer"
v-if=" v-if="
...@@ -363,6 +381,7 @@ export default { ...@@ -363,6 +381,7 @@ export default {
SelectIsEnd: 0, SelectIsEnd: 0,
}, },
ActivityList: [], //活动数据 ActivityList: [], //活动数据
videoContext:null
}); });
let methods = { let methods = {
...@@ -392,7 +411,6 @@ export default { ...@@ -392,7 +411,6 @@ export default {
}, },
async getActivityData() { async getActivityData() {
let res = await getActivityList(data.ActiveMsg); let res = await getActivityList(data.ActiveMsg);
console.log(res, "数据");
if (res.resultCode == 1) { if (res.resultCode == 1) {
data.ActivityList = res.data.pageData; data.ActivityList = res.data.pageData;
} }
...@@ -414,7 +432,8 @@ export default { ...@@ -414,7 +432,8 @@ export default {
goActiveDetail(Id) { goActiveDetail(Id) {
this.jumpPage(`/pages/activity/activityDetails?Id=${Id}`); this.jumpPage(`/pages/activity/activityDetails?Id=${Id}`);
}, },
previewImage(arr, i) { previewImage(item, i) {
let arr=[item]
uni.previewImage({ uni.previewImage({
urls: arr, urls: arr,
current: i, current: i,
...@@ -427,6 +446,20 @@ export default { ...@@ -427,6 +446,20 @@ export default {
}, },
}); });
}, },
enlarge(i) {
// 全屏
data.videoContext = uni.createVideoContext('myVideo'+i);
data.videoContext.requestFullScreen({direction: 0})
},
videoControl(e){
if(e.detail.fullScreen==false){
data.videoContext.stop()
data.controls=false
}else{
data.videoContext.play()
data.controls=true
}
},
}; };
onMounted(() => { onMounted(() => {
...@@ -787,7 +820,13 @@ export default { ...@@ -787,7 +820,13 @@ export default {
font-weight: 500; font-weight: 500;
color: #111111; color: #111111;
} }
.FeedBackTime{
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
margin-left: 20rpx;
}
.feedback-all { .feedback-all {
font-size: 24rpx; font-size: 24rpx;
font-family: PingFang SC; font-family: PingFang SC;
...@@ -808,6 +847,7 @@ export default { ...@@ -808,6 +847,7 @@ export default {
height: 210rpx; height: 210rpx;
border-radius: 20rpx; border-radius: 20rpx;
background-color: #eee; background-color: #eee;
overflow: hidden;
margin-right: 30rpx; margin-right: 30rpx;
position: relative; position: relative;
box-shadow: 0rpx 10rpx 30rpx 0rpx rgba(36, 36, 36, 0.2); box-shadow: 0rpx 10rpx 30rpx 0rpx rgba(36, 36, 36, 0.2);
......
<template> <template>
<view class=""> <view >
<van-nav-bar> <van-nav-bar>
<van-icon slot="left" name="cross" size="50rpx" @click="back" /> <van-icon slot="left" name="cross" size="50rpx" @click="back" />
</van-nav-bar> </van-nav-bar>
...@@ -35,7 +35,11 @@ ...@@ -35,7 +35,11 @@
</van-field> </van-field>
</van-cell-group> </van-cell-group>
</view> </view>
<van-button block custom-class="loginBtn" @click="login">登录</van-button> <view class="flex flex_between_center btnBox">
<view class="loginBtn flex flex_center_center" @click="login">账号登录</view>
<button class="loginBtn" open-type="getPhoneNumber" @getphonenumber="getphonenumber">手机号一键登录</button>
</view>
<!-- <view class="auth" @click="authLogin"> 授权手机号一键登录 </view> --> <!-- <view class="auth" @click="authLogin"> 授权手机号一键登录 </view> -->
<van-toast id="van-toast" /> <van-toast id="van-toast" />
</view> </view>
...@@ -54,7 +58,7 @@ import { ...@@ -54,7 +58,7 @@ import {
inject, inject,
} from "vue"; } from "vue";
// import Toast from "../../wxcomponents/vant/toast/toast"; // import Toast from "../../wxcomponents/vant/toast/toast";
import { login } from "../../api/index"; import { login,phoneLogin,parsePhone } from "../../api/index";
export default { export default {
setup(props, context) { setup(props, context) {
let Toast = inject("$toast"); let Toast = inject("$toast");
...@@ -78,52 +82,8 @@ export default { ...@@ -78,52 +82,8 @@ export default {
}); });
clearTimeout(); clearTimeout();
}, },
authLogin() {
// that.getUserProfile();
},
// getUserProfile() {
// //新的获取用户资料
// wx.getUserProfile({
// desc: "用于完善资料", // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
// success: (info) => {
// console.log(83, info);
// that.getUserInfo(info);
// },
// fail: () => {
// uni.showToast({
// title: "微信登录授权失败",
// icon: "none",
// });
// },
// });
// },
// getUserInfo(info) {
// uni.getProvider({
// service: "oauth",
// success: function (res) {
// if (~res.provider.indexOf("weixin")) {
// uni.login({
// provider: "weixin",
// success: (_res) => {
// console.log(107, _res);
// that.getunionid(_res.code);
// },
// fail: () => {
// uni.showToast({
// title: "微信登录授权失败",
// icon: "none",
// });
// },
// });
// } else {
// uni.showToast({
// title: "请先安装微信或升级版本",
// icon: "none",
// });
// }
// },
// });
// },
async login() { async login() {
if (msg.Account == "" || !msg.Account) { if (msg.Account == "" || !msg.Account) {
Toast.fail("请输入账号"); Toast.fail("请输入账号");
...@@ -152,19 +112,24 @@ export default { ...@@ -152,19 +112,24 @@ export default {
}, 1000); }, 1000);
} }
}, },
// getunionid(code) { getphonenumber(e){
// let appid = "wxaa108410092fd276"; console.log(117,e)
// let secret = "31cd99f321612f95b0006905032de7f0"; let encryptedData = e.detail.encryptedData;
// uni.request({ let iv = e.detail.iv;
// url: `https://api.weixin.qq.com/sns/jscode2session?appid=${appid}&secret=${secret}&js_code=${code}&grant_type=authorization_code`,
// success: (res) => { uni.login({
// console.log(150, res); provider: 'weixin',
// }, success: async (loginRes)=> {
// fail: (err) => { let code=loginRes.code
// console.log(154, err); let res = await parsePhone({
// }, encryptedData,
// }); iv,
// }, code
})
console.log(0,res)
}
});
}
}; };
onMounted(() => {}); onMounted(() => {});
let that = methods; let that = methods;
...@@ -208,12 +173,11 @@ export default { ...@@ -208,12 +173,11 @@ export default {
padding-top: 50rpx; padding-top: 50rpx;
} }
/deep/.loginBtn { .loginBtn {
width: 600rpx; width: 260rpx;
height: 90rpx; height: 90rpx;
background-color: #00acf9; background-color: #00acf9;
border-radius: 12rpx; border-radius: 12rpx;
margin: 0 auto;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
...@@ -234,4 +198,15 @@ export default { ...@@ -234,4 +198,15 @@ export default {
font-size: 30rpx; font-size: 30rpx;
color: #111111; color: #111111;
} }
.btnBox{
width: 600rpx;
height: 90rpx;
/* background-color: #00acf9; */
border-radius: 12rpx;
margin: 0 auto;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
}
</style> </style>
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