Commit c841221f authored by 吴颖's avatar 吴颖

Merge branch 'wuying' into 'master'

Wuying

See merge request !11
parents d43336d3 e7db421b
App({ App({
onLaunch: function () { onLaunch: function () {
console.log('222222222')
this.isReload() // 小程序是否有新版本 this.isReload() // 小程序是否有新版本
// this.getLogin()
this.getToken() this.getToken()
}, },
// 小程序是否有新版本 // 小程序是否有新版本
...@@ -37,6 +39,24 @@ App({ ...@@ -37,6 +39,24 @@ App({
}) })
} }
}, },
getLogin() {
let userInfo = wx.getStorageSync('userInfo')
if (userInfo) {
this.globalData.userInfo = userInfo
}
console.log(userInfo)
if (userInfo) {
wx.switchTab({
url: '/pages/tabbar/index/index',
})
} else {
if (userInfo) { // 判断有没有申请教练
wx.redirectTo({
url: '/pages/sign/apply/apply',
})
}
}
},
getToken() { getToken() {
var that = this var that = this
try { try {
......
{ {
"pages":[ "pages":[
"pages/tabbar/index/index", "pages/tabbar/index/index",
"pages/sign/login/login",
"pages/sign/bindTel/bindTel",
"pages/sign/apply/apply",
"pages/sign/applyResult/applyResult",
"pages/tabbar/class/class", "pages/tabbar/class/class",
"pages/tabbar/financial/financial", "pages/tabbar/financial/financial",
"pages/tabbar/personal/personal", "pages/tabbar/personal/personal",
...@@ -11,10 +16,7 @@ ...@@ -11,10 +16,7 @@
"pages/index/classDetail/classDetail", "pages/index/classDetail/classDetail",
"pages/index/performance/performance", "pages/index/performance/performance",
"pages/index/evaluation/evaluation", "pages/index/evaluation/evaluation",
"pages/team/teamDetail/teamDetail", "pages/team/teamDetail/teamDetail"
"pages/sign/login/login",
"pages/sign/bindTel/bindTel"
], ],
"tabBar":{ "tabBar":{
"custom":false, "custom":false,
......
const app = getApp() const app = getApp()
import { Base } from '../../../utils/base.js'; import {
Base
} from '../../../utils/base.js';
const base = new Base() const base = new Base()
Page({ Page({
data: { data: {
stuList:[], coach_id: '',
courseData : '', class_id: '',
noticeCount: 9, lesson_id: '',
}, stuList: [],
courseData: '',
noticeCount: 9,
},
onLoad: function (options) { onLoad: function (options) {
console.log(options.lesson_id) this.setData({
this.getlessondetail() class_id: options.class_id,
lesson_id: options.lesson_id
})
console.log(options.lesson_id)
this.getlessondetail()
}, },
getlessondetail : function (){ getlessondetail: function () {
const {coach_id, class_id,lesson_id} = this.data let params = {
let params = { url: 'coach/lessondetail',
url:'coach/lessondetail', data: {
data:{ coach_id: 5,
coach_id : 5, class_id: this.data.class_id,
class_id : 16, lesson_id: this.data.lesson_id
lesson_id : 69 },
}, callback: (data) => {
callback : (data) => { console.log(data)
console.log(data) this.setData({
this.setData({ courseData: data,
courseData : data, stuList: data.class_single_person
stuList : data.class_single_person })
}) }
} }
} base.newRequest(params)
base.newRequest(params) },
},
goperformance:function(e){ goperformance: function (e) {
var child_id = e.currentTarget.dataset.id var child_id = e.currentTarget.dataset.id
console.log(child_id) console.log(child_id)
wx.navigateTo({ wx.navigateTo({
url: '../../index/performance/performance?child_id=' + child_id, url: '../../index/performance/performance?child_id=' + child_id,
}) })
}, },
gocourseinstant: function () { gocourseinstant: function () {
wx.navigateTo({ wx.navigateTo({
url: '../../index/courseInstant/courseInstant', url: '../../index/courseInstant/courseInstant',
}) })
}, },
}) })
\ No newline at end of file
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<image src="/images/default_head.png" wx:if="{{item.child.thumb == null}}"></image> <image src="/images/default_head.png" wx:if="{{item.child.thumb == null}}"></image>
<image src="{{item.child.thumb}}" wx:else></image> <image src="{{item.child.thumb}}" wx:else></image>
<view> <view>
<view class="name">{{item.child.nick_name}}</view> <view class="name">{{item.child.nick_name !=null ? item.child.nick_name : ''}}</view>
<view class="big_name">{{item.child.child_name}}</view> <view class="big_name">{{item.child.child_name}}</view>
</view> </view>
</view> </view>
......
...@@ -10,8 +10,8 @@ Page({ ...@@ -10,8 +10,8 @@ Page({
*/ */
data: { data: {
coach_id: '5', coach_id: '5',
class_id: '16', class_id: '',
lesson_id: '69', lesson_id: '',
classTime: '', // 上课时间 classTime: '', // 上课时间
showView: true, showView: true,
list: [], list: [],
...@@ -51,31 +51,32 @@ Page({ ...@@ -51,31 +51,32 @@ Page({
base.newRequest(params) base.newRequest(params)
}, },
showButton: function (e) { showButton: function (e) {
let index = e.currentTarget.dataset.index let child_id = e.currentTarget.dataset.id
let list = this.data.list
let params = { let params = {
url: '', url: 'coach/sign',
data: { data: {
coach_id: this.data.coach_id,
lesson_id: this.data.lesson_id,
child_id: child_id
}, },
callback:(data)=>{ callback:(data)=>{
base.toast('签到成功') base.toast('签到成功')
list[index].sign_status = 1
this.setData({ this.setData({
list: list list: []
}) })
this.getDetail()
}, },
} }
base.newRequest(params) base.newRequest(params)
}, },
gocourseInstant: function () { gocourseInstant: function () {
wx.navigateTo({ wx.navigateTo({
url: '../../index/courseInstant/courseInstant', url: '/pages/index/courseInstant/courseInstant',
}) })
}, },
goevaluation: function () { goevaluation: function () {
wx.navigateTo({ wx.navigateTo({
url: '../../index/evaluation/evaluation', url: '/pages/index/evaluation/evaluation',
}) })
}, },
onPullDownRefresh() { onPullDownRefresh() {
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<view wx:if='{{item.class_comment==""}}' catchtap="goSport">运动评价</view> <view wx:if='{{item.class_comment==""}}' catchtap="goSport">运动评价</view>
</view> </view>
<view wx:if="{{item.sign_status == 0}}"> <view wx:if="{{item.sign_status == 0}}">
<view class="sign1" bindtap="showButton" data-index="{{index}}">签到</view> <view class="sign1" bindtap="showButton" data-id='{{item.child.id}}'>签到</view>
</view> </view>
</view> </view>
</view> </view>
......
// pages/index/courseInstant/courseInstant.js const app = getApp()
Page({ import {
data: { Base
fileList: [], } from '../../../utils/base.js';
}, const base = new Base()
afterRead(event) { var qiniuUploader = require("../../../utils/qiniuUploader");
const { file } = event.detail;
wx.uploadFile({
url: 'https://example.weixin.qq.com/upload',
filePath: file.path,
name: 'file',
formData: { user: 'test' },
success(res) {
const { fileList = [] } = this.data;
fileList.push({ ...file, url: res.data });
this.setData({ fileList });
},
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/** Page({
* 生命周期函数--监听页面卸载 data: {
*/ videoBox: [],
onUnload: function () { videoShow: true,
imgBox: [],
}, imgShow: true,
fileList: [],
/** },
* 页面相关事件处理函数--监听用户下拉动作
*/ /**
onPullDownRefresh: function () { * 生命周期函数--监听页面加载
*/
}, onLoad: function (options) {
/** },
* 页面上拉触底事件的处理函数 // 上传视频
*/ chooseVideo: function () {
onReachBottom: function () { base.initQiniu();
var that = this
}, var videos = this.data.videoBox
wx.chooseVideo({
/** sourceType: ['album', 'camera'],
* 用户点击右上角分享 camera: 'back',
*/ compressed: false,
onShareAppMessage: function () { success(res) {
console.log(res)
} var tempFilePaths = [res.tempFilePath]
if (Math.round(res.size / 1024 / 1024) < 25) {
qiniuUploader.upload(0, tempFilePaths, (res) => {
console.log(res)
let option = {
type: 'video',
url: res[0].imageURL
}
videos.push(option)
that.setData({
videoBox: videos,
videoShow: false
});
console.log(that.data.videoBox)
})
} else {
base.toast('视频大小不能超过25兆,请重新选择')
}
},
fail() {
base.toast('上传视频失败,请重新上传')
}
})
},
// 删除视频
deleteVideo: function (e) {
var videos = this.data.videoBox
var index = e.currentTarget.dataset.index
videos.splice(index, 1)
this.setData({
videoShow: true,
videoBox: videos,
})
},
// 上传图片
chooseImg: function (e) {
base.initQiniu();
var that = this
var imgs = this.data.imgBox
wx.chooseImage({
count: 9 - that.data.imgBox.length, // 默认9
sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (res) {
var tempFilePaths = res.tempFilePaths
qiniuUploader.upload(0, tempFilePaths, (res) => {
for (var i = 0; i < res.length; i++) {
let option = {
type: 'img',
url: res[i].imageURL
}
imgs.push(option)
}
that.setData({
imgBox: imgs
});
console.log(that.data.imgBox)
})
},
fail() {
base.toast('上传失败,请重试')
}
})
},
// 删除图片
deleteImg: function (e) {
var imgs = this.data.imgBox
var index = e.currentTarget.dataset.index
imgs.splice(index, 1)
this.setData({
imgBox: imgs
})
},
// 预览图片
previewImg: function (e) {
var index = e.currentTarget.dataset.index
var imgs = this.data.imgBox
wx.previewImage({
current: imgs[index].url,
urls: this.data.imgBox
})
},
save() {
if (this.data.videoBox.length == 0) {
base.toast('请上传视频')
return
}
if (this.data.imgBox.length == 0) {
base.toast('请上传图片')
return
}
let arr = this.data.videoBox.concat(this.data.imgBox)
console.log(arr)
// let params = {
// url: 'coach/moment',
// data: {
// coach_id: '',
// lesson_id: this.data.lesson_id,
// class_moment: JSON.stringify(arr)
// },
// callback:(data)=>{
// base.toast('提交成功')
// }
// }
// base.newRequest(params)
}
}) })
\ No newline at end of file
{ {
"usingComponents": { "usingComponents": {},
"van-uploader": "../../../components/vant/uploader/index"
},
"navigationBarTitleText": "课程瞬间" "navigationBarTitleText": "课程瞬间"
} }
\ No newline at end of file
...@@ -3,15 +3,35 @@ ...@@ -3,15 +3,35 @@
<text class="title">拍摄运动工程</text> <text class="title">拍摄运动工程</text>
<text class="up">(可上传1个视频)</text> <text class="up">(可上传1个视频)</text>
</view> </view>
<van-uploader file-list="{{ fileList }}" bind:after-read="afterRead" /> <view class="imgBox flex-h">
<view class="img videoBox" wx:for="{{videoBox}}" wx:for-item="item" wx:key="idx">
<video src="{{item.url}}" data-index="{{index}}"></video>
<view class="delete-btn" data-index="{{index}}" catchtap="deleteVideo">
<text class='iconfont iconguanbi'></text>
</view>
</view>
<view class='addBox flex-h flex-vc flex-hc' bindtap="chooseVideo" wx:if="{{videoShow}}">
<text class='iconfont iconshipin'></text>
</view>
</view>
</view> </view>
<view class="video"> <view class="video">
<view class="head"> <view class="head">
<text class="title">记录精彩瞬间</text> <text class="title">记录精彩瞬间</text>
<text class="up">(最多可上传9张照片)</text> <text class="up">(最多可上传9张照片)</text>
</view> </view>
<van-uploader file-list="{{ fileList }}" bind:after-read="afterRead" /> <view class="imgBox flex-h flex-hw">
<view class="img" wx:for="{{imgBox}}" wx:for-item="item" wx:key="idx">
<image src="{{item.url}}" data-index="{{index}}" mode="aspectFill" bindtap="previewImg"></image>
<view class="delete-btn" data-index="{{index}}" catchtap="deleteImg">
<text class='iconfont iconguanbi'></text>
</view>
</view>
<view class='addBox flex-h flex-vc flex-hc' bindtap="chooseImg" wx:if="{{imgBox.length < 9}}">
<text class='iconfont iconxiangji'></text>
</view>
</view>
</view> </view>
<view class="button"> <view class="button">
<view class="submit">提交</view> <view class="submit" catchtap="save">提交</view>
</view> </view>
\ No newline at end of file
page{ page {
background: #F7F8FA; background: #F7F8FA;
} padding-bottom: 140rpx;
.video{ }
width: 750rpx;
height: 330rpx; .video {
background: #FFFFFF; width: 100%;
margin-bottom: 24rpx; padding: 30rpx 0 30rpx 30rpx;
padding:35rpx 30rpx; background: #FFFFFF;
margin-bottom: 24rpx; margin-bottom: 24rpx;
} }
.video .head{
margin-bottom: 30rpx; .video .head {
} margin-bottom: 30rpx;
.video .title{ }
color: #1A1A1A;
font-size: 26rpx; .video .title {
font-weight: bold; color: #1A1A1A;
} font-size: 26rpx;
.video .up{ font-weight: bold;
color: #B3B3B3; }
font-size: 24rpx;
} .video .up {
color: #B3B3B3;
.button{ font-size: 24rpx;
width: 750rpx; }
height: 118rpx; .img {
padding: 18rpx 68rpx 20rpx; width: 210rpx;
position: fixed; height: 210rpx;
bottom: 0; border: 1px solid #EBEBEB;
} border-radius: 5rpx;
.button .submit{ margin-right: 30rpx;
width: 620rpx; margin-bottom: 30rpx;
height: 80rpx; position: relative;
border:none; }
background: linear-gradient(-70deg, #FFC600 0%, #FFD400 100%); .img video {
border-radius: 40rpx; width: 210rpx;
color: #000000; height: 210rpx;
font-size: 30rpx; border-radius: 5rpx;
text-align: center; }
line-height: 80rpx; .img image {
width: 210rpx;
height: 210rpx;
border-radius: 5rpx;
}
.delete-btn {
position: absolute;
right: -25rpx;
top: -25rpx;
}
.delete-btn .iconguanbi {
font-size: 52rpx;
color: #B3B3B3;
}
.addBox {
width: 210rpx;
height: 210rpx;
border: 1px solid #EBEBEB;
border-radius: 5rpx;
}
.iconxiangji {
color: #DFE0E6;
font-size: 60rpx;
}
.iconshipin {
color: #DFE0E6;
font-size: 64rpx;
}
.button {
width: 750rpx;
height: 140rpx;
padding: 30rpx;
position: fixed;
bottom: 0;
}
.button .submit {
width: 690rpx;
height: 80rpx;
border: none;
background: linear-gradient(-70deg, #FFC600 0%, #FFD400 100%);
border-radius: 40rpx;
color: #000000;
font-size: 30rpx;
text-align: center;
line-height: 80rpx;
} }
\ No newline at end of file
const app = getApp()
import {
Base
} from '../../../utils/base.js';
const base = new Base()
Page({
data: {
user_id: '',
role_type: '2',
telPhone: ''
},
onLoad: function (options) {
},
apply() {
let params = {
url: 'apply',
type: 'POST',
data: {
wx_user_id: this.data.user_id,
role_type: this.data.role_type,
mobile: this.data.telPhone
},
callback:(data)=>{
console.log(data)
}
}
base.newRequest(params)
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<view>
<view class="save" catchtap="apply">申请成为教练</view>
</view>
\ No newline at end of file
.save {
position: absolute;
bottom: 33rpx;
left: 50rpx;
right: 50rpx;
width: 650rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
background: linear-gradient(-70deg, #FFC600 0%, #FFD400 100%);
border-radius: 40rpx;
font-size: 30rpx;
color: #000000;
}
\ No newline at end of file
Page({
/**
* 页面的初始数据
*/
data: {
type: '1',
curImage: 'https://wdty.xueyoubangedu.com/wandou/pic_02.png'
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
type: options.type
})
},
copy: function (e) {
wx.setClipboardData({
data: 'bu15333212792',
success: function (res) {
wx.showToast({
title: '复制成功',
icon: 'none',
duration: 3000
})
}
})
},
prevImage() {
wx.previewImage({
urls: [this.data.curImage]
})
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "申请成功"
}
\ No newline at end of file
<view class="box">
<view class="icon">
<image src="/images/pic_01.png"></image>
</view>
<view class="text">申请成功</view>
<view class="cont">
<view class="title" wx:if='{{type == 1}}'>添加审核人员,更快成为团长!</view>
<view class="title" wx:if='{{type == 2}}'>添加审核人员,更快成为教练!</view>
<view class="title" wx:if='{{type == 3}}'>添加审核人员,更快管理场馆!</view>
<view class="code" catchtap="prevImage">
<image src="{{curImage}}"></image>
</view>
<view class="save" catchtap="prevImage">长按保存相册</view>
<view class="wx">微信号: bu15333212792<text class="copy" bindtap="copy">复制</text></view>
</view>
</view>
.box {
padding-top: 50rpx;
}
.icon{
width: 201rpx;
height: 190rpx;
margin: 0 auto 30rpx;
}
.icon image{
width: 100%;
height: 100%;
}
.text{
text-align: center;
color: #1A1A1A;
font-size: 30rpx;
font-weight: bold ;
}
.cont{
width: 736rpx;
height: 487rpx;
margin: 94rpx auto;
background-image: url('https://wdty.xueyoubangedu.com/wandou/pic_03.png');
background-size: 100% 100%;
}
.cont .title{
color: #1A1A1A;
font-size: 28rpx;
text-align: center;
line-height: 80rpx;
}
.cont .code{
width: 211rpx;
height: 211rpx;
margin: 40rpx auto 18rpx;
}
.cont .code image{
width: 100%;
height: 100%;
}
.cont .save{
color: #808080;
font-size: 24rpx;
text-align: center;
}
.cont .wx{
color: #1A1A1A;
font-size: 24rpx;
text-align: center;
margin-top: 20rpx;
}
.cont .wx .copy{
color: #FF6E00;
font-size: 24rpx;
margin-left: 18rpx;
text-decoration: underline;
}
\ No newline at end of file
...@@ -9,6 +9,7 @@ Page({ ...@@ -9,6 +9,7 @@ Page({
data: { data: {
activeIndex: 1, activeIndex: 1,
coach_id: '5', coach_id: '5',
role_id: '2',
detail: '', detail: '',
type: '1', // 1:收益 2:提现 3:预存储 type: '1', // 1:收益 2:提现 3:预存储
...@@ -43,6 +44,7 @@ Page({ ...@@ -43,6 +44,7 @@ Page({
let params = { let params = {
url: 'commission/list', url: 'commission/list',
data: { data: {
role_id: this.data.role_id,
wx_user_id: this.data.coach_id, wx_user_id: this.data.coach_id,
type: type, type: type,
pageSize: '15', pageSize: '15',
......
...@@ -27,7 +27,9 @@ Page({ ...@@ -27,7 +27,9 @@ Page({
wx.showLoading({ wx.showLoading({
title: '加载中...', title: '加载中...',
}) })
console.log(app.globalData)
this.setData({ this.setData({
// coach_id: app.globalData.userInfo.id,
today: util.formatTime(new Date()), today: util.formatTime(new Date()),
curDate: util.formatTime(new Date()) curDate: util.formatTime(new Date())
}) })
...@@ -140,14 +142,8 @@ Page({ ...@@ -140,14 +142,8 @@ Page({
}, },
goDetail(e) { goDetail(e) {
let item = e.currentTarget.dataset.item let item = e.currentTarget.dataset.item
console.log(item)
let classTime = item.start_time + '' + item.end_time
// console.log(item)
// wx.navigateTo({
// url: '/pages/index/classDetail/classDetail',
// })
wx.navigateTo({ wx.navigateTo({
url: '/pages/index/classManagement/classManagement?classTime=' + classTime + '&class_id=' + item.class_id + '&lesson_id=' + item.id, url: '/pages/index/classDetail/classDetail?class_id=' + item.class_id + '&lesson_id=' + item.id,
}) })
}, },
}) })
\ No newline at end of file
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<view wx:if='{{list.length > 0}}'> <view wx:if='{{list.length > 0}}'>
<block wx:for="{{list}}" wx:key='index' > <block wx:for="{{list}}" wx:key='index' >
<view class="cont flex-v flex-hb" catchtap="goclassDetail"> <view class="cont flex-v flex-hb" catchtap="goclassDetail">
<view class="top"> <view class="top flex-h flex-vc flex-hb">
<view class="time_title">{{item.course.name}}</view> <view class="time_title">{{item.course.name}}</view>
<view wx:if='{{today != curDate}}'> <view wx:if='{{today != curDate}}'>
<view class="over" wx:if="{{item.class_status_display == '已结束'}}">{{item.class_status_display}}</view> <view class="over" wx:if="{{item.class_status_display == '已结束'}}">{{item.class_status_display}}</view>
......
...@@ -98,23 +98,19 @@ ...@@ -98,23 +98,19 @@
float: left; float: left;
color: #000000; color: #000000;
font-size: 30rpx; font-size: 30rpx;
margin-bottom: 32rpx;
font-weight: bold; font-weight: bold;
} }
.cont .top .state{ .cont .top .state{
float: right;
color: #FF6E00; color: #FF6E00;
font-size: 24rpx; font-size: 24rpx;
} }
/* 上课中样式 */ /* 上课中样式 */
.inclass{ .inclass{
float: right;
color: #B4BC4D; color: #B4BC4D;
font-size: 24rpx; font-size: 24rpx;
} }
/* 已结束样式 */ /* 已结束样式 */
.over{ .over{
float: right;
color: #B3B3B3; color: #B3B3B3;
font-size: 24rpx; font-size: 24rpx;
} }
......
...@@ -160,6 +160,18 @@ ...@@ -160,6 +160,18 @@
{ {
"name": "课程管理详情页面", "name": "课程管理详情页面",
"pathName": "pages/index/classManagement/classManagement", "pathName": "pages/index/classManagement/classManagement",
"query": "",
"scene": null
},
{
"name": "申请成为教练",
"pathName": "pages/sign/apply/apply",
"query": "",
"scene": null
},
{
"name": "课程瞬间上传",
"pathName": "pages/index/courseInstant/courseInstant",
"scene": null "scene": null
} }
] ]
......
...@@ -139,7 +139,7 @@ class Base { ...@@ -139,7 +139,7 @@ class Base {
initQiniu() { initQiniu() {
var options = { var options = {
uptokenURL: 'https://wandoutiyu.test.xueyoubangedu.com/api/get_upload_token', uptokenURL: 'https://wandoutiyu.test.xueyoubangedu.com/api/get_upload_token',
domain: 'https://wandoutiyu.test.xueyoubangedu.com/', domain: 'https://wdty.xueyoubangedu.com/',
uploadURL: 'https://up-z1.qiniup.com' uploadURL: 'https://up-z1.qiniup.com'
}; };
qiniuUploader.init(options); qiniuUploader.init(options);
......
// created by gpake // created by gpake
(function() { (function() {
const app = getApp()
var imgTempUrl = [] //上传图片后临时存放容器 var imgTempUrl = [] //上传图片后临时存放容器
var config = { var config = {
qiniuUploadURL: '', qiniuUploadURL: '',
...@@ -110,15 +111,25 @@ ...@@ -110,15 +111,25 @@
} }
function getQiniuToken(callback) { function getQiniuToken(callback) {
var that = this
wx.request({ wx.request({
url: config.qiniuUploadTokenURL, url: config.qiniuUploadTokenURL,
data: {
token: app.globalData.token
},
success: function(res) { success: function(res) {
var token = res.data.data.uptoken; console.log(res)
config.qiniuUploadToken = token; if (res.data.meta.code == 200) {
var token = res.data.data.uptoken;
if (callback) { config.qiniuUploadToken = token;
callback(); if (callback) {
} callback();
}
} else if (res.data.meta.code == 400) {
app.getSessionKey(function () {
that.getQiniuToken(callback)
})
}
}, },
fail: function(error) { fail: function(error) {
console.log(error); console.log(error);
......
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