调整绘制背景图

This commit is contained in:
唐明明
2021-09-29 16:56:29 +08:00
4 changed files with 46 additions and 32 deletions

View File

@@ -9,8 +9,8 @@ import store from '@/store'
// 基础配置
const config = {
apiUrl : 'https://oapi.lianshang.vip/api/',
apiUrls : 'https://oapi.lianshang.vip/',
apiUrl : 'http://api.ahxh.shangkelian.cn/api/',
apiUrls : 'http://api.ahxh.shangkelian.cn/',
// apiUrl : 'http://api.ahxh.shangkelian.cn/api/',
// apiUrls : 'http://api.ahxh.shangkelian.cn/',
timeout : 60000

View File

@@ -0,0 +1,18 @@
export default function h5Copy(content) {
if (!document.queryCommandSupported('copy')) {
// 不支持
return false
}
let textarea = document.createElement("textarea")
textarea.value = content
textarea.readOnly = "readOnly"
document.body.appendChild(textarea)
textarea.select() // 选择对象
textarea.setSelectionRange(0, content.length) //核心
let result = document.execCommand("copy") // 执行浏览器复制命令
textarea.remove()
return result
}

View File

@@ -60,6 +60,7 @@
import { userInvite } from '@/apis/interfaces/user'
import { saveImageToPhotosAlbum, showToast, downloadFile } from '@/uni_modules/sakura-canvas/js_sdk/util'
import Draw from '@/uni_modules/sakura-canvas/js_sdk/draw'
import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy'
let draw = null
export default {
data() {
@@ -270,20 +271,17 @@
// 复制邀请码
copyCenter(e) {
let copyNo = e
uni.vibrateShort({
success: () => {
uni.setClipboardData({
data : copyNo,
success : res=> {
const result = h5Copy(copyNo)
if (result === false) {
uni.showToast({
title:'不支持',
})
} else {
uni.showToast({
title:'复制成功',
icon :'none',
duration: 3000
});
}
icon:'none'
})
}
})
},
// 切换海报背景index

View File

@@ -28,7 +28,7 @@
<!-- 消息列表弹出 end -->
<!-- 用户信息 start -->
<view class="fileTool" :class="{ bigTool: scroll > 200 }">
<!-- <view class="fileTool" :class="{ bigTool: scroll > 200 }">
<view class="user-portrait">
<image class="user-portrait-head" :src="userData.avatar ? userData.avatar : '/static/user/user-portrait.png'" mode="aspectFill"></image>
</view>
@@ -39,7 +39,7 @@
<image class="user-tool-icon" src="/static/user/user-top-00.png" mode="aspectFill" @click="$Router.push({name: 'setting'})"></image>
<image class="user-tool-icon" src="/static/user/user-top-01.png" mode="aspectFill" @click="$Router.push({name: 'news'})"></image>
</view>
</view>
</view> -->
<view class="user-top" :class="[scroll > 0 ? 'bigTop' : 'refurnTop']">
<!-- <image class="user-back" :class="[scroll > 0 ? 'bigSize' : 'refurnSize']" src="../../static/img/user-back.png" mode="aspectFill"></image> -->
<view class="user-tool">
@@ -252,6 +252,7 @@
<script>
import { userIndex, userNotice, userCustomer } from '@/apis/interfaces/user'
import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy'
export default {
data() {
return {
@@ -355,20 +356,17 @@
// 复制邀请码
copyCenter(e) {
let copyNo = e
uni.vibrateShort({
success: () => {
uni.setClipboardData({
data : copyNo,
success : res=> {
const result = h5Copy(copyNo)
if (result === false) {
uni.showToast({
title:'不支持',
})
} else {
uni.showToast({
title:'复制成功',
icon :'none',
duration: 3000
});
}
icon:'none'
})
}
})
},
// 友情提示信息