Commit 67b7f24a authored by Facius's avatar Facius

Merge branch 'dev-v1.0.0' into test

parents c93219e7 0329c8dc
const UNI_APP = {
apiUrl: 'http://192.168.0.204:8760',
apiUrl: 'http://192.168.1.22:8760',
qn_base_url: 'https://qn-static.banshouhui.com/study/',
qn_asset_url: 'http://deudn.c.pp.cc/',
qn_asset_url: 'https://img2.banshouhui.com/',
uCenterUrl: 'http://192.168.0.5:8093/', //'http://rest-u.yunya.com/'
argoDebugMode: 1,
version: 'v1.0.0',
......
......@@ -89,6 +89,13 @@ let learnApiFun = function(vm) {
// 检查是否具有体验资格
let checkGetQuestion = async (questionWarehouseId) =>
await vm.$u.get('/rest/question/checkGetQuestion/' + questionWarehouseId)
// 每日一练统计
let everyTaskList = async (questionWarehouseId, params = {}) =>
await vm.$u.get(
'/rest/question/query/everyTaskList/' + questionWarehouseId,
params
)
const learnApi = {
getQuestion,
getQuestionTotal,
......@@ -111,6 +118,7 @@ let learnApiFun = function(vm) {
bindCard,
searchQuestion,
checkGetQuestion,
everyTaskList,
}
return learnApi
}
......
......@@ -14,21 +14,32 @@ let userApiFun = function(vm) {
//验证身份证反面
let checkIdCardBack = async (params = {}) =>
await vm.$u.post(uCenterUrl + 'v1/settled/card-back', params)
//获取国家证列表
let getCountryCertList = async (params = {}) =>
await vm.$u.post(apiUrl + '/rest/certificate/query', params)
//获取学时证列表
let getlearnCertList = async (params = {}) =>
await vm.$u.get(apiUrl + '/rest/question/getSchoolCertificate', params)
let getlearnCertDetail = async (questionWarehouseId, params = {}) =>
//获取学时证详情
let getlearnCertDetail = async (questionWarehouseId) =>
await vm.$u.get(
apiUrl + '/rest/question/getSchoolCertificate/' + questionWarehouseId,
params
apiUrl + '/rest/question/getSchoolCertificate/' + questionWarehouseId
)
//证书查询结果
let getCertFromOut = async (params = {}) =>
await vm.$u.get(apiUrl + '/rest/certificate/national', params)
//身份证识别
let getCertifyInfoByType = async (type, params = {}) =>
await vm.$u.get(apiUrl + '/student/get/idCard/' + type, params)
//获取学员题库列表
let getUserQuestionWareHouse = async (params = {}) =>
await vm.$u.get(
apiUrl + '/rest/question/query/allStudentQuestionWarehouse',
params
)
//获取用户刷题量
let getUserDoQuestionNum = async (params = {}) =>
await vm.$u.get(apiUrl + '/rest/question/total/question/count', params)
const userApi = {
updateUserInfo,
......@@ -39,6 +50,9 @@ let userApiFun = function(vm) {
getlearnCertList,
getlearnCertDetail,
getCertFromOut,
getCertifyInfoByType,
getUserQuestionWareHouse,
getUserDoQuestionNum,
}
return userApi
}
......
......@@ -44,7 +44,7 @@ const install = (Vue, vm) => {
if (data.code === 0) {
return data.data
} else if (data.code === 401) {
vm.$u.toast(data.msg)
vm.$u.toast('登录过期,请重新登录!')
// 如果不是在登录页,则跳转到登录页
if (route !== 'pages/login/index') {
setTimeout(() => {
......@@ -59,7 +59,7 @@ const install = (Vue, vm) => {
}
} else if (res.statusCode === 401) {
// 登录过期
vm.$u.toast(data.msg)
vm.$u.toast('登录过期,请重新登录!')
if (route !== 'pages/login/index') {
setTimeout(() => {
vm.$u.route('/pages/login/index')
......
This diff is collapsed.
......@@ -6,7 +6,7 @@
共
<text class="label-blue">{{ info.number }}</text
>道精编试题,通过率
<text class="label-blue">{{ $u.random(95, 99) }}%</text>
<text class="label-blue">{{ info.pass || $u.random(95, 99) }}%</text>
</view>
</view>
<u-button
......
......@@ -8,10 +8,10 @@
<view
v-if="key == 'result'"
:class="['result-text', { passed: passed }]"
>{{ resultText }}</view
>{{ data[key] }}</view
>
<view v-else class="content-text">{{ info[key] }}</view>
<view class="unit-text">{{ units[key] }}</view>
<view v-else class="content-text">{{ data[key] }}</view>
<view v-if="units[key]" class="unit-text">{{ units[key] }}</view>
</view>
</view>
</view>
......@@ -32,26 +32,48 @@ export default {
return {}
},
computed: {
data() {
return {
take: this.take,
point: this.info.point,
result: this.resultText,
}
},
take() {
if (this.info.startDatetime && this.info.endDatetime) {
let timesStart = new Date(
this.info.startDatetime.replace(/\-/g, '/')
).getTime()
let timesEnd = new Date(
this.info.endDatetime.replace(/\-/g, '/')
).getTime()
return Math.ceil((timesEnd - timesStart) / 1000 / 60)
}
return 0
},
timeText() {
return this.$u.timeFormat(this.info.date, 'yyyy.mm.dd')
return this.info.endDatetime
? this.info.endDatetime.split(' ')[0].replace(/\-/g, '.')
: this.$u.timeFormat(new Date().getTime(), 'yyyy.mm.dd')
},
labels() {
return {
time: '模考用时',
score: '模考成绩',
take: '模考用时',
point: '模考成绩',
result: '是否及格',
}
},
units() {
return {
time: '分钟',
score: '分',
take: '分钟',
point: '分',
result: '',
}
},
passed() {
// 及格、不及格
return this.info.score >= 60
return this.info.point >= 60
},
resultText() {
return this.passed ? '及格' : '不及格'
......@@ -83,6 +105,7 @@ export default {
padding-top: 16rpx;
display: flex;
align-items: flex-end;
justify-content: center;
.result-text {
font-size: 44rpx;
color: #fa5a49;
......@@ -103,7 +126,7 @@ export default {
.unit-text {
padding-left: 14rpx;
font-weight: 400;
margin-bottom: 11rpx;
margin-bottom: 12rpx;
}
}
}
......
......@@ -7,7 +7,7 @@
@change="swiperChange"
circular
>
<swiper-item v-for="(item, index) in swiperList" :key="index" class="swiper-items">
<swiper-item v-for="(item, i) in swiperList" :key="i">
<view class="u-flex subject">
<view class="title" v-if="item.title"><text class="title-type">{{ titleType[item.type - 1] }}</text>{{ item.title }}</view>
<view class="content">
......@@ -69,8 +69,8 @@ export default {
},
// 值为0禁止切换动画
swiperDuration: {
type: Number,
default: 1000
type: String,
default: '250'
},
// 分页需要传此数据
total: {
......@@ -126,6 +126,7 @@ export default {
this.swiperCurrent = current
},
answerChange(status, lists, userAnswer) {
this.$set(this.swiperList[this.swiperIndex], 'answerList', lists)
this.$set(this.swiperList[this.swiperIndex], 'errShow', this.type === 2 ? true : status === 'fail')
this.$set(this.swiperList[this.swiperIndex], 'submitStatus', true)
this.$emit("answerChange", status, lists, userAnswer)
......@@ -141,6 +142,10 @@ export default {
let info = {}
info.source = e.detail.source
this.$nextTick(() => {
this.swiperCurrent = current
})
// 正向滑动,到下一个的时候
// 是正向衔接
let isLoopPositive = current == START && lastIndex == END
......@@ -177,9 +182,10 @@ export default {
if (currentItem == null) return
info.current = currentItem.index
this.$emit("change", info)
// 记录滑过来的位置,此值对于下一次滑动的计算很重要
this.swiperIndex = current
this.$emit("change", info)
if (this.model === 2) {
this.changeModel()
}
......
......@@ -59,7 +59,6 @@ export default {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
background-color: $uni-bg-color;
position: relative;
flex-direction: column;
}
......@@ -103,4 +102,4 @@ export default {
}
/* #endif */
</style>
</style>
......@@ -18,7 +18,7 @@
"style": {
"navigationBarTitleText": "证书",
"navigationStyle": "custom",
"disableScroll": false
"disableScroll": true
}
},
{
......
......@@ -14,15 +14,11 @@
<u-image :src="topImage" height="116rpx" width="100%"></u-image>
</view>
<view class="table-list">
<view v-if="type == 'country'" class="item">
<view class="name">{{ certName }}</view>
<view class="item" v-for="(data, k) in dataList">
<view class="name">{{ certName[k] }}</view>
<view class="table">
<u-table border-color="#9EA5BB">
<u-tr
v-for="(item, i) in data.certificateTextContent"
:key="i"
class="u-tr"
>
<u-tr v-for="(item, i) in data" :key="i" class="u-tr">
<u-td
v-for="(val, name, index) in item"
:key="index"
......@@ -48,30 +44,33 @@
export default {
data() {
return {
data: {
certificateTextContent: [],
},
dataList: [],
learnData: {},
type: null,
certName: '',
certName: [],
topImage: process.uniEnv.qn_base_url + 'tezhongzuoyepingtai@2x.png',
logDate: null,
}
},
onShow: function() {
onLoad: function() {
this.formatDataByType()
},
computed: {
nowDate() {
var Today = new Date()
let m = Today.getMonth() + 1
let d = Today.getDate()
return (
Today.getFullYear() +
'.' +
(String(m).length > 1 ? m : '0' + m) +
'.' +
(String(d).length > 1 ? d : '0' + d)
)
if (this.logDate) {
console.log('取数据的日期')
return this.logDate.split(' ')[0].replace('-', '.')
} else {
var Today = new Date()
let m = Today.getMonth() + 1
let d = Today.getDate()
return (
Today.getFullYear() +
'.' +
(String(m).length > 1 ? m : '0' + m) +
'.' +
(String(d).length > 1 ? d : '0' + d)
)
}
},
startDate() {
return this.learnData.startDate || ' '
......@@ -111,39 +110,34 @@ export default {
return
}
let certData = getApp().globalData.certItemData
this.certName = certData.certificateName
if (certData.type == 'country') {
console.log('ok')
this.type = 'country'
this.certName = certData.certificateName
let countryData = []
let count = certData.data.count || 2
let list
console.log('data is', certData.data)
if (!certData.data.certificateTextContent) {
let countryData = []
let certName = []
let count, list
for (let k in certData) {
countryData[k] = []
count = certData[k].data.count || 2
certName[k] = certData[k].certificateName.replace('作业', '证')
//格式化表格数据为json
if (!certData[k].data.certificateTextContent) {
list = JSON.parse(
JSON.parse(JSON.stringify(certData.data.certificateContent))
JSON.parse(JSON.stringify(certData[k].data.certificateContent))
)
console.log('list is', list)
} else {
list = certData.data.certificateTextContent
list = certData[k].data.certificateTextContent
}
//组合表格数据
for (let key in list) {
countryData[key] = []
countryData[k][key] = []
for (let i = 1; i <= count; i++) {
countryData[key].push(list[key]['filedName_' + i])
countryData[key].push(list[key]['filedValue_' + i])
countryData[k][key].push(list[key]['filedName_' + i])
countryData[k][key].push(list[key]['filedValue_' + i])
}
}
console.log('data countryData', countryData)
certData.data.certificateTextContent = countryData
this.data = certData.data
console.log('data log', this.data)
} else if (certData.type == 'learn') {
this.type = 'learn'
this.learnData = certData.data
this.logDate = certData[k].logDate || null
}
this.certName = certName
this.dataList = countryData
console.log('data redo log', this.dataList)
},
},
}
......@@ -159,23 +153,19 @@ export default {
.begin-answer {
display: flex;
flex-direction: column;
background-color: #2953ff;
background-size: 100% 920rpx;
background-repeat: no-repeat;
height: 120vh;
position: absolute;
top: 0;
background-color: #2953ff;
width: 100%;
height: 100vh;
}
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 30rpx 24rpx 0rpx 24rpx;
padding: 30rpx 24rpx 50rpx 24rpx;
overflow: auto;
height: 100%;
}
.cert-body {
width: 100%;
background-color: #ffffff;
......@@ -188,7 +178,7 @@ export default {
}
.table-list {
margin-top: 20rpx;
margin-bottom: 200rpx;
margin-bottom: 40rpx;
.name {
font-size: 28rpx;
text-align: left;
......@@ -196,6 +186,9 @@ export default {
color: #191c27;
font-weight: bold;
}
.item {
margin-bottom: 20rpx;
}
.table {
/* background-color: #2953ff; */
min-height: 200rpx;
......@@ -211,17 +204,14 @@ export default {
}
}
.foot {
position: absolute;
bottom: 41px;
left: 0;
height: 100rpx;
width: 100%;
text-align: left;
padding-left: 24rpx;
display: flex;
flex-direction: column;
font-size: 28rpx;
color: #5a6073;
margin-bottom: 20rpx;
}
.cert-foot {
height: 100rpx;
......
......@@ -85,16 +85,24 @@ export default {
type: null,
certName: '',
topImage: process.uniEnv.qn_base_url + 'xueshitoubu@2x.png',
workPlace: ''
}
},
onLoad(){
this.$u.api.getUserInfo().then((res) => {
this.workPlace =
res && res.workUnit || null
})
},
onShow: function() {
this.formatDataByType()
},
computed: {
nowDate(){
var Today=new Date();
let m = (Today.getMonth()+1)
let d = Today.getDate()
let m = String(Today.getMonth()+1)
let d = String(Today.getDate())
console.log('d length', d.length)
return (Today.getFullYear() + '.' + (m.length > 1 ? m : '0' + m) + '.' + (d.length > 1 ? d : '0' + d))
},
headPhoto(){
......@@ -113,7 +121,7 @@ export default {
return this.learnData.idCard || ' '
},
company() {
return this.learnData.company || ' '
return this.workPlace
},
subjectName() {
return this.learnData.subjectName || ' '
......@@ -122,13 +130,13 @@ export default {
return this.learnData.institutionName || '模考大师'
},
maxpoint() {
return this.learnData.maxPoint || 0
return this.learnData.maxPoint > 0 && this.learnData.maxPoint || ''
},
learnTime() {
return this.learnData.time || 0
return this.learnData.maxPoint > 0 && this.learnData.time || ''
},
resultForTest() {
return (this.learnData.maxPoint > 80 && '合格') || '不合格'
return this.learnData.maxPoint > 0 && ((this.learnData.maxPoint > 80 && '合格') || '不合格') || ''
},
},
methods: {
......
This diff is collapsed.
......@@ -123,6 +123,8 @@ export default {
loading: false,
canExperience: false, // 体验资格
finishCount: 0,
pass: this.$u.random(95, 99),
isAdd: false, // 题库切换
}
},
computed: {
......@@ -169,7 +171,7 @@ export default {
this.data.questionWarehouse.echoMap.provinceId &&
this.data.questionWarehouse.echoMap.provinceId.fullName,
experience: this.canExperience,
pass: this.$u.random(95, 99) + '%',
pass: this.pass + '%',
days: this.detail.totalDayCount || 0,
today: this.detail.todayCount || 0,
total: this.detail.totalCount || 0,
......@@ -260,7 +262,8 @@ export default {
if (info) {
this.selected = info
page.info = null
this.visible = info.state
this.isAdd = this.selected.isAdd
this.pass = this.$u.random(95, 99)
this.queryMyQuestionWarehouseDetail(this.selected.id)
} else {
this.queryMyQuestionWarehouseDetail(this.info.id || 0)
......@@ -279,6 +282,8 @@ export default {
.checkGetQuestion(id)
.then((res) => {
this.canExperience = res <= 0
this.visible = this.isAdd && this.canExperience
this.isAdd = false
})
.catch((err) => {
console.log(err)
......@@ -339,6 +344,9 @@ export default {
var str = this.info.id ? 'selectedList' : 'selectCategory'
this.$u.route({
url: 'pages/learn/' + str,
params: {
pass: this.pass,
},
})
},
// 每日一练
......@@ -408,8 +416,10 @@ export default {
if (this.info.id) {
// 跳转到学练记录
this.$u.route({
url: 'pages/learn/record?part=',
key,
url: 'pages/learn/record?key=',
params: {
key: key,
},
})
} else {
this.$refs.uToast.show({
......
......@@ -109,6 +109,7 @@ export default {
'workUnit',
],
student: {},
shauTiCount: 0,
}
},
computed: {
......@@ -129,10 +130,14 @@ export default {
return this.userInfo.nickName != undefined
},
loginTips() {
return (this.student && this.student.consumeAmount) || 0
return this.shauTiCount || 0
},
avatar() {
return (this.userInfo && this.userInfo.avatarUrl) || this.pic
return (
(this.student && this.student.avatarPath) ||
(this.userInfo && this.userInfo.avatarUrl) ||
this.pic
)
},
nikeName() {
return (this.userInfo && this.userInfo.nickName) || '点击登录'
......@@ -151,12 +156,19 @@ export default {
return { 'font-size': '32rpx', coloe: '#191C27', 'margin-left': '26rpx' }
},
},
onLoad() {},
onShow() {
if (this.userInfo.nickName) {
this.$u.api.getUserInfo().then((res) => {
this.student = res
getApp().globalData.student = res
this.$u.api
.getUserDoQuestionNum()
.then((ret) => {
this.shauTiCount = ret || 0
})
.catch((err) => {
console.log(err)
})
})
}
},
......@@ -166,7 +178,12 @@ export default {
let length = this.countItem.length
let count = 0
for (let key in this.student) {
if (this.countItem.indexOf(key) != -1 && this.student[key]) {
if (
this.countItem.indexOf(key) != -1 &&
this.student[key] &&
this.student[key] != ' '
) {
console.log('count key', key)
count = count + 1
}
}
......
This diff is collapsed.
......@@ -92,9 +92,11 @@ export default {
id: res.id,
kemu: res.echoMap?.questionWarehouseId?.title,
tishu: `${res.totalPoint}题`,
totalPoint: res.totalPoint,
biaozhun: `${res.passPoint}分`,
passPoint: res.passPoint,
duration: `${res.duration}分钟`,
durationNumber: res.duration,
guize: '根据国家规定比例随机抽取'
}
})
......@@ -117,7 +119,7 @@ export default {
source: 3,
passPoint: this.info.passPoint,
totalPoint: this.info.totalPoint,
duration: this.info.duration
duration: this.info.durationNumber
}
})
}
......
......@@ -10,7 +10,7 @@
></u-navbar>
<view class="body-view">
<view class="image-view"
><image class="image" :src="successImage"></image
><image class="image" :src="kapianImage" mode="widthFix"></image
></view>
<view class="content-view">
<view class="first-line">
......@@ -43,6 +43,9 @@
>手动输入卡号、密码绑定</view
>
</view>
<view>
<u-toast ref="uToast" />
</view>
</view>
</view>
</template>
......@@ -57,6 +60,9 @@ export default {
},
computed: {
kapianImage() {
return process.uniEnv.qn_base_url + 'kapian.png'
},
customStyle() {
return {
height: '104rpx',
......@@ -91,7 +97,7 @@ export default {
onlyFromCamera: true,
success: (res) => {
console.log(res)
if (res.result) {
if (res.result && res.result.length == 15 + 8) {
this.$u.route({
url: 'pages/learn/boundTest',
params: {
......@@ -99,8 +105,22 @@ export default {
// relationId: this.relationId,
},
})
} else {
this.$refs.uToast.show({
title: '未成功识别相关信息',
type: 'error',
duration: 2000,
})
}
},
fail: (err) => {
console.log(err)
this.$refs.uToast.show({
title: '未成功识别相关信息',
type: 'error',
duration: 2000,
})
},
})
},
handleClickBuy() {
......@@ -205,8 +225,7 @@ export default {
text-align: center;
.image {
width: 700rpx;
height: 360rpx;
background-color: red;
// height: 360rpx;
border-radius: 24rpx;
box-shadow: 0px 10px 16px rgba(29, 53, 155, 0.2);
}
......
......@@ -91,6 +91,7 @@
@submit="handleClickSubmit"
>
<view v-for="(value, key) in selected" :key="key" class="pop-content">
<u-icon v-if="key != firstKey" name="arrow-downward"></u-icon>
<view :class="['pop-content-text', { last: key == thirdKey }]"
>{{ value.label
}}<text v-if="key != secondKey"
......@@ -99,7 +100,6 @@
}})</text
></view
>
<u-icon v-if="key != thirdKey" name="arrow-downward"></u-icon>
</view>
</PopView>
<view>
......@@ -231,16 +231,21 @@ export default {
async getProvinceList(id) {
let res = await this.$u.api.getProvinceList(id)
console.log(res)
this.range = res
},
// 学员增加自己的题库
async addQuestionWarehouse(params) {
let res = await this.$u.api.addQuestionWarehouse({ params })
console.log(res)
this.range = res
this.range = res || []
},
async handleClickSubmit() {
if (this.buttonDisabled) return
if (this.range.length <= 0 || this.range.length == null) {
this.$refs.uToast.show({
title: '该类型和区域没有的题库',
type: 'warning',
duration: 1500,
callback: () => {
this.showPop = false
},
})
return
}
if (this.index == 0) {
this.changeIndex()
}
......@@ -262,6 +267,7 @@ export default {
})
if (result) {
data.isAdd = true
this.setPageInfo(data)
// 成功
this.$refs.uToast.show({
......@@ -328,7 +334,6 @@ export default {
var pages = getCurrentPages()
if (pages.length >= 1) {
var page = pages[0]
console.log('--------setPageInfo--------', info)
page.info = info
}
},
......
......@@ -15,10 +15,11 @@
<view class="content-view">
<view class="field-title">学习卡卡号</view>
<view class="field-view">
<input
<u-input
type="number"
class="input-view"
:value="code"
v-model="code"
input-align="center"
placeholder="请输入卡号"
:placeholder-style="placeplaceholderStyle"
cursor-spacing="140"
......@@ -28,10 +29,11 @@
</view>
<view class="field-title">学习卡密码</view>
<view class="field-view">
<input
<u-input
class="input-view"
password
:value="password"
input-align="center"
v-model="password"
placeholder="请输入密码"
:placeholder-style="placeplaceholderStyle"
cursor-spacing="140"
......
This diff is collapsed.
......@@ -209,7 +209,6 @@ export default {
}, 2500)
},
customBack() {
console.log("111", 111)
this.$u.route({
type: 'tab',
url: 'pages/index/index'
......
......@@ -158,7 +158,7 @@ export default {
this.labels[key1][0].push(item)
}
}
for (var i = 0; i < this.labels[key1].length; i++) {
for (var i = 0; i < this.labels[key1][0].length; i++) {
var data = this.labels[key1][0][i]
this.labels[key2][i] = []
for (var item of res) {
......
......@@ -51,6 +51,7 @@ export default {
return {
list: [], // 已选题库列表
loading: true,
currentPass: null,
}
},
computed: {
......@@ -68,6 +69,9 @@ export default {
},
},
onLoad(e) {
if (e && e.pass) {
this.currentPass = e.pass
}
this.loadList() // 获取已选题库列表
},
methods: {
......@@ -94,6 +98,9 @@ export default {
for (var item of res) {
if (item && item.echoMap && item.echoMap.questionWarehouseId) {
item.echoMap.questionWarehouseId.number = item.number
if (item.questionWarehouseId == this.questionWarehouseId) {
item.echoMap.questionWarehouseId.pass = this.currentPass
}
}
}
this.list = res
......
......@@ -139,8 +139,25 @@ function initAnswerCardList(total, vm) {
}
}
const diffTime = function diffTime(startDate, endDate) {
let diff = endDate.getTime() - startDate //.getTime();//时间差的毫秒数
//计算出相差天数
let days = Math.floor(diff / (24 * 3600 * 1000))
//计算出小时数
let leave1 = diff % (24 * 3600 * 1000) //计算天数后剩余的毫秒数
let hours = Math.floor(leave1 / (3600 * 1000))
//计算相差分钟数
let leave2 = leave1 % (3600 * 1000) //计算小时数后剩余的毫秒数
let minutes = Math.floor(leave2 / (60 * 1000))
//计算相差秒数
let leave3 = leave2 % (60 * 1000) //计算分钟数后剩余的毫秒数
let seconds = Math.round(leave3 / 1000)
return seconds
}
module.exports = {
TOTAL: TOTAL,
diffTime: diffTime,
request: request,
requestMulti: requestMulti,
getInitcurrentPage: getInitcurrentPage,
......
This diff is collapsed.
......@@ -150,15 +150,16 @@ export default {
upload.getPhoto(1, this.token).then((res) => {
this.student.identityFrontPath = res.key
this.$u.api
.checkIdCardFront({ id_card_front: res.key })
.then(() => {})
.getCertifyInfoByType('front', {
url: process.uniEnv.qn_asset_url + res.key,
})
.then((res) => {
console.log('识别结果', res)
this.student.name = res.name
this.student.identityNumber = res.number
})
.catch((data) => {
if (data.errMsg == 'request:ok') {
this.student.name = data.data.id_card_name
this.student.identityNumber = data.data.id_card_number
} else {
this.$u.toast('识别身份证信息错误')
}
this.$u.toast('识别身份证信息错误')
})
})
},
......@@ -167,14 +168,15 @@ export default {
upload.getPhoto(1, this.token).then((res) => {
this.student.identityBackPath = res.key
this.$u.api
.checkIdCardBack({ id_card_back: res.key })
.then(() => {})
.getCertifyInfoByType('back', {
url: process.uniEnv.qn_asset_url + res.key,
})
.then((res) => {
console.log('识别结果', res)
this.student.certificateValidityDate = res.expire
})
.catch((data) => {
if (data.errMsg == 'request:ok') {
this.student.certificateValidityDate = data.data.id_card_expire
} else {
this.$u.toast('识别身份证信息错误')
}
this.$u.toast('识别身份证信息错误')
})
})
},
......
......@@ -47,10 +47,6 @@ export default {
},
methods: {
submit() {
if (this.student.workUnit == '') {
this.$u.toast('请输入工作单位名称')
return
}
this.$u.api
.updateUserInfo({
workUnit: this.student.workUnit,
......
......@@ -10,8 +10,11 @@
></u-navbar>
<view class="content">
<view class="kf-body">
<view>
<u-image width="100%" height="240rpx" :src="topBgImg"></u-image>
</view>
<view class="kf-image">
<u-image width="436rpx" height="436rpx" :src="erweima"></u-image>
<u-image width="400rpx" height="400rpx" :src="erweima"></u-image>
</view>
<view class="tips">
长按识别二维码添加官方客服
......@@ -25,7 +28,8 @@
export default {
data() {
return {
erweima: process.uniEnv.qn_base_url + 'kefuerweima@3x.png',
topBgImg: process.uniEnv.qn_base_url + 'kefu@2x.png',
erweima: process.uniEnv.qn_base_url + 'kefuerweima@2x.png',
}
},
}
......@@ -55,7 +59,7 @@ export default {
flex-direction: column;
align-items: center;
justify-content: center;
padding: 130rpx 24rpx 0rpx 24rpx;
padding: 50rpx 24rpx 0rpx 24rpx;
}
.kf-body {
......@@ -67,13 +71,13 @@ export default {
}
.kf-image {
margin-left: 132rpx;
margin-top: 160rpx;
margin-left: 160rpx;
margin-top: 80rpx;
}
.tips {
color: #5a6073;
font-size: 28rpx;
margin-top: 114rpx;
margin-top: 50rpx;
}
</style>
......@@ -24,15 +24,10 @@
></u-image>
</view>
</u-cell-item>
<u-cell-item
title="证件照"
@click="changeCertPhoto"
:arrow="false"
:hover-class="none"
>
<u-cell-item title="证件照" @click="changeCertPhoto">
<view slot="right-icon">
<u-image
v-if="isupLoadCertPhoto"
v-if="headCertPhoto"
width="92rpx"
height="120rpx"
:src="headCertPhoto"
......@@ -40,13 +35,12 @@
<text v-else style="color:#2953FF">去上传</text>
</view>
</u-cell-item>
<u-cell-item title="手机号" :arrow="false" :hover-class="none">
<u-cell-item title="手机号">
<view slot="right-icon">
<button
hover-class="none"
class="mobile-button"
open-type="getPhoneNumber"
@getphonenumber="getPhonenumber"
style="background: none;font-size: 26rpx;padding-right: 0;"
>
<text v-if="getMobile">{{ getMobile }}</text>
<text v-else class="empty-value">去绑定</text>
......@@ -82,7 +76,9 @@ import login from '@/common/login'
export default {
data() {
return {
student: {},
student: {
isCertify: false,
},
token: null,
code: '',
}
......@@ -94,13 +90,11 @@ export default {
)
},
headCertPhoto() {
return (
(this.student && this.student.certificatePhotoPath) ||
process.uniEnv.qn_base_url + 'xitongtouxiang.png'
console.log(
'touxiang bianle',
this.student ? this.student.certificatePhotoPath : 'kong'
)
},
isupLoadCertPhoto() {
return (this.student && this.student.identityNumber) || false
return (this.student && this.student.certificatePhotoPath) || false
},
getMobile() {
return (
......@@ -115,21 +109,27 @@ export default {
return (this.student && this.student.workUnit) || '去填写'
},
getCertifyStatus() {
return this.student && this.student.isCertify ? '已认证' : '去认证'
console.log('is cert', this.student.isCertify)
return this.student.isCertify ? '已认证' : '去认证'
},
},
onLoad() {
this.$u.api
.getQiNiuToken({ bucketName: 'banshou-userprofile' })
.then((res) => {
this.token = data.data.token //token为七牛云的token一般由后台接口提供
getApp().globalData.qiNiuToken = data.data.token
console.log('chushihua token', res)
this.token = res //token为七牛云的token一般由后台接口提供
getApp().globalData.qiNiuToken = res
})
this.$u.api.getUserInfo().then((res) => {
if (res && res.identityNumber) {
this.student.isCertify = true
console.log('huoqu userinfo', res)
if (res) {
res.isCertify =
res && res.identityNumber && res.identityNumber.length > 5
? true
: false
this.student = res
}
this.student = res
})
},
onShow() {
......
This diff is collapsed.
......@@ -16,7 +16,6 @@
bg-color="#fff"
v-model="keyword"
@custom="search"
@search="search"
></u-search>
</view>
......@@ -32,7 +31,7 @@
>
</view>
<view class="u-flex clear" @click="removeHistory">
<view class="u-flex clear" @click="removeHistory" v-if="history.length > 0">
<image :src="deleteImg"></image>
<view>清空搜索历史记录</view>
</view>
......@@ -113,6 +112,9 @@ export default {
.history {
margin-top: 20rpx;
flex-wrap: wrap;
max-height: 190rpx;
overflow: hidden;
align-items: flex-start;
.history-list {
padding: 20rpx 25rpx;
background: #fff;
......
......@@ -53,6 +53,7 @@ const store = new Vuex.Store({
: '1414854649273384960', // 科目ID
// 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式
vuex_version: '1.0.0',
beginTime: null // 考试开始时间
},
mutations: {
$uStore(state, payload) {
......
This diff is collapsed.
<template>
<view class="chartsview">
<view class="charts-error"></view>
<view class="charts-font">{{errorMessage==null?'请点击重试':errorMessage}}</view>
</view>
</template>
<script>
export default {
name: 'qiun-error',
props: {
errorMessage: {
type: String,
default: null
},
},
data() {
return {
};
},
}
</script>
<style>
.chartsview {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
flex: 1;
justify-content: center;
align-items: center;
}
.charts-font{
font-size: 14px;
color: #CCCCCC;
margin-top: 10px;
}
.charts-error{
width: 128px;
height: 128px;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAUz0lEQVR4Xu1de3Bc1X3+zmp3jYVWfkPAgCWwY8zLEglNQCSW0yT9o2SQaDKdNulUykw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dqZA1d+empgx3zPQ3iobMnN9Bu3AYIPFDcoWu1mc+lBAIADsQDpshhpGEY+gNDLZgfCADoNSQvqPLkTSuxfuNq7IwJhODTCv4YUYunsjkc3f8+Bo7M4v8KYy5cixmPKVxXaWymnDWXLQGGxiVjAmaCoZy1XPbPSon9O+4VHSYhaIdJid2lhJESUzvu1f80nBNhywYA3cY5oOhI8uqlaLk+hfWXPUc1CHAijSOnL2CGXePAZKHBzd0PgEG50jZR6pZrTGXZpWwA+J248Vw4KNAAQDj4ULNVBA6Abz8ru8Ul9SVyITCVbUY/DRsjxLxLSmhdYSYEHh3oEiMch2rm0iXssqHSxI57xfZKU/ChZ+QjAOb1c6XnM+g3T4NKzRc4AIbGZR8TSeaCYzH0Ua8ZIeY8QzXbSBEAcvlSZyvwBKYPndb10LjkBQ1a4NV8P51u8zTQ6eynT+AA8LOIxjO1o0ADALWjfShmjhwACgNPoaCgsnWOO+VLwrJOq3VEDgCGLrbMjdeK0EEGZqr9DpEDgFXgqdpEK50vlsPUQJf/nHwt1///89bqDjCPWPAAAAAASUVORK5CYII=");
background-position: center;
}
</style>
<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>
<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>
<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>
<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>
<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>
# uCharts JSSDK说明
1、如不使用uCharts组件,可直接引用u-charts.js,打包编译后会`自动压缩`,压缩后体积约为`98kb`。
2、如果100kb的体积仍需压缩,请手动删除u-charts.js内您不需要的图表类型,如k线图candle。
3、config-ucharts.js为uCharts组件的用户配置文件,升级前请`自行备份config-ucharts.js`文件,以免被强制覆盖。
3、config-echarts.js为ECharts组件的用户配置文件,升级前请`自行备份config-echarts.js`文件,以免被强制覆盖。
# v1.0转v2.0注意事项
1、opts.colors变更为opts.color
2、ring圆环图的扩展配置由extra.pie变更为extra.ring
3、混合图借用的扩展配置由extra.column变更为extra.mix.column
4、全部涉及到format的格式化属性变更为formatter
5、不需要再传canvasId及$this参数,如果通过uChats获取context,可能会导致this实例混乱,导致小程序开发者工具报错。如果不使用qiun-data-charts官方组件,需要在new uCharts()实例化之前,自行获取canvas的上下文context(ctx),并传入new中的context(opts.context)。为了能跨更多的端,给您带来的不便敬请谅解。
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment