修改王者荣耀裁剪图片方式
This commit is contained in:
parent
9c5f267b5f
commit
8657afdbd7
|
|
@ -119,10 +119,10 @@
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="form-item avatar-form-item">
|
<view class="form-item avatar-form-item">
|
||||||
<text class="label">头像</text>
|
<text class="label">头像</text>
|
||||||
<view class="avatar-uploader">
|
<view class="avatar-uploader" @click="handleChooseAvatar">
|
||||||
<view class="avatar-preview" v-if="tempData.avatar">
|
<view class="avatar-preview" v-if="tempData.avatar">
|
||||||
<image class="preview-img" :src="tempData.avatar" mode="aspectFill"></image>
|
<image class="preview-img" :src="tempData.avatar" mode="aspectFill"></image>
|
||||||
<view class="delete-icon" @click="handleDeleteAvatar">
|
<view class="delete-icon">
|
||||||
<text>×</text>
|
<text>×</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -226,7 +226,7 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
|
import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
|
||||||
import { onLoad, onReady } from '@dcloudio/uni-app'
|
import { onLoad, onReady, onUnload } from '@dcloudio/uni-app'
|
||||||
const rightButtonText = ref("编辑");
|
const rightButtonText = ref("编辑");
|
||||||
const instance = getCurrentInstance();
|
const instance = getCurrentInstance();
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
@ -270,6 +270,15 @@ onLoad(() => {
|
||||||
Object.assign(honorData, cachedData);
|
Object.assign(honorData, cachedData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uni.$on('editFormPhoto', (info) => {
|
||||||
|
tempData.avatar = info;
|
||||||
|
// #ifndef H5
|
||||||
|
if (info && !info.startsWith('/static/')) {
|
||||||
|
newAvatars.value.push(info);
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
});
|
||||||
|
|
||||||
// 进入页面埋点
|
// 进入页面埋点
|
||||||
proxy.$apiUserEvent('all', {
|
proxy.$apiUserEvent('all', {
|
||||||
type: 'click',
|
type: 'click',
|
||||||
|
|
@ -371,6 +380,10 @@ onLoad(() => {
|
||||||
loadSingleFont(fontUrl2, 'WangZheFont2', 'wangzhe_font2_path', checkAllLoaded);
|
loadSingleFont(fontUrl2, 'WangZheFont2', 'wangzhe_font2_path', checkAllLoaded);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
onUnload(() => {
|
||||||
|
uni.$off('editFormPhoto');
|
||||||
|
})
|
||||||
|
|
||||||
const finalPosterPath = ref('');
|
const finalPosterPath = ref('');
|
||||||
|
|
||||||
const editPopup = ref(null);
|
const editPopup = ref(null);
|
||||||
|
|
@ -393,25 +406,10 @@ function onRightClick() {
|
||||||
const handleChooseAvatar = () => {
|
const handleChooseAvatar = () => {
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 1,
|
count: 1,
|
||||||
crop: {
|
|
||||||
quality: 100,
|
|
||||||
width: 400,
|
|
||||||
height: 400
|
|
||||||
},
|
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
const tempPath = res.tempFilePaths[0];
|
uni.navigateTo({
|
||||||
// #ifndef H5
|
url: `/pages/other/qf-image/qf-image?src=${res.tempFilePaths[0]}&width=200&height=200`
|
||||||
uni.saveFile({
|
|
||||||
tempFilePath: tempPath,
|
|
||||||
success: (saveRes) => {
|
|
||||||
tempData.avatar = saveRes.savedFilePath;
|
|
||||||
newAvatars.value.push(saveRes.savedFilePath);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
// #endif
|
|
||||||
// #ifdef H5
|
|
||||||
tempData.avatar = tempPath;
|
|
||||||
// #endif
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<nav-bar bgColor="transparent" :isBack="false" tipLayerType="wx-payment-tip" isTipLayer tipLayerText="修改支付信息"
|
<nav-bar bgColor="transparent" :isBack="false">
|
||||||
:buttonGroup="buttonGroup" @button-click="util.clickTitlePopupButton">
|
|
||||||
<template v-slot:center>
|
<template v-slot:center>
|
||||||
<view class="flex-cneter title-box flex">
|
<view class="flex-cneter title-box flex">
|
||||||
<image class="wx-logo" src="/static/image/other/payment-success/payment-success.png"></image>
|
<image class="wx-logo" src="/static/image/other/payment-success/payment-success.png"></image>
|
||||||
|
|
@ -9,7 +8,7 @@
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</nav-bar>
|
</nav-bar>
|
||||||
<view class="content-box flex-column flex-cneter">
|
<view class="content-box flex-column flex-cneter" @click="editPaymentInfo">
|
||||||
<text class="product-name">{{ paymetInfo.productName }}</text>
|
<text class="product-name">{{ paymetInfo.productName }}</text>
|
||||||
<view class="money flex wx-font-medium">
|
<view class="money flex wx-font-medium">
|
||||||
<image class="symbol" src="/static/image/other/payment-success/symbol-yuan.png"></image>{{
|
<image class="symbol" src="/static/image/other/payment-success/symbol-yuan.png"></image>{{
|
||||||
|
|
@ -38,14 +37,27 @@
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 水印 -->
|
||||||
|
<view v-if="$isVip()">
|
||||||
|
<watermark dark="light" source="uni_alipay_other_wx_pay_success" />
|
||||||
|
<liu-drag-button :canDocking="false"
|
||||||
|
@clickBtn="$goRechargePage('watermark', 'uni_alipay_other_wx_pay_success')">
|
||||||
|
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
|
||||||
|
</liu-drag-button>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref, getCurrentInstance } from 'vue';
|
||||||
import { onShow } from '@dcloudio/uni-app';
|
import { onShow, onLoad } from '@dcloudio/uni-app';
|
||||||
import { util } from '@/utils/common';
|
import { util } from '@/utils/common';
|
||||||
import { storage } from '@/utils/storage';
|
import { storage } from '@/utils/storage';
|
||||||
|
|
||||||
|
const {
|
||||||
|
proxy
|
||||||
|
} = getCurrentInstance();
|
||||||
|
|
||||||
const editPaymentInfoPopup = ref(null);
|
const editPaymentInfoPopup = ref(null);
|
||||||
|
|
||||||
const editPaymentInfo = () => {
|
const editPaymentInfo = () => {
|
||||||
|
|
@ -79,6 +91,25 @@ onShow(() => {
|
||||||
} else {
|
} else {
|
||||||
paymetInfo.value = { productName: '王者荣耀', money: 168 };
|
paymetInfo.value = { productName: '王者荣耀', money: 168 };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||||
|
util.setAndroidSystemBarColor('#FFFFFF')
|
||||||
|
setTimeout(() => {
|
||||||
|
plus.navigator.setStatusBarStyle("light");
|
||||||
|
}, 500)
|
||||||
|
// #endif
|
||||||
|
})
|
||||||
|
|
||||||
|
onLoad(async () => {
|
||||||
|
|
||||||
|
// 微信支付成功页面埋点
|
||||||
|
proxy.$apiUserEvent('all', {
|
||||||
|
type: 'event',
|
||||||
|
key: 'wx_pay_success',
|
||||||
|
prefix: '.uni.other.',
|
||||||
|
value: "微信支付成功"
|
||||||
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue