调整分享码,修复修改资料提示字段判断错误
This commit is contained in:
1
App.vue
1
App.vue
@@ -8,7 +8,6 @@
|
|||||||
platform: plus.os.name,
|
platform: plus.os.name,
|
||||||
version : plus.runtime.version
|
version : plus.runtime.version
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
|
||||||
if (res.update) {
|
if (res.update) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title : "更新提示",
|
title : "更新提示",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name" : "抖火",
|
"name" : "抖火",
|
||||||
"appid" : "__UNI__C305C03",
|
"appid" : "__UNI__C305C03",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.1.3",
|
"versionName" : "1.1.4",
|
||||||
"versionCode" : "100",
|
"versionCode" : "100",
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
|
|||||||
14
pages.json
14
pages.json
@@ -22,6 +22,7 @@
|
|||||||
}, {
|
}, {
|
||||||
"path": "pages/index/free",
|
"path": "pages/index/free",
|
||||||
"name": "FreeService",
|
"name": "FreeService",
|
||||||
|
"auth": true,
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"navigationBarTitleText": "自由服务包介绍",
|
"navigationBarTitleText": "自由服务包介绍",
|
||||||
@@ -477,7 +478,7 @@
|
|||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"navigationBarBackgroundColor": "#ffffff"
|
"navigationBarBackgroundColor": "#ffffff"
|
||||||
}
|
}
|
||||||
},{
|
}, {
|
||||||
"path": "pages/work/confirmScheme",
|
"path": "pages/work/confirmScheme",
|
||||||
"auth": true,
|
"auth": true,
|
||||||
"name": "ConfirmScheme",
|
"name": "ConfirmScheme",
|
||||||
@@ -496,6 +497,17 @@
|
|||||||
"navigationBarTextStyle": "white",
|
"navigationBarTextStyle": "white",
|
||||||
"navigationBarBackgroundColor": "#446EFE"
|
"navigationBarBackgroundColor": "#446EFE"
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/user/salesmanCode",
|
||||||
|
"auth": true,
|
||||||
|
"name": "SalesmanCode",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "业务员邀请码",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarBackgroundColor": "#446EFE"
|
||||||
|
}
|
||||||
|
|
||||||
}],
|
}],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
|
|||||||
@@ -207,7 +207,6 @@
|
|||||||
},
|
},
|
||||||
// 点击轮播图跳转自由服务包
|
// 点击轮播图跳转自由服务包
|
||||||
clickFree(){
|
clickFree(){
|
||||||
console.log('clickFree.....')
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/index/free'
|
url:'/pages/index/free'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<view class="qrcode">
|
<view class="qrcode">
|
||||||
<l-painter class="qrcode-src">
|
<l-painter class="qrcode-src">
|
||||||
<l-painter-qrcode
|
<l-painter-qrcode
|
||||||
:text="'https://app.douhuofalv.com/app?invite_code=' + invite"
|
:text="'https://web.douhuofalv.com/login/register?invite_code=' + invite"
|
||||||
css="width: 130px; height: 130px; background-color:white; padding: 10px; border-radius: 10rpx;"
|
css="width: 130px; height: 130px; background-color:white; padding: 10px; border-radius: 10rpx;"
|
||||||
/>
|
/>
|
||||||
</l-painter>
|
</l-painter>
|
||||||
@@ -157,7 +157,7 @@
|
|||||||
},
|
},
|
||||||
views: [
|
views: [
|
||||||
{
|
{
|
||||||
text: "https://app.douhuofalv.com/app?invite_code=" + this.invite,
|
text: "https://web.douhuofalv.com/login/register?invite_code=" + this.invite,
|
||||||
type: "qrcode",
|
type: "qrcode",
|
||||||
css: {
|
css: {
|
||||||
width: "280rpx",
|
width: "280rpx",
|
||||||
|
|||||||
@@ -116,7 +116,20 @@
|
|||||||
// 分享码
|
// 分享码
|
||||||
onUserCode(){
|
onUserCode(){
|
||||||
if(this.identity.order > 1){
|
if(this.identity.order > 1){
|
||||||
this.$Router.push({ name: 'UserCode' })
|
uni.showActionSheet({
|
||||||
|
itemList: ['客户邀请码', '业务员邀请码'],
|
||||||
|
success: res => {
|
||||||
|
switch (res.tapIndex){
|
||||||
|
case 0:
|
||||||
|
this.$Router.push({ name: 'UserCode' })
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
this.$Router.push({ name: 'SalesmanCode' })
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
//
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
|
|||||||
250
pages/user/salesmanCode.vue
Normal file
250
pages/user/salesmanCode.vue
Normal file
@@ -0,0 +1,250 @@
|
|||||||
|
<template>
|
||||||
|
<view class="code" :style="'background-image: url(' + require('@/static/code/back.png') + ')'">
|
||||||
|
<image class="code-back code-logo" src="@/static/code/logo.png" mode="widthFix"></image>
|
||||||
|
<image class="code-back code-heder" src="@/static/code/header.png" mode="widthFix"></image>
|
||||||
|
<view class="block">
|
||||||
|
<view class="qrcode" :style="'background-image: url(' + require('@/static/code/code.png') + ')'">
|
||||||
|
<view class="qrcode-column">
|
||||||
|
<l-painter class="qrcode-src">
|
||||||
|
<l-painter-qrcode
|
||||||
|
:text="'https://app.douhuofalv.com/app?invite_code=' + invite"
|
||||||
|
css="width: 250rpx; height: 250rpx;"
|
||||||
|
/>
|
||||||
|
</l-painter>
|
||||||
|
<view class="qrcode-text" @click="copyInvite">邀请码{{invite}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<image class="btn" src="@/static/code/btn.png" mode="widthFix" @click="onWx"></image>
|
||||||
|
</view>
|
||||||
|
<!-- 绘制二维码 -->
|
||||||
|
<l-painter ref="painter" class="code-canvas" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
code
|
||||||
|
} from '@/apis/interfaces/user.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
invite : '',
|
||||||
|
codeLay: false,
|
||||||
|
codeImg: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
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() {
|
||||||
|
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: "1300rpx",
|
||||||
|
background: "#1F25AE",
|
||||||
|
position: "relative"
|
||||||
|
},
|
||||||
|
views: [
|
||||||
|
{
|
||||||
|
type: "image",
|
||||||
|
src: require('@/static/code/back.png'),
|
||||||
|
css: {
|
||||||
|
width: "600rpx",
|
||||||
|
height: "1300rpx",
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
type: "image",
|
||||||
|
src: require('@/static/code/logo.png'),
|
||||||
|
css: {
|
||||||
|
width: "200rpx",
|
||||||
|
height: "55rpx",
|
||||||
|
position: "absolute",
|
||||||
|
top: "80rpx",
|
||||||
|
left: "50rpx",
|
||||||
|
zIndex: 1
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
type: "image",
|
||||||
|
src: require('@/static/code/header.png'),
|
||||||
|
css: {
|
||||||
|
width: "400rpx",
|
||||||
|
height: "160rpx",
|
||||||
|
position: "absolute",
|
||||||
|
top: "200rpx",
|
||||||
|
left: "100rpx",
|
||||||
|
zIndex: 1
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
type: "image",
|
||||||
|
src: require('@/static/code/code.png'),
|
||||||
|
css: {
|
||||||
|
width: "360rpx",
|
||||||
|
height: "325rpx",
|
||||||
|
position: "absolute",
|
||||||
|
top: "440rpx",
|
||||||
|
left: "120rpx",
|
||||||
|
zIndex: 1
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
type: "view",
|
||||||
|
css: {
|
||||||
|
height: '325rpx',
|
||||||
|
width: '360rpx',
|
||||||
|
position: "absolute",
|
||||||
|
top: "440rpx",
|
||||||
|
left: "120rpx",
|
||||||
|
},
|
||||||
|
views: [
|
||||||
|
{
|
||||||
|
text: "https://app.douhuofalv.com/app?invite_code=" + this.invite,
|
||||||
|
type: "qrcode",
|
||||||
|
css: {
|
||||||
|
width: "220rpx",
|
||||||
|
height: "220rpx",
|
||||||
|
background: "#FFF",
|
||||||
|
marginLeft: "70rpx",
|
||||||
|
marginTop: "40rpx"
|
||||||
|
},
|
||||||
|
},{
|
||||||
|
type: "text",
|
||||||
|
text: "邀请码" + this.invite,
|
||||||
|
css: {
|
||||||
|
width: "300rpx",
|
||||||
|
marginLeft: "30rpx",
|
||||||
|
marginTop: "10rpx",
|
||||||
|
lineClamp: "1",
|
||||||
|
lineHeight: "40rpx",
|
||||||
|
textAlign: "center",
|
||||||
|
color: "gray",
|
||||||
|
fontSize: "28rpx"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
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: '二维码已保存到您的相册',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fail: err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '保存失败,请检查您的App[访问您的系统相册]系统权限',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.code-canvas{
|
||||||
|
position: absolute;
|
||||||
|
left: -100%;
|
||||||
|
top: -100%;
|
||||||
|
}
|
||||||
|
// 二维码
|
||||||
|
.code {
|
||||||
|
background: #1F25AE;
|
||||||
|
position: relative;
|
||||||
|
height: 100vh;
|
||||||
|
background-position: center bottom;
|
||||||
|
background-size: cover;
|
||||||
|
padding: 50rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.code-back{
|
||||||
|
&.code-logo{
|
||||||
|
width: 240rpx;
|
||||||
|
}
|
||||||
|
&.code-heder{
|
||||||
|
width: 90%;
|
||||||
|
margin: 40rpx 5%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.block{
|
||||||
|
text-align: center;
|
||||||
|
.qrcode{
|
||||||
|
display: inline-block;
|
||||||
|
width: 70%;
|
||||||
|
padding-top: 63%;
|
||||||
|
position: relative;
|
||||||
|
background-size: cover;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
.qrcode-column{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
.qrcode-src{
|
||||||
|
width: 250rpx;
|
||||||
|
height: 250rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
.qrcode-text{
|
||||||
|
margin-top: 20rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn{
|
||||||
|
width: 70%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
<view class="from-item from-item-50">
|
<view class="from-item from-item-50">
|
||||||
<label>
|
<label>
|
||||||
<text>*</text>学历
|
<text>*</text>学历
|
||||||
<uni-icons v-if="baseInfo.check_params.marriage" class="from-icon" type="info" size="18" color="red" @click="modifyToast(baseInfo.check_params.education.description)"></uni-icons>
|
<uni-icons v-if="baseInfo.check_params.education" class="from-icon" type="info" size="18" color="red" @click="modifyToast(baseInfo.check_params.education.description)"></uni-icons>
|
||||||
</label>
|
</label>
|
||||||
<picker class="from-picker" :range="baseInfo.educations" :value="baseInfo.education" @change="baseInfo.education = $event.detail.value">
|
<picker class="from-picker" :range="baseInfo.educations" :value="baseInfo.education" @change="baseInfo.education = $event.detail.value">
|
||||||
<view class="from-picker-text">
|
<view class="from-picker-text">
|
||||||
|
|||||||
BIN
static/code/back.png
Normal file
BIN
static/code/back.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
BIN
static/code/btn.png
Normal file
BIN
static/code/btn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
static/code/code.png
Normal file
BIN
static/code/code.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
BIN
static/code/header.png
Normal file
BIN
static/code/header.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 156 KiB |
BIN
static/code/logo.png
Normal file
BIN
static/code/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user