| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <template>
- <view>
- <customNav :shownav="true" title="" tinColor="#000000" jiantou="0" ></customNav>
- <view class="contentColumnC zhegnjimagBG" style="margin-top: 40rpx;margin-left: 10rpx;">
- <image v-if="zjImage==''" class="imagVwh" src="/static/defimags/111.png" mode="scaleToFill"></image>
- <myImage v-if="zjImage!=''" class="imagVwh" :mysrc="zjImage" mymode="scaleToFill"></myImage>
- <yhdslCropper ref="yhdslCropper" :quality="1" mode="scale" @uploadImg="uploadImg" :scale="scale"></yhdslCropper>
- </view>
- <view class="contentColumn" style="width: 90%;margin-left: 5%;margin-top: 60rpx;">
- <text v-if="index==1" class="tptitleText">{{$t('dache.jaszzm')}}</text>
- <text v-if="index==2" class="tptitleText">{{$t('dache.xingszzm')}}</text>
- <text v-if="index==3" class="tptitleText">{{$t('dache.cheldjtp')}}</text>
- <text class="tpdetealText" style="margin-top: 50rpx;">{{$t('dache.paisheyq')}}</text>
- <text v-if="index!=3" class="tpdetealText">{{$t('dache.paisheyqA')}}</text>
- <text v-if="index!=3" class="tpdetealText">{{$t('dache.paisheyqB')}}</text>
- <text v-if="index==3" class="tpdetealText">{{$t('dache.paisheyqC')}}</text>
- <text v-if="index==3" class="tpdetealText">{{$t('dache.paisheyqD')}}</text>
- </view>
- <view class="contentColumnC" style="margin-top: 60rpx;">
- <text class="bottomBt" @click="selectImg">{{$t('dache.qushangc')}}</text>
- </view>
- </view>
- </template>
- <script>
- import {
- UploadImage
- } from '@/pages/api/basic.js';
- import {
- updataUserMsg,
- } from '@/pages/api/login';
- import yhdslCropper from '@/components/yhdsl-cropper/yhdsl-cropper.vue';
- export default {
- components: {
- yhdslCropper
- },
- data() {
- return {
- scale:1.8,
- index:0,
- zjImage:''
- }
- },
- onLoad(option) {
- this.index = option.state;
- },
- methods: {
-
- selectImg(){
- console.log('userIconkl');
- this.$refs.yhdslCropper.chooseImage();
- },
-
- uploadImg(e) {
- //console.log('------------uploadImg:',e)
- var that = this;
- uni.uploadFile({
- url: this.$baseurl+UploadImage, //上传图片api
- filePath: e,
- name: 'file',
- header:{
- //"Authorization": userinfo.token
- },
- success: (res) => {
- let group = JSON.parse(res.data);
- that.zjImage=group.data;
- var usdata = {
- "avatar": that.zjImage};
- //that.updataUserMsg(usdata);
- }
- });
- },
-
- async updataUserMsg(data){
- await this.$http.post(`${updataUserMsg}`,data,true)
- .then(async r => {
- console.log('updataUserMsg',r)
-
- })
- .catch(err => {
- console.log(err)
- })
- },
- },
- }
- </script>
- <style lang="scss">
- @import '@/common/common.scss';
- page{
- background-color: #000000;
- }
- .zhegnjimagBG{
- width: 730rpx;
- height: 480rpx;
- background-size: 100% 100%;
- background-image: url('/static/imags/dache/zjbj@3x.png');
- }
- .imagVwh{
- width: 690rpx;
- height: 420rpx;
- }
- .tptitleText{
- font-size: 36rpx;
- color: white;
- font-weight: bold;
- }
- .tpdetealText{
- margin-top: 10rpx;
- font-size: 28rpx;
- color: white;
- }
- .bottomBt{
- width:90%;
- text-align: center;
- line-height: 86rpx;
- font-size: 32rpx;
- font-weight: bold;
- color: white;
- border-radius: 20rpx;
- background-color: #E86E48;
- margin-top: 20rpx;
- }
- </style>
|