Compare commits
4 Commits
8b5d81c6c8
...
prod
| Author | SHA1 | Date | |
|---|---|---|---|
| 6e2161fc5e | |||
| a95d7ebf01 | |||
| 0f640bdf9e | |||
| ea3fb0fe0f |
@@ -28,7 +28,7 @@ import { ref, onMounted } from 'vue';
|
|||||||
import { centerConfig,distributionEditIn } from '@/common/api/market/distribution.js';
|
import { centerConfig,distributionEditIn } from '@/common/api/market/distribution.js';
|
||||||
import { checkArrayElementsExist } from '@/utils/util.js';
|
import { checkArrayElementsExist } from '@/utils/util.js';
|
||||||
|
|
||||||
const shopInfo = ref('');
|
const shopInfo = defineModel('shopInfo');
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
type: {
|
type: {
|
||||||
|
|||||||
@@ -110,11 +110,11 @@
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
// console.log('分享组件挂载完毕:shareConfig',res);
|
// console.log('分享组件挂载完毕:shareConfig',res);
|
||||||
// console.log('分享组件挂载完毕:currentOptions',currentOptions);
|
// console.log('分享组件挂载完毕:currentOptions',currentOptions);
|
||||||
if(res){
|
if(res&& typeof res==='object'){
|
||||||
Object.assign(config,res)
|
Object.assign(config,res)
|
||||||
const rewardSharePages=res.rewardSharePages.split(',')
|
const rewardSharePages=res.rewardSharePages.split(',')
|
||||||
const pTag = returnPageTags(path)
|
const pTag = returnPageTags(path)
|
||||||
if( pTag&&rewardSharePages.includes(pTag)&¤tOptions.fromUserId&&res.isSharedUserPopup){
|
if( pTag&&rewardSharePages.includes(pTag)&¤tOptions.fromUserId&&res.isSharedUserPopup&&res.isEnabled){
|
||||||
show.value=true
|
show.value=true
|
||||||
}
|
}
|
||||||
// if(res.sharedUserCouponId&&res.sharedUserCouponNum){
|
// if(res.sharedUserCouponId&&res.sharedUserCouponNum){
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<view>
|
<view>
|
||||||
<up-navbar
|
<up-navbar
|
||||||
bg-color="transparent"
|
bg-color="transparent"
|
||||||
title="分销中心"
|
title="全民股东"
|
||||||
@leftClick="back"
|
@leftClick="back"
|
||||||
:fixed="true"
|
:fixed="true"
|
||||||
></up-navbar>
|
></up-navbar>
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
v-if="state.activates.totalRow > 0"
|
v-if="state.activates.totalRow*1 > 0"
|
||||||
class="u-flex justify-center font-12 color-666"
|
class="u-flex justify-center font-12 color-666"
|
||||||
style="align-items: baseline"
|
style="align-items: baseline"
|
||||||
@click="toShopList('activates')"
|
@click="toShopList('activates')"
|
||||||
@@ -159,7 +159,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
v-if="state.activates.totalRow > 0"
|
v-if="state.unActivates.totalRow*1 > 0"
|
||||||
class="u-flex justify-center font-12 color-666"
|
class="u-flex justify-center font-12 color-666"
|
||||||
style="align-items: baseline"
|
style="align-items: baseline"
|
||||||
@click="toShopList('unActivates')"
|
@click="toShopList('unActivates')"
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<view class="u-m-l-32 u-flex-1 border">
|
<view class="u-m-l-32 u-flex-1 border">
|
||||||
<input placeholder="请输入上级邀请码" v-model="code" />
|
<input placeholder="请输入上级邀请码" v-model="code" />
|
||||||
</view>
|
</view>
|
||||||
<image src="/distribution/static/scan.svg" class="u-m-l-10" style="width: 60rpx; height: 60rpx;" @click="saoma"></image>
|
<!-- <image src="/distribution/static/scan.svg" class="u-m-l-10" style="width: 60rpx; height: 60rpx;" @click="saoma"></image> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="u-m-t-32 u-flex u-col-center" style="gap: 54rpx">
|
<view class="u-m-t-32 u-flex u-col-center" style="gap: 54rpx">
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
<view class="w-qrcode">
|
<view class="w-qrcode">
|
||||||
<w-qrcode :options="codeOptions" :opacity="0" ref="wQrcode" @generate="(e) => qrcodeResult(e)"></w-qrcode>
|
<w-qrcode :options="codeOptions" :opacity="0" ref="wQrcode" @generate="(e) => qrcodeResult(e)"></w-qrcode>
|
||||||
</view>
|
</view>
|
||||||
<up-popup :show="show" bgColor="transparent" :safeAreaInsetBottom="false" :closeOnClickOverlay="true" @close="close" mode="center">
|
<up-popup :duration="0" :show="show" bgColor="transparent" :safeAreaInsetBottom="false"
|
||||||
|
:closeOnClickOverlay="true" @close="close" mode="center">
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="u-flex justify-center">
|
<view class="u-flex justify-center">
|
||||||
@@ -25,12 +26,15 @@
|
|||||||
ref="wQrcode"
|
ref="wQrcode"
|
||||||
@generate="(e) => qrcodeResult(e)"
|
@generate="(e) => qrcodeResult(e)"
|
||||||
></w-qrcode> -->
|
></w-qrcode> -->
|
||||||
<up-image width="322rpx" height="322rpx" :src="code"></up-image>
|
<image :src="code" class="code"></image>
|
||||||
|
<!-- <up-image width="322rpx" mode="scaleToFill" height="322rpx" :src="code"></up-image> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="footer-wrap">
|
<view class="footer-wrap">
|
||||||
<view class="confirm line" @click="save">保存图片</view>
|
<view class="confirm line" @click="save">保存图片</view>
|
||||||
<ymf-share><view class="confirm">微信分享</view></ymf-share>
|
<ymf-share>
|
||||||
|
<view class="confirm">微信分享</view>
|
||||||
|
</ymf-share>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</up-popup>
|
</up-popup>
|
||||||
@@ -38,17 +42,28 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { shareMixin, handleMixinOnLoad, returnQuery } from '@/utils/share.js';
|
import {
|
||||||
|
shareMixin,
|
||||||
|
handleMixinOnLoad,
|
||||||
|
returnQuery
|
||||||
|
} from '@/utils/share.js';
|
||||||
import ymfShare from '@/components/ymf-components/ymf-share.vue';
|
import ymfShare from '@/components/ymf-components/ymf-share.vue';
|
||||||
import wQrcode from '@/uni_modules/wmf-code/components/w-qrcode/w-qrcode.vue';
|
import wQrcode from '@/uni_modules/wmf-code/components/w-qrcode/w-qrcode.vue';
|
||||||
import { desensitizePhone } from '@/utils/util.js';
|
import {
|
||||||
import { ref, onMounted, nextTick } from 'vue';
|
desensitizePhone
|
||||||
|
} from '@/utils/util.js';
|
||||||
|
import {
|
||||||
|
ref,
|
||||||
|
onMounted,
|
||||||
|
nextTick
|
||||||
|
} from 'vue';
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
await nextTick();
|
await nextTick();
|
||||||
const query = await returnQuery();
|
const query = await returnQuery();
|
||||||
codeOptions.value.code = `https://cashier.sxczgkj.com/invite?${removeQAndAfter(query)}`;
|
codeOptions.value.code =
|
||||||
|
`https://cashier.sxczgkj.com/invite?${removeQAndAfter(query)}`;
|
||||||
console.log('codeOptions.value', codeOptions.value);
|
console.log('codeOptions.value', codeOptions.value);
|
||||||
}, 500);
|
}, 500);
|
||||||
});
|
});
|
||||||
@@ -109,10 +124,12 @@ const show = defineModel({
|
|||||||
default: false
|
default: false
|
||||||
});
|
});
|
||||||
const emits = defineEmits(['cancel', 'confirm']);
|
const emits = defineEmits(['cancel', 'confirm']);
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
show.value = false;
|
show.value = false;
|
||||||
emits('cancel');
|
emits('cancel');
|
||||||
}
|
}
|
||||||
|
|
||||||
function save() {
|
function save() {
|
||||||
show.value = false;
|
show.value = false;
|
||||||
|
|
||||||
@@ -142,7 +159,8 @@ function save() {
|
|||||||
uni.openSetting({
|
uni.openSetting({
|
||||||
success: function(settingRes) {
|
success: function(settingRes) {
|
||||||
// 检查用户是否开启了相册授权
|
// 检查用户是否开启了相册授权
|
||||||
if (settingRes.authSetting['scope.writePhotosAlbum']) {
|
if (settingRes.authSetting[
|
||||||
|
'scope.writePhotosAlbum']) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '授权成功,可重新保存',
|
title: '授权成功,可重新保存',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
@@ -182,33 +200,40 @@ function save() {
|
|||||||
:deep(.info .canvas) {
|
:deep(.info .canvas) {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.border {
|
.border {
|
||||||
border: 2rpx solid #d9d9d9;
|
border: 2rpx solid #d9d9d9;
|
||||||
padding: 18rpx;
|
padding: 18rpx;
|
||||||
border-radius: 4rpx;
|
border-radius: 4rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box {
|
.box {
|
||||||
width: 638rpx;
|
width: 638rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
// overflow: hidden;
|
// overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
color: #000000;
|
color: #000000;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
border-bottom: 2rpx solid #ededed;
|
border-bottom: 2rpx solid #ededed;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
padding: 96rpx 40rpx 96rpx 40rpx;
|
padding: 96rpx 40rpx 96rpx 40rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.small-title {
|
.small-title {
|
||||||
min-width: 84rpx;
|
min-width: 84rpx;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer-wrap {
|
.footer-wrap {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -229,6 +254,7 @@ function save() {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
line-height: 48rpx;
|
line-height: 48rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.confirm {
|
.confirm {
|
||||||
$color: #e8ad7b;
|
$color: #e8ad7b;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -243,18 +269,25 @@ function save() {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
&.line {
|
&.line {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
color: $color;
|
color: $color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.line-height-54 {
|
.line-height-54 {
|
||||||
line-height: 54rpx;
|
line-height: 54rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.w-qrcode {
|
.w-qrcode {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: -9999px;
|
left: -9999px;
|
||||||
top: -9999px;
|
top: -9999px;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
}
|
}
|
||||||
|
.code{
|
||||||
|
width: 322rpx;
|
||||||
|
height: 322rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="min-h-100vh bg-gray">
|
<view class="min-h-100vh bg-gray">
|
||||||
<up-navbar bg-color="transparent" title="分销中心" @leftClick="back" :fixed="true"></up-navbar>
|
<up-navbar bg-color="transparent" title="全民股东" @leftClick="back" :fixed="true"></up-navbar>
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<image class="top_bg" src="/distribution/static/top_bg.png" :style="imageStyle"></image>
|
<image class="top_bg" src="/distribution/static/top_bg.png" :style="imageStyle"></image>
|
||||||
<view class="box" :class="{ type1: isActivated }">
|
<view class="box" :class="{ type1: isActivated }">
|
||||||
@@ -10,10 +10,10 @@
|
|||||||
<text class="u-m-l-14 font-14 color-333 font-700">{{ state.shopName }}</text>
|
<text class="u-m-l-14 font-14 color-333 font-700">{{ state.shopName }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<template v-if="state.parentPhone">
|
<template v-if="state.parentPhone||state.parentName ">
|
||||||
<view class="font-12 color-666">上级:{{ state.parentName }}{{ state.parentPhone }}</view>
|
<view class="font-12 color-666">上级:{{ state.parentName }}{{ state.parentPhone }}</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="!state.parentPhone">
|
<template v-else>
|
||||||
<view class="bind" @click="showBindShangji = true">绑定上级</view>
|
<view class="bind" @click="showBindShangji = true">绑定上级</view>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
@@ -221,7 +221,7 @@
|
|||||||
<commissionPopup :tipsType="commissionTipsType" v-model="showCommission" :config="config"
|
<commissionPopup :tipsType="commissionTipsType" v-model="showCommission" :config="config"
|
||||||
:levelConfigList="config.levelConfigList || []"></commissionPopup>
|
:levelConfigList="config.levelConfigList || []"></commissionPopup>
|
||||||
<rulePopup v-model="showRule" :config="config" :distributionUser="state.distributionUser"></rulePopup>
|
<rulePopup v-model="showRule" :config="config" :distributionUser="state.distributionUser"></rulePopup>
|
||||||
<popupDistributionGroupCode :group="state.group" v-model="showGroup"></popupDistributionGroupCode>
|
<popupDistributionGroupCode :group="state.group" v-model="showGroup" v-model:shopInfo="shopUserInfo.shopInfo"></popupDistributionGroupCode>
|
||||||
<ymf-share-popup ></ymf-share-popup>
|
<ymf-share-popup ></ymf-share-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -400,7 +400,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const shopUserInfo = ref();
|
const shopUserInfo = ref({shopInfo:{}});
|
||||||
const config = reactive({});
|
const config = reactive({});
|
||||||
//邀请码
|
//邀请码
|
||||||
const inviteCode = ref('');
|
const inviteCode = ref('');
|
||||||
@@ -499,7 +499,7 @@
|
|||||||
totalPage: 0
|
totalPage: 0
|
||||||
});
|
});
|
||||||
async function getRecoders() {
|
async function getRecoders() {
|
||||||
if (state.config) return;
|
// if (state.config) return;
|
||||||
const ajaxQuery = {
|
const ajaxQuery = {
|
||||||
...query,
|
...query,
|
||||||
shopId: options.shopId
|
shopId: options.shopId
|
||||||
@@ -562,6 +562,9 @@
|
|||||||
|
|
||||||
const showInviteCode = computed(() => {
|
const showInviteCode = computed(() => {
|
||||||
if (config.upgradeType == 'invite') {
|
if (config.upgradeType == 'invite') {
|
||||||
|
if(config.openType=='pay'&&!isActivated.value){
|
||||||
|
return false
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (config.openType == 'manual' && (!state.distributionUser || !state.distributionUser.level)) {
|
if (config.openType == 'manual' && (!state.distributionUser || !state.distributionUser.level)) {
|
||||||
@@ -576,12 +579,13 @@
|
|||||||
if (!state.distributionUser && config.openType == 'manual') {
|
if (!state.distributionUser && config.openType == 'manual') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
//是否已成为分销员
|
//是否已成为分销员
|
||||||
const isActivated = computed(() => {
|
const isActivated = computed(() => {
|
||||||
return state.distributionUser && state.distributionUser.level;
|
return (state.distributionUser && state.distributionUser.level)?true:false;
|
||||||
});
|
});
|
||||||
watch(
|
watch(
|
||||||
() => activeTab.value,
|
() => activeTab.value,
|
||||||
@@ -871,6 +875,10 @@
|
|||||||
color: #e8ad7b;
|
color: #e8ad7b;
|
||||||
line-height: 48rpx;
|
line-height: 48rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom-btn {
|
.bottom-btn {
|
||||||
|
|||||||
@@ -258,7 +258,7 @@
|
|||||||
"pages": [{
|
"pages": [{
|
||||||
"path": "index",
|
"path": "index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "分销中心",
|
"navigationBarTitleText": "全民股东",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -278,7 +278,7 @@
|
|||||||
{
|
{
|
||||||
"path": "shop-detail/index",
|
"path": "shop-detail/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "分销中心",
|
"navigationBarTitleText": "全民股东",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -192,7 +192,7 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<view class="u-p-r-32">
|
<view class="u-p-r-32" v-if="carouselList.length">
|
||||||
<up-swiper indicator indicatorMode="line" height="188rpx" :list="carouselList"
|
<up-swiper indicator indicatorMode="line" height="188rpx" :list="carouselList"
|
||||||
keyName="imageUrl">
|
keyName="imageUrl">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -2504,7 +2504,7 @@
|
|||||||
|
|
||||||
console.log('options.initMessage', options.initMessage)
|
console.log('options.initMessage', options.initMessage)
|
||||||
const newTableCode = userStore.getQueryString(res.result, 'code');
|
const newTableCode = userStore.getQueryString(res.result, 'code');
|
||||||
|
console.log('newTableCode',newTableCode);
|
||||||
const shopInfoRes = await APIproductqueryShop({
|
const shopInfoRes = await APIproductqueryShop({
|
||||||
tableCode: newTableCode
|
tableCode: newTableCode
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ const myFunList = ref([
|
|||||||
icon: 'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_coupon.png'
|
icon: 'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_coupon.png'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '分销',
|
name: '全民股东',
|
||||||
type: 'fenxiao',
|
type: 'fenxiao',
|
||||||
icon: '/static/icon/fenxiao.svg'
|
icon: '/static/icon/fenxiao.svg'
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user