Compare commits
17 Commits
main
...
feature-ta
Author | SHA1 | Date | |
---|---|---|---|
![]() |
545d4cb0fa | ||
![]() |
9b283de926 | ||
![]() |
80e26dc7de | ||
![]() |
325018a82e | ||
![]() |
dbe16b4dee | ||
![]() |
0d4530e162 | ||
![]() |
3c01f56304 | ||
![]() |
b42cb5a8ce | ||
![]() |
7b55a4ca99 | ||
![]() |
6fd167e72b | ||
![]() |
c7896e567b | ||
![]() |
5937dc9402 | ||
![]() |
62287bf07a | ||
![]() |
4a213dc890 | ||
![]() |
58f21be6f3 | ||
![]() |
439a2ce678 | ||
![]() |
cc884926cd |
2
App.vue
@ -101,7 +101,7 @@
|
|||||||
if (res.notificationEventType == 'notificationOpened') return
|
if (res.notificationEventType == 'notificationOpened') return
|
||||||
audioContext.play()
|
audioContext.play()
|
||||||
uni.vibrateLong();
|
uni.vibrateLong();
|
||||||
console.log("app的监听")
|
// console.log("app的监听")
|
||||||
})
|
})
|
||||||
// #endif
|
// #endif
|
||||||
console.log('App Show')
|
console.log('App Show')
|
||||||
|
37
api/enroll.js
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import oahttp from "@/utils/pubblicHttp.js";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取市
|
||||||
|
*/
|
||||||
|
export const commonCity = (data) => oahttp.get('/common/city', data)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取省
|
||||||
|
*/
|
||||||
|
export const commonProvince = (data) => oahttp.get('/common/province', data)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取区县
|
||||||
|
*/
|
||||||
|
export const commonArea = (data) => oahttp.get('/common/area', data)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取城镇
|
||||||
|
*/
|
||||||
|
export const commonStreet = (data) => oahttp.get('/common/street', data)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取村
|
||||||
|
*/
|
||||||
|
export const commonVillage = (data) => oahttp.get('/common/village', data)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取小队
|
||||||
|
*/
|
||||||
|
export const commonBrigade = (data) => oahttp.get('/common/brigade', data)
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册
|
||||||
|
*/
|
||||||
|
export const register = (data) => oahttp.post('/new.user/register', data)
|
10
api/newTask.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import oahttp from "@/utils/oahttp.js";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公告列表
|
||||||
|
*/
|
||||||
|
export const getTradeTaskInfo = (data) => oahttp.get('/user/getTradeTaskInfo', data)
|
||||||
|
// 收单消费金额详情
|
||||||
|
export const getFirstOrderLog = (data) => oahttp.get('/user/getFirstOrderLog', data)
|
||||||
|
// 收益明细
|
||||||
|
export const account_log = (data) => oahttp.get('/account_log/lists', data)
|
@ -3,12 +3,17 @@ import oahttp from "@/utils/oahttp.js";
|
|||||||
/**
|
/**
|
||||||
* 登录
|
* 登录
|
||||||
*/
|
*/
|
||||||
export const loginAccount = (data, onReLogin = false) => oahttp.post('/login/account', data, { noAuth: true, onReLogin: onReLogin })
|
export const loginAccount = (data, onReLogin = false) => oahttp.post('/login/account', data, {
|
||||||
|
noAuth: true,
|
||||||
|
onReLogin: onReLogin
|
||||||
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cesi
|
* cesi
|
||||||
*/
|
*/
|
||||||
export const test = (data) => oahttp.post('/index/config', data, { noAuth: true })
|
export const test = (data) => oahttp.post('/index/config', data, {
|
||||||
|
noAuth: true
|
||||||
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 个人中心
|
* 个人中心
|
||||||
@ -68,9 +73,13 @@ export const destroyAccount = (data) => oahttp.post('/user/destroy_account', dat
|
|||||||
/**
|
/**
|
||||||
* 商城登录
|
* 商城登录
|
||||||
*/
|
*/
|
||||||
export const loginShopAccount = (data) => oahttp.post('/login/shop_account', data, { noAuth: true })
|
export const loginShopAccount = (data) => oahttp.post('/login/shop_account', data, {
|
||||||
|
noAuth: true
|
||||||
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 中台登录
|
* 中台登录
|
||||||
*/
|
*/
|
||||||
export const loginParseToken = (data) => oahttp.post('/login/parseToken', data, { noAuth: true })
|
export const loginParseToken = (data) => oahttp.post('/login/parseToken', data, {
|
||||||
|
noAuth: true
|
||||||
|
})
|
0
api/register.js
Normal file
10
api/task.js
@ -113,3 +113,13 @@ export const commit_town_master_task_type_7API = (data) => oahttp.post('/task/co
|
|||||||
*/
|
*/
|
||||||
export const commit_town_master_task_type_8API = (data) => oahttp.post('/task/commit_town_master_task_type_8',
|
export const commit_town_master_task_type_8API = (data) => oahttp.post('/task/commit_town_master_task_type_8',
|
||||||
data)
|
data)
|
||||||
|
|
||||||
|
/* 新供销首页任务列表*/
|
||||||
|
/**
|
||||||
|
* 应用软件推广
|
||||||
|
*/
|
||||||
|
export const taskListApi = (data) => oahttp.get('/task/taskList',
|
||||||
|
data)
|
||||||
|
|
||||||
|
|
||||||
|
// api / task / taskList
|
6
api/test.js
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import oahttp from "@/utils/oahttp.js";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务列表
|
||||||
|
*/
|
||||||
|
export const addUserInfo = (data) => oahttp.post('/index/addVillagerInfo', data)
|
@ -3,7 +3,8 @@
|
|||||||
<!-- <view class="title">地区信息</view> -->
|
<!-- <view class="title">地区信息</view> -->
|
||||||
|
|
||||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="districtForm">
|
<u--form labelPosition="left" :model="formData" :rules="rules" ref="districtForm">
|
||||||
<u-form-item label="地址" :required="!readonly" prop="street" @click="changeCity('street', true)" borderBottom>
|
<u-form-item label="地址" :required="!readonly" prop="street" @click="changeCity('street', true)"
|
||||||
|
borderBottom>
|
||||||
<u--textarea :value="nowAddress" autoHeight readonly disabled></u--textarea>
|
<u--textarea :value="nowAddress" autoHeight readonly disabled></u--textarea>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item v-if="!formDataRead.street" label="乡镇" :required="!readonly" prop="street"
|
<u-form-item v-if="!formDataRead.street" label="乡镇" :required="!readonly" prop="street"
|
||||||
@ -17,8 +18,10 @@
|
|||||||
placeholder="请选择村"></u--input>
|
placeholder="请选择村"></u--input>
|
||||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item v-if="$store.state.app.userInfo.company.company_type==18" label="小队" :required="!readonly" prop="brigade" @click="changeCity('brigade')" borderBottom>
|
<u-form-item v-if="$store.state.app.userInfo.company.company_type==18" label="小队" :required="!readonly"
|
||||||
<u--input :value="formDataText.brigade" style="pointer-events: none;" disabled disabledColor="#fff" placeholder="请选择小队"></u--input>
|
prop="brigade" @click="changeCity('brigade')" borderBottom>
|
||||||
|
<u--input :value="formDataText.brigade" style="pointer-events: none;" disabled disabledColor="#fff"
|
||||||
|
placeholder="请选择小队"></u--input>
|
||||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</u--form>
|
</u--form>
|
||||||
@ -125,6 +128,7 @@
|
|||||||
} else {
|
} else {
|
||||||
this.rules = {};
|
this.rules = {};
|
||||||
}
|
}
|
||||||
|
this.commonProvince()
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
nowAddress() {
|
nowAddress() {
|
||||||
@ -163,11 +167,11 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 选择城市
|
// 选择城市
|
||||||
changeCity(type, toast=false) {
|
changeCity(type, toast = false) {
|
||||||
if(toast) return Toast('不可修改该区域')
|
if (toast) return Toast('不可修改该区域')
|
||||||
if (this.$props.readonly) return ;
|
if (this.$props.readonly) return;
|
||||||
if (this[type + 'List'].length == 0) {
|
if (this[type + 'List'].length == 0) {
|
||||||
if(type=='brigade') return Toast('小队已经建立完毕');
|
if (type == 'brigade') return Toast('小队已经建立完毕');
|
||||||
return Toast('请先选择上一级地区');
|
return Toast('请先选择上一级地区');
|
||||||
}
|
}
|
||||||
this.changeType = type;
|
this.changeType = type;
|
||||||
@ -236,14 +240,14 @@
|
|||||||
brigade: code
|
brigade: code
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
// 过滤掉不能选择的小队,只能选择本公司负责的小队
|
// 过滤掉不能选择的小队,只能选择本公司负责的小队
|
||||||
let f_arr = this.$store.state.app.userInfo.company?.responsible_area?.split(',')||[];
|
let f_arr = this.$store.state.app.userInfo.company?.responsible_area?.split(',') || [];
|
||||||
this.brigadeList = res.data.filter(item=>{
|
this.brigadeList = res.data.filter(item => {
|
||||||
return f_arr.find(t=>item.id==t);
|
return f_arr.find(t => item.id == t);
|
||||||
});
|
});
|
||||||
// 过滤掉公司已经创建的小队
|
// 过滤掉公司已经创建的小队
|
||||||
userCompanyBrigade().then((e)=>{
|
userCompanyBrigade().then((e) => {
|
||||||
this.brigadeList = this.brigadeList.filter(item=>{
|
this.brigadeList = this.brigadeList.filter(item => {
|
||||||
return !e.data.find(t=>t==item.id);
|
return !e.data.find(t => t == item.id);
|
||||||
})
|
})
|
||||||
this.formData.brigade = '';
|
this.formData.brigade = '';
|
||||||
this.formDataRead.brigade = '';
|
this.formDataRead.brigade = '';
|
||||||
|
@ -1,13 +1,40 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="card">
|
<view class="card" @click.stop="goDetil(goodsInfo.id)">
|
||||||
<view class="tit" @click.stop="goDetil(goodsInfo.id)">
|
<view class="title">
|
||||||
<view v-if="goodsInfo.status==0">取货点: {{goodsInfo.shop_name}}</view>
|
<!-- <view v-if="goodsInfo.status==0">取货点: {{goodsInfo.shop_name}}</view>
|
||||||
<view v-else>收货人: {{ fuzzyName(goodsInfo.receiver_name) }}</view>
|
<view v-else>收货人: {{ fuzzyName(goodsInfo.receiver_name) }}</view>
|
||||||
<view style="float: right;">
|
<view style="float: right;">
|
||||||
<u-icon name="arrow-right" color="black" size="20"></u-icon>
|
<u-icon name="arrow-right" color="black" size="20"></u-icon>
|
||||||
|
</view> -->
|
||||||
|
<view>订单编号: {{goodsInfo.order_sn}}</view>
|
||||||
|
<view class='status' :style="{color:goodsInfo.status==0?'#2B63E3':goodsInfo.status==2?'#47BE62':'#FF8056'}">
|
||||||
|
{{goodsInfo.status==0?"待取货":goodsInfo.status==2? "已完成": "待配送"}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content" @click.stop="goDetil(goodsInfo.id)">
|
<view class="content">
|
||||||
|
<view class="">
|
||||||
|
<text class="logo">取</text> <text class='shop-address'>{{goodsInfo.shop_name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="detail-address">
|
||||||
|
{{goodsInfo.shop_address}}
|
||||||
|
</view>
|
||||||
|
<view class="" style="margin-top: 20rpx;">
|
||||||
|
<text class="logo" style="background-color: #FF8056;">送</text> <text
|
||||||
|
class='shop-address'>{{ fuzzyName(goodsInfo.receiver_name) }} {{goodsInfo.receiver_phone}} </text>
|
||||||
|
</view>
|
||||||
|
<view class="detail-address">
|
||||||
|
{{goodsInfo.receiver_address}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="foot">
|
||||||
|
<text>商品数量: 共计 <text
|
||||||
|
:style="{color:goodsInfo.status==0?'#FF8056':'#2B63E3'}">{{goodsInfo.product_count}}</text>件</text>
|
||||||
|
<text></text>
|
||||||
|
<view class="detail-btn">
|
||||||
|
查看详情
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!--<view class="content" @click.stop="goDetil(goodsInfo.id)">
|
||||||
<view v-if="goodsInfo.status==0">
|
<view v-if="goodsInfo.status==0">
|
||||||
<view class="address">店主姓名: {{goodsInfo.shop_user}}</view>
|
<view class="address">店主姓名: {{goodsInfo.shop_user}}</view>
|
||||||
<view @click.stop="callFn(goodsInfo.shop_phone)" class="address">
|
<view @click.stop="callFn(goodsInfo.shop_phone)" class="address">
|
||||||
@ -37,7 +64,7 @@
|
|||||||
<u-button type="primary" style="background-color: #FF7C32; border: 0;"><u-icon v-if="!is_captain"
|
<u-button type="primary" style="background-color: #FF7C32; border: 0;"><u-icon v-if="!is_captain"
|
||||||
name="car-fill" color="white" size="25" style="margin-right: 10rpx;"></u-icon> <text
|
name="car-fill" color="white" size="25" style="margin-right: 10rpx;"></u-icon> <text
|
||||||
v-if="!is_captain">待配送/</text>点击查看</u-button>
|
v-if="!is_captain">待配送/</text>点击查看</u-button>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -70,11 +97,12 @@
|
|||||||
},
|
},
|
||||||
goDetil(id) {
|
goDetil(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/logistics/${this.goodsInfo.status==1?"logisticDetil":"deliveryDetil"}?id=${id}`,
|
url: `/pages/logistics/${this.goodsInfo.status==0?"deliveryDetil":"logisticDetil"}?id=${id}`,
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -82,25 +110,61 @@
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.card {
|
.card {
|
||||||
width: 92vw;
|
width: 690rpx;
|
||||||
height: AUTO;
|
box-shadow: 0.5rpx 0.5rpx 200rpx 0.5rpx rgba(0, 0, 0, 0.1);
|
||||||
|
// height: AUTO;
|
||||||
|
// padding: 20rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: 2vw;
|
border-radius: 20rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
|
|
||||||
.tit {
|
.title {
|
||||||
border-bottom: 3px solid #F5F5F5;
|
border-bottom: 2rpx solid #F5F5F5;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
font-weight: bold;
|
|
||||||
padding: 20rpx 15rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between
|
justify-content: space-between;
|
||||||
|
font-size: 24rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
|
||||||
|
.status {
|
||||||
|
float: right;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #2B63E3;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
padding: 20rpx 15rpx;
|
padding: 20rpx 30rpx;
|
||||||
|
border-bottom: 2rpx solid #F5F5F5;
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0 2rpx;
|
||||||
|
background-color: #2B63E3;
|
||||||
|
color: white;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
width: 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.shop-address {
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-address {
|
||||||
|
color: #7A7A7A;
|
||||||
|
font-size: 24rpx;
|
||||||
|
padding-left: 42rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.address {
|
.address {
|
||||||
margin: 10rpx 0;
|
margin: 10rpx 0;
|
||||||
@ -113,5 +177,26 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.foot {
|
||||||
|
border-bottom: 2rpx solid #F5F5F5;
|
||||||
|
font-size: 24rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 30rpx;
|
||||||
|
color: #1A1A1A;
|
||||||
|
|
||||||
|
.detail-btn {
|
||||||
|
color: #2B63E3;
|
||||||
|
font-size: 24rpx;
|
||||||
|
width: 144rpx;
|
||||||
|
height: 44rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 40rpx;
|
||||||
|
border: 1px solid #2B63E3;
|
||||||
|
border-radius: 22rpx 22rpx 22rpx 22rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
167
components/own-share/own-share.vue
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
<template>
|
||||||
|
<uni-popup ref="showshare" type="bottom" @change="change">
|
||||||
|
<view class="uni-share">
|
||||||
|
<!-- <text class="uni-share-title">分享到</text> -->
|
||||||
|
<view class="uni-share-content">
|
||||||
|
<view v-for="(item, index) in bottomData" :key="index" @tap="shareItems(item.name)"
|
||||||
|
class="uni-share-content-box">
|
||||||
|
<view class="uni-share-content-image">
|
||||||
|
<image :src="item.icon" class="content-image" mode="widthFix" />
|
||||||
|
</view>
|
||||||
|
<text class="uni-share-content-text">{{ item.text }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<text class="uni-share-btn" @click="cancel('share')">取消</text>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
shareurl: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
uniPopup
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
bottomData: [{
|
||||||
|
text: '刷新',
|
||||||
|
icon: '/static/img/miniProgram.png',
|
||||||
|
name: 'miniProgram'
|
||||||
|
}
|
||||||
|
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// console.log(this.shareurl)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
open() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['showshare'].open()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
change(e) {
|
||||||
|
// console.log('是否打开:' + e.show)
|
||||||
|
},
|
||||||
|
shareItems(provider) {
|
||||||
|
|
||||||
|
|
||||||
|
switch (provider) {
|
||||||
|
|
||||||
|
case 'miniProgram':
|
||||||
|
|
||||||
|
uni.reLaunch({
|
||||||
|
url: this.shareurl,
|
||||||
|
success: (res) => {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['showshare'].close
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fail: (res) => {
|
||||||
|
console.log(res)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'more':
|
||||||
|
plus.share.sendWithSystem({
|
||||||
|
type: "web",
|
||||||
|
title: shareOPtions.shareTitle,
|
||||||
|
thumbs: [shareOPtions.shareImage],
|
||||||
|
href: shareOPtions.shareHref,
|
||||||
|
content: shareOPtions.summary,
|
||||||
|
})
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
this.$refs['showshare'].close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/* 底部分享 */
|
||||||
|
.uni-share {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
/* #endif */
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-share-title {
|
||||||
|
line-height: 60rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
padding: 15rpx 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-share-content {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-share-content-box {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
width: 200rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-share-content-image {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 60rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-image {
|
||||||
|
width: 60rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-share-content-text {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #333;
|
||||||
|
padding-top: 5px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-share-btn {
|
||||||
|
height: 90rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
|
font-size: 14px;
|
||||||
|
border-top-color: #f5f5f5;
|
||||||
|
border-top-width: 1px;
|
||||||
|
border-top-style: solid;
|
||||||
|
text-align: center;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
</style>
|
59
components/own-share/readme.md
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
### 使用方法
|
||||||
|
本组件依赖于 uni-popup 组件 跟 uni-transtion 组件
|
||||||
|
|
||||||
|
|
||||||
|
``` js
|
||||||
|
|
||||||
|
<own-share ref="share" :shareSummary="shareSummary" :shareImage="image"
|
||||||
|
:shareTitle="title" :shareHref="href"
|
||||||
|
:miniProgram="miniProgram" :webUrl="webUrl"
|
||||||
|
@shareSuccess="shareSuccess" @shareFail="shareFail"></own-share>
|
||||||
|
|
||||||
|
//先引入组件
|
||||||
|
import ownShare from '@/components/own-share/own-share.vue'
|
||||||
|
//然后使用
|
||||||
|
components:{
|
||||||
|
ownShare
|
||||||
|
}
|
||||||
|
|
||||||
|
//打开分享
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.share.open()
|
||||||
|
})
|
||||||
|
//关闭分享
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.share.close()
|
||||||
|
})
|
||||||
|
//当然也可以用 easycom 直接使用
|
||||||
|
```
|
||||||
|
参数 <sub>分享只用于app</sub>
|
||||||
|
|
||||||
|
| 参数 | 类型 | 是否必填 |
|
||||||
|
| ---- | ---- | ---- |
|
||||||
|
| shareSummary | String | 只分享内容时必填 |
|
||||||
|
| shareImage | String | 只分享图片时必填 |
|
||||||
|
| shareTitle | String | 否 |
|
||||||
|
| shareHref | String | 分享图文时必填 |
|
||||||
|
| miniProgram | Object | 分享小程序必填 |
|
||||||
|
|
||||||
|
miniProgram参数 [详情](https://uniapp.dcloud.io/api/plugins/share?id=share)
|
||||||
|
|
||||||
|
| 参数 | 类型 | 是否必填 |
|
||||||
|
| ---- | ---- | ---- |
|
||||||
|
| id | String | 微信小程序原始id |
|
||||||
|
| path | String | 点击链接进入的页面 |
|
||||||
|
| type | Number | 微信小程序版本类型 |
|
||||||
|
| webUrl | String | 兼容低版本的网页链接 |
|
||||||
|
|
||||||
|
| 事件 | 说明 |
|
||||||
|
| ---- | ---- |
|
||||||
|
| shareSuccess | 成功回调 |
|
||||||
|
| shareFail | 失败回调 |
|
||||||
|
|
||||||
|
----
|
||||||
|
**图标链接写在组件里面请自行修改(请看示例项目)**
|
||||||
|
|
||||||
|
|
||||||
|
[了解更多uniapp分享,请参考官网](https://uniapp.dcloud.io/api/plugins/share)
|
||||||
|
|
||||||
|
|
134
components/return/index.vue
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
<template>
|
||||||
|
<view class="">
|
||||||
|
<view class="contentgb">
|
||||||
|
<view class="iconfont icon-xiangzuo" v-if="isshow" style="margin-top: 10rpx;color: #fff;margin-left: 30rpx;"
|
||||||
|
@click="close">
|
||||||
|
</view>
|
||||||
|
<view class="name" v-if="isshow">
|
||||||
|
{{name}}
|
||||||
|
</view>
|
||||||
|
<view class="return_top">
|
||||||
|
<view class="z-bootm-img1" @click="close()">
|
||||||
|
<image src="@/static/img/fb1.png" mode="aspectFit"></image>
|
||||||
|
</view>
|
||||||
|
<view class="z-bootm-l"></view>
|
||||||
|
<view class="z-bootm-img2" @click="returnbom()">
|
||||||
|
<image src="@/static/img/fb2.png" mode="aspectFit"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<own-share ref="share" :shareurl="url"></own-share><strong></strong>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ownShare from '@/components/own-share/own-share.vue'
|
||||||
|
export default {
|
||||||
|
name: 'retuntop',
|
||||||
|
comments: {
|
||||||
|
ownShare
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
isshow: {
|
||||||
|
type: Boolean
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
url: {
|
||||||
|
type: String
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
close() {
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.share.open()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
returnbom() {
|
||||||
|
uni.sendHostEvent('closeApp', (ret) => {
|
||||||
|
//发送消息成功回调
|
||||||
|
//console.log('关闭应用' + JSON.stringify(ret));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.contentgb {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.name {
|
||||||
|
font-size: 35rpx;
|
||||||
|
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #FFFFFF;
|
||||||
|
margin-top: 5rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.return_top {
|
||||||
|
width: 166rpx;
|
||||||
|
height: 56rpx;
|
||||||
|
background: rgba(255, 255, 255, 0.6);
|
||||||
|
border-radius: 44rpx 44rpx;
|
||||||
|
margin-right: 30rpx;
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.z-bootm-img1 {
|
||||||
|
width: 41rpx;
|
||||||
|
height: 13rpx;
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
top: 5rpx;
|
||||||
|
left: 25rpx;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.z-bootm-l {
|
||||||
|
width: 1px;
|
||||||
|
height: 32rpx;
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
margin: auto 0;
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
top: 10rpx;
|
||||||
|
left: 85rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.z-bootm-img2 {
|
||||||
|
width: 38rpx;
|
||||||
|
height: 34rpx;
|
||||||
|
margin-top: -15rpx;
|
||||||
|
margin-left: -15rpx;
|
||||||
|
position: absolute;
|
||||||
|
right: 25rpx;
|
||||||
|
top: 25rpx;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
264
components/uni-popup/uni-popup.vue
Normal file
@ -0,0 +1,264 @@
|
|||||||
|
<template>
|
||||||
|
<view v-if="showPopup" class="uni-popup" @touchmove.stop.prevent="clear">
|
||||||
|
<uni-transition :mode-class="['fade']" :styles="maskClass" :duration="duration" :show="showTrans" @click="onTap" />
|
||||||
|
<uni-transition :mode-class="ani" :styles="transClass" :duration="duration" :show="showTrans" @click="onTap">
|
||||||
|
<view class="uni-popup__wrapper-box" @click.stop="clear">
|
||||||
|
<slot />
|
||||||
|
</view>
|
||||||
|
</uni-transition>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import uniTransition from '../uni-transition/uni-transition.vue'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PopUp 弹出层
|
||||||
|
* @description 弹出层组件,为了解决遮罩弹层的问题
|
||||||
|
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
|
||||||
|
* @property {String} type = [top|center|bottom] 弹出方式
|
||||||
|
* @value top 顶部弹出
|
||||||
|
* @value center 中间弹出
|
||||||
|
* @value bottom 底部弹出
|
||||||
|
* @property {Boolean} animation = [ture|false] 是否开启动画
|
||||||
|
* @property {Boolean} maskClick = [ture|false] 蒙版点击是否关闭弹窗
|
||||||
|
* @event {Function} change 打开关闭弹窗触发,e={show: false}
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'UniPopup',
|
||||||
|
components: {
|
||||||
|
uniTransition
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
// 开启动画
|
||||||
|
animation: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
// 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: 'center'
|
||||||
|
},
|
||||||
|
// maskClick
|
||||||
|
maskClick: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
duration: 300,
|
||||||
|
ani: [],
|
||||||
|
showPopup: false,
|
||||||
|
showTrans: false,
|
||||||
|
maskClass: {
|
||||||
|
'position': 'fixed',
|
||||||
|
'bottom': 0,
|
||||||
|
'top': 0,
|
||||||
|
'left': 0,
|
||||||
|
'right': 0,
|
||||||
|
'backgroundColor': 'rgba(0, 0, 0, 0.4)'
|
||||||
|
},
|
||||||
|
transClass: {
|
||||||
|
'position': 'fixed',
|
||||||
|
'left': 0,
|
||||||
|
'right': 0,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
type: {
|
||||||
|
handler: function(newVal) {
|
||||||
|
switch (this.type) {
|
||||||
|
case 'top':
|
||||||
|
this.ani = ['slide-top']
|
||||||
|
this.transClass = {
|
||||||
|
'position': 'fixed',
|
||||||
|
'left': 0,
|
||||||
|
'right': 0,
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 'bottom':
|
||||||
|
this.ani = ['slide-bottom']
|
||||||
|
this.transClass = {
|
||||||
|
'position': 'fixed',
|
||||||
|
'left': 0,
|
||||||
|
'right': 0,
|
||||||
|
'bottom': 0
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 'center':
|
||||||
|
this.ani = ['zoom-out', 'fade']
|
||||||
|
this.transClass = {
|
||||||
|
'position': 'fixed',
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
'display': 'flex',
|
||||||
|
'flexDirection': 'column',
|
||||||
|
/* #endif */
|
||||||
|
'bottom': 0,
|
||||||
|
'left': 0,
|
||||||
|
'right': 0,
|
||||||
|
'top': 0,
|
||||||
|
'justifyContent': 'center',
|
||||||
|
'alignItems': 'center'
|
||||||
|
}
|
||||||
|
|
||||||
|
break
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
if (this.animation) {
|
||||||
|
this.duration = 300
|
||||||
|
} else {
|
||||||
|
this.duration = 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clear(e) {
|
||||||
|
// TODO nvue 取消冒泡
|
||||||
|
e.stopPropagation()
|
||||||
|
},
|
||||||
|
open() {
|
||||||
|
this.showPopup = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
clearTimeout(this.timer)
|
||||||
|
this.timer = setTimeout(() => {
|
||||||
|
this.showTrans = true
|
||||||
|
}, 50);
|
||||||
|
})
|
||||||
|
this.$emit('change', {
|
||||||
|
show: true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close(type) {
|
||||||
|
this.showTrans = false
|
||||||
|
this.$nextTick(() => {
|
||||||
|
clearTimeout(this.timer)
|
||||||
|
this.timer = setTimeout(() => {
|
||||||
|
this.$emit('change', {
|
||||||
|
show: false
|
||||||
|
})
|
||||||
|
this.showPopup = false
|
||||||
|
}, 300)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onTap() {
|
||||||
|
if (!this.maskClick) return
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.uni-popup {
|
||||||
|
position: fixed;
|
||||||
|
/* #ifdef H5 */
|
||||||
|
top: var(--window-top);
|
||||||
|
/* #endif */
|
||||||
|
/* #ifndef H5 */
|
||||||
|
top: 0;
|
||||||
|
/* #endif */
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
z-index: 99;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popup__mask {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
background-color: rgba(0, 0, 0, 0.4);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mask-ani {
|
||||||
|
transition-property: opacity;
|
||||||
|
transition-duration: 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-top-mask {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-bottom-mask {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-center-mask {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popup__wrapper {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: block;
|
||||||
|
/* #endif */
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top {
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
transform: translateY(-500px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom {
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
transform: translateY(500px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.center {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
/* #endif */
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
transform: scale(1.2);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popup__wrapper-box {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: block;
|
||||||
|
/* #endif */
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-ani {
|
||||||
|
/* transition: transform 0.3s;
|
||||||
|
*/
|
||||||
|
transition-property: transform, opacity;
|
||||||
|
transition-duration: 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.uni-top-content {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-bottom-content {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-center-content {
|
||||||
|
transform: scale(1);
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
</style>
|
278
components/uni-transition/uni-transition.vue
Normal file
@ -0,0 +1,278 @@
|
|||||||
|
<template>
|
||||||
|
<view v-if="isShow" ref="ani" class="uni-transition" :class="[ani.in]" :style="'transform:' +transform+';'+stylesObject" @click="change">
|
||||||
|
<slot></slot>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// #ifdef APP-NVUE
|
||||||
|
const animation = uni.requireNativePlugin('animation');
|
||||||
|
// #endif
|
||||||
|
/**
|
||||||
|
* Transition 过渡动画
|
||||||
|
* @description 简单过渡动画组件
|
||||||
|
* @tutorial https://ext.dcloud.net.cn/plugin?id=985
|
||||||
|
* @property {Boolean} show = [false|true] 控制组件显示或隐藏
|
||||||
|
* @property {Array} modeClass = [fade|slide-top|slide-right|slide-bottom|slide-left|zoom-in|zoom-out] 过渡动画类型
|
||||||
|
* @value fade 渐隐渐出过渡
|
||||||
|
* @value slide-top 由上至下过渡
|
||||||
|
* @value slide-right 由右至左过渡
|
||||||
|
* @value slide-bottom 由下至上过渡
|
||||||
|
* @value slide-left 由左至右过渡
|
||||||
|
* @value zoom-in 由小到大过渡
|
||||||
|
* @value zoom-out 由大到小过渡
|
||||||
|
* @property {Number} duration 过渡动画持续时间
|
||||||
|
* @property {Object} styles 组件样式,同 css 样式,注意带’-‘连接符的属性需要使用小驼峰写法如:`backgroundColor:red`
|
||||||
|
*/
|
||||||
|
export default {
|
||||||
|
name: 'uniTransition',
|
||||||
|
props: {
|
||||||
|
show: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
modeClass: {
|
||||||
|
type: Array,
|
||||||
|
default () {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
duration: {
|
||||||
|
type: Number,
|
||||||
|
default: 300
|
||||||
|
},
|
||||||
|
styles: {
|
||||||
|
type: Object,
|
||||||
|
default () {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isShow: false,
|
||||||
|
transform: '',
|
||||||
|
ani: {
|
||||||
|
in: '',
|
||||||
|
active: ''
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
show: {
|
||||||
|
handler(newVal) {
|
||||||
|
if (newVal) {
|
||||||
|
this.open()
|
||||||
|
} else {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
stylesObject() {
|
||||||
|
let styles = {
|
||||||
|
...this.styles,
|
||||||
|
'transition-duration': this.duration / 1000 + 's'
|
||||||
|
}
|
||||||
|
let transfrom = ''
|
||||||
|
for (let i in styles) {
|
||||||
|
let line = this.toLine(i)
|
||||||
|
transfrom += line + ':' + styles[i] + ';'
|
||||||
|
}
|
||||||
|
return transfrom
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// this.timer = null
|
||||||
|
// this.nextTick = (time = 50) => new Promise(resolve => {
|
||||||
|
// clearTimeout(this.timer)
|
||||||
|
// this.timer = setTimeout(resolve, time)
|
||||||
|
// return this.timer
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
change() {
|
||||||
|
this.$emit('click', {
|
||||||
|
detail: this.isShow
|
||||||
|
})
|
||||||
|
},
|
||||||
|
open() {
|
||||||
|
this.isShow = true
|
||||||
|
this.transform = ''
|
||||||
|
this.ani.in = ''
|
||||||
|
for (let i in this.getTranfrom(false)) {
|
||||||
|
if (i === 'opacity') {
|
||||||
|
this.ani.in = 'fade-in'
|
||||||
|
} else {
|
||||||
|
this.transform += `${this.getTranfrom(false)[i]} `
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this._animation(true)
|
||||||
|
}, 50)
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
close(type) {
|
||||||
|
this._animation(false)
|
||||||
|
},
|
||||||
|
_animation(type) {
|
||||||
|
let styles = this.getTranfrom(type)
|
||||||
|
// #ifdef APP-NVUE
|
||||||
|
if (!this.$refs['ani']) return
|
||||||
|
animation.transition(this.$refs['ani'].ref, {
|
||||||
|
styles,
|
||||||
|
duration: this.duration, //ms
|
||||||
|
timingFunction: 'ease',
|
||||||
|
needLayout: false,
|
||||||
|
delay: 0 //ms
|
||||||
|
}, () => {
|
||||||
|
if (!type) {
|
||||||
|
this.isShow = false
|
||||||
|
}
|
||||||
|
this.$emit('change', {
|
||||||
|
detail: this.isShow
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
// #ifndef APP-NVUE
|
||||||
|
this.transform = ''
|
||||||
|
for (let i in styles) {
|
||||||
|
if (i === 'opacity') {
|
||||||
|
this.ani.in = `fade-${type?'out':'in'}`
|
||||||
|
} else {
|
||||||
|
this.transform += `${styles[i]} `
|
||||||
|
}
|
||||||
|
}
|
||||||
|
clearTimeout(this.timer)
|
||||||
|
this.timer = setTimeout(() => {
|
||||||
|
if (!type) {
|
||||||
|
this.isShow = false
|
||||||
|
}
|
||||||
|
this.$emit('change', {
|
||||||
|
detail: this.isShow
|
||||||
|
})
|
||||||
|
|
||||||
|
}, this.duration)
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
},
|
||||||
|
getTranfrom(type) {
|
||||||
|
let styles = {
|
||||||
|
transform: ''
|
||||||
|
}
|
||||||
|
this.modeClass.forEach((mode) => {
|
||||||
|
switch (mode) {
|
||||||
|
case 'fade':
|
||||||
|
styles.opacity = type ? 1 : 0
|
||||||
|
break;
|
||||||
|
case 'slide-top':
|
||||||
|
styles.transform += `translateY(${type?'0':'-100%'}) `
|
||||||
|
break;
|
||||||
|
case 'slide-right':
|
||||||
|
styles.transform += `translateX(${type?'0':'100%'}) `
|
||||||
|
break;
|
||||||
|
case 'slide-bottom':
|
||||||
|
styles.transform += `translateY(${type?'0':'100%'}) `
|
||||||
|
break;
|
||||||
|
case 'slide-left':
|
||||||
|
styles.transform += `translateX(${type?'0':'-100%'}) `
|
||||||
|
break;
|
||||||
|
case 'zoom-in':
|
||||||
|
styles.transform += `scale(${type?1:0.8}) `
|
||||||
|
break;
|
||||||
|
case 'zoom-out':
|
||||||
|
styles.transform += `scale(${type?1:1.2}) `
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return styles
|
||||||
|
},
|
||||||
|
_modeClassArr(type) {
|
||||||
|
let mode = this.modeClass
|
||||||
|
if (typeof(mode) !== "string") {
|
||||||
|
let modestr = ''
|
||||||
|
mode.forEach((item) => {
|
||||||
|
modestr += (item + '-' + type + ',')
|
||||||
|
})
|
||||||
|
return modestr.substr(0, modestr.length - 1)
|
||||||
|
} else {
|
||||||
|
return mode + '-' + type
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// getEl(el) {
|
||||||
|
// console.log(el || el.ref || null);
|
||||||
|
// return el || el.ref || null
|
||||||
|
// },
|
||||||
|
toLine(name) {
|
||||||
|
return name.replace(/([A-Z])/g, "-$1").toLowerCase();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.uni-transition {
|
||||||
|
transition-timing-function: ease;
|
||||||
|
transition-duration: 0.3s;
|
||||||
|
transition-property: transform, opacity;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fade-in {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fade-active {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-top-in {
|
||||||
|
/* transition-property: transform, opacity; */
|
||||||
|
transform: translateY(-100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-top-active {
|
||||||
|
transform: translateY(0);
|
||||||
|
/* opacity: 1; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-right-in {
|
||||||
|
transform: translateX(100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-right-active {
|
||||||
|
transform: translateX(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-bottom-in {
|
||||||
|
transform: translateY(100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-bottom-active {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-left-in {
|
||||||
|
transform: translateX(-100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-left-active {
|
||||||
|
transform: translateX(0);
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.zoom-in-in {
|
||||||
|
transform: scale(0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.zoom-out-active {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.zoom-out-in {
|
||||||
|
transform: scale(1.2);
|
||||||
|
}
|
||||||
|
</style>
|
@ -2,16 +2,16 @@ let httpApiThree;
|
|||||||
let httpApi; // 总域名
|
let httpApi; // 总域名
|
||||||
let httpApiTwo; // 物流系统域名
|
let httpApiTwo; // 物流系统域名
|
||||||
|
|
||||||
// const env = 'dev'; // 开发
|
const env = 'dev'; // 开发
|
||||||
const env = 'prod'; // 生产
|
// const env = 'prod'; // 生产
|
||||||
// const env = 'prew'; // 预上线
|
// const env = 'prew'; // 预上线
|
||||||
// const env = 'local'; // 本地
|
// const env = 'local'; // 本地
|
||||||
|
|
||||||
switch (env) {
|
switch (env) {
|
||||||
case 'prod':
|
case 'prod':
|
||||||
httpApi = 'https://worker-task.lihaink.cn' //正式
|
httpApi = 'https://new-worker.lihaink.cn/' //正式
|
||||||
httpApiTwo = 'https://logistics.lihaink.cn' //正式环境
|
httpApiTwo = 'https://logistics.lihaink.cn/' //正式环境
|
||||||
httpApiThree = 'https://worker-task.lihaink.cn' //正式
|
httpApiThree = 'https://new-worker.lihaink.cn/' //正式
|
||||||
break;
|
break;
|
||||||
case 'prew':
|
case 'prew':
|
||||||
httpApi = 'https://preview-worker-task.lihaink.cn' //预上线
|
httpApi = 'https://preview-worker-task.lihaink.cn' //预上线
|
||||||
@ -19,13 +19,13 @@ switch (env) {
|
|||||||
httpApiTwo = 'https://preview-logistics.lihaink.cn' //预上线
|
httpApiTwo = 'https://preview-logistics.lihaink.cn' //预上线
|
||||||
break;
|
break;
|
||||||
case 'local':
|
case 'local':
|
||||||
httpApi = 'http://192.168.1.20:8000' //预上线
|
httpApi = 'http://192.168.1.13:8083' //预上线
|
||||||
httpApiThree = 'http://192.168.1.20:8000' //预上线
|
httpApiThree = 'http://192.168.1.13:8083' //预上线
|
||||||
httpApiTwo = 'http://192.168.1.20:8000' //预上线
|
httpApiTwo = 'https://ceshi-logistics.lihaink.cn' //测试环境
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
httpApi = 'https://ceshi-worker-task.lihaink.cn' //测试
|
httpApi = 'https://ceshi-new-wokr.lihaink.cn/' //测试
|
||||||
httpApiThree = 'https://ceshi-worker-task.lihaink.cn' //测试
|
httpApiThree = 'https://ceshi-new-wokr.lihaink.cn/' //测试
|
||||||
httpApiTwo = 'https://ceshi-logistics.lihaink.cn' //测试环境
|
httpApiTwo = 'https://ceshi-logistics.lihaink.cn' //测试环境
|
||||||
//测试环境
|
//测试环境
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "里海社区",
|
"name": "里海社区",
|
||||||
// "appid" : "__UNI__3A527D1",
|
// "appid" : "__UNI__3A527D1",
|
||||||
"appid": "__UNI__B5B1EDD",
|
"appid": "__UNI__A495155",
|
||||||
"description": "",
|
"description": "",
|
||||||
"versionName": "1.3.0",
|
"versionName": "1.1.3",
|
||||||
"versionCode": 130,
|
"versionCode": 113,
|
||||||
"transformPx": false,
|
"transformPx": false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
|
73
pages.json
@ -12,6 +12,33 @@
|
|||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/oaHome/homeTaskDetail",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "任务详情",
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
|
"navigationBarBackgroundColor": "#0122C7",
|
||||||
|
"navigationBarTextStyle": "white"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/oaHome/FirstOrderLog",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "首笔消费金额",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor": "#2B63E3",
|
||||||
|
"navigationBarTextStyle": "white"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/oaHome/accountLog",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "收益明细",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor": "#2B63E3",
|
||||||
|
"navigationBarTextStyle": "white"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/oaLogin/oaLogin",
|
"path": "pages/oaLogin/oaLogin",
|
||||||
"style": {
|
"style": {
|
||||||
@ -24,6 +51,16 @@
|
|||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/oaLogin/oaEnroll",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "账号注册",
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
|
"navigationBarBackgroundColor": "#0122C7",
|
||||||
|
"navigationBarTextStyle": "white"
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/business/business",
|
"path": "pages/business/business",
|
||||||
@ -943,44 +980,22 @@
|
|||||||
},
|
},
|
||||||
"tabBar": {
|
"tabBar": {
|
||||||
"color": "#282828",
|
"color": "#282828",
|
||||||
"selectedColor": "#0122C7",
|
"selectedColor": "#2B63E3",
|
||||||
"borderStyle": "white",
|
"borderStyle": "white",
|
||||||
"backgroundColor": "#ffffff",
|
"backgroundColor": "#ffffff",
|
||||||
"list": [{
|
"list": [{
|
||||||
"pagePath": "pages/oaHome/oaHome",
|
"pagePath": "pages/oaHome/oaHome",
|
||||||
"text": "首页",
|
"text": "首页",
|
||||||
"iconPath": "static/tabs-icon/home.png",
|
"iconPath": "static/newWork/tabbar/index.png",
|
||||||
"selectedIconPath": "static/tabs-icon/home-a.png"
|
"selectedIconPath": "static/newWork/tabbar/indexAct.png"
|
||||||
},
|
|
||||||
{
|
|
||||||
"pagePath": "pages/oaExamine/oaExamine",
|
|
||||||
"text": "审批",
|
|
||||||
"iconPath": "static/tabs-icon/Task.png",
|
|
||||||
"selectedIconPath": "static/tabs-icon/Task-a.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pagePath": "pages/oaTask/oaTask",
|
|
||||||
"text": "任务",
|
|
||||||
"iconPath": "static/tabs-icon/approval.png",
|
|
||||||
"selectedIconPath": "static/tabs-icon/approval-a.png"
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// "pagePath": "pages/oaManager/oaManager",
|
|
||||||
// "text": "片区经理",
|
|
||||||
// "iconPath": "static/tabs-icon/manager.png",
|
|
||||||
// "selectedIconPath": "static/tabs-icon/manager-a.png"
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
"pagePath": "pages/business/business",
|
|
||||||
"text": "商机",
|
|
||||||
"iconPath": "static/tabs-icon/manager.png",
|
|
||||||
"selectedIconPath": "static/tabs-icon/manager-a.png"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"pagePath": "pages/oaMy/oaMy",
|
"pagePath": "pages/oaMy/oaMy",
|
||||||
"text": "我的",
|
"text": "我的",
|
||||||
"iconPath": "static/tabs-icon/my.png",
|
"iconPath": "static/newWork/tabbar/mine.png",
|
||||||
"selectedIconPath": "static/tabs-icon/my-a.png"
|
"selectedIconPath": "static/newWork/tabbar/mineAct.png"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -58,10 +58,13 @@
|
|||||||
物流信息:
|
物流信息:
|
||||||
</view>
|
</view>
|
||||||
<view>用户名称: {{fuzzyName( goodsDetil.logistics.receiver_name)}}</view>
|
<view>用户名称: {{fuzzyName( goodsDetil.logistics.receiver_name)}}</view>
|
||||||
<view @click.stop="callFn(goodsDetil.logistics.shop_phone)">
|
|
||||||
|
|
||||||
|
<view @click.stop="callFn(goodsDetil.logistics.receiver_phone)">
|
||||||
联系电话: <u-icon style="display: inline-block;margin-left: 5rpx;" name="phone"
|
联系电话: <u-icon style="display: inline-block;margin-left: 5rpx;" name="phone"
|
||||||
color="#fff" size="22"></u-icon>{{goodsDetil.logistics.shop_phone}}
|
color="#fff" size="22"></u-icon>{{goodsDetil.logistics.receiver_phone}}
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view>
|
<view>
|
||||||
联系地址: {{goodsDetil.logistics.receiver_address}}
|
联系地址: {{goodsDetil.logistics.receiver_address}}
|
||||||
</view>
|
</view>
|
||||||
@ -95,7 +98,6 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="margin-top: 200rpx;height: 1px;">
|
<view style="margin-top: 200rpx;height: 1px;">
|
||||||
<!-- 565 -->
|
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" v-if="!is_captain">
|
<view class="btn" v-if="!is_captain">
|
||||||
<u-button @click="qrqodeFn" type="primary" style="background-color: #0122C7;border: 0;">
|
<u-button @click="qrqodeFn" type="primary" style="background-color: #0122C7;border: 0;">
|
||||||
@ -109,7 +111,7 @@
|
|||||||
<view class="warp">
|
<view class="warp">
|
||||||
<view class="rect">
|
<view class="rect">
|
||||||
<view class="cont">
|
<view class="cont">
|
||||||
骑手送货完成
|
骑手取货完成
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -177,12 +179,21 @@
|
|||||||
let that = this
|
let that = this
|
||||||
//#ifdef APP
|
//#ifdef APP
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'gcj02',
|
type: 'wgs84',
|
||||||
geocode: true,
|
geocode: true,
|
||||||
isHighAccuracy: true,
|
isHighAccuracy: true,
|
||||||
success: function async (res) {
|
success: function async (res) {
|
||||||
that.nowAddress = res.address.city + res.address.district + res.address.street + res
|
let latitude, longitude;
|
||||||
.address.streetNum + res.address.poiName
|
latitude = res.latitude.toString();
|
||||||
|
longitude = res.longitude.toString();
|
||||||
|
uni.request({
|
||||||
|
url: `https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=${res.longitude},${res.latitude}&key=976a447183ed0d384e1c5b6448b8a75d&radius=1000&extensions=all`, //仅为示例,并非真实接口地址。
|
||||||
|
success: (res) => {
|
||||||
|
// that.address = res.data.regeocode.formatted_address
|
||||||
|
that.nowAddress = res.data.regeocode.formatted_address
|
||||||
|
// console.log();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
that.markers[1].latitude = res.latitude
|
that.markers[1].latitude = res.latitude
|
||||||
that.markers[1].longitude = res.longitude
|
that.markers[1].longitude = res.longitude
|
||||||
@ -289,9 +300,7 @@
|
|||||||
getDriverLine() {
|
getDriverLine() {
|
||||||
const that = this;
|
const that = this;
|
||||||
const key = "997c9a3d88154fa78f4d28bebc1dd84f";
|
const key = "997c9a3d88154fa78f4d28bebc1dd84f";
|
||||||
|
|
||||||
const origin = `${this.markers[1].longitude},${this.markers[1].latitude}`;
|
const origin = `${this.markers[1].longitude},${this.markers[1].latitude}`;
|
||||||
|
|
||||||
const destination = `${this.markers[0].longitude},${this.markers[0].latitude}`;
|
const destination = `${this.markers[0].longitude},${this.markers[0].latitude}`;
|
||||||
uni.request({
|
uni.request({
|
||||||
// url: `https://restapi.amap.com/v3/direction/walking?key=${key}&origin=105.43639400000002,28.908854&destination=105.439304,28.908447`,
|
// url: `https://restapi.amap.com/v3/direction/walking?key=${key}&origin=105.43639400000002,28.908854&destination=105.439304,28.908447`,
|
||||||
@ -340,7 +349,6 @@
|
|||||||
// uni.navigateBack()
|
// uni.navigateBack()
|
||||||
// return
|
// return
|
||||||
let that = this
|
let that = this
|
||||||
console.log(6666)
|
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
onlyFromCamera: true,
|
onlyFromCamera: true,
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
|
164
pages/oaHome/FirstOrderLog.vue
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
<template>
|
||||||
|
<view class="">
|
||||||
|
<view class="head">
|
||||||
|
<view class="money">
|
||||||
|
总资产(元)
|
||||||
|
<view class="" style="margin-top: 35rpx;font-size: 35rpx;">
|
||||||
|
¥ {{money.toLocaleString('zh-CN' ||0)}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cont" v-if='show'>
|
||||||
|
<view class="tit">
|
||||||
|
订单明细
|
||||||
|
</view>
|
||||||
|
<view class="card" v-for="(item,index) in orderList" :key='index'>
|
||||||
|
<view class="card-top">
|
||||||
|
<view class="">
|
||||||
|
{{item.create_time}}
|
||||||
|
</view>
|
||||||
|
<view class="" style="color: #6A92EB;">
|
||||||
|
交易成功
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-bottom" style="margin-top: 30rpx;">
|
||||||
|
<view class="order_detail">
|
||||||
|
<view class="content" style="display: flex;justify-content: space-between;">
|
||||||
|
<view class="" v-if="item.order_info" style="display: flex;align-items: center;">
|
||||||
|
<u--image :showLoading="true" width="70rpx" height="70rpx"
|
||||||
|
:src="item.order_info.image"></u--image>
|
||||||
|
<view class="" style="margin-left: 20rpx;">
|
||||||
|
{{item.order_info.store_name}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="">
|
||||||
|
¥{{item.order_money}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
订单编号:{{item.order_no}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="" v-if='orderList.length==0'>
|
||||||
|
<u-empty icon="/static/newWork/index/empty.png" iconSize='200' width='300' height="300" marginTop='50'
|
||||||
|
textColor='#BFD7FF' text="没有更多了~"></u-empty>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getFirstOrderLog,
|
||||||
|
} from "@/api/newTask.js"
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
orderList: [],
|
||||||
|
flag: false,
|
||||||
|
status: "",
|
||||||
|
page_no: 0,
|
||||||
|
page_size: 20,
|
||||||
|
money: "",
|
||||||
|
show: true,
|
||||||
|
list: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getFirstOrderLogList() {
|
||||||
|
|
||||||
|
let res = await getFirstOrderLog()
|
||||||
|
this.orderList = res.data.lists
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.getFirstOrderLogList()
|
||||||
|
this.money = Number(option.money)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
page {
|
||||||
|
background-color: #F9FBFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.head {
|
||||||
|
width: 750rpx;
|
||||||
|
background-color: #2B63E3;
|
||||||
|
height: 200rpx;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.money {
|
||||||
|
width: 670rpx;
|
||||||
|
background-color: rgba(255, 255, 255, .2);
|
||||||
|
box-shadow: 0.5rpx 0.5rpx 200rpx 0.5rpx rgba(0, 0, 0, 0.1);
|
||||||
|
height: 220rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: 100%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
backdrop-filter: blur(50rpx);
|
||||||
|
color: white;
|
||||||
|
padding: 20rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.cont {
|
||||||
|
// width: 690rpx;
|
||||||
|
margin: 120rpx auto;
|
||||||
|
padding: 20rpx;
|
||||||
|
|
||||||
|
.tit {
|
||||||
|
position: relative;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #1A1A1A;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.tit::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
left: 0;
|
||||||
|
width: 6rpx;
|
||||||
|
/* 左边框的宽度 */
|
||||||
|
height: 25rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
background-color: #2B63E3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
box-shadow: 0.5rpx 0.5rpx 200rpx 0.5rpx rgba(0, 0, 0, 0.1);
|
||||||
|
|
||||||
|
.card-top {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
width: 100%;
|
||||||
|
padding: 20rpx;
|
||||||
|
background-color: #F5F5F5;
|
||||||
|
height: 80rpx;
|
||||||
|
align-items: center;
|
||||||
|
margin: 10rpx 0;
|
||||||
|
}
|
||||||
|
</style>
|
172
pages/oaHome/accountLog.vue
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
<template>
|
||||||
|
<view class="">
|
||||||
|
<view class="head">
|
||||||
|
|
||||||
|
<view class="money">
|
||||||
|
收益明细(元)
|
||||||
|
<view class="" style="margin-top: 35rpx;font-size: 35rpx;">
|
||||||
|
¥ {{money ||0}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="cont">
|
||||||
|
<view class="tit">
|
||||||
|
收益明细
|
||||||
|
</view>
|
||||||
|
<view class="card" v-for="item,index in orderList" :key='index'>
|
||||||
|
<view class="card-top">
|
||||||
|
<view class="">
|
||||||
|
<!-- 2024-01-2 16:20:34 -->
|
||||||
|
{{item.create_time}}
|
||||||
|
</view>
|
||||||
|
<view class="" style="color: #6A92EB;">
|
||||||
|
<!-- 任务收益金额增加 -->
|
||||||
|
{{item.type_desc}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-top" style="margin-top: 30rpx;">
|
||||||
|
<view class="tit" style="font-size: 28rpx;">
|
||||||
|
<!-- 2024-01-2 16:20:34 -->
|
||||||
|
{{item.remark}}
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<!-- 任务收益金额增加 -->
|
||||||
|
{{item.change_amount_desc}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-loadmore :status="status" v-if='orderList.length>0' />
|
||||||
|
|
||||||
|
<view class="" v-if='orderList.length==0'>
|
||||||
|
<u-empty icon="/static/newWork/index/empty.png" iconSize='200' width='300' height="300" marginTop='50'
|
||||||
|
textColor='#BFD7FF' text="没有更多了~"></u-empty>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
account_log,
|
||||||
|
} from "@/api/newTask.js"
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
orderList: [],
|
||||||
|
flag: false,
|
||||||
|
status: "loadmore",
|
||||||
|
page_no: 2,
|
||||||
|
page_size: 20,
|
||||||
|
money: ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getFirstOrderLogList() {
|
||||||
|
let res = await account_log({
|
||||||
|
page_no: 1,
|
||||||
|
page_size: 20
|
||||||
|
})
|
||||||
|
this.orderList = res.data.lists
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getFirstOrderLogList()
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.money = option.money
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.flag) return
|
||||||
|
let {
|
||||||
|
page_no,
|
||||||
|
page_size
|
||||||
|
} = this
|
||||||
|
let that = this
|
||||||
|
this.status = "loading"
|
||||||
|
this.page_no += 1
|
||||||
|
this.flag = true
|
||||||
|
account_log({
|
||||||
|
page_no,
|
||||||
|
page_size
|
||||||
|
}).then(res => {
|
||||||
|
that.orderList = that.orderList.concat(res.data.lists)
|
||||||
|
this.flag = false
|
||||||
|
if (!res.data.lists.length) {
|
||||||
|
this.status = "nomore"
|
||||||
|
this.flag = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.head {
|
||||||
|
width: 750rpx;
|
||||||
|
background-color: #2B63E3;
|
||||||
|
height: 200rpx;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.money {
|
||||||
|
width: 670rpx;
|
||||||
|
background-color: rgba(255, 255, 255, .2);
|
||||||
|
box-shadow: 0.5rpx 0.5rpx 200rpx 0.5rpx rgba(0, 0, 0, 0.1);
|
||||||
|
height: 220rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: 100%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
backdrop-filter: blur(50rpx);
|
||||||
|
color: white;
|
||||||
|
padding: 20rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.cont {
|
||||||
|
// width: 690rpx;
|
||||||
|
margin: 120rpx auto;
|
||||||
|
padding: 20rpx;
|
||||||
|
|
||||||
|
.tit {
|
||||||
|
position: relative;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #1A1A1A;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.tit::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
left: 0;
|
||||||
|
width: 6rpx;
|
||||||
|
/* 左边框的宽度 */
|
||||||
|
height: 25rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
background-color: #2B63E3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
|
||||||
|
.card-top {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
94
pages/oaHome/homeTaskDetail.vue
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<view class="box">
|
||||||
|
<view class="head">
|
||||||
|
<u--image :showLoading="true" width="60rpx" height="60rpx"
|
||||||
|
:src="'../../static/newWork/index/XQ.png'"></u--image>
|
||||||
|
<view class="title">
|
||||||
|
{{taskDetail.title }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="content">
|
||||||
|
{{taskDetail.content }}
|
||||||
|
<view class="time">
|
||||||
|
完成时间: {{taskDetail.end_time}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
taskListApi
|
||||||
|
} from "@/api/task.js"
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
taskDetail: {},
|
||||||
|
loading: true
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
taskListApi().then(res => {
|
||||||
|
this.taskDetail = res.data.filter((item) => item.id == option.id)[0]
|
||||||
|
this.loading = false
|
||||||
|
console.log(this.taskDetail)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.box {
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
background-color: #F9FBFF;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 30rpx;
|
||||||
|
|
||||||
|
.head {
|
||||||
|
// width: ;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
width: 640rpx;
|
||||||
|
border: 1px solid #4C80F6;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #1A1A1A;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
width: 690rpx;
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
box-shadow: 0.5rpx 0.5rpx 200rpx 0.5rpx rgba(0, 0, 0, 0.1);
|
||||||
|
padding: 30rpx 30rpx 50rpx 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
min-height: 35vh;
|
||||||
|
position: relative;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #1A1A1A;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.time {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 20rpx;
|
||||||
|
right: 20rpx;
|
||||||
|
color: #7A7A7A;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
1001
pages/oaHome/new_file.vue
Normal file
746
pages/oaLogin/oaEnroll.vue
Normal file
@ -0,0 +1,746 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<view class="">
|
||||||
|
<u-loading-page :loading="showLoading"></u-loading-page>
|
||||||
|
<view class="" style="width: 100vw; overflow: hidden;" v-show="!showLoading">
|
||||||
|
<view class="card">
|
||||||
|
<u--form labelPosition="left" :model="formData" :rules="rules" ref="uForm">
|
||||||
|
<view class="cards">
|
||||||
|
<view class="avter">
|
||||||
|
<view class="">
|
||||||
|
<text style="color: #f76c7f;font-weight: bold;">*</text>用户头像:
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<view class="" v-if="formData.avatar">
|
||||||
|
<!-- {{formData.avatar}} -->
|
||||||
|
<image :src="formData.avatar" alt="" style="width:150rpx;height:150rpx;">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
<view class="uplode" v-else>
|
||||||
|
<u-icon name="plus-circle-fill" color="#0022C7" size="28"></u-icon>
|
||||||
|
上传头像
|
||||||
|
<view class="up" style="opacity: 0;">
|
||||||
|
<u-upload :fileList="formData.avatar?[{url:formData.avatar}]:[]"
|
||||||
|
@afterRead="afterReadAvatar" @delete="formData.avatar=''" :maxCount="1">
|
||||||
|
</u-upload>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cards">
|
||||||
|
<u-form-item label="电话" required prop="account" borderBottom>
|
||||||
|
<u--input v-model="formData.account" placeholder="请输入手机号" type="number"></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="密码" required prop="account" borderBottom>
|
||||||
|
<u--input v-model="formData.password" placeholder="请输入密码" type="password"></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="确认密码" labelWidth="auto" required prop="account" borderBottom>
|
||||||
|
<u--input v-model="formData.password_confirm" placeholder="请确认密码"
|
||||||
|
type="password"></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
|
||||||
|
<u-form-item label="性别" required prop="sex" borderBottom>
|
||||||
|
|
||||||
|
<u-radio-group v-model="radiovalue1" placement="row" @change="groupChange">
|
||||||
|
<u-radio v-for="(item, index) in radiolist1" :customStyle="{marginLeft: '20px'}"
|
||||||
|
:key="index" :label="item.name" :name="item.name">
|
||||||
|
</u-radio>
|
||||||
|
</u-radio-group>
|
||||||
|
<!-- <u--input v-model="formData.sex" placeholder="请输入姓名"></u--input> -->
|
||||||
|
</u-form-item>
|
||||||
|
|
||||||
|
<u-form-item label="姓名" required prop="nickname" borderBottom>
|
||||||
|
<u--input v-model="formData.nickname" placeholder="请输入姓名"></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="用户角色" labelWidth="auto" required prop="group_name" borderBottom
|
||||||
|
@click="showRole=true" ref="item1">
|
||||||
|
<u--input v-model="formData.group_name" placeholder="请选择"></u--input>
|
||||||
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item labelWidth="auto" label="身份证号" required prop="id_card" borderBottom>
|
||||||
|
<u--input v-model="formData.id_card" placeholder="请输入身份证号" @input="c_idcard"
|
||||||
|
type="idcard"></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="省" required prop="province" @click="changeCity('province')" borderBottom>
|
||||||
|
<u--input :value="formData.province" disabled disabledColor="#fff"
|
||||||
|
placeholder="请选择省"></u--input>
|
||||||
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="市" required prop="city" @click="changeCity('city')" borderBottom>
|
||||||
|
<u--input :value="formData.city" disabled disabledColor="#fff"
|
||||||
|
placeholder="请选择市"></u--input>
|
||||||
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="区县" required prop="area" @click="changeCity('area')" borderBottom>
|
||||||
|
<u--input :value="formData.area" disabled disabledColor="#fff"
|
||||||
|
placeholder="请选择区县"></u--input>
|
||||||
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="乡镇" required prop="street" @click="changeCity('street')" borderBottom>
|
||||||
|
<u--input :value="formData.street" disabled disabledColor="#fff"
|
||||||
|
placeholder="请选择镇"></u--input>
|
||||||
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="村社" required prop="village" @click="changeCity('village')" borderBottom>
|
||||||
|
<u--input :value="formData.village" type="text" disabled disabledColor="#fff"
|
||||||
|
placeholder="请选择村"></u--input>
|
||||||
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="小队" required prop="brigade" @click="changeCity('brigade')" borderBottom>
|
||||||
|
<u--input :value="formData.brigade" disabled disabledColor="#fff"
|
||||||
|
placeholder="请选择小队"></u--input>
|
||||||
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
|
</u-form-item>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="cards">
|
||||||
|
<view style="margin-bottom:30rpx ;">
|
||||||
|
<text style="color: #f76c7f;font-weight: bold;">*</text>身份证照:
|
||||||
|
</view>
|
||||||
|
<view class="up_list">
|
||||||
|
<view class="" v-if="formData.qualification.id_card">
|
||||||
|
<image :src="formData.qualification.id_card" alt=""
|
||||||
|
style="width:243.57rpx;height:150rpx;">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
<view class="uplode" v-else>
|
||||||
|
<u-icon name="plus-circle-fill" color="#0022C7" size="28"></u-icon>
|
||||||
|
身份证正面
|
||||||
|
<view class="up" style="opacity: 0;">
|
||||||
|
<u-upload
|
||||||
|
:fileList="formData.qualification.id_card?[{url:formData.qualification.id_card}]:[]"
|
||||||
|
@afterRead="afterRead" @delete="formData.qualification.id_card=''"
|
||||||
|
name="id_card" :maxCount="1" width="300rpx" height="200rpx"
|
||||||
|
style="margin-top: 10rpx;">
|
||||||
|
</u-upload>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="" v-if="formData.qualification.id_card_b">
|
||||||
|
<!-- {{formData.avatar}} -->
|
||||||
|
<image :src="formData.qualification.id_card_b" alt=""
|
||||||
|
style="width:243.57rpx;height:150rpx;">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
<view class="uplode" v-else>
|
||||||
|
<u-icon name="plus-circle-fill" color="#0022C7" size="28"></u-icon>
|
||||||
|
身份证反面
|
||||||
|
<view class="up" style="opacity: 0;">
|
||||||
|
|
||||||
|
<u-upload
|
||||||
|
:fileList="formData.qualification.id_card_b?[{url:formData.qualification.id_card_b}]:[]"
|
||||||
|
@afterRead="afterRead" @delete="formData.qualification.id_card_b=''"
|
||||||
|
name="id_card_b" :maxCount="1" width="300rpx" height="200rpx"
|
||||||
|
style="margin-top: 10rpx;">
|
||||||
|
</u-upload>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="cards">
|
||||||
|
<view style="margin-bottom:30rpx ;">
|
||||||
|
<text style="color: #f76c7f;font-weight: bold;">*</text>银行卡照:
|
||||||
|
</view>
|
||||||
|
<view class="up_list">
|
||||||
|
<view class="" v-if="formData.qualification.bank_account">
|
||||||
|
<!-- {{formData.avatar}} -->
|
||||||
|
<image :src="formData.qualification.bank_account" alt=""
|
||||||
|
style="width:243.57rpx;height:150rpx;">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
<view class="uplode" v-else>
|
||||||
|
<u-icon name="plus-circle-fill" color="#0022C7" size="28"></u-icon>
|
||||||
|
银行卡正面
|
||||||
|
<view class="up" style="opacity: 0;">
|
||||||
|
|
||||||
|
<u-upload
|
||||||
|
:fileList="formData.qualification.bank_account?[{url:formData.qualification.bank_account}]:[]"
|
||||||
|
@afterRead="afterRead" @delete="formData.qualification.bank_account=''"
|
||||||
|
name="bank_account" :maxCount="1" width="300rpx" height="200rpx"
|
||||||
|
style="margin-top: 10rpx;">
|
||||||
|
</u-upload>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="" v-if="formData.qualification.bank_account_b">
|
||||||
|
<!-- {{formData.avatar}} -->
|
||||||
|
<image :src="formData.qualification.bank_account_b" alt=""
|
||||||
|
style="width:243.57rpx;height:150rpx;">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
<view class="uplode" v-else>
|
||||||
|
<u-icon name="plus-circle-fill" color="#0022C7" size="28"></u-icon>
|
||||||
|
银行卡反面
|
||||||
|
<view class="up" style="opacity: 0;">
|
||||||
|
<u-upload
|
||||||
|
:fileList="formData.qualification.bank_account_b?[{url:formData.qualification.bank_account_b}]:[]"
|
||||||
|
@afterRead="afterRead" @delete="formData.qualification.bank_account_b=''"
|
||||||
|
name="bank_account_b" :maxCount="1" width="300rpx" height="200rpx"
|
||||||
|
style="margin-top: 10rpx;">
|
||||||
|
</u-upload>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cards">
|
||||||
|
<view style="margin-bottom:30rpx ;">
|
||||||
|
驾驶证照:
|
||||||
|
</view>
|
||||||
|
<view class="up_list">
|
||||||
|
<view class="" v-if="formData.qualification.car_card">
|
||||||
|
<!-- {{formData.avatar}} -->
|
||||||
|
<image :src="formData.qualification.car_card" alt=""
|
||||||
|
style="width:243.57rpx;height:150rpx;">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
<view class="uplode" v-else>
|
||||||
|
<u-icon name="plus-circle-fill" color="#0022C7" size="28"></u-icon>
|
||||||
|
驾驶证一页
|
||||||
|
<view class="up" style="opacity: 0;">
|
||||||
|
<u-upload
|
||||||
|
:fileList="formData.qualification.car_card?[{url:formData.qualification.car_card}]:[]"
|
||||||
|
@afterRead="afterRead" @delete="formData.qualification.car_card=''"
|
||||||
|
name="car_card" :maxCount="1" width="300rpx" height="200rpx"
|
||||||
|
style="margin-top: 10rpx;">
|
||||||
|
</u-upload>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="" v-if="formData.qualification.car_card_b">
|
||||||
|
<!-- {{formData.avatar}} -->
|
||||||
|
<image :src="formData.qualification.car_card_b" alt=""
|
||||||
|
style="width:243.57rpx;height:150rpx;">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
<view class="uplode" v-else>
|
||||||
|
<u-icon name="plus-circle-fill" color="#0022C7" size="28"></u-icon>
|
||||||
|
驾驶证二页
|
||||||
|
<view class="up" style="opacity: 0;">
|
||||||
|
<u-upload
|
||||||
|
:fileList="formData.qualification.car_card_b?[{url:formData.qualification.car_card_b}]:[]"
|
||||||
|
@afterRead="afterRead" @delete="formData.qualification.car_card_b=''"
|
||||||
|
name="car_card_b" :maxCount="1" width="300rpx" height="200rpx"
|
||||||
|
style="margin-top: 10rpx;">
|
||||||
|
</u-upload>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</u--form>
|
||||||
|
<button @click="modelShow=true" type="primary" class="btn" style="margin: 28rpx;">注册</button>
|
||||||
|
</view>
|
||||||
|
<u-modal :show="modelShow" title="提示" content='请确认人员信息无误后再创建' closeOnClickOverlay showCancelButton
|
||||||
|
@close="modelShow=false" @cancel="modelShow=false" @confirm="$u.throttle(addAcountNum, 2000)"></u-modal>
|
||||||
|
|
||||||
|
|
||||||
|
<u-action-sheet :show="showRole" :actions="actions" title="请选择性别" @close="showRole = false"
|
||||||
|
@select="sexSelect">
|
||||||
|
</u-action-sheet>
|
||||||
|
|
||||||
|
|
||||||
|
<u-picker @close='showPicker=false' :defaultIndex='defaultIndex' @cancel='showPicker=false'
|
||||||
|
:show="showPicker" ref="uPicker" :columns="columns" :keyName='keyName' @confirm="confirm"></u-picker>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <u-picker :show="showPicker" :columns="columns" keyName="province_name"></u-picker> -->
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
commonProvince,
|
||||||
|
commonCity,
|
||||||
|
commonArea,
|
||||||
|
commonStreet,
|
||||||
|
commonVillage,
|
||||||
|
commonBrigade,
|
||||||
|
register
|
||||||
|
} from "@/api/enroll.js"
|
||||||
|
|
||||||
|
import {
|
||||||
|
upLoadImage
|
||||||
|
} from "@/api/file.js"
|
||||||
|
import {
|
||||||
|
loginAdd,
|
||||||
|
} from "@/api/oaUser.js"
|
||||||
|
import {
|
||||||
|
Toast
|
||||||
|
} from "../../libs/uniApi"
|
||||||
|
export default {
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
radiolist1: [{
|
||||||
|
name: '男',
|
||||||
|
value: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '女',
|
||||||
|
value: 2
|
||||||
|
},
|
||||||
|
|
||||||
|
],
|
||||||
|
// u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
|
||||||
|
radiovalue1: '男',
|
||||||
|
defaultIndex: [0],
|
||||||
|
showLoading: true,
|
||||||
|
keyName: 'province_name',
|
||||||
|
showRole: false,
|
||||||
|
showPicker: false,
|
||||||
|
areaList: [],
|
||||||
|
proList: [],
|
||||||
|
cityList: [],
|
||||||
|
streetList: [],
|
||||||
|
villageList: [],
|
||||||
|
brigadeList: [],
|
||||||
|
columns: [],
|
||||||
|
actions: [{
|
||||||
|
name: '镇/街合伙人',
|
||||||
|
id: 22
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '社区合伙人',
|
||||||
|
id: 21
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '小区队长',
|
||||||
|
id: 20
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '村合伙人',
|
||||||
|
id: 19
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '生产队长',
|
||||||
|
id: 18
|
||||||
|
},
|
||||||
|
|
||||||
|
],
|
||||||
|
modelShow: false,
|
||||||
|
formData: {
|
||||||
|
company_id: 0,
|
||||||
|
account: '', //账号
|
||||||
|
password: '', //密码
|
||||||
|
password_confirm: '', //确认密码
|
||||||
|
channel: 6, //注册渠道[1-微信小程序 2-微信公众号 3-手机H5 4-电脑PC 5-苹果APP 6-安卓APP]
|
||||||
|
id_card: '',
|
||||||
|
// is_captain: '', // 队长标识
|
||||||
|
// is_service_manager: '', //服务部长标识
|
||||||
|
sex: '',
|
||||||
|
avatar: '',
|
||||||
|
nickname: '',
|
||||||
|
// address: '',
|
||||||
|
group_id: "",
|
||||||
|
group_name: "",
|
||||||
|
province: "",
|
||||||
|
city: "",
|
||||||
|
area: "",
|
||||||
|
street: "",
|
||||||
|
village: "",
|
||||||
|
brigade: "",
|
||||||
|
// provinceCode: "",
|
||||||
|
cityCode: "",
|
||||||
|
areaCode: "",
|
||||||
|
streetCode: "",
|
||||||
|
villageCode: "",
|
||||||
|
brigadeCode: "",
|
||||||
|
qualification: {
|
||||||
|
id_card: "",
|
||||||
|
id_card_b: "",
|
||||||
|
car_card: "",
|
||||||
|
car_card_b: "",
|
||||||
|
bank_account: "",
|
||||||
|
bank_account_b: ""
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
account: {
|
||||||
|
required: true,
|
||||||
|
pattern: /^(1[3456789]\d{9})$/,
|
||||||
|
message: '请输入正确的手机号码',
|
||||||
|
trigger: ['change', 'blur']
|
||||||
|
},
|
||||||
|
id_card: {
|
||||||
|
required: true,
|
||||||
|
pattern: /^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dxX]$/,
|
||||||
|
message: '请输入正确的身份证号',
|
||||||
|
trigger: ['change', 'blur']
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getChannel()
|
||||||
|
this.setRules()
|
||||||
|
commonProvince().then(res => {
|
||||||
|
this.proList = res.data
|
||||||
|
this.columns = [this.proList]
|
||||||
|
this.showLoading = false
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
onReady() {
|
||||||
|
//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
|
||||||
|
this.$refs.uForm.setRules(this.rules)
|
||||||
|
|
||||||
|
},
|
||||||
|
onShow() {},
|
||||||
|
methods: {
|
||||||
|
getChannel() {
|
||||||
|
switch (uni.getSystemInfoSync().platform) {
|
||||||
|
case 'android':
|
||||||
|
this.formData.channel = 6
|
||||||
|
break;
|
||||||
|
case 'ios':
|
||||||
|
this.formData.channel = 5
|
||||||
|
break;
|
||||||
|
case "windows":
|
||||||
|
this.formData.channel = 4
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
this.formData.channel = 1
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//#ifdef MP
|
||||||
|
this.formData.channel = 1
|
||||||
|
//#endif
|
||||||
|
|
||||||
|
},
|
||||||
|
groupChange(n) {
|
||||||
|
n == "男" ? this.formData.sex = 1 : this.formData.sex = 2
|
||||||
|
console.log(this.formData);
|
||||||
|
},
|
||||||
|
|
||||||
|
setRules() {
|
||||||
|
let ruleKeyList = ['avatar', 'nickname', 'group_name', 'province', 'city', 'area', 'village', 'street',
|
||||||
|
'qualification.id_card', 'qualification.bank_account', 'qualification.id_card_b',
|
||||||
|
'qualification.bank_account_b'
|
||||||
|
]
|
||||||
|
|
||||||
|
ruleKeyList.forEach(item => {
|
||||||
|
this.rules[item] = {
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
message: '不能为空',
|
||||||
|
trigger: ['change', 'blur']
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
confirm(e) {
|
||||||
|
if (this.keyName == 'province_name') {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '获取下级区域中'
|
||||||
|
})
|
||||||
|
this.formData.province = e.value[0].province_name
|
||||||
|
this.formData.province_code = e.value[0].province_code
|
||||||
|
commonCity({
|
||||||
|
city: this.formData.province_code
|
||||||
|
}).then(res => {
|
||||||
|
this.cityList = res.data
|
||||||
|
uni.hideLoading()
|
||||||
|
this.defaultIndex = [0]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (this.keyName == 'city_name') {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '获取下级区域中'
|
||||||
|
})
|
||||||
|
this.formData.city = e.value[0].city_name
|
||||||
|
this.formData.cityCode = e.value[0].city_code
|
||||||
|
commonArea({
|
||||||
|
area: this.formData.cityCode
|
||||||
|
}).then(res => {
|
||||||
|
this.areaList = res.data
|
||||||
|
uni.hideLoading()
|
||||||
|
this.defaultIndex = [0]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (this.keyName == 'area_name') {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '获取下级区域中'
|
||||||
|
})
|
||||||
|
this.formData.area = e.value[0].area_name
|
||||||
|
this.formData.areaCode = e.value[0].area_code
|
||||||
|
|
||||||
|
commonStreet({
|
||||||
|
street: this.formData.areaCode
|
||||||
|
}).then(res => {
|
||||||
|
this.streetList = res.data
|
||||||
|
uni.hideLoading()
|
||||||
|
this.defaultIndex = [0]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (this.keyName == 'street_name') {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '获取下级区域中'
|
||||||
|
})
|
||||||
|
this.formData.street = e.value[0].street_name
|
||||||
|
this.formData.streetCode = e.value[0].street_code
|
||||||
|
commonVillage({
|
||||||
|
village: this.formData.streetCode
|
||||||
|
}).then(res => {
|
||||||
|
this.villageList = res.data
|
||||||
|
uni.hideLoading()
|
||||||
|
this.defaultIndex = [0]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (this.keyName == 'village_name') {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '获取下级区域中'
|
||||||
|
})
|
||||||
|
this.formData.village = e.value[0].village_name
|
||||||
|
this.formData.villageCode = e.value[0].village_code
|
||||||
|
commonBrigade({
|
||||||
|
brigade: this.formData.villageCode
|
||||||
|
}).then(res => {
|
||||||
|
this.brigadeList = res.data
|
||||||
|
uni.hideLoading()
|
||||||
|
this.defaultIndex = [0]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (this.keyName == 'brigade_name') {
|
||||||
|
this.formData.brigade = e.value[0].brigade_name
|
||||||
|
this.formData.brigadeCode = e.value[0].id
|
||||||
|
this.defaultIndex = [0]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.showPicker = false
|
||||||
|
},
|
||||||
|
|
||||||
|
changeCity(type, toast = false) {
|
||||||
|
this.showPicker = true
|
||||||
|
if (type == 'role') {
|
||||||
|
this.actionList = this.actions
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (type == 'province') {
|
||||||
|
this.keyName = 'province_name'
|
||||||
|
this.columns = [this.proList]
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (type == 'city') {
|
||||||
|
this.keyName = 'city_name'
|
||||||
|
this.columns = [this.cityList]
|
||||||
|
}
|
||||||
|
if (type == 'area') {
|
||||||
|
this.keyName = 'area_name'
|
||||||
|
this.columns = [this.areaList]
|
||||||
|
|
||||||
|
}
|
||||||
|
if (type == 'street') {
|
||||||
|
this.keyName = 'street_name'
|
||||||
|
this.columns = [this.streetList]
|
||||||
|
|
||||||
|
}
|
||||||
|
if (type == 'village') {
|
||||||
|
this.keyName = 'village_name'
|
||||||
|
this.columns = [this.villageList]
|
||||||
|
|
||||||
|
}
|
||||||
|
if (type == 'brigade') {
|
||||||
|
this.keyName = 'brigade_name'
|
||||||
|
this.columns = [this.brigadeList]
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// this.actionList=
|
||||||
|
|
||||||
|
|
||||||
|
// if (this[type + 'List'].length == 0) {
|
||||||
|
// if (type == 'brigade') return Toast('小队已经建立完毕');
|
||||||
|
// return Toast('请先选择上一级地区');
|
||||||
|
// }
|
||||||
|
// this.changeType = type;
|
||||||
|
// this.showProvince = true;
|
||||||
|
},
|
||||||
|
sexSelect(e) {
|
||||||
|
|
||||||
|
|
||||||
|
this.formData.group_id = e.id
|
||||||
|
this.formData.group_name = e.name
|
||||||
|
this.showRole = false
|
||||||
|
},
|
||||||
|
c_idcard(e) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.formData.id_card = e.replace(/[^0-9X]/g, '')
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 上传头像
|
||||||
|
async afterReadAvatar(event) {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '上传中'
|
||||||
|
})
|
||||||
|
upLoadImage({
|
||||||
|
filePath: event.file.url,
|
||||||
|
name: 'file'
|
||||||
|
}).then(res => {
|
||||||
|
this.formData.avatar = res.data.uri;
|
||||||
|
}).finally(() => {
|
||||||
|
uni.hideLoading();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 新增图片
|
||||||
|
async afterRead(event) {
|
||||||
|
this.upLoad(event.file.url, event.name)
|
||||||
|
},
|
||||||
|
// 上传图片
|
||||||
|
upLoad(url, type) {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '上传中请稍后'
|
||||||
|
})
|
||||||
|
upLoadImage({
|
||||||
|
filePath: url,
|
||||||
|
name: 'file'
|
||||||
|
}).then(res => {
|
||||||
|
this.formData.qualification[type] = res.data.uri
|
||||||
|
}).finally(() => {
|
||||||
|
uni.hideLoading();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 创建账号
|
||||||
|
async addAcountNum() {
|
||||||
|
this.modelShow = false;
|
||||||
|
await this.$nextTick();
|
||||||
|
if (!this.formData.avatar) return Toast('头像未上传');
|
||||||
|
if (!this.formData.qualification.id_card || !this.formData.qualification.id_card_b) return Toast(
|
||||||
|
'身份证未上传');
|
||||||
|
if (!this.formData.qualification.bank_account || !this.formData.qualification.bank_account_b)
|
||||||
|
return Toast(
|
||||||
|
'银行卡未上传');
|
||||||
|
this.$refs.uForm.validate().then(async (e) => {
|
||||||
|
if (e) {
|
||||||
|
uni.showLoading()
|
||||||
|
|
||||||
|
|
||||||
|
console.log(this.formData)
|
||||||
|
|
||||||
|
let res = await register({
|
||||||
|
...this.formData,
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
console.log(res, 'res')
|
||||||
|
uni.hideLoading()
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: "添加成功",
|
||||||
|
success: () => {
|
||||||
|
// setTimeout(() => {
|
||||||
|
// uni.$emit('initPersonnel');
|
||||||
|
// uni.navigateBack();
|
||||||
|
// }, 1000)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.card {
|
||||||
|
// background-color: #fff;
|
||||||
|
// margin: 28rpx;
|
||||||
|
// padding: 28rpx;
|
||||||
|
// border-radius: 14rpx;
|
||||||
|
|
||||||
|
.cards {
|
||||||
|
|
||||||
|
|
||||||
|
margin: 28rpx;
|
||||||
|
padding: 28rpx;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
.avter {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
// line-height: 150rpx;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.up_list {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uplode {
|
||||||
|
width: 243.57rpx;
|
||||||
|
height: 173.48rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-top: 30rpx;
|
||||||
|
border-radius: 15rpx;
|
||||||
|
border: 1px solid $theme-oa-color;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
color: $theme-oa-color;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.up {
|
||||||
|
position: absolute;
|
||||||
|
color: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 34rpx;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
|
||||||
|
&:nth-child(1) {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
width: 8rpx;
|
||||||
|
height: 26rpx;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
background-color: #0122c7;
|
||||||
|
content: "";
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 8rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
margin-top: 32rpx;
|
||||||
|
// margin-bottom: 40rpx;
|
||||||
|
// width: 100%;
|
||||||
|
height: 84rpx;
|
||||||
|
background: $theme-oa-color;
|
||||||
|
border-radius: 42rpx 42rpx 42rpx 42rpx;
|
||||||
|
color: #fff;
|
||||||
|
line-height: 80rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -9,7 +9,7 @@
|
|||||||
<!-- <view style="height: var(--status-bar-height)"></view> -->
|
<!-- <view style="height: var(--status-bar-height)"></view> -->
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<view class="body">
|
<view class="body">
|
||||||
<view class="title">欢迎进入里海供销平台!</view>
|
<view class="title">欢迎进入里海工作平台!</view>
|
||||||
<view class="login-card">
|
<view class="login-card">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="text item">
|
<view class="text item">
|
||||||
@ -22,15 +22,8 @@
|
|||||||
type="tel" placeholder="输入账号" />
|
type="tel" placeholder="输入账号" />
|
||||||
<input @click="getId" class="mobile item" v-model="formData.password" maxlength="26"
|
<input @click="getId" class="mobile item" v-model="formData.password" maxlength="26"
|
||||||
placeholder="输入密码" password type="safe-password" />
|
placeholder="输入密码" password type="safe-password" />
|
||||||
<!-- <input v-if="current == 1" class="mobile item" v-model="formData.account" placeholder="输入手机号" />
|
|
||||||
<view v-if="current == 1" class="code item">
|
|
||||||
<input placeholder="输入验证码" v-model="formData.code" maxlength="6" />
|
|
||||||
<u-code :seconds="seconds" @end="end" @start="start" ref="uCode" @change="codeChange"></u-code>
|
|
||||||
<view class="get-code" @click="getCode">{{ tips }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="btn">
|
|
||||||
</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<button class="submit_btn" @click="login">登录</button>
|
<button class="submit_btn" @click="login">登录</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -215,6 +208,11 @@
|
|||||||
//忘记密码
|
//忘记密码
|
||||||
forgetPWD() {
|
forgetPWD() {
|
||||||
Toast('暂未开放')
|
Toast('暂未开放')
|
||||||
|
},
|
||||||
|
navgo(url) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -343,4 +341,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.enroll-text {
|
||||||
|
color: $theme-oa-color;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -1,19 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="my">
|
<view class="my">
|
||||||
|
|
||||||
<view class="head_box" style="position: relative;">
|
<view class="head_box" style="position: relative;">
|
||||||
<!-- <image class="head_img" src="../../static/img/home/head-bg.png"></image> -->
|
<!-- <image class="head_img" src="../../static/img/home/head-bg.png"></image> -->
|
||||||
<view style="position: absolute;bottom: 0;left: 0;overflow: hidden;border-radius: 0;">
|
<view style="position: absolute;bottom: 0;left: 0;overflow: hidden;border-radius: 0;">
|
||||||
<hx-lottie :options="options" ref="lottie" style="width: 100vw;height: 460rpx;transform: scale(1.2);background-color: #0122c7;"/>
|
<hx-lottie :options="options" ref="lottie"
|
||||||
|
style="width: 100vw;height: 460rpx;transform: scale(1.2);background-color: #2B63E3;" />
|
||||||
</view>
|
</view>
|
||||||
<!-- <u-navbar v-if="uniMP" @leftClick="leftClick" bgColor="rgba(0,0,0,0)"
|
<!-- <u-navbar v-if="uniMP" @leftClick="leftClick" bgColor="rgba(0,0,0,0)"
|
||||||
leftIconColor=" #fff" :autoBack="false">
|
leftIconColor=" #fff" :autoBack="false">
|
||||||
</u-navbar> -->
|
</u-navbar> -->
|
||||||
<!-- #ifdef APP-PLUS||H5 -->
|
<!-- #ifdef APP-PLUS||H5 -->
|
||||||
<view style="height: var(--status-bar-height)"></view>
|
<view style="height: var(--status-bar-height)"></view>
|
||||||
|
<view class="" style="float: right;">
|
||||||
|
<Myindex url='/pages/index/index' />
|
||||||
|
</view>
|
||||||
|
|
||||||
<view v-if="uniMP" style="height: 44px;">
|
<view v-if="uniMP" style="height: 44px;">
|
||||||
<u-icon name="arrow-left" color="#fff" size="20" @click="leftClick"></u-icon>
|
<u-icon name="arrow-left" color="#fff" size="20" @click="leftClick"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<view v-else style="height: 30rpx"></view>
|
<view v-else style="height: 30rpx"></view>
|
||||||
|
|
||||||
<!-- <view style="height: 100rpx"></view> -->
|
<!-- <view style="height: 100rpx"></view> -->
|
||||||
<!-- <view v-if="uniMP" style="height: 44px"></view> -->
|
<!-- <view v-if="uniMP" style="height: 44px"></view> -->
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
@ -34,7 +41,7 @@
|
|||||||
<view v-else class="name_work">
|
<view v-else class="name_work">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<text class="nickname">姓名:{{ oaUserInfo.nickname }}</text>
|
<text class="nickname">姓名:{{ oaUserInfo.nickname }}</text>
|
||||||
({{ oaUserInfo.admin_id?'超级管理员':'普通用户'}})
|
<!-- ({{ oaUserInfo.admin_id?'超级管理员':'普通用户'}}) -->
|
||||||
<!-- <text class="omit" v-if="oaUserInfo.admin.company">所属公司:{{ oaUserInfo.admin.company.company_name }}</text> -->
|
<!-- <text class="omit" v-if="oaUserInfo.admin.company">所属公司:{{ oaUserInfo.admin.company.company_name }}</text> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="work">
|
<view class="work">
|
||||||
@ -42,13 +49,18 @@
|
|||||||
<view class="wr_t_left">电话:</view>
|
<view class="wr_t_left">电话:</view>
|
||||||
<view class="wr_t_right">{{oaUserInfo.account}}</view>
|
<view class="wr_t_right">{{oaUserInfo.account}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- <view class="wr_item">
|
||||||
|
<view class="wr_t_left">名称:</view>
|
||||||
|
<view class="wr_t_right" v-if="oaUserInfo.company">
|
||||||
|
{{oaUserInfo.company.company_name}}</view>
|
||||||
|
</view> -->
|
||||||
<view class="wr_item">
|
<view class="wr_item">
|
||||||
<view class="wr_t_left">公司:</view>
|
<view class="wr_t_left">类型:</view>
|
||||||
<view class="wr_t_right" v-if="oaUserInfo.company">{{oaUserInfo.company.company_name}}</view>
|
<view class="wr_t_right">
|
||||||
|
|
||||||
|
|
||||||
|
{{oaUserInfo.user_role_name}}
|
||||||
</view>
|
</view>
|
||||||
<view class="wr_item">
|
|
||||||
<view class="wr_t_left">公司类型:</view>
|
|
||||||
<view class="wr_t_right" v-if="oaUserInfo.company">{{oaUserInfo.company.company_type_name}}</view>
|
|
||||||
</view>
|
</view>
|
||||||
<!-- {{ oaUserInfo.did_name }}({{ oaUserInfo.label_name }}) -->
|
<!-- {{ oaUserInfo.did_name }}({{ oaUserInfo.label_name }}) -->
|
||||||
</view>
|
</view>
|
||||||
@ -85,6 +97,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import Myindex from '@/components/return/index.vue';
|
||||||
import {
|
import {
|
||||||
mapActions
|
mapActions
|
||||||
} from 'vuex'
|
} from 'vuex'
|
||||||
@ -102,9 +115,10 @@
|
|||||||
} from '@/static/server/server.js'
|
} from '@/static/server/server.js'
|
||||||
import bj from "@/static/animation/home.json"
|
import bj from "@/static/animation/home.json"
|
||||||
// import tabbar from '../components/tabbar'
|
// import tabbar from '../components/tabbar'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
// tabbar
|
Myindex
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -121,7 +135,7 @@
|
|||||||
this.options.data = bj;
|
this.options.data = bj;
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
if(uni.getStorageSync('uniMP'))this.uniMP = true;
|
if (uni.getStorageSync('uniMP')) this.uniMP = true;
|
||||||
this.getOaUserInfo();
|
this.getOaUserInfo();
|
||||||
},
|
},
|
||||||
onHide() {
|
onHide() {
|
||||||
@ -141,19 +155,23 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
myOaData(){
|
myOaData() {
|
||||||
const route = 'pages/oaMy/oaMy';
|
const route = 'pages/oaMy/oaMy';
|
||||||
|
|
||||||
let arr = [];
|
let arr = [];
|
||||||
this.$store.state.config?.config?.menu?.forEach((item)=>{
|
this.$store.state.config?.config?.menu?.forEach((item) => {
|
||||||
if(item.paths.includes(route)){
|
|
||||||
arr=item.children;
|
|
||||||
|
|
||||||
|
if (item.paths.includes(route)) {
|
||||||
|
arr = item.children;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch: {
|
||||||
modelShow: function(n,o){
|
modelShow: function(n, o) {
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -162,7 +180,7 @@
|
|||||||
leftClick(e) {
|
leftClick(e) {
|
||||||
uni.sendHostEvent('closeApp', e, (ret) => {
|
uni.sendHostEvent('closeApp', e, (ret) => {
|
||||||
//发送消息成功回调
|
//发送消息成功回调
|
||||||
console.log('关闭应用'+JSON.stringify(ret));
|
console.log('关闭应用' + JSON.stringify(ret));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
login() {
|
login() {
|
||||||
@ -191,8 +209,8 @@
|
|||||||
this.$store.commit('setUserInfo', res.data);
|
this.$store.commit('setUserInfo', res.data);
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
},
|
},
|
||||||
navTo (url) {
|
navTo(url) {
|
||||||
if(url){
|
if (url) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '加载中',
|
title: '加载中',
|
||||||
mask: true
|
mask: true
|
||||||
@ -202,12 +220,12 @@
|
|||||||
success() {
|
success() {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
},
|
},
|
||||||
fail (e) {
|
fail(e) {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
console.log(e);
|
console.log(e);
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}else Toast('暂未开放')
|
} else Toast('暂未开放')
|
||||||
},
|
},
|
||||||
alterMyInfo() {
|
alterMyInfo() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@ -224,9 +242,11 @@
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.my {
|
.my {
|
||||||
padding-bottom: 160rpx;
|
padding-bottom: 160rpx;
|
||||||
|
|
||||||
.head_box {
|
.head_box {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
|
padding-right: 0;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
// background-image: url('../../static/img/home/my_bg.png');
|
// background-image: url('../../static/img/home/my_bg.png');
|
||||||
@ -290,9 +310,11 @@
|
|||||||
|
|
||||||
.work {
|
.work {
|
||||||
margin-top: 14.04rpx;
|
margin-top: 14.04rpx;
|
||||||
.wr_item{
|
|
||||||
|
.wr_item {
|
||||||
display: flex;
|
display: flex;
|
||||||
.wr_t_left{
|
|
||||||
|
.wr_t_left {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin-right: 12rpx;
|
margin-right: 12rpx;
|
||||||
}
|
}
|
||||||
@ -386,7 +408,7 @@
|
|||||||
margin-top: 84.21rpx;
|
margin-top: 84.21rpx;
|
||||||
width: 694rpx;
|
width: 694rpx;
|
||||||
height: 84.21rpx;
|
height: 84.21rpx;
|
||||||
background: $theme-oa-color;
|
background: #2B63E3;
|
||||||
box-shadow: 0px 9px 26px 1px #E9EFF5;
|
box-shadow: 0px 9px 26px 1px #E9EFF5;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -22,6 +22,9 @@
|
|||||||
<u-empty icon="/static/img/empty/data.png" text="没有任务"></u-empty>
|
<u-empty icon="/static/img/empty/data.png" text="没有任务"></u-empty>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<!-- <u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
<!-- <u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
||||||
|
@ -23,8 +23,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Toast } from '../../libs/uniApi';
|
import {
|
||||||
import { destroyAccount } from '@/api/oaUser.js';
|
Toast
|
||||||
|
} from '../../libs/uniApi';
|
||||||
|
import {
|
||||||
|
destroyAccount
|
||||||
|
} from '@/api/oaUser.js';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
BIN
static/img/fb1.png
Normal file
After Width: | Height: | Size: 446 B |
BIN
static/img/fb2.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
static/newWork/index/EWMBG.png
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
static/newWork/index/FZ.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
static/newWork/index/GLHS.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
static/newWork/index/JYJE.png
Normal file
After Width: | Height: | Size: 7.4 KiB |
BIN
static/newWork/index/RW.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
static/newWork/index/RZSHS.png
Normal file
After Width: | Height: | Size: 6.7 KiB |
BIN
static/newWork/index/SYBG.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
static/newWork/index/XQ.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
static/newWork/index/YJ.png
Normal file
After Width: | Height: | Size: 7.0 KiB |
BIN
static/newWork/index/YQM.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
static/newWork/index/ZCYHS.png
Normal file
After Width: | Height: | Size: 7.0 KiB |
BIN
static/newWork/index/empty.png
Normal file
After Width: | Height: | Size: 186 KiB |
BIN
static/newWork/tabbar/index.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
static/newWork/tabbar/indexAct.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
static/newWork/tabbar/mine.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
static/newWork/tabbar/mineAct.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
111
test.vue
@ -1,111 +0,0 @@
|
|||||||
<template>
|
|
||||||
|
|
||||||
|
|
||||||
<view class="personnel_list">
|
|
||||||
<view class="cards">
|
|
||||||
<view class="cards_head">
|
|
||||||
<text style="font-size: 32rpx">最后更新:2020-25-2</text>
|
|
||||||
<text>更新档案</text>
|
|
||||||
<text>查看档案</text>
|
|
||||||
</view>
|
|
||||||
<view class="cards_content">
|
|
||||||
<view class="right">
|
|
||||||
<view class="">
|
|
||||||
<text>人员姓名 :</text>
|
|
||||||
<text> { item.name }</text>
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
<text>联系电话 :</text>
|
|
||||||
<text>{ item.phone }</text>
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
<text>所属片区 :</text>
|
|
||||||
<text> 所属片区 </text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="left">
|
|
||||||
<view class="cir">
|
|
||||||
<u--image class="u_avatar" :showLoading="true" :src="'../../static/img/public/man.png'"
|
|
||||||
width="112.28rpx" height="112.28rpx" shape="circle"></u--image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.personnel_list {
|
|
||||||
padding: 28rpx 0;
|
|
||||||
margin-bottom: 130rpx;
|
|
||||||
|
|
||||||
.cards {
|
|
||||||
margin: 0 auto;
|
|
||||||
margin-bottom: 28rpx;
|
|
||||||
width: 694rpx;
|
|
||||||
background: #ffffff;
|
|
||||||
border-radius: 30rpx;
|
|
||||||
opacity: 1;
|
|
||||||
overflow: hidden;
|
|
||||||
// box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
|
|
||||||
|
|
||||||
.cards_head {
|
|
||||||
padding: 28rpx;
|
|
||||||
background-color: $theme-oa-color;
|
|
||||||
color: white;
|
|
||||||
height: 100rpx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cards_content {
|
|
||||||
padding: 28rpx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
.left {
|
|
||||||
text-align: center;
|
|
||||||
// padding: 15rpx 25rpx;
|
|
||||||
padding-top: 20rpx;
|
|
||||||
|
|
||||||
width: 160rpx;
|
|
||||||
background-color: $theme-oa-color;
|
|
||||||
color: white;
|
|
||||||
border-radius: 40rpx;
|
|
||||||
|
|
||||||
.cir {
|
|
||||||
width: 120rpx;
|
|
||||||
height: 120rpx;
|
|
||||||
background-color: #ffffff;
|
|
||||||
margin-left: 25rpx;
|
|
||||||
border-radius: 120rpx;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.right {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
view {
|
|
||||||
text:nth-child(2) {
|
|
||||||
margin-left: 20rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.u_avatar {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
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发布了配套的可视化设计器,可根据自己喜好在设计器中设计二维码样式,一键生成配置代码复制到项目中,详情请在微信小程序搜索“柚子二维码”,或扫描下方小程序码体验。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 设计器模板示例
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
# 快速上手
|
||||||
|
|
||||||
|
> 在`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/phwTWEDhuEKT5S0hLSctJK1grWasiLllPWe9l7MUSowTJDU7oopKVICSEZXwz3yKtJj1HWkdaT9pA2hgTbeA6r2MPVrMnEpCEI8HU1FpUGC18cbQEPB1r+Ea+Q2olbSFtJbWREqxkxCXr2cZ1hwebSM+zN2vYq+XsXYtRQ2uRJ8hWgaa4kl8ET0Ur30SK9F3STtL3SLtJL5P2kPZGXHu4rru57vCgg9TO3mxir1azd0uNUmuRUALBWKzAAOm1pBcM+4nYwTeBG3uNtJ/0FukQqZP0NuudiErWr5PrfID0JulVwwb1Enu0lT1byx6qUKpqJWoH3qLAQIzcbNhNFU/CKwzhMOld0o9JaVKW1EP6CamXdDqi6uU69nCdUffjpCPsyZvs0U72bDN7KKHI8OULRcIAQcQ9NDXQRYhCeNpF2ocXPXjw4M8uX748eP/+/b9NT08/ETEv8ABekCcXDx069FMGs489SzGUtezpEqPK0KWGKnRGiH8vMGVc+I1UKnXy3r17N5ttwHwvd+/e/bKjo+Mkt5bvG3bfAi/RD69gj2Ur8YQhO/Il3LzQKbVx09t35MiR9x4/fvzvZld2oRTy6l8HDhxAiHvdsPsVeInhMobGSw2fvkTtO5YxSYQqdE6Ih4cnJiY+b3YlF1q5ffv2p4Y9APiBYY/CELqe4wj0TKWwpYYrxLn1TBSjqf1Hjx79eYGK3w1sGz4VK/kVeHbs2LFfkIc/ZC/b2FtEoGcrhS01XKFJYdKHzghD28NjY2N/0BDCwSHvrnAreYU9RV/ybUfY8gSyVAlXmPRhnvHuw4cP/65hhIPy4MGDf5CHPzLsUdeLHLbWVAKi9h/LOcZtMezOHPONE25D22ZXfr7KWeAdeXiSw9ZO9nYte91iuPQjEgj6DwzJMInBLBNDXczA07p1hAeCQh52sZe7lH5EDn99geDgbYa9ToOlgayGURsU8rCbvdzN3voCUUdYmH9gJRPrMphx9mggNQPpYS/3sLcb2GvXCaITyEYFCEYHvRpIzUB62UsJZGO1QFbxwVgu2auB1B3IXvZ2I3sdGAiWm09rIDUDOc1eaiAaSEWlHQp7ntc1Kh0XRlEHMtQ1V2HPm3N+uvJxYRQSyoIB0j6Ymash/0onyBy3c5MkeUzS45haFFEg9pOLCk6LgsgJs0xPxKxIDbu1lNITn7l2hs7N0U/p/Bn6vf/OkEgM28dcuDMy59rhlbfuKzmUCdaSFxoQVNZZUHk/INlrZ+mo8tV/k34GCMI2BvLRnU/mXDt8MQlHLs5AMhWBdI+e00CeJpDtw9lQQD7SQBoBJCdSQ+FaSHVA5r6m/xExB6KOtBIj6boBMemUWTNntUIvTZP1pmnOuboG0gAgOKebBgQpeu3UYNZVHRd7ilA0kAYDwTHZ0TPWtXBdN7XTuTlqRc4zNZAGAelmIF73ZwPJayBOICUQ9evUqwYiNBAFCM3U6d+bBSTlASSngTSrhaTFZ1Pj4k+TE+LPk39lTYhPJ8et9bEYAslb85BmAYESCJmkJC9YQok4LC66AUGsbqfhpysQa42ri0ZKtY6yqrxPfj0oEd3l98pA/idmRM+1cyJ7vc9Tv/ziY5rgFQhJ6fzq5iGmOP+X34nM9Q+L18qQuki7fv9e8f4y1z4Q6bEPRfqPfSJ9g/597Az9rY+um41fyMKELFeA2bbhc1UQecAwTQtCECA4JmedW37tWfpv1/UPrPtDuHwi/kvwgM8Wjp+hR2X7pTgC4Se5UjGLP+V/81/LkhDKC/6GloJ7w7B31pwph02/YrJovUkVNyDVFJNNDA7EvRSB0HlJC0hOOJcY8zRZTGkg7sVUJP9gAxkuARkPCGS0z+q4k4MAMivKgJgxATLDz3mYH+eZCEMDAMKGDYyPVH0tvBUMIEkJhPqLvBBlr5WnMLb9UoRHWRjb908Mi4GJESvU1KZhC8YJ6pgTDCRNIylce8DnXBxzge7jjSvv88QvI341fkn00/UusHD9/vFhe6YePSAlJZRxfs0aknMFBXzA8+VWn4TrvYar44ICUvd9U04goc4PvyFuAQNJW+HhghU2Pqld1IGjz0CYkrsM0zRqCnc995DYf2eQW3TwXYzzHEjtoyy30uhdJ7Fd7Q1vmd4GVCzzBYjeBsRFA4kwEGzVyftMGPPFlaxgi4s4vGD6Xd1l4miaYpomhqUN17Hp1E1rHQlbdbKjZ0W3m66fE+e//K29ahsQCGCcvfUbmpWfcb+2i3AfOB7L720jJwPWdcED4XcMBzOe23QgLJXbS+gqyiqACNMyN1FhG5Cr6Pi2EfcJY2yAVLoG1p0KjnPr+RZuvRURIN4fLfMC4jfs1UBqAeK5tNFlvfWqgTxFIDsuZSt+tKyHOli87ZoXpbdhc9YnqJT3QzSQ+gCBaV8U90O5a+irMWolNPLB5gP8n0JYF+n1K+8XW5IGUicg1ZTPpyZEu/WhHu9VWw2kKUBcOv0KQDAl7L16TrQPZQKqy9px0jYS7jPr8QEyZzPdqcothF5umrDMWgshwX7+Y20D6o7f0ollnB+QyQnryW0LCoShlJZdqhP2is0QyFiuZeG7TnPWNrWCpz6bvE1AsmRQt/UBUfyOkJL0AVJLwagudkBMq+Kz4sWPs9b+3hSMdihFELJXz1trXnkIXx5g5kUuVxAD40MaSG1A8qIsNNDPDJmMz/p5rTfh/OzVPguCiaVhbCnFulbBFL8eL98G5Ni9FbogzM2aCFmnot2pP6HIPGt9IkRqRnxtPqF/6/asNBb4eq7iqzVmLJOKn6Cl3/uphST4Kb5AcMo/YVuoQXnxNb3ijsFgLWOBACk9ZUk5rEQ/MIw+ICO2Y9lkxP989BkpGvWkBruLn6BNKMNf/J4sqqs2DWWs19kazeV3RRW38TTgvCZJA5lnWjhAYiINZJ6pkUD018TWB0jor4nVX6TcWCCBv0hZf9V4Y4D0GAG/alx/GX9jgQT+Mn6drqJBMBiIM13FumqA6IQuDQDikdBFJgZzTegiociUR8hfWJbyaGpq6p+6lQSHgRIm5ZEKRCYFQ9bjYlKwGzdu6KRgIWCguCQFQ8K1qpKCqSOt9dyPICHi/uPHj+u0eQEgyALPkHLQmJs2Dx77ps2rlFiy89atW9d870CXsnLz5s1RpXUETiyphi2ZehWtxEq9unnz5mOPHj263+xKLpQyOTn5VWtrKzJp7zPKU6/KrNG+abzVsOWanLijo+OETk7sX+AREjkb7smJZevwDFfOsAVyiG9e6bs7OX33RZ2+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/CKwzhMOld0o9JaVKW1EP6CamXdDqi6uU69nCdUffjpCPsyZvs0U72bDN7KKHI8OULRcIAQcQ9NDXQRYhCeNpF2ocXPXjw4M8uX748eP/+/b9NT08/ETEv8ABekCcXDx069FMGs489SzGUtezpEqPK0KWGKnRGiH8vMGVc+I1UKnXy3r17N5ttwHwvd+/e/bKjo+Mkt5bvG3bfAi/RD69gj2Ur8YQhO/Il3LzQKbVx09t35MiR9x4/fvzvZld2oRTy6l8HDhxAiHvdsPsVeInhMobGSw2fvkTtO5YxSYQqdE6Ih4cnJiY+b3YlF1q5ffv2p4Y9APiBYY/CELqe4wj0TKWwpYYrxLn1TBSjqf1Hjx79eYGK3w1sGz4VK/kVeHbs2LFfkIc/ZC/b2FtEoGcrhS01XKFJYdKHzghD28NjY2N/0BDCwSHvrnAreYU9RV/ybUfY8gSyVAlXmPRhnvHuw4cP/65hhIPy4MGDf5CHPzLsUdeLHLbWVAKi9h/LOcZtMezOHPONE25D22ZXfr7KWeAdeXiSw9ZO9nYte91iuPQjEgj6DwzJMInBLBNDXczA07p1hAeCQh52sZe7lH5EDn99geDgbYa9ToOlgayGURsU8rCbvdzN3voCUUdYmH9gJRPrMphx9mggNQPpYS/3sLcb2GvXCaITyEYFCEYHvRpIzUB62UsJZGO1QFbxwVgu2auB1B3IXvZ2I3sdGAiWm09rIDUDOc1eaiAaSEWlHQp7ntc1Kh0XRlEHMtQ1V2HPm3N+uvJxYRQSyoIB0j6Ymash/0onyBy3c5MkeUzS45haFFEg9pOLCk6LgsgJs0xPxKxIDbu1lNITn7l2hs7N0U/p/Bn6vf/OkEgM28dcuDMy59rhlbfuKzmUCdaSFxoQVNZZUHk/INlrZ+mo8tV/k34GCMI2BvLRnU/mXDt8MQlHLs5AMhWBdI+e00CeJpDtw9lQQD7SQBoBJCdSQ+FaSHVA5r6m/xExB6KOtBIj6boBMemUWTNntUIvTZP1pmnOuboG0gAgOKebBgQpeu3UYNZVHRd7ilA0kAYDwTHZ0TPWtXBdN7XTuTlqRc4zNZAGAelmIF73ZwPJayBOICUQ9evUqwYiNBAFCM3U6d+bBSTlASSngTSrhaTFZ1Pj4k+TE+LPk39lTYhPJ8et9bEYAslb85BmAYESCJmkJC9YQok4LC66AUGsbqfhpysQa42ri0ZKtY6yqrxPfj0oEd3l98pA/idmRM+1cyJ7vc9Tv/ziY5rgFQhJ6fzq5iGmOP+X34nM9Q+L18qQuki7fv9e8f4y1z4Q6bEPRfqPfSJ9g/597Az9rY+um41fyMKELFeA2bbhc1UQecAwTQtCECA4JmedW37tWfpv1/UPrPtDuHwi/kvwgM8Wjp+hR2X7pTgC4Se5UjGLP+V/81/LkhDKC/6GloJ7w7B31pwph02/YrJovUkVNyDVFJNNDA7EvRSB0HlJC0hOOJcY8zRZTGkg7sVUJP9gAxkuARkPCGS0z+q4k4MAMivKgJgxATLDz3mYH+eZCEMDAMKGDYyPVH0tvBUMIEkJhPqLvBBlr5WnMLb9UoRHWRjb908Mi4GJESvU1KZhC8YJ6pgTDCRNIylce8DnXBxzge7jjSvv88QvI341fkn00/UusHD9/vFhe6YePSAlJZRxfs0aknMFBXzA8+VWn4TrvYar44ICUvd9U04goc4PvyFuAQNJW+HhghU2Pqld1IGjz0CYkrsM0zRqCnc995DYf2eQW3TwXYzzHEjtoyy30uhdJ7Fd7Q1vmd4GVCzzBYjeBsRFA4kwEGzVyftMGPPFlaxgi4s4vGD6Xd1l4miaYpomhqUN17Hp1E1rHQlbdbKjZ0W3m66fE+e//K29ahsQCGCcvfUbmpWfcb+2i3AfOB7L720jJwPWdcED4XcMBzOe23QgLJXbS+gqyiqACNMyN1FhG5Cr6Pi2EfcJY2yAVLoG1p0KjnPr+RZuvRURIN4fLfMC4jfs1UBqAeK5tNFlvfWqgTxFIDsuZSt+tKyHOli87ZoXpbdhc9YnqJT3QzSQ+gCBaV8U90O5a+irMWolNPLB5gP8n0JYF+n1K+8XW5IGUicg1ZTPpyZEu/WhHu9VWw2kKUBcOv0KQDAl7L16TrQPZQKqy9px0jYS7jPr8QEyZzPdqcothF5umrDMWgshwX7+Y20D6o7f0ollnB+QyQnryW0LCoShlJZdqhP2is0QyFiuZeG7TnPWNrWCpz6bvE1AsmRQt/UBUfyOkJL0AVJLwagudkBMq+Kz4sWPs9b+3hSMdihFELJXz1trXnkIXx5g5kUuVxAD40MaSG1A8qIsNNDPDJmMz/p5rTfh/OzVPguCiaVhbCnFulbBFL8eL98G5Ni9FbogzM2aCFmnot2pP6HIPGt9IkRqRnxtPqF/6/asNBb4eq7iqzVmLJOKn6Cl3/uphST4Kb5AcMo/YVuoQXnxNb3ijsFgLWOBACk9ZUk5rEQ/MIw+ICO2Y9lkxP989BkpGvWkBruLn6BNKMNf/J4sqqs2DWWs19kazeV3RRW38TTgvCZJA5lnWjhAYiINZJ6pkUD018TWB0jor4nVX6TcWCCBv0hZf9V4Y4D0GAG/alx/GX9jgQT+Mn6drqJBMBiIM13FumqA6IQuDQDikdBFJgZzTegiociUR8hfWJbyaGpq6p+6lQSHgRIm5ZEKRCYFQ9bjYlKwGzdu6KRgIWCguCQFQ8K1qpKCqSOt9dyPICHi/uPHj+u0eQEgyALPkHLQmJs2Dx77ps2rlFiy89atW9d870CXsnLz5s1RpXUETiyphi2ZehWtxEq9unnz5mOPHj263+xKLpQyOTn5VWtrKzJp7zPKU6/KrNG+abzVsOWanLijo+OETk7sX+AREjkb7smJZevwDFfOsAVyiG9e6bs7OX33RZ2+2y5K+u5LnL6706hT+m61L1ET3Lca7gnukdRdJ7ivnOC+1QiZ4F6FIkOXhAK6aHKIg+joMWLAkPg1vgHMQrE0gCfjbdY7EZWsXyfX+QB78Kphr1W9xB5tZc/WKjDgqW/f4SxqBy+hoKkh/qGj38QvhriIySOeBADCOs3LfFN7I649XNfdXHd40MGebGWP4NVq9k6F4Ruq3IraUtDEEPfQGYE0wGAsjckjmuMWvgm0ngQrGXHJerZx3bewF8+zN2vYK3j2rBEwTLmVRUY5FNlaAAbzFFDHjB5PAMbV6/hG8FRsjIk2cJ3XsQer2ZOV7NESo9QqVBihgMiidvQSTItRgoOmiKdgBWsla1XEJesp672MvZAQWowSCBmiagKhlkUOqXAkIAkpjpL1l344IdQVhrM4X0SFpGpxxOWsr5cvTSleNxM36RK18n+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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
320
uni_modules/qiun-data-charts/changelog.md
Normal file
@ -0,0 +1,320 @@
|
|||||||
|
## 2.5.0-20230101(2023-01-01)
|
||||||
|
- 秋云图表组件 修改条件编译顺序,确保uniapp的cli方式的项目依赖不完整时可以正常显示
|
||||||
|
- 秋云图表组件 恢复props属性directory的使用,以修复vue3项目中,开启echarts后,echarts目录识别错误的bug
|
||||||
|
- uCharts.js 修复区域图、混合图只有一个数据时图表显示不正确的bug
|
||||||
|
- uCharts.js 修复折线图、区域图中时间轴类别图表tooltip指示点显示不正确的bug
|
||||||
|
- uCharts.js 修复x轴使用labelCount时,并且boundaryGap = 'justify' 并且关闭Y轴显示的时候,最后一个坐标值不显示的bug
|
||||||
|
- uCharts.js 修复折线图只有一组数据时 ios16 渲染颜色不正确的bug
|
||||||
|
- uCharts.js 修复玫瑰图半径显示不正确的bug
|
||||||
|
- uCharts.js 柱状图、山峰图增加正负图功能,y轴网格如果需要显示0轴则由 min max 及 splitNumber 确定,后续版本优化自动显示0轴
|
||||||
|
- uCharts.js 柱状图column增加 opts.extra.column.labelPosition,数据标签位置,有效值为 outside外部, insideTop内顶部, center内中间, bottom内底部
|
||||||
|
- uCharts.js 雷达图radar增加 opts.extra.radar.labelShow,否显示各项标识文案是,默认true
|
||||||
|
- uCharts.js 提示窗tooltip增加 opts.extra.tooltip.boxPadding,提示窗边框填充距离,默认3px
|
||||||
|
- uCharts.js 提示窗tooltip增加 opts.extra.tooltip.fontSize,提示窗字体大小配置,默认13px
|
||||||
|
- uCharts.js 提示窗tooltip增加 opts.extra.tooltip.lineHeight,提示窗文字行高,默认20px
|
||||||
|
- uCharts.js 提示窗tooltip增加 opts.extra.tooltip.legendShow,是否显示左侧图例,默认true
|
||||||
|
- uCharts.js 提示窗tooltip增加 opts.extra.tooltip.legendShape,图例形状,图例标识样式,有效值为 auto自动跟随图例, diamond◆, circle●, triangle▲, square■, rect▬, line-
|
||||||
|
- uCharts.js 标记线markLine增加 opts.extra.markLine.labelFontSize,字体大小配置,默认13px
|
||||||
|
- uCharts.js 标记线markLine增加 opts.extra.markLine.labelPadding,标签边框内填充距离,默认6px
|
||||||
|
- uCharts.js 折线图line增加 opts.extra.line.linearType,渐变色类型,可选值 none关闭渐变色,custom 自定义渐变色。使用自定义渐变色时请赋值serie.linearColor作为颜色值
|
||||||
|
- uCharts.js 折线图line增加 serie.linearColor,渐变色数组,格式为2维数组[起始位置,颜色值],例如[[0,'#0EE2F8'],[0.3,'#2BDCA8'],[0.6,'#1890FF'],[1,'#9A60B4']]
|
||||||
|
- uCharts.js 折线图line增加 opts.extra.line.onShadow,是否开启折线阴影,开启后请赋值serie.setShadow阴影设置
|
||||||
|
- uCharts.js 折线图line增加 serie.setShadow,阴影配置,格式为4位数组:[offsetX,offsetY,blur,color]
|
||||||
|
- uCharts.js 折线图line增加 opts.extra.line.animation,动画效果方向,可选值为vertical 垂直动画效果,horizontal 水平动画效果
|
||||||
|
- uCharts.js X轴xAxis增加 opts.xAxis.lineHeight,X轴字体行高,默认20px
|
||||||
|
- uCharts.js X轴xAxis增加 opts.xAxis.marginTop,X轴文字距离轴线的距离,默认0px
|
||||||
|
- uCharts.js X轴xAxis增加 opts.xAxis.title,当前X轴标题
|
||||||
|
- uCharts.js X轴xAxis增加 opts.xAxis.titleFontSize,标题字体大小,默认13px
|
||||||
|
- uCharts.js X轴xAxis增加 opts.xAxis.titleOffsetY,标题纵向偏移距离,负数为向上偏移,正数向下偏移
|
||||||
|
- uCharts.js X轴xAxis增加 opts.xAxis.titleOffsetX,标题横向偏移距离,负数为向左偏移,正数向右偏移
|
||||||
|
- uCharts.js X轴xAxis增加 opts.xAxis.titleFontColor,标题字体颜色,默认#666666
|
||||||
|
|
||||||
|
## 报错TypeError: Cannot read properties of undefined (reading 'length')
|
||||||
|
- 如果是uni-modules版本组件,请先登录HBuilderX账号;
|
||||||
|
- 在HBuilderX中的manifest.json,点击重新获取uniapp的appid,或者删除appid重新粘贴,重新运行;
|
||||||
|
- 如果是cli项目请使用码云上的非uniCloud版本组件;
|
||||||
|
- 或者添加uniCloud的依赖;
|
||||||
|
- 或者使用原生uCharts;
|
||||||
|
## 2.4.5-20221130(2022-11-30)
|
||||||
|
- uCharts.js 优化tooltip当文字很多变为左侧显示时,如果画布仍显显示不下,提示框错位置变为以左侧0位置起画
|
||||||
|
- uCharts.js 折线图修复特殊情况下只有单点数据,并改变线宽后点变为圆形的bug
|
||||||
|
- uCharts.js 修复Y轴disabled启用后无效并报错的bug
|
||||||
|
- uCharts.js 修复仪表盘起始结束角度特殊情况下显示不正确的bug
|
||||||
|
- uCharts.js 雷达图新增参数 opts.extra.radar.radius , 自定义雷达图半径
|
||||||
|
- uCharts.js 折线图、区域图增加tooltip指示点,opts.extra.line.activeType/opts.extra.area.activeType,可选值"none"不启用激活指示点,"hollow"空心点模式,"solid"实心点模式
|
||||||
|
## 2.4.4-20221102(2022-11-02)
|
||||||
|
- 秋云图表组件 修复使用echarts时reload、reshow无法调用重新渲染的bug,[详见码云PR](https://gitee.com/uCharts/uCharts/pulls/40)
|
||||||
|
- 秋云图表组件 修复使用echarts时,初始化时宽高不正确的bug,[详见码云PR](https://gitee.com/uCharts/uCharts/pulls/42)
|
||||||
|
- 秋云图表组件 修复uniapp的h5使用history模式时,无法加载echarts的bug
|
||||||
|
- 秋云图表组件 小程序端@complete、@scrollLeft、@scrollRight、@getTouchStart、@getTouchMove、@getTouchEnd事件增加opts参数传出,方便一些特殊需求的交互获取数据。
|
||||||
|
|
||||||
|
- uCharts.js 修复calTooltipYAxisData方法内formatter格式化方法未与y轴方法同步的问题,[详见码云PR](https://gitee.com/uCharts/uCharts/pulls/43)
|
||||||
|
- uCharts.js 地图新增参数opts.series[i].fillOpacity,以透明度方式来设置颜色过度效果,[详见码云PR](https://gitee.com/uCharts/uCharts/pulls/38)
|
||||||
|
- uCharts.js 地图新增参数opts.extra.map.active,是否启用点击激活变色
|
||||||
|
- uCharts.js 地图新增参数opts.extra.map.activeTextColor,是否启用点击激活变色
|
||||||
|
- uCharts.js 地图新增渲染完成事件renderComplete
|
||||||
|
- uCharts.js 漏斗图修复当部分数据相同时tooltip提示窗点击错误的bug
|
||||||
|
- uCharts.js 漏斗图新增参数series.data[i].centerText 居中标签文案
|
||||||
|
- uCharts.js 漏斗图新增参数series.data[i].centerTextSize 居中标签文案字体大小,默认opts.fontSize
|
||||||
|
- uCharts.js 漏斗图新增参数series.data[i].centerTextColor 居中标签文案字体颜色,默认#FFFFFF
|
||||||
|
- uCharts.js 漏斗图新增参数opts.extra.funnel.minSize 最小值的最小宽度,默认0
|
||||||
|
- uCharts.js 进度条新增参数opts.extra.arcbar.direction,动画方向,可选值为cw顺时针、ccw逆时针
|
||||||
|
- uCharts.js 混合图新增参数opts.extra.mix.line.width,折线的宽度,默认2
|
||||||
|
- uCharts.js 修复tooltip开启horizentalLine水平横线标注时,图表显示错位的bug
|
||||||
|
- uCharts.js 优化tooltip当文字很多变为左侧显示时,如果画布仍显显示不下,提示框错位置变为以左侧0位置起画
|
||||||
|
- uCharts.js 修复开启滚动条后X轴文字超出绘图区域后的隐藏逻辑
|
||||||
|
- uCharts.js 柱状图、条状图修复堆叠模式不能通过{value,color}赋值单个柱子颜色的问题
|
||||||
|
- uCharts.js 气泡图修复不识别series.textSize和series.textColor的bug
|
||||||
|
|
||||||
|
## 报错TypeError: Cannot read properties of undefined (reading 'length')
|
||||||
|
1. 如果是uni-modules版本组件,请先登录HBuilderX账号;
|
||||||
|
2. 在HBuilderX中的manifest.json,点击重新获取uniapp的appid,或者删除appid重新粘贴,重新运行;
|
||||||
|
3. 如果是cli项目请使用码云上的非uniCloud版本组件;
|
||||||
|
4. 或者添加uniCloud的依赖;
|
||||||
|
5. 或者使用原生uCharts;
|
||||||
|
## 2.4.3-20220505(2022-05-05)
|
||||||
|
- 秋云图表组件 修复开启canvas2d后将series赋值为空数组显示加载图标时,再次赋值后画布闪动的bug
|
||||||
|
- 秋云图表组件 修复升级hbx最新版后ECharts的highlight方法报错的bug
|
||||||
|
- uCharts.js 雷达图新增参数opts.extra.radar.gridEval,数据点位网格抽希,默认1
|
||||||
|
- uCharts.js 雷达图新增参数opts.extra.radar.axisLabel, 是否显示刻度点值,默认false
|
||||||
|
- uCharts.js 雷达图新增参数opts.extra.radar.axisLabelTofix,刻度点值小数位数,默认0
|
||||||
|
- uCharts.js 雷达图新增参数opts.extra.radar.labelPointShow,是否显示末端刻度圆点,默认false
|
||||||
|
- uCharts.js 雷达图新增参数opts.extra.radar.labelPointRadius,刻度圆点的半径,默认3
|
||||||
|
- uCharts.js 雷达图新增参数opts.extra.radar.labelPointColor,刻度圆点的颜色,默认#cccccc
|
||||||
|
- uCharts.js 雷达图新增参数opts.extra.radar.linearType,渐变色类型,可选值"none"关闭渐变,"custom"开启渐变
|
||||||
|
- uCharts.js 雷达图新增参数opts.extra.radar.customColor,自定义渐变颜色,数组类型对应series的数组长度以匹配不同series颜色的不同配色方案,例如["#FA7D8D", "#EB88E2"]
|
||||||
|
- uCharts.js 雷达图优化支持series.textColor、series.textSize属性
|
||||||
|
- uCharts.js 柱状图中温度计式图标,优化支持全圆角类型,修复边框有缝隙的bug,详见官网【演示】中的温度计图表
|
||||||
|
- uCharts.js 柱状图新增参数opts.extra.column.activeWidth,当前点击柱状图的背景宽度,默认一个单元格单位
|
||||||
|
- uCharts.js 混合图增加opts.extra.mix.area.gradient 区域图是否开启渐变色
|
||||||
|
- uCharts.js 混合图增加opts.extra.mix.area.opacity 区域图透明度,默认0.2
|
||||||
|
- uCharts.js 饼图、圆环图、玫瑰图、漏斗图,增加opts.series[0].data[i].labelText,自定义标签文字,避免formatter格式化的繁琐,详见官网【演示】中的饼图
|
||||||
|
- uCharts.js 饼图、圆环图、玫瑰图、漏斗图,增加opts.series[0].data[i].labelShow,自定义是否显示某一个指示标签,避免因饼图类别太多导致标签重复或者居多导致图形变形的问题,详见官网【演示】中的饼图
|
||||||
|
- uCharts.js 增加opts.series[i].legendText/opts.series[0].data[i].legendText(与series.name同级)自定义图例显示文字的方法
|
||||||
|
- uCharts.js 优化X轴、Y轴formatter格式化方法增加形参,统一为fromatter:function(value,index,opts){}
|
||||||
|
- uCharts.js 修复横屏模式下无法使用双指缩放方法的bug
|
||||||
|
- uCharts.js 修复当只有一条数据或者多条数据值相等的时候Y轴自动计算的最大值错误的bug
|
||||||
|
- 【官网模板】增加外部自定义图例与图表交互的例子,[点击跳转](https://www.ucharts.cn/v2/#/layout/info?id=2)
|
||||||
|
|
||||||
|
## 注意:非unimodules 版本如因更新 hbx 至 3.4.7 导致报错如下,请到码云更新非 unimodules 版本组件,[点击跳转](https://gitee.com/uCharts/uCharts/tree/master/uni-app/uCharts-%E7%BB%84%E4%BB%B6)
|
||||||
|
> Error in callback for immediate watcher "uchartsOpts": "SyntaxError: Unexpected token u in JSON at position 0"
|
||||||
|
## 2.4.2-20220421(2022-04-21)
|
||||||
|
- 秋云图表组件 修复HBX升级3.4.6.20220420版本后echarts报错的问题
|
||||||
|
## 2.4.2-20220420(2022-04-20)
|
||||||
|
## 重要!此版本uCharts新增了很多功能,修复了诸多已知问题
|
||||||
|
- 秋云图表组件 新增onzoom开启双指缩放功能(仅uCharts),前提需要直角坐标系类图表类型,并且ontouch为true、opts.enableScroll为true,详见实例项目K线图
|
||||||
|
- 秋云图表组件 新增optsWatch是否监听opts变化,关闭optsWatch后,动态修改opts不会触发图表重绘
|
||||||
|
- 秋云图表组件 修复开启canvas2d功能后,动态更新数据后画布闪动的bug
|
||||||
|
- 秋云图表组件 去除directory属性,改为自动获取echarts.min.js路径(升级不受影响)
|
||||||
|
- 秋云图表组件 增加getImage()方法及@getImage事件,通过ref调用getImage()方法获,触发@getImage事件获取当前画布的base64图片文件流。
|
||||||
|
- 秋云图表组件 支付宝、字节跳动、飞书、快手小程序支持开启canvas2d同层渲染设置。
|
||||||
|
- 秋云图表组件 新增加【非uniCloud】版本组件,避免有些不需要uniCloud的使用组件发布至小程序需要提交隐私声明问题,请到码云[【非uniCloud版本】](https://gitee.com/uCharts/uCharts/tree/master/uni-app/uCharts-%E7%BB%84%E4%BB%B6),或npm[【非uniCloud版本】](https://www.npmjs.com/package/@qiun/uni-ucharts)下载使用。
|
||||||
|
- uCharts.js 新增dobuleZoom双指缩放功能
|
||||||
|
- uCharts.js 新增山峰图type="mount",数据格式为饼图类格式,不需要传入categories,具体详见新版官网在线演示
|
||||||
|
- uCharts.js 修复折线图当数据中存在null时tooltip报错的bug
|
||||||
|
- uCharts.js 修复饼图类当画布比较小时自动计算的半径是负数报错的bug
|
||||||
|
- uCharts.js 统一各图表类型的series.formatter格式化方法的形参为(val, index, series, opts),方便格式化时有更多参数可用
|
||||||
|
- uCharts.js 标记线功能增加labelText自定义显示文字,增加labelAlign标签显示位置(左侧或右侧),增加标签显示位置微调labelOffsetX、labelOffsetY
|
||||||
|
- uCharts.js 修复条状图当数值很小时开启圆角后样式错误的bug
|
||||||
|
- uCharts.js 修复X轴开启disabled后,X轴仍占用空间的bug
|
||||||
|
- uCharts.js 修复X轴开启滚动条并且开启rotateLabel后,X轴文字与滚动条重叠的bug
|
||||||
|
- uCharts.js 增加X轴rotateAngle文字旋转自定义角度,取值范围(-90至90)
|
||||||
|
- uCharts.js 修复地图文字标签层级显示不正确的bug
|
||||||
|
- uCharts.js 修复饼图、圆环图、玫瑰图当数据全部为0的时候不显示数据标签的bug
|
||||||
|
- uCharts.js 修复当opts.padding上边距为0时,Y轴顶部刻度标签位置不正确的bug
|
||||||
|
|
||||||
|
## 另外我们还开发了各大原生小程序组件,已发布至码云和npm
|
||||||
|
[https://gitee.com/uCharts/uCharts](https://gitee.com/uCharts/uCharts)
|
||||||
|
[https://www.npmjs.com/~qiun](https://www.npmjs.com/~qiun)
|
||||||
|
|
||||||
|
## 对于原生uCharts文档我们已上线新版官方网站,详情点击下面链接进入官网
|
||||||
|
[https://www.uCharts.cn/v2/](https://www.ucharts.cn/v2/)
|
||||||
|
## 2.3.7-20220122(2022-01-22)
|
||||||
|
## 重要!使用vue3编译,请使用cli模式并升级至最新依赖,HbuilderX编译需要使用3.3.8以上版本
|
||||||
|
- uCharts.js 修复uni-app平台组件模式使用vue3编译到小程序报错的bug。
|
||||||
|
## 2.3.7-20220118(2022-01-18)
|
||||||
|
## 注意,使用vue3的前提是需要3.3.8.20220114-alpha版本的HBuilder!
|
||||||
|
## 2.3.67-20220118(2022-01-18)
|
||||||
|
- 秋云图表组件 组件初步支持vue3,全端编译会有些问题,具体详见下面修改:
|
||||||
|
1. 小程序端运行时,在uni_modules文件夹的qiun-data-charts.js中搜索 new uni_modules_qiunDataCharts_js_sdk_uCharts_uCharts.uCharts,将.uCharts去掉。
|
||||||
|
2. 小程序端发行时,在uni_modules文件夹的qiun-data-charts.js中搜索 new e.uCharts,将.uCharts去掉,变为 new e。
|
||||||
|
3. 如果觉得上述步骤比较麻烦,如果您的项目只编译到小程序端,可以修改u-charts.js最后一行导出方式,将 export default uCharts;变更为 export default { uCharts: uCharts }; 这样变更后,H5和App端的renderjs会有问题,请开发者自行选择。(此问题非组件问题,请等待DC官方修复Vue3的小程序端)
|
||||||
|
## 2.3.6-20220111(2022-01-11)
|
||||||
|
- 秋云图表组件 修改组件 props 属性中的 background 默认值为 rgba(0,0,0,0)
|
||||||
|
## 2.3.6-20211201(2021-12-01)
|
||||||
|
- uCharts.js 修复bar条状图开启圆角模式时,值很小时圆角渲染错误的bug
|
||||||
|
## 2.3.5-20211014(2021-10-15)
|
||||||
|
- uCharts.js 增加vue3的编译支持(仅原生uCharts,qiun-data-charts组件后续会支持,请关注更新)
|
||||||
|
## 2.3.4-20211012(2021-10-12)
|
||||||
|
- 秋云图表组件 修复 mac os x 系统 mouseover 事件丢失的 bug
|
||||||
|
## 2.3.3-20210706(2021-07-06)
|
||||||
|
- uCharts.js 增加雷达图开启数据点值(opts.dataLabel)的显示
|
||||||
|
## 2.3.2-20210627(2021-06-27)
|
||||||
|
- 秋云图表组件 修复tooltipCustom个别情况下传值不正确报错TypeError: Cannot read property 'name' of undefined的bug
|
||||||
|
## 2.3.1-20210616(2021-06-16)
|
||||||
|
- uCharts.js 修复圆角柱状图使用4角圆角时,当数值过大时不正确的bug
|
||||||
|
## 2.3.0-20210612(2021-06-12)
|
||||||
|
- uCharts.js 【重要】uCharts增加nvue兼容,可在nvue项目中使用gcanvas组件渲染uCharts,[详见码云uCharts-demo-nvue](https://gitee.com/uCharts/uCharts)
|
||||||
|
- 秋云图表组件 增加tapLegend属性,是否开启图例点击交互事件
|
||||||
|
- 秋云图表组件 getIndex事件中增加返回uCharts实例中的opts参数,以便在页面中调用参数
|
||||||
|
- 示例项目 pages/other/other.vue增加app端自定义tooltip的方法,详见showOptsTooltip方法
|
||||||
|
## 2.2.1-20210603(2021-06-03)
|
||||||
|
- uCharts.js 修复饼图、圆环图、玫瑰图,当起始角度不为0时,tooltip位置不准确的bug
|
||||||
|
- uCharts.js 增加温度计式柱状图开启顶部半圆形的配置
|
||||||
|
## 2.2.0-20210529(2021-05-29)
|
||||||
|
- uCharts.js 增加条状图type="bar"
|
||||||
|
- 示例项目 pages/ucharts/ucharts.vue增加条状图的demo
|
||||||
|
## 2.1.7-20210524(2021-05-24)
|
||||||
|
- uCharts.js 修复大数据量模式下曲线图不平滑的bug
|
||||||
|
## 2.1.6-20210523(2021-05-23)
|
||||||
|
- 秋云图表组件 修复小程序端开启滚动条更新数据后滚动条位置不符合预期的bug
|
||||||
|
## 2.1.5-2021051702(2021-05-17)
|
||||||
|
- uCharts.js 修复自定义Y轴min和max值为0时不能正确显示的bug
|
||||||
|
## 2.1.5-20210517(2021-05-17)
|
||||||
|
- uCharts.js 修复Y轴自定义min和max时,未按指定的最大值最小值显示坐标轴刻度的bug
|
||||||
|
## 2.1.4-20210516(2021-05-16)
|
||||||
|
- 秋云图表组件 优化onWindowResize防抖方法
|
||||||
|
- 秋云图表组件 修复APP端uCharts更新数据时,清空series显示loading图标后再显示图表,图表抖动的bug
|
||||||
|
- uCharts.js 修复开启canvas2d后,x轴、y轴、series自定义字体大小未按比例缩放的bug
|
||||||
|
- 示例项目 修复format-e.vue拼写错误导致app端使用uCharts渲染图表
|
||||||
|
## 2.1.3-20210513(2021-05-13)
|
||||||
|
- 秋云图表组件 修改uCharts变更chartData数据为updateData方法,支持带滚动条的数据动态打点
|
||||||
|
- 秋云图表组件 增加onWindowResize防抖方法 fix by ど誓言,如尘般染指流年づ
|
||||||
|
- 秋云图表组件 H5或者APP变更chartData数据显示loading图表时,原数据闪现的bug
|
||||||
|
- 秋云图表组件 props增加errorReload禁用错误点击重新加载的方法
|
||||||
|
- uCharts.js 增加tooltip显示category(x轴对应点位)标题的功能,opts.extra.tooltip.showCategory,默认为false
|
||||||
|
- uCharts.js 修复mix混合图只有柱状图时,tooltip的分割线显示位置不正确的bug
|
||||||
|
- uCharts.js 修复开启滚动条,图表在拖动中动态打点,滚动条位置不正确的bug
|
||||||
|
- uCharts.js 修复饼图类数据格式为echarts数据格式,series为空数组报错的bug
|
||||||
|
- 示例项目 修改uCharts.js更新到v2.1.2版本后,@getIndex方法获取索引值变更为e.currentIndex.index
|
||||||
|
- 示例项目 pages/updata/updata.vue增加滚动条拖动更新(数据动态打点)的demo
|
||||||
|
- 示例项目 pages/other/other.vue增加errorReload禁用错误点击重新加载的demo
|
||||||
|
## 2.1.2-20210509(2021-05-09)
|
||||||
|
秋云图表组件 修复APP端初始化时就传入chartData或lacaldata不显示图表的bug
|
||||||
|
## 2.1.1-20210509(2021-05-09)
|
||||||
|
- 秋云图表组件 变更ECharts的eopts配置在renderjs内执行,支持在config-echarts.js配置文件内写function配置。
|
||||||
|
- 秋云图表组件 修复APP端报错Prop being mutated: "onmouse"错误的bug。
|
||||||
|
- 秋云图表组件 修复APP端报错Error: Not Found:Page[6][-1,27] at view.umd.min.js:1的bug。
|
||||||
|
## 2.1.0-20210507(2021-05-07)
|
||||||
|
- 秋云图表组件 修复初始化时就有数据或者数据更新的时候loading加载动画闪动的bug
|
||||||
|
- uCharts.js 修复x轴format方法categories为字符串类型时返回NaN的bug
|
||||||
|
- uCharts.js 修复series.textColor、legend.fontColor未执行全局默认颜色的bug
|
||||||
|
## 2.1.0-20210506(2021-05-06)
|
||||||
|
- 秋云图表组件 修复极个别情况下报错item.properties undefined的bug
|
||||||
|
- 秋云图表组件 修复极个别情况下关闭加载动画reshow不起作用,无法显示图表的bug
|
||||||
|
- 示例项目 pages/ucharts/ucharts.vue 增加时间轴折线图(type="tline")、时间轴区域图(type="tarea")、散点图(type="scatter")、气泡图demo(type="bubble")、倒三角形漏斗图(opts.extra.funnel.type="triangle")、金字塔形漏斗图(opts.extra.funnel.type="pyramid")
|
||||||
|
- 示例项目 pages/format-u/format-u.vue 增加X轴format格式化示例
|
||||||
|
- uCharts.js 升级至v2.1.0版本
|
||||||
|
- uCharts.js 修复 玫瑰图面积模式点击tooltip位置不正确的bug
|
||||||
|
- uCharts.js 修复 玫瑰图点击图例,只剩一个类别显示空白的bug
|
||||||
|
- uCharts.js 修复 饼图类图点击图例,其他图表tooltip位置某些情况下不准的bug
|
||||||
|
- uCharts.js 修复 x轴为矢量轴(时间轴)情况下,点击tooltip位置不正确的bug
|
||||||
|
- uCharts.js 修复 词云图获取点击索引偶尔不准的bug
|
||||||
|
- uCharts.js 增加 直角坐标系图表X轴format格式化方法(原生uCharts.js用法请使用formatter)
|
||||||
|
- uCharts.js 增加 漏斗图扩展配置,倒三角形(opts.extra.funnel.type="triangle"),金字塔形(opts.extra.funnel.type="pyramid")
|
||||||
|
- uCharts.js 增加 散点图(opts.type="scatter")、气泡图(opts.type="bubble")
|
||||||
|
- 后期计划 完善散点图、气泡图,增加markPoints标记点,增加横向条状图。
|
||||||
|
## 2.0.0-20210502(2021-05-02)
|
||||||
|
- uCharts.js 修复词云图获取点击索引不正确的bug
|
||||||
|
## 2.0.0-20210501(2021-05-01)
|
||||||
|
- 秋云图表组件 修复QQ小程序、百度小程序在关闭动画效果情况下,v-for循环使用图表,显示不正确的bug
|
||||||
|
## 2.0.0-20210426(2021-04-26)
|
||||||
|
- 秋云图表组件 修复QQ小程序不支持canvas2d的bug
|
||||||
|
- 秋云图表组件 修复钉钉小程序某些情况点击坐标计算错误的bug
|
||||||
|
- uCharts.js 增加 extra.column.categoryGap 参数,柱状图类每个category点位(X轴点)柱子组之间的间距
|
||||||
|
- uCharts.js 增加 yAxis.data[i].titleOffsetY 参数,标题纵向偏移距离,负数为向上偏移,正数向下偏移
|
||||||
|
- uCharts.js 增加 yAxis.data[i].titleOffsetX 参数,标题横向偏移距离,负数为向左偏移,正数向右偏移
|
||||||
|
- uCharts.js 增加 extra.gauge.labelOffset 参数,仪表盘标签文字径向便宜距离,默认13px
|
||||||
|
## 2.0.0-20210422-2(2021-04-22)
|
||||||
|
秋云图表组件 修复 formatterAssign 未判断 args[key] == null 的情况导致栈溢出的 bug
|
||||||
|
## 2.0.0-20210422(2021-04-22)
|
||||||
|
- 秋云图表组件 修复H5、APP、支付宝小程序、微信小程序canvas2d模式下横屏模式的bug
|
||||||
|
## 2.0.0-20210421(2021-04-21)
|
||||||
|
- uCharts.js 修复多行图例的情况下,图例在上方或者下方时,图例float为左侧或者右侧时,第二行及以后的图例对齐方式不正确的bug
|
||||||
|
## 2.0.0-20210420(2021-04-20)
|
||||||
|
- 秋云图表组件 修复微信小程序开启canvas2d模式后,windows版微信小程序不支持canvas2d模式的bug
|
||||||
|
- 秋云图表组件 修改非uni_modules版本为v2.0版本qiun-data-charts组件
|
||||||
|
## 2.0.0-20210419(2021-04-19)
|
||||||
|
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧绿色【使用HBuilderX导入插件】即可使用,示例项目请点击右侧蓝色按钮【使用HBuilderX导入示例项目】。
|
||||||
|
## 初次使用如果提示未注册<qiun-data-charts>组件,请重启HBuilderX,如仍不好用,请重启电脑;
|
||||||
|
## 如果是cli项目,请尝试清理node_modules,重新install,还不行就删除项目,再重新install。
|
||||||
|
## 此问题已于DCloud官方确认,HBuilderX下个版本会修复。
|
||||||
|
## 其他图表不显示问题详见[常见问题选项卡](https://demo.ucharts.cn)
|
||||||
|
## <font color=#FF0000> 新手请先完整阅读帮助文档及常见问题3遍,右侧蓝色按钮示例项目请看2遍! </font>
|
||||||
|
## [DEMO演示及在线生成工具(v2.0文档)https://demo.ucharts.cn](https://demo.ucharts.cn)
|
||||||
|
## [图表组件在项目中的应用参见 UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
||||||
|
- uCharts.js 修复混合图中柱状图单独设置颜色不生效的bug
|
||||||
|
- uCharts.js 修复多Y轴单独设置fontSize时,开启canvas2d后,未对应放大字体的bug
|
||||||
|
## 2.0.0-20210418(2021-04-18)
|
||||||
|
- 秋云图表组件 增加directory配置,修复H5端history模式下如果发布到二级目录无法正确加载echarts.min.js的bug
|
||||||
|
## 2.0.0-20210416(2021-04-16)
|
||||||
|
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧绿色【使用HBuilderX导入插件】即可使用,示例项目请点击右侧蓝色按钮【使用HBuilderX导入示例项目】。
|
||||||
|
## 初次使用如果提示未注册<qiun-data-charts>组件,请重启HBuilderX,如仍不好用,请重启电脑;
|
||||||
|
## 如果是cli项目,请尝试清理node_modules,重新install,还不行就删除项目,再重新install。
|
||||||
|
## 此问题已于DCloud官方确认,HBuilderX下个版本会修复。
|
||||||
|
## 其他图表不显示问题详见[常见问题选项卡](https://demo.ucharts.cn)
|
||||||
|
## <font color=#FF0000> 新手请先完整阅读帮助文档及常见问题3遍,右侧蓝色按钮示例项目请看2遍! </font>
|
||||||
|
## [DEMO演示及在线生成工具(v2.0文档)https://demo.ucharts.cn](https://demo.ucharts.cn)
|
||||||
|
## [图表组件在项目中的应用参见 UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
||||||
|
- 秋云图表组件 修复APP端某些情况下报错`Not Found Page`的bug,fix by 高级bug开发技术员
|
||||||
|
- 示例项目 修复APP端v-for循环某些情况下报错`Not Found Page`的bug,fix by 高级bug开发技术员
|
||||||
|
- uCharts.js 修复非直角坐标系tooltip提示窗右侧超出未变换方向显示的bug
|
||||||
|
## 2.0.0-20210415(2021-04-15)
|
||||||
|
- 秋云图表组件 修复H5端发布到二级目录下echarts无法加载的bug
|
||||||
|
- 秋云图表组件 修复某些情况下echarts.off('finished')移除监听事件报错的bug
|
||||||
|
## 2.0.0-20210414(2021-04-14)
|
||||||
|
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧绿色【使用HBuilderX导入插件】即可使用,示例项目请点击右侧蓝色按钮【使用HBuilderX导入示例项目】。
|
||||||
|
## 初次使用如果提示未注册<qiun-data-charts>组件,请重启HBuilderX,如仍不好用,请重启电脑;
|
||||||
|
## 如果是cli项目,请尝试清理node_modules,重新install,还不行就删除项目,再重新install。
|
||||||
|
## 此问题已于DCloud官方确认,HBuilderX下个版本会修复。
|
||||||
|
## 其他图表不显示问题详见[常见问题选项卡](https://demo.ucharts.cn)
|
||||||
|
## <font color=#FF0000> 新手请先完整阅读帮助文档及常见问题3遍,右侧蓝色按钮示例项目请看2遍! </font>
|
||||||
|
## [DEMO演示及在线生成工具(v2.0文档)https://demo.ucharts.cn](https://demo.ucharts.cn)
|
||||||
|
## [图表组件在项目中的应用参见 UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
||||||
|
- 秋云图表组件 修复H5端在cli项目下ECharts引用地址错误的bug
|
||||||
|
- 示例项目 增加ECharts的formatter用法的示例(详见示例项目format-e.vue)
|
||||||
|
- uCharts.js 增加圆环图中心背景色的配置extra.ring.centerColor
|
||||||
|
- uCharts.js 修复微信小程序安卓端柱状图开启透明色后显示不正确的bug
|
||||||
|
## 2.0.0-20210413(2021-04-13)
|
||||||
|
- 秋云图表组件 修复百度小程序多个图表真机未能正确获取根元素dom尺寸的bug
|
||||||
|
- 秋云图表组件 修复百度小程序横屏模式方向不正确的bug
|
||||||
|
- 秋云图表组件 修改ontouch时,@getTouchStart@getTouchMove@getTouchEnd的触发条件
|
||||||
|
- uCharts.js 修复饼图类数据格式series属性不生效的bug
|
||||||
|
- uCharts.js 增加时序区域图 详见示例项目中ucharts.vue
|
||||||
|
## 2.0.0-20210412-2(2021-04-12)
|
||||||
|
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧绿色【使用HBuilderX导入插件】即可使用,示例项目请点击右侧蓝色按钮【使用HBuilderX导入示例项目】。
|
||||||
|
## 初次使用如果提示未注册<qiun-data-charts>组件,请重启HBuilderX。如仍不好用,请重启电脑,此问题已于DCloud官方确认,HBuilderX下个版本会修复。
|
||||||
|
## [DEMO演示及在线生成工具(v2.0文档)https://demo.ucharts.cn](https://demo.ucharts.cn)
|
||||||
|
## [图表组件在uniCloudAdmin中的应用 UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
||||||
|
- 秋云图表组件 修复uCharts在APP端横屏模式下不能正确渲染的bug
|
||||||
|
- 示例项目 增加ECharts柱状图渐变色、圆角柱状图、横向柱状图(条状图)的示例
|
||||||
|
## 2.0.0-20210412(2021-04-12)
|
||||||
|
- 秋云图表组件 修复created中判断echarts导致APP端无法识别,改回mounted中判断echarts初始化
|
||||||
|
- uCharts.js 修复2d模式下series.textOffset未乘像素比的bug
|
||||||
|
## 2.0.0-20210411(2021-04-11)
|
||||||
|
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧绿色【使用HBuilderX导入插件】即可使用,示例项目请点击右侧蓝色按钮【使用HBuilderX导入示例项目】。
|
||||||
|
## 初次使用如果提示未注册<qiun-data-charts>组件,请重启HBuilderX,并清空小程序开发者工具缓存。
|
||||||
|
## [DEMO演示及在线生成工具(v2.0文档)https://demo.ucharts.cn](https://demo.ucharts.cn)
|
||||||
|
## [图表组件在uniCloudAdmin中的应用 UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
||||||
|
- uCharts.js 折线图区域图增加connectNulls断点续连的功能,详见示例项目中ucharts.vue
|
||||||
|
- 秋云图表组件 变更初始化方法为created,变更type2d默认值为true,优化2d模式下组件初始化后dom获取不到的bug
|
||||||
|
- 秋云图表组件 修复左右布局时,右侧图表点击坐标错误的bug,修复tooltip柱状图自定义颜色显示object的bug
|
||||||
|
## 2.0.0-20210410(2021-04-10)
|
||||||
|
- 修复左右布局时,右侧图表点击坐标错误的bug,修复柱状图自定义颜色tooltip显示object的bug
|
||||||
|
- 增加标记线及柱状图自定义颜色的demo
|
||||||
|
## 2.0.0-20210409(2021-04-08)
|
||||||
|
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧【使用HBuilderX导入插件】即可体验,DEMO演示及在线生成工具(v2.0文档)[https://demo.ucharts.cn](https://demo.ucharts.cn)
|
||||||
|
## 图表组件在uniCloudAdmin中的应用 [UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
||||||
|
- uCharts.js 修复钉钉小程序百度小程序measureText不准确的bug,修复2d模式下饼图类activeRadius为按比例放大的bug
|
||||||
|
- 修复组件在支付宝小程序端点击位置不准确的bug
|
||||||
|
## 2.0.0-20210408(2021-04-07)
|
||||||
|
- 修复组件在支付宝小程序端不能显示的bug(目前支付宝小程不能点击交互,后续修复)
|
||||||
|
- uCharts.js 修复高分屏下柱状图类,圆弧进度条 自定义宽度不能按比例放大的bug
|
||||||
|
## 2.0.0-20210407(2021-04-06)
|
||||||
|
## v1.0版本已停更,建议转uni_modules版本组件方式调用,点击右侧【使用HBuilderX导入插件】即可体验,DEMO演示及在线生成工具(v2.0文档)[https://demo.ucharts.cn](https://demo.ucharts.cn)
|
||||||
|
## 增加 通过tofix和unit快速格式化y轴的demo add by `howcode`
|
||||||
|
## 增加 图表组件在uniCloudAdmin中的应用 [UReport数据报表](https://ext.dcloud.net.cn/plugin?id=4651)
|
||||||
|
## 2.0.0-20210406(2021-04-05)
|
||||||
|
# 秋云图表组件+uCharts v2.0版本同步上线,使用方法详见https://demo.ucharts.cn帮助页
|
||||||
|
## 2.0.0(2021-04-05)
|
||||||
|
# 秋云图表组件+uCharts v2.0版本同步上线,使用方法详见https://demo.ucharts.cn帮助页
|
@ -0,0 +1,162 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container loading1">
|
||||||
|
<view class="shape shape1"></view>
|
||||||
|
<view class="shape shape2"></view>
|
||||||
|
<view class="shape shape3"></view>
|
||||||
|
<view class="shape shape4"></view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'loading1',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped="true">
|
||||||
|
.container {
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.container.loading1 {
|
||||||
|
-webkit-transform: rotate(45deg);
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.container .shape {
|
||||||
|
position: absolute;
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
border-radius: 1px;
|
||||||
|
}
|
||||||
|
.container .shape.shape1 {
|
||||||
|
left: 0;
|
||||||
|
background-color: #1890FF;
|
||||||
|
}
|
||||||
|
.container .shape.shape2 {
|
||||||
|
right: 0;
|
||||||
|
background-color: #91CB74;
|
||||||
|
}
|
||||||
|
.container .shape.shape3 {
|
||||||
|
bottom: 0;
|
||||||
|
background-color: #FAC858;
|
||||||
|
}
|
||||||
|
.container .shape.shape4 {
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
background-color: #EE6666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading1 .shape1 {
|
||||||
|
-webkit-animation: animation1shape1 0.5s ease 0s infinite alternate;
|
||||||
|
animation: animation1shape1 0.5s ease 0s infinite alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes animation1shape1 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(16px, 16px);
|
||||||
|
transform: translate(16px, 16px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animation1shape1 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(16px, 16px);
|
||||||
|
transform: translate(16px, 16px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.loading1 .shape2 {
|
||||||
|
-webkit-animation: animation1shape2 0.5s ease 0s infinite alternate;
|
||||||
|
animation: animation1shape2 0.5s ease 0s infinite alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes animation1shape2 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(-16px, 16px);
|
||||||
|
transform: translate(-16px, 16px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animation1shape2 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(-16px, 16px);
|
||||||
|
transform: translate(-16px, 16px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.loading1 .shape3 {
|
||||||
|
-webkit-animation: animation1shape3 0.5s ease 0s infinite alternate;
|
||||||
|
animation: animation1shape3 0.5s ease 0s infinite alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes animation1shape3 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(16px, -16px);
|
||||||
|
transform: translate(16px, -16px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animation1shape3 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(16px, -16px);
|
||||||
|
transform: translate(16px, -16px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.loading1 .shape4 {
|
||||||
|
-webkit-animation: animation1shape4 0.5s ease 0s infinite alternate;
|
||||||
|
animation: animation1shape4 0.5s ease 0s infinite alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes animation1shape4 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(-16px, -16px);
|
||||||
|
transform: translate(-16px, -16px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animation1shape4 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(-16px, -16px);
|
||||||
|
transform: translate(-16px, -16px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
@ -0,0 +1,170 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container loading2">
|
||||||
|
<view class="shape shape1"></view>
|
||||||
|
<view class="shape shape2"></view>
|
||||||
|
<view class="shape shape3"></view>
|
||||||
|
<view class="shape shape4"></view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'loading2',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped="true">
|
||||||
|
.container {
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container.loading2 {
|
||||||
|
-webkit-transform: rotate(10deg);
|
||||||
|
transform: rotate(10deg);
|
||||||
|
}
|
||||||
|
.container.loading2 .shape {
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
.container.loading2{
|
||||||
|
-webkit-animation: rotation 1s infinite;
|
||||||
|
animation: rotation 1s infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container .shape {
|
||||||
|
position: absolute;
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
border-radius: 1px;
|
||||||
|
}
|
||||||
|
.container .shape.shape1 {
|
||||||
|
left: 0;
|
||||||
|
background-color: #1890FF;
|
||||||
|
}
|
||||||
|
.container .shape.shape2 {
|
||||||
|
right: 0;
|
||||||
|
background-color: #91CB74;
|
||||||
|
}
|
||||||
|
.container .shape.shape3 {
|
||||||
|
bottom: 0;
|
||||||
|
background-color: #FAC858;
|
||||||
|
}
|
||||||
|
.container .shape.shape4 {
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
background-color: #EE6666;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.loading2 .shape1 {
|
||||||
|
-webkit-animation: animation2shape1 0.5s ease 0s infinite alternate;
|
||||||
|
animation: animation2shape1 0.5s ease 0s infinite alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes animation2shape1 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(20px, 20px);
|
||||||
|
transform: translate(20px, 20px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animation2shape1 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(20px, 20px);
|
||||||
|
transform: translate(20px, 20px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.loading2 .shape2 {
|
||||||
|
-webkit-animation: animation2shape2 0.5s ease 0s infinite alternate;
|
||||||
|
animation: animation2shape2 0.5s ease 0s infinite alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes animation2shape2 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(-20px, 20px);
|
||||||
|
transform: translate(-20px, 20px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animation2shape2 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(-20px, 20px);
|
||||||
|
transform: translate(-20px, 20px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.loading2 .shape3 {
|
||||||
|
-webkit-animation: animation2shape3 0.5s ease 0s infinite alternate;
|
||||||
|
animation: animation2shape3 0.5s ease 0s infinite alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes animation2shape3 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(20px, -20px);
|
||||||
|
transform: translate(20px, -20px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animation2shape3 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(20px, -20px);
|
||||||
|
transform: translate(20px, -20px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.loading2 .shape4 {
|
||||||
|
-webkit-animation: animation2shape4 0.5s ease 0s infinite alternate;
|
||||||
|
animation: animation2shape4 0.5s ease 0s infinite alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes animation2shape4 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(-20px, -20px);
|
||||||
|
transform: translate(-20px, -20px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animation2shape4 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(-20px, -20px);
|
||||||
|
transform: translate(-20px, -20px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
@ -0,0 +1,173 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container loading3">
|
||||||
|
<view class="shape shape1"></view>
|
||||||
|
<view class="shape shape2"></view>
|
||||||
|
<view class="shape shape3"></view>
|
||||||
|
<view class="shape shape4"></view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'loading3',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped="true">
|
||||||
|
.container {
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container.loading3 {
|
||||||
|
-webkit-animation: rotation 1s infinite;
|
||||||
|
animation: rotation 1s infinite;
|
||||||
|
}
|
||||||
|
.container.loading3 .shape1 {
|
||||||
|
border-top-left-radius: 10px;
|
||||||
|
}
|
||||||
|
.container.loading3 .shape2 {
|
||||||
|
border-top-right-radius: 10px;
|
||||||
|
}
|
||||||
|
.container.loading3 .shape3 {
|
||||||
|
border-bottom-left-radius: 10px;
|
||||||
|
}
|
||||||
|
.container.loading3 .shape4 {
|
||||||
|
border-bottom-right-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container .shape {
|
||||||
|
position: absolute;
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
border-radius: 1px;
|
||||||
|
}
|
||||||
|
.container .shape.shape1 {
|
||||||
|
left: 0;
|
||||||
|
background-color: #1890FF;
|
||||||
|
}
|
||||||
|
.container .shape.shape2 {
|
||||||
|
right: 0;
|
||||||
|
background-color: #91CB74;
|
||||||
|
}
|
||||||
|
.container .shape.shape3 {
|
||||||
|
bottom: 0;
|
||||||
|
background-color: #FAC858;
|
||||||
|
}
|
||||||
|
.container .shape.shape4 {
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
background-color: #EE6666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading3 .shape1 {
|
||||||
|
-webkit-animation: animation3shape1 0.5s ease 0s infinite alternate;
|
||||||
|
animation: animation3shape1 0.5s ease 0s infinite alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes animation3shape1 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(5px, 5px);
|
||||||
|
transform: translate(5px, 5px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animation3shape1 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(5px, 5px);
|
||||||
|
transform: translate(5px, 5px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.loading3 .shape2 {
|
||||||
|
-webkit-animation: animation3shape2 0.5s ease 0s infinite alternate;
|
||||||
|
animation: animation3shape2 0.5s ease 0s infinite alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes animation3shape2 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(-5px, 5px);
|
||||||
|
transform: translate(-5px, 5px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animation3shape2 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(-5px, 5px);
|
||||||
|
transform: translate(-5px, 5px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.loading3 .shape3 {
|
||||||
|
-webkit-animation: animation3shape3 0.5s ease 0s infinite alternate;
|
||||||
|
animation: animation3shape3 0.5s ease 0s infinite alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes animation3shape3 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(5px, -5px);
|
||||||
|
transform: translate(5px, -5px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animation3shape3 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(5px, -5px);
|
||||||
|
transform: translate(5px, -5px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.loading3 .shape4 {
|
||||||
|
-webkit-animation: animation3shape4 0.5s ease 0s infinite alternate;
|
||||||
|
animation: animation3shape4 0.5s ease 0s infinite alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes animation3shape4 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(-5px, -5px);
|
||||||
|
transform: translate(-5px, -5px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animation3shape4 {
|
||||||
|
from {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate(-5px, -5px);
|
||||||
|
transform: translate(-5px, -5px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,222 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container loading5">
|
||||||
|
<view class="shape shape1"></view>
|
||||||
|
<view class="shape shape2"></view>
|
||||||
|
<view class="shape shape3"></view>
|
||||||
|
<view class="shape shape4"></view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'loading5',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped="true">
|
||||||
|
.container {
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container.loading5 .shape {
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container .shape {
|
||||||
|
position: absolute;
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
border-radius: 1px;
|
||||||
|
}
|
||||||
|
.container .shape.shape1 {
|
||||||
|
left: 0;
|
||||||
|
background-color: #1890FF;
|
||||||
|
}
|
||||||
|
.container .shape.shape2 {
|
||||||
|
right: 0;
|
||||||
|
background-color: #91CB74;
|
||||||
|
}
|
||||||
|
.container .shape.shape3 {
|
||||||
|
bottom: 0;
|
||||||
|
background-color: #FAC858;
|
||||||
|
}
|
||||||
|
.container .shape.shape4 {
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
background-color: #EE6666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading5 .shape1 {
|
||||||
|
animation: animation5shape1 2s ease 0s infinite reverse;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes animation5shape1 {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
-webkit-transform: translate(0, 15px);
|
||||||
|
transform: translate(0, 15px);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
-webkit-transform: translate(15px, 15px);
|
||||||
|
transform: translate(15px, 15px);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
-webkit-transform: translate(15px, 0);
|
||||||
|
transform: translate(15px, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animation5shape1 {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
-webkit-transform: translate(0, 15px);
|
||||||
|
transform: translate(0, 15px);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
-webkit-transform: translate(15px, 15px);
|
||||||
|
transform: translate(15px, 15px);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
-webkit-transform: translate(15px, 0);
|
||||||
|
transform: translate(15px, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.loading5 .shape2 {
|
||||||
|
animation: animation5shape2 2s ease 0s infinite reverse;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes animation5shape2 {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
-webkit-transform: translate(-15px, 0);
|
||||||
|
transform: translate(-15px, 0);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
-webkit-transform: translate(-15px, 15px);
|
||||||
|
transform: translate(-15px, 15px);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
-webkit-transform: translate(0, 15px);
|
||||||
|
transform: translate(0, 15px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animation5shape2 {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
-webkit-transform: translate(-15px, 0);
|
||||||
|
transform: translate(-15px, 0);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
-webkit-transform: translate(-15px, 15px);
|
||||||
|
transform: translate(-15px, 15px);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
-webkit-transform: translate(0, 15px);
|
||||||
|
transform: translate(0, 15px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.loading5 .shape3 {
|
||||||
|
animation: animation5shape3 2s ease 0s infinite reverse;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes animation5shape3 {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
-webkit-transform: translate(15px, 0);
|
||||||
|
transform: translate(15px, 0);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
-webkit-transform: translate(15px, -15px);
|
||||||
|
transform: translate(15px, -15px);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
-webkit-transform: translate(0, -15px);
|
||||||
|
transform: translate(0, -15px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animation5shape3 {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
-webkit-transform: translate(15px, 0);
|
||||||
|
transform: translate(15px, 0);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
-webkit-transform: translate(15px, -15px);
|
||||||
|
transform: translate(15px, -15px);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
-webkit-transform: translate(0, -15px);
|
||||||
|
transform: translate(0, -15px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.loading5 .shape4 {
|
||||||
|
animation: animation5shape4 2s ease 0s infinite reverse;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes animation5shape4 {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
-webkit-transform: translate(0, -15px);
|
||||||
|
transform: translate(0, -15px);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
-webkit-transform: translate(-15px, -15px);
|
||||||
|
transform: translate(-15px, -15px);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
-webkit-transform: translate(-15px, 0);
|
||||||
|
transform: translate(-15px, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animation5shape4 {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
-webkit-transform: translate(0, -15px);
|
||||||
|
transform: translate(0, -15px);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
-webkit-transform: translate(-15px, -15px);
|
||||||
|
transform: translate(-15px, -15px);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
-webkit-transform: translate(-15px, 0);
|
||||||
|
transform: translate(-15px, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
@ -0,0 +1,229 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container loading6">
|
||||||
|
<view class="shape shape1"></view>
|
||||||
|
<view class="shape shape2"></view>
|
||||||
|
<view class="shape shape3"></view>
|
||||||
|
<view class="shape shape4"></view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'loading6',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped="true">
|
||||||
|
.container {
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container.loading6 {
|
||||||
|
-webkit-animation: rotation 1s infinite;
|
||||||
|
animation: rotation 1s infinite;
|
||||||
|
}
|
||||||
|
.container.loading6 .shape {
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
.container .shape {
|
||||||
|
position: absolute;
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
border-radius: 1px;
|
||||||
|
}
|
||||||
|
.container .shape.shape1 {
|
||||||
|
left: 0;
|
||||||
|
background-color: #1890FF;
|
||||||
|
}
|
||||||
|
.container .shape.shape2 {
|
||||||
|
right: 0;
|
||||||
|
background-color: #91CB74;
|
||||||
|
}
|
||||||
|
.container .shape.shape3 {
|
||||||
|
bottom: 0;
|
||||||
|
background-color: #FAC858;
|
||||||
|
}
|
||||||
|
.container .shape.shape4 {
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
background-color: #EE6666;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.loading6 .shape1 {
|
||||||
|
-webkit-animation: animation6shape1 2s linear 0s infinite normal;
|
||||||
|
animation: animation6shape1 2s linear 0s infinite normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes animation6shape1 {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
-webkit-transform: translate(0, 18px);
|
||||||
|
transform: translate(0, 18px);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
-webkit-transform: translate(18px, 18px);
|
||||||
|
transform: translate(18px, 18px);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
-webkit-transform: translate(18px, 0);
|
||||||
|
transform: translate(18px, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animation6shape1 {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
-webkit-transform: translate(0, 18px);
|
||||||
|
transform: translate(0, 18px);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
-webkit-transform: translate(18px, 18px);
|
||||||
|
transform: translate(18px, 18px);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
-webkit-transform: translate(18px, 0);
|
||||||
|
transform: translate(18px, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.loading6 .shape2 {
|
||||||
|
-webkit-animation: animation6shape2 2s linear 0s infinite normal;
|
||||||
|
animation: animation6shape2 2s linear 0s infinite normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes animation6shape2 {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
-webkit-transform: translate(-18px, 0);
|
||||||
|
transform: translate(-18px, 0);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
-webkit-transform: translate(-18px, 18px);
|
||||||
|
transform: translate(-18px, 18px);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
-webkit-transform: translate(0, 18px);
|
||||||
|
transform: translate(0, 18px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animation6shape2 {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
-webkit-transform: translate(-18px, 0);
|
||||||
|
transform: translate(-18px, 0);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
-webkit-transform: translate(-18px, 18px);
|
||||||
|
transform: translate(-18px, 18px);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
-webkit-transform: translate(0, 18px);
|
||||||
|
transform: translate(0, 18px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.loading6 .shape3 {
|
||||||
|
-webkit-animation: animation6shape3 2s linear 0s infinite normal;
|
||||||
|
animation: animation6shape3 2s linear 0s infinite normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes animation6shape3 {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
-webkit-transform: translate(18px, 0);
|
||||||
|
transform: translate(18px, 0);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
-webkit-transform: translate(18px, -18px);
|
||||||
|
transform: translate(18px, -18px);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
-webkit-transform: translate(0, -18px);
|
||||||
|
transform: translate(0, -18px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animation6shape3 {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
-webkit-transform: translate(18px, 0);
|
||||||
|
transform: translate(18px, 0);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
-webkit-transform: translate(18px, -18px);
|
||||||
|
transform: translate(18px, -18px);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
-webkit-transform: translate(0, -18px);
|
||||||
|
transform: translate(0, -18px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.loading6 .shape4 {
|
||||||
|
-webkit-animation: animation6shape4 2s linear 0s infinite normal;
|
||||||
|
animation: animation6shape4 2s linear 0s infinite normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes animation6shape4 {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
-webkit-transform: translate(0, -18px);
|
||||||
|
transform: translate(0, -18px);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
-webkit-transform: translate(-18px, -18px);
|
||||||
|
transform: translate(-18px, -18px);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
-webkit-transform: translate(-18px, 0);
|
||||||
|
transform: translate(-18px, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animation6shape4 {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
-webkit-transform: translate(0, -18px);
|
||||||
|
transform: translate(0, -18px);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
-webkit-transform: translate(-18px, -18px);
|
||||||
|
transform: translate(-18px, -18px);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
-webkit-transform: translate(-18px, 0);
|
||||||
|
transform: translate(-18px, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,36 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<Loading1 v-if="loadingType==1"/>
|
||||||
|
<Loading2 v-if="loadingType==2"/>
|
||||||
|
<Loading3 v-if="loadingType==3"/>
|
||||||
|
<Loading4 v-if="loadingType==4"/>
|
||||||
|
<Loading5 v-if="loadingType==5"/>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Loading1 from "./loading1.vue";
|
||||||
|
import Loading2 from "./loading2.vue";
|
||||||
|
import Loading3 from "./loading3.vue";
|
||||||
|
import Loading4 from "./loading4.vue";
|
||||||
|
import Loading5 from "./loading5.vue";
|
||||||
|
export default {
|
||||||
|
components:{Loading1,Loading2,Loading3,Loading4,Loading5},
|
||||||
|
name: 'qiun-loading',
|
||||||
|
props: {
|
||||||
|
loadingType: {
|
||||||
|
type: Number,
|
||||||
|
default: 2
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
422
uni_modules/qiun-data-charts/js_sdk/u-charts/config-echarts.js
Normal file
@ -0,0 +1,422 @@
|
|||||||
|
/*
|
||||||
|
* uCharts®
|
||||||
|
* 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
|
||||||
|
* Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
|
||||||
|
* Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||||
|
* 复制使用请保留本段注释,感谢支持开源!
|
||||||
|
*
|
||||||
|
* uCharts®官方网站
|
||||||
|
* https://www.uCharts.cn
|
||||||
|
*
|
||||||
|
* 开源地址:
|
||||||
|
* https://gitee.com/uCharts/uCharts
|
||||||
|
*
|
||||||
|
* uni-app插件市场地址:
|
||||||
|
* http://ext.dcloud.net.cn/plugin?id=271
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
// 通用配置项
|
||||||
|
|
||||||
|
// 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
|
||||||
|
const color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
|
||||||
|
|
||||||
|
const cfe = {
|
||||||
|
//demotype为自定义图表类型
|
||||||
|
"type": ["pie", "ring", "rose", "funnel", "line", "column", "area", "radar", "gauge","candle","demotype"],
|
||||||
|
//增加自定义图表类型,如果需要categories,请在这里加入您的图表类型例如最后的"demotype"
|
||||||
|
"categories": ["line", "column", "area", "radar", "gauge", "candle","demotype"],
|
||||||
|
//instance为实例变量承载属性,option为eopts承载属性,不要删除
|
||||||
|
"instance": {},
|
||||||
|
"option": {},
|
||||||
|
//下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
|
||||||
|
"formatter":{
|
||||||
|
"tooltipDemo1":function(res){
|
||||||
|
let result = ''
|
||||||
|
for (let i in res) {
|
||||||
|
if (i == 0) {
|
||||||
|
result += res[i].axisValueLabel + '年销售额'
|
||||||
|
}
|
||||||
|
let value = '--'
|
||||||
|
if (res[i].data !== null) {
|
||||||
|
value = res[i].data
|
||||||
|
}
|
||||||
|
// #ifdef H5
|
||||||
|
result += '\n' + res[i].seriesName + ':' + value + ' 万元'
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
result += '<br/>' + res[i].marker + res[i].seriesName + ':' + value + ' 万元'
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
legendFormat:function(name){
|
||||||
|
return "自定义图例+"+name;
|
||||||
|
},
|
||||||
|
yAxisFormatDemo:function (value, index) {
|
||||||
|
return value + '元';
|
||||||
|
},
|
||||||
|
seriesFormatDemo:function(res){
|
||||||
|
return res.name + '年' + res.value + '元';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在eopts参数,会将demotype与eopts中option合并后渲染图表。
|
||||||
|
"demotype":{
|
||||||
|
"color": color,
|
||||||
|
//在这里填写echarts的option即可
|
||||||
|
|
||||||
|
},
|
||||||
|
//下面是自定义配置,请添加项目所需的通用配置
|
||||||
|
"column": {
|
||||||
|
"color": color,
|
||||||
|
"title": {
|
||||||
|
"text": ''
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"trigger": 'axis'
|
||||||
|
},
|
||||||
|
"grid": {
|
||||||
|
"top": 30,
|
||||||
|
"bottom": 50,
|
||||||
|
"right": 15,
|
||||||
|
"left": 40
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
"bottom": 'left',
|
||||||
|
},
|
||||||
|
"toolbox": {
|
||||||
|
"show": false,
|
||||||
|
},
|
||||||
|
"xAxis": {
|
||||||
|
"type": 'category',
|
||||||
|
"axisLabel": {
|
||||||
|
"color": '#666666'
|
||||||
|
},
|
||||||
|
"axisLine": {
|
||||||
|
"lineStyle": {
|
||||||
|
"color": '#CCCCCC'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"boundaryGap": true,
|
||||||
|
"data": []
|
||||||
|
},
|
||||||
|
"yAxis": {
|
||||||
|
"type": 'value',
|
||||||
|
"axisTick": {
|
||||||
|
"show": false,
|
||||||
|
},
|
||||||
|
"axisLabel": {
|
||||||
|
"color": '#666666'
|
||||||
|
},
|
||||||
|
"axisLine": {
|
||||||
|
"lineStyle": {
|
||||||
|
"color": '#CCCCCC'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"seriesTemplate": {
|
||||||
|
"name": '',
|
||||||
|
"type": 'bar',
|
||||||
|
"data": [],
|
||||||
|
"barwidth": 20,
|
||||||
|
"label": {
|
||||||
|
"show": true,
|
||||||
|
"color": "#666666",
|
||||||
|
"position": 'top',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"line": {
|
||||||
|
"color": color,
|
||||||
|
"title": {
|
||||||
|
"text": ''
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"trigger": 'axis'
|
||||||
|
},
|
||||||
|
"grid": {
|
||||||
|
"top": 30,
|
||||||
|
"bottom": 50,
|
||||||
|
"right": 15,
|
||||||
|
"left": 40
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
"bottom": 'left',
|
||||||
|
},
|
||||||
|
"toolbox": {
|
||||||
|
"show": false,
|
||||||
|
},
|
||||||
|
"xAxis": {
|
||||||
|
"type": 'category',
|
||||||
|
"axisLabel": {
|
||||||
|
"color": '#666666'
|
||||||
|
},
|
||||||
|
"axisLine": {
|
||||||
|
"lineStyle": {
|
||||||
|
"color": '#CCCCCC'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"boundaryGap": true,
|
||||||
|
"data": []
|
||||||
|
},
|
||||||
|
"yAxis": {
|
||||||
|
"type": 'value',
|
||||||
|
"axisTick": {
|
||||||
|
"show": false,
|
||||||
|
},
|
||||||
|
"axisLabel": {
|
||||||
|
"color": '#666666'
|
||||||
|
},
|
||||||
|
"axisLine": {
|
||||||
|
"lineStyle": {
|
||||||
|
"color": '#CCCCCC'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"seriesTemplate": {
|
||||||
|
"name": '',
|
||||||
|
"type": 'line',
|
||||||
|
"data": [],
|
||||||
|
"barwidth": 20,
|
||||||
|
"label": {
|
||||||
|
"show": true,
|
||||||
|
"color": "#666666",
|
||||||
|
"position": 'top',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"area": {
|
||||||
|
"color": color,
|
||||||
|
"title": {
|
||||||
|
"text": ''
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"trigger": 'axis'
|
||||||
|
},
|
||||||
|
"grid": {
|
||||||
|
"top": 30,
|
||||||
|
"bottom": 50,
|
||||||
|
"right": 15,
|
||||||
|
"left": 40
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
"bottom": 'left',
|
||||||
|
},
|
||||||
|
"toolbox": {
|
||||||
|
"show": false,
|
||||||
|
},
|
||||||
|
"xAxis": {
|
||||||
|
"type": 'category',
|
||||||
|
"axisLabel": {
|
||||||
|
"color": '#666666'
|
||||||
|
},
|
||||||
|
"axisLine": {
|
||||||
|
"lineStyle": {
|
||||||
|
"color": '#CCCCCC'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"boundaryGap": true,
|
||||||
|
"data": []
|
||||||
|
},
|
||||||
|
"yAxis": {
|
||||||
|
"type": 'value',
|
||||||
|
"axisTick": {
|
||||||
|
"show": false,
|
||||||
|
},
|
||||||
|
"axisLabel": {
|
||||||
|
"color": '#666666'
|
||||||
|
},
|
||||||
|
"axisLine": {
|
||||||
|
"lineStyle": {
|
||||||
|
"color": '#CCCCCC'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"seriesTemplate": {
|
||||||
|
"name": '',
|
||||||
|
"type": 'line',
|
||||||
|
"data": [],
|
||||||
|
"areaStyle": {},
|
||||||
|
"label": {
|
||||||
|
"show": true,
|
||||||
|
"color": "#666666",
|
||||||
|
"position": 'top',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"pie": {
|
||||||
|
"color": color,
|
||||||
|
"title": {
|
||||||
|
"text": ''
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"trigger": 'item'
|
||||||
|
},
|
||||||
|
"grid": {
|
||||||
|
"top": 40,
|
||||||
|
"bottom": 30,
|
||||||
|
"right": 15,
|
||||||
|
"left": 15
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
"bottom": 'left',
|
||||||
|
},
|
||||||
|
"seriesTemplate": {
|
||||||
|
"name": '',
|
||||||
|
"type": 'pie',
|
||||||
|
"data": [],
|
||||||
|
"radius": '50%',
|
||||||
|
"label": {
|
||||||
|
"show": true,
|
||||||
|
"color": "#666666",
|
||||||
|
"position": 'top',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"ring": {
|
||||||
|
"color": color,
|
||||||
|
"title": {
|
||||||
|
"text": ''
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"trigger": 'item'
|
||||||
|
},
|
||||||
|
"grid": {
|
||||||
|
"top": 40,
|
||||||
|
"bottom": 30,
|
||||||
|
"right": 15,
|
||||||
|
"left": 15
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
"bottom": 'left',
|
||||||
|
},
|
||||||
|
"seriesTemplate": {
|
||||||
|
"name": '',
|
||||||
|
"type": 'pie',
|
||||||
|
"data": [],
|
||||||
|
"radius": ['40%', '70%'],
|
||||||
|
"avoidLabelOverlap": false,
|
||||||
|
"label": {
|
||||||
|
"show": true,
|
||||||
|
"color": "#666666",
|
||||||
|
"position": 'top',
|
||||||
|
},
|
||||||
|
"labelLine": {
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"rose": {
|
||||||
|
"color": color,
|
||||||
|
"title": {
|
||||||
|
"text": ''
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"trigger": 'item'
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
"top": 'bottom'
|
||||||
|
},
|
||||||
|
"seriesTemplate": {
|
||||||
|
"name": '',
|
||||||
|
"type": 'pie',
|
||||||
|
"data": [],
|
||||||
|
"radius": "55%",
|
||||||
|
"center": ['50%', '50%'],
|
||||||
|
"roseType": 'area',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"funnel": {
|
||||||
|
"color": color,
|
||||||
|
"title": {
|
||||||
|
"text": ''
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"trigger": 'item',
|
||||||
|
"formatter": "{b} : {c}%"
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
"top": 'bottom'
|
||||||
|
},
|
||||||
|
"seriesTemplate": {
|
||||||
|
"name": '',
|
||||||
|
"type": 'funnel',
|
||||||
|
"left": '10%',
|
||||||
|
"top": 60,
|
||||||
|
"bottom": 60,
|
||||||
|
"width": '80%',
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"minSize": '0%',
|
||||||
|
"maxSize": '100%',
|
||||||
|
"sort": 'descending',
|
||||||
|
"gap": 2,
|
||||||
|
"label": {
|
||||||
|
"show": true,
|
||||||
|
"position": 'inside'
|
||||||
|
},
|
||||||
|
"labelLine": {
|
||||||
|
"length": 10,
|
||||||
|
"lineStyle": {
|
||||||
|
"width": 1,
|
||||||
|
"type": 'solid'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"itemStyle": {
|
||||||
|
"bordercolor": '#fff',
|
||||||
|
"borderwidth": 1
|
||||||
|
},
|
||||||
|
"emphasis": {
|
||||||
|
"label": {
|
||||||
|
"fontSize": 20
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"data": [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"gauge": {
|
||||||
|
"color": color,
|
||||||
|
"tooltip": {
|
||||||
|
"formatter": '{a} <br/>{b} : {c}%'
|
||||||
|
},
|
||||||
|
"seriesTemplate": {
|
||||||
|
"name": '业务指标',
|
||||||
|
"type": 'gauge',
|
||||||
|
"detail": {"formatter": '{value}%'},
|
||||||
|
"data": [{"value": 50, "name": '完成率'}]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"candle": {
|
||||||
|
"xAxis": {
|
||||||
|
"data": []
|
||||||
|
},
|
||||||
|
"yAxis": {},
|
||||||
|
"color": color,
|
||||||
|
"title": {
|
||||||
|
"text": ''
|
||||||
|
},
|
||||||
|
"dataZoom": [{
|
||||||
|
"type": 'inside',
|
||||||
|
"xAxisIndex": [0, 1],
|
||||||
|
"start": 10,
|
||||||
|
"end": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"show": true,
|
||||||
|
"xAxisIndex": [0, 1],
|
||||||
|
"type": 'slider',
|
||||||
|
"bottom": 10,
|
||||||
|
"start": 10,
|
||||||
|
"end": 100
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"seriesTemplate": {
|
||||||
|
"name": '',
|
||||||
|
"type": 'k',
|
||||||
|
"data": [],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default cfe;
|
606
uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js
Normal file
@ -0,0 +1,606 @@
|
|||||||
|
/*
|
||||||
|
* uCharts®
|
||||||
|
* 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
|
||||||
|
* Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
|
||||||
|
* Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||||
|
* 复制使用请保留本段注释,感谢支持开源!
|
||||||
|
*
|
||||||
|
* uCharts®官方网站
|
||||||
|
* https://www.uCharts.cn
|
||||||
|
*
|
||||||
|
* 开源地址:
|
||||||
|
* https://gitee.com/uCharts/uCharts
|
||||||
|
*
|
||||||
|
* uni-app插件市场地址:
|
||||||
|
* http://ext.dcloud.net.cn/plugin?id=271
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
// 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
|
||||||
|
const color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
|
||||||
|
|
||||||
|
//事件转换函数,主要用作格式化x轴为时间轴,根据需求自行修改
|
||||||
|
const formatDateTime = (timeStamp, returnType)=>{
|
||||||
|
var date = new Date();
|
||||||
|
date.setTime(timeStamp * 1000);
|
||||||
|
var y = date.getFullYear();
|
||||||
|
var m = date.getMonth() + 1;
|
||||||
|
m = m < 10 ? ('0' + m) : m;
|
||||||
|
var d = date.getDate();
|
||||||
|
d = d < 10 ? ('0' + d) : d;
|
||||||
|
var h = date.getHours();
|
||||||
|
h = h < 10 ? ('0' + h) : h;
|
||||||
|
var minute = date.getMinutes();
|
||||||
|
var second = date.getSeconds();
|
||||||
|
minute = minute < 10 ? ('0' + minute) : minute;
|
||||||
|
second = second < 10 ? ('0' + second) : second;
|
||||||
|
if(returnType == 'full'){return y + '-' + m + '-' + d + ' '+ h +':' + minute + ':' + second;}
|
||||||
|
if(returnType == 'y-m-d'){return y + '-' + m + '-' + d;}
|
||||||
|
if(returnType == 'h:m'){return h +':' + minute;}
|
||||||
|
if(returnType == 'h:m:s'){return h +':' + minute +':' + second;}
|
||||||
|
return [y, m, d, h, minute, second];
|
||||||
|
}
|
||||||
|
|
||||||
|
const cfu = {
|
||||||
|
//demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
|
||||||
|
"type":["pie","ring","rose","word","funnel","map","arcbar","line","column","mount","bar","area","radar","gauge","candle","mix","tline","tarea","scatter","bubble","demotype"],
|
||||||
|
"range":["饼状图","圆环图","玫瑰图","词云图","漏斗图","地图","圆弧进度条","折线图","柱状图","山峰图","条状图","区域图","雷达图","仪表盘","K线图","混合图","时间轴折线","时间轴区域","散点图","气泡图","自定义类型"],
|
||||||
|
//增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
|
||||||
|
//自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
|
||||||
|
"categories":["line","column","mount","bar","area","radar","gauge","candle","mix","demotype"],
|
||||||
|
//instance为实例变量承载属性,不要删除
|
||||||
|
"instance":{},
|
||||||
|
//option为opts及eopts承载属性,不要删除
|
||||||
|
"option":{},
|
||||||
|
//下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
|
||||||
|
"formatter":{
|
||||||
|
"yAxisDemo1":function(val, index, opts){return val+'元'},
|
||||||
|
"yAxisDemo2":function(val, index, opts){return val.toFixed(2)},
|
||||||
|
"xAxisDemo1":function(val, index, opts){return val+'年';},
|
||||||
|
"xAxisDemo2":function(val, index, opts){return formatDateTime(val,'h:m')},
|
||||||
|
"seriesDemo1":function(val, index, series, opts){return val+'元'},
|
||||||
|
"tooltipDemo1":function(item, category, index, opts){
|
||||||
|
if(index==0){
|
||||||
|
return '随便用'+item.data+'年'
|
||||||
|
}else{
|
||||||
|
return '其他我没改'+item.data+'天'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pieDemo":function(val, index, series, opts){
|
||||||
|
if(index !== undefined){
|
||||||
|
return series[index].name+':'+series[index].data+'元'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
//这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
|
||||||
|
"demotype":{
|
||||||
|
//我这里把曲线图当做了自定义图表类型,您可以根据需要随意指定类型或配置
|
||||||
|
"type": "line",
|
||||||
|
"color": color,
|
||||||
|
"padding": [15,10,0,15],
|
||||||
|
"xAxis": {
|
||||||
|
"disableGrid": true,
|
||||||
|
},
|
||||||
|
"yAxis": {
|
||||||
|
"gridType": "dash",
|
||||||
|
"dashLength": 2,
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"line": {
|
||||||
|
"type": "curve",
|
||||||
|
"width": 2
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//下面是自定义配置,请添加项目所需的通用配置
|
||||||
|
"pie":{
|
||||||
|
"type": "pie",
|
||||||
|
"color": color,
|
||||||
|
"padding": [5,5,5,5],
|
||||||
|
"extra": {
|
||||||
|
"pie": {
|
||||||
|
"activeOpacity": 0.5,
|
||||||
|
"activeRadius": 10,
|
||||||
|
"offsetAngle": 0,
|
||||||
|
"labelWidth": 15,
|
||||||
|
"border": true,
|
||||||
|
"borderWidth": 3,
|
||||||
|
"borderColor": "#FFFFFF"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ring":{
|
||||||
|
"type": "ring",
|
||||||
|
"color": color,
|
||||||
|
"padding": [5,5,5,5],
|
||||||
|
"rotate": false,
|
||||||
|
"dataLabel": true,
|
||||||
|
"legend": {
|
||||||
|
"show": true,
|
||||||
|
"position": "right",
|
||||||
|
"lineHeight": 25,
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"name": "收益率",
|
||||||
|
"fontSize": 15,
|
||||||
|
"color": "#666666"
|
||||||
|
},
|
||||||
|
"subtitle": {
|
||||||
|
"name": "70%",
|
||||||
|
"fontSize": 25,
|
||||||
|
"color": "#7cb5ec"
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"ring": {
|
||||||
|
"ringWidth":30,
|
||||||
|
"activeOpacity": 0.5,
|
||||||
|
"activeRadius": 10,
|
||||||
|
"offsetAngle": 0,
|
||||||
|
"labelWidth": 15,
|
||||||
|
"border": true,
|
||||||
|
"borderWidth": 3,
|
||||||
|
"borderColor": "#FFFFFF"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"rose":{
|
||||||
|
"type": "rose",
|
||||||
|
"color": color,
|
||||||
|
"padding": [5,5,5,5],
|
||||||
|
"legend": {
|
||||||
|
"show": true,
|
||||||
|
"position": "left",
|
||||||
|
"lineHeight": 25,
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"rose": {
|
||||||
|
"type": "area",
|
||||||
|
"minRadius": 50,
|
||||||
|
"activeOpacity": 0.5,
|
||||||
|
"activeRadius": 10,
|
||||||
|
"offsetAngle": 0,
|
||||||
|
"labelWidth": 15,
|
||||||
|
"border": false,
|
||||||
|
"borderWidth": 2,
|
||||||
|
"borderColor": "#FFFFFF"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"word":{
|
||||||
|
"type": "word",
|
||||||
|
"color": color,
|
||||||
|
"extra": {
|
||||||
|
"word": {
|
||||||
|
"type": "normal",
|
||||||
|
"autoColors": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"funnel":{
|
||||||
|
"type": "funnel",
|
||||||
|
"color": color,
|
||||||
|
"padding": [15,15,0,15],
|
||||||
|
"extra": {
|
||||||
|
"funnel": {
|
||||||
|
"activeOpacity": 0.3,
|
||||||
|
"activeWidth": 10,
|
||||||
|
"border": true,
|
||||||
|
"borderWidth": 2,
|
||||||
|
"borderColor": "#FFFFFF",
|
||||||
|
"fillOpacity": 1,
|
||||||
|
"labelAlign": "right"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"map":{
|
||||||
|
"type": "map",
|
||||||
|
"color": color,
|
||||||
|
"padding": [0,0,0,0],
|
||||||
|
"dataLabel": true,
|
||||||
|
"extra": {
|
||||||
|
"map": {
|
||||||
|
"border": true,
|
||||||
|
"borderWidth": 1,
|
||||||
|
"borderColor": "#666666",
|
||||||
|
"fillOpacity": 0.6,
|
||||||
|
"activeBorderColor": "#F04864",
|
||||||
|
"activeFillColor": "#FACC14",
|
||||||
|
"activeFillOpacity": 1
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"arcbar":{
|
||||||
|
"type": "arcbar",
|
||||||
|
"color": color,
|
||||||
|
"title": {
|
||||||
|
"name": "百分比",
|
||||||
|
"fontSize": 25,
|
||||||
|
"color": "#00FF00"
|
||||||
|
},
|
||||||
|
"subtitle": {
|
||||||
|
"name": "默认标题",
|
||||||
|
"fontSize": 15,
|
||||||
|
"color": "#666666"
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"arcbar": {
|
||||||
|
"type": "default",
|
||||||
|
"width": 12,
|
||||||
|
"backgroundColor": "#E9E9E9",
|
||||||
|
"startAngle": 0.75,
|
||||||
|
"endAngle": 0.25,
|
||||||
|
"gap": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"line":{
|
||||||
|
"type": "line",
|
||||||
|
"color": color,
|
||||||
|
"padding": [15,10,0,15],
|
||||||
|
"xAxis": {
|
||||||
|
"disableGrid": true,
|
||||||
|
},
|
||||||
|
"yAxis": {
|
||||||
|
"gridType": "dash",
|
||||||
|
"dashLength": 2,
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"line": {
|
||||||
|
"type": "straight",
|
||||||
|
"width": 2,
|
||||||
|
"activeType": "hollow"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tline":{
|
||||||
|
"type": "line",
|
||||||
|
"color": color,
|
||||||
|
"padding": [15,10,0,15],
|
||||||
|
"xAxis": {
|
||||||
|
"disableGrid": false,
|
||||||
|
"boundaryGap":"justify",
|
||||||
|
},
|
||||||
|
"yAxis": {
|
||||||
|
"gridType": "dash",
|
||||||
|
"dashLength": 2,
|
||||||
|
"data":[
|
||||||
|
{
|
||||||
|
"min":0,
|
||||||
|
"max":80
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"line": {
|
||||||
|
"type": "curve",
|
||||||
|
"width": 2,
|
||||||
|
"activeType": "hollow"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tarea":{
|
||||||
|
"type": "area",
|
||||||
|
"color": color,
|
||||||
|
"padding": [15,10,0,15],
|
||||||
|
"xAxis": {
|
||||||
|
"disableGrid": true,
|
||||||
|
"boundaryGap":"justify",
|
||||||
|
},
|
||||||
|
"yAxis": {
|
||||||
|
"gridType": "dash",
|
||||||
|
"dashLength": 2,
|
||||||
|
"data":[
|
||||||
|
{
|
||||||
|
"min":0,
|
||||||
|
"max":80
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"area": {
|
||||||
|
"type": "curve",
|
||||||
|
"opacity": 0.2,
|
||||||
|
"addLine": true,
|
||||||
|
"width": 2,
|
||||||
|
"gradient": true,
|
||||||
|
"activeType": "hollow"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"column":{
|
||||||
|
"type": "column",
|
||||||
|
"color": color,
|
||||||
|
"padding": [15,15,0,5],
|
||||||
|
"xAxis": {
|
||||||
|
"disableGrid": true,
|
||||||
|
},
|
||||||
|
"yAxis": {
|
||||||
|
"data":[{"min":0}]
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"column": {
|
||||||
|
"type": "group",
|
||||||
|
"width": 30,
|
||||||
|
"activeBgColor": "#000000",
|
||||||
|
"activeBgOpacity": 0.08
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mount":{
|
||||||
|
"type": "mount",
|
||||||
|
"color": color,
|
||||||
|
"padding": [15,15,0,5],
|
||||||
|
"xAxis": {
|
||||||
|
"disableGrid": true,
|
||||||
|
},
|
||||||
|
"yAxis": {
|
||||||
|
"data":[{"min":0}]
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"mount": {
|
||||||
|
"type": "mount",
|
||||||
|
"widthRatio": 1.5,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"bar":{
|
||||||
|
"type": "bar",
|
||||||
|
"color": color,
|
||||||
|
"padding": [15,30,0,5],
|
||||||
|
"xAxis": {
|
||||||
|
"boundaryGap":"justify",
|
||||||
|
"disableGrid":false,
|
||||||
|
"min":0,
|
||||||
|
"axisLine":false
|
||||||
|
},
|
||||||
|
"yAxis": {
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"bar": {
|
||||||
|
"type": "group",
|
||||||
|
"width": 30,
|
||||||
|
"meterBorde": 1,
|
||||||
|
"meterFillColor": "#FFFFFF",
|
||||||
|
"activeBgColor": "#000000",
|
||||||
|
"activeBgOpacity": 0.08
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"area":{
|
||||||
|
"type": "area",
|
||||||
|
"color": color,
|
||||||
|
"padding": [15,15,0,15],
|
||||||
|
"xAxis": {
|
||||||
|
"disableGrid": true,
|
||||||
|
},
|
||||||
|
"yAxis": {
|
||||||
|
"gridType": "dash",
|
||||||
|
"dashLength": 2,
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"area": {
|
||||||
|
"type": "straight",
|
||||||
|
"opacity": 0.2,
|
||||||
|
"addLine": true,
|
||||||
|
"width": 2,
|
||||||
|
"gradient": false,
|
||||||
|
"activeType": "hollow"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"radar":{
|
||||||
|
"type": "radar",
|
||||||
|
"color": color,
|
||||||
|
"padding": [5,5,5,5],
|
||||||
|
"dataLabel": false,
|
||||||
|
"legend": {
|
||||||
|
"show": true,
|
||||||
|
"position": "right",
|
||||||
|
"lineHeight": 25,
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"radar": {
|
||||||
|
"gridType": "radar",
|
||||||
|
"gridColor": "#CCCCCC",
|
||||||
|
"gridCount": 3,
|
||||||
|
"opacity": 0.2,
|
||||||
|
"max": 200,
|
||||||
|
"labelShow": true
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gauge":{
|
||||||
|
"type": "gauge",
|
||||||
|
"color": color,
|
||||||
|
"title": {
|
||||||
|
"name": "66Km/H",
|
||||||
|
"fontSize": 25,
|
||||||
|
"color": "#2fc25b",
|
||||||
|
"offsetY": 50
|
||||||
|
},
|
||||||
|
"subtitle": {
|
||||||
|
"name": "实时速度",
|
||||||
|
"fontSize": 15,
|
||||||
|
"color": "#1890ff",
|
||||||
|
"offsetY": -50
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"gauge": {
|
||||||
|
"type": "default",
|
||||||
|
"width": 30,
|
||||||
|
"labelColor": "#666666",
|
||||||
|
"startAngle": 0.75,
|
||||||
|
"endAngle": 0.25,
|
||||||
|
"startNumber": 0,
|
||||||
|
"endNumber": 100,
|
||||||
|
"labelFormat": "",
|
||||||
|
"splitLine": {
|
||||||
|
"fixRadius": 0,
|
||||||
|
"splitNumber": 10,
|
||||||
|
"width": 30,
|
||||||
|
"color": "#FFFFFF",
|
||||||
|
"childNumber": 5,
|
||||||
|
"childWidth": 12
|
||||||
|
},
|
||||||
|
"pointer": {
|
||||||
|
"width": 24,
|
||||||
|
"color": "auto"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"candle":{
|
||||||
|
"type": "candle",
|
||||||
|
"color": color,
|
||||||
|
"padding": [15,15,0,15],
|
||||||
|
"enableScroll": true,
|
||||||
|
"enableMarkLine": true,
|
||||||
|
"dataLabel": false,
|
||||||
|
"xAxis": {
|
||||||
|
"labelCount": 4,
|
||||||
|
"itemCount": 40,
|
||||||
|
"disableGrid": true,
|
||||||
|
"gridColor": "#CCCCCC",
|
||||||
|
"gridType": "solid",
|
||||||
|
"dashLength": 4,
|
||||||
|
"scrollShow": true,
|
||||||
|
"scrollAlign": "left",
|
||||||
|
"scrollColor": "#A6A6A6",
|
||||||
|
"scrollBackgroundColor": "#EFEBEF"
|
||||||
|
},
|
||||||
|
"yAxis": {
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"candle": {
|
||||||
|
"color": {
|
||||||
|
"upLine": "#f04864",
|
||||||
|
"upFill": "#f04864",
|
||||||
|
"downLine": "#2fc25b",
|
||||||
|
"downFill": "#2fc25b"
|
||||||
|
},
|
||||||
|
"average": {
|
||||||
|
"show": true,
|
||||||
|
"name": ["MA5","MA10","MA30"],
|
||||||
|
"day": [5,10,20],
|
||||||
|
"color": ["#1890ff","#2fc25b","#facc14"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"markLine": {
|
||||||
|
"type": "dash",
|
||||||
|
"dashLength": 5,
|
||||||
|
"data": [
|
||||||
|
{
|
||||||
|
"value": 2150,
|
||||||
|
"lineColor": "#f04864",
|
||||||
|
"showLabel": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": 2350,
|
||||||
|
"lineColor": "#f04864",
|
||||||
|
"showLabel": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mix":{
|
||||||
|
"type": "mix",
|
||||||
|
"color": color,
|
||||||
|
"padding": [15,15,0,15],
|
||||||
|
"xAxis": {
|
||||||
|
"disableGrid": true,
|
||||||
|
},
|
||||||
|
"yAxis": {
|
||||||
|
"disabled": false,
|
||||||
|
"disableGrid": false,
|
||||||
|
"splitNumber": 5,
|
||||||
|
"gridType": "dash",
|
||||||
|
"dashLength": 4,
|
||||||
|
"gridColor": "#CCCCCC",
|
||||||
|
"padding": 10,
|
||||||
|
"showTitle": true,
|
||||||
|
"data": []
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"mix": {
|
||||||
|
"column": {
|
||||||
|
"width": 20
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scatter":{
|
||||||
|
"type": "scatter",
|
||||||
|
"color":color,
|
||||||
|
"padding":[15,15,0,15],
|
||||||
|
"dataLabel":false,
|
||||||
|
"xAxis": {
|
||||||
|
"disableGrid": false,
|
||||||
|
"gridType":"dash",
|
||||||
|
"splitNumber":5,
|
||||||
|
"boundaryGap":"justify",
|
||||||
|
"min":0
|
||||||
|
},
|
||||||
|
"yAxis": {
|
||||||
|
"disableGrid": false,
|
||||||
|
"gridType":"dash",
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"scatter": {
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"bubble":{
|
||||||
|
"type": "bubble",
|
||||||
|
"color":color,
|
||||||
|
"padding":[15,15,0,15],
|
||||||
|
"xAxis": {
|
||||||
|
"disableGrid": false,
|
||||||
|
"gridType":"dash",
|
||||||
|
"splitNumber":5,
|
||||||
|
"boundaryGap":"justify",
|
||||||
|
"min":0,
|
||||||
|
"max":250
|
||||||
|
},
|
||||||
|
"yAxis": {
|
||||||
|
"disableGrid": false,
|
||||||
|
"gridType":"dash",
|
||||||
|
"data":[{
|
||||||
|
"min":0,
|
||||||
|
"max":150
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
"legend": {
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"bubble": {
|
||||||
|
"border":2,
|
||||||
|
"opacity": 0.5,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default cfu;
|
5
uni_modules/qiun-data-charts/js_sdk/u-charts/readme.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# uCharts JSSDK说明
|
||||||
|
1、如不使用uCharts组件,可直接引用u-charts.js,打包编译后会`自动压缩`,压缩后体积约为`120kb`。
|
||||||
|
2、如果120kb的体积仍需压缩,请手到uCharts官网通过在线定制选择您需要的图表。
|
||||||
|
3、config-ucharts.js为uCharts组件的用户配置文件,升级前请`自行备份config-ucharts.js`文件,以免被强制覆盖。
|
||||||
|
4、config-echarts.js为ECharts组件的用户配置文件,升级前请`自行备份config-echarts.js`文件,以免被强制覆盖。
|
7706
uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.js
Normal file
18
uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.min.js
vendored
Normal file
201
uni_modules/qiun-data-charts/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.
|
80
uni_modules/qiun-data-charts/package.json
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
{
|
||||||
|
"id": "qiun-data-charts",
|
||||||
|
"displayName": "秋云 ucharts echarts 高性能跨全端图表组件",
|
||||||
|
"version": "2.5.0-20230101",
|
||||||
|
"description": "uCharts 新增正负柱状图!支持H5及APP用 ucharts echarts 渲染图表,uniapp可视化首选组件",
|
||||||
|
"keywords": [
|
||||||
|
"ucharts",
|
||||||
|
"echarts",
|
||||||
|
"f2",
|
||||||
|
"图表",
|
||||||
|
"可视化"
|
||||||
|
],
|
||||||
|
"repository": "https://gitee.com/uCharts/uCharts",
|
||||||
|
"engines": {
|
||||||
|
},
|
||||||
|
"dcloudext": {
|
||||||
|
"sale": {
|
||||||
|
"regular": {
|
||||||
|
"price": "0.00"
|
||||||
|
},
|
||||||
|
"sourcecode": {
|
||||||
|
"price": "0.00"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"qq": "474119"
|
||||||
|
},
|
||||||
|
"declaration": {
|
||||||
|
"ads": "无",
|
||||||
|
"data": "插件不采集任何数据",
|
||||||
|
"permissions": "无"
|
||||||
|
},
|
||||||
|
"npmurl": "https://www.npmjs.com/~qiun",
|
||||||
|
"type": "component-vue"
|
||||||
|
},
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
84
uni_modules/qiun-data-charts/readme.md
Normal file
@ -0,0 +1,84 @@
|
|||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
[](https://gitee.com/uCharts/uCharts/stargazers)
|
||||||
|
[](https://gitee.com/uCharts/uCharts/members)
|
||||||
|
[](https://www.apache.org/licenses/LICENSE-2.0.html)
|
||||||
|
[](https://www.npmjs.com/~qiun)
|
||||||
|
|
||||||
|
|
||||||
|
## uCharts简介
|
||||||
|
|
||||||
|
`uCharts`是一款基于`canvas API`开发的适用于所有前端应用的图表库,开发者编写一套代码,可运行到 Web、iOS、Android(基于 uni-app / taro )、以及各种小程序(微信/支付宝/百度/头条/飞书/QQ/快手/钉钉/淘宝)、快应用等更多支持 canvas API 的平台。
|
||||||
|
|
||||||
|
## 官方网站
|
||||||
|
|
||||||
|
## [https://www.ucharts.cn](https://www.ucharts.cn)
|
||||||
|
|
||||||
|
## 快速体验
|
||||||
|
|
||||||
|
一套代码编到多个平台,依次扫描二维码,亲自体验uCharts图表跨平台效果!其他平台请自行编译。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 致开发者
|
||||||
|
|
||||||
|
感谢各位开发者`五年`来对秋云及uCharts的支持,uCharts的进步离不开各位开发者的鼓励与贡献。为更好的帮助各位开发者使用图表工具,我们推出了新版官网,增加了在线定制、问答社区、在线配置等一些增值服务,为确保您能更好的应用图表组件,建议您先`仔细阅读官网指南`以及`常见问题`,而不是下载下来`直接使用`。如仍然不能解决,请到`官网社区`或开通会员后加入`专属VIP会员群`提问将会很快得到回答。
|
||||||
|
|
||||||
|
## 视频教程
|
||||||
|
|
||||||
|
## [uCharts新手入门教程](https://www.bilibili.com/video/BV1qA411Q7se/?share_source=copy_web&vd_source=42a1242f9aaade6427736af69eb2e1d9)
|
||||||
|
|
||||||
|
|
||||||
|
## 社群支持
|
||||||
|
|
||||||
|
uCharts官方拥有5个2000人的QQ群及专属VIP会员群支持,庞大的用户量证明我们一直在努力,请各位放心使用!uCharts的开源图表组件的开发,团队付出了大量的时间与精力,经过四来的考验,不会有比较明显的bug,请各位放心使用。如果您有更好的想法,可以在`码云提交Pull Requests`以帮助更多开发者完成需求,再次感谢各位对uCharts的鼓励与支持!
|
||||||
|
|
||||||
|
#### 官方交流群
|
||||||
|
- 交流群1:371774600(已满)
|
||||||
|
- 交流群2:619841586(已满)
|
||||||
|
- 交流群3:955340127(已满)
|
||||||
|
- 交流群4:641669795(已满)
|
||||||
|
- 交流群5:236294809(只能扫码加入)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
- 口令`uniapp`
|
||||||
|
|
||||||
|
#### 专属VIP会员群
|
||||||
|
- 开通会员后详见【账号详情】页面中顶部的滚动通知
|
||||||
|
- 口令`您的用户ID`
|
||||||
|
|
||||||
|
## 版权信息
|
||||||
|
|
||||||
|
uCharts始终坚持开源,遵循 [Apache Licence 2.0](https://www.apache.org/licenses/LICENSE-2.0.html) 开源协议,意味着您无需支付任何费用,即可将uCharts应用到您的产品中。
|
||||||
|
|
||||||
|
注意:这并不意味着您可以将uCharts应用到非法的领域,比如涉及赌博,暴力等方面。如因此产生纠纷或法律问题,uCharts相关方及秋云科技不承担任何责任。
|
||||||
|
|
||||||
|
## 合作伙伴
|
||||||
|
|
||||||
|
[](https://www.diygw.com/)
|
||||||
|
[](https://gitee.com/howcode/has-chat)
|
||||||
|
[](https://www.uviewui.com/)
|
||||||
|
[](https://ext.dcloud.net.cn/plugin?id=7088)
|
||||||
|
[](https://ext.dcloud.net.cn/publisher?id=202)
|
||||||
|
[](https://www.firstui.cn/)
|
||||||
|
[](https://ext.dcloud.net.cn/plugin?id=5169)
|
||||||
|
[](https://www.graceui.com/)
|
||||||
|
|
||||||
|
|
||||||
|
## 更新记录
|
||||||
|
|
||||||
|
详见官网指南中说明,[点击此处查看](https://www.ucharts.cn/v2/#/guide/index?id=100)
|
||||||
|
|
||||||
|
|
||||||
|
## 相关链接
|
||||||
|
- [uCharts官网](https://www.ucharts.cn)
|
||||||
|
- [DCloud插件市场地址](https://ext.dcloud.net.cn/plugin?id=271)
|
||||||
|
- [uCharts码云开源托管地址](https://gitee.com/uCharts/uCharts) [](https://gitee.com/uCharts/uCharts/stargazers)
|
||||||
|
- [uCharts npm开源地址](https://www.ucharts.cn)
|
||||||
|
- [ECharts官网](https://echarts.apache.org/zh/index.html)
|
||||||
|
- [ECharts配置手册](https://echarts.apache.org/zh/option.html)
|
||||||
|
- [图表组件在项目中的应用 ReportPlus数据报表](https://www.ucharts.cn/v2/#/layout/info?id=1)
|