1
12
config.js
@ -2,18 +2,16 @@
|
||||
module.exports = {
|
||||
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
|
||||
|
||||
baseUrl: 'https://www.nuoyunr.com/jx',
|
||||
//baseUrl: 'https://www.nuoyunr.com/jx',
|
||||
imagesUrl: 'https://www.nuoyunr.com/jx',
|
||||
//baseUrl: 'http://192.168.31.54:8016/jx',
|
||||
//baseUrl: 'http://192.168.31.54:8016/jx',
|
||||
//imagesUrl: 'http://192.168.31.54:8016/jx',
|
||||
//imagesUrl: 'http://192.168.31.54:8016/jx',
|
||||
baseUrl: 'http://192.168.31.54:8016/jx',
|
||||
// imagesUrl: 'http://192.168.31.54:8016/jx',
|
||||
// 应用信息
|
||||
appInfo: {
|
||||
// 应用名称
|
||||
name: "ruoyi-app",
|
||||
// 应用版本
|
||||
version: "1.1.0",
|
||||
version: "1.2.0",
|
||||
// 应用logo
|
||||
logo: "http://www.nuoyunr.com/lananRsc/logo.png'",
|
||||
// 官方网站
|
||||
@ -29,4 +27,4 @@ module.exports = {
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
11
package-lock.json
generated
@ -1,6 +1,11 @@
|
||||
{
|
||||
"name": "driver-shool-uni",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {}
|
||||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
"uqrcodejs": {
|
||||
"version": "4.0.7",
|
||||
"resolved": "https://registry.npmmirror.com/uqrcodejs/-/uqrcodejs-4.0.7.tgz",
|
||||
"integrity": "sha512-84+aZmD2godCVI+93lxE3YUAPNY8zAJvNA7xRS7R7U+q57KzMDepBSfNCwoRUhWOfR6eHFoAOcHRPwsP6ka1cA=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
5
package.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"uqrcodejs": "^4.0.7"
|
||||
}
|
||||
}
|
53
pages.json
@ -45,7 +45,7 @@
|
||||
"path": "pages/teacher/orderManage",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "账单管理"
|
||||
"navigationBarTitleText": "收益管理"
|
||||
|
||||
}
|
||||
},
|
||||
@ -57,6 +57,47 @@
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/Addrc",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "工作日志"
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/teacher/Addrc",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "工作日志"
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/jglist",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "公告通知"
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/teacher/jglist",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "公告通知"
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/teacher/jgDetail",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "监管详情"
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
@ -170,6 +211,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
, {
|
||||
"path": "pages/viewCode/viewCode",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
@ -178,4 +227,4 @@
|
||||
"backgroundColor": "#F8F8F8"
|
||||
},
|
||||
"uniIdRouter": {}
|
||||
}
|
||||
}
|
||||
|
152
pages/index/Addrc.vue
Normal file
@ -0,0 +1,152 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="container">
|
||||
<view class="input-box">
|
||||
<view style=" margin-right: 10px; ">标题:</view>
|
||||
<input type="text" placeholder="请输入" v-model="title" />
|
||||
</view>
|
||||
|
||||
|
||||
<u--textarea v-model="content" height="110px" placeholder="请输入具体内容" maxlength="-1"
|
||||
border="bottom"></u--textarea>
|
||||
<view class="input-box"><u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1"
|
||||
multiple :previewFullImage="true" :maxCount="3"></u-upload></view>
|
||||
|
||||
|
||||
<view class="anniu" @click="tomato()">提交</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import upload from '@/utils/upload.js'
|
||||
import request from '../../utils/request';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
content: '',
|
||||
fileList1: [],
|
||||
photo: '',
|
||||
type: 2
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
console.log("刷新");
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
onReachBottom() {
|
||||
// this.show = true
|
||||
setTimeout(() => {
|
||||
console.log("加载执行");
|
||||
}, 2000)
|
||||
},
|
||||
|
||||
methods: {
|
||||
async tomato() {
|
||||
let res = await request({
|
||||
url: '/drivingSchool/system/dial/',
|
||||
method: 'post',
|
||||
data: {
|
||||
title: this.title,
|
||||
content: this.content,
|
||||
photo: this.photo,
|
||||
type: this.type
|
||||
}
|
||||
})
|
||||
console.log(res);
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '提交成功'
|
||||
})
|
||||
uni.navigateBack()
|
||||
}
|
||||
},
|
||||
deletePic(event) {
|
||||
this[`fileList${event.name}`].splice(event.index, 1)
|
||||
|
||||
|
||||
},
|
||||
// 新增图片
|
||||
async afterRead(event) {
|
||||
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
||||
let lists = [].concat(event.file)
|
||||
let fileListLen = this[`fileList${event.name}`].length
|
||||
lists.map((item) => {
|
||||
this[`fileList${event.name}`].push({
|
||||
...item,
|
||||
|
||||
})
|
||||
})
|
||||
for (let i = 0; i < lists.length; i++) {
|
||||
const result = await this.uploadFilePromise(lists[i].url)
|
||||
let item = this[`fileList${event.name}`][fileListLen]
|
||||
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
|
||||
status: 'success',
|
||||
message: '',
|
||||
url: result
|
||||
}))
|
||||
fileListLen++
|
||||
}
|
||||
},
|
||||
uploadFilePromise(e) {
|
||||
console.log(e);
|
||||
upload({
|
||||
url: '/common/upload',
|
||||
filePath: e,
|
||||
}).then((res) => {
|
||||
this.photo = res.fileName
|
||||
console.log(this.photo);
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
goback() {
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.content {
|
||||
width: 100%;
|
||||
// background: linear-gradient(180deg, #4AA76F 0%, #4AA76F 20%, #f7f7f7 38%, #f7f7f7 100%);
|
||||
background: #f4f5f6;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
background: #f4f5f6;
|
||||
box-sizing: border-box;
|
||||
// padding-top: 88px;
|
||||
}
|
||||
|
||||
.input-box {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
|
||||
}
|
||||
|
||||
.anniu {
|
||||
width: 80%;
|
||||
height: 40px;
|
||||
margin: 15px auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
background: #4AA76F;
|
||||
}
|
||||
</style>
|
@ -17,13 +17,14 @@
|
||||
|
||||
</view>
|
||||
|
||||
<view class="box-ds" v-if="tabindex2==1" v-for="(item,index) in dataList" :key="index">
|
||||
<view class="box-ds" v-if="tabindex == 1" v-for="(item,index) in dataList" :key="index">
|
||||
<view class="d-s">
|
||||
<view class="left-box">
|
||||
<image :src="imageUrl+item.photo" mode=""></image>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="box-title">{{item.name}}</view>
|
||||
<view class="box-title" v-if="item.name == 1">成人班</view>
|
||||
<view class="box-title" v-if="item.name == 2">学生班</view>
|
||||
<view class="wrap-box" style=" margin-bottom: 5px;">
|
||||
<view class="icon-lv">{{item.automatic}}</view>
|
||||
<view class="icon-h">{{item.license}}</view>
|
||||
@ -37,14 +38,14 @@
|
||||
|
||||
|
||||
</view>
|
||||
<view class="box-ds" v-else v-for="(item,index) in studentList" :key="index">
|
||||
<view class="box-ds" v-if="tabindex == 0" v-for="(item,index) in studentList" :key="index">
|
||||
<view class="d-s">
|
||||
|
||||
<view class="">
|
||||
<view class="box-title">学员名称: {{" "+item.name}}</view>
|
||||
<view class="box-title">课程: {{item.coueseName}}</view>
|
||||
<view class="box-title">课程: {{item.coueseName ||'暂无' }}</view>
|
||||
<view class="box-title">电话:{{item.phone}}</view>
|
||||
<view class="price_">¥{{item.price}}</view>
|
||||
<view class="price_">¥{{item.price || 0}}</view>
|
||||
</view>
|
||||
<view @click="makePhone(item.phone)" class="top-right">
|
||||
<image src="../../static/teel.png" mode=""></image>
|
||||
@ -92,13 +93,12 @@
|
||||
onLoad(option) {
|
||||
this.id = option.id
|
||||
this.queryParams.jlId = option.id
|
||||
},
|
||||
onShow() {
|
||||
this.getDataInfo()
|
||||
this.getUserInfo()
|
||||
this.getStudent()
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
makePhone(phoneNum) {
|
||||
uni.makePhoneCall({
|
||||
@ -128,19 +128,22 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
getDataInfo() {
|
||||
request({
|
||||
async getDataInfo() {
|
||||
let res = await request({
|
||||
url: '/drivingSchool/system/driveSchoolCourse/list',
|
||||
method: 'get',
|
||||
params: this.queryParams
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.dataList = res.rows
|
||||
}
|
||||
})
|
||||
|
||||
if (res.code == 200) {
|
||||
this.dataList = res.rows
|
||||
console.log('123456789', this.dataList, res.rows);
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
switchType(idx) {
|
||||
this.tabindex2 = idx
|
||||
this.tabindex = idx
|
||||
},
|
||||
goAdd() {
|
||||
uni.navigateTo({
|
||||
|
@ -5,11 +5,11 @@
|
||||
<view class="f-box" v-for="(item,index) in courseList" :key="index">
|
||||
<view class="f-top">{{item.createTime}}</view>
|
||||
<view class="f_title">
|
||||
{{item.driveSchoolPay.driveSchoolCourse.automatic}}
|
||||
<!-- {{item.driveSchoolPay.driveSchoolCourse.automatic}} -->
|
||||
</view>
|
||||
<view class="wrap-box">
|
||||
<view class="icon-lv">{{item.driveSchoolPay.driveSchoolCourse.license}}</view>
|
||||
<view class="icon-huang">{{item.driveSchoolPay.driveSchoolCourse.name}}</view>
|
||||
<!-- <view class="icon-lv">{{item.driveSchoolPay.driveSchoolCourse.license}}</view>
|
||||
<view class="icon-huang">{{item.driveSchoolPay.driveSchoolCourse.name}}</view> -->
|
||||
</view>
|
||||
<view class="f-ds">
|
||||
<view class="hui-">预约人:</view>
|
||||
@ -54,6 +54,7 @@
|
||||
method: 'get'
|
||||
})
|
||||
this.courseList = res.data
|
||||
console.log(this.courseList);
|
||||
},
|
||||
goDetails() {
|
||||
uni.navigateTo({
|
||||
|
@ -63,7 +63,7 @@
|
||||
<view class="left-box">
|
||||
<image :src="imagesUrl + cadetOne.photo" mode=""></image>
|
||||
</view>
|
||||
<view class="">
|
||||
<!-- <view class="">
|
||||
<view class="box-title">{{cadetOne.driveSchoolCourse.automatic}}</view>
|
||||
<view class="wrap-box" style=" margin-bottom: 5px;">
|
||||
<view class="icon-lv">{{cadetOne.driveSchoolCourse.license}}</view>
|
||||
@ -73,7 +73,7 @@
|
||||
<view class="price_">¥{{cadetOne.driveSchoolCourse.price}}</view>
|
||||
<view class="sc">{{cadetOne.driveSchoolCourse.price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>-->
|
||||
</view>
|
||||
</view>
|
||||
<view class="container">
|
||||
@ -143,7 +143,7 @@
|
||||
methods: {
|
||||
async findCadetOne() {
|
||||
let res = await request({
|
||||
url: `/system/pay/getInfoByUserId/${this.userId}`,
|
||||
url: `/system/pay/getInfoByUserIndenty/${this.userId}`,
|
||||
method: 'get'
|
||||
})
|
||||
this.cadetOne = res.data
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="top-">
|
||||
<u-search @change="changeInput" placeholder="日照香炉生紫烟" v-model="keyword"></u-search>
|
||||
<u-search @change="findCadetList()" placeholder="请输入搜索内容" v-model="keyword"></u-search>
|
||||
</view>
|
||||
|
||||
<view class="g_">
|
||||
@ -12,7 +12,7 @@
|
||||
<view class="box_" v-for="(item,index) in cadetList.rows" :key="index ">
|
||||
<view style="display: flex;align-items: center;
|
||||
justify-content: space-between;width: 100%;">
|
||||
<view class="d-s" @click="goDetails(item.userId)">
|
||||
<view class="d-s" @click="goDetails(item.identity)">
|
||||
<view class="touxiang">
|
||||
<image :src="imagesUrl + item.vactor" mode=""></image>
|
||||
</view>
|
||||
@ -91,9 +91,9 @@
|
||||
phoneNumber: tel //仅为示例
|
||||
});
|
||||
},
|
||||
goDetails(userId) {
|
||||
goDetails(identity) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/index/cadetDetails?userId=${userId}`
|
||||
url: `/pages/index/cadetDetails?userId=${identity}`
|
||||
})
|
||||
},
|
||||
goback() {
|
||||
@ -202,4 +202,4 @@
|
||||
font-size: 12px;
|
||||
color: #333333;
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -10,7 +10,8 @@
|
||||
<image :src="imageUrl+item.photo" mode=""></image>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="box-title">{{item.name}}</view>
|
||||
<view class="box-title" v-if="item.name == 1">成人班</view>
|
||||
<view class="box-title" v-if="item.name == 2">学生班</view>
|
||||
<view class="wrap-box" style=" margin-bottom: 5px;">
|
||||
<view class="icon-lv">{{item.automatic}}</view>
|
||||
<view class="icon-h">{{item.license}}</view>
|
||||
|
@ -3,24 +3,29 @@
|
||||
<view class="content">
|
||||
<!-- @click="show = true" -->
|
||||
<view class="top-box">
|
||||
<view class="touxiang">
|
||||
<view class="touxiang" @click="gosetup()">
|
||||
<image :src="imageUrl+schoolInfo.photo" mode=""></image>
|
||||
</view>
|
||||
<view class="">{{schoolInfo.schoolName}}</view>
|
||||
<u-icon name="arrow-right" color="#fff" size="18"></u-icon>
|
||||
<view style="margin-left: 30%;font-weight: bold" @click="viewCode">专属二维码</view>
|
||||
|
||||
</view>
|
||||
<view class="three-box">
|
||||
<view class="s-box">
|
||||
<!-- <view class="s-box">
|
||||
<view class="b-size">{{dataInfo.coachNumber}}</view>
|
||||
<view class="s-size">教练人数</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="s-box">
|
||||
<view class="b-size">{{dataInfo.stuNumber}}</view>
|
||||
<view class="s-size">学员人数</view>
|
||||
</view>
|
||||
<view class="s-box">
|
||||
<view class="b-size">{{dataInfo.reverseNumber}}</view>
|
||||
<view class="s-size">预约人数</view>
|
||||
<view class="s-size">预约科二人数</view>
|
||||
</view>
|
||||
<view class="s-box">
|
||||
<view class="b-size">{{dataInfo.reverseNumberThree}}</view>
|
||||
<view class="s-size">预约科三人数</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="jg-box">
|
||||
@ -61,12 +66,26 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="jg-box" style="display: flex;align-items: center; justify-content: space-between; "
|
||||
@click="goactive()">
|
||||
<view class="title-t">工作日志</view>
|
||||
<view class="">
|
||||
去填写
|
||||
</view>
|
||||
</view>
|
||||
<view class="jg-box" style="display: flex;align-items: center; justify-content: space-between; "
|
||||
@click="gollsit()">
|
||||
<view class="title-t">公告通知</view>
|
||||
<view class="">
|
||||
去查看
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-bo-lv" @click="golist()">
|
||||
<view class="">预约记录</view>
|
||||
<!-- <view class="d-s">
|
||||
<view class="d-s">
|
||||
<view class="">更多</view>
|
||||
<u-icon name="arrow-right" color="#999999" size="12"></u-icon>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="con">
|
||||
<u-empty mode="list" v-if="courseList.length == 0">
|
||||
@ -74,11 +93,11 @@
|
||||
<view class="f-box" v-for="(item,index) in courseList" :key="index">
|
||||
<view class="f-top">{{item.createTime}}</view>
|
||||
<view class="f_title">
|
||||
{{item.driveSchoolPay.driveSchoolCourse.automatic}}
|
||||
<!-- {{item.driveSchoolPay.driveSchoolCourse.automatic}}-->
|
||||
</view>
|
||||
<view class="wrap-box">
|
||||
<view class="icon-lv">{{item.driveSchoolPay.driveSchoolCourse.license}}</view>
|
||||
<view class="icon-huang">{{item.driveSchoolPay.driveSchoolCourse.name}}</view>
|
||||
<!-- <view class="icon-lv">{{item.driveSchoolPay.driveSchoolCourse.license}}</view>
|
||||
<view class="icon-huang">{{item.driveSchoolPay.driveSchoolCourse.name}}</view>-->
|
||||
</view>
|
||||
<view class="f-ds">
|
||||
<view class="hui-">预约人:</view>
|
||||
@ -88,6 +107,8 @@
|
||||
<view class="hui-">所属教练:</view>
|
||||
<view class="hei-">{{item.coachName}}</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -157,6 +178,24 @@
|
||||
this.findCourseList()
|
||||
},
|
||||
methods: {
|
||||
gollsit() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/jglist'
|
||||
})
|
||||
},
|
||||
goactive() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/Addrc'
|
||||
})
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/teacher/ActiveList'
|
||||
// })
|
||||
},
|
||||
viewCode() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/viewCode/viewCode?type=1&id=' + this.schoolInfo.id
|
||||
})
|
||||
},
|
||||
async findCourseList() {
|
||||
let res = await request({
|
||||
url: `/drivingSchool/system/reservationCourse/applet/getReservationCourseList`,
|
||||
@ -217,6 +256,11 @@
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/courseManage'
|
||||
})
|
||||
},
|
||||
gosetup() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/teacher/setUp'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
@ -236,6 +280,15 @@
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.jg-box {
|
||||
width: 95%;
|
||||
background: #fff;
|
||||
margin: 10px auto;
|
||||
border-radius: 10px;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.p-ds {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -466,4 +519,4 @@
|
||||
box-sizing: border-box;
|
||||
padding: 15px 0px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
83
pages/index/jglist.vue
Normal file
@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="container">
|
||||
<view class="box_" v-for="(item,index) in lists" :key="index" @click="jgDetail(item.id)">
|
||||
<view class="">{{item.title}}</view>
|
||||
<view class="">{{item.createTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from '../../utils/request'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lists: []
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getlsit()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
console.log("刷新");
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
onReachBottom() {
|
||||
// this.show = true
|
||||
setTimeout(() => {
|
||||
console.log("加载执行");
|
||||
}, 2000)
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
async getlsit() {
|
||||
let res = await request({
|
||||
url: '/system/drive/notice/applist?noticeType=3',
|
||||
method: 'get'
|
||||
})
|
||||
console.log(res);
|
||||
this.lists = res.data
|
||||
},
|
||||
jgDetail(id) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/teacher/jgDetail?id=' + id
|
||||
})
|
||||
},
|
||||
goback() {
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.content {
|
||||
width: 100%;
|
||||
background: #f4f5f6;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
background: #f4f5f6;
|
||||
box-sizing: border-box;
|
||||
padding-top: 5px;
|
||||
|
||||
}
|
||||
|
||||
.box_ {
|
||||
width: 95%;
|
||||
margin: 15px auto;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
@ -38,7 +38,8 @@
|
||||
|
||||
<!-- <view class="box-title">AI智能</view> -->
|
||||
<view class="b-d-s">
|
||||
<view class="box-title" @click="goDetails(item.id)">{{item.driveSchoolCourse.automatic}}
|
||||
<view class="box-title" v-if="item.driveSchoolCourse" @click="goDetails(item.id)">
|
||||
{{item.driveSchoolCourse.automatic || '' }}
|
||||
</view>
|
||||
<view class="qhaaniu" @click="changeStateClick(item.id, item.state)">切换状态</view>
|
||||
|
||||
@ -72,7 +73,7 @@
|
||||
|
||||
<view class="right-icon">
|
||||
<view class="">实付:</view>
|
||||
<view style="font-size: 20px;color: #FB423B;">¥{{item.driveSchoolCourse.reserveMoney}}</view>
|
||||
<!-- <view style="font-size: 20px;color: #FB423B;">¥{{item.driveSchoolCourse.reserveMoney}}</view>-->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -90,9 +91,7 @@
|
||||
|
||||
<script>
|
||||
import request from "@/utils/request.js"
|
||||
import {
|
||||
imagesUrl
|
||||
} from "@/config.js"
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -111,6 +110,7 @@
|
||||
}
|
||||
],
|
||||
userId: null,
|
||||
imagesUrl: this.$baseUrl,
|
||||
listData: ["全部订单", "已报名", "已付款", "已面签"],
|
||||
listDataIndex: 0,
|
||||
orderList: [],
|
||||
@ -140,19 +140,21 @@
|
||||
async findOrderListByState(index) {
|
||||
this.tabindex = index
|
||||
let state = null
|
||||
let isSign = null
|
||||
if (index == 1) {
|
||||
state = 0
|
||||
state = 3
|
||||
} else if (index == 2) {
|
||||
state = 1
|
||||
state = 3
|
||||
} else if (index == 3) {
|
||||
state = 2
|
||||
state = 3
|
||||
isSign = 1
|
||||
}
|
||||
|
||||
let res = await request({
|
||||
url: `/system/pay/list`,
|
||||
method: 'get',
|
||||
params: {
|
||||
isSign: 0,
|
||||
isSign: isSign,
|
||||
state: state
|
||||
}
|
||||
})
|
||||
@ -442,4 +444,4 @@
|
||||
font-size: 12px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -48,8 +48,8 @@
|
||||
show: false,
|
||||
status: 'loading',
|
||||
appuser: {
|
||||
username: 18715736888,
|
||||
password: 123456
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
tabindex: 0,
|
||||
tablist: [
|
||||
@ -73,10 +73,16 @@
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("App-Token")) {
|
||||
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
let loginType = uni.getStorageSync("loginType")
|
||||
if (loginType == 0) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/teacher/index"
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@ -129,6 +135,13 @@
|
||||
})
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.tabindex == 0) {
|
||||
this.appuser.types = 2
|
||||
}
|
||||
if (this.tabindex == 1) {
|
||||
this.appuser.types = 3
|
||||
}
|
||||
this.appuser.type = 0
|
||||
request({
|
||||
url: '/loginApp',
|
||||
@ -137,7 +150,9 @@
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.setStorageSync("App-Token", res.token)
|
||||
uni.setStorageSync("loginType", this.tabindex)
|
||||
if (this.tabindex == 0) {
|
||||
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
@ -285,4 +300,4 @@
|
||||
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
152
pages/teacher/Addrc.vue
Normal file
@ -0,0 +1,152 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="container">
|
||||
<view class="input-box">
|
||||
<view style=" margin-right: 10px; ">标题:</view>
|
||||
<input type="text" placeholder="请输入" v-model="title" />
|
||||
</view>
|
||||
|
||||
|
||||
<u--textarea v-model="content" height="110px" placeholder="请输入具体内容" maxlength="-1"
|
||||
border="bottom"></u--textarea>
|
||||
<view class="input-box"><u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1"
|
||||
multiple :previewFullImage="true" :maxCount="3"></u-upload></view>
|
||||
|
||||
|
||||
<view class="anniu" @click="tomato()">提交</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import upload from '@/utils/upload.js'
|
||||
import request from '../../utils/request';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
content: '',
|
||||
fileList1: [],
|
||||
photo: '',
|
||||
type: 1
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
console.log("刷新");
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
onReachBottom() {
|
||||
// this.show = true
|
||||
setTimeout(() => {
|
||||
console.log("加载执行");
|
||||
}, 2000)
|
||||
},
|
||||
|
||||
methods: {
|
||||
async tomato() {
|
||||
let res = await request({
|
||||
url: '/drivingSchool/system/dial/',
|
||||
method: 'post',
|
||||
data: {
|
||||
title: this.title,
|
||||
content: this.content,
|
||||
photo: this.photo,
|
||||
type: this.type
|
||||
}
|
||||
})
|
||||
console.log(res);
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '提交成功'
|
||||
})
|
||||
uni.navigateBack()
|
||||
}
|
||||
},
|
||||
deletePic(event) {
|
||||
this[`fileList${event.name}`].splice(event.index, 1)
|
||||
|
||||
|
||||
},
|
||||
// 新增图片
|
||||
async afterRead(event) {
|
||||
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
||||
let lists = [].concat(event.file)
|
||||
let fileListLen = this[`fileList${event.name}`].length
|
||||
lists.map((item) => {
|
||||
this[`fileList${event.name}`].push({
|
||||
...item,
|
||||
|
||||
})
|
||||
})
|
||||
for (let i = 0; i < lists.length; i++) {
|
||||
const result = await this.uploadFilePromise(lists[i].url)
|
||||
let item = this[`fileList${event.name}`][fileListLen]
|
||||
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
|
||||
status: 'success',
|
||||
message: '',
|
||||
url: result
|
||||
}))
|
||||
fileListLen++
|
||||
}
|
||||
},
|
||||
uploadFilePromise(e) {
|
||||
console.log(e);
|
||||
upload({
|
||||
url: '/common/upload',
|
||||
filePath: e,
|
||||
}).then((res) => {
|
||||
this.photo = res.fileName
|
||||
console.log(this.photo);
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
goback() {
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.content {
|
||||
width: 100%;
|
||||
// background: linear-gradient(180deg, #4AA76F 0%, #4AA76F 20%, #f7f7f7 38%, #f7f7f7 100%);
|
||||
background: #f4f5f6;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
background: #f4f5f6;
|
||||
box-sizing: border-box;
|
||||
// padding-top: 88px;
|
||||
}
|
||||
|
||||
.input-box {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
|
||||
}
|
||||
|
||||
.anniu {
|
||||
width: 80%;
|
||||
height: 40px;
|
||||
margin: 15px auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
background: #4AA76F;
|
||||
}
|
||||
</style>
|
@ -6,9 +6,18 @@
|
||||
<u-empty mode="list" v-if="courseList.length == 0">
|
||||
</u-empty>
|
||||
<view class="f-box" v-for="(item,index) in courseList " :key="index" @click="goDetails()">
|
||||
<view class="f-top">{{item.orderTime || ''}}</view>
|
||||
<view class="f_title">
|
||||
{{item.courseName || ''}}
|
||||
|
||||
<view class="f-top">
|
||||
<view class="">{{item.orderTime || ''}}</view>
|
||||
<view class="" v-if="item.auditStatus == 0">待审核</view>
|
||||
<view class="" v-if="item.auditStatus == 1">已通过</view>
|
||||
<view class="" v-if="item.auditStatus == 2">已拒绝</view>
|
||||
</view>
|
||||
<view class="f_title" v-if="item.courseName == 1">
|
||||
成人班
|
||||
</view>
|
||||
<view class="f_title" v-if="item.courseName == 2">
|
||||
学生班
|
||||
</view>
|
||||
<!-- <view class="wrap-box">
|
||||
<view class="icon-lv">自动挡</view>
|
||||
@ -22,8 +31,25 @@
|
||||
<view class="hui-">所属教练:</view>
|
||||
<view class="hei-">{{item.coachName || 0}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="f-ds">
|
||||
<view class="hui-">手机号:</view>
|
||||
<view class="hei-">{{item.phone || 0 }}</view>
|
||||
</view>
|
||||
<view style="display: flex; justify-content: flex-end;" v-if="item.auditStatus == 0">
|
||||
<u-button style="width: 120px;" type="success" text="同意"
|
||||
@click="reservationCourse(item.id)"></u-button>
|
||||
<u-button style="width: 120px;" type="error" text="拒绝" @click="refuseReason(item.id)"></u-button>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<u-modal :show="show" :title="title" :showCancelButton="true" @confirm="confirm()" @cancel="show = false">
|
||||
<view class="slot-content">
|
||||
<view class="">
|
||||
<u--textarea v-model="size" placeholder="请输入拒绝理由"></u--textarea>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</u-modal>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -33,11 +59,21 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
courseList: []
|
||||
show: false,
|
||||
title: '拒绝理由',
|
||||
id: null,
|
||||
courseList: [],
|
||||
size: ''
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.findCourseList()
|
||||
onLoad(options) {
|
||||
if (options.id == 1) {
|
||||
this.findCourseList()
|
||||
}
|
||||
if (options.id == 2) {
|
||||
this.findCourseLists()
|
||||
}
|
||||
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
console.log("刷新");
|
||||
@ -53,16 +89,55 @@
|
||||
methods: {
|
||||
async findCourseList() {
|
||||
let res = await request({
|
||||
url: `/drivingSchool/system/reservationCourse/applet/getReservationCourseListByUserId`,
|
||||
url: `/drivingSchool/system/reservationCourse/applet/getAppReservationCourseListByUserId`,
|
||||
|
||||
method: 'get'
|
||||
})
|
||||
this.courseList = res.data
|
||||
},
|
||||
goDetails() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/Details'
|
||||
async findCourseLists() {
|
||||
let res = await request({
|
||||
url: `/drivingSchool/system/reservationCourse/applet/getAppReservationCourseListByUserIds`,
|
||||
|
||||
method: 'get'
|
||||
})
|
||||
this.courseList = res.data
|
||||
},
|
||||
|
||||
async reservationCourse(id) {
|
||||
let res = await request({
|
||||
url: '/drivingSchool/system/reservationCourse',
|
||||
method: 'put',
|
||||
data: {
|
||||
id: id,
|
||||
auditStatus: 1,
|
||||
|
||||
}
|
||||
})
|
||||
this.findCourseList()
|
||||
},
|
||||
async refuseReason(id) {
|
||||
this.id = id
|
||||
this.show = true
|
||||
|
||||
},
|
||||
async confirm() {
|
||||
let res = await request({
|
||||
url: '/drivingSchool/system/reservationCourse',
|
||||
method: 'put',
|
||||
data: {
|
||||
id: this.id,
|
||||
auditStatus: 2,
|
||||
refuseReason: this.size
|
||||
}
|
||||
})
|
||||
this.show = false
|
||||
this.findCourseList()
|
||||
},
|
||||
goDetails() {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/index/Details'
|
||||
// })
|
||||
},
|
||||
|
||||
}
|
||||
@ -102,6 +177,9 @@
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
color: #FF9A1A;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.f_title {
|
||||
@ -162,4 +240,8 @@
|
||||
font-size: 12px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.slot-content {
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
@ -4,8 +4,11 @@
|
||||
<u-search @change="changeInput" placeholder="搜索" v-model="keyword"></u-search>
|
||||
</view>
|
||||
|
||||
<view class="g_">
|
||||
共{{cadetList.total}}人
|
||||
<view class="tab-box">
|
||||
<view :class="{ 'acv':tabindex == item.id }" v-for="(item,index) in tablist" :key="index"
|
||||
@click="getindex(item.id)">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="box_" v-for="(item,index) in cadetList.rows" :key="index " @click="goDetails(item.userId)">
|
||||
@ -50,7 +53,18 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tabindex: 2,
|
||||
tablist: [{
|
||||
name: "可练科二",
|
||||
id: 2
|
||||
},
|
||||
{
|
||||
name: "可练科三",
|
||||
id: 3
|
||||
},
|
||||
],
|
||||
keyword: '',
|
||||
|
||||
cadetList: []
|
||||
}
|
||||
},
|
||||
@ -69,6 +83,24 @@
|
||||
},
|
||||
|
||||
methods: {
|
||||
async getindex(id) {
|
||||
this.tabindex = id
|
||||
if (id == 2) {
|
||||
let res = await request({
|
||||
url: '/system/pay/stuListByCoachId?type=2',
|
||||
method: 'get',
|
||||
})
|
||||
this.cadetList = res
|
||||
}
|
||||
if (id == 3) {
|
||||
let res = await request({
|
||||
url: '/system/pay/stuListByCoachId?type=3',
|
||||
method: 'get',
|
||||
})
|
||||
this.cadetList = res
|
||||
}
|
||||
|
||||
},
|
||||
async changeInput() {
|
||||
if (this.keyword) {
|
||||
let res = await request({
|
||||
@ -198,4 +230,21 @@
|
||||
font-size: 12px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.tab-box {
|
||||
width: 95%;
|
||||
margin: 15px auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.tabbox {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.acv {
|
||||
color: #41a863 !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
@ -3,25 +3,38 @@
|
||||
<view class="content">
|
||||
<!-- @click="show = true" -->
|
||||
<view class="top-box">
|
||||
<view class="touxiang">
|
||||
<!-- <image :src="imageUrl+schoolInfo.photo" mode=""></image> -->
|
||||
<image src="../../static/imgs/mm.jpg" mode=""></image>
|
||||
<view style="display: flex; align-items: center;" @click="gosetUp()">
|
||||
<view class="touxiang">
|
||||
<!-- <image :src="imageUrl+schoolInfo.photo" mode=""></image> -->
|
||||
<image :src="imageUrl+dataInfo.avatar" mode=""></image>
|
||||
</view>
|
||||
<view class="">{{userInfo.nickName}}</view>
|
||||
</view>
|
||||
<view class="">安教练</view>
|
||||
|
||||
<view @click="viewCode">点击二维码</view>
|
||||
|
||||
</view>
|
||||
<view class="three-box">
|
||||
<view class="three-box" v-if="sjshow ">
|
||||
<view class="s-box">
|
||||
<view class="b-size">{{dataInfo.idRecordNumber}}</view>
|
||||
<view class="b-size">{{dataInfo.idRecordNumber || 0}}</view>
|
||||
<view class="s-size">预约人数</view>
|
||||
</view>
|
||||
<view class="s-box">
|
||||
<view class="b-size">{{dataInfo.stuNumber}}</view>
|
||||
<view class="b-size">{{dataInfo.stuNumber || 0}}</view>
|
||||
<view class="s-size">学员人数</view>
|
||||
</view>
|
||||
<view class="s-box">
|
||||
<view class="b-size">{{dataInfo.isPayNumber}}</view>
|
||||
<view class="b-size">{{dataInfo.isPayNumber || 0}}</view>
|
||||
<view class="s-size">账单数</view>
|
||||
</view>
|
||||
<view class="s-box">
|
||||
<view class="b-size">{{deduct || 0}}</view>
|
||||
<view class="s-size">已结算</view>
|
||||
</view>
|
||||
<view class="s-box">
|
||||
<view class="b-size">{{deducts|| 0}}</view>
|
||||
<view class="s-size">未结算</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="jg-box">
|
||||
<view class="title-t">订单数据</view>
|
||||
@ -41,9 +54,9 @@
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="jg-box">
|
||||
<view class="title-t">业务板块</view>
|
||||
<view class="title-t">功能板块</view>
|
||||
<view class="three-box" style="padding: 10px 0px;">
|
||||
<view class="si-box" @click="golist()">
|
||||
<view class="si-box" @click="golist(1)">
|
||||
<image src="../../static/imgs/jg1.png" mode=""></image>
|
||||
<view class="">预约记录</view>
|
||||
</view>
|
||||
@ -53,22 +66,33 @@
|
||||
</view>
|
||||
<view class="si-box" @click="goOrder()">
|
||||
<image src="../../static/imgs/jg3.png" mode=""></image>
|
||||
<view class="">账单管理</view>
|
||||
<view class="">收益管理</view>
|
||||
</view>
|
||||
<view class="si-box" @click="gosetUp()">
|
||||
<!-- <view class="si-box" @click="">
|
||||
<image src="../../static/imgs/jg4.png" mode=""></image>
|
||||
<view class="">个人信息</view>
|
||||
</view> -->
|
||||
<view class="si-box" @click="getshow()">
|
||||
<image src="../../static/imgs/jg4.png" mode=""></image>
|
||||
<view class="">数据统计</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="jg-box" style="display: flex;align-items: center; justify-content: space-between; "
|
||||
@click="goactive()">
|
||||
<view class="title-t">最近活跃</view>
|
||||
<view class="title-t">工作日志</view>
|
||||
<view class="">
|
||||
<uni-icons type="fire-filled" color="red" size="24px"></uni-icons>
|
||||
去填写
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-bo-lv" @click="golist()">
|
||||
<view class="jg-box" style="display: flex;align-items: center; justify-content: space-between; "
|
||||
@click="gollsit()">
|
||||
<view class="title-t">公告通知</view>
|
||||
<view class="">
|
||||
去查看
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-bo-lv" @click="golist(2)">
|
||||
<view class="">预约记录</view>
|
||||
<view class="d-s">
|
||||
<view class="">更多</view>
|
||||
@ -95,6 +119,10 @@
|
||||
<view class="hui-">所属教练:</view>
|
||||
<view class="hei-">{{item.coachName}}</view>
|
||||
</view>
|
||||
<view class="f-ds">
|
||||
<view class="hui-">手机号:</view>
|
||||
<view class="hei-">{{item.phone}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -134,6 +162,7 @@
|
||||
|
||||
<script>
|
||||
import request from '../../utils/request'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -144,7 +173,11 @@
|
||||
show: false,
|
||||
schoolInfo: {},
|
||||
dataInfo: {},
|
||||
courseList: []
|
||||
courseList: [],
|
||||
userInfo: {},
|
||||
deduct: null,
|
||||
deducts: null,
|
||||
sjshow: false
|
||||
}
|
||||
},
|
||||
|
||||
@ -162,11 +195,29 @@
|
||||
this.getUserInfo()
|
||||
this.getDataInfo()
|
||||
this.findCourseList()
|
||||
this.getBalanceByCoachId()
|
||||
},
|
||||
methods: {
|
||||
getshow() {
|
||||
this.sjshow = !this.sjshow
|
||||
},
|
||||
async getBalanceByCoachId() {
|
||||
let res = await request({
|
||||
url: '/drivingSchool/system/pass/getBalanceByCoachId',
|
||||
method: 'get'
|
||||
})
|
||||
this.deduct = res.data.deduct
|
||||
this.deducts = res.data.deducts
|
||||
},
|
||||
viewCode() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/viewCode/viewCode?type=2&id=' + this.schoolInfo.id + '&jlId=' + this.schoolInfo
|
||||
.jlId
|
||||
})
|
||||
},
|
||||
async findCourseList() {
|
||||
let res = await request({
|
||||
url: `/drivingSchool/system/reservationCourse/applet/getReservationCourseListByUserId`,
|
||||
url: `/drivingSchool/system/reservationCourse/applet/getAppReservationCourseListByUserId`,
|
||||
|
||||
method: 'get'
|
||||
})
|
||||
@ -179,6 +230,7 @@
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.schoolInfo = res.schoolInfo
|
||||
this.userInfo = res.user
|
||||
uni.setStorageSync("roles", res.roles)
|
||||
uni.setStorageSync("deptId", res.schoolInfo.deptId)
|
||||
}
|
||||
@ -190,7 +242,7 @@
|
||||
method: 'get'
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.dataInfo = res.data
|
||||
this.dataInfo = res.user
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -201,20 +253,29 @@
|
||||
this.show = false
|
||||
// console.log('close');
|
||||
},
|
||||
golist() {
|
||||
golist(num) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/teacher/ManageList'
|
||||
url: '/pages/teacher/ManageList?id=' + num
|
||||
})
|
||||
},
|
||||
goactive() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/teacher/ActiveList'
|
||||
url: '/pages/teacher/Addrc'
|
||||
})
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/teacher/ActiveList'
|
||||
// })
|
||||
},
|
||||
gollsit() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/teacher/jglist'
|
||||
})
|
||||
},
|
||||
goOrder() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/teacher/orderManage'
|
||||
})
|
||||
|
||||
},
|
||||
gocadetManage() {
|
||||
console.log('1');
|
||||
@ -278,11 +339,12 @@
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.s-box {
|
||||
width: 33.3%;
|
||||
width: 20%;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
@ -485,4 +547,4 @@
|
||||
box-sizing: border-box;
|
||||
padding: 15px 0px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
77
pages/teacher/jgDetail.vue
Normal file
@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="container" v-html="lists.content">
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from '../../utils/request'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lists: ''
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.getlsit(options.id)
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
console.log("刷新");
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
onReachBottom() {
|
||||
// this.show = true
|
||||
setTimeout(() => {
|
||||
console.log("加载执行");
|
||||
}, 2000)
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
async getlsit(id) {
|
||||
|
||||
let res = await request({
|
||||
url: '/system/drive/notice/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
console.log(res);
|
||||
this.lists = res.data
|
||||
},
|
||||
goback() {
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.content {
|
||||
width: 100%;
|
||||
background: #f4f5f6;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
background: #f4f5f6;
|
||||
box-sizing: border-box;
|
||||
padding-top: 5px;
|
||||
|
||||
}
|
||||
|
||||
.box_ {
|
||||
width: 95%;
|
||||
margin: 15px auto;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
83
pages/teacher/jglist.vue
Normal file
@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="container">
|
||||
<view class="box_" v-for="(item,index) in lists" :key="index" @click="jgDetail(item.id)">
|
||||
<view class="">{{item.title}}</view>
|
||||
<view class="">{{item.createTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from '../../utils/request'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lists: []
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getlsit()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
console.log("刷新");
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
onReachBottom() {
|
||||
// this.show = true
|
||||
setTimeout(() => {
|
||||
console.log("加载执行");
|
||||
}, 2000)
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
async getlsit() {
|
||||
let res = await request({
|
||||
url: '/system/drive/notice/applist?noticeType=2',
|
||||
method: 'get'
|
||||
})
|
||||
console.log(res);
|
||||
this.lists = res.data
|
||||
},
|
||||
jgDetail(id) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/teacher/jgDetail?id=' + id
|
||||
})
|
||||
},
|
||||
goback() {
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.content {
|
||||
width: 100%;
|
||||
background: #f4f5f6;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
background: #f4f5f6;
|
||||
box-sizing: border-box;
|
||||
padding-top: 5px;
|
||||
|
||||
}
|
||||
|
||||
.box_ {
|
||||
width: 95%;
|
||||
margin: 15px auto;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
@ -25,7 +25,8 @@
|
||||
</view>
|
||||
<view class="">
|
||||
<!-- <view class="box-title">AI智能</view> -->
|
||||
<view class="box-title">{{item.courseName}}</view>
|
||||
<view class="box-title" v-if="item.courseName == 1">成人班</view>
|
||||
<view class="box-title" v-if="item.courseName == 2">学生班</view>
|
||||
|
||||
<view class="wrap-box">
|
||||
<view class="price_">¥{{item.coursePrice}}</view>
|
||||
|
157
pages/teacher/rwm.vue
Normal file
@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="container">
|
||||
|
||||
|
||||
<canvas id="qrcode" canvas-id="qrcode" style="width: 200px;height: 200px;margin: 40px auto;"></canvas>
|
||||
<view class="b-size">
|
||||
扫描上方二维码 立即报名
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import headers from '../../components/header/headers.vue'
|
||||
import tabbar from '../../components/tabbar/tabbar.vue'
|
||||
import request from '@/utils/request.js'
|
||||
import UQRCode from '../../uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js';
|
||||
import {
|
||||
getToken
|
||||
} from '@/utils/auth'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
fileList1: [],
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
console.log("刷新");
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
onReachBottom() {
|
||||
// this.show = true
|
||||
setTimeout(() => {
|
||||
console.log("加载执行");
|
||||
}, 2000)
|
||||
},
|
||||
|
||||
methods: {
|
||||
onReady() {
|
||||
// 获取uQRCode实例
|
||||
var qr = new UQRCode();
|
||||
// 设置二维码内容
|
||||
qr.data = "https://www.nuoyunr.com/jxjlCode?id=12&jlId=10";
|
||||
// 设置二维码大小,必须与canvas设置的宽高一致
|
||||
qr.size = 200;
|
||||
// 调用制作二维码方法
|
||||
qr.make();
|
||||
// 获取canvas上下文
|
||||
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
|
||||
// 设置uQRCode实例的canvas上下文
|
||||
qr.canvasContext = canvasContext;
|
||||
// 调用绘制方法将二维码图案绘制到canvas上
|
||||
qr.drawCanvas();
|
||||
},
|
||||
// 删除图片
|
||||
deletePic(event) {
|
||||
this[`fileList${event.name}`].splice(event.index, 1)
|
||||
},
|
||||
// 新增图片
|
||||
async afterRead(event) {
|
||||
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
||||
let lists = [].concat(event.file)
|
||||
let fileListLen = this[`fileList${event.name}`].length
|
||||
lists.map((item) => {
|
||||
this[`fileList${event.name}`].push({
|
||||
...item,
|
||||
status: 'uploading',
|
||||
message: '上传中'
|
||||
})
|
||||
})
|
||||
for (let i = 0; i < lists.length; i++) {
|
||||
const result = await this.uploadFilePromise(lists[i].url)
|
||||
let item = this[`fileList${event.name}`][fileListLen]
|
||||
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
|
||||
status: 'success',
|
||||
message: '',
|
||||
url: result
|
||||
}))
|
||||
fileListLen++
|
||||
}
|
||||
},
|
||||
async afterRead(event) {
|
||||
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
||||
let lists = [].concat(event.file)
|
||||
let fileListLen = this[`fileList${event.name}`].length
|
||||
lists.map((item) => {
|
||||
this[`fileList${event.name}`].push({
|
||||
...item,
|
||||
status: 'uploading',
|
||||
message: '上传中'
|
||||
})
|
||||
})
|
||||
const result = await this.uploadFilePromise(lists[0].url)
|
||||
let data = {
|
||||
url: result
|
||||
}
|
||||
this.fileList1 = []
|
||||
this.fileList1.push(data)
|
||||
console.log(this.fileList1, 'this.fileList1');
|
||||
},
|
||||
async uploadFilePromise(e) {
|
||||
console.log(e);
|
||||
let res = await upload({
|
||||
url: '/common/upload',
|
||||
filePath: e,
|
||||
})
|
||||
console.log(res.fileName);
|
||||
|
||||
},
|
||||
|
||||
goback() {
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.content {
|
||||
width: 100%;
|
||||
background: linear-gradient(180deg, #4AA76F 0%, #4AA76F 20%, #f7f7f7 38%, #f7f7f7 100%);
|
||||
background: #4AA76F;
|
||||
height: 100vh;
|
||||
box-sizing: border-box;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.container {}
|
||||
|
||||
.up-box {
|
||||
width: 95%;
|
||||
border-bottom: 1px solid #ebebeb;
|
||||
margin: 10px auto;
|
||||
padding: 10px 0px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.right-text {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.b-size {
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="container">
|
||||
<view class="up-box">
|
||||
<!-- <view class="up-box">
|
||||
<view class="">修改头像</view>
|
||||
<view class="">
|
||||
<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple
|
||||
@ -13,6 +13,9 @@
|
||||
<view class="right-text">
|
||||
<input type="text" placeholder="修改昵称">
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="anniu" @click="tttt()">
|
||||
退出登录
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -47,6 +50,15 @@
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
|
||||
tttt() {
|
||||
|
||||
uni.clearStorageSync();
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/loginSms'
|
||||
})
|
||||
},
|
||||
// 删除图片
|
||||
deletePic(event) {
|
||||
this[`fileList${event.name}`].splice(event.index, 1)
|
||||
@ -137,4 +149,17 @@
|
||||
.right-text {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.anniu {
|
||||
width: 90%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
background: #eb0e12;
|
||||
border-radius: 6px;
|
||||
margin: 40px auto;
|
||||
height: 38px;
|
||||
|
||||
}
|
||||
</style>
|
32
pages/viewCode/viewCode.vue
Normal file
@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<view>
|
||||
<view style="margin-left: 12%;margin-top: 20%;">
|
||||
<span style="font-size: 30px;font-weight: bold;margin-left: 20%;">专属二维码</span>
|
||||
|
||||
<uqrcode :size="300" ref="uqrcode" canvas-id="qrcode" :value="info" :options="{ margin: 10 }"></uqrcode>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
info: "https://www.nuoyunr.com/jxjlCode"
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
console.log(option);
|
||||
this.info = this.info + "?type=" + option.type + "&id=" + option.id + "&jlId=" + option.jlId
|
||||
console.log(this.info);
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 21 KiB |
BIN
static/imgs/rwm.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
201
uni_modules/Sansnn-uQRCode/LICENSE.md
Normal file
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
392
uni_modules/Sansnn-uQRCode/README.md
Normal file
@ -0,0 +1,392 @@
|
||||
# 介绍
|
||||
|
||||
`uQRCode`是一款基于`Javascript`环境开发的二维码生成插件,适用所有`Javascript`运行环境的前端应用和`Node.js`应用。
|
||||
|
||||
`uQRCode`可扩展性高,它支持自定义渲染二维码,可通过`uQRCode API`得到二维码绘制关键信息后,使用`canvas`、`svg`或`js`操作`dom`的方式绘制二维码图案。还可自定义二维码样式,如随机颜色、圆点、方块、块与块之间的间距等。
|
||||
|
||||
欢迎加入群聊【uQRCode交流群】:[695070434](https://jq.qq.com/?_wv=1027&k=JRjzDqiw)。
|
||||
|
||||
# 设计器
|
||||
|
||||
uQRCode发布了配套的可视化设计器,可根据自己喜好在设计器中设计二维码样式,一键生成配置代码复制到项目中,详情请在微信小程序搜索“柚子二维码”,或扫描下方小程序码体验。
|
||||
|
||||
![uQRCode设计器](https://uqrcode.cn/mp_weixin_code.jpg)
|
||||
|
||||
## 设计器模板示例
|
||||
|
||||
![uQRCode设计器](https://uqrcode.cn/yz_1.png)
|
||||
![uQRCode设计器](https://uqrcode.cn/yz_2.png)
|
||||
![uQRCode设计器](https://uqrcode.cn/yz_3.png)
|
||||
![uQRCode设计器](https://uqrcode.cn/yz_4.png)
|
||||
![uQRCode设计器](https://uqrcode.cn/yz_5.png)
|
||||
![uQRCode设计器](https://uqrcode.cn/yz_6.png)
|
||||
![uQRCode设计器](https://uqrcode.cn/yz_7.png)
|
||||
![uQRCode设计器](https://uqrcode.cn/yz_8.png)
|
||||
![uQRCode设计器](https://uqrcode.cn/yz_9.png)
|
||||
|
||||
# 快速上手
|
||||
|
||||
> 在`uni-app`中,我们更推荐使用组件方式来生成二维码,组件方式大大提高了页面的可读性以及避开了一些平台容易出问题的地方,当组件无法满足需求的时候,再考虑切换成原生方式。
|
||||
|
||||
官方文档:[https://uqrcode.cn/doc](https://uqrcode.cn/doc)。
|
||||
|
||||
github地址:[https://github.com/Sansnn/uQRCode](https://github.com/Sansnn/uQRCode)。
|
||||
|
||||
npm地址:[https://www.npmjs.com/package/uqrcodejs](https://www.npmjs.com/package/uqrcodejs)。
|
||||
|
||||
uni-app插件市场地址:[https://ext.dcloud.net.cn/plugin?id=1287](https://ext.dcloud.net.cn/plugin?id=1287)。
|
||||
|
||||
## 原生方式
|
||||
|
||||
原生方式仅需要获取`uqrcode.js`文件便可使用。详细配置请移步到:文档 > [原生](https://uqrcode.cn/doc/document/native.html)。
|
||||
|
||||
### 安装
|
||||
|
||||
1. 通过`npm`安装,成功后即可使用`import`或`require`进行引用。
|
||||
``` bash
|
||||
# npm安装
|
||||
npm install uqrcodejs
|
||||
# 或者
|
||||
npm install @uqrcode/js
|
||||
```
|
||||
|
||||
2. 通过项目开源地址获取`uqrcode.js`,下载`uqrcode.js`后,将其复制到您项目指定目录,在页面中引入`uqrcode.js`文件即可开始使用。
|
||||
|
||||
### 引入
|
||||
|
||||
- 通过`import`引入。
|
||||
``` javascript
|
||||
// npm安装
|
||||
import UQRCode from 'uqrcodejs'; // npm install uqrcodejs
|
||||
// 或者
|
||||
import UQRCode from '@uqrcode/js'; // npm install @uqrcode/js
|
||||
```
|
||||
|
||||
- `Node.js`通过`require`引入。
|
||||
``` javascript
|
||||
// npm安装
|
||||
const UQRCode = require('uqrcodejs'); // npm install uqrcodejs
|
||||
// 或者
|
||||
const UQRCode = require('@uqrcode/js'); // npm install @uqrcode/js
|
||||
```
|
||||
|
||||
- 原生浏览器环境,在js脚本加载时添加到`window`。
|
||||
``` html
|
||||
<script type="text/javascript" src="uqrcode.js"></script>
|
||||
<script>
|
||||
var UQRCode = window.UQRCode;
|
||||
</script>
|
||||
```
|
||||
|
||||
### 简单用法
|
||||
|
||||
`uQRCode`基于`Canvas API`封装了一套方法,建议开发者使用`canvas`生成,一键调用,非常方便。以下是示例:
|
||||
|
||||
- HTML示例
|
||||
- DOM部分
|
||||
``` html
|
||||
<canvas id="qrcode" width="200" height="200"></canvas>
|
||||
```
|
||||
|
||||
- JS部分
|
||||
``` javascript
|
||||
// 获取uQRCode实例
|
||||
var qr = new UQRCode();
|
||||
// 设置二维码内容
|
||||
qr.data = "https://uqrcode.cn/doc";
|
||||
// 设置二维码大小,必须与canvas设置的宽高一致
|
||||
qr.size = 200;
|
||||
// 调用制作二维码方法
|
||||
qr.make();
|
||||
// 获取canvas元素
|
||||
var canvas = document.getElementById("qrcode");
|
||||
// 获取canvas上下文
|
||||
var canvasContext = canvas.getContext("2d");
|
||||
// 设置uQRCode实例的canvas上下文
|
||||
qr.canvasContext = canvasContext;
|
||||
// 调用绘制方法将二维码图案绘制到canvas上
|
||||
qr.drawCanvas();
|
||||
```
|
||||
|
||||
- uni-app示例
|
||||
- Template部分
|
||||
``` html
|
||||
<canvas id="qrcode" canvas-id="qrcode" style="width: 200px;height: 200px;"></canvas>
|
||||
```
|
||||
|
||||
- JS部分
|
||||
``` javascript
|
||||
onReady() {
|
||||
// 获取uQRCode实例
|
||||
var qr = new UQRCode();
|
||||
// 设置二维码内容
|
||||
qr.data = "https://uqrcode.cn/doc";
|
||||
// 设置二维码大小,必须与canvas设置的宽高一致
|
||||
qr.size = 200;
|
||||
// 调用制作二维码方法
|
||||
qr.make();
|
||||
// 获取canvas上下文
|
||||
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
|
||||
// 设置uQRCode实例的canvas上下文
|
||||
qr.canvasContext = canvasContext;
|
||||
// 调用绘制方法将二维码图案绘制到canvas上
|
||||
qr.drawCanvas();
|
||||
}
|
||||
```
|
||||
|
||||
- 微信小程序,推荐使用Canvas 2D,关于Canvas 2D的使用请参考微信开放文档。
|
||||
|
||||
### 高级用法
|
||||
|
||||
考虑到部分平台可能不支持`canvas`,所以`uQRCode`并没有强制要求和`canvas`一起使用,您还可以选择其他方式来生成二维码,例如使用`js`操作`dom`进行绘制或是使用`svg`绘制等。以下是示例:
|
||||
|
||||
- uni-app v-for+view
|
||||
|
||||
```html
|
||||
<template>
|
||||
<view>
|
||||
<view class="qrcode">
|
||||
<view v-for="(row, rowI) in modules" :key="rowI" style="display: flex;flex-direction: row;">
|
||||
<view v-for="(col, colI) in row" :key="colI">
|
||||
<view v-if="col.isBlack" style="width: 10px;height: 10px;background-color: black;">
|
||||
<!-- 黑色码点 -->
|
||||
</view>
|
||||
<view v-else style="width: 10px;height: 10px;background-color: white;">
|
||||
<!-- 白色码点 -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import UQRCode from '../../uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
modules: []
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
const qr = new UQRCode();
|
||||
qr.data = 'uQRCode';
|
||||
qr.make();
|
||||
this.modules = qr.modules;
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
```
|
||||
|
||||
- js操作dom
|
||||
|
||||
``` html
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>uQRCode二维码生成</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="qrcode" style="position: relative;"></div>
|
||||
<script type="text/javascript" src="uqrcode.js"></script>
|
||||
<script>
|
||||
// 引入uQRCode
|
||||
var UQRCode = window.UQRCode;
|
||||
// 获取uQRCode实例
|
||||
var qr = new UQRCode();
|
||||
// 设置二维码内容
|
||||
qr.data = "https://uqrcode.cn/doc";
|
||||
// 设置二维码大小,必须与canvas设置的宽高一致
|
||||
qr.size = 200;
|
||||
// 设置二维码前景图,可以是路径
|
||||
qr.foregroundImageSrc =
|
||||
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAC3xJREFUeJztnd1vFNcZxodSJ3y3EL7SYIQwu15wI5FSAkqVkISKgEkuSIEC6127RrloL9r8D4n5UFUZp/9C24A/okqUOzCmSdoohQtkXIkiRS1VC7YQF41Kbe/unL7PzHt2z45ndnZmd1l75hzrSSwzMzvn+c15z8ee3dcwdIlkWaRlqSnF62a+4dDiiMtZ36cKyc183NQ3WS2sZ2IqWX/phw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wDFfOsAVyiG9e6bs7OX33RZ2+2y5K+u5LnL6706hT+m61L1ET3Lca7gnukdRdJ7ivnOC+1QiZ4F6FIkOXhAK6aHKIg+joMWLAkPg1vgHMQrE0gCfjbdY7EZWsXyfX+QB78Kphr1W9xB5tZc/WKjDgqW/f4SxqBy+hoKkh/qGj38QvhriIySOeBADCOs3LfFN7I649XNfdXHd40MGebGWP4NVq9k6F4Ruq3IraUtDEEPfQGYE0wGAsjckjmuMWvgm0ngQrGXHJerZx3bewF8+zN2vYK3j2rBEwTLmVRUY5FNlaAAbzFFDHjB5PAMbV6/hG8FRsjIk2cJ3XsQer2ZOV7NESo9QqVBihgMiidvQSTItRgoOmiKdgBWsla1XEJesp672MvZAQWowSCBmiagKhlkUOqXAkIAkpjpL1l344IdQVhrM4X0SFpGpxxOWsr5cvTSleNxM36RK18n+GJEwNAYal3QAAAABJRU5ErkJggg==';
|
||||
// 调用制作二维码方法
|
||||
qr.make();
|
||||
|
||||
var drawModules = qr.getDrawModules();
|
||||
// 遍历drawModules创建dom元素
|
||||
var qrHtml = '';
|
||||
for (var i = 0; i < drawModules.length; i++) {
|
||||
var drawModule = drawModules[i];
|
||||
switch (drawModule.type) {
|
||||
case 'tile':
|
||||
/* 绘制小块 */
|
||||
qrHtml += `<div style="position: absolute;left: ${drawModule.x}px;top: ${drawModule.y}px;width: ${drawModule.width}px;height: ${drawModule.height}px;background: ${drawModule.color};"></div>`;
|
||||
break;
|
||||
case 'image':
|
||||
/* 绘制图像 */
|
||||
qrHtml += `<img style="position: absolute;left: ${drawModule.x}px;top: ${drawModule.y}px;width: ${drawModule.width}px;height: ${drawModule.height}px;" src="${drawModule.imageSrc}" />`;
|
||||
break;
|
||||
}
|
||||
}
|
||||
document.getElementById('qrcode').innerHTML = qrHtml;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
- svg
|
||||
``` html
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>uQRCode二维码生成</title>
|
||||
</head>
|
||||
<body>
|
||||
<svg id="qrcode" width="200" height="200" xmlns="http://www.w3.org/2000/svg" version="1.1"></svg>
|
||||
<script type="text/javascript" src="uqrcode.js"></script>
|
||||
<script>
|
||||
// 引入uQRCode
|
||||
var UQRCode = window.UQRCode;
|
||||
// 获取uQRCode实例
|
||||
var qr = new UQRCode();
|
||||
// 设置二维码内容
|
||||
qr.data = "https://uqrcode.cn/doc";
|
||||
// 设置二维码大小,必须与canvas设置的宽高一致
|
||||
qr.size = 200;
|
||||
// 设置二维码前景图,可以是路径
|
||||
qr.foregroundImageSrc =
|
||||
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAC3xJREFUeJztnd1vFNcZxodSJ3y3EL7SYIQwu15wI5FSAkqVkISKgEkuSIEC6127RrloL9r8D4n5UFUZp/9C24A/okqUOzCmSdoohQtkXIkiRS1VC7YQF41Kbe/unL7PzHt2z45ndnZmd1l75hzrSSwzMzvn+c15z8ee3dcwdIlkWaRlqSnF62a+4dDiiMtZ36cKyc183NQ3WS2sZ2IqWX/phwTWEDhuEKT5S0hLSctJK1grWasiLllPWe9l7MUSowTJDU7oopKVICSEZXwz3yKtJj1HWkdaT9pA2hgTbeA6r2MPVrMnEpCEI8HU1FpUGC18cbQEPB1r+Ea+Q2olbSFtJbWREqxkxCXr2cZ1hwebSM+zN2vYq+XsXYtRQ2uRJ8hWgaa4kl8ET0Ur30SK9F3STtL3SLtJL5P2kPZGXHu4rru57vCgg9TO3mxir1azd0uNUmuRUALBWKzAAOm1pBcM+4nYwTeBG3uNtJ/0FukQqZP0NuudiErWr5PrfID0JulVwwb1Enu0lT1byx6qUKpqJWoH3qLAQIzcbNhNFU/CKwzhMOld0o9JaVKW1EP6CamXdDqi6uU69nCdUffjpCPsyZvs0U72bDN7KKHI8OULRcIAQcQ9NDXQ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pjpL1l344IdQVhrM4X0SFpGpxxOWsr5cvTSleNxM36RK18n+GJEwNAYal3QAAAABJRU5ErkJggg==';
|
||||
// 调用制作二维码方法
|
||||
qr.make();
|
||||
|
||||
var drawModules = qr.getDrawModules();
|
||||
// 遍历drawModules创建svg元素
|
||||
var qrHtml = '';
|
||||
for (var i = 0; i < drawModules.length; i++) {
|
||||
var drawModule = drawModules[i];
|
||||
switch (drawModule.type) {
|
||||
case 'tile':
|
||||
/* 绘制小块 */
|
||||
qrHtml += `<rect x="${drawModule.x}" y="${drawModule.y}" width="${drawModule.width}" height="${drawModule.height}" style="fill: ${drawModule.color};" />`;
|
||||
break;
|
||||
case 'image':
|
||||
/* 绘制图像 */
|
||||
qrHtml += `<image href="${drawModule.imageSrc}" x="${drawModule.x}" y="${drawModule.y}" width="${drawModule.width}" height="${drawModule.height}" />`;
|
||||
break;
|
||||
}
|
||||
}
|
||||
document.getElementById('qrcode').innerHTML = qrHtml;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
> 更多用法大家自行探索咯,期待分享哟~
|
||||
|
||||
### 导出临时文件路径
|
||||
|
||||
原生方式基于`Canvas`的,请自行参阅各平台`Canvas`的导出方式。以下是部分示例:
|
||||
|
||||
- uni-app
|
||||
```javascript
|
||||
// 通过uni.createCanvasContext方式创建绘制上下文的,对应导出API为uni.canvasToTempFilePath
|
||||
// 调用完ctx.draw()方法后不能第一时间导出,否则会异常,需要有一定的延时
|
||||
setTimeout(() => {
|
||||
uni.canvasToTempFilePath(
|
||||
{
|
||||
canvasId: this.canvasId,
|
||||
fileType: this.fileType,
|
||||
width: this.canvasWidth,
|
||||
height: this.canvasHeight,
|
||||
success: res => {
|
||||
console.log(res);
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
// this // 组件内使用必传当前实例
|
||||
);
|
||||
}, 300);
|
||||
```
|
||||
|
||||
- Canvas2D
|
||||
```javascript
|
||||
// 得到base64
|
||||
console.log(canvas.toDataURL());
|
||||
// 得到buffer
|
||||
console.log(canvas.toBuffer());
|
||||
```
|
||||
|
||||
### 保存二维码到本地相册
|
||||
|
||||
必须在导出临时文件路径成功后再执行保存。uni-app通用保存方式(H5除外):
|
||||
```javascript
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: tempFilePath,
|
||||
success: res => {
|
||||
console.log(res);
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
H5可以通过设置`<a>`标签`href`属性的方式进行保存:
|
||||
```javascript
|
||||
const aEle = document.createElement('a');
|
||||
aEle.download = 'uQRCode'; // 设置下载的文件名,默认是'下载'
|
||||
aEle.href = tempFilePath;
|
||||
document.body.appendChild(aEle);
|
||||
aEle.click();
|
||||
aEle.remove(); // 下载之后把创建的元素删除
|
||||
```
|
||||
经过测试,PC端浏览器可以下载,部分安卓自带或第三方浏览器可以下载,安卓微信浏览器不适用,移动端iOS所有浏览器均不适用,差异较大,还是推荐各位导出文件给图片组件显示,然后提示用户通过长按图片进行保存这种方式。
|
||||
|
||||
## uni-app组件方式
|
||||
|
||||
### 安装
|
||||
|
||||
通过uni-app插件市场地址安装:[https://ext.dcloud.net.cn/plugin?id=1287](https://ext.dcloud.net.cn/plugin?id=1287)。详细配置请移步到:文档 > [uni-app组件](https://uqrcode.cn/doc/document/uni-app.html)。
|
||||
|
||||
### 引入
|
||||
|
||||
uni-app默认为easycom模式,可直接键入`<uqrcode>`标签。
|
||||
|
||||
### 简单用法
|
||||
|
||||
安装`uqrcode`组件后,在`template`中键入`<uqrcode/>`。设置`ref`属性可使用组件内部方法,`canvas-id`属性为组件内部的canvas组件标识,`value`属性为二维码生成对应内容,`options`为配置选项,可配置二维码样式,绘制Logo等,详见:[options](https://uqrcode.cn/doc/document/uni-app.html#options) 。
|
||||
|
||||
``` html
|
||||
<uqrcode ref="uqrcode" canvas-id="qrcode" value="https://uqrcode.cn/doc" :options="{ margin: 10 }"></uqrcode>
|
||||
```
|
||||
|
||||
### 导出临时文件路径
|
||||
|
||||
为了保证方法调用成功,请在 [complete](https://uqrcode.cn/doc/document/uni-app.html#complete) 事件返回`success=true`后调用。
|
||||
|
||||
```javascript
|
||||
// uqrcode为组件的ref名称
|
||||
this.$refs.uqrcode.toTempFilePath({
|
||||
success: res => {
|
||||
console.log(res);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### 保存二维码到本地相册
|
||||
|
||||
为了保证方法调用成功,请在 [complete](https://uqrcode.cn/doc/document/uni-app.html#complete) 事件返回`success=true`后调用。
|
||||
|
||||
```javascript
|
||||
// uqrcode为组件的ref名称
|
||||
this.$refs.uqrcode.save({
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: '保存成功'
|
||||
});
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
## 更多使用说明请前往官方文档查看:[https://uqrcode.cn/doc](https://uqrcode.cn/doc)。
|
12
uni_modules/Sansnn-uQRCode/changelog.md
Normal file
@ -0,0 +1,12 @@
|
||||
## 4.0.6(2022-12-12)
|
||||
修复`getDrawModules`,第一次获取结果正常,后续获取`tile`模块不存在的问题;
|
||||
修复安卓type:normal因Canvas API使用了小数或为0的参数导致生成异常的问题(注:安卓非2d Canvas部分API参数不支持携带小数,部分API参数必须大于0)。
|
||||
## 4.0.1(2022-11-28)
|
||||
优化组件loading属性的表现;
|
||||
新增组件type选项normal,以便于在某些条件编译初始为type=2d时还可以选择使用非2d组件类型;
|
||||
修复组件条件编译在其他编辑器语法提示报错;
|
||||
修复原生对es5的支持。
|
||||
## 4.0.0(2022-11-21)
|
||||
v4版本源代码全面开放,开源地址:[https://github.com/Sansnn/uQRCode](https://github.com/Sansnn/uQRCode);
|
||||
|
||||
升级说明:v4为大版本更新,虽然已尽可能兼容上一代版本,但不可避免的还是存在一些细节差异,若更新后出现问题,请参考对照[v3 文档](https://uqrcode.cn/doc/v3),[v4 文档](https://uqrcode.cn/doc)进行修改。
|
1
uni_modules/Sansnn-uQRCode/common/cache.js
Normal file
@ -0,0 +1 @@
|
||||
export const cacheImageList = [];
|
41
uni_modules/Sansnn-uQRCode/common/queue.js
Normal file
@ -0,0 +1,41 @@
|
||||
function Queue() {
|
||||
let waitingQueue = this.waitingQueue = [];
|
||||
let isRunning = this.isRunning = false; // 记录是否有未完成的任务
|
||||
|
||||
function execute(task, resolve, reject) {
|
||||
task()
|
||||
.then((data) => {
|
||||
resolve(data);
|
||||
})
|
||||
.catch((e) => {
|
||||
reject(e);
|
||||
})
|
||||
.finally(() => {
|
||||
// 等待任务队列中如果有任务,则触发它;否则设置isRunning = false,表示无任务状态
|
||||
if (waitingQueue.length) {
|
||||
const next = waitingQueue.shift();
|
||||
execute(next.task, next.resolve, next.reject);
|
||||
} else {
|
||||
isRunning = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
this.exec = function(task) {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (isRunning) {
|
||||
waitingQueue.push({
|
||||
task,
|
||||
resolve,
|
||||
reject
|
||||
});
|
||||
} else {
|
||||
isRunning = true;
|
||||
execute(task, resolve, reject);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/* 队列实例,某些平台一起使用多个组件时需要通过队列逐一绘制,否则部分绘制方法异常,nvue端的iOS gcanvas尤其明显,在不通过队列绘制时会出现图片丢失的情况 */
|
||||
export const queueDraw = new Queue();
|
||||
export const queueLoadImage = new Queue();
|
3
uni_modules/Sansnn-uQRCode/common/types/cache.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
declare module '*/common/cache' {
|
||||
export const cacheImageList: Array;
|
||||
}
|
4
uni_modules/Sansnn-uQRCode/common/types/queue.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
declare module '*/common/queue' {
|
||||
export const queueDraw: any;
|
||||
export const queueLoadImage: any;
|
||||
}
|
1131
uni_modules/Sansnn-uQRCode/components/u-qrcode/u-qrcode.vue
Normal file
1131
uni_modules/Sansnn-uQRCode/components/uqrcode/uqrcode.vue
Normal file
241
uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/bridge/bridge-weex.js
Normal file
@ -0,0 +1,241 @@
|
||||
const isWeex = typeof WXEnvironment !== 'undefined';
|
||||
const isWeexIOS = isWeex && /ios/i.test(WXEnvironment.platform);
|
||||
const isWeexAndroid = isWeex && !isWeexIOS;
|
||||
|
||||
import GLmethod from '../context-webgl/GLmethod';
|
||||
|
||||
const GCanvasModule =
|
||||
(typeof weex !== 'undefined' && weex.requireModule) ? (weex.requireModule('gcanvas')) :
|
||||
(typeof __weex_require__ !== 'undefined') ? (__weex_require__('@weex-module/gcanvas')) : {};
|
||||
|
||||
let isDebugging = false;
|
||||
|
||||
let isComboDisabled = false;
|
||||
|
||||
const logCommand = (function () {
|
||||
const methodQuery = [];
|
||||
Object.keys(GLmethod).forEach(key => {
|
||||
methodQuery[GLmethod[key]] = key;
|
||||
})
|
||||
const queryMethod = (id) => {
|
||||
return methodQuery[parseInt(id)] || 'NotFoundMethod';
|
||||
}
|
||||
const logCommand = (id, cmds) => {
|
||||
const mId = cmds.split(',')[0];
|
||||
const mName = queryMethod(mId);
|
||||
console.log(`=== callNative - componentId:${id}; method: ${mName}; cmds: ${cmds}`);
|
||||
}
|
||||
return logCommand;
|
||||
})();
|
||||
|
||||
function joinArray(arr, sep) {
|
||||
let res = '';
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if (i !== 0) {
|
||||
res += sep;
|
||||
}
|
||||
res += arr[i];
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
const commandsCache = {}
|
||||
|
||||
const GBridge = {
|
||||
|
||||
callEnable: (ref, configArray) => {
|
||||
|
||||
commandsCache[ref] = [];
|
||||
|
||||
return GCanvasModule.enable({
|
||||
componentId: ref,
|
||||
config: configArray
|
||||
});
|
||||
},
|
||||
|
||||
callEnableDebug: () => {
|
||||
isDebugging = true;
|
||||
},
|
||||
|
||||
callEnableDisableCombo: () => {
|
||||
isComboDisabled = true;
|
||||
},
|
||||
|
||||
callSetContextType: function (componentId, context_type) {
|
||||
GCanvasModule.setContextType(context_type, componentId);
|
||||
},
|
||||
|
||||
callReset: function(id){
|
||||
GCanvasModule.resetComponent && canvasModule.resetComponent(componentId);
|
||||
},
|
||||
|
||||
render: isWeexIOS ? function (componentId) {
|
||||
return GCanvasModule.extendCallNative({
|
||||
contextId: componentId,
|
||||
type: 0x60000001
|
||||
});
|
||||
} : function (componentId) {
|
||||
return callGCanvasLinkNative(componentId, 0x60000001, 'render');
|
||||
},
|
||||
|
||||
render2d: isWeexIOS ? function (componentId, commands, callback) {
|
||||
|
||||
if (isDebugging) {
|
||||
console.log('>>> >>> render2d ===');
|
||||
console.log('>>> commands: ' + commands);
|
||||
}
|
||||
|
||||
GCanvasModule.render([commands, callback?true:false], componentId, callback);
|
||||
|
||||
} : function (componentId, commands,callback) {
|
||||
|
||||
if (isDebugging) {
|
||||
console.log('>>> >>> render2d ===');
|
||||
console.log('>>> commands: ' + commands);
|
||||
}
|
||||
|
||||
callGCanvasLinkNative(componentId, 0x20000001, commands);
|
||||
if(callback){
|
||||
callback();
|
||||
}
|
||||
},
|
||||
|
||||
callExtendCallNative: isWeexIOS ? function (componentId, cmdArgs) {
|
||||
|
||||
throw 'should not be here anymore ' + cmdArgs;
|
||||
|
||||
} : function (componentId, cmdArgs) {
|
||||
|
||||
throw 'should not be here anymore ' + cmdArgs;
|
||||
|
||||
},
|
||||
|
||||
|
||||
flushNative: isWeexIOS ? function (componentId) {
|
||||
|
||||
const cmdArgs = joinArray(commandsCache[componentId], ';');
|
||||
commandsCache[componentId] = [];
|
||||
|
||||
if (isDebugging) {
|
||||
console.log('>>> >>> flush native ===');
|
||||
console.log('>>> commands: ' + cmdArgs);
|
||||
}
|
||||
|
||||
const result = GCanvasModule.extendCallNative({
|
||||
"contextId": componentId,
|
||||
"type": 0x60000000,
|
||||
"args": cmdArgs
|
||||
});
|
||||
|
||||
const res = result && result.result;
|
||||
|
||||
if (isDebugging) {
|
||||
console.log('>>> result: ' + res);
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
} : function (componentId) {
|
||||
|
||||
const cmdArgs = joinArray(commandsCache[componentId], ';');
|
||||
commandsCache[componentId] = [];
|
||||
|
||||
if (isDebugging) {
|
||||
console.log('>>> >>> flush native ===');
|
||||
console.log('>>> commands: ' + cmdArgs);
|
||||
}
|
||||
|
||||
const result = callGCanvasLinkNative(componentId, 0x60000000, cmdArgs);
|
||||
|
||||
if (isDebugging) {
|
||||
console.log('>>> result: ' + result);
|
||||
}
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
callNative: function (componentId, cmdArgs, cache) {
|
||||
|
||||
if (isDebugging) {
|
||||
logCommand(componentId, cmdArgs);
|
||||
}
|
||||
|
||||
commandsCache[componentId].push(cmdArgs);
|
||||
|
||||
if (!cache || isComboDisabled) {
|
||||
return GBridge.flushNative(componentId);
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
},
|
||||
|
||||
texImage2D(componentId, ...args) {
|
||||
if (isWeexIOS) {
|
||||
if (args.length === 6) {
|
||||
const [target, level, internalformat, format, type, image] = args;
|
||||
GBridge.callNative(
|
||||
componentId,
|
||||
GLmethod.texImage2D + ',' + 6 + ',' + target + ',' + level + ',' + internalformat + ',' + format + ',' + type + ',' + image.src
|
||||
)
|
||||
} else if (args.length === 9) {
|
||||
const [target, level, internalformat, width, height, border, format, type, image] = args;
|
||||
GBridge.callNative(
|
||||
componentId,
|
||||
GLmethod.texImage2D + ',' + 9 + ',' + target + ',' + level + ',' + internalformat + ',' + width + ',' + height + ',' + border + ',' +
|
||||
+ format + ',' + type + ',' + (image ? image.src : 0)
|
||||
)
|
||||
}
|
||||
} else if (isWeexAndroid) {
|
||||
if (args.length === 6) {
|
||||
const [target, level, internalformat, format, type, image] = args;
|
||||
GCanvasModule.texImage2D(componentId, target, level, internalformat, format, type, image.src);
|
||||
} else if (args.length === 9) {
|
||||
const [target, level, internalformat, width, height, border, format, type, image] = args;
|
||||
GCanvasModule.texImage2D(componentId, target, level, internalformat, width, height, border, format, type, (image ? image.src : 0));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
texSubImage2D(componentId, target, level, xoffset, yoffset, format, type, image) {
|
||||
if (isWeexIOS) {
|
||||
if (arguments.length === 8) {
|
||||
GBridge.callNative(
|
||||
componentId,
|
||||
GLmethod.texSubImage2D + ',' + 6 + ',' + target + ',' + level + ',' + xoffset + ',' + yoffset, + ',' + format + ',' + type + ',' + image.src
|
||||
)
|
||||
}
|
||||
} else if (isWeexAndroid) {
|
||||
GCanvasModule.texSubImage2D(componentId, target, level, xoffset, yoffset, format, type, image.src);
|
||||
}
|
||||
},
|
||||
|
||||
bindImageTexture(componentId, src, imageId) {
|
||||
GCanvasModule.bindImageTexture([src, imageId], componentId);
|
||||
},
|
||||
|
||||
perloadImage([url, id], callback) {
|
||||
GCanvasModule.preLoadImage([url, id], function (image) {
|
||||
image.url = url;
|
||||
image.id = id;
|
||||
callback(image);
|
||||
});
|
||||
},
|
||||
|
||||
measureText(text, fontStyle, componentId) {
|
||||
return GCanvasModule.measureText([text, fontStyle], componentId);
|
||||
},
|
||||
|
||||
getImageData (componentId, x, y, w, h, callback) {
|
||||
GCanvasModule.getImageData([x, y,w,h],componentId,callback);
|
||||
},
|
||||
|
||||
putImageData (componentId, data, x, y, w, h, callback) {
|
||||
GCanvasModule.putImageData([x, y,w,h,data],componentId,callback);
|
||||
},
|
||||
|
||||
toTempFilePath(componentId, x, y, width, height, destWidth, destHeight, fileType, quality, callback){
|
||||
GCanvasModule.toTempFilePath([x, y, width,height, destWidth, destHeight, fileType, quality], componentId, callback);
|
||||
}
|
||||
}
|
||||
|
||||
export default GBridge;
|
@ -0,0 +1,18 @@
|
||||
class FillStyleLinearGradient {
|
||||
|
||||
constructor(x0, y0, x1, y1) {
|
||||
this._start_pos = { _x: x0, _y: y0 };
|
||||
this._end_pos = { _x: x1, _y: y1 };
|
||||
this._stop_count = 0;
|
||||
this._stops = [0, 0, 0, 0, 0];
|
||||
}
|
||||
|
||||
addColorStop = function (pos, color) {
|
||||
if (this._stop_count < 5 && 0.0 <= pos && pos <= 1.0) {
|
||||
this._stops[this._stop_count] = { _pos: pos, _color: color };
|
||||
this._stop_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default FillStyleLinearGradient;
|
@ -0,0 +1,8 @@
|
||||
class FillStylePattern {
|
||||
constructor(img, pattern) {
|
||||
this._style = pattern;
|
||||
this._img = img;
|
||||
}
|
||||
}
|
||||
|
||||
export default FillStylePattern;
|
@ -0,0 +1,17 @@
|
||||
class FillStyleRadialGradient {
|
||||
constructor(x0, y0, r0, x1, y1, r1) {
|
||||
this._start_pos = { _x: x0, _y: y0, _r: r0 };
|
||||
this._end_pos = { _x: x1, _y: y1, _r: r1 };
|
||||
this._stop_count = 0;
|
||||
this._stops = [0, 0, 0, 0, 0];
|
||||
}
|
||||
|
||||
addColorStop(pos, color) {
|
||||
if (this._stop_count < 5 && 0.0 <= pos && pos <= 1.0) {
|
||||
this._stops[this._stop_count] = { _pos: pos, _color: color };
|
||||
this._stop_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default FillStyleRadialGradient;
|
@ -0,0 +1,666 @@
|
||||
import FillStylePattern from './FillStylePattern';
|
||||
import FillStyleLinearGradient from './FillStyleLinearGradient';
|
||||
import FillStyleRadialGradient from './FillStyleRadialGradient';
|
||||
import GImage from '../env/image.js';
|
||||
import {
|
||||
ArrayBufferToBase64,
|
||||
Base64ToUint8ClampedArray
|
||||
} from '../env/tool.js';
|
||||
|
||||
export default class CanvasRenderingContext2D {
|
||||
|
||||
_drawCommands = '';
|
||||
|
||||
_globalAlpha = 1.0;
|
||||
|
||||
_fillStyle = 'rgb(0,0,0)';
|
||||
_strokeStyle = 'rgb(0,0,0)';
|
||||
|
||||
_lineWidth = 1;
|
||||
_lineCap = 'butt';
|
||||
_lineJoin = 'miter';
|
||||
|
||||
_miterLimit = 10;
|
||||
|
||||
_globalCompositeOperation = 'source-over';
|
||||
|
||||
_textAlign = 'start';
|
||||
_textBaseline = 'alphabetic';
|
||||
|
||||
_font = '10px sans-serif';
|
||||
|
||||
_savedGlobalAlpha = [];
|
||||
|
||||
timer = null;
|
||||
componentId = null;
|
||||
|
||||
_notCommitDrawImageCache = [];
|
||||
_needRedrawImageCache = [];
|
||||
_redrawCommands = '';
|
||||
_autoSaveContext = true;
|
||||
// _imageMap = new GHashMap();
|
||||
// _textureMap = new GHashMap();
|
||||
|
||||
constructor() {
|
||||
this.className = 'CanvasRenderingContext2D';
|
||||
//this.save()
|
||||
}
|
||||
|
||||
setFillStyle(value) {
|
||||
this.fillStyle = value;
|
||||
}
|
||||
|
||||
set fillStyle(value) {
|
||||
this._fillStyle = value;
|
||||
|
||||
if (typeof(value) == 'string') {
|
||||
this._drawCommands = this._drawCommands.concat("F" + value + ";");
|
||||
} else if (value instanceof FillStylePattern) {
|
||||
const image = value._img;
|
||||
if (!image.complete) {
|
||||
image.onload = () => {
|
||||
var index = this._needRedrawImageCache.indexOf(image);
|
||||
if (index > -1) {
|
||||
this._needRedrawImageCache.splice(index, 1);
|
||||
CanvasRenderingContext2D.GBridge.bindImageTexture(this.componentId, image.src, image._id);
|
||||
this._redrawflush(true);
|
||||
}
|
||||
}
|
||||
this._notCommitDrawImageCache.push(image);
|
||||
} else {
|
||||
CanvasRenderingContext2D.GBridge.bindImageTexture(this.componentId, image.src, image._id);
|
||||
}
|
||||
|
||||
//CanvasRenderingContext2D.GBridge.bindImageTexture(this.componentId, image.src, image._id);
|
||||
this._drawCommands = this._drawCommands.concat("G" + image._id + "," + value._style + ";");
|
||||
} else if (value instanceof FillStyleLinearGradient) {
|
||||
var command = "D" + value._start_pos._x.toFixed(2) + "," + value._start_pos._y.toFixed(2) + "," +
|
||||
value._end_pos._x.toFixed(2) + "," + value._end_pos._y.toFixed(2) + "," +
|
||||
value._stop_count;
|
||||
for (var i = 0; i < value._stop_count; ++i) {
|
||||
command += ("," + value._stops[i]._pos + "," + value._stops[i]._color);
|
||||
}
|
||||
this._drawCommands = this._drawCommands.concat(command + ";");
|
||||
} else if (value instanceof FillStyleRadialGradient) {
|
||||
var command = "H" + value._start_pos._x.toFixed(2) + "," + value._start_pos._y.toFixed(2) + "," + value._start_pos._r
|
||||
.toFixed(2) + "," +
|
||||
value._end_pos._x.toFixed(2) + "," + value._end_pos._y.toFixed(2) + "," + value._end_pos._r.toFixed(2) + "," +
|
||||
value._stop_count;
|
||||
for (var i = 0; i < value._stop_count; ++i) {
|
||||
command += ("," + value._stops[i]._pos + "," + value._stops[i]._color);
|
||||
}
|
||||
this._drawCommands = this._drawCommands.concat(command + ";");
|
||||
}
|
||||
}
|
||||
|
||||
get fillStyle() {
|
||||
return this._fillStyle;
|
||||
}
|
||||
|
||||
get globalAlpha() {
|
||||
return this._globalAlpha;
|
||||
}
|
||||
|
||||
setGlobalAlpha(value) {
|
||||
this.globalAlpha = value;
|
||||
}
|
||||
|
||||
set globalAlpha(value) {
|
||||
this._globalAlpha = value;
|
||||
this._drawCommands = this._drawCommands.concat("a" + value.toFixed(2) + ";");
|
||||
}
|
||||
|
||||
|
||||
get strokeStyle() {
|
||||
return this._strokeStyle;
|
||||
}
|
||||
|
||||
setStrokeStyle(value) {
|
||||
this.strokeStyle = value;
|
||||
}
|
||||
|
||||
set strokeStyle(value) {
|
||||
|
||||
this._strokeStyle = value;
|
||||
|
||||
if (typeof(value) == 'string') {
|
||||
this._drawCommands = this._drawCommands.concat("S" + value + ";");
|
||||
} else if (value instanceof FillStylePattern) {
|
||||
CanvasRenderingContext2D.GBridge.bindImageTexture(this.componentId, image.src, image._id);
|
||||
this._drawCommands = this._drawCommands.concat("G" + image._id + "," + value._style + ";");
|
||||
} else if (value instanceof FillStyleLinearGradient) {
|
||||
var command = "D" + value._start_pos._x.toFixed(2) + "," + value._start_pos._y.toFixed(2) + "," +
|
||||
value._end_pos._x.toFixed(2) + "," + value._end_pos._y.toFixed(2) + "," +
|
||||
value._stop_count;
|
||||
|
||||
for (var i = 0; i < value._stop_count; ++i) {
|
||||
command += ("," + value._stops[i]._pos + "," + value._stops[i]._color);
|
||||
}
|
||||
this._drawCommands = this._drawCommands.concat(command + ";");
|
||||
} else if (value instanceof FillStyleRadialGradient) {
|
||||
var command = "H" + value._start_pos._x.toFixed(2) + "," + value._start_pos._y.toFixed(2) + "," + value._start_pos._r
|
||||
.toFixed(2) + "," +
|
||||
value._end_pos._x.toFixed(2) + "," + value._end_pos._y + ",".toFixed(2) + value._end_pos._r.toFixed(2) + "," +
|
||||
value._stop_count;
|
||||
|
||||
for (var i = 0; i < value._stop_count; ++i) {
|
||||
command += ("," + value._stops[i]._pos + "," + value._stops[i]._color);
|
||||
}
|
||||
this._drawCommands = this._drawCommands.concat(command + ";");
|
||||
}
|
||||
}
|
||||
|
||||
get lineWidth() {
|
||||
return this._lineWidth;
|
||||
}
|
||||
|
||||
setLineWidth(value) {
|
||||
this.lineWidth = value;
|
||||
}
|
||||
|
||||
set lineWidth(value) {
|
||||
this._lineWidth = value;
|
||||
this._drawCommands = this._drawCommands.concat("W" + value + ";");
|
||||
}
|
||||
|
||||
get lineCap() {
|
||||
return this._lineCap;
|
||||
}
|
||||
|
||||
setLineCap(value) {
|
||||
this.lineCap = value;
|
||||
}
|
||||
|
||||
set lineCap(value) {
|
||||
this._lineCap = value;
|
||||
this._drawCommands = this._drawCommands.concat("C" + value + ";");
|
||||
}
|
||||
|
||||
get lineJoin() {
|
||||
return this._lineJoin;
|
||||
}
|
||||
|
||||
setLineJoin(value) {
|
||||
this.lineJoin = value
|
||||
}
|
||||
|
||||
set lineJoin(value) {
|
||||
this._lineJoin = value;
|
||||
this._drawCommands = this._drawCommands.concat("J" + value + ";");
|
||||
}
|
||||
|
||||
get miterLimit() {
|
||||
return this._miterLimit;
|
||||
}
|
||||
|
||||
setMiterLimit(value) {
|
||||
this.miterLimit = value
|
||||
}
|
||||
|
||||
set miterLimit(value) {
|
||||
this._miterLimit = value;
|
||||
this._drawCommands = this._drawCommands.concat("M" + value + ";");
|
||||
}
|
||||
|
||||
get globalCompositeOperation() {
|
||||
return this._globalCompositeOperation;
|
||||
}
|
||||
|
||||
set globalCompositeOperation(value) {
|
||||
|
||||
this._globalCompositeOperation = value;
|
||||
let mode = 0;
|
||||
switch (value) {
|
||||
case "source-over":
|
||||
mode = 0;
|
||||
break;
|
||||
case "source-atop":
|
||||
mode = 5;
|
||||
break;
|
||||
case "source-in":
|
||||
mode = 0;
|
||||
break;
|
||||
case "source-out":
|
||||
mode = 2;
|
||||
break;
|
||||
case "destination-over":
|
||||
mode = 4;
|
||||
break;
|
||||
case "destination-atop":
|
||||
mode = 4;
|
||||
break;
|
||||
case "destination-in":
|
||||
mode = 4;
|
||||
break;
|
||||
case "destination-out":
|
||||
mode = 3;
|
||||
break;
|
||||
case "lighter":
|
||||
mode = 1;
|
||||
break;
|
||||
case "copy":
|
||||
mode = 2;
|
||||
break;
|
||||
case "xor":
|
||||
mode = 6;
|
||||
break;
|
||||
default:
|
||||
mode = 0;
|
||||
}
|
||||
|
||||
this._drawCommands = this._drawCommands.concat("B" + mode + ";");
|
||||
}
|
||||
|
||||
get textAlign() {
|
||||
return this._textAlign;
|
||||
}
|
||||
|
||||
setTextAlign(value) {
|
||||
this.textAlign = value
|
||||
}
|
||||
|
||||
set textAlign(value) {
|
||||
|
||||
this._textAlign = value;
|
||||
let Align = 0;
|
||||
switch (value) {
|
||||
case "start":
|
||||
Align = 0;
|
||||
break;
|
||||
case "end":
|
||||
Align = 1;
|
||||
break;
|
||||
case "left":
|
||||
Align = 2;
|
||||
break;
|
||||
case "center":
|
||||
Align = 3;
|
||||
break;
|
||||
case "right":
|
||||
Align = 4;
|
||||
break;
|
||||
default:
|
||||
Align = 0;
|
||||
}
|
||||
|
||||
this._drawCommands = this._drawCommands.concat("A" + Align + ";");
|
||||
}
|
||||
|
||||
get textBaseline() {
|
||||
return this._textBaseline;
|
||||
}
|
||||
|
||||
setTextBaseline(value) {
|
||||
this.textBaseline = value
|
||||
}
|
||||
|
||||
set textBaseline(value) {
|
||||
this._textBaseline = value;
|
||||
let baseline = 0;
|
||||
switch (value) {
|
||||
case "alphabetic":
|
||||
baseline = 0;
|
||||
break;
|
||||
case "middle":
|
||||
baseline = 1;
|
||||
break;
|
||||
case "top":
|
||||
baseline = 2;
|
||||
break;
|
||||
case "hanging":
|
||||
baseline = 3;
|
||||
break;
|
||||
case "bottom":
|
||||
baseline = 4;
|
||||
break;
|
||||
case "ideographic":
|
||||
baseline = 5;
|
||||
break;
|
||||
default:
|
||||
baseline = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
this._drawCommands = this._drawCommands.concat("E" + baseline + ";");
|
||||
}
|
||||
|
||||
get font() {
|
||||
return this._font;
|
||||
}
|
||||
|
||||
setFontSize(size) {
|
||||
var str = this._font;
|
||||
var strs = str.trim().split(/\s+/);
|
||||
for (var i = 0; i < strs.length; i++) {
|
||||
var values = ["normal", "italic", "oblique", "normal", "small-caps", "normal", "bold",
|
||||
"bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900",
|
||||
"normal", "ultra-condensed", "extra-condensed", "condensed", "semi-condensed",
|
||||
"semi-expanded", "expanded", "extra-expanded", "ultra-expanded"
|
||||
];
|
||||
|
||||
if (-1 == values.indexOf(strs[i].trim())) {
|
||||
if (typeof size === 'string') {
|
||||
strs[i] = size;
|
||||
} else if (typeof size === 'number') {
|
||||
strs[i] = String(size) + 'px';
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.font = strs.join(" ");
|
||||
}
|
||||
|
||||
set font(value) {
|
||||
this._font = value;
|
||||
this._drawCommands = this._drawCommands.concat("j" + value + ";");
|
||||
}
|
||||
|
||||
setTransform(a, b, c, d, tx, ty) {
|
||||
this._drawCommands = this._drawCommands.concat("t" +
|
||||
(a === 1 ? "1" : a.toFixed(2)) + "," +
|
||||
(b === 0 ? "0" : b.toFixed(2)) + "," +
|
||||
(c === 0 ? "0" : c.toFixed(2)) + "," +
|
||||
(d === 1 ? "1" : d.toFixed(2)) + "," + tx.toFixed(2) + "," + ty.toFixed(2) + ";");
|
||||
}
|
||||
|
||||
transform(a, b, c, d, tx, ty) {
|
||||
this._drawCommands = this._drawCommands.concat("f" +
|
||||
(a === 1 ? "1" : a.toFixed(2)) + "," +
|
||||
(b === 0 ? "0" : b.toFixed(2)) + "," +
|
||||
(c === 0 ? "0" : c.toFixed(2)) + "," +
|
||||
(d === 1 ? "1" : d.toFixed(2)) + "," + tx + "," + ty + ";");
|
||||
}
|
||||
|
||||
resetTransform() {
|
||||
this._drawCommands = this._drawCommands.concat("m;");
|
||||
}
|
||||
|
||||
scale(a, d) {
|
||||
this._drawCommands = this._drawCommands.concat("k" + a.toFixed(2) + "," +
|
||||
d.toFixed(2) + ";");
|
||||
}
|
||||
|
||||
rotate(angle) {
|
||||
this._drawCommands = this._drawCommands
|
||||
.concat("r" + angle.toFixed(6) + ";");
|
||||
}
|
||||
|
||||
translate(tx, ty) {
|
||||
this._drawCommands = this._drawCommands.concat("l" + tx.toFixed(2) + "," + ty.toFixed(2) + ";");
|
||||
}
|
||||
|
||||
save() {
|
||||
this._savedGlobalAlpha.push(this._globalAlpha);
|
||||
this._drawCommands = this._drawCommands.concat("v;");
|
||||
}
|
||||
|
||||
restore() {
|
||||
this._drawCommands = this._drawCommands.concat("e;");
|
||||
this._globalAlpha = this._savedGlobalAlpha.pop();
|
||||
}
|
||||
|
||||
createPattern(img, pattern) {
|
||||
if (typeof img === 'string') {
|
||||
var imgObj = new GImage();
|
||||
imgObj.src = img;
|
||||
img = imgObj;
|
||||
}
|
||||
return new FillStylePattern(img, pattern);
|
||||
}
|
||||
|
||||
createLinearGradient(x0, y0, x1, y1) {
|
||||
return new FillStyleLinearGradient(x0, y0, x1, y1);
|
||||
}
|
||||
|
||||
createRadialGradient = function(x0, y0, r0, x1, y1, r1) {
|
||||
return new FillStyleRadialGradient(x0, y0, r0, x1, y1, r1);
|
||||
};
|
||||
|
||||
createCircularGradient = function(x0, y0, r0) {
|
||||
return new FillStyleRadialGradient(x0, y0, 0, x0, y0, r0);
|
||||
};
|
||||
|
||||
strokeRect(x, y, w, h) {
|
||||
this._drawCommands = this._drawCommands.concat("s" + x + "," + y + "," + w + "," + h + ";");
|
||||
}
|
||||
|
||||
|
||||
clearRect(x, y, w, h) {
|
||||
this._drawCommands = this._drawCommands.concat("c" + x + "," + y + "," + w +
|
||||
"," + h + ";");
|
||||
}
|
||||
|
||||
clip() {
|
||||
this._drawCommands = this._drawCommands.concat("p;");
|
||||
}
|
||||
|
||||
resetClip() {
|
||||
this._drawCommands = this._drawCommands.concat("q;");
|
||||
}
|
||||
|
||||
closePath() {
|
||||
this._drawCommands = this._drawCommands.concat("o;");
|
||||
}
|
||||
|
||||
moveTo(x, y) {
|
||||
this._drawCommands = this._drawCommands.concat("g" + x.toFixed(2) + "," + y.toFixed(2) + ";");
|
||||
}
|
||||
|
||||
lineTo(x, y) {
|
||||
this._drawCommands = this._drawCommands.concat("i" + x.toFixed(2) + "," + y.toFixed(2) + ";");
|
||||
}
|
||||
|
||||
quadraticCurveTo = function(cpx, cpy, x, y) {
|
||||
this._drawCommands = this._drawCommands.concat("u" + cpx + "," + cpy + "," + x + "," + y + ";");
|
||||
}
|
||||
|
||||
bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y, ) {
|
||||
this._drawCommands = this._drawCommands.concat(
|
||||
"z" + cp1x.toFixed(2) + "," + cp1y.toFixed(2) + "," + cp2x.toFixed(2) + "," + cp2y.toFixed(2) + "," +
|
||||
x.toFixed(2) + "," + y.toFixed(2) + ";");
|
||||
}
|
||||
|
||||
arcTo(x1, y1, x2, y2, radius) {
|
||||
this._drawCommands = this._drawCommands.concat("h" + x1 + "," + y1 + "," + x2 + "," + y2 + "," + radius + ";");
|
||||
}
|
||||
|
||||
beginPath() {
|
||||
this._drawCommands = this._drawCommands.concat("b;");
|
||||
}
|
||||
|
||||
|
||||
fillRect(x, y, w, h) {
|
||||
this._drawCommands = this._drawCommands.concat("n" + x + "," + y + "," + w +
|
||||
"," + h + ";");
|
||||
}
|
||||
|
||||
rect(x, y, w, h) {
|
||||
this._drawCommands = this._drawCommands.concat("w" + x + "," + y + "," + w + "," + h + ";");
|
||||
}
|
||||
|
||||
fill() {
|
||||
this._drawCommands = this._drawCommands.concat("L;");
|
||||
}
|
||||
|
||||
stroke(path) {
|
||||
this._drawCommands = this._drawCommands.concat("x;");
|
||||
}
|
||||
|
||||
arc(x, y, radius, startAngle, endAngle, anticlockwise) {
|
||||
|
||||
let ianticlockwise = 0;
|
||||
if (anticlockwise) {
|
||||
ianticlockwise = 1;
|
||||
}
|
||||
|
||||
this._drawCommands = this._drawCommands.concat(
|
||||
"y" + x.toFixed(2) + "," + y.toFixed(2) + "," +
|
||||
radius.toFixed(2) + "," + startAngle + "," + endAngle + "," + ianticlockwise +
|
||||
";"
|
||||
);
|
||||
}
|
||||
|
||||
fillText(text, x, y) {
|
||||
let tmptext = text.replace(/!/g, "!!");
|
||||
tmptext = tmptext.replace(/,/g, "!,");
|
||||
tmptext = tmptext.replace(/;/g, "!;");
|
||||
this._drawCommands = this._drawCommands.concat("T" + tmptext + "," + x + "," + y + ",0.0;");
|
||||
}
|
||||
|
||||
strokeText = function(text, x, y) {
|
||||
let tmptext = text.replace(/!/g, "!!");
|
||||
tmptext = tmptext.replace(/,/g, "!,");
|
||||
tmptext = tmptext.replace(/;/g, "!;");
|
||||
this._drawCommands = this._drawCommands.concat("U" + tmptext + "," + x + "," + y + ",0.0;");
|
||||
}
|
||||
|
||||
measureText(text) {
|
||||
return CanvasRenderingContext2D.GBridge.measureText(text, this.font, this.componentId);
|
||||
}
|
||||
|
||||
isPointInPath = function(x, y) {
|
||||
throw new Error('GCanvas not supported yet');
|
||||
}
|
||||
|
||||
drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh) {
|
||||
if (typeof image === 'string') {
|
||||
var imgObj = new GImage();
|
||||
imgObj.src = image;
|
||||
image = imgObj;
|
||||
}
|
||||
if (image instanceof GImage) {
|
||||
if (!image.complete) {
|
||||
imgObj.onload = () => {
|
||||
var index = this._needRedrawImageCache.indexOf(image);
|
||||
if (index > -1) {
|
||||
this._needRedrawImageCache.splice(index, 1);
|
||||
CanvasRenderingContext2D.GBridge.bindImageTexture(this.componentId, image.src, image._id);
|
||||
this._redrawflush(true);
|
||||
}
|
||||
}
|
||||
this._notCommitDrawImageCache.push(image);
|
||||
} else {
|
||||
CanvasRenderingContext2D.GBridge.bindImageTexture(this.componentId, image.src, image._id);
|
||||
}
|
||||
var srcArgs = [image, sx, sy, sw, sh, dx, dy, dw, dh];
|
||||
var args = [];
|
||||
for (var arg in srcArgs) {
|
||||
if (typeof(srcArgs[arg]) != 'undefined') {
|
||||
args.push(srcArgs[arg]);
|
||||
}
|
||||
}
|
||||
this.__drawImage.apply(this, args);
|
||||
//this.__drawImage(image,sx, sy, sw, sh, dx, dy, dw, dh);
|
||||
}
|
||||
}
|
||||
|
||||
__drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh) {
|
||||
const numArgs = arguments.length;
|
||||
|
||||
function drawImageCommands() {
|
||||
|
||||
if (numArgs === 3) {
|
||||
const x = parseFloat(sx) || 0.0;
|
||||
const y = parseFloat(sy) || 0.0;
|
||||
|
||||
return ("d" + image._id + ",0,0," +
|
||||
image.width + "," + image.height + "," +
|
||||
x + "," + y + "," + image.width + "," + image.height + ";");
|
||||
} else if (numArgs === 5) {
|
||||
const x = parseFloat(sx) || 0.0;
|
||||
const y = parseFloat(sy) || 0.0;
|
||||
const width = parseInt(sw) || image.width;
|
||||
const height = parseInt(sh) || image.height;
|
||||
|
||||
return ("d" + image._id + ",0,0," +
|
||||
image.width + "," + image.height + "," +
|
||||
x + "," + y + "," + width + "," + height + ";");
|
||||
} else if (numArgs === 9) {
|
||||
sx = parseFloat(sx) || 0.0;
|
||||
sy = parseFloat(sy) || 0.0;
|
||||
sw = parseInt(sw) || image.width;
|
||||
sh = parseInt(sh) || image.height;
|
||||
dx = parseFloat(dx) || 0.0;
|
||||
dy = parseFloat(dy) || 0.0;
|
||||
dw = parseInt(dw) || image.width;
|
||||
dh = parseInt(dh) || image.height;
|
||||
|
||||
return ("d" + image._id + "," +
|
||||
sx + "," + sy + "," + sw + "," + sh + "," +
|
||||
dx + "," + dy + "," + dw + "," + dh + ";");
|
||||
}
|
||||
}
|
||||
this._drawCommands += drawImageCommands();
|
||||
}
|
||||
|
||||
_flush(reserve, callback) {
|
||||
const commands = this._drawCommands;
|
||||
this._drawCommands = '';
|
||||
CanvasRenderingContext2D.GBridge.render2d(this.componentId, commands, callback);
|
||||
this._needRender = false;
|
||||
}
|
||||
|
||||
_redrawflush(reserve, callback) {
|
||||
const commands = this._redrawCommands;
|
||||
CanvasRenderingContext2D.GBridge.render2d(this.componentId, commands, callback);
|
||||
if (this._needRedrawImageCache.length == 0) {
|
||||
this._redrawCommands = '';
|
||||
}
|
||||
}
|
||||
|
||||
draw(reserve, callback) {
|
||||
if (!reserve) {
|
||||
this._globalAlpha = this._savedGlobalAlpha.pop();
|
||||
this._savedGlobalAlpha.push(this._globalAlpha);
|
||||
this._redrawCommands = this._drawCommands;
|
||||
this._needRedrawImageCache = this._notCommitDrawImageCache;
|
||||
if (this._autoSaveContext) {
|
||||
this._drawCommands = ("v;" + this._drawCommands);
|
||||
this._autoSaveContext = false;
|
||||
} else {
|
||||
this._drawCommands = ("e;X;v;" + this._drawCommands);
|
||||
}
|
||||
} else {
|
||||
this._needRedrawImageCache = this._needRedrawImageCache.concat(this._notCommitDrawImageCache);
|
||||
this._redrawCommands += this._drawCommands;
|
||||
if (this._autoSaveContext) {
|
||||
this._drawCommands = ("v;" + this._drawCommands);
|
||||
this._autoSaveContext = false;
|
||||
}
|
||||
}
|
||||
this._notCommitDrawImageCache = [];
|
||||
if (this._flush) {
|
||||
this._flush(reserve, callback);
|
||||
}
|
||||
}
|
||||
|
||||
getImageData(x, y, w, h, callback) {
|
||||
CanvasRenderingContext2D.GBridge.getImageData(this.componentId, x, y, w, h, function(res) {
|
||||
res.data = Base64ToUint8ClampedArray(res.data);
|
||||
if (typeof(callback) == 'function') {
|
||||
callback(res);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
putImageData(data, x, y, w, h, callback) {
|
||||
if (data instanceof Uint8ClampedArray) {
|
||||
data = ArrayBufferToBase64(data);
|
||||
CanvasRenderingContext2D.GBridge.putImageData(this.componentId, data, x, y, w, h, function(res) {
|
||||
if (typeof(callback) == 'function') {
|
||||
callback(res);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
toTempFilePath(x, y, width, height, destWidth, destHeight, fileType, quality, callback) {
|
||||
CanvasRenderingContext2D.GBridge.toTempFilePath(this.componentId, x, y, width, height, destWidth, destHeight,
|
||||
fileType, quality,
|
||||
function(res) {
|
||||
if (typeof(callback) == 'function') {
|
||||
callback(res);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
export default class WebGLActiveInfo {
|
||||
className = 'WebGLActiveInfo';
|
||||
|
||||
constructor({
|
||||
type, name, size
|
||||
}) {
|
||||
this.type = type;
|
||||
this.name = name;
|
||||
this.size = size;
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
import {getTransferedObjectUUID} from './classUtils';
|
||||
|
||||
const name = 'WebGLBuffer';
|
||||
|
||||
function uuid(id) {
|
||||
return getTransferedObjectUUID(name, id);
|
||||
}
|
||||
|
||||
export default class WebGLBuffer {
|
||||
className = name;
|
||||
|
||||
constructor(id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
static uuid = uuid;
|
||||
|
||||
uuid() {
|
||||
return uuid(this.id);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
import {getTransferedObjectUUID} from './classUtils';
|
||||
|
||||
const name = 'WebGLFrameBuffer';
|
||||
|
||||
function uuid(id) {
|
||||
return getTransferedObjectUUID(name, id);
|
||||
}
|
||||
|
||||
export default class WebGLFramebuffer {
|
||||
className = name;
|
||||
|
||||
constructor(id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
static uuid = uuid;
|
||||
|
||||
uuid() {
|
||||
return uuid(this.id);
|
||||
}
|
||||
}
|
@ -0,0 +1,298 @@
|
||||
export default {
|
||||
"DEPTH_BUFFER_BIT": 256,
|
||||
"STENCIL_BUFFER_BIT": 1024,
|
||||
"COLOR_BUFFER_BIT": 16384,
|
||||
"POINTS": 0,
|
||||
"LINES": 1,
|
||||
"LINE_LOOP": 2,
|
||||
"LINE_STRIP": 3,
|
||||
"TRIANGLES": 4,
|
||||
"TRIANGLE_STRIP": 5,
|
||||
"TRIANGLE_FAN": 6,
|
||||
"ZERO": 0,
|
||||
"ONE": 1,
|
||||
"SRC_COLOR": 768,
|
||||
"ONE_MINUS_SRC_COLOR": 769,
|
||||
"SRC_ALPHA": 770,
|
||||
"ONE_MINUS_SRC_ALPHA": 771,
|
||||
"DST_ALPHA": 772,
|
||||
"ONE_MINUS_DST_ALPHA": 773,
|
||||
"DST_COLOR": 774,
|
||||
"ONE_MINUS_DST_COLOR": 775,
|
||||
"SRC_ALPHA_SATURATE": 776,
|
||||
"FUNC_ADD": 32774,
|
||||
"BLEND_EQUATION": 32777,
|
||||
"BLEND_EQUATION_RGB": 32777,
|
||||
"BLEND_EQUATION_ALPHA": 34877,
|
||||
"FUNC_SUBTRACT": 32778,
|
||||
"FUNC_REVERSE_SUBTRACT": 32779,
|
||||
"BLEND_DST_RGB": 32968,
|
||||
"BLEND_SRC_RGB": 32969,
|
||||
"BLEND_DST_ALPHA": 32970,
|
||||
"BLEND_SRC_ALPHA": 32971,
|
||||
"CONSTANT_COLOR": 32769,
|
||||
"ONE_MINUS_CONSTANT_COLOR": 32770,
|
||||
"CONSTANT_ALPHA": 32771,
|
||||
"ONE_MINUS_CONSTANT_ALPHA": 32772,
|
||||
"BLEND_COLOR": 32773,
|
||||
"ARRAY_BUFFER": 34962,
|
||||
"ELEMENT_ARRAY_BUFFER": 34963,
|
||||
"ARRAY_BUFFER_BINDING": 34964,
|
||||
"ELEMENT_ARRAY_BUFFER_BINDING": 34965,
|
||||
"STREAM_DRAW": 35040,
|
||||
"STATIC_DRAW": 35044,
|
||||
"DYNAMIC_DRAW": 35048,
|
||||
"BUFFER_SIZE": 34660,
|
||||
"BUFFER_USAGE": 34661,
|
||||
"CURRENT_VERTEX_ATTRIB": 34342,
|
||||
"FRONT": 1028,
|
||||
"BACK": 1029,
|
||||
"FRONT_AND_BACK": 1032,
|
||||
"TEXTURE_2D": 3553,
|
||||
"CULL_FACE": 2884,
|
||||
"BLEND": 3042,
|
||||
"DITHER": 3024,
|
||||
"STENCIL_TEST": 2960,
|
||||
"DEPTH_TEST": 2929,
|
||||
"SCISSOR_TEST": 3089,
|
||||
"POLYGON_OFFSET_FILL": 32823,
|
||||
"SAMPLE_ALPHA_TO_COVERAGE": 32926,
|
||||
"SAMPLE_COVERAGE": 32928,
|
||||
"NO_ERROR": 0,
|
||||
"INVALID_ENUM": 1280,
|
||||
"INVALID_VALUE": 1281,
|
||||
"INVALID_OPERATION": 1282,
|
||||
"OUT_OF_MEMORY": 1285,
|
||||
"CW": 2304,
|
||||
"CCW": 2305,
|
||||
"LINE_WIDTH": 2849,
|
||||
"ALIASED_POINT_SIZE_RANGE": 33901,
|
||||
"ALIASED_LINE_WIDTH_RANGE": 33902,
|
||||
"CULL_FACE_MODE": 2885,
|
||||
"FRONT_FACE": 2886,
|
||||
"DEPTH_RANGE": 2928,
|
||||
"DEPTH_WRITEMASK": 2930,
|
||||
"DEPTH_CLEAR_VALUE": 2931,
|
||||
"DEPTH_FUNC": 2932,
|
||||
"STENCIL_CLEAR_VALUE": 2961,
|
||||
"STENCIL_FUNC": 2962,
|
||||
"STENCIL_FAIL": 2964,
|
||||
"STENCIL_PASS_DEPTH_FAIL": 2965,
|
||||
"STENCIL_PASS_DEPTH_PASS": 2966,
|
||||
"STENCIL_REF": 2967,
|
||||
"STENCIL_VALUE_MASK": 2963,
|
||||
"STENCIL_WRITEMASK": 2968,
|
||||
"STENCIL_BACK_FUNC": 34816,
|
||||
"STENCIL_BACK_FAIL": 34817,
|
||||
"STENCIL_BACK_PASS_DEPTH_FAIL": 34818,
|
||||
"STENCIL_BACK_PASS_DEPTH_PASS": 34819,
|
||||
"STENCIL_BACK_REF": 36003,
|
||||
"STENCIL_BACK_VALUE_MASK": 36004,
|
||||
"STENCIL_BACK_WRITEMASK": 36005,
|
||||
"VIEWPORT": 2978,
|
||||
"SCISSOR_BOX": 3088,
|
||||
"COLOR_CLEAR_VALUE": 3106,
|
||||
"COLOR_WRITEMASK": 3107,
|
||||
"UNPACK_ALIGNMENT": 3317,
|
||||
"PACK_ALIGNMENT": 3333,
|
||||
"MAX_TEXTURE_SIZE": 3379,
|
||||
"MAX_VIEWPORT_DIMS": 3386,
|
||||
"SUBPIXEL_BITS": 3408,
|
||||
"RED_BITS": 3410,
|
||||
"GREEN_BITS": 3411,
|
||||
"BLUE_BITS": 3412,
|
||||
"ALPHA_BITS": 3413,
|
||||
"DEPTH_BITS": 3414,
|
||||
"STENCIL_BITS": 3415,
|
||||
"POLYGON_OFFSET_UNITS": 10752,
|
||||
"POLYGON_OFFSET_FACTOR": 32824,
|
||||
"TEXTURE_BINDING_2D": 32873,
|
||||
"SAMPLE_BUFFERS": 32936,
|
||||
"SAMPLES": 32937,
|
||||
"SAMPLE_COVERAGE_VALUE": 32938,
|
||||
"SAMPLE_COVERAGE_INVERT": 32939,
|
||||
"COMPRESSED_TEXTURE_FORMATS": 34467,
|
||||
"DONT_CARE": 4352,
|
||||
"FASTEST": 4353,
|
||||
"NICEST": 4354,
|
||||
"GENERATE_MIPMAP_HINT": 33170,
|
||||
"BYTE": 5120,
|
||||
"UNSIGNED_BYTE": 5121,
|
||||
"SHORT": 5122,
|
||||
"UNSIGNED_SHORT": 5123,
|
||||
"INT": 5124,
|
||||
"UNSIGNED_INT": 5125,
|
||||
"FLOAT": 5126,
|
||||
"DEPTH_COMPONENT": 6402,
|
||||
"ALPHA": 6406,
|
||||
"RGB": 6407,
|
||||
"RGBA": 6408,
|
||||
"LUMINANCE": 6409,
|
||||
"LUMINANCE_ALPHA": 6410,
|
||||
"UNSIGNED_SHORT_4_4_4_4": 32819,
|
||||
"UNSIGNED_SHORT_5_5_5_1": 32820,
|
||||
"UNSIGNED_SHORT_5_6_5": 33635,
|
||||
"FRAGMENT_SHADER": 35632,
|
||||
"VERTEX_SHADER": 35633,
|
||||
"MAX_VERTEX_ATTRIBS": 34921,
|
||||
"MAX_VERTEX_UNIFORM_VECTORS": 36347,
|
||||
"MAX_VARYING_VECTORS": 36348,
|
||||
"MAX_COMBINED_TEXTURE_IMAGE_UNITS": 35661,
|
||||
"MAX_VERTEX_TEXTURE_IMAGE_UNITS": 35660,
|
||||
"MAX_TEXTURE_IMAGE_UNITS": 34930,
|
||||
"MAX_FRAGMENT_UNIFORM_VECTORS": 36349,
|
||||
"SHADER_TYPE": 35663,
|
||||
"DELETE_STATUS": 35712,
|
||||
"LINK_STATUS": 35714,
|
||||
"VALIDATE_STATUS": 35715,
|
||||
"ATTACHED_SHADERS": 35717,
|
||||
"ACTIVE_UNIFORMS": 35718,
|
||||
"ACTIVE_ATTRIBUTES": 35721,
|
||||
"SHADING_LANGUAGE_VERSION": 35724,
|
||||
"CURRENT_PROGRAM": 35725,
|
||||
"NEVER": 512,
|
||||
"LESS": 513,
|
||||
"EQUAL": 514,
|
||||
"LEQUAL": 515,
|
||||
"GREATER": 516,
|
||||
"NOTEQUAL": 517,
|
||||
"GEQUAL": 518,
|
||||
"ALWAYS": 519,
|
||||
"KEEP": 7680,
|
||||
"REPLACE": 7681,
|
||||
"INCR": 7682,
|
||||
"DECR": 7683,
|
||||
"INVERT": 5386,
|
||||
"INCR_WRAP": 34055,
|
||||
"DECR_WRAP": 34056,
|
||||
"VENDOR": 7936,
|
||||
"RENDERER": 7937,
|
||||
"VERSION": 7938,
|
||||
"NEAREST": 9728,
|
||||
"LINEAR": 9729,
|
||||
"NEAREST_MIPMAP_NEAREST": 9984,
|
||||
"LINEAR_MIPMAP_NEAREST": 9985,
|
||||
"NEAREST_MIPMAP_LINEAR": 9986,
|
||||
"LINEAR_MIPMAP_LINEAR": 9987,
|
||||
"TEXTURE_MAG_FILTER": 10240,
|
||||
"TEXTURE_MIN_FILTER": 10241,
|
||||
"TEXTURE_WRAP_S": 10242,
|
||||
"TEXTURE_WRAP_T": 10243,
|
||||
"TEXTURE": 5890,
|
||||
"TEXTURE_CUBE_MAP": 34067,
|
||||
"TEXTURE_BINDING_CUBE_MAP": 34068,
|
||||
"TEXTURE_CUBE_MAP_POSITIVE_X": 34069,
|
||||
"TEXTURE_CUBE_MAP_NEGATIVE_X": 34070,
|
||||
"TEXTURE_CUBE_MAP_POSITIVE_Y": 34071,
|
||||
"TEXTURE_CUBE_MAP_NEGATIVE_Y": 34072,
|
||||
"TEXTURE_CUBE_MAP_POSITIVE_Z": 34073,
|
||||
"TEXTURE_CUBE_MAP_NEGATIVE_Z": 34074,
|
||||
"MAX_CUBE_MAP_TEXTURE_SIZE": 34076,
|
||||
"TEXTURE0": 33984,
|
||||
"TEXTURE1": 33985,
|
||||
"TEXTURE2": 33986,
|
||||
"TEXTURE3": 33987,
|
||||
"TEXTURE4": 33988,
|
||||
"TEXTURE5": 33989,
|
||||
"TEXTURE6": 33990,
|
||||
"TEXTURE7": 33991,
|
||||
"TEXTURE8": 33992,
|
||||
"TEXTURE9": 33993,
|
||||
"TEXTURE10": 33994,
|
||||
"TEXTURE11": 33995,
|
||||
"TEXTURE12": 33996,
|
||||
"TEXTURE13": 33997,
|
||||
"TEXTURE14": 33998,
|
||||
"TEXTURE15": 33999,
|
||||
"TEXTURE16": 34000,
|
||||
"TEXTURE17": 34001,
|
||||
"TEXTURE18": 34002,
|
||||
"TEXTURE19": 34003,
|
||||
"TEXTURE20": 34004,
|
||||
"TEXTURE21": 34005,
|
||||
"TEXTURE22": 34006,
|
||||
"TEXTURE23": 34007,
|
||||
"TEXTURE24": 34008,
|
||||
"TEXTURE25": 34009,
|
||||
"TEXTURE26": 34010,
|
||||
"TEXTURE27": 34011,
|
||||
"TEXTURE28": 34012,
|
||||
"TEXTURE29": 34013,
|
||||
"TEXTURE30": 34014,
|
||||
"TEXTURE31": 34015,
|
||||
"ACTIVE_TEXTURE": 34016,
|
||||
"REPEAT": 10497,
|
||||
"CLAMP_TO_EDGE": 33071,
|
||||
"MIRRORED_REPEAT": 33648,
|
||||
"FLOAT_VEC2": 35664,
|
||||
"FLOAT_VEC3": 35665,
|
||||
"FLOAT_VEC4": 35666,
|
||||
"INT_VEC2": 35667,
|
||||
"INT_VEC3": 35668,
|
||||
"INT_VEC4": 35669,
|
||||
"BOOL": 35670,
|
||||
"BOOL_VEC2": 35671,
|
||||
"BOOL_VEC3": 35672,
|
||||
"BOOL_VEC4": 35673,
|
||||
"FLOAT_MAT2": 35674,
|
||||
"FLOAT_MAT3": 35675,
|
||||
"FLOAT_MAT4": 35676,
|
||||
"SAMPLER_2D": 35678,
|
||||
"SAMPLER_CUBE": 35680,
|
||||
"VERTEX_ATTRIB_ARRAY_ENABLED": 34338,
|
||||
"VERTEX_ATTRIB_ARRAY_SIZE": 34339,
|
||||
"VERTEX_ATTRIB_ARRAY_STRIDE": 34340,
|
||||
"VERTEX_ATTRIB_ARRAY_TYPE": 34341,
|
||||
"VERTEX_ATTRIB_ARRAY_NORMALIZED": 34922,
|
||||
"VERTEX_ATTRIB_ARRAY_POINTER": 34373,
|
||||
"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 34975,
|
||||
"IMPLEMENTATION_COLOR_READ_TYPE": 35738,
|
||||
"IMPLEMENTATION_COLOR_READ_FORMAT": 35739,
|
||||
"COMPILE_STATUS": 35713,
|
||||
"LOW_FLOAT": 36336,
|
||||
"MEDIUM_FLOAT": 36337,
|
||||
"HIGH_FLOAT": 36338,
|
||||
"LOW_INT": 36339,
|
||||
"MEDIUM_INT": 36340,
|
||||
"HIGH_INT": 36341,
|
||||
"FRAMEBUFFER": 36160,
|
||||
"RENDERBUFFER": 36161,
|
||||
"RGBA4": 32854,
|
||||
"RGB5_A1": 32855,
|
||||
"RGB565": 36194,
|
||||
"DEPTH_COMPONENT16": 33189,
|
||||
"STENCIL_INDEX8": 36168,
|
||||
"DEPTH_STENCIL": 34041,
|
||||
"RENDERBUFFER_WIDTH": 36162,
|
||||
"RENDERBUFFER_HEIGHT": 36163,
|
||||
"RENDERBUFFER_INTERNAL_FORMAT": 36164,
|
||||
"RENDERBUFFER_RED_SIZE": 36176,
|
||||
"RENDERBUFFER_GREEN_SIZE": 36177,
|
||||
"RENDERBUFFER_BLUE_SIZE": 36178,
|
||||
"RENDERBUFFER_ALPHA_SIZE": 36179,
|
||||
"RENDERBUFFER_DEPTH_SIZE": 36180,
|
||||
"RENDERBUFFER_STENCIL_SIZE": 36181,
|
||||
"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE": 36048,
|
||||
"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME": 36049,
|
||||
"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL": 36050,
|
||||
"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE": 36051,
|
||||
"COLOR_ATTACHMENT0": 36064,
|
||||
"DEPTH_ATTACHMENT": 36096,
|
||||
"STENCIL_ATTACHMENT": 36128,
|
||||
"DEPTH_STENCIL_ATTACHMENT": 33306,
|
||||
"NONE": 0,
|
||||
"FRAMEBUFFER_COMPLETE": 36053,
|
||||
"FRAMEBUFFER_INCOMPLETE_ATTACHMENT": 36054,
|
||||
"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT": 36055,
|
||||
"FRAMEBUFFER_INCOMPLETE_DIMENSIONS": 36057,
|
||||
"FRAMEBUFFER_UNSUPPORTED": 36061,
|
||||
"FRAMEBUFFER_BINDING": 36006,
|
||||
"RENDERBUFFER_BINDING": 36007,
|
||||
"MAX_RENDERBUFFER_SIZE": 34024,
|
||||
"INVALID_FRAMEBUFFER_OPERATION": 1286,
|
||||
"UNPACK_FLIP_Y_WEBGL": 37440,
|
||||
"UNPACK_PREMULTIPLY_ALPHA_WEBGL": 37441,
|
||||
"CONTEXT_LOST_WEBGL": 37442,
|
||||
"UNPACK_COLORSPACE_CONVERSION_WEBGL": 37443,
|
||||
"BROWSER_DEFAULT_WEBGL": 37444
|
||||
};
|
@ -0,0 +1,142 @@
|
||||
let i = 1;
|
||||
|
||||
const GLmethod = {};
|
||||
|
||||
GLmethod.activeTexture = i++; //1
|
||||
GLmethod.attachShader = i++;
|
||||
GLmethod.bindAttribLocation = i++;
|
||||
GLmethod.bindBuffer = i++;
|
||||
GLmethod.bindFramebuffer = i++;
|
||||
GLmethod.bindRenderbuffer = i++;
|
||||
GLmethod.bindTexture = i++;
|
||||
GLmethod.blendColor = i++;
|
||||
GLmethod.blendEquation = i++;
|
||||
GLmethod.blendEquationSeparate = i++; //10
|
||||
GLmethod.blendFunc = i++;
|
||||
GLmethod.blendFuncSeparate = i++;
|
||||
GLmethod.bufferData = i++;
|
||||
GLmethod.bufferSubData = i++;
|
||||
GLmethod.checkFramebufferStatus = i++;
|
||||
GLmethod.clear = i++;
|
||||
GLmethod.clearColor = i++;
|
||||
GLmethod.clearDepth = i++;
|
||||
GLmethod.clearStencil = i++;
|
||||
GLmethod.colorMask = i++; //20
|
||||
GLmethod.compileShader = i++;
|
||||
GLmethod.compressedTexImage2D = i++;
|
||||
GLmethod.compressedTexSubImage2D = i++;
|
||||
GLmethod.copyTexImage2D = i++;
|
||||
GLmethod.copyTexSubImage2D = i++;
|
||||
GLmethod.createBuffer = i++;
|
||||
GLmethod.createFramebuffer = i++;
|
||||
GLmethod.createProgram = i++;
|
||||
GLmethod.createRenderbuffer = i++;
|
||||
GLmethod.createShader = i++; //30
|
||||
GLmethod.createTexture = i++;
|
||||
GLmethod.cullFace = i++;
|
||||
GLmethod.deleteBuffer = i++;
|
||||
GLmethod.deleteFramebuffer = i++;
|
||||
GLmethod.deleteProgram = i++;
|
||||
GLmethod.deleteRenderbuffer = i++;
|
||||
GLmethod.deleteShader = i++;
|
||||
GLmethod.deleteTexture = i++;
|
||||
GLmethod.depthFunc = i++;
|
||||
GLmethod.depthMask = i++; //40
|
||||
GLmethod.depthRange = i++;
|
||||
GLmethod.detachShader = i++;
|
||||
GLmethod.disable = i++;
|
||||
GLmethod.disableVertexAttribArray = i++;
|
||||
GLmethod.drawArrays = i++;
|
||||
GLmethod.drawArraysInstancedANGLE = i++;
|
||||
GLmethod.drawElements = i++;
|
||||
GLmethod.drawElementsInstancedANGLE = i++;
|
||||
GLmethod.enable = i++;
|
||||
GLmethod.enableVertexAttribArray = i++; //50
|
||||
GLmethod.flush = i++;
|
||||
GLmethod.framebufferRenderbuffer = i++;
|
||||
GLmethod.framebufferTexture2D = i++;
|
||||
GLmethod.frontFace = i++;
|
||||
GLmethod.generateMipmap = i++;
|
||||
GLmethod.getActiveAttrib = i++;
|
||||
GLmethod.getActiveUniform = i++;
|
||||
GLmethod.getAttachedShaders = i++;
|
||||
GLmethod.getAttribLocation = i++;
|
||||
GLmethod.getBufferParameter = i++; //60
|
||||
GLmethod.getContextAttributes = i++;
|
||||
GLmethod.getError = i++;
|
||||
GLmethod.getExtension = i++;
|
||||
GLmethod.getFramebufferAttachmentParameter = i++;
|
||||
GLmethod.getParameter = i++;
|
||||
GLmethod.getProgramInfoLog = i++;
|
||||
GLmethod.getProgramParameter = i++;
|
||||
GLmethod.getRenderbufferParameter = i++;
|
||||
GLmethod.getShaderInfoLog = i++;
|
||||
GLmethod.getShaderParameter = i++; //70
|
||||
GLmethod.getShaderPrecisionFormat = i++;
|
||||
GLmethod.getShaderSource = i++;
|
||||
GLmethod.getSupportedExtensions = i++;
|
||||
GLmethod.getTexParameter = i++;
|
||||
GLmethod.getUniform = i++;
|
||||
GLmethod.getUniformLocation = i++;
|
||||
GLmethod.getVertexAttrib = i++;
|
||||
GLmethod.getVertexAttribOffset = i++;
|
||||
GLmethod.isBuffer = i++;
|
||||
GLmethod.isContextLost = i++; //80
|
||||
GLmethod.isEnabled = i++;
|
||||
GLmethod.isFramebuffer = i++;
|
||||
GLmethod.isProgram = i++;
|
||||
GLmethod.isRenderbuffer = i++;
|
||||
GLmethod.isShader = i++;
|
||||
GLmethod.isTexture = i++;
|
||||
GLmethod.lineWidth = i++;
|
||||
GLmethod.linkProgram = i++;
|
||||
GLmethod.pixelStorei = i++;
|
||||
GLmethod.polygonOffset = i++; //90
|
||||
GLmethod.readPixels = i++;
|
||||
GLmethod.renderbufferStorage = i++;
|
||||
GLmethod.sampleCoverage = i++;
|
||||
GLmethod.scissor = i++;
|
||||
GLmethod.shaderSource = i++;
|
||||
GLmethod.stencilFunc = i++;
|
||||
GLmethod.stencilFuncSeparate = i++;
|
||||
GLmethod.stencilMask = i++;
|
||||
GLmethod.stencilMaskSeparate = i++;
|
||||
GLmethod.stencilOp = i++; //100
|
||||
GLmethod.stencilOpSeparate = i++;
|
||||
GLmethod.texImage2D = i++;
|
||||
GLmethod.texParameterf = i++;
|
||||
GLmethod.texParameteri = i++;
|
||||
GLmethod.texSubImage2D = i++;
|
||||
GLmethod.uniform1f = i++;
|
||||
GLmethod.uniform1fv = i++;
|
||||
GLmethod.uniform1i = i++;
|
||||
GLmethod.uniform1iv = i++;
|
||||
GLmethod.uniform2f = i++; //110
|
||||
GLmethod.uniform2fv = i++;
|
||||
GLmethod.uniform2i = i++;
|
||||
GLmethod.uniform2iv = i++;
|
||||
GLmethod.uniform3f = i++;
|
||||
GLmethod.uniform3fv = i++;
|
||||
GLmethod.uniform3i = i++;
|
||||
GLmethod.uniform3iv = i++;
|
||||
GLmethod.uniform4f = i++;
|
||||
GLmethod.uniform4fv = i++;
|
||||
GLmethod.uniform4i = i++; //120
|
||||
GLmethod.uniform4iv = i++;
|
||||
GLmethod.uniformMatrix2fv = i++;
|
||||
GLmethod.uniformMatrix3fv = i++;
|
||||
GLmethod.uniformMatrix4fv = i++;
|
||||
GLmethod.useProgram = i++;
|
||||
GLmethod.validateProgram = i++;
|
||||
GLmethod.vertexAttrib1f = i++; //new
|
||||
GLmethod.vertexAttrib2f = i++; //new
|
||||
GLmethod.vertexAttrib3f = i++; //new
|
||||
GLmethod.vertexAttrib4f = i++; //new //130
|
||||
GLmethod.vertexAttrib1fv = i++; //new
|
||||
GLmethod.vertexAttrib2fv = i++; //new
|
||||
GLmethod.vertexAttrib3fv = i++; //new
|
||||
GLmethod.vertexAttrib4fv = i++; //new
|
||||
GLmethod.vertexAttribPointer = i++;
|
||||
GLmethod.viewport = i++;
|
||||
|
||||
export default GLmethod;
|
@ -0,0 +1,23 @@
|
||||
const GLtype = {};
|
||||
|
||||
[
|
||||
"GLbitfield",
|
||||
"GLboolean",
|
||||
"GLbyte",
|
||||
"GLclampf",
|
||||
"GLenum",
|
||||
"GLfloat",
|
||||
"GLint",
|
||||
"GLintptr",
|
||||
"GLsizei",
|
||||
"GLsizeiptr",
|
||||
"GLshort",
|
||||
"GLubyte",
|
||||
"GLuint",
|
||||
"GLushort"
|
||||
].sort().map((typeName, i) => GLtype[typeName] = 1 >> (i + 1));
|
||||
|
||||
export default GLtype;
|
||||
|
||||
|
||||
|
@ -0,0 +1,21 @@
|
||||
import {getTransferedObjectUUID} from './classUtils';
|
||||
|
||||
const name = 'WebGLProgram';
|
||||
|
||||
function uuid(id) {
|
||||
return getTransferedObjectUUID(name, id);
|
||||
}
|
||||
|
||||
export default class WebGLProgram {
|
||||
className = name;
|
||||
|
||||
constructor(id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
static uuid = uuid;
|
||||
|
||||
uuid() {
|
||||
return uuid(this.id);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
import {getTransferedObjectUUID} from './classUtils';
|
||||
|
||||
const name = 'WebGLRenderBuffer';
|
||||
|
||||
function uuid(id) {
|
||||
return getTransferedObjectUUID(name, id);
|
||||
}
|
||||
|
||||
export default class WebGLRenderbuffer {
|
||||
className = name;
|
||||
|
||||
constructor(id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
static uuid = uuid;
|
||||
|
||||
uuid() {
|
||||
return uuid(this.id);
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
import {getTransferedObjectUUID} from './classUtils';
|
||||
|
||||
const name = 'WebGLShader';
|
||||
|
||||
function uuid(id) {
|
||||
return getTransferedObjectUUID(name, id);
|
||||
}
|
||||
|
||||
export default class WebGLShader {
|
||||
className = name;
|
||||
|
||||
constructor(id, type) {
|
||||
this.id = id;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
static uuid = uuid;
|
||||
|
||||
uuid() {
|
||||
return uuid(this.id);
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
export default class WebGLShaderPrecisionFormat {
|
||||
className = 'WebGLShaderPrecisionFormat';
|
||||
|
||||
constructor({
|
||||
rangeMin, rangeMax, precision
|
||||
}) {
|
||||
this.rangeMin = rangeMin;
|
||||
this.rangeMax = rangeMax;
|
||||
this.precision = precision;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
import {getTransferedObjectUUID} from './classUtils';
|
||||
|
||||
const name = 'WebGLTexture';
|
||||
|
||||
function uuid(id) {
|
||||
return getTransferedObjectUUID(name, id);
|
||||
}
|
||||
|
||||
export default class WebGLTexture {
|
||||
className = name;
|
||||
|
||||
constructor(id, type) {
|
||||
this.id = id;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
static uuid = uuid;
|
||||
|
||||
uuid() {
|
||||
return uuid(this.id);
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
import {getTransferedObjectUUID} from './classUtils';
|
||||
|
||||
const name = 'WebGLUniformLocation';
|
||||
|
||||
function uuid(id) {
|
||||
return getTransferedObjectUUID(name, id);
|
||||
}
|
||||
|
||||
export default class WebGLUniformLocation {
|
||||
className = name;
|
||||
|
||||
constructor(id, type) {
|
||||
this.id = id;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
static uuid = uuid;
|
||||
|
||||
uuid() {
|
||||
return uuid(this.id);
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
export function getTransferedObjectUUID(name, id) {
|
||||
return `${name.toLowerCase()}-${id}`;
|
||||
}
|
74
uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/env/canvas.js
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
import GContext2D from '../context-2d/RenderingContext';
|
||||
import GContextWebGL from '../context-webgl/RenderingContext';
|
||||
|
||||
export default class GCanvas {
|
||||
|
||||
// static GBridge = null;
|
||||
|
||||
id = null;
|
||||
|
||||
_needRender = true;
|
||||
|
||||
constructor(id, { disableAutoSwap }) {
|
||||
this.id = id;
|
||||
|
||||
this._disableAutoSwap = disableAutoSwap;
|
||||
if (disableAutoSwap) {
|
||||
this._swapBuffers = () => {
|
||||
GCanvas.GBridge.render(this.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getContext(type) {
|
||||
|
||||
let context = null;
|
||||
|
||||
if (type.match(/webgl/i)) {
|
||||
context = new GContextWebGL(this);
|
||||
|
||||
context.componentId = this.id;
|
||||
|
||||
if (!this._disableAutoSwap) {
|
||||
const render = () => {
|
||||
if (this._needRender) {
|
||||
GCanvas.GBridge.render(this.id);
|
||||
this._needRender = false;
|
||||
}
|
||||
}
|
||||
setInterval(render, 16);
|
||||
}
|
||||
|
||||
GCanvas.GBridge.callSetContextType(this.id, 1); // 0 for 2d; 1 for webgl
|
||||
} else if (type.match(/2d/i)) {
|
||||
context = new GContext2D(this);
|
||||
|
||||
context.componentId = this.id;
|
||||
|
||||
// const render = ( callback ) => {
|
||||
//
|
||||
// const commands = context._drawCommands;
|
||||
// context._drawCommands = '';
|
||||
//
|
||||
// GCanvas.GBridge.render2d(this.id, commands, callback);
|
||||
// this._needRender = false;
|
||||
// }
|
||||
// //draw方法触发
|
||||
// context._flush = render;
|
||||
// //setInterval(render, 16);
|
||||
|
||||
GCanvas.GBridge.callSetContextType(this.id, 0);
|
||||
} else {
|
||||
throw new Error('not supported context ' + type);
|
||||
}
|
||||
|
||||
return context;
|
||||
|
||||
}
|
||||
|
||||
reset() {
|
||||
GCanvas.GBridge.callReset(this.id);
|
||||
}
|
||||
|
||||
|
||||
}
|
96
uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/env/image.js
vendored
Normal file
@ -0,0 +1,96 @@
|
||||
let incId = 1;
|
||||
|
||||
const noop = function () { };
|
||||
|
||||
class GImage {
|
||||
|
||||
static GBridge = null;
|
||||
|
||||
constructor() {
|
||||
this._id = incId++;
|
||||
this._width = 0;
|
||||
this._height = 0;
|
||||
this._src = undefined;
|
||||
this._onload = noop;
|
||||
this._onerror = noop;
|
||||
this.complete = false;
|
||||
}
|
||||
|
||||
get width() {
|
||||
return this._width;
|
||||
}
|
||||
set width(v) {
|
||||
this._width = v;
|
||||
}
|
||||
|
||||
get height() {
|
||||
return this._height;
|
||||
}
|
||||
|
||||
set height(v) {
|
||||
this._height = v;
|
||||
}
|
||||
|
||||
get src() {
|
||||
return this._src;
|
||||
}
|
||||
|
||||
set src(v) {
|
||||
|
||||
if (v.startsWith('//')) {
|
||||
v = 'http:' + v;
|
||||
}
|
||||
|
||||
this._src = v;
|
||||
|
||||
GImage.GBridge.perloadImage([this._src, this._id], (data) => {
|
||||
if (typeof data === 'string') {
|
||||
data = JSON.parse(data);
|
||||
}
|
||||
if (data.error) {
|
||||
var evt = { type: 'error', target: this };
|
||||
this.onerror(evt);
|
||||
} else {
|
||||
this.complete = true;
|
||||
this.width = typeof data.width === 'number' ? data.width : 0;
|
||||
this.height = typeof data.height === 'number' ? data.height : 0;
|
||||
var evt = { type: 'load', target: this };
|
||||
this.onload(evt);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
addEventListener(name, listener) {
|
||||
if (name === 'load') {
|
||||
this.onload = listener;
|
||||
} else if (name === 'error') {
|
||||
this.onerror = listener;
|
||||
}
|
||||
}
|
||||
|
||||
removeEventListener(name, listener) {
|
||||
if (name === 'load') {
|
||||
this.onload = noop;
|
||||
} else if (name === 'error') {
|
||||
this.onerror = noop;
|
||||
}
|
||||
}
|
||||
|
||||
get onload() {
|
||||
return this._onload;
|
||||
}
|
||||
|
||||
set onload(v) {
|
||||
this._onload = v;
|
||||
}
|
||||
|
||||
get onerror() {
|
||||
return this._onerror;
|
||||
}
|
||||
|
||||
set onerror(v) {
|
||||
this._onerror = v;
|
||||
}
|
||||
}
|
||||
|
||||
export default GImage;
|
24
uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/env/tool.js
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
|
||||
export function ArrayBufferToBase64 (buffer) {
|
||||
var binary = '';
|
||||
var bytes = new Uint8ClampedArray(buffer);
|
||||
for (var len = bytes.byteLength, i = 0; i < len; i++) {
|
||||
binary += String.fromCharCode(bytes[i]);
|
||||
}
|
||||
return btoa(binary);
|
||||
}
|
||||
|
||||
export function Base64ToUint8ClampedArray(base64String) {
|
||||
const padding = '='.repeat((4 - base64String.length % 4) % 4);
|
||||
const base64 = (base64String + padding)
|
||||
.replace(/\-/g, '+')
|
||||
.replace(/_/g, '/');
|
||||
|
||||
const rawData = atob(base64);
|
||||
const outputArray = new Uint8ClampedArray(rawData.length);
|
||||
|
||||
for (let i = 0; i < rawData.length; ++i) {
|
||||
outputArray[i] = rawData.charCodeAt(i);
|
||||
}
|
||||
return outputArray;
|
||||
}
|
39
uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/index.js
Normal file
@ -0,0 +1,39 @@
|
||||
import GCanvas from './env/canvas';
|
||||
import GImage from './env/image';
|
||||
|
||||
import GWebGLRenderingContext from './context-webgl/RenderingContext';
|
||||
import GContext2D from './context-2d/RenderingContext';
|
||||
|
||||
import GBridgeWeex from './bridge/bridge-weex';
|
||||
|
||||
export let Image = GImage;
|
||||
|
||||
export let WeexBridge = GBridgeWeex;
|
||||
|
||||
export function enable(el, { bridge, debug, disableAutoSwap, disableComboCommands } = {}) {
|
||||
|
||||
const GBridge = GImage.GBridge = GCanvas.GBridge = GWebGLRenderingContext.GBridge = GContext2D.GBridge = bridge;
|
||||
|
||||
GBridge.callEnable(el.ref, [
|
||||
0, // renderMode: 0--RENDERMODE_WHEN_DIRTY, 1--RENDERMODE_CONTINUOUSLY
|
||||
-1, // hybridLayerType: 0--LAYER_TYPE_NONE 1--LAYER_TYPE_SOFTWARE 2--LAYER_TYPE_HARDWARE
|
||||
false, // supportScroll
|
||||
false, // newCanvasMode
|
||||
1, // compatible
|
||||
'white',// clearColor
|
||||
false // sameLevel: newCanvasMode = true && true => GCanvasView and Webview is same level
|
||||
]);
|
||||
|
||||
if (debug === true) {
|
||||
GBridge.callEnableDebug();
|
||||
}
|
||||
if (disableComboCommands) {
|
||||
GBridge.callEnableDisableCombo();
|
||||
}
|
||||
|
||||
var canvas = new GCanvas(el.ref, { disableAutoSwap });
|
||||
canvas.width = el.style.width;
|
||||
canvas.height = el.style.height;
|
||||
|
||||
return canvas;
|
||||
};
|
34
uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js
Normal file
80
uni_modules/Sansnn-uQRCode/package.json
Normal file
@ -0,0 +1,80 @@
|
||||
{
|
||||
"id": "Sansnn-uQRCode",
|
||||
"displayName": "uQRCode 全端二维码生成插件 支持nvue 支持nodejs服务端",
|
||||
"version": "4.0.6",
|
||||
"description": "uQRCode是一款基于Javascript环境开发的二维码生成插件,适用所有Javascript运行环境的前端应用和Node.js。",
|
||||
"keywords": [
|
||||
"二维码",
|
||||
"uQRCode",
|
||||
"qrcode",
|
||||
"qr"
|
||||
],
|
||||
"repository": "https://github.com/Sansnn/uQRCode",
|
||||
"engines": {
|
||||
"HBuilderX": "^3.1.0"
|
||||
},
|
||||
"dcloudext": {
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "0.00"
|
||||
},
|
||||
"sourcecode": {
|
||||
"price": "0.00"
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"qq": ""
|
||||
},
|
||||
"declaration": {
|
||||
"ads": "无",
|
||||
"data": "无",
|
||||
"permissions": "无"
|
||||
},
|
||||
"npmurl": "https://www.npmjs.com/package/uqrcodejs",
|
||||
"type": "sdk-js"
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": [],
|
||||
"encrypt": [],
|
||||
"platforms": {
|
||||
"cloud": {
|
||||
"tcb": "y",
|
||||
"aliyun": "y"
|
||||
},
|
||||
"client": {
|
||||
"App": {
|
||||
"app-vue": "y",
|
||||
"app-nvue": "y"
|
||||
},
|
||||
"H5-mobile": {
|
||||
"Safari": "y",
|
||||
"Android Browser": "y",
|
||||
"微信浏览器(Android)": "y",
|
||||
"QQ浏览器(Android)": "y"
|
||||
},
|
||||
"H5-pc": {
|
||||
"Chrome": "y",
|
||||
"IE": "y",
|
||||
"Edge": "y",
|
||||
"Firefox": "y",
|
||||
"Safari": "y"
|
||||
},
|
||||
"小程序": {
|
||||
"微信": "y",
|
||||
"阿里": "y",
|
||||
"百度": "y",
|
||||
"字节跳动": "y",
|
||||
"QQ": "y"
|
||||
},
|
||||
"快应用": {
|
||||
"华为": "y",
|
||||
"联盟": "y"
|
||||
},
|
||||
"Vue": {
|
||||
"vue2": "y",
|
||||
"vue3": "y"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
BIN
unpackage/cache/apk/__UNI__7A6878C_cm.apk
vendored
2
unpackage/cache/apk/apkurl
vendored
@ -1 +1 @@
|
||||
https://app.liuyingyong.cn/build/download/94e2aec0-0ac4-11ef-a1c7-bfa0bf970815
|
||||
https://app.liuyingyong.cn/build/download/e3403020-1d59-11ef-bb95-8793a925e952
|
2
unpackage/cache/apk/cmManifestCache.json
vendored
@ -1 +1 @@
|
||||
b1kWame9yBmby5SJKXZdMiBIfIZ7jYUx3ZnXt20I8klef9B7ZTIAFKtSJZT7FZLkmhXQ6560DbezDEaudat531dNYvv/7RXU9TXmchz6WNybEXw/ReEdMLzCt6EPgKnCeOzzaF1SYtWZg1J0mI2q5L99qv37RykHQ+a5kHpj/t+6ImUegzn/DCg+gyVL2HCDaDlRKe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LZPruRl/Gfvl/w/22TN7otjKY0XO7Sh/S0XbIv5Lp9pbgxuqjaFphfO+r8Aj2PRpR5UazD4JFXbGh10APS5EQlTVcdSCi6Nw4m6ii28nG9NdLk11AEvqSCi2iwjwl7W2uYgIbRozaoXRcGtrzvrqZ7v/kugIBTzXKQIqq+gWNQ/iCwLBXKKQrb4RqXrG9EsKIHkMBmXjODR3EbMwSfNkd2Q/Wloh+deCKy41HV1cnRphTGbbuAOCOj0VQF+f0CJEW1PInwexUonGmzLSHxbO1p2edpWw6a38MW4rO/BSL6oQWmc4Hm7qxUaeJFPHM+wnbtpIl8HFPV6aCq6JWBo8pf4WixJUAIA4JUqnZLFtc83l5TxCxhdVyNkWwR0kGM4ErZh0oF+FnYAXaYNvX5rmk3abw2gcFhHyjai+rhgwOx1VeppwmX9AsU0VvvurLprozkPdcvBIcBHhHm78zrBHWhwvFMTRnfLLvfx8WDoifxJlvHdGuUoU3Spp6lF0srjas4W90Ewzfgr28e2TdcDTa2rpM0BZTGWZcL5js
|
2
unpackage/cache/certdata
vendored
@ -1,3 +1,3 @@
|
||||
andrCertfile=D:/Soft软件安装器/soft/HBuilderX/plugins/app-safe-pack/Test.keystore
|
||||
andrCertfile=D:/前端/软件/1954-2020-07-22033532-1595360132222/HBuilderX/plugins/app-safe-pack/Test.keystore
|
||||
andrCertAlias=android
|
||||
andrCertPass=ep/Tdjka4Y7WYqDB6/S7dw==
|
||||
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 35 KiB |
@ -1,8 +1,8 @@
|
||||
|
||||
var isReady=false;var onReadyCallbacks=[];
|
||||
var isServiceReady=false;var onServiceReadyCallbacks=[];
|
||||
var __uniConfig = {"pages":["pages/login/loginSms","pages/teacher/index","pages/teacher/ActiveList","pages/teacher/setUp","pages/teacher/ManageList","pages/teacher/orderManage","pages/teacher/StudentManagement","pages/index/index","pages/index/ManageList","pages/index/Details","pages/index/orderManage","pages/index/orderDetails","pages/index/cadetManage","pages/index/cadetDetails","pages/index/CoachManage","pages/index/CoachDetails","pages/index/addCoach","pages/index/courseManage","pages/index/coachSelect","pages/index/CourseEditing","pages/index/SchoolEditor"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"管理端","navigationBarBackgroundColor":"#fff","backgroundColor":"#F8F8F8"},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"驾校管理","compilerVersion":"4.08","entryPagePath":"pages/login/loginSms","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
|
||||
var __uniRoutes = [{"path":"/pages/login/loginSms","meta":{"isQuit":true},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":""}},{"path":"/pages/teacher/index","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"教练端"}},{"path":"/pages/teacher/ActiveList","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"最近活跃"}},{"path":"/pages/teacher/setUp","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"个人信息"}},{"path":"/pages/teacher/ManageList","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"预约记录"}},{"path":"/pages/teacher/orderManage","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"账单管理"}},{"path":"/pages/teacher/StudentManagement","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"学生管理"}},{"path":"/pages/index/index","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"管理端"}},{"path":"/pages/index/ManageList","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"预约管理"}},{"path":"/pages/index/Details","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"预约详情"}},{"path":"/pages/index/orderManage","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"订单管理"}},{"path":"/pages/index/orderDetails","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"订单详情"}},{"path":"/pages/index/cadetManage","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"学员管理"}},{"path":"/pages/index/cadetDetails","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"学员详情"}},{"path":"/pages/index/CoachManage","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"教练管理"}},{"path":"/pages/index/CoachDetails","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"教练详情"}},{"path":"/pages/index/addCoach","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"添加课程"}},{"path":"/pages/index/courseManage","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"课程管理"}},{"path":"/pages/index/coachSelect","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"选择教练"}},{"path":"/pages/index/CourseEditing","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"课程编辑"}},{"path":"/pages/index/SchoolEditor","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"驾校编辑"}}];
|
||||
var __uniConfig = {"pages":["pages/login/loginSms","pages/teacher/index","pages/teacher/ActiveList","pages/teacher/setUp","pages/teacher/ManageList","pages/teacher/orderManage","pages/teacher/StudentManagement","pages/teacher/Addrc","pages/teacher/jglist","pages/teacher/jgDetail","pages/index/index","pages/index/ManageList","pages/index/Details","pages/index/orderManage","pages/index/orderDetails","pages/index/cadetManage","pages/index/cadetDetails","pages/index/CoachManage","pages/index/CoachDetails","pages/index/addCoach","pages/index/courseManage","pages/index/coachSelect","pages/index/CourseEditing","pages/index/SchoolEditor","pages/viewCode/viewCode"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"管理端","navigationBarBackgroundColor":"#fff","backgroundColor":"#F8F8F8"},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"驾校管理","compilerVersion":"4.15","entryPagePath":"pages/login/loginSms","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
|
||||
var __uniRoutes = [{"path":"/pages/login/loginSms","meta":{"isQuit":true},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":""}},{"path":"/pages/teacher/index","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"教练端"}},{"path":"/pages/teacher/ActiveList","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"最近活跃"}},{"path":"/pages/teacher/setUp","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"个人信息"}},{"path":"/pages/teacher/ManageList","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"预约记录"}},{"path":"/pages/teacher/orderManage","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"收益管理"}},{"path":"/pages/teacher/StudentManagement","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"学生管理"}},{"path":"/pages/teacher/Addrc","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"工作日志"}},{"path":"/pages/teacher/jglist","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"监管通知"}},{"path":"/pages/teacher/jgDetail","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"监管详情"}},{"path":"/pages/index/index","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"管理端"}},{"path":"/pages/index/ManageList","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"预约管理"}},{"path":"/pages/index/Details","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"预约详情"}},{"path":"/pages/index/orderManage","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"订单管理"}},{"path":"/pages/index/orderDetails","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"订单详情"}},{"path":"/pages/index/cadetManage","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"学员管理"}},{"path":"/pages/index/cadetDetails","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"学员详情"}},{"path":"/pages/index/CoachManage","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"教练管理"}},{"path":"/pages/index/CoachDetails","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"教练详情"}},{"path":"/pages/index/addCoach","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"添加课程"}},{"path":"/pages/index/courseManage","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"课程管理"}},{"path":"/pages/index/coachSelect","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"选择教练"}},{"path":"/pages/index/CourseEditing","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"课程编辑"}},{"path":"/pages/index/SchoolEditor","meta":{},"window":{"enablePullDownRefresh":true,"navigationBarTitleText":"驾校编辑"}},{"path":"/pages/viewCode/viewCode","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}}];
|
||||
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});
|
||||
|
@ -1 +1 @@
|
||||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__7A6878C","name":"驾校管理","version":{"name":"1.0.0","code":"100"},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":true,"delay":0,"target":"id:1","waiting":true},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#fff"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"icon-android-hdpi.png","xhdpi":"icon-android-xhdpi.png","xxhdpi":"icon-android-xxhdpi.png","xxxhdpi":"icon-android-xxxhdpi.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"},"prerendered":"false"}},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"packagename":"uni.UNI7A6878C","custompermissions":true},"apple":{"dSYMs":false,"devices":"universal"},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}},"orientation":"portrait-primary"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"4.08","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"launch_path":"__uniappview.html","adid":"120714020812"}}
|
||||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__7A6878C","name":"驾校管理","version":{"name":"1.0.0","code":"100"},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":true,"delay":0,"target":"id:1","waiting":true},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#fff"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"icon-android-hdpi.png","xhdpi":"icon-android-xhdpi.png","xxhdpi":"icon-android-xxhdpi.png","xxxhdpi":"icon-android-xxxhdpi.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"},"prerendered":"false"}},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"packagename":"uni.UNI7A6878C","custompermissions":true},"apple":{"dSYMs":false,"devices":"universal"},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}},"orientation":"portrait-primary"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"4.15","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"launch_path":"__uniappview.html","adid":"120714020812"}}
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 21 KiB |
BIN
unpackage/cache/wgt/__UNI__7A6878C/static/imgs/rwm.png
vendored
Normal file
After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 424 KiB After Width: | Height: | Size: 379 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 12 KiB |