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

1

parent 50122d51
......@@ -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
......
......@@ -39,7 +39,7 @@
class="feedback-img"
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
:src="item1"
style="width: 100%; height: 100%"
......
......@@ -93,6 +93,9 @@
</view>
</view>
<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" />
<view
v-for="(item, index) in dataList"
......@@ -211,11 +214,14 @@ export default {
statusBarHeight: 0,
dataList: [],
allData:[],
loading:false,
});
let methods = {
async getData() {
data.loading=true
let res = await getStundentPlanStatistical(data.msg);
data.loading=false
if (res) {
data.dataList = res.Data;
}
......
......@@ -80,7 +80,7 @@
<view
class="teacher-name one_line"
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">
<van-rate
......@@ -90,6 +90,7 @@
void-icon=""
size="24rpx"
/>
<text class="FeedBackTime">{{indexData.FeedBackList[0].ClassDateStr}}&nbsp;{{indexData.FeedBackList[0].StartTime}}</text>
</view>
</view>
<view
......@@ -109,15 +110,32 @@
:key="index"
v-if="index === 0 || index === 1 || index === 2"
class="feedback-img"
@click="previewImage(indexData.FeedBackList[0].PhotoList, index)"
>
<image
:src="item"
style="width: 100%; height: 100%"
mode="aspectFill"
v-if="index === 0 || index === 1 || index === 2"
>
</image>
<view style="width: 100%; height: 100%" >
<image
:src="item"
style="width: 100%; height: 100%"
mode="aspectFill"
v-if="item.indexOf('mp4')==-1"
@click="previewImage(item, index)"
>
</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
class="layer"
v-if="
......@@ -363,6 +381,7 @@ export default {
SelectIsEnd: 0,
},
ActivityList: [], //活动数据
videoContext:null
});
let methods = {
......@@ -392,7 +411,6 @@ export default {
},
async getActivityData() {
let res = await getActivityList(data.ActiveMsg);
console.log(res, "数据");
if (res.resultCode == 1) {
data.ActivityList = res.data.pageData;
}
......@@ -414,7 +432,8 @@ export default {
goActiveDetail(Id) {
this.jumpPage(`/pages/activity/activityDetails?Id=${Id}`);
},
previewImage(arr, i) {
previewImage(item, i) {
let arr=[item]
uni.previewImage({
urls: arr,
current: i,
......@@ -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(() => {
......@@ -787,7 +820,13 @@ export default {
font-weight: 500;
color: #111111;
}
.FeedBackTime{
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
margin-left: 20rpx;
}
.feedback-all {
font-size: 24rpx;
font-family: PingFang SC;
......@@ -808,6 +847,7 @@ export default {
height: 210rpx;
border-radius: 20rpx;
background-color: #eee;
overflow: hidden;
margin-right: 30rpx;
position: relative;
box-shadow: 0rpx 10rpx 30rpx 0rpx rgba(36, 36, 36, 0.2);
......
<template>
<view class="">
<view >
<van-nav-bar>
<van-icon slot="left" name="cross" size="50rpx" @click="back" />
</van-nav-bar>
......@@ -35,7 +35,11 @@
</van-field>
</van-cell-group>
</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> -->
<van-toast id="van-toast" />
</view>
......@@ -54,7 +58,7 @@ import {
inject,
} from "vue";
// import Toast from "../../wxcomponents/vant/toast/toast";
import { login } from "../../api/index";
import { login,phoneLogin,parsePhone } from "../../api/index";
export default {
setup(props, context) {
let Toast = inject("$toast");
......@@ -78,52 +82,8 @@ export default {
});
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() {
if (msg.Account == "" || !msg.Account) {
Toast.fail("请输入账号");
......@@ -152,19 +112,24 @@ export default {
}, 1000);
}
},
// getunionid(code) {
// let appid = "wxaa108410092fd276";
// let secret = "31cd99f321612f95b0006905032de7f0";
// uni.request({
// url: `https://api.weixin.qq.com/sns/jscode2session?appid=${appid}&secret=${secret}&js_code=${code}&grant_type=authorization_code`,
// success: (res) => {
// console.log(150, res);
// },
// fail: (err) => {
// console.log(154, err);
// },
// });
// },
getphonenumber(e){
console.log(117,e)
let encryptedData = e.detail.encryptedData;
let iv = e.detail.iv;
uni.login({
provider: 'weixin',
success: async (loginRes)=> {
let code=loginRes.code
let res = await parsePhone({
encryptedData,
iv,
code
})
console.log(0,res)
}
});
}
};
onMounted(() => {});
let that = methods;
......@@ -208,12 +173,11 @@ export default {
padding-top: 50rpx;
}
/deep/.loginBtn {
width: 600rpx;
.loginBtn {
width: 260rpx;
height: 90rpx;
background-color: #00acf9;
border-radius: 12rpx;
margin: 0 auto;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
......@@ -234,4 +198,15 @@ export default {
font-size: 30rpx;
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>
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