Commit 3b5381ed authored by Facius's avatar Facius

Merge branch 'dev-v1.0.0' of https://git.banshouhui.com/wuzhenzhe/study into dev-v1.0.0

parents 012c7a8e de960bd0
...@@ -4,8 +4,10 @@ let learnApiFun = function(vm) { ...@@ -4,8 +4,10 @@ let learnApiFun = function(vm) {
let getQuestion = async (params = {}) => let getQuestion = async (params = {}) =>
await vm.$u.post('/rest/question/query/getQuestion', params) await vm.$u.post('/rest/question/query/getQuestion', params)
let getQuestionTotal = async (params = {}) => let getQuestionTotal = async (params = {}) =>
await vm.$u.post('/rest/question/query/getQuestionTotal', params) await vm.$u.post('/rest/question/query/getQuestionTotal', params)
let answer = async (params = {}) => let answer = async (params = {}) =>
await vm.$u.post('/rest/question/save/answer', params) await vm.$u.post('/rest/question/save/answer', params)
// 获取科目 // 获取科目
...@@ -31,6 +33,22 @@ let learnApiFun = function(vm) { ...@@ -31,6 +33,22 @@ let learnApiFun = function(vm) {
// 学员增加自己的题库 // 学员增加自己的题库
let addQuestionWarehouse = async (params = {}) => let addQuestionWarehouse = async (params = {}) =>
await vm.$u.post('/rest/question/query/addQuestionWarehouse', params) await vm.$u.post('/rest/question/query/addQuestionWarehouse', params)
let joinCollection = async (params = {}) =>
await vm.$u.get(
'/rest/question/join/collection/' + params.questionId,
params
)
let removeCollection = async (params = {}) =>
await vm.$u.get(
'/rest/question/remove/collection/' + params.questionId,
params
)
let removeError = async (params = {}) =>
await vm.$u.get('/rest/question/remove/error/' + params.questionId, params)
const learnApi = { const learnApi = {
getQuestion, getQuestion,
getQuestionTotal, getQuestionTotal,
...@@ -40,6 +58,9 @@ let learnApiFun = function(vm) { ...@@ -40,6 +58,9 @@ let learnApiFun = function(vm) {
getProvinceList, getProvinceList,
queryMyQuestionWarehouseDetail, queryMyQuestionWarehouseDetail,
addQuestionWarehouse, addQuestionWarehouse,
joinCollection,
removeCollection,
removeError,
} }
return learnApi return learnApi
} }
......
...@@ -15,11 +15,22 @@ let userApiFun = function(vm) { ...@@ -15,11 +15,22 @@ let userApiFun = function(vm) {
let checkIdCardBack = async (params = {}) => let checkIdCardBack = async (params = {}) =>
await vm.$u.post(uCenterUrl + 'v1/settled/card-back', params) await vm.$u.post(uCenterUrl + 'v1/settled/card-back', params)
let getCertList = async (params = {}) =>
await vm.$u.post(apiUrl + '/rest/certificate/query', params)
let getUserQuestionWareHouse = async (params = {}) =>
await vm.$u.get(
apiUrl + '/rest/question/query/getMyQuestionWarehouseList',
params
)
const userApi = { const userApi = {
updateUserInfo, updateUserInfo,
getUserInfo, getUserInfo,
checkIdCardFront, checkIdCardFront,
checkIdCardBack, checkIdCardBack,
getCertList,
getUserQuestionWareHouse,
} }
return userApi return userApi
} }
......
...@@ -86,7 +86,7 @@ export default { ...@@ -86,7 +86,7 @@ export default {
getCheckedNum() { getCheckedNum() {
const num = this.lists.filter((v) => v.checked) const num = this.lists.filter((v) => v.checked)
return num.length > 1 ? true : false return num.length > 1 ? true : false
}, }
}, },
methods: { methods: {
select(index) { select(index) {
...@@ -165,27 +165,19 @@ export default { ...@@ -165,27 +165,19 @@ export default {
height: 40rpx; height: 40rpx;
line-height: 40rpx; line-height: 40rpx;
border-radius: 10rpx; border-radius: 10rpx;
background: #2953ff; background: url('https://qn-static.banshouhui.com/study/pass.png') no-repeat;
border: 2rpx solid #2953ff; background-size: 40rpx 40rpx;
text-align: center; text-align: center;
} }
.success:before {
content: '\2714';
color: #fff;
}
.error { .error {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
line-height: 40rpx; line-height: 40rpx;
border-radius: 10rpx; border-radius: 10rpx;
background: #fa5a49; background: url('https://qn-static.banshouhui.com/study/fail.png') no-repeat;
border: 2rpx solid #fa5a49; background-size: 40rpx 40rpx;
text-align: center; text-align: center;
} }
.error:before {
content: '\2716';
color: #fff;
}
.text { .text {
color: #191C27; color: #191C27;
padding-left: 20rpx; padding-left: 20rpx;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="u-flex my-details"> <view class="u-flex my-details">
<view class="u-flex u-row-between top"> <view class="u-flex u-row-between top">
<view>{{ time }}</view> <view>{{ time }}</view>
<view>{{ status }}</view> <view :style="[statusStyle]">{{ status }}</view>
</view> </view>
<view class="u-flex bottom"> <view class="u-flex bottom">
<view class="title">{{ title }}</view> <view class="title">{{ title }}</view>
...@@ -31,6 +31,12 @@ export default { ...@@ -31,6 +31,12 @@ export default {
type: String, type: String,
default: '', default: '',
}, },
statusStyle: {
type: Object,
default() {
return {}
},
},
}, },
} }
</script> </script>
......
...@@ -287,6 +287,7 @@ export default { ...@@ -287,6 +287,7 @@ export default {
margin-right: 10rpx; margin-right: 10rpx;
font-size: 20rpx; font-size: 20rpx;
border-radius: 50rpx; border-radius: 50rpx;
border-radius: 50rpx 0 50rpx 50rpx;
} }
} }
.content, .explain, .btn { .content, .explain, .btn {
......
...@@ -234,6 +234,7 @@ ...@@ -234,6 +234,7 @@
"name": "mineCustomer", "name": "mineCustomer",
"style": { "style": {
"navigationBarTitleText": "联系客服", "navigationBarTitleText": "联系客服",
"navigationStyle": "custom",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"disableScroll": true "disableScroll": true
} }
...@@ -243,6 +244,7 @@ ...@@ -243,6 +244,7 @@
"name": "mineInfo", "name": "mineInfo",
"style": { "style": {
"navigationBarTitleText": "个人信息", "navigationBarTitleText": "个人信息",
"navigationStyle": "custom",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"disableScroll": true "disableScroll": true
} }
...@@ -252,15 +254,17 @@ ...@@ -252,15 +254,17 @@
"name": "mineBank", "name": "mineBank",
"style": { "style": {
"navigationBarTitleText": "我的题库", "navigationBarTitleText": "我的题库",
"navigationStyle": "custom",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"disableScroll": true "disableScroll": true
} }
}, },
{ {
"path": "address", "path": "company",
"name": "mineAddress", "name": "mineCompany",
"style": { "style": {
"navigationBarTitleText": "工作单位", "navigationBarTitleText": "工作单位",
"navigationStyle": "custom",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"disableScroll": true "disableScroll": true
} }
...@@ -270,8 +274,9 @@ ...@@ -270,8 +274,9 @@
"name": "mineCertify", "name": "mineCertify",
"style": { "style": {
"navigationBarTitleText": "实名认证", "navigationBarTitleText": "实名认证",
"navigationStyle": "custom",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"disableScroll": true "disableScroll": false
} }
}, },
{ {
......
...@@ -154,7 +154,7 @@ export default { ...@@ -154,7 +154,7 @@ export default {
if (this.userInfo.nickName) { if (this.userInfo.nickName) {
this.$u.api.getUserInfo().then((res) => { this.$u.api.getUserInfo().then((res) => {
this.student = res this.student = res
getApp().globalData.student getApp().globalData.student = res
}) })
} }
}, },
......
...@@ -51,7 +51,12 @@ ...@@ -51,7 +51,12 @@
<view class="u-flex u-row-around bottom"> <view class="u-flex u-row-around bottom">
<view class="u-flex"> <view class="u-flex">
<view class="c-list"> <view class="c-list">
<u-icon name="grid" color="#5A6073" size="40"></u-icon> <u-image
:src="allImg"
width="36"
height="36"
:lazy-load="false"
/>
<text>{{ currentNumber }}/{{ total }}</text> <text>{{ currentNumber }}/{{ total }}</text>
</view> </view>
</view> </view>
...@@ -59,17 +64,23 @@ ...@@ -59,17 +64,23 @@
<view <view
class="c-list" class="c-list"
v-if="type === 1 || type === 3" v-if="type === 1 || type === 3"
@click="collection" @click="collection(collectionFlag)"
> >
<u-icon name="star" color="#5A6073" size="40"></u-icon> <u-icon v-show="!collectionFlag" name="star" color="#5A6073" size="40"></u-icon>
<text>收藏</text> <u-icon v-show="collectionFlag" name="star-fill" color="#FF930D" size="40"></u-icon>
<text>{{ collectionFlag ? '已收藏' : '收藏' }}</text>
</view> </view>
<view class="c-list" v-if="type === 2" @click="handPapers"> <view class="c-list" v-if="type === 2" @click="handPapers">
<u-icon name="file-text" color="#5A6073" size="40"></u-icon> <u-icon name="file-text" color="#5A6073" size="40"></u-icon>
<text>交卷</text> <text>交卷</text>
</view> </view>
<view class="c-list" v-if="type === 4" @click="remove"> <view class="c-list" v-if="type === 4" @click="remove">
<u-icon name="order" color="#5A6073" size="40"></u-icon> <u-image
:src="removeImg"
width="36"
height="40"
:lazy-load="false"
/>
<text>移出</text> <text>移出</text>
</view> </view>
</view> </view>
...@@ -177,7 +188,8 @@ export default { ...@@ -177,7 +188,8 @@ export default {
questionWarehouseId: null, questionWarehouseId: null,
// 1.顺序答题 2.随机练习 3.模拟考试 4.收藏答题 5.错题答题 6.专项练习-单选 7.专项练习-多选 8.专项练习-判断 9.专项练习-答案是 // 1.顺序答题 2.随机练习 3.模拟考试 4.收藏答题 5.错题答题 6.专项练习-单选 7.专项练习-多选 8.专项练习-判断 9.专项练习-答案是
source: 0, source: 0,
recordId: 0 recordId: 0,
currentItem: {}
} }
}, },
computed: { computed: {
...@@ -190,16 +202,25 @@ export default { ...@@ -190,16 +202,25 @@ export default {
} }
return process.uniEnv.qn_base_url + name return process.uniEnv.qn_base_url + name
}, },
allImg() {
return process.uniEnv.qn_base_url + 'all.png'
},
removeImg() {
return process.uniEnv.qn_base_url + 'remove-error.png'
},
currentNumber() { currentNumber() {
let index = this.currentIndex let index = this.currentIndex
return index === -2 ? this.total : index + 1 return index === -2 ? this.total : index + 1
},
collectionFlag() {
const info = this.list.find(v => v.index === this.currentIndex)
return info ? info.collectionFlag : false
} }
}, },
onLoad(e) { onLoad(e) {
this.questionWarehouseId = parseInt(e?.questionWarehouseId) || 1414854649273384960 this.questionWarehouseId = parseInt(e?.questionWarehouseId) || '1414854649273384960'
if (e?.source) this.source = parseInt(e.source) if (e?.source) this.source = parseInt(e.source)
if (e?.recordId) this.recordId = parseInt(e.recordId) if (e?.recordId) this.recordId = parseInt(e.recordId)
switch (this.source) { switch (this.source) {
case 1: case 1:
case 2: case 2:
...@@ -254,7 +275,8 @@ export default { ...@@ -254,7 +275,8 @@ export default {
}) })
}, },
// 切换 // 切换
swiperChange(e) { swiperChange(e, currentItem) {
this.currentItem = currentItem
let current = e.current let current = e.current
this.currentIndex = current this.currentIndex = current
if (current == NO_PREV_PAGE || current == NO_NEXT_PAGE) { if (current == NO_PREV_PAGE || current == NO_NEXT_PAGE) {
...@@ -455,14 +477,19 @@ export default { ...@@ -455,14 +477,19 @@ export default {
}) })
}, },
// 收藏 // 收藏
collection() { collection(status) {
console.log('this.list[this.currentIndex]', this.list[this.currentIndex]) const info = this.list.find(v => v.index === this.currentIndex)
console.log('收藏') const action = status ? 'removeCollection' : 'joinCollection'
this.$u.api[action]({questionId: info.id}).then(res => {
info.collectionFlag = !status
})
}, },
// 移除 // 移除
remove() { remove() {
console.log('this.list[this.currentIndex]', this.list[this.currentIndex]) const info = this.list.find(v => v.index === this.currentIndex)
console.log('移除') this.$u.api.removeError({questionId: info.id}).then(res => {
this.current = this.currentIndex + 1
})
}, },
// 以下方法用于初始化数据 // 以下方法用于初始化数据
refresh(currentIndex) { refresh(currentIndex) {
......
<template> <template>
<view class="content"> <view class="begin-answer">
<!-- <text class="title">{{ title }}</text> --> <u-navbar
<my-subject back-icon-color="#000000"
class="subject-item" background="transparent"
v-for="(item, index) in lists" title="我的题库"
:key="index" titleColor="#000000"
:time="item.time" :border-bottom="false"
:status="item.status" title-bold
:title="item.title" ></u-navbar>
:subtitle="item.subtitle" <view class="content" v-if="lists.length > 0">
></my-subject> <!-- <text class="title">{{ title }}</text> -->
<my-subject
class="subject-item"
v-for="(item, index) in lists"
:key="index"
:time="item.time"
:status="item.status"
:title="item.title"
:subtitle="item.subtitle"
:statusStyle="item.statusStyle"
></my-subject>
</view>
<view class="content" v-else>
<u-image
width="374rpx"
height="322rpx"
:src="nothing"
style="margin-top: 100rpx;"
></u-image>
<text style="margin-top: 20rpx;font-size: 28rpx;color: #9EA5BB;"
>当前暂无题库内容</text
>
</view>
</view> </view>
</template> </template>
...@@ -22,34 +44,86 @@ export default { ...@@ -22,34 +44,86 @@ export default {
data() { data() {
return { return {
title: '我的题库', title: '我的题库',
lists: [ nothing: process.uniEnv.qn_base_url + 'zanwucuoti@3x.png',
{ lists: [],
time: '2021.06.25 18:06',
status: '已激活',
title: '高处安装、维护、拆除作业人员',
subtitle: '题库将于48天后到期',
},
{
time: '2021.05.25 14:05',
status: '已绑定',
title: '高处安装、维护、拆除作业人员',
subtitle: '题库将于88天后到期',
},
{
time: '2021.07.25 11:06',
status: '已失效',
title: '高处安装、维护、拆除作业人员',
subtitle: '题库已过期',
},
],
} }
}, },
onLoad() {}, onLoad() {
methods: {}, this.$u.api.getUserQuestionWareHouse().then((res) => {
let length = res.length
if (res.length <= 0) {
this.lists = []
}
let data = []
for (let i = 0; i < length; i++) {
data[i] = {}
if (
!res[i].echoMap ||
!res[i].echoMap.questionWarehouseId ||
!res[i].echoMap.cardId
) {
continue
}
//绑卡或支付时间
data[i].title = res[i].echoMap.questionWarehouseId.title
data[i].subtitle = res[i].echoMap.questionWarehouseId.subtitle
data[i].time =
res[i].echoMap.cardId.bindingTime ||
res[i].echoMap.cardId.buyTime ||
''
let status = ''
switch (res[i].echoMap.cardId.cardStatus) {
case 0:
status = '未绑定'
break
case 5:
status = '已绑定'
break
case 10:
status = '已激活'
break
case 15:
status = '已失效'
break
default:
break
}
data[i].status = status
data[i].statusStyle = { color: '#2953FF' }
}
this.lists = data
console.log(data)
})
},
} }
</script> </script>
<style> <style scoped lang="scss">
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
display: none;
}
page {
background-color: #f7f9fc;
}
.begin-answer {
display: flex;
flex-direction: column;
background-image: linear-gradient(to top, #f7f9fc 0%, #e9f3ff 20%);
background-color: #f7f9fc;
background-size: 100% 920rpx;
background-repeat: no-repeat;
height: 120vh;
position: absolute;
top: 0;
width: 100%;
}
.content { .content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -77,5 +151,21 @@ export default { ...@@ -77,5 +151,21 @@ export default {
.title { .title {
font-size: 36rpx; font-size: 36rpx;
color: #8f8f94; color: #8f8f94;
font-weight: bold;
}
.content ::v-deep .u-flex {
border-radius: 12rpx;
}
.content ::v-deep .my-details {
background-color: #ffffff !important;
}
.content ::v-deep .my-details .bottom {
padding: 0rpx 20rpx 30rpx 20rpx;
.title {
font-weight: bold;
}
} }
</style> </style>
<template> <template>
<view class="content"> <view class="begin-answer">
<u-cell-group> <u-navbar
<u-cell-item back-icon-color="#000000"
title="实名认证" background="transparent"
:arrow="false" title="实名认证"
:hover-class="none" titleColor="#000000"
title-style="{'font':'bold','font-size':'40rpx'}" :border-bottom="false"
> title-bold
<view slot="label" style="display:flex;flex-direction: column;"> ></u-navbar>
<text>上传二代身份证照片,图片大小不大于2M</text> <view class="content">
<view class="upload-image"> <u-cell-group :border="false">
<image <u-cell-item :arrow="false" :hover-class="none">
class="cert-image" <view slot="label" class="tips">
:src="certFront" <text class="line-1"
mode="widthFix" >请上传您的:<text class="name">身份证</text>
lazy-load="false" </text>
binderror="" <text class="line-2">请按照下面提示依次点击上传身份证正反面</text>
bindload="" <view class="upload-image">
@click="getFront" <image
/> class="cert-image"
<image :src="certFront"
class="cert-image" lazy-load="false"
style="margin-left: 30rpx;" binderror=""
:src="certBack" bindload=""
mode="widthFix" @click="getFront"
lazy-load="false" />
binderror="" <image
bindload="" class="cert-image"
@click="getBack" :src="certBack"
/> lazy-load="false"
binderror=""
bindload=""
@click="getBack"
/>
</view>
</view> </view>
</view> </u-cell-item>
</u-cell-item> <u-cell-item
<u-cell-item :arrow="false"
:arrow="false" :hover-class="none"
:hover-class="none" title="姓名"
title="姓名" :value="name"
:value="name" :title-style="certTitleStyle"
></u-cell-item> :value-style="certValueStyle"
<u-cell-item ></u-cell-item>
:arrow="false" <u-cell-item
:hover-class="none" :arrow="false"
title="身份证号" :hover-class="none"
:value="getIdCardNum" title="身份证号"
></u-cell-item> :value="getIdCardNum"
<u-cell-item :title-style="certTitleStyle"
:arrow="false" :value-style="certValueStyle"
:hover-class="none" ></u-cell-item>
title="有效期" <u-cell-item
:value="expire" :arrow="false"
></u-cell-item> :hover-class="none"
<u-cell-item :arrow="false" :hover-class="none"> title="有效期"
<view slot="label" style="display:flex;flex-direction: column;"> :value="expire"
<button @click="submit">确定</button> :title-style="certTitleStyle"
</view> :value-style="certValueStyle"
</u-cell-item> ></u-cell-item>
</u-cell-group> <u-cell-item :arrow="false" :hover-class="none">
<view slot="label" style="display:flex;flex-direction: column;">
<button class="sub-input" @click="submit">确定</button>
</view>
</u-cell-item>
</u-cell-group>
</view>
</view> </view>
</template> </template>
...@@ -69,15 +80,28 @@ export default { ...@@ -69,15 +80,28 @@ export default {
} }
}, },
computed: { computed: {
certTitleStyle() {
return {
width: '115rpx',
}
},
certValueStyle() {
return {
'padding-left': '136rpx',
color: '#191C27',
'font-weight': 'bold',
'text-align': 'left',
}
},
certFront() { certFront() {
return this.student.identityFrontPath return this.student.identityFrontPath
? process.uniEnv.qn_asset_url + this.student.identityFrontPath ? process.uniEnv.qn_asset_url + this.student.identityFrontPath
: 'https://qn-static.banshouhui.com/self-support/renxiang.png' : process.uniEnv.qn_base_url + 'shangchuanzhaopianfront@3x.png'
}, },
certBack() { certBack() {
return this.student.identityBackPath return this.student.identityBackPath
? process.uniEnv.qn_asset_url + this.student.identityBackPath ? process.uniEnv.qn_asset_url + this.student.identityBackPath
: 'https://qn-static.banshouhui.com/self-support/guohui.png' : process.uniEnv.qn_base_url + 'shangchuanzhaopianback@3x.png'
}, },
name() { name() {
return this.student.name || '' return this.student.name || ''
...@@ -144,7 +168,6 @@ export default { ...@@ -144,7 +168,6 @@ export default {
.checkIdCardBack({ id_card_back: res.key }) .checkIdCardBack({ id_card_back: res.key })
.then(() => {}) .then(() => {})
.catch((data) => { .catch((data) => {
console.log('beimian', data)
if (data.errMsg == 'request:ok') { if (data.errMsg == 'request:ok') {
this.student.certificateValidityDate = data.data.id_card_expire this.student.certificateValidityDate = data.data.id_card_expire
} else { } else {
...@@ -157,7 +180,28 @@ export default { ...@@ -157,7 +180,28 @@ export default {
} }
</script> </script>
<style> <style scoped lang="scss">
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
display: none;
}
page {
background-color: #f7f9fc;
}
.begin-answer {
display: flex;
flex-direction: column;
background-image: linear-gradient(to top, #f7f9fc 0%, #e9f3ff 40%);
background-color: #f7f9fc;
background-size: 100% 920rpx;
background-repeat: no-repeat;
height: 120vh;
position: absolute;
top: 0;
width: 100%;
}
.content { .content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -165,9 +209,43 @@ export default { ...@@ -165,9 +209,43 @@ export default {
justify-content: center; justify-content: center;
width: 100%; width: 100%;
} }
.upload-image {
padding: 0 28rpx;
}
.cert-image { .cert-image {
width: 300rpx; width: 630rpx;
height: 300rpx; height: 400rpx;
}
.tips {
display: flex;
flex-direction: column;
.line-1 {
font-size: 32rpx;
color: #191c27;
font-weight: bold;
.name {
color: #2953ff;
}
}
.line-2 {
font-size: 24rpx;
color: #5a6073;
padding: 30rpx 0;
}
}
.content ::v-deep .u-cell-item-box {
background: none !important;
}
.sub-input {
margin-top: 26rpx;
width: 702rpx;
height: 104rpx;
border-radius: 52rpx;
border: hidden;
background-color: #2953ff;
color: white;
font-size: 32rpx;
font-weight: bold;
line-height: 104rpx;
} }
</style> </style>
<template> <template>
<view class="content"> <view class="begin-answer">
<view class="wrap"> <u-navbar
<input back-icon-color="#000000"
type="text" background="transparent"
placeholder="请输入工作单位" title="工作单位"
v-model="student.workUnit" titleColor="#000000"
/> :border-bottom="false"
title-bold
></u-navbar>
<view class="content">
<view class="company-title">工作单位名称</view>
<view class="input-view">
<input
class="company-input"
type="text"
placeholder="请填写"
v-model="student.workUnit"
/>
</view>
<button @click="submit" class="sub-input">提交</button>
</view> </view>
<button @click="submit">提交</button>
</view> </view>
</template> </template>
...@@ -47,15 +59,64 @@ export default { ...@@ -47,15 +59,64 @@ export default {
} }
</script> </script>
<style> <style scoped lang="scss">
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
display: none;
}
page {
background-color: #f7f9fc;
}
.begin-answer {
display: flex;
flex-direction: column;
background-image: linear-gradient(to top, #f7f9fc 0%, #e9f3ff 40%);
background-color: #f7f9fc;
background-size: 100% 920rpx;
background-repeat: no-repeat;
height: 100vh;
position: absolute;
top: 0;
width: 100%;
}
.content { .content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 100%; width: 100%;
padding: 0 30rpx;
} }
.wrap { .company-title {
display: flex; width: 100%;
height: 60rpx;
padding-top: 30rpx;
margin-bottom: 30rpx;
font-size: 32rpx;
font-weight: bold;
}
.company-input {
height: 104rpx;
border-radius: 12rpx;
padding-left: 24rpx;
background-color: white;
}
.input-view {
width: 100%;
}
.sub-input {
margin-top: 432rpx;
width: 702rpx;
height: 104rpx;
border-radius: 52rpx;
border: hidden;
background-color: #2953ff;
color: white;
font-size: 32rpx;
font-weight: bold;
line-height: 104rpx;
} }
</style> </style>
<template> <template>
<view class="content"> <view class="begin-answer">
<view class="kf-body"> <u-navbar
<!-- <text class="title">{{title}}</text> --> back-icon-color="#ffffff"
<view class="name-space"> background="transparent"
<view class="head-photo"> title="联系客服"
<u-avatar :src="avatar"></u-avatar> titleColor="#ffffff"
:border-bottom="false"
title-bold
></u-navbar>
<view class="content">
<view class="kf-body">
<view class="kf-image">
<u-image width="436rpx" height="436rpx" :src="erweima"></u-image>
</view> </view>
<view> <view class="tips">
<view class="nick" 长按识别二维码添加官方客服
><text>aaa</text><u-icon name="server-man"></u-icon
></view>
<view class="city"><text>安徽</text><text>合肥</text></view>
</view> </view>
</view> </view>
<view class="erweima">
<u-image width="424rpx" height="424rpx" :src="erweima"></u-image>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -24,58 +25,55 @@ ...@@ -24,58 +25,55 @@
export default { export default {
data() { data() {
return { return {
title: '我的客服', erweima: process.uniEnv.qn_base_url + 'kefuerweima@3x.png',
avatar: 'https://qn-static.banshouhui.com/self-support/avatar.gif',
erweima: 'https://qn-static.banshouhui.com/self-support/erweima-bg.png',
} }
}, },
onLoad() {},
methods: {},
} }
</script> </script>
<style> <style scoped lang="scss">
page { ::-webkit-scrollbar {
background-color: rgb(229, 229, 236); width: 0;
height: 0;
color: transparent;
display: none;
} }
.content { .begin-answer {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; background-color: #2953ff;
justify-content: center; background-size: 100% 920rpx;
padding: 130rpx 30rpx 0rpx 30rpx; background-repeat: no-repeat;
} height: 120vh;
position: absolute;
.logo { top: 0;
height: 200rpx; width: 100%;
width: 200rpx;
margin: 200rpx auto 50rpx auto;
} }
.text-area { .content {
display: flex; display: flex;
flex-direction: column;
align-items: center;
justify-content: center; justify-content: center;
} padding: 130rpx 24rpx 0rpx 24rpx;
.title {
font-size: 36rpx;
color: #8f8f94;
} }
.kf-body { .kf-body {
width: 100%; width: 100%;
height: 700rpx; height: 880rpx;
background-color: aliceblue; background-color: aliceblue;
padding: 50rpx; text-align: center;
border-radius: 12rpx;
} }
.name-space { .kf-image {
display: flex; margin-left: 132rpx;
margin-top: 160rpx;
} }
.erweima { .tips {
text-align: center; color: #5a6073;
margin-top: 30rpx; font-size: 28rpx;
padding-left: 10%; margin-top: 114rpx;
} }
</style> </style>
<template> <template>
<view class="content"> <view class="begin-answer">
<u-cell-group style="width: 100%;"> <u-navbar
<u-cell-item title="头像" @click="changeHead"> back-icon-color="#000000"
<view slot="right-icon"> background="transparent"
<u-image width="50rpx" height="50rpx" :src="headPhoto"></u-image> title="我的信息"
</view> titleColor="#000000"
</u-cell-item> :border-bottom="false"
<u-cell-item title="证件照" @click="changeCertPhoto"> title-bold
<view slot="right-icon"> ></u-navbar>
<u-image <view class="content">
v-if="isupLoadCertPhoto" <u-cell-group
width="50rpx" style="width: 100%;"
height="50rpx" :class="{ 'background-none': true }"
:src="headCertPhoto" :border="false"
></u-image>
<text v-else style="color:blue;">未上传</text>
</view>
</u-cell-item>
<u-cell-item title="手机号" :arrow="false" :hover-class="none">
<view slot="right-icon">
<button
hover-class="none"
class="mobile-button"
open-type="getPhoneNumber"
@getphonenumber="getPhonenumber"
>
{{ getMobile }}
</button>
</view>
</u-cell-item>
<u-cell-item
title="实名认证"
:arrow="false"
:hover-class="none"
title-style="{'font':'bold','font-size':'40rpx'}"
:value="getCertifyStatus"
@click="goCertify"
> >
</u-cell-item> <u-cell-item title="头像" @click="changeHead">
<u-cell-item <view slot="right-icon">
title="工作单位" <u-image
:value="getCompany" width="92"
@click="goAddress" height="92"
></u-cell-item> :src="headPhoto"
</u-cell-group> shape="circle"
></u-image>
</view>
</u-cell-item>
<u-cell-item title="证件照" @click="changeCertPhoto">
<view slot="right-icon">
<u-image
v-if="isupLoadCertPhoto"
width="92rpx"
height="120rpx"
:src="headCertPhoto"
></u-image>
<text v-else style="color:blue;">未上传</text>
</view>
</u-cell-item>
<u-cell-item title="手机号" :arrow="false" :hover-class="none">
<view slot="right-icon">
<button
hover-class="none"
class="mobile-button"
open-type="getPhoneNumber"
@getphonenumber="getPhonenumber"
>
{{ getMobile }}
</button>
</view>
</u-cell-item>
<u-cell-item
title="实名认证"
title-style="{'font':'bold','font-size':'40rpx'}"
:value="getCertifyStatus"
@click="goCertify"
>
</u-cell-item>
<u-cell-item
title="工作单位"
:value="getCompany"
@click="goCompany"
></u-cell-item>
</u-cell-group>
</view>
</view> </view>
</template> </template>
...@@ -55,7 +72,6 @@ export default { ...@@ -55,7 +72,6 @@ export default {
return { return {
student: {}, student: {},
token: null, token: null,
host: process.uniEnv.qn_asset_url,
code: '', code: '',
} }
}, },
...@@ -79,7 +95,6 @@ export default { ...@@ -79,7 +95,6 @@ export default {
return this.student.workUnit || '' return this.student.workUnit || ''
}, },
getCertifyStatus() { getCertifyStatus() {
console.log(this.student.identityNumber)
return !this.student.identityNumber ? '去认证' : '已认证' return !this.student.identityNumber ? '去认证' : '已认证'
}, },
}, },
...@@ -94,7 +109,6 @@ export default { ...@@ -94,7 +109,6 @@ export default {
}) })
this.$u.api.getUserInfo().then((res) => { this.$u.api.getUserInfo().then((res) => {
this.student = res this.student = res
console.log('stu', this.student)
}) })
}, },
methods: { methods: {
...@@ -104,10 +118,10 @@ export default { ...@@ -104,10 +118,10 @@ export default {
url: 'pages/mine/certify', url: 'pages/mine/certify',
}) })
}, },
goAddress() { goCompany() {
getApp().globalData.student = this.student getApp().globalData.student = this.student
this.$u.route({ this.$u.route({
url: 'pages/mine/address', url: 'pages/mine/company',
}) })
}, },
getPhonenumber(e) { getPhonenumber(e) {
...@@ -155,8 +169,8 @@ export default { ...@@ -155,8 +169,8 @@ export default {
}, },
changeHead() { changeHead() {
//获取图片 //获取图片
upload.getPhoto(1, this.token).then((res) => { upload.getPhoto(2, this.token).then((res) => {
this.student.avatarPath = this.host + res.key this.student.avatarPath = process.uniEnv.qn_asset_url + res.key
this.$u.api.updateUserInfo({ this.$u.api.updateUserInfo({
avatarPath: this.student.avatarPath, avatarPath: this.student.avatarPath,
}) })
...@@ -166,7 +180,8 @@ export default { ...@@ -166,7 +180,8 @@ export default {
//获取图片 //获取图片
upload.getPhoto(2, this.token).then((res) => { upload.getPhoto(2, this.token).then((res) => {
//显示 //显示
this.student.certificatePhotoPath = this.host + res.key this.student.certificatePhotoPath =
process.uniEnv.qn_asset_url + res.key
this.$u.api.updateUserInfo({ this.$u.api.updateUserInfo({
certificatePhotoPath: this.student.certificatePhotoPath, certificatePhotoPath: this.student.certificatePhotoPath,
}) })
...@@ -181,13 +196,35 @@ export default { ...@@ -181,13 +196,35 @@ export default {
} }
</script> </script>
<style> <style scoped lang="scss">
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
display: none;
}
page {
background-color: #f7f9fc;
}
.begin-answer {
display: flex;
flex-direction: column;
background-image: linear-gradient(to top, #f7f9fc 0%, #e9f3ff 40%);
background-color: #f7f9fc;
background-size: 100% 920rpx;
background-repeat: no-repeat;
height: 100vh;
position: absolute;
top: 0;
width: 100%;
}
.content { .content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 100%; width: 100%;
padding: 0 30rpx;
} }
.logo { .logo {
...@@ -220,11 +257,30 @@ export default { ...@@ -220,11 +257,30 @@ export default {
} }
.mobile-button { .mobile-button {
width: 200px; width: 115px;
height: 30px; background: none;
font-size: 28rpx;
} }
button::after { button::after {
border: none; border: none;
background-color: none; background-color: none;
} }
.content ::v-deep .u-cell-item-box {
background: none !important;
}
.content ::v-deep .u-cell {
padding: 26rpx 0rpx;
border-color: #e8ebf3;
border-style: solid;
border-bottom-width: 2rpx;
border-left-width: 0;
border-right-width: 0;
border-top-width: 0;
}
.content ::v-deep .u-cell__value {
color: #191c27;
}
</style> </style>
<template> <template>
<view class="u-cell-box"> <view class="u-cell-box">
<view class="u-cell-title" v-if="title" :style="[titleStyle]"> <view class="u-cell-title" v-if="title" :style="[titleStyle]">
{{title}} {{ title }}
</view> </view>
<view class="u-cell-item-box" :class="{'u-border-bottom u-border-top': border}"> <view
<slot /> class="u-cell-item-box"
</view> :class="{ 'u-border-bottom u-border-top': border }"
</view> >
<slot />
</view>
</view>
</template> </template>
<script> <script>
/** /**
* cellGroup 单元格父组件Group * cellGroup 单元格父组件Group
* @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。搭配u-cell-item * @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。搭配u-cell-item
* @tutorial https://www.uviewui.com/components/cell.html * @tutorial https://www.uviewui.com/components/cell.html
* @property {String} title 分组标题 * @property {String} title 分组标题
* @property {Boolean} border 是否显示外边框(默认true) * @property {Boolean} border 是否显示外边框(默认true)
* @property {Object} title-style 分组标题的的样式,对象形式,如{'font-size': '24rpx'} 或 {'fontSize': '24rpx'} * @property {Object} title-style 分组标题的的样式,对象形式,如{'font-size': '24rpx'} 或 {'fontSize': '24rpx'}
* @example <u-cell-group title="设置喜好"> * @example <u-cell-group title="设置喜好">
*/ */
export default { export default {
name: "u-cell-group", name: 'u-cell-group',
props: { props: {
// 分组标题 // 分组标题
title: { title: {
type: String, type: String,
default: '' default: '',
}, },
// 是否显示分组list上下边框 // 是否显示分组list上下边框
border: { border: {
type: Boolean, type: Boolean,
default: true default: true,
}, },
// 分组标题的样式,对象形式,注意驼峰属性写法 // 分组标题的样式,对象形式,注意驼峰属性写法
// 类似 {'font-size': '24rpx'} 和 {'fontSize': '24rpx'} // 类似 {'font-size': '24rpx'} 和 {'fontSize': '24rpx'}
titleStyle: { titleStyle: {
type: Object, type: Object,
default () { default() {
return {}; return {}
} },
} },
}, },
data() { data() {
return { return {
index: 0, index: 0,
} }
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "../../libs/css/style.components.scss"; @import '../../libs/css/style.components.scss';
.u-cell-box {
width: 100%;
}
.u-cell-title { .u-cell-box {
padding: 30rpx 32rpx 10rpx 32rpx; width: 100%;
font-size: 30rpx; }
text-align: left;
color: $u-tips-color;
}
.u-cell-item-box { .u-cell-title {
background-color: #FFFFFF; padding: 30rpx 32rpx 10rpx 32rpx;
flex-direction: row; font-size: 30rpx;
} text-align: left;
color: $u-tips-color;
}
.u-cell-item-box {
background-color: #ffffff;
flex-direction: row;
}
</style> </style>
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