调整实名认证城市,新增个人订单确认流程,调整退款订单状态

This commit is contained in:
唐明明
2023-01-04 15:15:24 +08:00
parent 025a10849a
commit b29f29f005
21 changed files with 1078 additions and 83 deletions

View File

@@ -10,74 +10,220 @@
</view>
<view class="block">
<view class="qrcode">
<l-painter class="qrcode-src">
<l-painter-qrcode
:text="'http://web.douhuofalv.com/login/register?invite_code=' + invite"
css="width: 130px; height: 130px; background-color:white; padding: 10px; border-radius: 10rpx;"
/>
<l-painter class="qrcode-src">
<l-painter-qrcode
:text="'https://app.douhuofalv.com/app?invite_code=' + invite"
css="width: 130px; height: 130px; background-color:white; padding: 10px; border-radius: 10rpx;"
/>
</l-painter>
<view class="qrcode-text" @click="copyInvite">邀请码{{invite}}</view>
</view>
<image class="btn" src="@/static/code/code_btn.png" mode="widthFix" @click="onWx"></image>
</view>
<image class="footer" src="@/static/code/code_footer.png" mode="widthFix"></image>
</view>
</view>
<!-- 绘制二维码 -->
<l-painter ref="painter" class="code-canvas" />
</view>
</template>
<script>
import { code } from '@/apis/interfaces/user.js'
<script>
import {
code
} from '@/apis/interfaces/user.js'
export default {
data() {
return {
invite: ''
invite : '',
codeLay: false,
codeImg: ''
};
},
created() {
code().then( res => {
let { invite } = res;
this.invite = invite
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
},
created() {
code().then(res => {
let {
invite
} = res;
this.invite = invite
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
},
methods: {
copyInvite(){
uni.setClipboardData({
data: this.invite,
success() {
methods: {
copyInvite() {
uni.setClipboardData({
data: this.invite,
success() {
uni.showToast({
title: '邀请码已复制',
icon: 'none'
})
}
})
},
onWx() {
uni.showLoading({
title: '保存二维码...',
mask : true
})
if(this.codeImg != ''){
this.onDowCode()
return
}
this.$refs.painter.render({
css: {
width: "600rpx",
height: "1218rpx",
background: "#1F25AE",
position: "relative"
},
views: [
{
type: "image",
src: require('@/static/code/code_back.png'),
css: {
width: "600rpx",
height: "679rpx",
marginTop: "200rpx"
}
},{
type: "image",
src: require('@/static/code/code_header.png'),
css: {
width: "600rpx",
height: "415rpx",
position: "absolute",
top: 0,
zIndex: 1
}
},{
type: "image",
src: require('@/static/code/code_img_lay.png'),
css: {
width: "200rpx",
height: "277rpx",
position: "absolute",
bottom: 0,
zIndex: 1
}
},{
type: "image",
src: require('@/static/code/code_footer.png'),
css: {
width: "400rpx",
height: "84rpx",
position: "absolute",
bottom: "50rpx",
left: "100rpx",
zIndex: 1
}
},{
type: "image",
src: require('@/static/code/code_sign.png'),
css: {
width: "460rpx",
height: "164rpx",
position: "absolute",
top: "50rpx",
left: "70rpx",
zIndex: 1
}
},{
type: "image",
src: require('@/static/code/code_logo.png'),
css: {
width: "160rpx",
height: "160rpx",
position: "absolute",
top: "230rpx",
left: "220rpx",
zIndex: 1
}
},{
type: "view",
css: {
borderWidth: '1rpx',
borderColor: '#ffe2c2',
borderRadius: '20rpx',
height: '450rpx',
width: '360rpx',
position: "absolute",
top: "450rpx",
left: "120rpx",
background: "#0a2763"
},
views: [
{
text: "https://app.douhuofalv.com/app?invite_code=" + this.invite,
type: "qrcode",
css: {
width: "280rpx",
height: "280rpx",
background: "#FFF",
padding: "20rpx",
borderRadius: "10rpx",
marginLeft: "21rpx",
marginTop: "20rpx"
},
},{
type: "text",
text: "邀请码" + this.invite,
css: {
width: "320rpx",
marginLeft: "21rpx",
marginTop: "20rpx",
lineClamp: "1",
lineHeight: "80rpx",
textAlign: "center",
color: "#ffffeb",
fontSize: "32rpx"
},
}
]
}
]
});
this.$refs.painter.canvasToTempFilePathSync({
fileType: "jpg",
quality: 1,
success: (res) => {
this.codeLay = true;
this.codeImg = res.tempFilePath
this.onDowCode()
}
});
},
onDowCode(){
uni.saveImageToPhotosAlbum({
filePath: this.codeImg,
success: ()=> {
uni.showToast({
title: '邀请码已复制',
title: '二维码已保存到您的相册',
icon : 'none'
})
}
})
},
onWx(){
uni.share({
title : "抖火法律",
provider: "weixin",
scene : "WXSceneSession",
imageUrl: require('@/static/logo.png'),
href : "http://web.douhuofalv.com/login/register?invite_code=" + this.invite,
type : 0,
summary: "法律问题我们'抖'懂",
},
fail: err => {
uni.showToast({
title: err.message,
title: '保存失败请检查您的App[访问您的系统相册]系统权限',
icon : 'none'
})
}
});
}
}
}
}
</script>
<style lang="scss">
<style lang="scss">
.code-canvas{
position: absolute;
left: -100%;
top: -100%;
}
// 二维码
.code {
background: #1F25AE;
height: 100vh;
@@ -132,23 +278,23 @@
.block {
text-align: center;
margin-bottom: 30rpx;
width: 100%;
margin-bottom: 30rpx;
width: 100%;
.qrcode {
display: inline-block;
border: solid 2rpx #ECC997;
background: #0E2660;
border-radius: 20rpx;
padding: 30rpx;
.qrcode-src{
width: 150px;
height: 150px;
}
padding: 30rpx;
.qrcode-src{
width: 150px;
height: 150px;
}
.qrcode-text {
text-align: center;
color: #FFF5C6;
line-height: 50rpx;
padding-top: 30rpx;
padding-top: 30rpx;
font-size: 30rpx;
}
}