Compare commits

...

10 Commits

@ -21,7 +21,8 @@
onShow: function() {
console.log('App Show')
console.log('App Show')
},
onHide: function() {
console.log('App Hide')

@ -66,7 +66,7 @@ const isMobile = (phoneNumber) => {
// 分享
const shareInfo = {
title:"行走红色苏州",
title:"打卡苏州市党史教育基地",
imageUrl:"/static/share.jpg"
}

@ -49,6 +49,16 @@
{
id: 2,
centerItem: false,
width: 52,
height: 61,
"text": "书籍",
"pagePath": "/pages/book/index",
"iconPath": require("@/static/icon4.png"),
"selectedIconPath": require("@/static/icon4-cur.png")
},
{
id: 3,
centerItem: false,
width: 54,
height: 60,
"text": "我的",

@ -2,8 +2,8 @@
"name" : "行走红色苏州",
"appid" : "__UNI__511E818",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"versionName" : "1.0.2",
"versionCode" : 102,
"transformPx" : false,
/* 5+App */
"app-plus" : {

@ -5,7 +5,9 @@
<u-image id="share-img" v-show="!isHidden" class="share-img" mode="scaleToFill" :width="133" :height="133"
:src="require('../static/cer-share.png')" @click="$u.throttle(share)"> mode=</u-image>
<div @click="back" :style="{'position':'absolute','left':'20rpx','top':backTop+'px','height':backHeight+'px','line-height':backHeight+'px'}">
<u-icon name="arrow-left" color="#fff" size="40"></u-icon>
</div>
<div class="logo1">
<u-image :lazy-load="false" :show-loading="false" width="176" height="450"
:src="require('../static/cer-logo.png')"></u-image>
@ -81,7 +83,9 @@
userInfo: {},
myIndex: 0,
navBarTop: 0,
navBarRight: 0,
navBarRight: 0,
backHeight:0,
backTop:0
};
},
onShareAppMessage() {
@ -96,11 +100,18 @@
const MenuButton = uni.getMenuButtonBoundingClientRect()
this.navBarTop = MenuButton.top + MenuButton.height //
this.navBarRight = MenuButton.width
this.backTop = MenuButton.top
this.backHeight = MenuButton.height
let sysInfo = uni.getSystemInfoSync();
this.SCREEN_WIDTH = sysInfo.screenWidth
this.SCREEN_HEIGHT = sysInfo.screenHeight;
},
methods: {
methods: {
back(){
uni.switchTab({
url:'/pages/me/me'
})
},
share() {
this.isHidden = true

@ -1,5 +1,5 @@
<template>
<view class="cotainer">
<view class="cotainer">
<!-- 全屏播放 -->
<view class="playvideo" v-if="playvideo" @click="playvideo=false,isfull=false">
<view class="playvideowrap">
@ -12,21 +12,22 @@
<view class="playvideowrap">
<view v-if="imgInfo.length>0 && !showVorImage" class="imgwrap">
<movable-area scale-area class="movable-area" style="height: 380rpx;width:100%">
<movable-view style="height: 380rpx;width:100%" class="movable-view" direction="all" scale="true" scale-min="1" scale-max="4"
:scale-value="1">
<u-swiper :height='380' bgColor="transparent" :border-radius="0" :list="imgInfo" :autoplay="false"></u-swiper>
<movable-view style="height: 380rpx;width:100%" class="movable-view" direction="all"
scale="true" scale-min="1" scale-max="4" :scale-value="1">
<u-swiper :height='380' bgColor="transparent" :border-radius="0" :list="imgInfo"
:autoplay="false"></u-swiper>
</movable-view>
</movable-area>
<view class="closevideo" @click="playimg=false">X</view>
</view>
</view>
</view>
</view>
<!-- 跳转二维码 -->
<view class="playvideo" v-if="showQrCode">
<view class="playvideowrap">
<view class="qrcode">
<image :show-menu-by-longpress="true" :src="qrCode" mode=""></image>
<view class="qrcode">
<image :show-menu-by-longpress="true" :src="qrCode" mode=""></image>
<view>长按保存二维码</view>
<view class="closevideo" @click="showQrCode=false">X</view>
</view>
@ -40,7 +41,7 @@
<!-- 状态栏占位 -->
<view class="statusBar" :style="{paddingTop: navBarTop+'px'}"></view>
<!-- 真正的导航栏内容 -->
<view class="navBar">
<view class="navBar">
<!-- 轮播切换 -->
<view style="display: flex;" class="video-content">
<view class="video-content-left">
@ -73,21 +74,43 @@
<view class="detail-info">
<view class="detail-info-title">{{info.name}}</view>
<view class="detail-info-map">
<view>
<block v-if="info.config && info.config.length>0">
</block>
<view v-for="item in info.config">
<block>
<u-icon v-if="item.key==='address'" name="map" size="32"></u-icon>
<u-icon v-else-if="item.key==='time'" name="clock" size="32"></u-icon>
<u-icon v-else-if="item.key==='phone'" name="phone" size="32"></u-icon>
<u-icon v-else name="info-circle" size="32"></u-icon>
<view>
<span>{{item.name}}</span>
<span>{{item.value?item.value:'-'}}</span>
</view>
</block>
</view>
<!-- <view>
<u-icon name="map" size="32"></u-icon>
<view>
<span>详细地址</span>
<span>{{info.address?info.address:'-'}}</span>
<view>
<span>详细地址</span>
<span>{{info.address?info.address:'-'}}</span>
</view>
</view>
<view>
<u-icon name="clock" size="32"></u-icon>
<view>
<span>开放时间</span>
<span>{{info.time?info.time:'-'}}</span>
<view>
<span>开放时间</span>
<span>{{info.time?info.time:'-'}}</span>
</view>
</view>
<view>
<u-icon name="clock" size="32"></u-icon>
<view>
<span>开放时间</span>
<span>{{info.time?info.time:'-'}}</span>
</view>
</view> -->
</view>
<view class="detail-info-go">
<view class="detail-info-go-left" @click="toMap">
@ -99,27 +122,28 @@
<text>去预约</text>
</view>
</view>
</view>
</view>
<!-- vr -->
<view class="detail-vr" v-if="vrInfo.length>0">
<view class="detail-vr-title">
<image :src="require('@/packages/static/detail-vr.png')" mode=""></image>
</view>
<view class="detail-vr-swiper" v-if="vrInfo.length==1" style="margin-left: -25rpx;">
<view @click="toVr(vrInfo[0].url)" class="detail-vr-swiper-item" style="width:490rpx;margin: 0 auto;position: relative;margin-top:20rpx">
<view class="detail-vr-swiper-item-img">
<image :src="vrInfo[0].image.url" mode=""></image>
</view>
<view class="detail-vr-swiper-item-title">
<image :src="require('@/packages/static/detail-icon.png')" mode=""></image>
<text>{{vrInfo[0].name}}</text>
</view>
</view>
</view>
<swiper v-else class="detail-vr-swiper" :current="currentIndex" next-margin="140rpx" @change="swierChange"
circular :autoplay="false">
</view>
<view class="detail-vr-swiper" v-if="vrInfo.length==1" style="margin-left: -25rpx;">
<view @click="toVr(vrInfo[0].url)" class="detail-vr-swiper-item"
style="width:490rpx;margin: 0 auto;position: relative;margin-top:20rpx">
<view class="detail-vr-swiper-item-img">
<image :src="vrInfo[0].image.url" mode=""></image>
</view>
<view class="detail-vr-swiper-item-title">
<image :src="require('@/packages/static/detail-icon.png')" mode=""></image>
<text>{{vrInfo[0].name}}</text>
</view>
</view>
</view>
<swiper v-else class="detail-vr-swiper" :current="currentIndex" next-margin="140rpx"
@change="swierChange" circular :autoplay="false">
<swiper-item v-for="(item,index) in vrInfo" :key="index">
<view @click="toVr(item.url)" class="detail-vr-swiper-item"
:class="currentIndex===index?'detail-vr-swiper-active':''">
@ -144,7 +168,7 @@
<rich-text v-if='showContent' :nodes="info.content?info.content:' '"></rich-text>
</view>
</view>
<view class="detail-btn" @click="toQus(info.id)">
<view class="detail-btn" v-if="hasQuestion" @click="toQus(info.id)">
<image src="../static/detail-btn.png" mode=""></image>
</view>
</view>
@ -159,7 +183,7 @@
<script>
import tabbar from '@/components/tabbar/tabbar.vue'
import {
toMapAPP,
toMapAPP,
shareInfo
} from "@/common/util.js"
export default {
@ -177,16 +201,17 @@
showVorImage: true,
isfull: false,
playvideo: false,
playimg: false,
qrCode:'',
showQrCode:false,
playimg: false,
qrCode: '',
showQrCode: false,
hasQuestion:false
}
},
onShareAppMessage() {
return shareInfo
},
onShareTimeline(){
return shareInfo
},
onShareAppMessage() {
return shareInfo
},
onShareTimeline() {
return shareInfo
},
onReady() {
@ -194,36 +219,32 @@
onLoad(option) {
const MenuButton = uni.getMenuButtonBoundingClientRect()
this.navBarTop = MenuButton.top //
this.getDetail(option.id)
this.getDetail(option.id)
this.getQuestions(option.id)
},
methods: {
playFullScreen() {
let videoContext = uni.createVideoContext('videos', this)
videoContext.requestFullScreen()
},
async getQuestions(id) {
const res = await this.$u.api.getQuestions({
point_id: id
})
this.hasQuestion = res.questions.length>0?true:false
},
async getDetail(id) {
const res = await this.$u.api.pointDetail({
id: id
})
if(res.points.config && res.points.config.length>0){
res.points.config.map(item=>{
if(item.key==='address'){
res.points.address = item.value
}
if(item.key==='time'){
res.points.time = item.value
}
})
}
this.info = res.points
this.showVorImage = this.info.video?true:false
})
this.info = res.points
this.showVorImage = this.info.video ? true : false
this.vrInfo = res.points.point_content.length > 0 ? res.points.point_content : []
if (res.points.point_image.length > 0) {
res.points.point_image.map(item => {
this.imgInfo.push(item.image.url)
})
}
// this.imgInfo = res.points.point_image.length > 0 ? res.points.point_image : []
this.showContent = true
},
swierChange(e) {
@ -234,35 +255,35 @@
return
}
let path = info.path ? info.path : ''
//
if(info.appid){
uni.navigateToMiniProgram({
appId: info.appid, // AppID
path: path, //
extraData: { //
},
success(res) {
//
console.log('成功跳转到其他小程序');
},
fail(err) {
//
console.log('跳转失败', err);
}
});
}else{
if(!info.qrcode){
return
}
this.qrCode = info.qrcode.url
this.showQrCode = true
// uni.navigateTo({
// url: '/packages/vr/vr?link=' + path
// })
//
if (info.appid) {
uni.navigateToMiniProgram({
appId: info.appid, // AppID
path: path, //
extraData: { //
},
success(res) {
//
console.log('成功跳转到其他小程序');
},
fail(err) {
//
console.log('跳转失败', err);
}
});
} else {
if (!info.qrcode) {
return
}
this.qrCode = info.qrcode.url
this.showQrCode = true
// uni.navigateTo({
// url: '/packages/vr/vr?link=' + path
// })
}
},
toVr(link) {
uni.navigateTo({
@ -271,11 +292,11 @@
},
toMap() {
toMapAPP(this.info.lat, this.info.lng, this.info.name)
},
toQus(id){
uni.navigateTo({
url:'/packages/question/question?id='+id
})
},
toQus(id) {
uni.navigateTo({
url: '/packages/question/question?id=' + id
})
},
}
}
@ -326,27 +347,34 @@
/* display: inline-block; */
right: 0rpx;
top: -25rpx // transform: translate(0,-50%);
}
.qrcode{
width: 450rpx;
position: relative;
margin: 0 auto;
>image{
width:400rpx;height:400rpx;margin: 0 auto;display: block;
}
>view{
color:#fff;
text-align: center;
margin:10rpx;
font-size:32rpx;
}
.closevideo{
z-index: 999;
color: #bc9766;
border: 1px solid #bc9766;
top: -35rpx;
right: -9rpx;
}
}
.qrcode {
width: 450rpx;
position: relative;
margin: 0 auto;
>image {
width: 400rpx;
height: 400rpx;
margin: 0 auto;
display: block;
}
>view {
color: #fff;
text-align: center;
margin: 10rpx;
font-size: 32rpx;
}
.closevideo {
z-index: 999;
color: #bc9766;
border: 1px solid #bc9766;
top: -35rpx;
right: -9rpx;
}
}
}
@ -486,14 +514,16 @@
padding-bottom: 10rpx;
>view {
display: flex;
display: flex;
align-items: flex-start;
margin-bottom: 20rpx;
>view{
display: flex;
span:first-child{
min-width: 120rpx;
}
margin-bottom: 20rpx;
>view {
display: flex;
span:first-child {
min-width: 120rpx;
}
}
}
}
@ -543,6 +573,7 @@
margin-top: 30rpx;
padding-right: 0;
padding-bottom: 25rpx;
&-title {
image {
width: 122rpx;
@ -555,6 +586,7 @@
// overflow: auto;
min-height: 530rpx;
position: relative;
&-item {
padding: 25rpx;
margin: 20rpx;

@ -17,6 +17,11 @@
"style": {
"navigationStyle": "custom"
}
}, {
"path": "pages/book/index",
"style": {
"navigationStyle": "custom"
}
}, {
"path": "pages/me/me",
"style": {
@ -84,6 +89,12 @@
"pagePath": "pages/line/line",
"iconPath": "/static/icon2.png",
"selectedIconPath": "/static/icon2-cur.png"
},
{
"text": "书籍",
"pagePath": "pages/book/index",
"iconPath": "/static/icon4.png",
"selectedIconPath": "/static/icon4-cur.png"
},
{
"text": "我的",

@ -0,0 +1,215 @@
<template>
<view class="wrap">
<image class="bg" :src="require('@/static/qus-bg.jpg')" mode=""></image>
<view class="book">
<!-- <swiper class="swiper" @change="changeBook" :current="bookIndex" circular previous-margin="80rpx"
next-margin="110rpx">
<swiper-item class="book-item" v-for="(item,index) in bookList">
<view class="book-img">
<image
:src="item.url?item.url:''" alt="" mode="heightFix">
</view>
<view class="book-title">
{{item.title}}
</view>
</swiper-item>
</swiper> -->
<u-swiper @change="changeSwiper" :class="{'opacity0':addOpcity}" :list="bookList" :effect3d="true"
:circular="true" :indicator="true" img-mode="widthFix" effect3d-previous-margin="140"
:autoplay="false"></u-swiper>
</view>
<tabbar :currentPage="2"></tabbar>
</view>
</template>
<script>
import tabbar from '@/components/tabbar/tabbar.vue'
import {
shareInfo
} from "@/common/util.js"
export default {
components: {
tabbar
},
data() {
return {
navBarTop: 0,
bookList: [],
bookIndex: 0,
swiperHeight: 0,
addOpcity: true
}
},
onShareAppMessage() {
return shareInfo
},
onShareTimeline() {
return shareInfo
},
onLoad() {
const MenuButton = uni.getMenuButtonBoundingClientRect()
this.navBarTop = MenuButton.top //
this.getBooks()
},
onShow() {
let that = this
uni.getSystemInfo({
success: function(info) {
console.log('屏幕的高度:' + info.windowHeight);
that.swiperHeight = info.windowHeight * .7 * 2
console.log(that.swiperHeight)
console.log('屏幕的宽度:' + info.windowWidth);
}
});
},
methods: {
changeSwiper(e) {
console.log(e)
this.addOpcity = false
},
changeBook(e) {
console.log(e)
this.bookIndex = e.detail.current
},
getBooks() {
console.log("123")
var that = this;
var host = "https://gbyuyue.szgmbwg.org.cn"
uni.request({
url: host + '/api/mobile/book/index',
data: {
page: 1,
page_size: 99,
sort_name: 'datetime',
sort_type: "ASC",
},
success: function(res) {
console.log("res", res)
let arr = []
res.data.data.map(item => {
arr.push({
image: item.image.url,
id: item.id,
title: item.name
})
})
that.bookList = arr
that.addOpcity = true
console.log(that.bookList)
},
fail: function(res) {
}
})
},
}
}
</script>
<style lang="scss">
.wrap {
width: 100vw;
height: 100vh;
// overflow: scroll;
.bg {
height: 100vh;
width: 100vw;
position: absolute;
top: 0;
left: 0;
}
.book {
padding: 175rpx 0;
height: 100vh;
swiper {
height: calc(100vh - 550rpx) !important;
background-color: transparent !important;
image {
height: 85%;
}
}
::v-deep .u-swiper-wrap {
height: 100%;
}
::v-deep .u-swiper-indicator {
bottom: 150rpx !important;
}
::v-deep .u-list-image-wrap {
// background-color: #fff;
}
.opacity0 swiper swiper-item:last-child {
opacity: 0;
}
::v-deep .u-swiper-image {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(1.7);
}
::v-deep .u-swiper-title {
height: 15%;
display: flex;
align-items: center;
justify-content: space-around;
color: #333;
font-size: 38rpx;
background-color: #fff;
overflow: auto;
white-space: break-spaces;
text-overflow: clip;
text-align: center;
}
::v-deep .u-indicator-item-round-active {
background-color: #9f4946;
}
&-item {
padding: 0 30rpx;
// transform: scale(.7);
// margin:0 80rpx;
}
&-img {
background-color: #fff;
height: 70%;
image {
width: calc(100vw - 160rpx);
height: 70%;
}
}
&-title {
text-align: center;
padding: 75rpx 30rpx;
background-color: #ffffff;
display: flex;
align-items: center;
justify-content: space-around;
font-size: 42rpx;
color: #000;
}
}
}
</style>

@ -360,7 +360,7 @@
latitude: parseFloat(item.lat),
longitude: parseFloat(item.lng),
iconPath: '/static/home-marker.png',
truePath: item.logo ? item.logo.url : item.image.url,
truePath: item.logo ? item.logo.url : (item.image?item.image.url:'/static/share.jpg'),
width: 0,
height: 0,
title: item.name,
@ -435,7 +435,7 @@
latitude: parseFloat(item.lat),
longitude: parseFloat(item.lng),
iconPath: '/static/home-marker.png',
truePath: item.logo ? item.logo.url : item.image.url,
truePath: item.logo ? item.logo.url : (item.image?item.image.url:'/static/share.jpg'),
width: 0,
height: 0,
title: item.name,
@ -469,7 +469,7 @@
latitude: parseFloat(item.lat),
longitude: parseFloat(item.lng),
iconPath: '/static/home-marker.png',
truePath: item.logo ? item.logo.url : item.image.url,
truePath: item.logo ? item.logo.url : (item.image?item.image.url:'/static/share.jpg'),
width: 0,
height: 0,
title: item.name,

@ -30,7 +30,9 @@
</template>
<script>
import {
shareInfo
} from "@/common/util.js"
export default {
components: {
},
@ -42,6 +44,12 @@
showBtn: false,
navBarBoxHeight: 0,
}
},
onShareAppMessage() {
return shareInfo
},
onShareTimeline() {
return shareInfo
},
async onLoad() {
this.start();

@ -38,7 +38,7 @@
<view></view>
</view>
<view class="line-item-pointer-item">
<image class="line-item-pointer-item-img" :src="pointer.image.url" mode="">
<image class="line-item-pointer-item-img" :src="pointer.image?pointer.image.url:replaceImg" mode="">
</image>
<view class="">
<view class="line-item-pointer-item-title">{{pointer.name}}</view>
@ -73,7 +73,8 @@
return {
navBarTop: 0,
listLine: [],
colorList: ['#dbd0ba','#666d95','#82818e','#6d7c4c'],
colorList: ['#dbd0ba','#ad6e46','#666d95','#6d7c4c'],
replaceImg:require('@/static/share.jpg')
}
},
@ -97,11 +98,25 @@
const res = await this.$u.api.baseFormIndex({
table_name: "circuits",
page: 1,
page_size: 999,
page_size: 999,
sort_name:'sort',
sort_type:'ASC'
// with_relations:['image']
})
res.data.map((item,index)=>{
item.color = this.colorList[index%this.colorList.length]
let orderMap = item.pointer_list.reduce((acc, val, idx) => {
acc[val] = idx;
return acc;
}, {});
item.pointer.sort((a, b) => {
// abarr+1
let indexA = orderMap[a.id] !== undefined ? orderMap[a.id] : item.pointer_list.length;
let indexB = orderMap[b.id] !== undefined ? orderMap[b.id] : item.pointer_list.length;
//
return indexA - indexB;
});
})
this.listLine = res.data
},

@ -3,7 +3,7 @@
<image class="bg" :src="require('@/static/qus-bg.jpg')" mode=""></image>
<view class="me" :style="{paddingTop: navBarTop+'px'}">
<view class="me-avatar" @click="showform = true,maskClose=true">
<image :src="info.headimgurl?info.headimgurl:headReplace" mode=""></image>
<image :src="info.headimgurl?info.headimgurl:imgurl" mode=""></image>
<view class="">
{{info.name?info.name:''}}
</view>
@ -19,14 +19,16 @@
<view>
<view v-if="item.id==='cer'" class="cer">
<view class="cer-progress">
<view v-if="done>0 && answerTotal>0">{{done}}/{{answerTotal}}</view>
<view v-if="done>0 && answerTotal>0">{{done}}/{{answerTotal}}</view>
<view v-else>0</view>
<view class="cer-progress-bar">
<view class="cer-progress-item" :style="{'width':done>0 && answerTotal>0?(done/answerTotal)*100+'%':0}">
<view class="cer-progress-item"
:style="{'width':done>0 && answerTotal>0?(done/answerTotal)*100+'%':0}">
</view>
</view>
</view>
<view class="cer-btn" :class="{'cer-btn-active':(done>0 && answerTotal>0 && done>=answerTotal)?true:false}">
<view class="cer-btn"
:class="{'cer-btn-active':(done>0 && answerTotal>0 && done>=answerTotal)?true:false}">
<text>{{done>0 && answerTotal>0 && done >= answerTotal ? '生成证书' : '未完成打卡'}}</text>
</view>
</view>
@ -37,7 +39,7 @@
</view>
<!-- 锦囊 -->
<view class="tips" v-if="showTips" :class="showTips?'fade-in':'fade-out'">
<view class="tips-wrap" @click="showTips=false">
<view class="tips-wrap" @click="showTips=false">
<view class="tips-wrap-close" @click="showTips=false">
x
</view>
@ -46,7 +48,7 @@
:src="require('../../static/toast.png')"></u-image>
<view class="tips-wrap-tip">
<view class="">
<view class="">
<rich-text v-if='showTips' :nodes="tips?tips:' '"></rich-text>
</view>
</view>
@ -55,30 +57,41 @@
</view>
</view>
<!-- 弹出头像 昵称 -->
<u-popup v-model="showform" mode="bottom" :mask-close-able="maskClose">
<u-popup v-model="showform" class="login" mode="bottom" :mask-close-able="maskClose">
<view class="login-top">
<view class="">
<image src="../../static/me-icon0.png" mode=""></image>
<text>行走红色苏州<text>申请</text></text>
</view>
<view class="">
<view class="">
获取你的头像昵称
</view>
<view>
记录与展示活动情况
</view>
</view>
</view>
<view class="login-form">
<view>
<span>头像</span>
<view style="border:none">
<button open-type="chooseAvatar" @chooseavatar='onChooseAvatar' style="padding: 0;margin: 0;">
<button plain open-type="chooseAvatar" @chooseavatar='onChooseAvatar' style="padding: 0;margin: 0;">
<image :src="imgurl" mode=""></image>
</button>
</view>
<view>上传头像</view>
</view>
<view>
<span>姓名</span>
<view>
<input type="nickname" @blur="blurname" :placeholderStyle="'color:#999;font-size:30rpx'"
v-model="form.name" placeholder="请输入姓名" :border="false" shape="circle" clearable></input>
</view>
<view class="login-form-input">
<input type="nickname" @blur="blurname" :placeholderStyle="'color:#999;font-size:30rpx'"
v-model="form.name" placeholder="你的昵称" :border="false" shape="circle" clearable></input>
</view>
</view>
<view class="login-btn">
<view class="login-btn-btn" @click="submit"> </view>
</view>
</u-popup>
<tabbar :currentPage="2"></tabbar>
<tabbar :currentPage="3"></tabbar>
</view>
</template>
@ -105,7 +118,7 @@
headReplace: '',
showform: false,
maskClose: false,
imgurl: '',
imgurl: require('@/static/me-head.png'),
form: {
name: ''
},
@ -145,10 +158,10 @@
const MenuButton = uni.getMenuButtonBoundingClientRect()
this.navBarTop = MenuButton.top //
this.getConfig()
},
onShow() {
this.getInitUser()
this.getDone()
},
onShow() {
this.getInitUser()
this.getDone()
},
methods: {
onChooseAvatar(e) {
@ -186,30 +199,32 @@
this.$u.vuex('vuex_user', res)
console.log(this.vuex_user)
this.form = res
this.imgurl = res.headimgurl ? res.headimgurl : ''
if (res.headimgurl) {
this.imgurl = res.headimgurl
}
this.info = this.$u.deepClone(res);
if (isNull(res.name)) {
this.showform = true
}
},
async getDone() {
const res = await this.$u.api.getPoints()
const res = await this.$u.api.getPoints()
// this.done = res.point_answer_total
this.done = res.point_answer_total > this.answerTotal ? this.answerTotal : res.point_answer_total
},
async getConfig() {
await this.$u.api.getAppId().then(res=>{
res.config.map(item => {
if (item.key === 'tips') {
this.tips = item.value
}
if (item.key === 'answer_total') {
this.answerTotal = parseInt(item.value)
}
})
})
await this.$u.api.getAppId().then(res => {
res.config.map(item => {
if (item.key === 'tips') {
this.tips = item.value
}
if (item.key === 'answer_total') {
this.answerTotal = parseInt(item.value)
}
})
})
},
submit() {
if (isNull(this.form.name)) {
@ -371,27 +386,76 @@
}
.login {
.u-drawer-content-visible {
border-radius: 25rpx 25rpx 0 0;
}
&-top {
font-size: 30rpx;
color: #000000;
margin: 40rpx 50rpx;
border-bottom: 1px solid #eaeaea;
padding-bottom: 40rpx;
>view {
&:first-child {
padding-bottom: 50rpx;
}
>view {
color: #666666;
&:first-child {
font-size: 36rpx;
color: #000000;
padding-bottom: 30rpx;
}
}
}
image {
width: 53rpx;
height: 53rpx;
vertical-align: middle;
}
text {
margin-left: 30rpx;
}
}
&-form {
padding: 20rpx 60rpx;
padding: 30rpx 40rpx;
margin-top: 20rpx;
padding-bottom: 120rpx;
padding-bottom: 60rpx;
display: flex;
>view {
margin-bottom: 30rpx;
background-color: #fff;
padding: 20rpx 40rpx;
border-radius: 20rpx;
display: flex;
align-items: center;
// margin-bottom: 30rpx;
// background-color: #fff;
// padding: 20rpx 40rpx;
// border-radius: 20rpx;
// display: flex;
// align-items: center;
width: 140rpx;
span {
width: 120rpx;
text-align: right;
>view {
width: 140rpx;
text-align: center;
color: #666666;
}
button {
width: 100rpx;
height: 100rpx;
border-radius: 100rpx;
border: none;
background-color: #fff;
color: #fff;
font-size: 0;
margin: 0 auto !important;
margin-bottom: 10rpx!important;
image {
width: 100%;
@ -399,29 +463,31 @@
}
}
>view {
border: 1px solid #999;
border-radius: 10rpx;
display: flex;
width: calc(100% - 120rpx);
padding: 10rpx 20rpx;
}
input {
width: 100%;
}
}
&-input {
border: 1px solid #eaeaea;
border-radius: 10rpx;
padding: 10rpx 20rpx;
margin-top: 10rpx;
width: calc(100% - 140rpx) !important;
height: 80rpx;
input {
width: 100%;
height: 100%;
}
}
}
&-btn {
padding: 30rpx 60rpx;
padding-top: 0;
padding-bottom:90rpx;
&-btn {
box-shadow: 0.5px 3px 9px 0px rgba(235, 107, 85, 0.3);
background: #960909;
border-radius: 44rpx;
border-radius: 16rpx;
text-align: center;
height: 88rpx;
color: #fff;

Binary file not shown.

After

Width:  |  Height:  |  Size: 979 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Loading…
Cancel
Save