Commit bc67f334 by liuzhanxin

fix

parent e2c31c11
// var url = "http://47.94.204.226";
// var url = "http://10.2.24.104:9301"
// var url = "http://10.2.24.104"
// var url = "http://10.2.113.181:9301"
var url = "http://10.2.112.16:9301"
var url = "http://10.2.113.39:9301"
// var url = "http://demo.jiuqi.com.cn:7947/cupl/app/api"
// http://10.2.24.110/cupl/app/h5
// var url = "http://jwcsys.cupl.edu.cn/api"
var token = "";
var addressSelectionTemp = [];
var user = {};
......
......@@ -15,7 +15,6 @@
<view class="item" v-for="(item, index) in dates" :key="index">
<view class="day" @click="selectOne(item, $event)" :class="{ choose: choose == handleDate(item.year,item.month+1,item.date), nolm: !item.lm }">{{ item.date }}</view>
<view class="sign" v-if="isSigned(item.year, item.month + 1, item.date)"></view>
<view class="today-text" v-if="isToday(item.year, item.month, item.date)"></view>
</view>
</view>
</view>
......
......@@ -166,7 +166,7 @@
{
"path": "pages/Appointment/detail",
"style": {
"navigationBarTitleText": "开放设置详情",
"navigationBarTitleText": "实验室详情",
"app-plus":{
"bounce":"none",
"titleNView" : {
......@@ -183,17 +183,18 @@
{
"path": "pages/Appointment/list",
"style": {
"navigationBarTitleText": "开放设置",
"navigationBarTitleText": "开放共享",
"app-plus":{
"bounce":"none",
"titleNView" : {
"buttons" : [
{
"text" : "筛选",
"fontSize" : "14"
}
]
}
"bounce":"none"
}
}
},
{
"path": "pages/Appointment/write-confirm",
"style": {
"navigationBarTitleText": "信息确认",
"app-plus":{
"bounce":"none"
}
}
},
......@@ -252,6 +253,51 @@
}
},
{
"path": "pages/Approval/Detail/waste-recovery-detail",
"style": {
"navigationBarTitleText": "审批详情",
"app-plus":{
"bounce":"none"
}
}
},
{
"path": "pages/Approval/Detail/person-train-detail",
"style": {
"navigationBarTitleText": "审批详情",
"app-plus":{
"bounce":"none"
}
}
},
{
"path": "pages/Approval/Detail/equipment-repair-detail",
"style": {
"navigationBarTitleText": "审批详情",
"app-plus":{
"bounce":"none"
}
}
},
{
"path": "pages/Approval/Detail/year-purchase",
"style": {
"navigationBarTitleText": "审批详情",
"app-plus":{
"bounce":"none"
}
}
},
{
"path": "pages/Approval/Detail/equipment-purchase",
"style": {
"navigationBarTitleText": "审批详情",
"app-plus":{
"bounce":"none"
}
}
},
{
"path": "pages/Approval/item-info",
"style": {
"navigationBarTitleText": "详情",
......
......@@ -16,8 +16,8 @@
</view>
</view>
</view>
<view v-if="currentCalendarData.length>0" v-for="(item,index) in currentCalendarData" :key="index" class="scroll-view-item" hover-class="hover" @click="setSelect(item)">
<view class="itemContainer">
<view v-if="currentCalendarData.length>0" v-for="(item,index) in currentCalendarData" :key="index" class="scroll-view-item" >
<view class="itemContainer" hover-class="hover" @click="setSelect(item)">
<view class="ori">
<image src="/static/lab-share/preDate.png" class="manIcon" />
<view style="display: flex;flex-direction: column;">
......@@ -85,8 +85,16 @@
var curDate = that.GLOBALUTIL.moment(new Date()).format("YYYY-MM-DD")
that.getByMonth(detailData.id,curDate);
that.getByDay(detailData.id,curDate);
})
uni.$on('refreshCalendar', function(data) {
that.refresh()
})
},
onUnload(){
uni.$off('calendarData')
uni.$off('writeConfirmData')
},
upper: function(e) {
// console.log(e)
......@@ -180,7 +188,27 @@
return (new Date(new_date2.getTime() - 1000)).getTime(); //获取当月最后一天日期
},
onNavigationBarButtonTap() {
this.showConfirm()
var timetableUuids = [];
this.currentCalendarData.map((opt)=>{
if(opt.checked){
timetableUuids.push(opt.calendarId);
}
})
if(timetableUuids.length == 0){
this.$refs.popup.open({
type:'err',
content:'请选择预约选项',
timeout:1000,
isClick:false
});
return
}
uni.navigateTo({
url:"./write-confirm",
})
setTimeout(()=>{
uni.$emit("writeConfirmData", [this.settingData,this.currentCalendarData]);
},500)
},
submit(){
var timetableUuids = [];
......@@ -231,14 +259,19 @@
})
},
onDateClick(date){
this.curSelectedDate = date;
this.getByDay(this.settingData.id,date);
},
onMonthChange(date){
this.getByMonth(this.settingData.id,date);
},
refresh(){
this.getByDay(this.settingData.id,this.curSelectedDate);
},
setSelect(item){
// console.log(item)
this.currentCalendarData.map((opt)=>{
if(opt.id == item.id){
if(opt.endTime == item.endTime){
opt.checked = !opt.checked;
}
return opt
......@@ -308,7 +341,7 @@
height: 100%;
background-color: #ffffff;
flex-direction: column;
justify-content: center;
justify-content: center;
}
.dataTitle {
......
......@@ -67,10 +67,11 @@
value: ""
}
]
data[0].value = detailData.labInfo.name
data[1].value = detailData.projects.length>0?detailData.projects[0].name:""
data[0].value = detailData.labName
data[1].value = JSON.parse(detailData.projects).length>0?JSON.parse(detailData.projects)[0].name:""
var periodTitle = "";
detailData.openPeriod.map((opt)=>{
var period = JSON.parse(detailData.openPeriod);
period.map((opt)=>{
that.openperiodarrayEnum.map((period)=>{
if(opt.code == period.name){
if(periodTitle == ""){
......@@ -83,7 +84,14 @@
})
data[2].value = periodTitle;
data[3].value = detailData.startTime+"~"+detailData.endTime
data[4].value = detailData.teacher?detailData.teacher:"暂无"
var teacherName = "暂无";
if(detailData.teacher){
var teachers = JSON.parse(detailData.teacher);
teachers.map((opt)=>{
teacherName = opt.name
})
}
data[4].value = teacherName;
data[5].value = detailData.maxUserCount
that.dataList = data;
that.$forceUpdate();
......@@ -93,7 +101,9 @@
uni.navigateTo({
url: "./calendar"
})
uni.$emit("calendarData", [this.settingData])
setTimeout(()=>{
uni.$emit("calendarData", [this.settingData])
},500)
},
onUnload() {
uni.$off('settingData')
......
......@@ -103,7 +103,8 @@
use: false, // 是否启用上拉加载; 默认true
},
showProject:false,
showDrawer:false
showDrawer:false,
pageIndex:0,
}
},
methods: {
......@@ -111,7 +112,7 @@
var that = this;
uni.$on('refreshTaskList', function(data) {
})
this.loadData();
this.loadData("lab");
},
onUnload() {
uni.$off('refreshTaskList', function(data) {})
......@@ -132,25 +133,66 @@
this.showDrawer = false;
this.downOption.use = true
}
},
/*获取列表*/
loadData() {
uni.request({
url: this.GLOBALUTIL.url + '/openlab/v2/settings?page=0&size=1000',
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
body: null,
success: (res) => {
console.log(JSON.stringify(res))
var data = res.data.data;
},
/*获取列表*/
loadData(type) {
var conditions = []
if(type == "lab"){
conditions = [
{
name: 'projects',
relation: 3,//等于
values:["[]"],
},{
name: 'discard',
relation: 4,//不等于
values:[true],
}
]
}else{
conditions = [
{
name: 'projects',
relation: 4,//等于
values:["[]"],
},{
name: 'discard',
relation: 4,//不等于
values:[true],
}
]
}
var body = {
"queryDefinitionMetaName": "com.beecode.tspp.openlab.query.TsppOpenLaboratorySettingsEntity",
"queryFields": ["id", "labUuid","created", "semester", "schoolYear", "labName", "projects", "equipment", "location", "teacher", "openPeriod", "startDate", "endDate", "userScope", "maxUserCount", "yearName", "termName"],
"orders": [{
"name": "created",
"asc": false
}],
"conditions": conditions,
"pageIndex": this.pageIndex,
"pageSize": 20,
"useScene": true,
"sceneId":"",
"usePaging": true
}
uni.request({
url: this.GLOBALUTIL.url + '/query/functionQuery',
method: 'POST',
header: this.GLOBALUTIL.commonHeader,
data: JSON.stringify(body),
success: (res) => {
var data = JSON.parse(res.data.rowDatas);
console.log(data);
data.map((setting)=>{
setting.labName = setting.labInfo.name;
setting.startTime = setting.startDate.split(" ")[0];
setting.endTime = setting.endDate.split(" ")[0];
var projects = setting.projects;
var projectName = ""
if(projects.length>0){
projects.map((opt)=>{
if(projects&&projects.length>0){
var tmp = JSON.parse(projects)
tmp.map((opt)=>{
projectName = projectName+opt.name+" "
})
}
......@@ -158,7 +200,8 @@
var teacher = setting.teacher;
var teacherName = ""
if(teacher&&teacher.length>0){
teacher.map((opt)=>{
var tmp = JSON.parse(teacher)
tmp.map((opt)=>{
teacherName = teacherName+opt.name+" "
})
}
......@@ -166,28 +209,77 @@
var location = setting.location;
var locationName = ""
if(location&&location.length>0){
location.map((opt)=>{
var tmp = JSON.parse(location)
tmp.map((opt)=>{
locationName = locationName+opt.name+" "
})
}
setting.locationName = locationName == ""?"暂无":locationName
return setting
})
this.dataList = data;
}
})
},
})
this.dataList = data;
}
})
},
/*获取列表*/
// loadData(type) {
// uni.request({
// url: this.GLOBALUTIL.url + '/openlab/v2/settings?page=0&size=50',
// method: 'GET',
// header: this.GLOBALUTIL.commonHeader,
// body: null,
// success: (res) => {
// console.log(JSON.stringify(res))
// var data = res.data.data;
// data.map((setting)=>{
// setting.labName = setting.labInfo.name;
// setting.startTime = setting.startDate.split(" ")[0];
// setting.endTime = setting.endDate.split(" ")[0];
// var projects = setting.projects;
// var projectName = ""
// if(projects.length>0){
// projects.map((opt)=>{
// projectName = projectName+opt.name+" "
// })
// }
// setting.projectName = projectName == ""?"暂无":projectName
// var teacher = setting.teacher;
// var teacherName = ""
// if(teacher&&teacher.length>0){
// teacher.map((opt)=>{
// teacherName = teacherName+opt.name+" "
// })
// }
// setting.teacherName = teacherName == ""?"暂无":teacherName
// var location = setting.location;
// var locationName = ""
// if(location&&location.length>0){
// location.map((opt)=>{
// locationName = locationName+opt.name+" "
// })
// }
// setting.locationName = locationName == ""?"暂无":locationName
// return setting
// })
// this.dataList = data;
// }
// })
// },
showProjectList(){
this.showProject = true
this.loadData("project");
},
showLabList(){
this.showProject = false
this.loadData('lab');
},
goDetail(data) {
uni.navigateTo({
url: "./detail?settingId=" + data.id
})
uni.$emit("settingData", [data])
setTimeout(()=>{
uni.$emit("settingData", [data])
},500)
}
},
components: {
......
<template>
<view class="content">
<view class="ori">
<text class="title" style="margin-top: 40rpx;">实验室:</text>
<text class="contenttext" style="margin-top: 40rpx;">{{labInfo.labName}}</text>
</view>
<view style="display: flex;flex-direction: column;">
<text class="title" style="margin-top: 40rpx;">预约时间:</text>
<text v-for=" index in calendarInfo" :key= "index.endTime" class="contenttextTime" style="margin-top: 40rpx;">{{index.startTime}}~{{index.endTime}}</text>
</view>
<view class="ori">
<text class="title" style="margin-top: 40rpx;">预约人:</text>
<text class="contenttext" style="margin-top: 40rpx;">{{GLOBALUTIL.user.name}}</text>
</view>
<view class="ori">
<text class="title" style="margin-top: 80rpx;">备注</text>
</view>
<view style="width: 100%;margin-top: 40rpx;">
<textarea class="detail" :value="description" @blur="changeTextValue" />
</view>
<button hover-class="submithover" @click="showModal" class="submit-button">
<text class="submittext" >提交</text>
</button>
<FormAlert v-if="submitShow" name="检查对象" placeholder="确定提交所填的数据?" @confirm="onSubmitClick" @cancel="cancel"></FormAlert>
<PopUp ref="popup" :isdistance="true"></PopUp>
</view>
</template>
<script>
import PopUp from "@/components/popup/popup.vue"
import FormAlert from "@/components/form-alert/h-form-alert.vue"
export default {
data() {
return {
submitShow:false,
description:"",
labInfo:{},
courseInfo:[]
}
},
onLoad(option) {
var that = this;
uni.$on('writeConfirmData',function(data){
console.log(data[1])
that.labInfo = data[0];
that.calendarInfo = data[1]
})
},
onUnload(){
uni.$off('writeConfirmData')
},
methods: {
onSubmitClick(){
var timetableUuids = [];
this.calendarInfo.map((opt)=>{
if(opt.checked){
timetableUuids.push(opt.calendarId);
}
})
var body = {
"openLab": this.labInfo.labUuid,
"openProject": this.labInfo.projects,
"note": this.description,
"timetableUuids": timetableUuids,
"todo": ""
}
uni.request({
url: this.GLOBALUTIL.url + '/openlab/v2/orders/user',
method: 'POST',
header: this.GLOBALUTIL.commonHeader,
data: JSON.stringify(body),
success: (res) => {
if(res.data.code == 200){
this.$refs.popup.open({
type:'success',
content:'预约成功',
timeout:1000,
isClick:false
});
setTimeout(()=>{
uni.navigateBack({
})
},1000)
setTimeout(()=>{
uni.$emit("refreshCalendar")
},1500)
}else{
var errmessage = res.data.message;
this.$refs.popup.open({
type:'err',
content:errmessage,
timeout:1000,
isClick:false
});
}
}
})
},
changeTextValue:function(e){
this.description = e.detail.value;
},
cancel:function(){
this.submitShow = false;
},
showModal:function(){
this.submitShow = true;
},
},
components: {
PopUp,
FormAlert
},
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
background-color: #FFFFFF
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 32rpx;
color: #666666;
}
.contenttext {
font-size: 30rpx;
color: #333333;
margin-left:30rpx;
}
.contenttextTime{
font-size: 28rpx;
color: #333333;
margin-left:30rpx;
}
.loginbtn {
width:180rpx;
height:200rpx;
}
.login-hover {
width:200rpx;
height:200rpx;
background-color:#00CE47;
}
.testview {
width:209rpx;
height:200rpx;
background-color:linear-gradient(red, yellow, blue);
}
.location-container{
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
width:100%;
}
.arrow-right{
width:40rpx;
height:40rpx;
}
.camera-button {
display:flex;
flex-direction: row;
align-items: center;
justify-content: center;
width:200rpx;
height: 200rpx;
padding:0 ;
}
.camera {
width:50rpx;
height:50rpx;
}
.submit-button {
display: flex;
width:600rpx;
height:60rpx;
align-items: center;
justify-content: center;
background: linear-gradient(-45deg, rgba(87, 225, 181, 1) 0%, rgba(0, 63, 255, 1) 100%);
border-radius: 15rpx;
margin-top: 180rpx;
}
.submittext {
font-size: 14px;
color: #FFFFFF;
font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
.submithover{
opacity: 0.7;
}
.detail {
width:100%;
height:300rpx;
border: 1rpx solid #e8e8e8;
}
.status_bar {
height: var(--status-bar-height);
width: 100%;
}
.location{
font-size: 34rpx;
color: #000000;
}
.tip {
width: 30rpx;
height:30rpx
}
.hover {
opacity: 0.7;
}
.ori{
display: flex;
flex-direction: row;
align-items: center;
background-color: #FFFFFF;
width:100%
}
</style>
......@@ -19,14 +19,14 @@
<MescrollBody class="containter" ref="mescrollRef" @init="mescrollInit" :down="downOption" :up="upOption" @down="downCallback"
@up="upCallback">
<view class="news-li" v-for="news in detailList" :key="news.id" hover-class="hover" @click="goDetail(news)">
<view class="ori" style="height:200upx;border-radius: 5px;">
<view class="ori" style="height:230upx;border-radius: 5px;">
<view class="line">
</view>
<view class="dotContainer">
<image mode="scaleToFill" class="dot" src="/static/lab-share/cover.jpg" />
</view>
<view style="height:160upx;justify-content: space-between;display: flex;flex-direction: column;">
<view style="height:200upx;justify-content: space-between;display: flex;flex-direction: column;">
<view>
<text class="labTitle">{{news.tradeName}}</text>
</view>
......@@ -35,17 +35,10 @@
</view>
<view class="ori">
<view class="oriItem">
<text class="type">{{"单价:"}}</text>
<text class="type" style="margin-left:20upx">{{news.unitPrice}}</text>
</view>
<view class="oriItem">
<text class="type">{{"数量:"}}</text>
<text class="type">{{"领用数量:"}}</text>
<text class="type" style="margin-left:20upx">{{news.num}}</text>
</view>
<view class="oriItem">
<text class="type">{{"总价:"}}</text>
<text class="type" style="margin-left:20upx">{{news.total}}</text>
</view>
</view>
</view>
</view>
......@@ -127,25 +120,23 @@
/*获取列表*/
loadData() {
uni.request({
url: this.GLOBALUTIL.url + '/bill/com.beecode.sedu.consumable.bill.PurchaseBill/'+this.approvalId+'?withSubs=true&dataId='+this.approvalId,
url: this.GLOBALUTIL.url + '/bill/com.beecode.sedu.consumable.bill.RequisitionBill/'+this.approvalId+'?withSubs=true&dataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
console.log(res.data)
var data = res.data.content;
data.createTimeFormated = this.GLOBALUTIL.moment(data.createTime).format("YYYY-MM-DD HH:mm:ss")
this.approvalData = data;
}
})
uni.request({
url: this.GLOBALUTIL.url + '/consumable/purchase/'+this.approvalId+'/detail',
url: this.GLOBALUTIL.url + '/consumable/requisition/'+this.approvalId+'/detail',
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
var data = res.data.data;
this.detailList = data.map((opt)=>{
opt.total = opt.num * opt.unitPrice
return opt
});
this.detailList = data
}
})
},
......@@ -172,22 +163,27 @@
value: ""
},
{
title: "数量",
value: ""
},
{
title: "生产厂家",
title: "领用数量",
value: ""
},
{
title: "原存放房间",
value: ""
},
{
title: "使用房间",
value: ""
}
]
console.log(data)
detailData[0].value = data.tradeName;
detailData[1].value = data.consumableInfo.alias
detailData[2].value = data.capacity
detailData[3].value = data.unit
detailData[4].value = data.specification
detailData[1].value = data.consumablesStock.consumablesEntity.consumableInfoEntity.alias
detailData[2].value = data.consumablesStock.consumablesEntity.capacity
detailData[3].value = data.consumablesStock.consumablesEntity.unit
detailData[4].value = data.consumablesStock.consumablesEntity.specification
detailData[5].value = data.num
detailData[6].value = data.manufacturer?data.manufacturer.name:"无"
detailData[6].value = data.consumablesStock.consumablesEntity.storeroomViewEntity.addresses[0].roomName
detailData[7].value = data.room.name
uni.navigateTo({
url: "../item-info"
})
......@@ -207,7 +203,7 @@
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/flowChartInfos?bizTypeName=com.beecode.sedu.consumable.bill.PurchaseBill&bizDataId='+this.approvalId,
url: this.GLOBALUTIL.url + '/workflow/flowChartInfos?bizTypeName=com.beecode.sedu.consumable.bill.RequisitionBill&bizDataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
......@@ -263,7 +259,7 @@
return ;
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/flowChartInfos?bizTypeName=com.beecode.sedu.consumable.bill.PurchaseBill&bizDataId='+this.approvalId,
url: this.GLOBALUTIL.url + '/workflow/flowChartInfos?bizTypeName=com.beecode.sedu.consumable.bill.RequisitionBill&bizDataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
......@@ -503,8 +499,8 @@
margin-top:15upx;
}
.dotContainer{
height:180upx;
width:80upx;
height:210upx;
width:120upx;
display: flex;
justify-content: center;
align-items: flex-start;
......
......@@ -111,14 +111,45 @@
}
})
},
goDetail(data) {
// uni.navigateTo({
// url: "./Detail/danger-purchase-detail?settingId=" + data.id
// })
var parameters = JSON.parse(data.parameters);
uni.navigateTo({
url: "./Detail/danger-use-detail?approvalId=" + parameters.bizDataId
})
goDetail(data) {
console.log(data)
if(data.bizTypeTitle_v == "领用单"){
var parameters = JSON.parse(data.parameters);
uni.navigateTo({
url: "./Detail/danger-use-detail?approvalId=" + parameters.bizDataId
})
}else if(data.bizTypeTitle_v == "采购单"){
var parameters = JSON.parse(data.parameters);
uni.navigateTo({
url: "./Detail/danger-purchase-detail?approvalId=" + parameters.bizDataId
})
}else if(data.bizTypeTitle_v == "废液回收"){
var parameters = JSON.parse(data.parameters);
uni.navigateTo({
url: "./Detail/waste-recovery-detail?approvalId=" + parameters.bizDataId
})
}else if(data.bizTypeTitle_v == "实验室人员培训申请"){
var parameters = JSON.parse(data.parameters);
uni.navigateTo({
url: "./Detail/person-train-detail?approvalId=" + parameters.bizDataId
})
}else if(data.bizTypeTitle_v == "设备报修申请"){
var parameters = JSON.parse(data.parameters);
uni.navigateTo({
url: "./Detail/equipment-repair-detail?approvalId=" + parameters.bizDataId
})
}else if(data.bizTypeTitle_v == "设备采购申请"){
var parameters = JSON.parse(data.parameters);
uni.navigateTo({
url: "./Detail/equipment-purchase?approvalId=" + parameters.bizDataId
})
}
else if(data.bizTypeTitle_v == "年度设备采购申请"){
var parameters = JSON.parse(data.parameters);
uni.navigateTo({
url: "./Detail/year-purchase?approvalId=" + parameters.bizDataId
})
}
}
},
components: {
......
......@@ -76,7 +76,9 @@
opt.status = 0;
// opt.checkitems = [];
})
that.dataList = content;
that.dataList = content;
console.log(that.dataList)
that.$forceUpdate()
})
this.loadData();
},
......@@ -162,7 +164,7 @@
user.name = encodeURI(this.GLOBALUTIL.user.username);
var body = this.checkResult
uni.request({
url: this.GLOBALUTIL.url + '/safety/v1/check-result',
url: this.GLOBALUTIL.url + '/safety/v1/check-result/v2',
method: 'POST',
data: JSON.stringify(body),
header:this.GLOBALUTIL.commonHeader,
......
......@@ -81,8 +81,11 @@
var itemData = this.findItemData();
uni.navigateTo({
url: "security-checkitem"
})
uni.$emit("sendCheckItem", [objectData, itemData, this.taskId]);
})
console.log(itemData)
setTimeout(()=>{
uni.$emit("sendCheckItem", [objectData, itemData, this.taskId]);
},300)
},
showObjectPicker() {
this.itemList = this.objectarr;
......
......@@ -51,7 +51,8 @@
account:"sysadmin",
password:"sysadmin",
positionTop: 0,
isDevtools: false,
isDevtools: false,
isDevelop:false
}
},
// computed: mapState(['forcedLogin']),
......@@ -60,6 +61,41 @@
const sysInfo = uni.getSystemInfoSync();
console.log(sysInfo.windowWidth)
this.GLOBALUTIL.sysInfo = sysInfo
//网页端获取code
// #ifdef H5
var searchData = window.location.search
if(searchData){
var searchStr = searchData.substring(1,searchData.length);
var codeStr = searchStr.split("&")[0]
var statusStr = searchStr.split("&")[1]
var code = codeStr.split("=")[1]
var status = statusStr.split("=")[1]
uni.request({
url: this.GLOBALUTIL.url+'/app-auth/accesstoken',
method: 'GET',
header: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
success: (res) => {
console.log(res)
uni.request({
url: this.GLOBALUTIL.url+'/app-auth/getUserInfo/' + code,
method: 'GET',
header: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
success: (res) => {
console.log(res)
}
})
}
})
console.log(code)
console.log(status)
}
// #endif
},
initPosition() {
/**
......
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